Streamline the OAM copy

This commit is contained in:
Lucas Scharenbroich 2023-06-27 21:49:52 -05:00
parent 4c13373bd3
commit 576c402d0b

View File

@ -572,30 +572,18 @@ no_pal
; Trigger a copy from a page of memory to OAM. Since this is a DMA operation, we can cheat and do a 16-bit copy ; Trigger a copy from a page of memory to OAM. Since this is a DMA operation, we can cheat and do a 16-bit copy
PPUDMA_WRITE ENT PPUDMA_WRITE ENT
php php
phb
phk
plb
phx
pha pha
rep #$30 rep #$30
xba
and #$FF00
tax
]n equ 0 ]n equ 0
lup 128 lup 128
ldal ROMBase+]n,x lda ROMBase+$200+]n
sta PPU_OAM+]n stal PPU_OAM+]n
]n = ]n+2 ]n = ]n+2
--^ --^
sep #$30 sep #$30
pla pla
plx
plb
plp plp
rtl rtl