pAPU timer's period question

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
pAPU timer's period question
by on (#1749)
Quote:
The timer's period is the 12-bit value (%HHHL.LLLLLLL0) formed by timer high and timer low, plus two.


Is this counter always decremented (clocked)? The conditions to silence the channel will stop the timer's countdown or just set the output to zero?

by on (#1751)
The ptimer is always clocked, when there is a condition to silence the channel the output as you say is 0, but ptimer doesnt stop counting (decrementing) and the period is set to the 11 bit value plus *one*.

I implement it in that way in my emulator and i think its correct. :)

by on (#1752)
Yes, the timer is always running. In general, each unit in the APU is always running and if a particular unit isn't needed, its output is simply ignored.

Me forthcoming APU test suite will verify an emulator's handling of this.