From 3054a44e7c6f3ba4087aec8cc727d07dc80b5a9e Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Tue, 29 Dec 2020 23:32:39 +0100 Subject: [PATCH] screen editor color handling fix --- .../mega65_chrout_screen_control_escmode.s | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/kernal/screen_m65/mega65_chrout_screen_control_escmode.s b/src/kernal/screen_m65/mega65_chrout_screen_control_escmode.s index 24a14d1a..b2763de0 100644 --- a/src/kernal/screen_m65/mega65_chrout_screen_control_escmode.s +++ b/src/kernal/screen_m65/mega65_chrout_screen_control_escmode.s @@ -96,10 +96,17 @@ m65_chrout_esc_P: ; erase everything from start of the line to cursor XXX u phz ldz #$FF - lda #$20 @1: inz + ; XXX common part - deduplicate, find other places + lda #$20 sta [M65_LPNT_SCR], z + jsr m65_helper_scrlpnt_color + lda COLOR + and #$0F + sta [M65_LPNT_SCR], z + jsr m65_helper_scrlpnt_to_screen + ; XXX end common part cpz M65__TXTCOL bne @1 @@ -112,10 +119,17 @@ m65_chrout_esc_Q: ; erase everything from cursor till the end of line XXX u ldx M65_SCRMODE lda m65_scrtab_txtwidth,x taz - lda #$20 @1: dez + ; XXX common part - deduplicate, find other places + lda #$20 sta [M65_LPNT_SCR], z + jsr m65_helper_scrlpnt_color + lda COLOR + and #$0F + sta [M65_LPNT_SCR], z + jsr m65_helper_scrlpnt_to_screen + ; XXX end common part cpz M65__TXTCOL bne @1