implemented ESC-K and ESC-X

This commit is contained in:
FeralChild64 authored and FeralChild64 committed 2021-01-26 00:03:07 +01:00
1 parent 0c6e8bc68c
commit 5d9201eb80
5 files changed
+49 -18

No files matched your search

@@ -37,10 +37,7 @@ m65_chrout_screen_RETURN:
; RETURN clears quote and insert modes, it also clears reverse flag
lda #$00
sta QTSW
sta INSRT
sta RVS
jsr m65_screen_clear_special_modes
; Move cursor to the beginning of the next line
@@ -31,16 +31,33 @@ m65_chrout_esc_J: ; move cursor to the beginning of the line
sta M65__TXTCOL
bra m65_chrout_esc_done
m65_chrout_esc_K: ; move cursor after the text within the line XXX update for window mode
phz
ldx M65_SCRMODE
lda m65_scrtab_txtwidth,x
sta M65__TXTCOL
dec
taz
@1:
lda [M65_LPNT_SCR], z
cmp #$20 ; 'SPACE'
bne @2
dec M65__TXTCOL
dez
bpl @1
@2:
plz
lda M65__TXTCOL
cmp m65_scrtab_txtwidth,x
bne m65_chrout_esc_done
dec M65__TXTCOL
bra m65_chrout_esc_done
m65_chrout_esc_O: ; cancel quote, reverse, underline, flash, etc
lda COLOR
and #$0F
sta COLOR
lda #$00
sta QTSW
sta INSRT
sta RVS
jsr m65_screen_clear_colorattr
jsr m65_screen_clear_special_modes
; FALLTROUGH
@@ -48,6 +65,17 @@ m65_chrout_esc_done:
jmp m65_chrout_screen_done
m65_chrout_esc_X: ; cycle through available screen modes
lda M65_SCRMODE
dec
bpl @1
lda #$02
@1:
jsr M65_SCRMODESET
jsr M65_CLRSCR
bra m65_chrout_esc_done
; XXX: implement screen routines below:
@@ -92,8 +120,6 @@ m65_chrout_esc_H:
+nop
m65_chrout_esc_I:
+nop
m65_chrout_esc_K:
+nop
m65_chrout_esc_L:
+nop
m65_chrout_esc_M:
@@ -116,8 +142,6 @@ m65_chrout_esc_V:
+nop
m65_chrout_esc_W:
+nop
m65_chrout_esc_X:
+nop
m65_chrout_esc_Y:
+nop
m65_chrout_esc_Z:
+1 -1
View File
@@ -2,7 +2,7 @@
;; #LAYOUT# * * #IGNORE
M65_CLRSCR:
M65_CLRSCR: ; XXX consider integrating with M65_SCRMODESET
; Clear additional attributes from the color code
+2 -1
View File
@@ -7,9 +7,10 @@
M65_CLRWIN:
; Clear additional attributes from the color code
; Clear additional attributes from the color code, quote mode, etc.
jsr m65_screen_clear_colorattr
jsr m65_screen_clear_special_modes
; Check if windowed mode; if not, go to M65_CLRSCR
@@ -10,6 +10,15 @@ m65_screen_clear_colorattr:
rts
m65_screen_clear_special_modes: ; XXX consider integrating with 'm65_screen_clear_colorattr'
lda #$00
sta QTSW
sta INSRT
sta RVS
rts
m65_screen_upd_txtrow_off: