The PPU VRAM I/O register is the NES PPU data port. Write a value to it to store data at the current VRAM address. After each write, the address automatically increases by one, allowing sequential transfers. section 5.13
Use the register for a palette transfer during an NMI routine:
- Select the palette area by writing $3F and then $00 to the VRAM address register, producing address $3F00. section 5.13
- Set an index to zero, load each palette value, and write it to PPU_VRAM_IO. section 5.13
- Repeat until 32 values have been written; automatic address increment advances through VRAM. section 5.13
Writing a palette
After setting the VRAM address to $3F00, load palette values with indexed addressing and store each one to PPU_VRAM_IO. Increment the index and stop after 32 writes.
