Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 13:34 04 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : new release of GFXterm64 for 64-bit Linux

     Page 1 of 2    
Author Message
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 03:48pm 11 Jul 2021
Copy link to clipboard 
Print this post

attached below, an update to GFXterm64 for 64-bit Linux:

GFXterm64-RC5.zip

this has a few new features to make life a little easier:

1. palette editor. available from the right-click menu, this allows you to edit the 16-colour palette. changes are saved upon shutdown, and reloaded on startup. there are buttons for resetting a single or all palette entries to their default values. or press the control key while clicking on either of the reset buttons to load random values (a testing feature that will be removed later).

2. the old CONNECT input window that required entering the port name and speed in full text has been updated to instead show two drop-down lists. click the 'edit' checkbox if you need to manually enter the port name. with the pico-based micromite it does NOT MATTER what baud rate you select.

3. the status of the modem handshaking lines (DTR, RTS, CTS, DSR) is now displayed on the right of the status bar. mouse coordinates was removed to make space for this. upper-case (DTR, etc) indicates asserted, lower-case (dtr, etc) indicates not asserted. the state of DTR and RTS can be changed with the alt-1 to alt-4 keystrokes, while CTS and DSR and controlled by the attached device.

4. the null character is generated by pressing ctrl-0 (ctrl-zero).


as before, pressing ctrl-space will reconnect you to the last port you were successfully connected to. the port name and baud rate are saved upon shutdown. other keystrokes are as per the win32 documentation in the doc register on tbs.


if anyone needs it, i can generate a 32-bit version with some effort. i'm also mulling over a win32 version, but this will require me creating a windows VM and then delving back into the quagmire of...

as always - testing, feedback, and suggested improvements would be much appreciated.


cheers,
rob   :-)
Edited 2021-07-12 01:49 by robert.rozee
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 03:58pm 11 Jul 2021
Copy link to clipboard 
Print this post

Nice Rob,

Obviously I'd appreciate a 32-bit Raspberry Pi version

Some recent observations (from a previous version):

1. GFXterm doesn't hide/show the cursor when it receives what are I believe the fairly standard codes [?25h, [?25l

2. Is there / can there be 100x50 support for the CMM2 ?

3. Is there a possibility of CMM2 font support ? Run "Yellow River Kingdom" and you'll see the villages are rendered in an "interesting" manner.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 11:41am 12 Jul 2021
Copy link to clipboard 
Print this post

  thwill said  Obviously I'd appreciate a 32-bit Raspberry Pi version
Tom


i did build a RPi version around a year ago, and it did work perfectly - but unfortunately was terribly slow on a model 3B. at the time i didn't bother seeing if this could be rectified, as i was using a borrowed RPi 1B to do the build, and then running it on a 3B at a friends house. i suspect that the performance issues were most likely due to the RPi simply not having enough computrons under the hood.

  thwill said   1. GFXterm doesn't hide/show the cursor when it receives what are I believe the fairly standard codes [?25h, [?25l
Tom


