This commit is contained in:
2026-02-17 09:53:46 -05:00
parent 2eb3aec80e
commit 94b5d57049
2 changed files with 5 additions and 11 deletions

BIN
plat.nes

Binary file not shown.

16
plat.s
View File

@@ -26,7 +26,7 @@ INES_SRAM = 0
.segment "CODE"
reset:
sei
lda #%00100000 ; 8x16 sprites
lda #0
sta $2000
lda #0
sta $2001
@@ -71,7 +71,7 @@ reset:
bit $2002
bpl :-
lda #%10001000
lda #%10101000 ; NMI enable, 8x16 sprites, ignored due to 8x16 mode
sta $2000
jmp main
@@ -128,7 +128,7 @@ nmi:
lda #>oam
sta $4014
lda #%10001000
lda #%10101000 ; NMI enable, 8x16 sprites, ignored due to 8x16 mode
sta $2000
lda $2002
lda #$3F
@@ -162,7 +162,7 @@ nmi:
@scroll:
lda scroll_nmt
and #%00000011
ora #%10001000
ora #%10101000
sta $2000
lda scroll_x
sta $2005
@@ -421,21 +421,15 @@ main:
draw_player:
lda player_pos_y
sec
sbc #1
sta oam + (4 * 2) + 0
sta oam + (4 * 3) + 0
sec
sbc #8
sbc #9
sta oam + (4 * 0) + 0
sta oam + (4 * 1) + 0
lda player_pos_x
sta oam + (4 * 1) + 3
sta oam + (4 * 3) + 3
sec
sbc #8
sta oam + (4 * 0) + 3
sta oam + (4 * 2) + 3
rts