pal frame sequencer clock rate

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
pal frame sequencer clock rate
by on (#41997)
i read that the ntsc frame sequecer generates a clock at 21,477,272 / 89490 ~ 240 htz, is the pal version still close to 240 htz ? i was looking for the master clock divider, 26,601,712 / x, x = ?

matt

by on (#41998)
Here's what I have in some notes:
Code:
Mode 0: 4-step sequence

Action      Envelopes &     Length Counter& Interrupt   Delay to next
            Linear Counter  Sweep Units     Flag        NTSC     PAL
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$4017=$00   -               -               -           7459    8315
Step 1      Clock           -               -           7456    8314
Step 2      Clock           Clock           -           7458    8312
Step 3      Clock           -               -           7458    8314
Step 4      Clock           Clock       Set if enabled  7458    8314


Mode 1: 5-step sequence

Action      Envelopes &     Length Counter& Interrupt   Delay to next
            Linear Counter  Sweep Units     Flag        NTSC     PAL
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$4017=$80   -               -               -              1       1
Step 1      Clock           Clock           -           7458    8314
Step 2      Clock           -               -           7456    8314
Step 3      Clock           Clock           -           7458    8312
Step 4      Clock           -               -           7458    8314
Step 5      -               -               -           7452    8312

So for PAL 4-step mode, the average is exactly 8313.5 CPU clocks, and 5-step mode exactly 8313.2 CPU clocks. Assuming 1.662607 MHz CPU clock for PAL, this comes out to about 200 Hz in both cases. So it's about 4x the VBL rate (50 Hz), as with NTSC (60 Hz x 4 = 240 Hz).