OAMADDR != 0 behavior.... Wrapping?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
OAMADDR != 0 behavior.... Wrapping?
by on (#177799)
I was looking on http://wiki.nesdev.com/w/index.php/PPU_registers and it wasn't clear...

In the case where OAMADDR != 0 (say it is 255), and we do a write to OAMDMA, triggering a DMA operation, do we only write one byte (to OAMADDR 255) OR do we wrap and write to 255 and then to 0, 1, 2, etc?
Re: OAMADDR != 0 behavior.... Wrapping?
by on (#177800)
The increment operation will wrap from 255 to 0.
Re: OAMADDR != 0 behavior.... Wrapping?
by on (#177801)
Dwedit wrote:
The increment operation will wrap from 255 to 0.


Okay, so it will always take 513 or 514 cycles then instead of 1 in that case.
Re: OAMADDR != 0 behavior.... Wrapping?
by on (#177804)
The DMA is performed by the CPU (2A03). It doesn't know anything about the state of PPU, it just does 256 writes to $2004.