The PAL standard uses an analog signal. When running in the simulator, you don't have to worry about this, but if you want to run your game on a physical TV, then you'd need to generate the following voltage levels:
- 0V for sync signals (HSYNC/VSYNC)
- 0.3V for black pixels
- 1V for white pixels
The good news is: you only need a few resistors to convert the digital signal (that works in the simulator) to an analog one.
Composite video usually uses RCA connectors. You'd need the make the following connections to the central pin of the RCA connector:
- SYNC pin through a 470Ω resistor
- DATA pin through a 270Ω resistor
- Optionally, another 75Ω that goes to the ground (some TVs will accept the signal without this extra resistor)
Make sure you also connect the ground to the ring of the RCA connector.
Or, if you prefer a schematic:
How does this work? We implement a simple voltage divider to generate the required voltages, based on the two digital pin levels:
As you can see, driving both SYNC/DATA high results in a about 1V, which is the white pixel level, driving SYNC high and DATA low results in about 0.37V, a bit above the black pixel level (but still good enough the maintain contrast), and driving both pins low results in 0 volts, that's the sync level.
Using this setup and driving DATA high while SYNC is low, you can also generate a gray pixel level (0.637V), but that's definitely out of scope for this project.