![]() |
Forum Index : Microcontroller and PC projects : GFXterm64 for 64-bit Linux
Page 1 of 2 ![]() ![]() |
|||||
Author | Message | ||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
hi all, haven't been active on the boards for a bit, but hopefully will now have time to rectify that. attached is a very beta version of GFXterm for 64-bit linux: GFXterm64.zip there are a few things different, and a few things that don't work yet, but the basics are there :-) to connect, you need to provide the full path to your serial device. for me, this is: /dev/ttyACM0 note that the spelling of this is case-sensitive. hardware (real) serial ports are likely to be something like: /dev/ttyS0 currently the speed is hardwired to 38400. you will need to do some jiggling around to allow applications to access serial ports, which hopefully someone else who uses linux can jump in and explain. my workaround is to start the application from a console window with: user@desktop:~/pascal/GFXterm2$ sudo ./GFXterm64 i'm developing on 64-bit Linux Mint XFCE, using Lazarus/FPC. the compiled application in the archive will only run on 64-bit linux'es, but can probably be recompiled for 32-bit linux without any changes. it should also be relatively easy to recompile for macOS, and with some modifications for win32. it uses the "gtk2" widgetset. please let me know how things go. i'm sitting fairly low down on the learning curve at the moment! btw, the name 'GFXterm' is already taken in the linux world, so i may need to think up a new name. any suggestions? cheers, rob :-) Edited 2020-04-13 01:28 by robert.rozee |
||||
JohnS Guru ![]() Joined: 18/11/2011 Location: United KingdomPosts: 4044 |
Hi stranger! Quick addition: some ports may be /dev/ttyUSB0 (or 1 or 2 or ...) Generally, such device names are created with a group of dialout or other name (it's all programmable) - just use ls -l /dev/ttyUSB0 (or /dev/ttyACM0 etc) to see who owns it. Then to avoid having to use root (via sudo) you need your login (your user name) to be a member of the group. There are admin commands to do that (some GUI but also such as useradd, used like sudo useradd -G dialout yourloginname). John Edited 2020-04-13 06:43 by JohnS |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
Hi robert.rozee, I am quite new to this forum (only few years), and may not understand completely what GFXterm is. Could you elaborate a bit on where it is used ? Is it a Putty replacement ? Regards, Volhout PicomiteVGA PETSCII ROBOTS |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
hi Volhout, you can find more info about the win32 version here: http://www.thebackshed.com/docregister/ViewDoc.asp?DocID=22 this is the blurb: so yes, it is an alternative to TeraTerm, Putty, etc. however, the two 'claims to fame' that the others lack are: 1. you only need the file GFXterm.exe on your computer, with no installation required, and, 2. it is customized to work with the micromite, with no configuration required, and is 'aware' of mmbasic's built-in editor when pasting text from a file or the windows paste buffer. but, alas, windows is not going down a good path, and i've had a number of enquiries about versions of GFXterm for linux and macOS. GFXterm64 is an attempt at addressing this, although writing linux applications is completely new for me. my goal is to achieve the same level of functionality as the original, but across all platforms. cheers, rob :-) Edited 2020-04-14 21:14 by robert.rozee |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
@ robert.rozee I am currently using Putty on my Linux machines, but I am very curious to test GFXterm. My current machines are 32 bit (Lubuntu 16.04 and 18.04), but for this I will install a 64 bit linux (Lubuntu 18.04 - amd64) on my Chromebook, and try GFXterm (if you are interested in a test report). Just give me a few days.... Regards, Volhout Edited 2020-04-14 22:29 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
any testing you could do would be excellent! unfortunately i can't create a 32-bit build at the moment - i did try to set things up for 32-bit crosscompiling, but all i managed to do was break lazarus. in theory crosscompiling is possible, but as far as i can tell it is quite a mission to get set up successfully. below is a slightly updated version, with a few more features added from the win32 version of GFXterm. the main things that don't work yet are: - font is fixed at "monospace" - no selection of serial port from a list - the setup isn't saved between runs - serial only, no support for network access to a remote device GFXterm64 (15-april-2020).zip cheers, rob :-) addendum: the lazarus source is included in the 'source' directory. anyone who wants to should feel free to build their own version. 32-bit linux should definitely work, and there is a small chance that RPi or macOS may work with minimal changes. Edited 2020-04-15 03:55 by robert.rozee |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Runs fine in EasyOS 2.2 - which is a linux similar to Puppy, but not puppy. It is being developed by Barry, the same guy that created Puppy Linux, and Puppy is now being developed by the community. ![]() Talks to an E28 fine on the usual /dev/ttyACM0, BUT I cannot move the window at all - it is stuck there as in the image, and I cannot move it like other windows. There is also no minimize,window and close buttons, so the only way to get rid of it is to right-click the tab on the taskbar, and select KILL. It does work fine though. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
Also works fine on the latest Puppy Linux(bionic puppy x64): ![]() Again, no way to move the window as above, but it IS working. ![]() Right-click on the application in the taskbar, and select CLOSE or KILL. Other then that, it is working well. The font for GFX is nicer under Puppy then the thin one in Easy, but both are working. Smoke makes things work. When the smoke gets out, it stops! |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
hi Grogster, give this version a try: GFXterm64 (15-april-2020_A).zip have been testing on EasyOS 2.2 this evening (downloaded the iso and ran from a flash drive). am quite impressed, it is a pretty neat linux variant! the white strips on right side and bottom edge are now gone, and the application no longer hogs focus. this appears to have been an issue with EasyOS not liking a form that has BOTH the 'Scaled' and 'AutoSize' properties set true. i just set 'Scaled' to false on the main form and things seemed to come right - this should probably have been set false anyway. the title bar is still missing, this appears to be a bug in EasyOS in the way it handles the BorderStyle of a form. bsSingle (which is what GFXterm uses) is interpreted as bsNone. i'll work on an aesthetically pleasing solution to this, in the mean time i've added an 'exit' option to the right-click menu. for the moment, you can move the window by right-clicking on the application in the taskbar and selecting MOVE. i'm extremely relieved now to see that GFXterm runs on other than linux mint/xfce. EasyOS probably represents an extremely good test! cheers, rob :-) |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
Hi robert, I installed GalliumOS on my Chromebook, and tried your GFXterm64. I execute it by double clicking the icon. It starts up right away, but it does not connect to the MX170 I have connected. Checked my setup, and debugged using Putty. Putty connects at /dev/ttyACM0 and 38400 baud. See attached screenshot. I pressed the function keys, and these show associated text. When I type "list" and return, nothing happens, although there is a program in the MX. Does this have something to do with running as root ? or adding the GFXterm to the dialout group ? I'll play with that for a while,,,,, ![]() I noticed there is only one file in the folder where GFXterm64 is located, IS there no configuration file or so?? I tried sudo ./GFXterm64 and sudo ./GFXterm64 /dev/ttyACM0 both give same results... no connection. Regards, Volhout Edited 2020-04-16 06:40 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
hi Volhout, to connect the micromite you need to right-click and select 'CONNECT' from the popup menu, then enter the path to the serial device into the query box. if the green "online" flag above the terminal area isn't lit, then you are not connected and GFXterm will just loop back keypresses to the screen (a bit like a typewriter). am working on getting font selection available, so should have another updated version soon. there is no configuration file yet, that is something else to do. cheers, rob :-) Edited 2020-04-16 16:55 by robert.rozee |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
OK, will do. ![]() Yes, I find the "New" container-isolated app running thing quite interesting. It does make the OS very much more isolated and secure when running ANY application, so that is certainly an aspect I am following closely! HAHA, yeah, EasyOS is still TECHNICALLY beta, even though it is up to version 2.2 But it does work in there, and I WILL try your way to move the window. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
here is another 'incremental' update: GFXterm64 (17-april-2020).zip this version supports changing the font, although be warned that some screen flashing is involved! this is because, under linux, i need to maximize the window (to cover the whole screen) and then restore it a couple of times. it is an unfortunate consequence of linux not handling 'AutoSize' forms that change size dynamically very well - the form needs to be maximized while changing the terminal screen size in order to snap to the new content size when restored. needless to say, after spending 8 hours perfecting the method i ended up with quite a headache from all the screen flashing! there are also numerous other small tweaks. but the configuration data is still not yet saved ![]() cheers, rob :-) BIG term: Edited 2020-04-17 01:15 by robert.rozee |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
Hi robert, Thanks for the tip on the right click, that helps a lot. The 15 april version worked right away. Tried pasting text, and copy and past. All works fine. The 17 April (I tried immediately after the 15 april version) version at first did not want to connect with micromite, but third time I tried, it worked. And after that never failed, Maybe caused by the 15 april version not releasing the port immediately ? Anyway the terminal works. It is a nice piece of work, and I like it especially since it is all in a single file. Easily portable to other linux machines.... How can I use the graphics functions ? Can I draw lines ? Regards, Volhout P.S. this is tested on Gallium OS (a pre configured Xubuntu 18.04 (amd64), especially for chromebooks with intel processors) on a Acer C720 chromebook. Edited 2020-04-17 05:47 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
the graphics are pretty simple to use, with less than a dozen different commands. all commands are preceded with chr$(16), and terminated with chr$(13) (optionally followed by a chr$(10)). everything is in plain text, and command names can be abbreviated to a single letter (eg, "C" and "clear" work the same). parameters can be separated by tabs (a comma in basic print statements). the simplest thing to do first off is define the following three constants at the start of your code: Const GFX=Chr$(16) Const ENQ=Chr$(5) Const ACK=Chr$(6) graphics commands will then look like: Print GFX "ink" 255, 255, 0, 7 Print GFX "line" 100, 100, 100, 300 the above two lines: (1) selects yellow ink with a pen width of 7 pixels, then (2) draws a line from coordinate (100,100) to coordinate (100,300). see the examples and list of commands in the attached zip file: GFX command list and demo.zip the two example .bas files show how to draw cirlces, scroll the graphics area, clear the graphics plane, etc. note: the colour (0,0,0) is transparent. all graphics hover over the text plane, and the two planes scroll independently. to get the size of the graphics plane in your program use: Print GFX "?" Input Gw, Gh the codes ENQ and ACK are used to regulate the speed of your program so it doesn't end up sending graphics commands too quickly (see the examples). in general, it would be difficult for any normal program to require this; the graphics are largely there for creating graphs of data that your program produces. press alt-C on the keyboard at any time to clear the graphics plane. cheers, rob :-) Edited 2020-04-17 20:34 by robert.rozee |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
Hi Robert, Works very nice !! Tried your demo's, and played with it a bit. ![]() Nice that you can indendently clear the text screen (ctrl-C) and the graphic screen (alt-C). Can we improve the drawing speed by increasing the baudrate ? Can this be done with some "autobaud" at connect ? (try 115200, and when that gives errors then fall back to 38400?). Anyway, a nice piece of work. Regards, Volhout PicomiteVGA PETSCII ROBOTS |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9610 |
17th April 2020 version under Puppy or Easy still has no bar at the top, and I have no buttons(minimise/close etc), and I cannot drag the window. I CAN move it using the method you stated here though. This must be specific to Puppy and Easy, cos I note that Volhout's screenshot obviously shows the title-bar/buttons thing. I don't know why this is not showing up in Puppy/Easy. Smoke makes things work. When the smoke gets out, it stops! |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5089 |
Could be several reasons I haven't used puppy for a while, and when I did it was always 32 bit for my older machines. But I seem to recall that is used GTK2+ And Puppy used Joe's window manager (JWM), not openbox or so. Maybe there is some difference. Or there is simply a library missing.... Another thing could be that Puppy is a minimal distro, and for each puppy there is a library set (SFS) with development tools. These are not in the Puppy image, but should be added if needed. Maybe some of the missing libs are in that development kit (they refer to it as the DEVX). Not sure if this applies to EASY however... Regards, Volhout P.S. I like this grapics capability a lot. I wish I had this half a year ago. I used a MX170 micromite to implement a PID control. I remember I added a 320x240 spi LCD, just to graph the feedback signal to quickly see overshoot or instability. That could have been done through the terminal also. After it all worked, the LCD was removed... Edited 2020-04-19 06:37 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
hi guys, give this one a go: GFXterm64 (19-april-2020).zip i've changed round how font size changes are handled quite a bit - no more flashing screen! and as a result have been able to use set the BorderStyle to bsSizable (the default), along with the window having fixed constraints to stop it being resized. i've also found the option to 'turn off' the 'maximize' button in the titlebar. it _should_ all now behave in a far more civilized manner on puppy linux. have not yet added the ability to set the baud rate. will get on to that this evening. cheers, rob :-) |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
well, i feel we finally have a pretty-much-fully-working version of GFXterm64 for 64-bit linux: GFXterm64 (22-april-2020).zip GFXterm64 source (22-april-2020).zip GFXterm documentation.zip i've not updated the documentation yet, but it is pretty-much-the-same as for the Win32 version of GFXterm. most obvious differences are: 1. the connect dialog is a little different (not menu driven), enter the port path (eg /dev/ttyACM0), followed optionally by a colon and the desired baud rate. the default with none specified is 38400, 2. the quick-connect key combination is ctrl-space instead of alt-space (which linux uses for other things), 3. there is no tcp/ip network support yet - i will add this in at some future time, 4. the diagnostics info (VT and GFX decoding, and extended logging) now writes to an attached terminal window; launch GFXterm64 from a terminal window with ./GFXterm64 and this data will be printed out while it runs, 5. there are no built-in fonts, but most linux desktops seems to provide a few monospaced font that look pretty good, 6. a configuration file is used instead of saving the state to the (windows) registry, this file is located in ~/.config on most linux installations, 7. the popup menu has been re-jigged a little, with one or two extra features. try out font colour -> swap B/W for a zx-81 effect :-) in theory it should be possible with a copy of lazarus (2.0.6 or later) running on a 32-bit linux machine to compile the source to a 32-bit executable. i'd be keen for someone to try this out, as i don't have a 32-bit linux machine to hand at the moment to try this with myself. it should also be possible to compile on a raspberry Pi, possibly macOS, and perhaps even for android (?) cheers, rob :-) Edited 2020-04-22 02:56 by robert.rozee |
||||
Page 1 of 2 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |