Obtain the proper parts. This may be assembled on a breadboard as I have done. You will also need a few special items:
- Suitable TV: CRT preferred, older LCDs will probably work. If an Atari 2600 works on your TV, this should too.
- Atari 2600 joystick: If you can't get one, you just need 3 pushbuttons.
- AVR Programmer: This is NOT Arduino, and there is no serial bootloader. You need a proper USB or a bitbang programmer. I used the 'bsd' parallel port programmer using AVRDUDE, hanging off the back of an old Linux machine.
If you wish you may modify or recompile the code. I used Atmel Studio 6.1
Assemble the schematic.
Set the AVR fuses. A factory-fresh AVR is set to use the internal 8Mhz oscillator. I was able to generate a video signal at 8Mhz, but the code I've provided has the wrong timings for 8Mhz, and the picture is wobbly due to jitter.
The correct fuse values are:
This will set it up for an external clock. You must have an external clock connected, or you will no longer be able to program the AVR, and the MCU will be bricked until you do connect an external clock.
This is the avrdude command to set the fuses:
sudo avrdude -c bsd -p t84 -u -U lfuse:w:0xff:m
sudo avrdude -c bsd -p t84 -u -U lfuse:w:0xdf:m
Change -c parameter to use a different programmer if necessary.
Upload the Code.
The hex file is provided in the Github Repo.
sudo avrdude -c bsd -p t84 -U flash:w:SMALL.hex