![]() |
Forum Index : Microcontroller and PC projects : Probl. w. VT100, GFXterm & Z80
Author | Message | ||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 949 |
Hi folks, I have great pleasure with my small Z80 computer (Z80-MBC2 - many thanks to Jman!) but a VT100 problem with GFXterm, Geoff's - ASCII Video Terminal and TurboPascal 3.0! As an example, my moon phases program: All works great with Teraterm, but unfortunately not with Geoff's Terminal and not with GFXterm. When I start the editor, everything seems to be normal: ![]() ![]() ...but when I scroll down: ![]() ![]() ...only the last line is updated! When I scroll back ![]() ![]() only the first line is updated!!! ![]() ![]() ![]() What's going on? Unfortunately it looks the same on an external monitor with Geoff's VT100 terminal! I know not all VT100 control codes have been implemented, but is that the reason? ...or does TurboPascal use any exotic codes? I would like to use the Z80-MBC2 as a stand-alone computer with keyboard and monitor and Geoff's VT100 terminal... Any help is appreciated!!! Frank |
||||
twofingers![]() Guru ![]() Joined: 02/06/2014 Location: GermanyPosts: 1593 |
Hi Frank, I'm not sure, but maybe a Micromite serial port monitor may help? BTW. Interesting project! ![]() Regards Michael causality ≠ correlation ≠ coincidence |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
Fire up Wireshark and use it's USB plugin to capture the serial port data. Then we can see what commands it's using. Jim VK7JH MMedit |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
with GFXterm running, right click within the terminal window and select 'command window'. this will pop up a small hovering window that displays escape sequences as they are processed and their pass/fail status. if you right-click in the command window you can clear the list, insert blank lines into the list, and copy the list to the clipboard. you can also tell GFXterm to use a human-readable format for log files using the /e commandline switch: GFXterm /e then just turn on logging before the offending operation, press the key sequence, then turn off logging. one really should read the manual ![]() ![]() ![]() cheers, rob :-) |
||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 949 |
Hi Rob, your program works so well that I haven't used the manual yet! ![]() Enclosed the logfile: 2019-01-07_185405_log.zip I did the same thing as above: In TurboPascal Editor scrolled to line 35 with CTRL-X and then back again with CTRL-E to line 10. I started logging after activating the TurboPascal editor... @Michael: Thanks for your link! Frank |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
right, i think i've found the reason things are going wrong: <ESC>[02;01H // cursor position, row 2, column 1 <ESC>[1M // (***) delete current line, scroll screen up <ESC>[24;01H // cursor position, row 24, column 1 <ESC>[1m // select BOLD text ProgrammEnde :boolean; <ESC>[K // erase to end of line <ESC>[23;01H // cursor position, row 23, column 1 <ESC>[23;01H // cursor position, row 23, column 1 <ESC>[01;12H // cursor position, row 1, column 12 <ESC>[0m // select NORMAL text 24 <ESC>[23;01H // cursor position turbo pascal is using <esc>[1M to erase the top line of the text area and scroll up the screen - this is a VT102 eacape sequence not supported by GFXterm or geoff's VT100 terminal. i'll try and add <esc>[1M support to GFXterm. in the meantime, is it possible to tell CP/M that the attached terminal is a VT100 instead of a VT102? cheers, rob :-) |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
give this a spin: 2019-01-07_213914_GFXterm_test_8-jan-2019.zip it should fix the scrolling issue, as well as possible problems that you've not yet noticed with inserting lines. there may still be an issue with inserting and deleting characters within a line - these escape sequences may be a little trickier to implement. please report back results, including inserting and deleting characters. cheers, rob :-) |
||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 949 |
Hi Rob, you're great!!! ![]() ![]() ![]() Now it works like a charm! ![]() I can move, insert, delete - all works as expected! Your GFXterm is really great! I don't know if the Arduino or the CP/M 3.0 is responsible for the VT100 - at least I can't find anything in the Arduino code... ...but... what needs to be changed in Geoff's VT100 code for my Z80 to work as a standalone device? ![]() Frank |
||||
robert.rozee Guru ![]() Joined: 31/12/2012 Location: New ZealandPosts: 2442 |
for completeness, the following three escape sequences should be implemented: Insert Line (IL) ESC [ Pn L Inserts Pn lines at line with cursor. Lines displayed below cursor move down. Lines moved past the bottom margin are lost. This sequence is ignored when cursor is outside scrolling region. Delete Line (DL) ESC [ Pn M Deletes Pn lines, starting at line with cursor. As lines are deleted, lines displayed below cursor move up. Lines added to bottom of screen have spaces with same character attributes as last line moved up. This sequence is ignored when cursor is outside scrolling region. and optionally Delete Character (DCH) ESC [ Pn P Deletes Pn characters, starting with the character at cursor position. When a character is deleted, all characters to the right of cursor move left. This creates a space character at right margin. This character has same character attribute as the last character moved left. i wonder if it might be time for someone to perhaps revisit geoff's VT100 terminal? if using an mx170, there should be plenty of extra flash available to provide the above, plus implement margins (the scroll region). at the same time the USB support could be switched over to use M-Stack. the extra RAM available may also be of some use - would two colours be possible, or the flashing attribute? jumper selection of baud rate could be dropped - did anyone ever use those jumpers? and what of mouse support? i'm NOT suggeting geoff should do this, but someone else on the forums with a bit of spare time. a few of the members seems to be moderately au fait with the microchip compiler, is there any interest? or is a RPi + HDMI screen a simpler route? cheers, rob :-) |
||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 949 |
Hi Rob, I fully agree with you! Annoyingly, I am not able to port the project to a 32MX170. ![]() Can you post your changes from GFXterm? - Maybe I can at least implement these changes in the existing VT100 video terminal code... ![]() Thanks! Frank |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |