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.

30
plat.s
View File

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