just checked, and these sequences seem to be working correctly, esc[?25l hiding the cursor and esc[?25h making it visible again. i can't be 100% sure when this functionality was added, but am 50/50 confident it was in last year's version (RC3).

  thwill said   2. Is there / can there be 100x50 support for the CMM2 ?

3. Is there a possibility of CMM2 font support ? Run "Yellow River Kingdom" and you'll see the villages are rendered in an "interesting" manner.
Tom


i'm afraid not. GFXterm64 uses the fonts built into your operating system, and so you would need to find versions of and install the CMM2 fonts yourself. furthermore, combining the several different sizes of font built into the CMM2 and numerous video modes supported, the number of different window sizes the GFXterm64 would need to allow for would be quite large. even allowing the user (as is currently possible) to change the font was a challenge to get working in a 'safe' way.

i believe that the CMM2 sends an obscure XTERM sequence to change the number of text lines and columns, but this sequence can not be supported generically as it presents a security issue - the target system (the micromite or CMM2) can create effects outside of the terminal window area. for instance, growing the terminal window to a size larger than the visible screen; combine this with GFXterm64's ability to draw graphic images provides a mechanism to present a convincing fake 'lock screen' that asks the user to enter their password. such things are frowned upon in the linux world.

if you want to do things beyond an 80x24 terminal window, a better approach may be to plug a cheap VGA monitor into your CMM2. certainly the speed performance of an attached VGA monitor would be miles better!


cheers,
rob   :-)
Edited 2021-07-12 21:51 by robert.rozee
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 12:32pm 12 Jul 2021
Copy link to clipboard 
Print this post

Hi Rob,

  robert.rozee said  
  thwill said  Obviously I'd appreciate a 32-bit Raspberry Pi version
Tom


i did build a RPi version around a year ago, and it did work perfectly - but unfortunately was terribly slow on a model 3B.


That would be GFXterm-RPi32 20-May-2020 RC3, I've been using it on-and-off on the 3B for a while (when PuTTY is annoying me) and not noticed it was particularly slow. I'm happy to build it for myself if that is an idea you are open to.

  robert.rozee said  
  thwill said   1. GFXterm doesn't hide/show the cursor when it receives what are I believe the fairly standard codes [?25h, [?25l
Tom


just checked, and these sequences seem to be working correctly, esc[?25l hiding the cursor and esc[?25h making it visible again. i can't be 100% sure when this functionality was added, but am 50/50 confident it was in last year's version (RC3).


Right you are. It works on the Pi version mentioned above (RC3) but not on the earlier Windows version I've got (23-July-2019).

  robert.rozee said  
  thwill said   2. Is there / can there be 100x50 support for the CMM2 ?


i believe that the CMM2 sends an obscure XTERM sequence to change the number of text lines and columns, but this sequence can not be supported generically ...


Could we not have a version which just fixes the size appropriate for the CMM2, it looks like the Windows build includes GFXterm (80x36).exe, GFXterm (80x43).exe and vanilla GFXterm.exe - not sure what that one does, can we not have a GFXterm100x50 for Linux/Pi ?

  robert.rozee said  
  thwill said  
3. Is there a possibility of CMM2 font support ? Run "Yellow River Kingdom" and you'll see the villages are rendered in an "interesting" manner.
Tom


i'm afraid not. GFXterm64 uses the fonts built into your operating system, and so you would need to find versions of and install the CMM2 fonts yourself. furthermore, combining the several different sizes of font built into the CMM2 and numerous video modes supported, the number of different window sizes the GFXterm64 would need to allow for would be quite large. even allowing the user (as is currently possible) to change the font was a challenge to get working in a 'safe' way.


I was thinking of just the one specific font that @CircuitGizmos made available https://www.thebackshed.com/forum/ViewTopic.php?TID=12892&PID=164593#164593 ... that is alas a .fon file and I'm not sure I'm quite ready to try and fight to convert that to be available in Linux without knowing that GFXterm will be able to use it.

  robert.rozee said  if you want to do things beyond an 80x24 terminal window, a better approach may be to plug a cheap VGA monitor into your CMM2. certainly the speed performance of an attached VGA monitor would be miles better!


I have such a monitor, and also a video capture device (for when I'm using 'doze), however you might call me eccentric but I'm enjoying doing everything via the common-denominator of a serial terminal, it also disguises my lack of pixel pushing ability.

Thanks,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 04:23am 13 Jul 2021
Copy link to clipboard 
Print this post

here are the source files:

GFXterm64-RC5 (12-july-2021) SOURCE.zip

it is currently built with Lazarus version 2.0.12 / FPC version 3.2.0, however GFXterm-RPi32 20-May-2020 RC3 would have been built with something much earlier.

double-clicking on the file project1.lpi to open with the Lazarus IDE.

with a bit of luck it should not require any changes to build with 32-bit Lazarus, although you may need to uncomment the following lines from unit1.pas:
(*function GetTickCount64:int64;
const multiplier=24*60*60*1000;
begin
  Result:=trunc(Now*multiplier)
end;
*)

the "(*" and "*)" mark the beginning and end of a comment block. the above lines are around 300 lines down from the start of the file - they were needed last year by the older version of Lazarus that was then available for the RPi.

the terminal screen size is defined by two constants around 170 lines from the top:
const ROWS=24;         // 24 or 36 or 43
      COLS=80;         // win32 limit: 1036 pixels max if 1024 pixel wide physical screen

the only different terminal sizes i've ever tried were for 80x36 and 80x43.

and finally, the taskbar title is initially set around line 2050 by the following:
  Form1.Caption:='GFXterm64';                  // updated by Timer1
  Application.Title:='GFXterm64';              // updated by Timer1

these are overwritten immediately after startup, but if building a 32-bit version it would be nice to change them too.

feel free to post the RPi executable if it functions fully, although i would ask that if changing terminal size you also post in the same zip file an 80x24 version. the executables are around 3.3mb in size. i've been compressing them with UPX to bring this down to around 820k.


cheers,
rob   :-)
Edited 2021-07-13 14:24 by robert.rozee
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 09:07am 13 Jul 2021
Copy link to clipboard 
Print this post

Thank you very much Rob, I'll try and build this week sometime.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 09:16am 23 Jul 2021
Copy link to clipboard 
Print this post

  thwill said  Thank you very much Rob, I'll try and build this week sometime.


Just a line to say that this isn't one of those things I've said I will do and then don't ... it is just that I discovered that my Pi still only had its original (and now full) 16 GB SD card in it so I'm having to rebuild that first.

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5735
Posted: 09:23am 23 Jul 2021
Copy link to clipboard 
Print this post

A Pi 3B works nicely with a usb-connected SSD. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3848
Posted: 09:31am 23 Jul 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  A Pi 3B works nicely with a usb-connected SSD. :)


That's OK for user files, but in my experience it's less fuss if the kernel and all the libraries, tools and bloat can be fitted on the internal SD card.

Plus I'd need another USB hub as currently I'm already hanging the keyboard, dual SD card adapter and two 'mite comms/power cables off it.

Best wishes,

Tom
Edited 2021-07-23 19:31 by thwill
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 02:22pm 15 Aug 2021
Copy link to clipboard 
Print this post

attached below, an update to GFXterm64 for 64-bit Linux:

GFXterm64 (16-aug-2021).zip

this fixes several small issues:

1. under Linux Mint 20.1 and 20.2 the screen could end up being 2 pixels per character cell too short, ie 48 pixels in total. this was an unfortunate interaction between Mint 20 and a bug in Lazarus, with the result of characters overlapping in the vertical direction. visible clipping would occur on lower-case characters with descenders: g, j, p, q, y, and some symbols. the fix was to obtain the dimensions of the cursor (on which all other screen measurements are based) in a different way.

2. under Linux Mint 20.1 and 20.2 the status bar was corrupted. this seems to have been caused by Mint 20 not supporting older type-1 fonts, and hence "Courier 10 Pitch" (included as part of X11) being no longer accessible to Lazarus (and likely other applications too). The fix was to switch to using the font "Monospace" instead.

3. the window 'fade-in' effect at startup has been fixed to remove a visible flicker on some systems.

4. the serial system has been completely reworked to become threaded. the most visible change here is that when a pi nano goes toes up, it no longer freezes up GFXterm for 30 seconds or so. instead the main loop of GFXterm keeps spinning, but no connection will be allowed until the serial threads (Rx and Tx) unblock.


note: to see the startup banner from a pi pico running mmbasic, do the following:
1. connect to the pico as normal,
2. press ctrl-space to disconnect,
3. with one hand hovering over ctrl-space... press the reset button attached between pins 30 and 28 of the pico,
4. quickly press ctrl-space to reconnect to the pico at the last known port.

you have something like 500ms between releasing the reset button and pressing ctrl-space to reconnect.



cheers,
rob   :-)
Edited 2021-08-16 00:30 by robert.rozee
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 05:42am 17 Aug 2021
Copy link to clipboard 
Print this post

