From d48cea82bec5937070d5a3ae995e2142a36282a3 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Wed, 8 Jan 2020 20:40:47 +0100 Subject: [PATCH] firther work on char delete --- c64/kernal/screen/chrout_screen_del.s | 16 ++++++++++------ c64/kernal/screen/screen_calculate_lnmx.s | 2 +- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/c64/kernal/screen/chrout_screen_del.s b/c64/kernal/screen/chrout_screen_del.s index fecefdfa..0eac4831 100644 --- a/c64/kernal/screen/chrout_screen_del.s +++ b/c64/kernal/screen/chrout_screen_del.s @@ -40,13 +40,16 @@ chrout_screen_del_column_0: chrout_screen_del_column_non_0: // We need to scroll back the rest of the logical line - // YYY this part scrolls back too much! + + // YYY does not work properly when cursor crosses physical line boundary + // YYY possibly it should remove the 'continuaed line' mark in some cases, test on original ROMs jsr screen_get_logical_line_end_ptr + tya + tax + ldy PNTR + dey !: - cpy PNTR - beq !+ - iny lda (PNT),y dey @@ -57,12 +60,13 @@ chrout_screen_del_column_non_0: sta (USER),y iny - bne !- // branch always + dex + cpx PNTR + bne !- !: // Clear char at end of line (just the character - not color!) jsr screen_get_logical_line_end_ptr - tay lda #$20 sta (PNT),y dec PNTR diff --git a/c64/kernal/screen/screen_calculate_lnmx.s b/c64/kernal/screen/screen_calculate_lnmx.s index 163d4a75..59a75515 100644 --- a/c64/kernal/screen/screen_calculate_lnmx.s +++ b/c64/kernal/screen/screen_calculate_lnmx.s @@ -4,7 +4,7 @@ // -screen_calculate_LNMX: // YYY review all the code, mayybe some optimizations are possible using this value +screen_calculate_LNMX: ldy TBLX lda LDTBL, y