From e15c7a1979461ec520edf3363b29df822397953d Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Wed, 8 Jan 2020 20:09:09 +0100 Subject: [PATCH] further screen code improvements --- c64/kernal/screen/chrout_screen_del.s | 5 +---- c64/kernal/screen/chrout_screen_ins.s | 4 +++- c64/kernal/screen/screen_get_logical_line_end_ptr.s | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/c64/kernal/screen/chrout_screen_del.s b/c64/kernal/screen/chrout_screen_del.s index 6ca9c4f0..ed614672 100644 --- a/c64/kernal/screen/chrout_screen_del.s +++ b/c64/kernal/screen/chrout_screen_del.s @@ -13,7 +13,6 @@ chrout_screen_DEL: !: // ldx PNTR jsr screen_get_clipped_PNTR - cpy #$00 bne chrout_screen_del_column_non_0 // FALLTROUGH @@ -31,12 +30,10 @@ chrout_screen_del_column_0: // Update PNT and USER pointers jsr screen_calculate_PNT_USER - // Put space character at the current cursor position + // Put space character at the current cursor position (do not clear the color!) ldy #39 lda #$20 sta (PNT),y - - // XXX should we clear the color too? // Finish with recalculating all the variables jmp chrout_screen_calc_lptr_done diff --git a/c64/kernal/screen/chrout_screen_ins.s b/c64/kernal/screen/chrout_screen_ins.s index a51dc131..1345a3f8 100644 --- a/c64/kernal/screen/chrout_screen_ins.s +++ b/c64/kernal/screen/chrout_screen_ins.s @@ -4,7 +4,8 @@ // -// YYY does not work properly on growing logical line +// YYY does not work properly when insertion no longer possible +// YYY does not work properlyy in second part of logical line chrout_screen_INS: @@ -25,6 +26,7 @@ chrout_screen_INS: chrout_screen_ins_possible: // Move chars towards end of the line + jsr screen_calculate_PNT_USER jsr screen_get_logical_line_end_ptr !: // Note: While the following routine is obvious to any skilled diff --git a/c64/kernal/screen/screen_get_logical_line_end_ptr.s b/c64/kernal/screen/screen_get_logical_line_end_ptr.s index c6949170..1d09f70c 100644 --- a/c64/kernal/screen/screen_get_logical_line_end_ptr.s +++ b/c64/kernal/screen/screen_get_logical_line_end_ptr.s @@ -6,11 +6,10 @@ screen_get_logical_line_end_ptr: cpy #24 bcs screen_get_logical_line_end_39 // last line of the screen - lda LDTBL, y + lda LDTBL+0, y bpl screen_get_logical_line_end_39 // current line continues previous one - iny - lda LDTBL, y + lda LDTBL+1, y bmi screen_get_logical_line_end_39 // current line is not continued // FALLTROUGH