APU x $4015 reads?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
APU x $4015 reads?
by on (#175630)
Let's take square wave 1 active-time-left (atl) set at $4003. It's decremented twice per frame.
On a lda $4015 and the atl goes 1->0 right before the effective $4015 read, does $4015 return 1 or 0?
Re: APU x $4015 reads?
by on (#175831)
I'm not aware of any delay. So if the decrement happens before the read, you would read 0.
Re: APU x $4015 reads?
by on (#175902)
Disch wrote:
I'm not aware of any delay. So if the decrement happens before the read, you would read 0.

It bugs my mind. Actually, the order for running the units is PPU->APU->CPU. If I change it to CPU->PPU->APU, on $4015 reads, the atl=1, not zero as I'm doing. Got it?