From 37dbe00ec2d2ef4421ac6974b66cd6b1a4da3adc Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Wed, 8 Jan 2020 20:28:17 +0100 Subject: [PATCH] work on delete key support --- c64/kernal/screen/chrout_screen_crsr.s | 2 -- c64/kernal/screen/chrout_screen_del.s | 26 +++++++++++--------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/c64/kernal/screen/chrout_screen_crsr.s b/c64/kernal/screen/chrout_screen_crsr.s index fbf575aa..2b8cb339 100644 --- a/c64/kernal/screen/chrout_screen_crsr.s +++ b/c64/kernal/screen/chrout_screen_crsr.s @@ -3,8 +3,6 @@ // Cursor keys handling within CHROUT // -// YYY bug: after line growth cursor LEFT/RIGHT jumps to previous line!!! - chrout_screen_CRSR_UP: diff --git a/c64/kernal/screen/chrout_screen_del.s b/c64/kernal/screen/chrout_screen_del.s index ed614672..fecefdfa 100644 --- a/c64/kernal/screen/chrout_screen_del.s +++ b/c64/kernal/screen/chrout_screen_del.s @@ -11,8 +11,7 @@ chrout_screen_DEL: beq !+ jmp chrout_screen_quote !: - // ldx PNTR - jsr screen_get_clipped_PNTR + ldy PNTR bne chrout_screen_del_column_non_0 // FALLTROUGH @@ -40,15 +39,14 @@ chrout_screen_del_column_0: chrout_screen_del_column_non_0: -/* YYY disabled for rework + // We need to scroll back the rest of the logical line + // YYY this part scrolls back too much! - // Copy rest of logical line back jsr screen_get_logical_line_end_ptr - ldy PNTR - cpy LNMX - beq !++ - dey !: + cpy PNTR + beq !+ + iny lda (PNT),y dey @@ -58,21 +56,19 @@ chrout_screen_del_column_non_0: dey sta (USER),y iny - cpy LNMX - bne !- - // Clear char at end of line - jsr screen_get_current_line_logical_length + bne !- // branch always +!: + // 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 // FALLTROUGH -*/ - chrout_screen_del_done: jmp chrout_screen_done