c64-livecoding/wip-hugo/routines/text/char.inc
2025-05-12 01:44:00 +02:00

25 lines
897 B
PHP

;; public args
X_pos = ARGVEC + 0
Y_pos = ARGVEC + 1
code = ARGVEC + 2
;; 16-bit value, we reuse bytes from X_pos
X_pos_offset_hi = $ED
X_pos_offset_lo = X_pos
;; 16-bit value, we reuse bytes from Y_pos
Y_pos_offset_hi = $EC
Y_pos_offset_lo = Y_pos
;; private variables
screen_position = $EE ; 16-bit value (uses EF)
temp_value = $EC ; 16-bit value (uses ED)
;; What you will see bellow is .. interesting. I want to reuse
;; code and I need it for a 16-bit pointer. Because 6502 pointers expect the bytes to be besides each other
;; I need to use code +1 to store data even though its fot ARGVEK.
;; Thats why it's cursed
petski_position = code ; 16-bit value uses (code +1)
;; values
VIC_bank = $4000
Character_generator_ROM = $D000