Works fine initially in Puppy Linux (Bionic x64).
Can connect to an E28 module and do the normal things.
Can change the font and the font colour fine.

When I right-click/LOG to file, when I try to select a folder to save the log in, the application crashes and I cannot get out of it.
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 12:47pm 17 Aug 2021
Copy link to clipboard 
Print this post

hmmm, interesting. i've not been able to reproduce this behavior with 64-bit Linux Mint 20.2, will try creating a Puppy VM and test there.


  Grogster said  when I try to select a folder to save the log in, the application crashes


so the crash happens while the open file dialog is displayed? are you able to do a printscreen and post this?


cheers,
rob   :-)
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 02:36pm 17 Aug 2021
Copy link to clipboard 
Print this post

got a Puppy VM running, using the iso image "bionicpup64-8.0-uefi.iso". was able to copy the GFXterm64 executable into the home directory and run it, connect to an E-28 and all seems to run fine - including logging to a file:



i was, however, able to break Puppy Linux in other ways, not involving GFXterm. and was surprised to find that it seems to run everything as root, which is normally regarded as a very bad thing to do.

in terms of usability, i found Linux Mint XFCE to be far more windows-like than Puppy.
cheers,
rob   :-)
Edited 2021-08-18 00:38 by robert.rozee
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5735
Posted: 03:49pm 17 Aug 2021
Copy link to clipboard 
Print this post

