update cursor save/cursor restore to also save the DECOM settings. tested with vt100 (mame)

This commit is contained in:
Kelvin Sherlock 2021-11-28 15:46:29 -05:00
parent cd1397e3cf
commit 6f055a1ef9
2 changed files with 7 additions and 3 deletions

View File

@ -82,6 +82,7 @@ mod ds 2
* saved cursor
saved_x ds 2
saved_y ds 2
saved_decom ds 2
do *>256
err "too big"

View File

@ -134,21 +134,24 @@ vt100_esc ent
esc_7 ; save cursor position, graphic rendition, and character set.
* based on testing, DECOM is also saved/restored.
lda x
sta saved_x
lda y
sta saved_y
lda DECOM
sta saved_decom
rts
esc_8 ; restore cursor position, graphic rendition, and character set.
* TODO - how does this interact with DECOM?
lda saved_x
sta x
lda saved_y
sta y
lda saved_decom
sta DECOM
jmp recalc_cursor
esc_eq ; enter alternate keypad mode