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 // Cursor keys handling within CHROUT
// //
// YYY bug: after line growth cursor LEFT/RIGHT jumps to previous line!!!
chrout_screen_CRSR_UP: chrout_screen_CRSR_UP:
lda TBLX lda TBLX
beq !+ beq chrout_screen_CRSR_done
dec TBLX dec TBLX
!:
// FALLTROUGH
chrout_screen_CRSR_done:
jmp chrout_screen_calc_lptr_done jmp chrout_screen_calc_lptr_done
@@ -18,35 +24,34 @@ chrout_screen_CRSR_DOWN:
lda TBLX lda TBLX
cmp #24 cmp #24
bne !+ bne !+
jsr screen_scroll_up
jsr screen_scroll_up_delay_done
!: !:
inc TBLX inc TBLX
jmp chrout_screen_calc_lptr_done jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_LEFT:
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_RIGHT: 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: chrout_screen_CRSR_LEFT:
jsr screen_get_clipped_PNTR
dey
bpl !-
lda TBLX lda TBLX
ora PNTR beq chrout_screen_CRSR_done
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
dec TBLX
chrout_screen_CRSR_RIGHT: lda #39
sta PNTR
inc PNTR bne chrout_screen_CRSR_done // branch always
jmp chrout_screen_calc_lptr_done
*/
@@ -12,15 +12,7 @@ screen_advance_to_next_line:
!: !:
inc TBLX inc TBLX
// Set PNTR to 0 or 40 (for continued line) // Set PNTR to 0 (for continued line will be fixed later)
ldy TBLX
lda LDTBL, y
and #$80
bne !+
lda #40
skip_2_bytes_trash_nvz
!:
lda #$00 lda #$00
sta PNTR sta PNTR