Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/lib/ppu.s
Original file line number Diff line number Diff line change
Expand Up @@ -222,3 +222,23 @@ PALETTE = $3f00
bne @loop
rts
.endproc

.proc clear_nametable_and_attr
ldy #4
lda #0
: ldx #0
: sta PPU_DATA
inx
bne :-
dey
bne :--
rts
.endproc

.proc clear_screen
Vram NAMETABLE_A
jsr clear_nametable_and_attr
Vram NAMETABLE_C
jsr clear_nametable_and_attr
rts
.endproc
1 change: 1 addition & 0 deletions src/smb-movement.s
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
sta $700, x
inx
bne @ram_reset_loop
jsr clear_screen
lda #%11101111
@sprite_reset_loop:
sta $200, x
Expand Down