Talk:APU/current: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(→‎Glossary entry for "timer": Noise and DMC lookup tables only have even values; Blargg's APU Reference suggests all sound channel timers clocked every CPU clock, pulse channels are "Timer / 2".)
Line 9: Line 9:
But my understanding is the triangle, noise, and DMC timers are clocked on every CPU cycle, and only the pulse channel timers are clocked on every second CPU cycle. Have I understood correctly? --[[User:Bavi H|Bavi H]] ([[User talk:Bavi H|talk]]) 21:29, 19 February 2014 (MST)
But my understanding is the triangle, noise, and DMC timers are clocked on every CPU cycle, and only the pulse channel timers are clocked on every second CPU cycle. Have I understood correctly? --[[User:Bavi H|Bavi H]] ([[User talk:Bavi H|talk]]) 21:29, 19 February 2014 (MST)
:Then why do noise and DMC timers produce only even periods? --[[User:Tepples|Tepples]] ([[User talk:Tepples|talk]]) 07:22, 20 February 2014 (MST)
:Then why do noise and DMC timers produce only even periods? --[[User:Tepples|Tepples]] ([[User talk:Tepples|talk]]) 07:22, 20 February 2014 (MST)
::The [[APU Noise|noise]] and [[APU DMC|DMC]] channels use lookup tables to set the period of their timers. It looks like all of the lookup table entries happen to be even.
::I've been studying the NES sound capabilities as a hobby, let me know if I've gotten something wrong. Here's what I understand.
::From the References section, I read [http://nesdev.org/apu_ref.txt Blargg's NES APU Reference]. In that document, the "Timer" section says "All channels use a timer which is a divider driven by the ~1.79 MHz clock." I interpret this to mean all sound channels have a timer clocked by the [[Clock rate|CPU clock]]. In the same document, the "Square Channel" section block diagram has a block called "Timer / 2", whereas the block diagrams in all other channels have a block called "Timer".
::If I understand correctly, a "Timer / 2" clocked by every CPU clock would be the same as a "Timer" clocked by every other CPU clock. I'm not sure which one it really is implemented as. My main concern was it seems the statement in the glossary may be wrong regarding the noise and DMC timers, if I understand correctly, they are clocked every CPU clock. --[[User:Bavi H|Bavi H]] ([[User talk:Bavi H|talk]]) 19:02, 20 February 2014 (MST)

Revision as of 02:02, 21 February 2014

Looking at Visual 2A03 and e.g. the sq0_on and sq0_len nodes, it seems that disabling a channel doesn't touch the length counter at all. Rather, there are internal channel enable flags (eg. sq0_on) that get set when the length counter is initialized (presumably only for non-zero values, though I haven't checked) and cleared when either the length counter reaches zero or the channel is disabled. These are the flags you get back from $4015/read as well. Even if this page only describes "abstract APU operation", that's not any more complicated than the current version, so maybe the descriptions should be updated. -Ulfalizer (talk) 23:30, 28 April 2013 (MDT)

Glossary entry for "timer"

The glossary entry for timer says

The triangle channel's timer is clocked on every CPU cycle, but the pulse, noise, and DMC timers are clocked only on every second CPU cycle and thus produce only even periods.

But my understanding is the triangle, noise, and DMC timers are clocked on every CPU cycle, and only the pulse channel timers are clocked on every second CPU cycle. Have I understood correctly? --Bavi H (talk) 21:29, 19 February 2014 (MST)

Then why do noise and DMC timers produce only even periods? --Tepples (talk) 07:22, 20 February 2014 (MST)
The noise and DMC channels use lookup tables to set the period of their timers. It looks like all of the lookup table entries happen to be even.
I've been studying the NES sound capabilities as a hobby, let me know if I've gotten something wrong. Here's what I understand.
From the References section, I read Blargg's NES APU Reference. In that document, the "Timer" section says "All channels use a timer which is a divider driven by the ~1.79 MHz clock." I interpret this to mean all sound channels have a timer clocked by the CPU clock. In the same document, the "Square Channel" section block diagram has a block called "Timer / 2", whereas the block diagrams in all other channels have a block called "Timer".
If I understand correctly, a "Timer / 2" clocked by every CPU clock would be the same as a "Timer" clocked by every other CPU clock. I'm not sure which one it really is implemented as. My main concern was it seems the statement in the glossary may be wrong regarding the noise and DMC timers, if I understand correctly, they are clocked every CPU clock. --Bavi H (talk) 19:02, 20 February 2014 (MST)