cursor up/down adapted

This commit is contained in:
FeralChild64 committed 2020-01-06 12:05:39 +01:00
1 parent dfc6c5f90a
commit f642b55383
5 files changed
+57 -28

No files matched your search

+1
View File
@@ -119,6 +119,7 @@ chrout_screen_literal:
chrout_screen_calc_lptr_done:
jsr screen_calculate_PNT_USER
jsr screen_fix_PNTR
// FALLTROUGH
+23 -26
View File
@@ -5,37 +5,34 @@
chrout_screen_CRSR_UP:
jmp chrout_screen_done
lda TBLX
beq !+
dec TBLX
!:
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_DOWN:
jmp chrout_screen_done
lda TBLX
cmp #24
bne !+
jsr screen_scroll_up_delay_done
!:
inc TBLX
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_LEFT:
jmp chrout_screen_done
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_RIGHT:
jmp chrout_screen_done
jmp chrout_screen_calc_lptr_done
/* YYY disabled for rework
chrout_screen_CRSR_UP:
lda PNTR
sec
sbc #40
sta PNTR
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_DOWN:
lda PNTR
clc
adc #40
sta PNTR
// We need to advance the pointer manually, as normalising
// now will break things. The pointer update is required
// so that we can tell if we really are on the bottom phys
// screen line or not
jsr screen_scroll_up_if_on_last_line
jmp chrout_screen_calc_lptr_done
chrout_screen_CRSR_LEFT:
+1 -1
View File
@@ -41,7 +41,7 @@ screen_scroll_up:
// FALLTROUGH
screen_scroll_up_delay_done:
screen_scroll_up_delay_done: // entry point for cursor move control codes
// Scroll the LDTBL (line link table)
+30
View File
@@ -0,0 +1,30 @@
//
// Sets PNTR in a proper range (0-39 or 40-79) depending on the
//
screen_fix_PNTR:
ldy TBLX
lda LDTBL, y
php
jsr screen_get_clipped_PNTR
plp
bmi screen_fix_PNTR_0_39
// FALLTROUGH
screen_fix_PNTR_40_79:
tya
clc
adc #40
tay
// FALLTROUGH
screen_fix_PNTR_0_39:
sty PNTR
rts
+2 -1
View File
@@ -1,4 +1,5 @@
// YYY test all the cases!
screen_grow_logical_line_screen_up:
@@ -7,7 +8,7 @@ screen_grow_logical_line_screen_up:
// FALLTROUGH
screen_grow_logical_line_already_done:
screen_grow_logical_line_done:
inc TBLX
jmp screen_calculate_PNT_USER