So, based on the formula above is it correct to state that NTSC MD would have slightly faster timers?Nemesis wrote:4. Timers
Two things here. First of all, I've tested the timer A registers, and confirmed that they are NOT "ganged together" like the frequency registers are. Changes to either register $24 or $25 affect Timer A the next time it overflows or is loaded, regardless of the order the registers are written to.
Secondly, I've confirmed the timer periods in the YM2612 are half the rate of the timers described in the YM2608 documentation, or in other words, the YM2612 timers take twice as long to count down as the timers in the YM2608. Here are the formulae to calculate the correct timer periods for the YM2612:Code: Select all
To calculate Timer A period in microseconds: TimerA = 144 * (1024 - NA) / M NA: 0~1023 M: Master clock (MHz) Eg, where clock = 7.61Mhz TimerA(MAX) = 144 * (1024 - 0) / 7.61 = 19376.61 microseconds TimerA(MIN) = 144 * (1024 - 1023) / 7.61 = 18.92 microseconds To calculate Timer B period in microseconds: TimerB = (144*16) * (256 - NA) / M NB: 0~255 M: Master clock (MHz) Eg, where clock = 7.61Mhz TimerB(MAX) = (144*16) * (256 - 0) / 7.61 = 77506.44 microseconds TimerB(MIN) = (144*16) * (256 - 255) / 7.61 = 302.76 microseconds
For a 7.67 MHz Clock we'd have the Min values for TimerA = 18.77 ms and for TimerB = 300.39 ms.
I'd like very much to confirm the precision of this information to update my SFX Editor for Pier Solar.