agon-vdp
agon-vdp copied to clipboard
Add ability to terminate or suspend terminal mode
Adds the ability for terminal mode to recognise a specific escape sequence (ESC+#_Q!$
) to exit terminal mode and restore regular VDP operation, allowing VDU handling to resume. Exiting terminal mode changes to mode 1.
Also allows terminal mode to be suspended using a different escape sequence (ESC+#_S!$
). This allows programs running inside terminal mode to temporarily suspend terminal serial handling, allowing applications that use terminal mode to then send VDU commands. Terminal mode is resumed using VDU 23,0,&FF
, i.e. the same command sequence to start terminal mode.
When the terminal is suspended, keyboard handling is still sent terminal-style, rather than restoring to VDP protocol keyboard packets. This should allow for programs to be written in CP/M to remain interactive whilst using VDU commands for output.
This code also adds an "emergency exit" key combo to quit out of terminal mode of Ctrl+Alt+F12