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 : anyone have a real VT100 terminal?
Author | Message | ||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2294 |
does anyone out there have a real VT100 terminal hooked up to a micromite? i'm getting down to the finer details of implementing VT emulation, and am finding a fair bit of uncertainty in the existing sources of information. one big question regards the 'scrolling region'; when a region is set up what commands respect it, and what ones ignore it? the below bit of mmbasic code checks to see if erase commands overflow the scrolling region or not (teraterm does overflow the region). cheers, rob Const ESC=Chr$(27) Print ESC "[2J"; setup(0) Do: Loop Until Inkey$<>"" Print ESC "[0J"; Print at(15, 12) " the bottom half of the screen should be blank "; Do: Loop Until Inkey$<>"" setup(0) Do: Loop Until Inkey$<>"" Print ESC "[1J"; Print at(15, 12) " the top half of the screen should be blank "; Do: Loop Until Inkey$<>"" setup(0) Do: Loop Until Inkey$<>"" Print ESC "[2J"; Print at(15, 12) " all of the screen should be blank "; Do: Loop Until Inkey$<>"" setup(1) Do: Loop Until Inkey$<>"" Print ESC "[0J"; Print at(15, 12) " the 3rd quarter of the screen should be blank "; Do: Loop Until Inkey$<>"" setup(1) Do: Loop Until Inkey$<>"" Print ESC "[1J"; Print at(15, 12) " the 2nd quarter of the screen should be blank "; Do: Loop Until Inkey$<>"" setup(1) Do: Loop Until Inkey$<>"" Print ESC "[2J"; Print at(15, 12) " the middle 50% of the screen should be blank "; Do: Loop Until Inkey$<>"" Print ESC "[1;24r"; End Sub setup(flag) Print ESC "[2K"; Print ESC "[1;24r"; Print at(1, 1); For I=1 To 24 Print I, "+", "+", "+", "+", "+", "+", "+", "+", I; If I<>24 Then Print Next I If flag<>0 Then Print ESC "[8;17r"; Print at(40, 12); End Sub Function at(X,Y) As string at=ESC+ "[" + Str$(Y) + ";" + Str$(X) + "H" End Function |
||||
bigfix Senior Member Joined: 20/02/2014 Location: AustriaPosts: 124 |
Rob, my "real" VT100 are deep buried in storage - would take hours to get them I grabbed a VT420 Surprise - powered up after being 20 Years on shelf... Put it into VT100 Mode in setup, even VT100 ID Next challenge was to get a 3V TTL to V24 25 Pin Female converter done After some hickups with undocumented chinese modules it finally worked Even when I turned off smooth scroll the VT420 still showed some buffer overrun garbage with your program DEC Terminals really depended on Xon/Xoff - which we do not have at MMites... - had to set it to 9600 Baud - finally worked MMite is a LCD Backpack, original Version, MMBasic 5.2 Some screens look different to the comments I did not analyse the CSI sequences yet - just runned the program I only post the first & the "failing" screens cheers Guenter |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5923 |
I just went to the shed to rescue a DEC VT510 terminal from my 'take to the tip' pile. It has only sat in the shed for ~15 years. I even have the original manual. Being the same brand as Guenter's I would expect it to behave the same in VT100 mode. It might take me some time to test it and get it connected to a 'mite but at least it's not going to the tip - this week. Jim VK7JH MMedit MMBasic Help |
||||
GoodToGo! Senior Member Joined: 23/04/2017 Location: AustraliaPosts: 188 |
The day after you take it to the tip will be the day you realise you need it..... Don't risk it! My mancave and garden shed are rapidly filling with stuff because of my reasoning. Eg. I have a fully working 1970's era Sunbeam Toastamatic (you know, the one's that automatically lower and raise the bread purely mechanically?) sitting in my garage in case the Sunbeam Toastamatic in everyday use in the house keels over. 10 years it's sat there waiting. But I bet the day I get rid of it....... Cheers! GTG! ...... Don't worry mate, it'll be GoodToGo! |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2294 |
oh no, don't throw it out! looking online, it looks like the VT510 even works with a standard PS2 keyboard. there must be someone nearby you who can provide it with a new home, and even if the tube was flat it could still likely be repowered with a modern LCD. excellent, that shows that i don't need to modify the erase functions to respect the scroll region, though i am a little surprised at this behaviour. none of the online material i looked at made it clear about what the expected behaviour was. the next test is this somewhat shorter one: Const ESC=Chr$(27) For I=1 To 24 Print I, "+", "+", "+", "+", "+", "+", "+", "+", I; If I<>24 Then Print Next I Print ESC "[12;40H"; Do Do: A$=Inkey$: Loop Until A$<>"" If A$="w" Then Print ESC "[A"; If A$="z" Then Print ESC "[B"; If A$="a" Then Print ESC "[D"; If A$="s" Then Print ESC "[C"; If A$="1" Then Print "full screen"; ESC "[1;24r"; If A$="2" Then Print "8;17 region"; ESC "[8;17r"; Loop Until A$="0" Print ESC "[1;24r" End this is an interactive test. to start with, you should be able to navigate the cursor around the screen using kets 'w','a','s','z'. make sure it can move to the full extremes top, bottom, left and right. when the cursor hits the edge, it should stop. next press '2' to set the scroll region to be from line 8 to line 17. verify if the cursor returns to the top left of the screen when you press this key. now try motoring around the screen again. the new bottom margin should be line 17, and once you have moved down to line 8 it should not be possible to move back above line 8. you can restore the scroll region to the full screen by pressing '1', and can exit the program by pressing '0'. cheers, rob :-) |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 5923 |
Well my DEC terminal passed the selftest OK so I will class it working. I also tested a Terminal Box which was sold in Aussie by Alloy. It uses a PC keyboard and monitor and seems to emulate a long list of terminal types. I used to sell these instead of full terminals when the buyer knew that he would be changing over to PC based in the near future. This one came back to me after about 6 months in the field. I won't put the terminal box on the tip pile. There is room inside for a micromite or two and would make a nice free standing 'mite. I need to wait for another rainy day before I can test your program. There is too much work to do in the garden this time of the year and I seem to take twice as long to do things compared to a year or two ago. Jim VK7JH MMedit MMBasic Help |
||||
CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 1995 |
itis a long-term plan of mine to find an old VT100 (or similar) and mount my MMX board inside the case... bring the pins out to a connector(s) on the back and have a free-standing uM well done on the "dumpster dive" |
||||
bigfix Senior Member Joined: 20/02/2014 Location: AustriaPosts: 124 |
Rob, works exactly as you described on the VT420 at 9600 Baud (Video on request only ) I also tried it with ESPTerm - works with 230 kBit cheers Guenter |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2294 |
excellent, that has enabled me to now finalize how i handle cursor movement commands. btw, how well does the following work with ESPTerm? Const ESC=Chr$(27) Print ESC "[?9h"; ' enable mouse reporting Print ESC "[?1015h"; ' select URXVT encoding (if available) Print ESC "[?1006h"; ' select SGR encoding (if available) Do Do: A$=Inkey$: Loop Until A$<>"" If A$=Chr$(27) Then Print If Asc(A$)<32 Then Print "<" Str$(Asc(A$)) ">"; Else Print A$; Loop Until A$=Chr$(26) Print ESC "[?1006l"; ' disable SGR encoding Print ESC "[?1015l"; ' disable URXVT encoding Print ESC "[?9l"; ' disable mouse reporting it makes use of alternative encoding for the mouse location reporting - SGR (1006) is the preferred reporting method, URXVT (1015) is ok but not great, while the default encoding can not encode beyond column 95 if using 7-bit characters. cheers, rob :-) |
||||
bigfix Senior Member Joined: 20/02/2014 Location: AustriaPosts: 124 |
Tested it on 1.01 ESPTerm One issue I found - Mouse stays enabled ?? Need to investigate Anyhow, this is the output clicking on the 4 Corners & Center When I use the right mousebutton then first number changes from 0 to 2 It also works excellent on an Android tablet with touch Wide Terminal with 120 Characters: |
||||
Print this page |