Blargg's APU doc mentions that the square programmable timer clocks the duty cycle every OTHER clock (effectively dividing the frequency by 2). And that the duty cycle takes 8 steps rather than 16.
This reminds me of BT's section on the noise channel. It have higher frequency values for the noise lookup table but said that the RNG unit is updated every OTHER clock.
Anyway -- I've since been thinking about it... and does this make ANY difference at all when emulating? I mean it's good to know the exact hardware behavior... but doing a 16-step duty cycle would have the exact same effect as a divided by 2 8-step duty cycle, wouldn't it?
As brought up in that savestate thread you said we should save the duty cycle as 0-7 -- but then wouldn't we have to save ANOTHER byte (or just a bit) to signal whether this is the first or second clock in the 2-step divider? Couldn't we just say that the low bit of the duty cycle counter is the step of the divider?
I don't know how much sense I'm making (it's pretty late and I'm tired) -- but my question is simple: Does emulating a 16-bit duty cycle have ANY effect on the generated wave? Or does it yeild the exact same result as emulating a divided-by-2 8-step duty cycle. Because I can't see how it would be different (and it sure is loads simpler to do 16-steps).
This reminds me of BT's section on the noise channel. It have higher frequency values for the noise lookup table but said that the RNG unit is updated every OTHER clock.
Anyway -- I've since been thinking about it... and does this make ANY difference at all when emulating? I mean it's good to know the exact hardware behavior... but doing a 16-step duty cycle would have the exact same effect as a divided by 2 8-step duty cycle, wouldn't it?
As brought up in that savestate thread you said we should save the duty cycle as 0-7 -- but then wouldn't we have to save ANOTHER byte (or just a bit) to signal whether this is the first or second clock in the 2-step divider? Couldn't we just say that the low bit of the duty cycle counter is the step of the divider?
I don't know how much sense I'm making (it's pretty late and I'm tired) -- but my question is simple: Does emulating a 16-bit duty cycle have ANY effect on the generated wave? Or does it yeild the exact same result as emulating a divided-by-2 8-step duty cycle. Because I can't see how it would be different (and it sure is loads simpler to do 16-steps).