PAL video: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
m (twelve times what? fix brain fart)
(why the simple method isn't as effective)
Line 4: Line 4:


*The phase of the V subcarrier inverts between each scanline and the next (hence the name: [[wikipedia:PAL|Phase Alternating Line]]).
*The phase of the V subcarrier inverts between each scanline and the next (hence the name: [[wikipedia:PAL|Phase Alternating Line]]).
*Color burst is at 135 degrees relative to the [[wikipedia:YUV|UV plane]], not 180. This allows the TV to detect the phase of the V subcarrier by comparing the phase of color burst to that of the previous line.
*Color burst is ideally at 135 degrees relative to the [[wikipedia:YUV|UV plane]], not 180. This allows the TV to detect the phase of the V subcarrier by comparing the phase of color burst to that of the previous line.
*Pixels are 5 master clock cycles long (5/6 of a pixel), rather than 4.
*Pixels are 5 master clock cycles long (5/6 of a pixel), rather than 4.
*Each field contains 312 lines, not 262, producing vertical [[Overscan|underscan]] and a pixel aspect ratio close to 1.386:1, which is wider than 1.143:1 of NTSC.
*Each field contains 312 lines, not 262, producing vertical [[Overscan|underscan]] and a pixel aspect ratio close to 1.386:1, which is wider than 1.143:1 of NTSC.
Line 17: Line 17:
The other way is a comb filter: average the received scanline's chroma (U and V channels) with the chroma from the received scanline immediately above it in the same field and use that.
The other way is a comb filter: average the received scanline's chroma (U and V channels) with the chroma from the received scanline immediately above it in the same field and use that.
This method, invented by an engineer at Telefunken, eliminates Hanover bars at the expense of a 62.5 microsecond quartz delay line, a royalty payable to Telefunken, and blurred vertical color detail.
This method, invented by an engineer at Telefunken, eliminates Hanover bars at the expense of a 62.5 microsecond quartz delay line, a royalty payable to Telefunken, and blurred vertical color detail.
Less expensive PAL TVs used the simple method and relied on the change in color burst phase over time to cancel out the Hanover bars, though this does not work with the slightly nonstandard PAL signal from an NES.
Less expensive PAL TVs used the simple method and relied on the change in color burst phase over time to cancel out the Hanover bars, though this technique may not be effective with the slightly nonstandard scanline length in the PAL signal from an NES.


Emulator developers planning to simulate PAL video decoding can use a signal captured from a 6538 to test the decoder:
Emulator developers planning to simulate PAL video decoding can use a signal captured from a 6538 to test the decoder:
* [[:File:PAL signal 6538 250MHz.png|250 MHz capture]]
* [[:File:PAL signal 6538 250MHz.png|250 MHz capture]]
* [[:File:PAL signal 6538 53.2MHz.png|Same capture downsampled to twelve times the subcarrier frequency (53.2 MHz)]], with one pixel per rise or fall of the master clock
* [[:File:PAL signal 6538 53.2MHz.png|Same capture downsampled to twelve times the subcarrier frequency (53.2 MHz)]], with one pixel per rise or fall of the master clock

Revision as of 14:06, 19 June 2016

The 2A07 PPU in the PAL NES and the 6538 PPU in PAL famiclones generate composite PAL video in much the same way that the 2C02 generates NTSC video: as a square wave between "high" and "low" levels, offset by 0 to 5.5 master clock cycles from the phase of color burst.

PAL NES video has six key differences from NTSC NES video:

  • The phase of the V subcarrier inverts between each scanline and the next (hence the name: Phase Alternating Line).
  • Color burst is ideally at 135 degrees relative to the UV plane, not 180. This allows the TV to detect the phase of the V subcarrier by comparing the phase of color burst to that of the previous line.
  • Pixels are 5 master clock cycles long (5/6 of a pixel), rather than 4.
  • Each field contains 312 lines, not 262, producing vertical underscan and a pixel aspect ratio close to 1.386:1, which is wider than 1.143:1 of NTSC.
  • No missing dot at end of pre-render scanline. This combined with the fact that 312 is a multiple of 6 causes the chroma dot pattern not to vary from one field to the next, producing dirty stills but OK movement.
  • The border is always black regardless of $3F00, and it covers the top scanline and the left and right 2 pixels of each remaining scanline.

The 2A07 and 6538 additionally have minor timing differences related to post-render length and OAM refresh; see Clock rate.

There are two different ways that a TV can decode PAL video. The simple way treats PAL as if it were NTSC, modulo the five differences above. In areas of poor RF television reception, this produces an artifact called Hanover bars. The other way is a comb filter: average the received scanline's chroma (U and V channels) with the chroma from the received scanline immediately above it in the same field and use that. This method, invented by an engineer at Telefunken, eliminates Hanover bars at the expense of a 62.5 microsecond quartz delay line, a royalty payable to Telefunken, and blurred vertical color detail. Less expensive PAL TVs used the simple method and relied on the change in color burst phase over time to cancel out the Hanover bars, though this technique may not be effective with the slightly nonstandard scanline length in the PAL signal from an NES.

Emulator developers planning to simulate PAL video decoding can use a signal captured from a 6538 to test the decoder: