From 6f055a1ef919ecbfe3025f5d111d1bc87af278df Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sun, 28 Nov 2021 15:46:29 -0500 Subject: [PATCH] update cursor save/cursor restore to also save the DECOM settings. tested with vt100 (mame) --- vt.equ.S | 1 + vt100.esc.S | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/vt.equ.S b/vt.equ.S index 87767a5..c8b30ad 100644 --- a/vt.equ.S +++ b/vt.equ.S @@ -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" diff --git a/vt100.esc.S b/vt100.esc.S index 100ad39..5349ec7 100644 --- a/vt100.esc.S +++ b/vt100.esc.S @@ -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