The sprite DMA register selects the CPU memory page containing sprite OAM. Storing the OAM address’s high byte triggers the PPU to copy all 256 bytes into its built-in sprite data area. section 5.13
A typical NMI routine performs the transfer in three steps:
- Reset the PPU sprite-memory address with PPU_SPRRAM_ADDRESS. section 5.13
- Load the high byte of the OAM label with >oam; for OAM at $0200, this value is $02. section 5.13
- Store that byte in SPRITE_DMA to start the hardware transfer without tying up the CPU. section 5.13
NMI sprite transfer
ldx #0; stx PPU_SPRRAM_ADDRESS; lda #>oam; sta SPRITE_DMA. This sequence selects the OAM page and transfers the complete sprite table.
