calculate address of screen colour line

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-21 21:40:49 +09:30
1 parent 135ac01235
commit 6e4ba6ce18
1 file changed
+19 -2
+19 -2
View File
@@ -294,6 +294,20 @@ cslp_l1:
dex
jmp -
*
;; FALL THROUGH
update_colour_line_pointer:
;; Now setup pointer to colour RAM
lda current_screen_line_ptr+0
sta current_screen_line_colour_ptr+0
lda current_screen_line_ptr+1
sec
sbc HIBASE
clc
adc #>$d800
sta current_screen_line_colour_ptr+1
rts
@@ -305,7 +319,8 @@ retreat_screen_pointer_40_bytes:
lda current_screen_line_ptr+1
sbc #>40
sta current_screen_line_ptr+1
rts
jmp update_colour_line_pointer
advance_screen_pointer_40_bytes:
lda current_screen_line_ptr+0
@@ -315,4 +330,6 @@ advance_screen_pointer_40_bytes:
lda current_screen_line_ptr+1
adc #>40
sta current_screen_line_ptr+1
rts
jmp update_colour_line_pointer