Close
0%
0%

breakout game on PIC12F1572

This project is a proof of concept about generating color NTSC signal with very simple hardware

Similar projects worth following
Although color NTSC composite signal is more complex to generate than VGA signal it require less wires. It is called composite because all information is contained in a single signal. Horizontal synchronization, vertical synchronization, color and luminescence all combined together contrary to VGA where all those signals travels on different wires. So to connect NTSC composite to a TV a simple shielded (coaxial) wire is required with a small RCA phono plug at each end.

This project use only 2 actives components a crystal oscillator at 8 times NTSC chroma frequency, which is 3.5795345Mhz and a humble PIC12F1572 MCU in PDIP-8 format.

I decided to implement the 1976 arcade game **BREAKOUT** but could have chosen any game of that era (before advent of 8 bits microprocessors), as they where all very simple in their design due to manufacturing cost (all done in TTL chips).

You may think that your modern TV doesn't accept NTSC signal and you are probably wrong. Check for YPbPr  input at the back. The green connector is probably also an NTSC composite input. It is the case with my 3 years old RCA TV and was the case with the Toshiba previous one. 

So how simple it could be to generate color NTSC composite?  Look at the schematic below.

The external oscillator is required to have a stable and precise chroma reference signal. The chosen one run at 8 times the chroma frequency.  As PIC core divide the clock signal by 4. The CPU is running at 2 times the chroma frequency.  This simple circuit can generate 6 colors.

colorschroma
output
video_y
output
blackhi-zhi-z
whitehi-zVdd
yellowphase:180°Vdd
mauvephase:0°Vdd
bluephase:0°hi-z
dark greenphase:180°hi-z

The dark-green color is almost unusable as it is too close to black. It require a TV with a good contrast. So I didn't used it in the game.

The final result look like this:

All the source code  and KiCAD project is on the Github repository.

This is coded in assembly to optimize the code.   The final code use 54% of the 2Kword flash memory and 63% of 256 bytes of available RAM.  So there is plenty of space.

Finally a short demo video.   My camera doesn't capture de colors very well. the mauve look whitish.

An interesting read, the story of breakout game on wikipedia

  • game controller hack

    Jacques03/30/2019 at 00:09 0 comments

    The game controller is a hack.  I made it with an adjustable potentiometer to which I glued the handle of a push pin. But as it was not easy to grab between the fingers I built up an epoxy cap over it.  The bad quality of the potentiometer make the game hard t play as seen in the video.

View project log

Enjoy this project?

Share

Discussions

Jacques wrote 03/29/2019 at 23:23 point

Thanks,

  Are you sure? yes | no

Dan Maloney wrote 03/28/2019 at 19:58 point

Nice job, you accomplish a lot with very few components. I'm going to write up a post on this for the blog - look for it in the coming days. Thanks!

  Are you sure? yes | no

Does this project spark your interest?

Become a member to follow this project and never miss any updates