Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:34 29 Nov 2024 Privacy Policy
Jump to

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 : VT100 commands used by EDIT

Author Message
Oldbitcollector

Senior Member

Joined: 16/05/2014
Location: United States
Posts: 172
Posted: 06:32pm 16 May 2014
Copy link to clipboard 
Print this post

Looks like I'm writing a uMite compatible VT100 emulator from scratch.

I'd rather not replicate VT100 controls I don't need.

Is it possible to obtain a list of the controls used by EDIT on the uMite?

Thanks
Jeff

My Propeller/Micromite mini-computer project.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 08:58pm 16 May 2014
Copy link to clipboard 
Print this post

Hi there Jeff.

Are you aware of the fact that Geoff is about to release a VT100 compatible terminal program?
I'm not sure if it is written in MMBasic for the uM, but it was talked about as a thing that was being developed, so that it could be used to program the uM, and work as a general purpose VT100 terminal for other purposes too.

It may well do everything you want, and you may then NOT need to write your own one...Edited by Grogster 2014-05-18
Smoke makes things work. When the smoke gets out, it stops!
 
Oldbitcollector

Senior Member

Joined: 16/05/2014
Location: United States
Posts: 172
Posted: 09:07pm 16 May 2014
Copy link to clipboard 
Print this post

I'm writing it for the Propeller uController...

I've got everything working tonight except function keys.
Not sure what the uMite is expecting for them. Googling VT100 commands tonight.

Jeff

My Propeller/Micromite mini-computer project.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6102
Posted: 12:28pm 17 May 2014
Copy link to clipboard 
Print this post

The VT100 control codes I implemented in MMEdit are
CR
LF
BS
esc D
esc M
esc [H
esc [f
esc [J
esc [A
esc [B
esc [K
esc [m

For the keyboard routines I did this:

[VTkeyPress]
VTk$=Inkey$
'print len(VTk$),asc(VTk$), asc(right$(VTk$,1))
if len(VTk$)>1 then
VTcmd=asc(right$(VTk$,1))
select case VTcmd
case 13
VTk$=""
case 27
VTk$=chr$(27)
case 37 'left arrow
VTk$=chr$(130)
case 38 'up
VTk$=chr$(128)
case 39 ' right
VTk$=chr$(131)
case 40 ' down
VTk$=chr$(129)
case 45 ' insert
VTk$=chr$(132)
VTins=1
case 46 ' delete
VTk$=chr$(127)
case 36 ' home
VTk$=chr$(134)
case 35 ' end
VTk$=chr$(135)
case 33 ' page up
VTk$=chr$(136)
case 34 ' page down
VTk$=chr$(137)
case 18 ' alt
VTk$=chr$(139)
case 112 'F1
VTk$=chr$(145)
case 112 'F1
VTk$=chr$(145)
case 113 'F2
VTk$=chr$(146)
case 114 'F3
VTk$=chr$(147)
case 115 'F4
VTk$=chr$(148)
case 116 'F5
VTk$=chr$(149)
case 117 'F6
VTk$=chr$(150)
case 118 'F7
VTk$=chr$(151)
case 119 'F8
VTk$=chr$(152)
case 120 'F9
VTk$=chr$(153)
case 121 'F10
VTk$=chr$(154)
case 122 'F11
VTk$=chr$(155)
case 123 'F12
VTk$=chr$(156)

case else
'print len(VTk$),asc(VTk$), VTcmd
VTk$=""
end select
end if
re=MMsend(VTk$)
wait


The code is in Liberty Basic but should be clear enough. I have changed things a bit for MMEdit2 but this is the easiest to decipher.

Extracting keyboard presses from a multitasking operating system can be a real pain.

The code has grown along with MM Basic, adding new VT100 control codes as they are added to the Maximite. The MicroMite may not implement all these codes.

Jim

VK7JH
MMedit   MMBasic Help
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9308
Posted: 02:26pm 17 May 2014
Copy link to clipboard 
Print this post

  Oldbitcollector said   I'm writing it for the Propeller uController...


Oh, OK - understood.
Smoke makes things work. When the smoke gets out, it stops!
 
Oldbitcollector

Senior Member

Joined: 16/05/2014
Location: United States
Posts: 172
Posted: 06:23pm 17 May 2014
Copy link to clipboard 
Print this post

@Jim,

That will help me greatly! I'll digest that message in the morning.
I hooked putty to my test rig and found working codes to get my Fkeys and cursor keys working, but I had not implemented them all.


@All

Here's a link to the project as it progresses.
http://propellerpowered.com/forum/index.php?topic=574.0

The setup is a Propeller uController hooked to a VGA monitor, keyboard, and SD card with serial communication opened to the uMite console. I know Maximite exists, and perhaps this is a little replication of that project, but there are some very interesting sprite/graphics and SID-type audio objects which run on the Propeller that I'd like to chain to the BASIC on the uMite. It's ability to create FUNCTIONS and SUBS which can be called from anywhere should make this project interesting.

Jeff
Edited by Oldbitcollector 2014-05-19
My Propeller/Micromite mini-computer project.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024