Tiles are updating

This commit is contained in:
RochesterX
2026-03-18 20:47:38 -04:00
parent f86bc9b23b
commit ea31c0836b
2 changed files with 23 additions and 7 deletions

BIN
plat.nes

Binary file not shown.

28
plat.s
View File

@@ -415,7 +415,9 @@ frame_counter: .res 1
last_frame_jumped: .res 1 last_frame_jumped: .res 1
last_frame_moving: .res 1 last_frame_moving: .res 1
column_pattern: .res 1
tile_update_pos_r: .res 1 tile_update_pos_r: .res 1
tile_update_pos_l: .res 1
pointer: .res 2 pointer: .res 2
@@ -1474,13 +1476,19 @@ check_column_update:
cmp tile_update_pos_r cmp tile_update_pos_r
bne :+ bne :+
; Load column pattern
lda tile_update_pos_r
sta column_pattern
; Apply pattern
jsr update_nmt_column jsr update_nmt_column
; Increment tile_update_pos_r
lda tile_update_pos_r lda tile_update_pos_r
clc clc
adc #1 adc #1
and #%00011111 and #%00011111
sta tile_update_pos_r sta tile_update_pos_r
: :
rts rts
@@ -1492,7 +1500,7 @@ update_nmt_column:
lda tile_update_pos_r lda tile_update_pos_r
clc clc
; Add offset in tiles from left edge of screen ; Add offset in tiles from left edge of screen
adc #8 adc #16
sta var_n sta var_n
; Nametable base ; Nametable base
@@ -1532,15 +1540,23 @@ update_nmt_column:
clc clc
adc var_p adc var_p
tay tay
; Specifies what tile gets written to the column ; Specifies what tile gets written to the column
lda #%10110001 lda column_pattern
sty var_m rol
stx var_m
: :
lsr ror
dec var_m dec var_m
bne :- dec var_m
bpl :-
and #%00000001 and #%00000001
cmp #0
beq :+
ora #%10000000
:
sta (pointer), Y sta (pointer), Y
and #%01111111 and #%01111111