Great news. Where were we up to - was it adding code so floppy drive images could be read directly? Certainly my triblade seems stable enough to call a v1.0
My TriBlade has propelled it's way back to me. Courtesy of the wonderful people of the Concordia bus company and Finland's Found Property Service. www.loytotavara.net/indexe.htm
Among all the bad news in the paper each day, it's little things like that which remind me perhaps the world is not so crappy after all.
Glad to have you back among the propellers [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
Second Propfest & TriBlade/ZiCog meeting in Adelaide at Drac's place.
His TriBlade is now running latest code including SD files. It was nice to see Wordstart running (using TeraTerm on the PC as the VT100). We also compiled a small program on the TriBlade under CPM.
Also discussed the upcoming RamBlade and made a few decisions - I will update that thread soon.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Links to other interesting threads:
Yes, it was a great followup Conference and Propfest. Pity Heater wasn't here but I guess he is still exhausted after searching every bus in Finland *grin*
I had some code from 3 weeks ago that would not load the hard drives sometimes, but with a quick update directly from Cluso's laptop it is all running very smoothly now.
We got Pacman working too (though this does need a Wyse terminal program). I've written a terminal program that can handle the necessary VT100 and Wyse Escape sequences. They are about 30 lines of VB.Net code and maybe down the track possibly could find their way into the BST terminal program??
And we compiled a "Hello World" on the Zicog itself.
I've very excited about the upcoming tiny ramblade addon board that sits above the standard protoboard. Cluso will no doubt keep us posted as it comes together.
We got Pacman working too (though this does need a Wyse terminal program). I've written a terminal program that can handle the necessary VT100 and Wyse Escape sequences. They are about 30 lines of VB.Net code and maybe down the track possibly could find their way into the BST terminal program??
I have been giving VT100 a cursory look over the last month or so, but I've not made any start on implementing it yet. Let me know what you need (hopefully only a subset of the VT100 controls) and I'll see what I can do.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
Brad: I am sure Drac can post you the section of VB.net code which does the emulation required. He showed me that yesterday and it was not that long, and it is running so that would be a quick start.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Links to other interesting threads:
Cluso99 said...
Brad: I am sure Drac can post you the section of VB.net code which does the emulation required. He showed me that yesterday and it was not that long, and it is running so that would be a quick start.
I'm not too worried about the VT100 emulation end of things. What is slightly more difficult is building a multi-platform component that allows the flexibility required to work as a terminal emulator. The way I'm doing it at the moment was built as a scrolling edit window with no requirements for cursor positioning, in-place editing or attributes (font size/bold/underline/colour). So it's a re-write of the terminal emulator from the ground up.
To be honest it _has_ been on my todo list for a long time now, I've just never needed it myself so I never got around to it. Now there seems to be some more people wanting VT100 emulation I'll get into it a bit further.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
Yeah... We want the A> prompt well and truly burnt in LOL
Chucked my screens away some years ago. Recently put a 17" VGA (monitor) out for council collection and a sign saying "works" and noone was took it. Most other junk went, but not the VGA !!
Brad, would it be possible/simpler to have an extra terminal window that just does VT100 ?? I wouldn't want to lose the scrolling back feature when not in VT100 mode.
I am noticing that it is not so friendly in swapping between edit/compile and terminal windows .... Not sure what to suggest yet.
HOWEVER, I am really loving bst and particularly it's #define feature !!! I now use that for debugging, etc. I have a lot of options in my code, such as putting out "+" when reading and "." when writing sectors, xtal speed, etc, etc, etc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Links to other interesting threads:
Brad, would it be possible/simpler to have an extra terminal window that just does VT100 ?? I wouldn't want to lose the scrolling back feature when not in VT100 mode.
No, what I'm going to do is have it so the cursor positioning works wherever the current display window is, but maintain the scrollback. So in theory you could dump 1000 lines out then use VT100 mode for a bit and then pump out more lines. The whole lot will be fairly seamless.
Cluso99 said...
I am noticing that it is not so friendly in swapping between edit/compile and terminal windows .... Not sure what to suggest yet.
Yeah, I've got some forced scope changes in there. It started to bug me a little too, but I'm not entirely sure of the best way to tackle it yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
No, what I'm going to do is have it so the cursor positioning works wherever the current display window is, but maintain the scrollback.
That would work fine. Programs that move the cursor round (eg wordstar) would stay in the screen area automatically. Programs that scroll would scroll.
I've been using Teraterm and you have to remember to close it down when downloading a new propeller program as the ports conflict. I think there was a similar issue with BST, but it ought to be easy to shut down the terminal when downloading a new program. Or, if you don't want to lose the user's text, maybe keep the terminal open but close the serial port, download doing the reset etc, then reopen the serial port to the terminal. Or even just keep it open but redirect it?
Yes, there are only a few VT100 and Wyse codes. Though it helps to have a program outputting them so you can test it as you go. Either a spare triblade, or cluso's nifty new 1.3" ramblade...
Anyway, below is the code in vb.net, and for those that prefer reading spin, the code to do the same thing copied from Vince Briel's Pocketerm. We were building both at the same time, and just kept adding instructions till all the CP/M programs we could find were working ok.
Sub DisplayCharacter(ByRef CharacterChanged As String)
' receives a character from serial port and updates the display
Dim x As Integer
Dim y As Integer
Dim a As Integer
Dim i As Integer
Dim DisplayString As String
Dim asciichar As Integer
Dim LineOfText As StringIf CursX > 79 Then CursX = 0' when listening to lots of ^ characters can error
Static VT100 As String' build vt100 string
asciichar = Strings.Asc(CharacterChanged)
Select Case asciichar
Case13' carriage return - back to the left side but don't scroll
CursX = 0Case10' scroll up one line if on bottom line, otherwise just move down oneIf CursY < 24 Then
CursY = CursY + 1Else
For x = 0To79
Display(x, 25) = " "' clear hidden line
Next
For y = 1To25
For x = 0To79
Display(x, y - 1) = Display(x, y)
Next
Next
CursY = 24EndIfCase8' backspace
CursX = CursX - 1If CursX < 0 Then CursX = 0
Display(CursX, CursY) = " "If CursX < 0 Then CursX = 0Case0, 28To31, 128To255' display binary values in curly braces
DisplayString = "{" + Trim(Strings.Str(asciichar)) + "}"If CursX > 74 Then ' near end of line so new lineCall Scroll()
EndIf
For i = 1To Len(DisplayString)
Display(CursX, CursY) = Strings.Mid(DisplayString, i, 1)
CursX = CursX + 1
Next
Case1To7, 9, 11, 12, 14To26' display values 0 to 26 as ^If CursX > 74 Then ' near end of line so new lineCall Scroll()
EndIf
DisplayString = "^" + Strings.Chr(64 + asciichar) ' 1=^A 2=^B etc
For i = 1To Len(DisplayString)
Display(CursX, CursY) = Strings.Mid(DisplayString, i, 1)
CursX = CursX + 1
Next
Case27' escape sequence
VT100 = "]"' start building vt100 stringEnd Select
' no need to print character if >128 or a control character as already printed aboveIf asciichar >= 32And VT100 = ""And asciichar < 128 Then ' ignore other characters under 32
Display(CursX, CursY) = CharacterChanged
CursX = CursX + 1' add one to the cursorIf CursX > 79 Then
CursX = 0
CursY = CursY + 1' move to next lineEndIfIf CursY > 24 Then
' scroll up
For x = 0To79
Display(x, 25) = " "' clear hidden line
Next
For y = 1To25
For x = 0To79
Display(x, y - 1) = Display(x, y)
Next
Next
CursY = 24' beginning of last line
CursX = 0EndIfEndIf' vt100 escape codes - all start with ] which stands for escape (easier to match string)If VT100 <> ""And asciichar >= 32 Then
VT100 = VT100 + CharacterChanged ' add new ones onEndIfIf Strings.Len(VT100) > 40 Then ' some {instructions} can be at least 33 char
VT100 = ""' cancel it but this should never happen. Just gets it out of a potential hangEndIfIf VT100 = "][noparse][[/noparse]H" Then
' home position
CursX = 0
CursY = 0Call RedrawDisplay()
VT100 = ""' reset it must do this for every commandEndIfIf VT100 = "][noparse][[/noparse]J" Then
' erase from current line to the bottom of the screen
For y = CursY To24
For x = 0To79
Display(x, y) = " "
Next
Next
Call RedrawDisplay()
VT100 = ""' reset it must do this for every commandEndIfIf VT100 = "][noparse][[/noparse]0m" Then
' reset all attributes - ignore
VT100 = ""' reset it must do this for every commandEndIfIf Strings.Len(VT100) >= 6And Strings.Len(VT100) <= 8And Strings.Right(VT100, 1) = "H" Then
' a cursor move instruction can be ][noparse][[/noparse]03;04H or ][noparse][[/noparse]3;4H or ][noparse][[/noparse]03;4H
i = Strings.InStr(VT100, ";")
If i <> 0 Then
LineOfText = Strings.Left(VT100, i - 1)
LineOfText = Strings.Mid(LineOfText, 3) ' strip off escape and [noparse][[/noparse]
a = Val(LineOfText) ' row
CursY = a - 1' I use origin of 0,0 and vt100 uses 1,1
LineOfText = Strings.Mid(VT100, i + 1)
LineOfText = Strings.Left(LineOfText, Strings.Len(LineOfText) - 1) ' strip off H
a = Val(LineOfText) ' column
CursX = a - 1Call RedrawDisplay()
EndIf
VT100 = ""' reset it must do this for every commandEndIfIf VT100 = "][noparse][[/noparse]0;1m" Then ' highlight text' highlight text but I'm not sure how to do this in a textbox (? a rich text box) ' plus need to store this attribute in the array' so just ignore for the moment
VT100 = ""EndIfIf VT100 = "][noparse][[/noparse]K"Or VT100 = "][noparse][[/noparse]0K" Then ' delete to the end of the line
For x = CursX To79
Display(x, CursY) = " "
Next
Call RedrawDisplay()
VT100 = ""' reset it must do this for every commandEndIfIf VT100 = "][noparse][[/noparse]D" Then ' backspace ? a non documented vt100 code (escD is left arrow)'Only happens when opening a file and changing the name. ' wordstar sends <esc>[noparse][[/noparse]D then a space then <esc>[noparse][[/noparse]D again
CursX = CursX - 1If CursX < 0 Then CursX = 0Call RedrawDisplay()
VT100 = ""' reset it must do this for every commandEndIfIf VT100 = "][noparse][[/noparse]M" Then
' deletes the line with the cursor on it' scrolls all lines below this up one
For x = 0To79
Display(x, y) = " "
Next
y = 25' delete hidden line
For x = 0To79
Display(x, y) = " "
Next
For y = CursY To24
For x = 0To79
Display(x, y) = Display(x, y + 1)
Next
Next
Call RedrawDisplay()
VT100 = ""' reset it must do this for every commandEndIfIf VT100 = "][noparse][[/noparse]L" Then
' everything moves down one line from the current cursor line' and delete the cursor line
For y = 23To CursY Step -1
For x = 0To79
Display(x, y + 1) = Display(x, y)
Next
Next
For x = 0To79
Display(x, CursY) = " "
Next
Call RedrawDisplay()
VT100 = ""' reset it must do this for every commandEndIfIf VT100 = "][noparse][[/noparse]2J" Then
' clear the whole display and move cursor to home
For y = 0To25
For x = 0To79
Display(x, y) = " "
Next
Next
CursX = 0
CursY = 0Call RedrawDisplay()
VT100 = ""'reset it must do this for every commandEndIf' Televideo and Wyse commands for Pacman and tetrisIf VT100 = "];"Or VT100 = "]*" Then
' Televideo/Wyse60 command to clear screen ESC; or ESC*
For y = 0To25
For x = 0To79
Display(x, y) = " "
Next
Next
CursX = 0
CursY = 0Call RedrawDisplay()
VT100 = ""'reset it must do this for every commandEndIf' move cursorIf Strings.Len(VT100) = 4And Strings.Left(VT100, 2) = "]=" Then
' a cursor move instruction is ESC=RC,4 bytes 32 offset
CursY = Strings.Asc(Strings.Mid(VT100, 3, 1)) - 32
CursX = Strings.Asc(Strings.Mid(VT100, 4, 1)) - 32Call RedrawDisplay()
VT100 = ""' reset it must do this for every commandEndIf' cursor offIf Strings.Len(VT100) > 2And Strings.Left(VT100, 1) = "]"And Strings.Mid(VT100, 3, 1) <> "[noparse][[/noparse]" Then
' not a VT100 message as second character is not [noparse][[/noparse]If VT100 = "].0" Then
' cursor off
VT100 = ""' reset it must do this for every commandEndIfIf VT100 = "].1" Then
' cursor on
VT100 = ""' reset it must do this for every commandEndIfEndIf' don't forget to set vt100 to "" after every if vt100 statementEndSub
And in Spin
'Start of VT100 codeif remote == 27'vt100 ESC code is being sent
vt100:=1
byte1:=0
byte2:=0
byte3:=0
byte4:=0
byte5:=0
byte6:=0
byte7:=0
remote:=0
temp2:=0
wyse:=0
w1:=0
w2:=0
w3:=0' removed the skip for esc= and put it further down'if remote==61' vt100:=0' remote:=0'Don't display the ESC codeif remote == 99and vt100 == 1'ESC c
remote:=0
vt100:=0
text.inv(0)
text.cls(Baud,termcolor,pcport,ascii,CR)
text.home
' wyse command to clear screen = Esc;if remote==59and vt100==1and wyse==0
vt100:=0
remote:=0
text.cls(Baud,termcolor,pcport,ascii,CR)
text.home
' another wyse command to clear the screen is Esc*if remote==42and vt100==1and wyse==0
vt100:=0
remote:=0
text.cls(Baud,termcolor,pcport,ascii,CR)
text.home
'put ESC D and ESC M hereif remote == 77and vt100 == 1'AKA ESC M
text.scrollM
vt100 := 0if remote == 68and vt100 == 1'AKA ESC Dif byte2 <> 91and byte3 <> 91and byte4 <> 91'not esc[noparse][[/noparse]D 'text.scrollD
vt100 := 0if remote == 76and vt100 == 1'AKA ESC Lif remote == 91and vt100 == 1' [noparse][[/noparse] 'look for open bracket [noparse][[/noparse]
vt100:=2' begin wyseif remote==61and vt100==1and wyse==0' wyse command for Esc=
wyse:=61if remote==46and vt100==1and wyse==0' wyse command for Esc.
wyse:=46if wyse==61or wyse==46
w3:=w2 ' wyse mini buffer , only needs a few characters as codes are short
w2:=w1
w1:=remote
remote:=0' so doesn't print characterif w3==61and wyse==61' an Esc=RC
col:=w1-32
row:=w2-32
text.cursloc(col,row)
vt100:=0' clear pointer
wyse:=0' clear vt100 pointer too
remote:=0' hide character from outputif w2==46and w1==49and wyse==46' Esc.1
vt100:=0' do nothing but do need to trap these (cursor on and off)
wyse:=0
remote:=0' hide character from outputif w2==46and w1==48and wyse==46' Esc.0
vt100:=0
wyse:=0
remote:=0' hide character from output ' end wyse 'start recording codeif remote == 62and vt100 == 1or remote == 60and vt100 == 1'look for < & >
vt100:=0' not sure why this is coming up, can't find in spec.if vt100==2''Check checking for VT100 emulation codes if remote > 10
byte7:=byte6
byte6:=byte5 ' My VTCode Mini Buffer
byte5:=byte4
byte4:=byte3
byte3:=byte2 'Record the last 7 bytes
byte2:=byte1
byte1:=remote
if remote == 109'look for lowercase mif byte2 == 91'if [noparse][[/noparse]m turn off to normal set
text.inv(0)
vt100:=0if byte2 == 49and vt100 > 0'is it ESC[noparse][[/noparse]1m BOLD'text.inv(1)
vt100 := 0if byte2 == 55and vt100 > 0'is it ESC[noparse][[/noparse]7m?
text.inv(1)
vt100 := 0if byte2 == 48and vt100 > 0'0 is back to normal
text.inv(0)
vt100:=0if byte2 == 52and vt100 > 0'is it ESC[noparse][[/noparse]4m underline?
vt100:=0'yes ignoreif byte2 == 50and vt100 >0'is it ESC[noparse][[/noparse]2m dim text
vt100:=0'yes ignore if remote == 64'look for ESC[noparse][[/noparse]value@ @=64 insert value spacesif byte4 == 91'two digit value
byte3:=byte3-48'Grab 10's
byte2:=byte2-48'Grab 1's
byte3:=byte3*10'Multiply 10's
byte3:=byte3+byte2 'Add 1's
text.insertat(byte3)
if byte3 == 91'single digit value
byte2:=byte2-48
text.insertat(byte2)
vt100 :=0if remote == 80'look for ESC[noparse][[/noparse]valueP P=64 delete value spacesif byte4 == 91'two digit value
byte3:=byte3-48'Grab 10's
byte2:=byte2-48'Grab 1's
byte3:=byte3*10'Multiply 10's
byte3:=byte3+byte2 'Add 1's
text.delp(byte3)
if byte3 == 91'single digit value
byte2:=byte2-48
text.delp(byte2)
vt100 :=0if remote == 104'look for lowercase h set CR/LF modeif byte2 == 48'if character before h is 0 maybe command is 20hif byte3 == 50'if byte3 then it is for sure 20h
LNM := 0
vt100:=0if remote == 61'lool for =
vt100:=0if remote == 114'look for lowercase r
vt100:=0if remote == 108'look for lowercase lif byte2 == 48'if character before l is 0 maybe command is 20lif byte3 == 50'if byte3 then it is for sure 20l
LNM := 1'0 means CR/LF in CR mode only
vt100:=0if remote == 62'look for >
vt100:=0if remote == 77'ESC M look for obscure scroll window code
text.scrollM
vt100:=0if remote == 68or remote == 76' look for ESC D or ESC L
text.scrollD
vt100:=0if remote == 72or remote == 102' HOME CURSOR (uppercase H or lowercase f) if byte2==91or byte2==59'look for [noparse][[/noparse]H or [noparse][[/noparse];f
text.home
vt100:=0'' Check for X & Y with [noparse][[/noparse]H or ;f - Esc[noparse][[/noparse]Line;ColumnHelse'here remote is either H or f if byte4 == 59'is col is greater than 9 ; ALWAYS if byte4=59
byte3:=byte3-48'Grab 10's
byte2:=byte2-48'Grab 1's
byte3:=byte3*10'Multiply 10's
byte3:=byte3+byte2 'Add 1's
col:=byte3 'Set colsif byte7 == 91'Assume row number is greater than 9 if ; at byte 4 and [noparse][[/noparse] at byte 7 greater than 9
byte6:=byte6-48'Grab 10's
byte5:=byte5-48'Grab 1's
byte6:=byte6*10'Multiply 10's
byte6:=byte6+byte5 'Add 1's
row:=byte6
if byte6 == 91'Assume row number is less than 10
byte5:=byte5 - 48'Grab 1's
row:=byte5
if byte3 == 59' Assume that col is less an 10
byte2:=byte2-48'Grab 1's
col:=byte2 'set colsif byte6 == 91'Assume row number is greater than 9
byte5:=byte5-48'Grab 10's
byte4:=byte4-48'Grab 1's
byte5:=byte5*10'Multiply 10's
byte5:=byte5+byte4 'Add 1's
row:=byte5
if byte5 == 91'Assume that col is greater than 10
byte4:=byte4-48'Grab 1's
row:=byte4
col:=col-1if row == -459
row:=1if col == -40' Patches a bug I havn't found. *yet*
col := 58' A Microsoft approach to the problem. :)if row == -449
row := 2' Appears to be an issue with readingif row == -439' single digit rows.
row := 3if row == -429' This patch checks for the bug and replaces
row := 4' the faulty calculation.if row == -419
row := 5' Add to list to find the source of bug later.if row == -409
row := 6if row == -399
row := 7if row == -389
row := 8if row == -379
row := 9
row--
if row < 0
row:=0if col < 0
col:=0if row > 35
row :=35if col > 79
col := 79
text.cursloc(col,row)
vt100:=0if remote == 114'ESCr
text.out(126)
if remote == 74'' CLEAR SCREENif byte2==91'' look for [noparse][[/noparse]J '' clear screen from cursor to 25
text.clsfromcursordown
'vt100:=0if byte2==50'' look for [noparse][[/noparse]2J '' clear screen
text.cls(Baud,termcolor,pcport,ascii,CR)
if byte2==49'look for [noparse][[/noparse]1J
text.clstocursor
if byte2==48'look for [noparse][[/noparse]0J
text.clsfromcursordown
vt100:=0if remote == 66'' CURSOR DOWN Esc[noparse][[/noparse]ValueBif byte4 == 91'' Assume number over 10
byte3:=byte3-48
byte2:=byte2-48
byte3:=byte3*10
byte3:=byte3+byte2
var1:=byte3
if byte3 == 91'' Assume number is less 10
byte2:=byte2-48
var1:=byte2
if byte2 == 91''ESC[noparse][[/noparse]B no numbers move down one'text.out($C3)
var1 := 1
loop:=0repeatuntil loop == var1
loop++
text.out($C3)
vt100:=0if remote == 65'' CURSOR UP Esc[noparse][[/noparse]ValueAif byte4 == 91'' Assume number over 10
byte3:=byte3-48
byte2:=byte2-48
byte3:=byte3*10
byte3:=byte3+byte2
var1:=byte3
if byte3 == 91'' Assume number is less 10
byte2:=byte2-48
var1:=byte2
if byte2 == 91''ESC[noparse][[/noparse]A no numbers move down one
var1 := 1
loop:=0repeatuntil loop == var1
text.out($C2)
loop++
vt100:=0if remote == 67'' CURSOR RIGHT Esc[noparse][[/noparse]ValueCif byte4 == 91'' Assume number over 10
byte3:=byte3-48
byte2:=byte2-48
byte3:=byte3*10
byte3:=byte3+byte2
var1:=byte3
if byte3 == 91'' Assume number is less 10
byte2:=byte2-48
var1:=byte2
if byte2 == 91''ESC[noparse][[/noparse]C no numbers move RIGHT one
var1 := 1
loop:=0repeatuntil loop == var1
text.out($C1)
loop++
vt100:=0if remote == 68'' CURSOR LEFT Esc[noparse][[/noparse]ValueD OR ESC[noparse][[/noparse]Dif byte4 == 91'' Assume number over 10
byte3:=byte3-48
byte2:=byte2-48
byte3:=byte3*10
byte3:=byte3+byte2
var1:=byte3
if byte3 == 91'' Assume number is less 10
byte2:=byte2-48
var1:=byte2
if byte2 == 91''ESC[noparse][[/noparse]D no numbers move LEFT one
var1 := 1
loop:=0repeatuntil loop == var1
text.out($C0) 'was $C0
loop++
vt100:=0if remote == 75'' Clear line Esc[noparse][[/noparse]Kif byte2 == 91'' Look for [noparse][[/noparse]
text.clearlinefromcursor
vt100:=0if byte2 == 48' look for [noparse][[/noparse]0Kif byte3 == 91
text.clearlinefromcursor
vt100:=0if byte2 == 49' look for [noparse][[/noparse]1Kif byte3 == 91
text.clearlinetocursor
vt100 := 0if byte2 == 50' look for [noparse][[/noparse]2Kif byte3 == 91
text.clearline
vt100 := 0if remote == 99' look for [noparse][[/noparse]0c or [noparse][[/noparse]c ESC [noparse][[/noparse] ? 1 ; Ps c Ps=0 for VT-100 no optionsif byte2 == 91'' Look for [noparse][[/noparse]
ser2.str(string(27,"[noparse][[/noparse]?1;0c"))
vt100 := 0if byte2 == 48if byte3 == 91
ser2.str(string(27,"[noparse][[/noparse]?1;0c"))
vt100 := 0
remote:=0'' hide all codes from the VGA output.
(I'm a little embarrassed about that "Microsoft" style bug fix in the middle.
Perhaps I should get that fixed when I port it over to Doug's 8x8 driver.)
@Heater - I have had VT100 running on blade #1 since the very beginning. I modified that code that came on my PocketTerm that was a derivative of code I believe from OBC. Basically I just had it set to 115K baud and applied the cross jumpers that were a patch to the TriBlade that Cluso posted long ago. Works great. I have rewritten that code for the N8VEM to be a little easier to follow and I think I have removed the microsoft problems that OBC mentioned above. Have to finish up disk read and write for N8VEM and then I will dust of the TriBlade and get back in the game.
OBC: I thought you had something to do with the VT100 code *grin*.
There is just soo many community projects going on here, it is hard to follow who did what unless the code contains the proper credits at the top, which I love to do where possible.
The projects now underway/released in the last 6 months has exploded The prop truly has now grown up - just waiting for a killer app to really launch it into real commercial
to get the volume up.
Yoda: you have been quiet lately. nice to see you are still lurking
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Links to other interesting threads:
Ouch, that code gives me headache.
We probably don't need to speed up the terminal interface but couldn't it use some "else" clauses to save executing all the "if"s all the time. Or perhaps "case" statements.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I've just read about your prop kits trip around the city, unatended. Thank your lucky stars that you live in a country that didn't invoke a city shutdown, followed by a controlled explosion.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Yeah, I went through a bottom of asprin when writing that.. It gets the job done, and proof of how wonderful
the Propeller is under really poor coding conditions... [noparse];)[/noparse]
When I wrote the code for the N8VEM and propIO it is all done by case statements now. I think it is much easier to read and understand now. I will post a version of the vt100 decode parts here. There is no serial interface in it now as I use the I/O ports on the N8VEM to communicate with the terminal.
heater said...
Ouch, that code gives me headache.
We probably don't need to speed up the terminal interface but couldn't it use some "else" clauses to save executing all the "if"s all the time. Or perhaps "case" statements.
I could have sworn I saw Mike Green post a VGA object recently that appeared (I only gave it a very quick look over) to have quite a neat implementation of a VT100 parser in it. I am completely unable to find it however.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
Toby: what do you want to do with it? I have not written a latchless driver since no-one is using Blade #2 without the latch.
My latest RamBlade is pretty bare - Blade #2 has prop+512KB+uSD+eeprom+latch+xtal(now 6MHz). I also built the power supply section and the PropPlug section.
Recently I added the TV connector and 3 resistors and added temporary jumpers to test potatohead's code with Blade #2.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Links to other interesting threads:
I'll link the display driver. It's nearing a core release, but for Baggers and a toy...
That's gonna happen sans mouse pointer. Everything else is a go. All that is needed is some core routine debug at this point. I've got scroll, print a single char, and maybe one or two others on that list. Other things can be written to those, or write to the display buffer.
Oh, and a mono only build, for small size. You know, "dotty" characters are totally possible! What you do is pick a color, say blue, crank the brightness up on it, then disable color burst and interlace. On your display, up the contrast, lower brightness and there's your dots. They won't be exactly the same dots, because of the signal timing. If somebody really, really wants those dots... PM me.
Comments
Tied up for a couple of days :-(
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/build
Among all the bad news in the paper each day, it's little things like that which remind me perhaps the world is not so crappy after all.
Glad to have you back among the propellers [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
His TriBlade is now running latest code including SD files. It was nice to see Wordstart running (using TeraTerm on the PC as the VT100). We also compiled a small program on the TriBlade under CPM.
Also discussed the upcoming RamBlade and made a few decisions - I will update that thread soon.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
I had some code from 3 weeks ago that would not load the hard drives sometimes, but with a quick update directly from Cluso's laptop it is all running very smoothly now.
We got Pacman working too (though this does need a Wyse terminal program). I've written a terminal program that can handle the necessary VT100 and Wyse Escape sequences. They are about 30 lines of VB.Net code and maybe down the track possibly could find their way into the BST terminal program??
And we compiled a "Hello World" on the Zicog itself.
I've very excited about the upcoming tiny ramblade addon board that sits above the standard protoboard. Cluso will no doubt keep us posted as it comes together.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/build
I have been giving VT100 a cursory look over the last month or so, but I've not made any start on implementing it yet. Let me know what you need (hopefully only a subset of the VT100 controls) and I'll see what I can do.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
Anyone got a VT100 VGA terminal running on Blade #1 yet?
How is the new SD driver installation coming along ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
I'm not too worried about the VT100 emulation end of things. What is slightly more difficult is building a multi-platform component that allows the flexibility required to work as a terminal emulator. The way I'm doing it at the moment was built as a scrolling edit window with no requirements for cursor positioning, in-place editing or attributes (font size/bold/underline/colour). So it's a re-write of the terminal emulator from the ground up.
To be honest it _has_ been on my todo list for a long time now, I've just never needed it myself so I never got around to it. Now there seems to be some more people wanting VT100 emulation I'll get into it a bit further.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I've still got my green screen somewhere, and my amber. I preferred the latter. I had a B/W once also, but it was pretty average.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
Chucked my screens away some years ago. Recently put a 17" VGA (monitor) out for council collection and a sign saying "works" and noone was took it. Most other junk went, but not the VGA !!
Brad, would it be possible/simpler to have an extra terminal window that just does VT100 ?? I wouldn't want to lose the scrolling back feature when not in VT100 mode.
I am noticing that it is not so friendly in swapping between edit/compile and terminal windows .... Not sure what to suggest yet.
HOWEVER, I am really loving bst and particularly it's #define feature !!! I now use that for debugging, etc. I have a lot of options in my code, such as putting out "+" when reading and "." when writing sectors, xtal speed, etc, etc, etc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
No, what I'm going to do is have it so the cursor positioning works wherever the current display window is, but maintain the scrollback. So in theory you could dump 1000 lines out then use VT100 mode for a bit and then pump out more lines. The whole lot will be fairly seamless.
Yeah, I've got some forced scope changes in there. It started to bug me a little too, but I'm not entirely sure of the best way to tackle it yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
That would work fine. Programs that move the cursor round (eg wordstar) would stay in the screen area automatically. Programs that scroll would scroll.
I've been using Teraterm and you have to remember to close it down when downloading a new propeller program as the ports conflict. I think there was a similar issue with BST, but it ought to be easy to shut down the terminal when downloading a new program. Or, if you don't want to lose the user's text, maybe keep the terminal open but close the serial port, download doing the reset etc, then reopen the serial port to the terminal. Or even just keep it open but redirect it?
Yes, there are only a few VT100 and Wyse codes. Though it helps to have a program outputting them so you can test it as you go. Either a spare triblade, or cluso's nifty new 1.3" ramblade...
Anyway, below is the code in vb.net, and for those that prefer reading spin, the code to do the same thing copied from Vince Briel's Pocketerm. We were building both at the same time, and just kept adding instructions till all the CP/M programs we could find were working ok.
Sub DisplayCharacter(ByRef CharacterChanged As String) ' receives a character from serial port and updates the display Dim x As Integer Dim y As Integer Dim a As Integer Dim i As Integer Dim DisplayString As String Dim asciichar As Integer Dim LineOfText As String If CursX > 79 Then CursX = 0 ' when listening to lots of ^ characters can error Static VT100 As String ' build vt100 string asciichar = Strings.Asc(CharacterChanged) Select Case asciichar Case 13 ' carriage return - back to the left side but don't scroll CursX = 0 Case 10 ' scroll up one line if on bottom line, otherwise just move down one If CursY < 24 Then CursY = CursY + 1 Else For x = 0 To 79 Display(x, 25) = " " ' clear hidden line Next For y = 1 To 25 For x = 0 To 79 Display(x, y - 1) = Display(x, y) Next Next CursY = 24 End If Case 8 ' backspace CursX = CursX - 1 If CursX < 0 Then CursX = 0 Display(CursX, CursY) = " " If CursX < 0 Then CursX = 0 Case 0, 28 To 31, 128 To 255 ' display binary values in curly braces DisplayString = "{" + Trim(Strings.Str(asciichar)) + "}" If CursX > 74 Then ' near end of line so new line Call Scroll() End If For i = 1 To Len(DisplayString) Display(CursX, CursY) = Strings.Mid(DisplayString, i, 1) CursX = CursX + 1 Next Case 1 To 7, 9, 11, 12, 14 To 26 ' display values 0 to 26 as ^ If CursX > 74 Then ' near end of line so new line Call Scroll() End If DisplayString = "^" + Strings.Chr(64 + asciichar) ' 1=^A 2=^B etc For i = 1 To Len(DisplayString) Display(CursX, CursY) = Strings.Mid(DisplayString, i, 1) CursX = CursX + 1 Next Case 27 ' escape sequence VT100 = "]" ' start building vt100 string End Select ' no need to print character if >128 or a control character as already printed above If asciichar >= 32 And VT100 = "" And asciichar < 128 Then ' ignore other characters under 32 Display(CursX, CursY) = CharacterChanged CursX = CursX + 1 ' add one to the cursor If CursX > 79 Then CursX = 0 CursY = CursY + 1 ' move to next line End If If CursY > 24 Then ' scroll up For x = 0 To 79 Display(x, 25) = " " ' clear hidden line Next For y = 1 To 25 For x = 0 To 79 Display(x, y - 1) = Display(x, y) Next Next CursY = 24 ' beginning of last line CursX = 0 End If End If ' vt100 escape codes - all start with ] which stands for escape (easier to match string) If VT100 <> "" And asciichar >= 32 Then VT100 = VT100 + CharacterChanged ' add new ones on End If If Strings.Len(VT100) > 40 Then ' some {instructions} can be at least 33 char VT100 = "" ' cancel it but this should never happen. Just gets it out of a potential hang End If If VT100 = "][noparse][[/noparse]H" Then ' home position CursX = 0 CursY = 0 Call RedrawDisplay() VT100 = "" ' reset it must do this for every command End If If VT100 = "][noparse][[/noparse]J" Then ' erase from current line to the bottom of the screen For y = CursY To 24 For x = 0 To 79 Display(x, y) = " " Next Next Call RedrawDisplay() VT100 = "" ' reset it must do this for every command End If If VT100 = "][noparse][[/noparse]0m" Then ' reset all attributes - ignore VT100 = "" ' reset it must do this for every command End If If Strings.Len(VT100) >= 6 And Strings.Len(VT100) <= 8 And Strings.Right(VT100, 1) = "H" Then ' a cursor move instruction can be ][noparse][[/noparse]03;04H or ][noparse][[/noparse]3;4H or ][noparse][[/noparse]03;4H i = Strings.InStr(VT100, ";") If i <> 0 Then LineOfText = Strings.Left(VT100, i - 1) LineOfText = Strings.Mid(LineOfText, 3) ' strip off escape and [noparse][[/noparse] a = Val(LineOfText) ' row CursY = a - 1 ' I use origin of 0,0 and vt100 uses 1,1 LineOfText = Strings.Mid(VT100, i + 1) LineOfText = Strings.Left(LineOfText, Strings.Len(LineOfText) - 1) ' strip off H a = Val(LineOfText) ' column CursX = a - 1 Call RedrawDisplay() End If VT100 = "" ' reset it must do this for every command End If If VT100 = "][noparse][[/noparse]0;1m" Then ' highlight text ' highlight text but I'm not sure how to do this in a textbox (? a rich text box) ' plus need to store this attribute in the array ' so just ignore for the moment VT100 = "" End If If VT100 = "][noparse][[/noparse]K" Or VT100 = "][noparse][[/noparse]0K" Then ' delete to the end of the line For x = CursX To 79 Display(x, CursY) = " " Next Call RedrawDisplay() VT100 = "" ' reset it must do this for every command End If If VT100 = "][noparse][[/noparse]D" Then ' backspace ? a non documented vt100 code (escD is left arrow) 'Only happens when opening a file and changing the name. ' wordstar sends <esc>[noparse][[/noparse]D then a space then <esc>[noparse][[/noparse]D again CursX = CursX - 1 If CursX < 0 Then CursX = 0 Call RedrawDisplay() VT100 = "" ' reset it must do this for every command End If If VT100 = "][noparse][[/noparse]M" Then ' deletes the line with the cursor on it ' scrolls all lines below this up one For x = 0 To 79 Display(x, y) = " " Next y = 25 ' delete hidden line For x = 0 To 79 Display(x, y) = " " Next For y = CursY To 24 For x = 0 To 79 Display(x, y) = Display(x, y + 1) Next Next Call RedrawDisplay() VT100 = "" ' reset it must do this for every command End If If VT100 = "][noparse][[/noparse]L" Then ' everything moves down one line from the current cursor line ' and delete the cursor line For y = 23 To CursY Step -1 For x = 0 To 79 Display(x, y + 1) = Display(x, y) Next Next For x = 0 To 79 Display(x, CursY) = " " Next Call RedrawDisplay() VT100 = "" ' reset it must do this for every command End If If VT100 = "][noparse][[/noparse]2J" Then ' clear the whole display and move cursor to home For y = 0 To 25 For x = 0 To 79 Display(x, y) = " " Next Next CursX = 0 CursY = 0 Call RedrawDisplay() VT100 = "" 'reset it must do this for every command End If ' Televideo and Wyse commands for Pacman and tetris If VT100 = "];" Or VT100 = "]*" Then ' Televideo/Wyse60 command to clear screen ESC; or ESC* For y = 0 To 25 For x = 0 To 79 Display(x, y) = " " Next Next CursX = 0 CursY = 0 Call RedrawDisplay() VT100 = "" 'reset it must do this for every command End If ' move cursor If Strings.Len(VT100) = 4 And Strings.Left(VT100, 2) = "]=" Then ' a cursor move instruction is ESC=RC,4 bytes 32 offset CursY = Strings.Asc(Strings.Mid(VT100, 3, 1)) - 32 CursX = Strings.Asc(Strings.Mid(VT100, 4, 1)) - 32 Call RedrawDisplay() VT100 = "" ' reset it must do this for every command End If ' cursor off If Strings.Len(VT100) > 2 And Strings.Left(VT100, 1) = "]" And Strings.Mid(VT100, 3, 1) <> "[noparse][[/noparse]" Then ' not a VT100 message as second character is not [noparse][[/noparse] If VT100 = "].0" Then ' cursor off VT100 = "" ' reset it must do this for every command End If If VT100 = "].1" Then ' cursor on VT100 = "" ' reset it must do this for every command End If End If ' don't forget to set vt100 to "" after every if vt100 statement End Sub
And in Spin
'Start of VT100 code if remote == 27 'vt100 ESC code is being sent vt100:=1 byte1:=0 byte2:=0 byte3:=0 byte4:=0 byte5:=0 byte6:=0 byte7:=0 remote:=0 temp2:=0 wyse:=0 w1:=0 w2:=0 w3:=0 ' removed the skip for esc= and put it further down 'if remote==61 ' vt100:=0 ' remote:=0 'Don't display the ESC code if remote == 99 and vt100 == 1 'ESC c remote:=0 vt100:=0 text.inv(0) text.cls(Baud,termcolor,pcport,ascii,CR) text.home ' wyse command to clear screen = Esc; if remote==59 and vt100==1 and wyse==0 vt100:=0 remote:=0 text.cls(Baud,termcolor,pcport,ascii,CR) text.home ' another wyse command to clear the screen is Esc* if remote==42 and vt100==1 and wyse==0 vt100:=0 remote:=0 text.cls(Baud,termcolor,pcport,ascii,CR) text.home 'put ESC D and ESC M here if remote == 77 and vt100 == 1 'AKA ESC M text.scrollM vt100 := 0 if remote == 68 and vt100 == 1 'AKA ESC D if byte2 <> 91 and byte3 <> 91 and byte4 <> 91 'not esc[noparse][[/noparse]D 'text.scrollD vt100 := 0 if remote == 76 and vt100 == 1 'AKA ESC L if remote == 91 and vt100 == 1 ' [noparse][[/noparse] 'look for open bracket [noparse][[/noparse] vt100:=2 ' begin wyse if remote==61 and vt100==1 and wyse==0 ' wyse command for Esc= wyse:=61 if remote==46 and vt100==1 and wyse==0 ' wyse command for Esc. wyse:=46 if wyse==61 or wyse==46 w3:=w2 ' wyse mini buffer , only needs a few characters as codes are short w2:=w1 w1:=remote remote:=0 ' so doesn't print character if w3==61 and wyse==61 ' an Esc=RC col:=w1-32 row:=w2-32 text.cursloc(col,row) vt100:=0 ' clear pointer wyse:=0 ' clear vt100 pointer too remote:=0 ' hide character from output if w2==46 and w1==49 and wyse==46 ' Esc.1 vt100:=0 ' do nothing but do need to trap these (cursor on and off) wyse:=0 remote:=0 ' hide character from output if w2==46 and w1==48 and wyse==46 ' Esc.0 vt100:=0 wyse:=0 remote:=0 ' hide character from output ' end wyse 'start recording code if remote == 62 and vt100 == 1 or remote == 60 and vt100 == 1 'look for < & > vt100:=0 ' not sure why this is coming up, can't find in spec. if vt100==2 ''Check checking for VT100 emulation codes if remote > 10 byte7:=byte6 byte6:=byte5 ' My VTCode Mini Buffer byte5:=byte4 byte4:=byte3 byte3:=byte2 'Record the last 7 bytes byte2:=byte1 byte1:=remote if remote == 109 'look for lowercase m if byte2 == 91 'if [noparse][[/noparse]m turn off to normal set text.inv(0) vt100:=0 if byte2 == 49 and vt100 > 0 'is it ESC[noparse][[/noparse]1m BOLD 'text.inv(1) vt100 := 0 if byte2 == 55 and vt100 > 0 'is it ESC[noparse][[/noparse]7m? text.inv(1) vt100 := 0 if byte2 == 48 and vt100 > 0 '0 is back to normal text.inv(0) vt100:=0 if byte2 == 52 and vt100 > 0 'is it ESC[noparse][[/noparse]4m underline? vt100:=0 'yes ignore if byte2 == 50 and vt100 >0 'is it ESC[noparse][[/noparse]2m dim text vt100:=0 'yes ignore if remote == 64 'look for ESC[noparse][[/noparse]value@ @=64 insert value spaces if byte4 == 91 'two digit value byte3:=byte3-48 'Grab 10's byte2:=byte2-48 'Grab 1's byte3:=byte3*10 'Multiply 10's byte3:=byte3+byte2 'Add 1's text.insertat(byte3) if byte3 == 91 'single digit value byte2:=byte2-48 text.insertat(byte2) vt100 :=0 if remote == 80 'look for ESC[noparse][[/noparse]valueP P=64 delete value spaces if byte4 == 91 'two digit value byte3:=byte3-48 'Grab 10's byte2:=byte2-48 'Grab 1's byte3:=byte3*10 'Multiply 10's byte3:=byte3+byte2 'Add 1's text.delp(byte3) if byte3 == 91 'single digit value byte2:=byte2-48 text.delp(byte2) vt100 :=0 if remote == 104 'look for lowercase h set CR/LF mode if byte2 == 48 'if character before h is 0 maybe command is 20h if byte3 == 50 'if byte3 then it is for sure 20h LNM := 0 vt100:=0 if remote == 61 'lool for = vt100:=0 if remote == 114 'look for lowercase r vt100:=0 if remote == 108 'look for lowercase l if byte2 == 48 'if character before l is 0 maybe command is 20l if byte3 == 50 'if byte3 then it is for sure 20l LNM := 1 '0 means CR/LF in CR mode only vt100:=0 if remote == 62 'look for > vt100:=0 if remote == 77 'ESC M look for obscure scroll window code text.scrollM vt100:=0 if remote == 68 or remote == 76 ' look for ESC D or ESC L text.scrollD vt100:=0 if remote == 72 or remote == 102 ' HOME CURSOR (uppercase H or lowercase f) if byte2==91 or byte2==59 'look for [noparse][[/noparse]H or [noparse][[/noparse];f text.home vt100:=0 '' Check for X & Y with [noparse][[/noparse]H or ;f - Esc[noparse][[/noparse]Line;ColumnH else 'here remote is either H or f if byte4 == 59 'is col is greater than 9 ; ALWAYS if byte4=59 byte3:=byte3-48 'Grab 10's byte2:=byte2-48 'Grab 1's byte3:=byte3*10 'Multiply 10's byte3:=byte3+byte2 'Add 1's col:=byte3 'Set cols if byte7 == 91 'Assume row number is greater than 9 if ; at byte 4 and [noparse][[/noparse] at byte 7 greater than 9 byte6:=byte6-48 'Grab 10's byte5:=byte5-48 'Grab 1's byte6:=byte6*10 'Multiply 10's byte6:=byte6+byte5 'Add 1's row:=byte6 if byte6 == 91 'Assume row number is less than 10 byte5:=byte5 - 48 'Grab 1's row:=byte5 if byte3 == 59 ' Assume that col is less an 10 byte2:=byte2-48 'Grab 1's col:=byte2 'set cols if byte6 == 91 'Assume row number is greater than 9 byte5:=byte5-48 'Grab 10's byte4:=byte4-48 'Grab 1's byte5:=byte5*10 'Multiply 10's byte5:=byte5+byte4 'Add 1's row:=byte5 if byte5 == 91 'Assume that col is greater than 10 byte4:=byte4-48 'Grab 1's row:=byte4 col:=col-1 if row == -459 row:=1 if col == -40 ' Patches a bug I havn't found. *yet* col := 58 ' A Microsoft approach to the problem. :) if row == -449 row := 2 ' Appears to be an issue with reading if row == -439 ' single digit rows. row := 3 if row == -429 ' This patch checks for the bug and replaces row := 4 ' the faulty calculation. if row == -419 row := 5 ' Add to list to find the source of bug later. if row == -409 row := 6 if row == -399 row := 7 if row == -389 row := 8 if row == -379 row := 9 row-- if row < 0 row:=0 if col < 0 col:=0 if row > 35 row :=35 if col > 79 col := 79 text.cursloc(col,row) vt100:=0 if remote == 114 'ESCr text.out(126) if remote == 74 '' CLEAR SCREEN if byte2==91 '' look for [noparse][[/noparse]J '' clear screen from cursor to 25 text.clsfromcursordown 'vt100:=0 if byte2==50 '' look for [noparse][[/noparse]2J '' clear screen text.cls(Baud,termcolor,pcport,ascii,CR) if byte2==49 'look for [noparse][[/noparse]1J text.clstocursor if byte2==48 'look for [noparse][[/noparse]0J text.clsfromcursordown vt100:=0 if remote == 66 '' CURSOR DOWN Esc[noparse][[/noparse]ValueB if byte4 == 91 '' Assume number over 10 byte3:=byte3-48 byte2:=byte2-48 byte3:=byte3*10 byte3:=byte3+byte2 var1:=byte3 if byte3 == 91 '' Assume number is less 10 byte2:=byte2-48 var1:=byte2 if byte2 == 91 ''ESC[noparse][[/noparse]B no numbers move down one 'text.out($C3) var1 := 1 loop:=0 repeat until loop == var1 loop++ text.out($C3) vt100:=0 if remote == 65 '' CURSOR UP Esc[noparse][[/noparse]ValueA if byte4 == 91 '' Assume number over 10 byte3:=byte3-48 byte2:=byte2-48 byte3:=byte3*10 byte3:=byte3+byte2 var1:=byte3 if byte3 == 91 '' Assume number is less 10 byte2:=byte2-48 var1:=byte2 if byte2 == 91 ''ESC[noparse][[/noparse]A no numbers move down one var1 := 1 loop:=0 repeat until loop == var1 text.out($C2) loop++ vt100:=0 if remote == 67 '' CURSOR RIGHT Esc[noparse][[/noparse]ValueC if byte4 == 91 '' Assume number over 10 byte3:=byte3-48 byte2:=byte2-48 byte3:=byte3*10 byte3:=byte3+byte2 var1:=byte3 if byte3 == 91 '' Assume number is less 10 byte2:=byte2-48 var1:=byte2 if byte2 == 91 ''ESC[noparse][[/noparse]C no numbers move RIGHT one var1 := 1 loop:=0 repeat until loop == var1 text.out($C1) loop++ vt100:=0 if remote == 68 '' CURSOR LEFT Esc[noparse][[/noparse]ValueD OR ESC[noparse][[/noparse]D if byte4 == 91 '' Assume number over 10 byte3:=byte3-48 byte2:=byte2-48 byte3:=byte3*10 byte3:=byte3+byte2 var1:=byte3 if byte3 == 91 '' Assume number is less 10 byte2:=byte2-48 var1:=byte2 if byte2 == 91 ''ESC[noparse][[/noparse]D no numbers move LEFT one var1 := 1 loop:=0 repeat until loop == var1 text.out($C0) 'was $C0 loop++ vt100:=0 if remote == 75 '' Clear line Esc[noparse][[/noparse]K if byte2 == 91 '' Look for [noparse][[/noparse] text.clearlinefromcursor vt100:=0 if byte2 == 48 ' look for [noparse][[/noparse]0K if byte3 == 91 text.clearlinefromcursor vt100:=0 if byte2 == 49 ' look for [noparse][[/noparse]1K if byte3 == 91 text.clearlinetocursor vt100 := 0 if byte2 == 50 ' look for [noparse][[/noparse]2K if byte3 == 91 text.clearline vt100 := 0 if remote == 99 ' look for [noparse][[/noparse]0c or [noparse][[/noparse]c ESC [noparse][[/noparse] ? 1 ; Ps c Ps=0 for VT-100 no options if byte2 == 91 '' Look for [noparse][[/noparse] ser2.str(string(27,"[noparse][[/noparse]?1;0c")) vt100 := 0 if byte2 == 48 if byte3 == 91 ser2.str(string(27,"[noparse][[/noparse]?1;0c")) vt100 := 0 remote:=0 '' hide all codes from the VGA output.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/build
(I'm a little embarrassed about that "Microsoft" style bug fix in the middle.
Perhaps I should get that fixed when I port it over to Doug's 8x8 driver.)
Are you guys nearing a 1.0 release yet?
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
Dave
There is just soo many community projects going on here, it is hard to follow who did what unless the code contains the proper credits at the top, which I love to do where possible.
The projects now underway/released in the last 6 months has exploded
to get the volume up.
Yoda: you have been quiet lately. nice to see you are still lurking
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
I'm pleased to hear that you patched that stupid bug! Please post some code when you get a chance!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
We probably don't need to speed up the terminal interface but couldn't it use some "else" clauses to save executing all the "if"s all the time. Or perhaps "case" statements.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
I've just read about your prop kits trip around the city, unatended. Thank your lucky stars that you live in a country that didn't invoke a city shutdown, followed by a controlled explosion.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Yeah, I went through a bottom of asprin when writing that.. It gets the job done, and proof of how wonderful
the Propeller is under really poor coding conditions... [noparse];)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
When I wrote the code for the N8VEM and propIO it is all done by case statements now. I think it is much easier to read and understand now. I will post a version of the vt100 decode parts here. There is no serial interface in it now as I use the I/O ports on the N8VEM to communicate with the terminal.
Dave
I could have sworn I saw Mike Green post a VGA object recently that appeared (I only gave it a very quick look over) to have quite a neat implementation of a VT100 parser in it. I am completely unable to find it however.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
In any case, if it came to modifying Mikes driver it would be a doddle. What a simple and elegant piece of code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
Thanks for the praise.
The VT100 control sequences went through a standardization process to become the ANSI standard control sequences.
Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
http://forums.parallax.com/showthread.php?p=778427
There is a link in my thread to this so it is easily found.
I think potatoheads code should be here too.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: Micros eg Altair, and Terminals eg VT100 (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Just thinking of knocking up a board to take to work that doesn't have all the Z80 stuff underneath it.
(I almost got one the other day, off a bus)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Toby: what do you want to do with it? I have not written a latchless driver since no-one is using Blade #2 without the latch.
My latest RamBlade is pretty bare - Blade #2 has prop+512KB+uSD+eeprom+latch+xtal(now 6MHz). I also built the power supply section and the PropPlug section.
Recently I added the TV connector and 3 resistors and added temporary jumpers to test potatohead's code with Blade #2.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
That's gonna happen sans mouse pointer. Everything else is a go. All that is needed is some core routine debug at this point. I've got scroll, print a single char, and maybe one or two others on that list. Other things can be written to those, or write to the display buffer.
Oh, and a mono only build, for small size. You know, "dotty" characters are totally possible! What you do is pick a color, say blue, crank the brightness up on it, then disable color burst and interlace. On your display, up the contrast, lower brightness and there's your dots. They won't be exactly the same dots, because of the signal timing. If somebody really, really wants those dots... PM me.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!