adapted remaining cursor move routines

This commit is contained in:
FeralChild64 committed 2020-01-06 12:28:26 +01:00
1 parent f642b55383
commit b03aa78f54
2 files changed
+28 -31

No files matched your search

+27 -22
View File
@@ -3,13 +3,19 @@
// Cursor keys handling within CHROUT
//
// YYY bug: after line growth cursor LEFT/RIGHT jumps to previous line!!!
chrout_screen_CRSR_UP:
lda TBLX
beq !+
beq chrout_screen_CRSR_done
dec TBLX
!:
// FALLTROUGH
chrout_screen_CRSR_done:
jmp chrout_screen_calc_lptr_done
@@ -18,35 +24,34 @@ chrout_screen_CRSR_DOWN:
lda TBLX
cmp #24
bne !+
jsr screen_scroll_up_delay_done
jsr screen_scroll_up
!:
inc TBLX
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_LEFT:
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_RIGHT:
jmp chrout_screen_calc_lptr_done
/* YYY disabled for rework
jsr screen_get_clipped_PNTR
cpy #39
beq_far screen_advance_to_next_line
iny
!:
sty PNTR
bpl chrout_screen_CRSR_done // branch always
chrout_screen_CRSR_LEFT:
jsr screen_get_clipped_PNTR
dey
bpl !-
lda TBLX
ora PNTR
beq !+ // top-left corner, recalculating pointer is not necessary, but this is a very rare case nevertheless
dec PNTR
!:
jmp chrout_screen_calc_lptr_done
beq chrout_screen_CRSR_done
chrout_screen_CRSR_RIGHT:
inc PNTR
jmp chrout_screen_calc_lptr_done
*/
dec TBLX
lda #39
sta PNTR
bne chrout_screen_CRSR_done // branch always
@@ -12,15 +12,7 @@ screen_advance_to_next_line:
!:
inc TBLX
// Set PNTR to 0 or 40 (for continued line)
ldy TBLX
lda LDTBL, y
and #$80
bne !+
lda #40
skip_2_bytes_trash_nvz
!:
// Set PNTR to 0 (for continued line will be fixed later)
lda #$00
sta PNTR