Breakuot-like game on PIC12F1572
- Transfer
- Tutorial

The proposed design is proof that the NTSC color composite video signal can be generated using a very simple hardware.
Short description
Although it is more difficult to generate a color composite video signal in the NTSC system than VGA, this requires fewer outputs of the microcontroller (in this case, three connected by the simplest “mixer”). It is called composite because all information is transmitted along one line. Line and frame sync pulses, color and brightness signals are combined together, unlike VGA, where a separate wire is allocated for each of these signals. To send such a signal to the TV, one shielded cable with “tulips” on both sides is enough.
The device has only two active components: a 28.636 MHz crystal oscillator (3.5795345 MHz x 8) and a PIC12F1572 microcontroller in a PDIP package.
The author decided to implement an analogue of the classic Breakout game in 1976, but any arcade game originally implemented on logic chips could be in its place, since such games have fairly simple plots.
Now more
If you think that you cannot connect the device to a too modern TV without a yellow “tulip” - fortunately, you are mistaken. Look for a green “tulip” among the YPbPr signals that are intended for signals - you can also feed composite there. Tested on two televisions, one of which is RCA, the other is Toshiba.
How simple can an NTSC composite video device be? See the diagram:

An external oscillator is needed to obtain a stable NTSC subcarrier frequency. It is eight times larger than required. The microcontroller divides it into four, which means it works at a frequency twice that of the subcarrier. The device allows you to receive six colors due to different combinations of four types of signals (logical unit, high-impedance state, subcarrier without phase shift, it is also with a phase shift of 180 °) at two outputs (the first is the output of the color signal, the second is the output of the brightness signal):
black - a high impedance state here and there
White - a high impedance state and a logic unit
Yellow - subcarrier shifted by 180 ° and logical unit
Magenta - without subcarrier shift and logical unit
Blue - subcarrier without high shear and impedance state
Dark green - a subcarrier with a 180 ° shift and a high impedance state.
Dark green color on many TVs turns out to be indistinguishable from black, and therefore is not used. The author’s camera does not render colors well, so the magenta in the photo looks almost like white:

Files are here under the GPL v3.
The code is written in assembler, out of two kiloslov ROMs (in PIC microcontrollers ROM stores not bytes, but words with a width different from 8 bits), 54% are involved, and 63% of 256 bytes of RAM are involved. The video was shot with the same camera, and purple merges with white again:
A brief history of Breakout is provided on Wikipedia .
The author made a subminiature joystick by gluing a power pushpin to a tuning resistor. He rustles a lot, which makes it difficult to play, so it is better to use a variable resistor and a handle to it of normal sizes.

From the translator: in this circuit, the same output of the microcontroller is used to output audio, and to receive an analog signal from the joystick. Probably, for this, he programmatically switches at the right moments from the input mode to the output mode and vice versa. So that the constant component does not get on the TV, it is recommended to put a capacitor in front of the “tulip”.