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 : Adding features to Maximite Control Center
Author | Message | ||||
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 118 |
Is it possible to add features to the Maximite Control Center? I was looking for the source tree on-line but I haven't found it yet. |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6100 |
I have not made the source of MMEdit and MMCC available and have no desire to. I have usually been open to suggestions for improvement. Jim VK7JH MMedit MMBasic Help |
||||
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 118 |
I'm having problems with Maximite Control Center's VT-100 emulation. Most things work pretty reasonably. But the save and restore cursor functions are sick. Specifically: savecursor DECSC Save cursor position and attributes ^[7 restorecursor DECRC Restore cursor position and attributes ^[8 Besides the fact the save of the cursor doesn't work, the restore cursor function causes some problem where key strokes are no longer seen or echoed after the restore is issued. Terra Term works correctly. Here is a little test program that works correctly on Terra Term but fails running with the Maximite Control Center. All of the text (with different character attributes) after the "Hello again" should get erased. But it doesn't.... init_screen() clear_screen() Print "Hello world." for x=1 to 20 for y=1 to x print " "; next y print "Doing a print loop with a long line..........." next x for g=1 to 20 goto_xy(80-g, g) print g; next g goto_xy(10, 25) print "Hello again "; save_cursor() bold_on() print "Bold "; char_attr_off() Print "and_off "; low_intesity() print "low_intensity "; char_attr_off() underline_on() print "Underline "; char_attr_off() blinking_on() print "Blink "; char_attr_off() underline_on() print "Reverse "; char_attr_off() print "all done" print "more text prior to the cursor restore." print "more text prior to the cursor restore." print "more text prior to the cursor restore." pause 500 restore_cursor() print " " end sub init_screen() 'print Chr$(27);"[?3l"; ' 80 columns 'print Chr$(27);"[?3h"; ' 132 columns 'char_attr_off() End Sub sub goto_xy(x,y) print Chr$(27);"["; format$(y,"%-1g"); ";"; format$(x,"%-1g"); "H"; end sub sub char_attr_off() print Chr$(27);"[m"; end sub sub bold_on() print Chr$(27);"[1m"; end sub sub low_intesity() print Chr$(27);"[2m"; end sub sub underline_on() print Chr$(27);"[4m"; end sub sub blinking_on() print Chr$(27);"[5m"; end sub sub reverse_video() print Chr$(27);"[7m"; end sub sub save_cursor() print Chr$(27);"7"; end sub sub restore_cursor() print Chr$(27);"8"; end sub sub clear_screen() goto_xy(1,1) print Chr$(27);"[2J"; end sub Edited 2023-10-05 07:32 by EDNEDN |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6100 |
MMCC was never intended to be a replacement for TeraTerm (or any other decent dedicated terminal program) It will never implement the full set of escape sequences. I can include save/restore cursor position but not the attributes, that would be beyond the scope of MMCC. Jim VK7JH MMedit MMBasic Help |
||||
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 118 |
I understand! Just getting the Save and Restore of cursor position into it would help a lot. I'm playing around with making a BASIC debugger and need to go off to a corner of the screen to display stuff, and then when the next line of code is executed (interpreted) the cursor needs to be moved back to wherever it was. Because MMEdit and MaxiMite Control Center are so heavily used, it would be best to do the work within that context and not force people to bring up Terra Term. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6798 |
I used a little ANSI routine to simulate "PRINT@" to allow me to print a string at a defined X and Y position. It's easier than reading the values back, which not all ANSI systems support anyway. Abbreviated library functions: ' Vcls clear screen ' Vch cursor home to top left ' Vat row col move cursor to row,column ' Vbox x,y,w,h,t draw a box width w height h at x,y using 'Terminal' font box characters. ' t=0 for single line, 1 for double ' Vl y,x,l,t draw a horizotal or vertical line to divide a box. ' l is length, t=0 for single line, 1 for double, negative for horizontal ' Vatt n$ set text attributes to n$ - none b /b in /in low u /u ' (none,bold,inverse,low_intensity,underlined) ' Vfc n$ set text/foreground colour by name or str$(number) 0-15 ' Vbc n$ set background colour by name or str$(number) 0-16 (16 is light grey) ' Colours names are black, red, green, yellow, blue, magenta, cyan, white, grey ' ch print the Escape sequence 'Chr$27 [' - used internally" Sub ch:Print Chr$(27);"[";:End Sub Sub Vcls:ch:Print "2J";:End Sub Sub Vch:ch:Print "H";:End Sub Sub Vat(row,col) Local vz$ vz$=Str$(row)+";"+Str$(col)+"H":ch:Print vz$; End Sub Sub Vfc(color$) 'set text foreground colour Local vz$ 'if we have a colour number 0-15 then use it If Len(color$)<3 And Val(color$)<16 Then vz$="38;5;"+color$+"m" ch Print vz$ Else ch Select Case LCase$(color$) 'otherwise use the colour name Case "black":Print "30m"; Case "red":Print "31m"; Case "green":Print "32m"; Case "yellow":Print "33m"; Case "blue":Print "34m"; Case "magenta":Print "35m"; Case "cyan":Print "36m"; Case "white":Print "37m"; Case "grey","gray":Print "90m"; End Select EndIf End Sub Sub Vbc(color$) 'set text background colour Local vz$ 'if we have a colour number 0-15 then use it If Len(color$)<3 And Val(color$)<16 Then vz$="48;5;"+color$+"m" ch Print vz$ ElseIf Val(color$)=16 Then vz$="48:2:115:115:115m" ch Print vz$ Else ch Select Case LCase$(color$) 'otherwise use the colour name Case "black":Print "40m"; Case "red":Print "41m"; Case "green":Print "42m"; Case "yellow":Print "43m"; Case "blue":Print "44m"; Case "magenta":Print "45m"; Case "cyan":Print "46m"; Case "white":Print "47m"; Case "grey","gray":Print "100m"; Case Else :Print "39m"; 'default background End Select EndIf End Sub Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6100 |
I will update the programs later today. They will have cursor position save/restore only. Jim VK7JH MMedit MMBasic Help |
||||
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 118 |
Thank You very much! |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6100 |
MMCC has been updated. Jim VK7JH MMedit MMBasic Help |
||||
EDNEDN Senior Member Joined: 18/02/2023 Location: United StatesPosts: 118 |
And Cursor Save/Restore is confirmed to be working for me. Thank You! |
||||
Print this page |