Puppy isn't (or at least it didn't used to be) recommended for HDD installation as an OS. It's original intention was to run from a USB stick as a portable OS that leaves the host machine clean. I don't think they bothered much about everything running as root because of that. It's a really useful OS for rescuing broken Windows machines because it ignores all the rubbish that goes with Windows.

Having said that, I have an old netbook that I put puppy on simply because it was the only GUI OS that was fast enough to be usable for anything. :)
Edited 2021-08-18 01:49 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9066
Posted: 04:12am 19 Aug 2021
Copy link to clipboard 
Print this post

@ robert_rozee: Yes, it dies while I have the log-file window open - just trying to choose somewhere to save the log.  It could well be that Puppy simply does not like it, so I will try this out on my Mint machine later.  Yes, Puppy runs everything as root.

Mixtel90 has explained it perfectly, and yes, Puppy - even the latest ones - are designed to be run from a USB drive.  There are ways to install to an HDD/SSD, but generally speaking, it is a 'Live OS' that you boot and run from the USB stick.

I use Puppy to run my NAS boxes, but bigger Linux such as Mint for more of a multi-tasking situation.  Puppy is perfect for running a single system such as a NAS though.

And as Mixtel90 also said, I used Puppy recently to change my Outlook password when the account got hacked and the hackers were obviously able to keylog my new password - and use that to change it again - bastards!  
Anyhoo, with Puppy, they could not keylog as every single boot is essentially a clean-install for that session, so it worked a treat to change the password so they could not change it again, and then enable two-step verification etc.  

So, Puppy is more of a tool then a full Linux, but I digress....  
Smoke makes things work. When the smoke gets out, it stops!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 01:23pm 21 Aug 2021
Copy link to clipboard 
Print this post

GFXterm64 can now display the pico's signon message, added especially for panky   :-)

GFXterm64 (22-august-2021).zip

to see the message, select 'CONNECT' as usual from the right-click menu, but then while clicking on the 'OK' button in the dialog hold down the 'control' key on your keyboard.

the dialog will remain open, and you should see a small countdown timer in the window:



you have 10 seconds to unplug and replug the pico, or to press the pico's reset button. when the pico is unplugged the countdown timer changes to green. 100ms after the pico is plugged back in, GFXterm64 will carry on and attempt to connect to it (assuming it reappears with the same port name).

upon the timeout reaching zero, GFXterm64 will likewise proceed with attempting to connect as normal.

