diff --git a/wip-hugo/routines/text/char_draw.s b/wip-hugo/routines/text/char_draw.s index e4aed64..cc258c6 100644 --- a/wip-hugo/routines/text/char_draw.s +++ b/wip-hugo/routines/text/char_draw.s @@ -5,6 +5,8 @@ ;; And prints it ON X_pos, Y_pos ;; Note that this is the real positions divided by 8 .proc char_draw + Y_pos_offset = $F9F8 ;Reuses from Y_pos + X_pos_offset = $FAF7 X_pos = $FA Y_pos = $F9 charset = $FB @@ -15,26 +17,58 @@ ;#### TEMP INIT DATA #### LDA #$10 STA code - LDA #$10 + LDA #04 STA X_pos + LDA #02 STA Y_pos + ;;Do arithimatic to know where to read and write bytes. + initial: ;We first need to clear some memory LDA #$00 STA petski_position, petski_position, petski_position, petski_position, petski_position, Character_generator_ROM, ! ;;Calculate screen_position to use Mov_16 >screen_position, VIC_bank + ;; Add the X_pos has a offset multiplier of *8 because 1 chunk = 8 addresses + ;; *8 + Mult_16 >X_pos_offset, X_pos_offset, X_pos_offset, screen_position, Y_pos_offset, Y_pos_offset, Y_pos_offset, Y_pos_offset, Y_pos_offset, Y_pos_offset, Y_pos_offset, Y_pos_offset, Y_pos_offset, screen_position, Y_pos_offset, screen_position), Y DEY BNE @loop -hihi: LDA (>petski_position), Y STA (>screen_position), Y - jmp hihi RTS .endproc