The 2C07 PPU in the PAL NES and the 6538 PPU in PAL famiclones make composite PAL video much as the 2C02 makes NTSC video: a square wave between a high and a low level, offset by 0 to 5.5 master clock cycles from the phase of the colour burst. The clock rates, frame lengths and regions are on timing and regions.
Differences from NTSC
- Phase alternating line: the phase of the V subcarrier inverts from one scanline to the next. The colour burst is ideally at 135 degrees relative to the UV plane, not 180; this lets the TV detect the V phase by comparing the burst with the previous line’s. The PAL NES outputs a somewhat nonstandard 120 degree burst.
- Higher subcarrier: PAL-B uses 4.43361875 MHz. The 2C07 and 6538 keep the design of 12 oscillators, so the master crystal is six times that, 26.6017125 MHz. Scanlines are still 341 pixels, but each pixel is 5 master clocks (5/6 of a colour cycle) instead of 4 (4/6), which reduces luma-chroma crosstalk. The rarer PAL-N (Argentina) and PAL-M (Brazil) famiclones use a lower subcarrier and keep pixels of 4 master clocks.
- 50 Hz: each field has 312 lines, not 262, giving vertical underscan and a pixel aspect ratio near 1.386:1 (NTSC: 1.143:1).
- No short line: the dot at the end of the pre-render scanline is never skipped. Together with 312 being a multiple of 6, the chroma dot pattern does not vary from one field to the next (dirty stills, fine movement).
- Phase per line: a PAL NES scanline has 284 and 1/6 chroma cycles instead of the standard 283 and 3/4, so the phase changes by 60 degrees each line and the colour artefacts repeat every 6 lines (NTSC has 227 and 1/3 chroma cycles per line and a 3-line pattern).
- Larger border: the border, including the area outside the picture, is always black rather than the backdrop colour, and covers the top scanline and the left and right 2 pixels of each remaining line.
- Hue shift: hues differ slightly from NTSC: a 15 degree shift because PAL’s burst is rotated 45 degrees relative to NTSC’s, which may be partly offset for brighter colours by PAL’s cancellation of differential phase distortion.
- Differential phase distortion: present as on NTSC, on single lines possibly worse (a forum observer saw about a 60 degree hue difference between even and odd lines), but because alternate lines distort the hue in opposite senses the error can cancel vertically except on isolated rows.
The 2C07 and 6538 also have minor timing differences in the post-render length and OAM refresh. Two ways to decode PAL in a TV: the simple way treats it as NTSC apart from the differences above, and under phase distortion this gives Hanover bars; the other averages each line’s chroma (U and V) with the line above in the same field (a comb filter, invented at Telefunken; it needs a 64 microsecond quartz delay line and a royalty, and blurs vertical colour detail). Cheaper TVs used the simple way and relied on the change of burst phase over time to cancel Hanover bars, which may not work with the slightly nonstandard line length of an NES.
Scanline timing
The master clock is 26.6017125 MHz and the colour generator runs at twice that (about 53.203425 MHz). A PPU pixel lasts ten colour-generator clocks (five master clocks), about 188 ns; NTSC uses 8 colour-generator clocks per pixel. The values below are in PPU pixels (341 per line), relative to cycle 0. The PPU’s video output is delayed by one pixel clock, and extra D-latches delay the image by two more pixels, so cycle 0 of scanline 0 on the PPU frame timing diagram is the black pixel. The timings come from the Breaking NES Wiki’s reverse engineering of the H and V decoders of the 2C07-0; the front porch start and back porch end use symbols b and c of Table 2 of ITU-R BT.1700.
Rendering scanlines (240, rows 0 to 239)
| Part | Start | Duration | Note |
|---|---|---|---|
| horizontal sync | 277 | 25 | |
| back porch (blank) | 302 | 4 | |
| colour burst | 306 | 15 | |
| back porch, continued (blank) | 321 | 12 | |
| left border (blank) | 326 | 11 | |
| left border, cropping active video (blank) | 3 | 2 | |
| active | 5 | 252 | line 0 is entirely cropped by the border |
| right border, cropping active video (blank) | 257 | 2 | |
| right border (blank) | 259 | 18 | |
| front porch (blank) | 268 | 7 |
Post-render blanking scanlines (30, rows 240 to 269)
| Part | Start | Duration | Note |
|---|---|---|---|
| horizontal sync | 277 | 25 | |
| back porch (blank) | 303 | 4 | |
| colour burst | 306 | 15 | |
| back porch, continued (blank) | 321 | 12 | |
| vertical blanking region (blank) | 326 | 278 | in the 2C07 the VBlank flag is set on scanline 241 |
| front porch (blank) | 268 | 7 |
Vertical sync scanlines (3, rows 270 to 272)
| Part | Start | Duration |
|---|---|---|
| vertical blanking pulse | 277 | 320 |
| vertical sync serration (blank) | 256 | 21 |
Pre-render vertical blanking scanlines (39, rows 273 to 311)
| Part | Start | Duration | Note |
|---|---|---|---|
| horizontal sync | 277 | 25 | |
| back porch (blank) | 303 | 4 | |
| colour burst | 306 | 15 | |
| back porch, continued (blank) | 321 | 12 | |
| vertical blanking region (blank) | 326 | 278 | in the UMC UA6538 the VBlank flag is set on scanline 291; VBlank is cleared on scanline 311 in both the 2C07 and the UA6538 |
| front porch (blank) | 268 | 7 |
The total is 312 scanlines.
Colour phases
As on NTSC there are 12 colour square waves at regular phases, but because each scanline encodes V with opposite sign there is no direct mapping from “colour in palette RAM” to “one square wave”. The PAL colour burst (pure shade -U+V) has the same phase as phase 7. The same two square-wave oscillators are used for pairs of hues: 3 and 2, 4 and 1, 5 and C, 6 and B, 7 and A, 8 and 9. The PAL PPUs suffer the same differential phase distortion as NTSC, often a little worse because of PAL-B’s higher chroma frequency; delay-line chroma decoding compensates for it. The palette values themselves, including the 2C07 table, are on palette colours.
Emulator developers can test a PAL decoder against a signal captured from a 6538: a 250 MHz capture and the same capture downsampled to twelve times the subcarrier frequency (53.2 MHz), one pixel per rise or fall of the master clock, are on the wiki. An open-source PAL decoder library is listed on the wiki page.
Sources
The NESdev Wiki text is available under CC BY-SA 3.0. This page is written in our own words from the raw wikitext kept in samples/nes/sources/hardware. Not copied: the diagram of the timing tables, the signal captures and the forum threads.