this seems to work moderately reliably on Linux Mint 20.2. i also tried it on a Puppy Linux VM, but VitrualBox does not get the USB port back up quickly enough (there seems to be about a 900ms window) to catch the signon message. on actual hardware things may work better.


i've also made various tweaks elsewhere, most of which will go completely unnoticed! hopefully i've finally sorted the flicker on startup with systems such as Puppy Linux that do not support alpha blending (fade in and fade out of the window).


cheers,
rob   :-)
Edited 2021-08-21 23:26 by robert.rozee
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1097
Posted: 12:38am 22 Aug 2021
Copy link to clipboard 
Print this post

Works a treat Rob, thanks very much.
Regards,
Doug.
PS. Sorry if I have been a PITA    
... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 05:25pm 27 Aug 2021
Copy link to clipboard 
Print this post

maintenance release - one small new function, and a fix for a pretty major bug:

GFXterm64-test (28-aug-2021).zip

keyboard-shortcuts.pdf

new function:
pressing alt-7 will bring up a text entry box. into this you can type normal text, as well as control codes using "/nnn", where nnn is a 1, 2, or 3 digit decimal character code. if you want just a "/" then enter "//".

this allows you to build a complete string and send it all at once without any breaks. handy for talking to HC-12 modules and the likes, or if you are so inclined, to build keyboard escape sequences that the micromite editor will respond to. for example, entering:
AT+RX/13
will cause an HC-12 (connected at 9600 baud) to respond with its current configuration;
entering:
/27[B/27[B/27[B/27[B/27[B/27[B/27[B/27[B
will cause the micromite editor to move the cursor down 8 line.


bug fix:
i think this version fixes the problem grogster was seeing, where opening a dialog (log to file, paste from file, or change font) would cause things to go to custard quite badly if there was also data coming in at any significant rate from the serial port.

the problem was/is that the file and font dialog windows (that are a part of Lazarus) do not seem to play nicely with threads - in particular ones that are busy handling a talkative serial port! so the bug was entirely my own fault, introduced by my converting the serial I/O to being threaded  

for the moment, the solution has been to suspend the two offending (serial read and write) threads while any of the above three dialogs are displayed. the only real problem with this is lost data from the serial port while the dialogs are open, but until i can figure out how to make the dialogs 'thread safe' there are not too many alternatives i'm afraid.

if you do need to log to a file without the above limitation, you can set up logging first (as normal), then press alt-L to suspend logging. now start whatever process is going to generate data, then press alt-L to begin logging again without any dialog coming up. each press of alt-L will toggle logging on and off.


i'd appreciate if folks could give this version a thorough testing, just in case i have accidentally introduced any other problems  


cheers,
rob   :-)
Edited 2021-08-28 04:37 by robert.rozee
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2290
Posted: 12:33pm 03 Sep 2021
Copy link to clipboard 
Print this post

changed especially for Volhout (press alt-6 to scroll cursor and screen up), plus more reworking of timer routines to improve compatibility with Puppy Linux. the screen now keeps running in the background when dialogs (font, open, save) are displayed.

you can also press alt-8 to pause display output (incoming data is buffered). for those keyboards that have a scroll-lock key, this does the same. alt-6 is also mapped to alt-up on cursor keypad.

keyboard guide is also included as a .pdf file:

GFXterm64 (4-sept-2021).zip

PLEASE test and report back successes or failures!


cheers,
rob   :-)
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3557
Posted: 08:58pm 03 Sep 2021
Copy link to clipboard 
Print this post

Hi Robert,

Works fine on Gallium OS (ubuntu amd64 bionic (18.04)) on my chromebook.
My other linux PC's are still 32 bits (older stuff doesn't run 64 bits).

Tried several of my gfx compatible programs (i.e. fft) and they all worked fine.
Also the editor in colorcode mode works fine. Haven't seen artifacts.
Thanks for the <alt>-6 combi key. Used it already few times.

Regards,

Volhout
PicomiteVGA PETSCII ROBOTS
 
     Page 1 of 2    
Print this page
© JAQ Software 2024