remote typing on the MEGA65

Remote typing on the MEGA65 can be accomplished a few different ways. Will jot down some notes and pointers on existing ways:

‘m65’ tool

One shot commands with a carriage-return

If you want a carriage-return added onto the end of your string, you must use the capital T argument (-T) and not the lower-case t.

Use case: You may want to script up the typing of a command within a script, e.g. SYS 49152

Under linux: m65 -l /dev/ttyS6 -T 'print "hello world"'

Under windows: m65 -l COM7 -T "print """hello world""""

 

One shot key presses (with no carriage-return)

Similar to before, but use the lower-case t (-t) and not the upper case T.

Use case: The MEGA65 is sitting at a GETKEY A$ keypress input loop (e.g., awaiting a (Y/N) response) and you want to remotely type the needed key (but don’t need a carriage return at the end.

m65 -l COM7 -t y

m65 -l COM7 -t n

Use case: The MEGA65 is running a BASIC program in an endless loop, and you’d like to press RUN-STOP key to break out of it. This can be done as follows:

m65 -l COM7 -t ~C (note this is a capital C, not a lowercase one)

The tilde is treated as a special escape-character to allow for keypresses that aren’t easily typed. For a full list:

~C = RUN-STOP ~D = DOWN ~U = UP ~L = LEFT ~H = HOME ~R = RIGHT ~M = RETURN ~T = INST/DEL ~1 = F1 ~3 = F3 ~5 = F5 ~7 = F7

Remote typing session

To type command-after-command in a ‘remote session’, you can run the tool with as follows:

m65 -l /dev/ttyS6 -t -

‘m65dbg’ tool

After running the m65dbg tool (e.g., m65dbg -l /dev/ttyS6), at the program’s prompt, you can do any of the following:

Reset mega65

Type ! and return to remotely restart the mega65.

 

Remote typing session

begin typing mode by typing the command ty and pressing enter.

You will then be able to type text at your console. Upon pressing enter, it will be sent to the mega65 (over serial) and an ansi-version of the screen contents will be output back to your console.

Note that you will also have these shortcut keys available to you:

- CONTROL-Y = end session. - CONTROL-L = refresh ascii screenshot. - CONTROL-O = take png screenshot. - CONTROL-R = reset mega65 - CONTROL-F = trigger freeze menu.

Â