Lazarus64 Retro Game System for any Microcontroller

From Idea to Prototype.

I can still remember the first time I touched the keyboard on a personal computer, watching in amazement as the glowing green screen relayed every character onto the rounded 14 inch glass monitor in front of me. "Syntax Error" was my first response from the 1978 Commodore PET, but it was the very beginning of what would become a life long journey. While many kids were content to just play the crude games available for the monochrome 1 MHz 6502 based computer, I wanted to dig into the code and understand what went on inside the machine. For weeks I stayed up until the late hours, sitting under the green glow of the cathode ray tube, attempting to alter the source codes, often ending up with random results or a blank screen. Yes, this was the frontier of the hacking age, and I was there for the event horizon. Yah, I'm old!

Fast forward 30 years later, and here I am laying on a secluded Caribbean beach with more free time on my hands than I know what to do with. While some are happy to just shrivel up like raisins in the sun, half baked on Cuba-Libres, I was there with notepad in hand and a calculator melting in he sand beside me! Having just been introduced to the 8 bit microcontroller, I wondered how much of a task it would be to create some kind of retro 8 bit computer like the ones I enjoyed so much as a young nerd. Although I had not yet done much beyond some simple compiled basic program on the PIC16F84, I had a good idea of how much could be done using assembly and some of the newer 20 MIPs microcontrollers offered by Microchip (PIC) and Atmel (AVR). Sitting there with a blank notepad looking at the waves crashing against the coral reef it dawned on me that there was more power available in one of these five dollar microcontrollers than any of the 8 bit computers of the early 1980s. Ideas began to take shape on the canvas.

I had no real idea how to carve a microcontroller into a retro game computer, so I started by making a list of what I would like to achieve in this project. Such things as video resolution, color space and memory bandwidth were worked out for the initial prototype, but some of the specifications had to be later changed due to constraints in the video timing and sync generation system. Knowing that a television set would be used as a video screen, a horizontal resolution of 224 pixels across was chosen, and although this was slightly beyond the "accepted" limits of composite video, it would be just fine for a game system. I initially wanted to have 256 horizontal pixels, but due to the way the sync generator worked on multiples of the 3.579 MHz color burst frequency, choices became limited to 160, 224, or 320. Having 320 horizontal pixels would have been nice, but then the host microcontroller would have to deal with a 9 bit X address and an 8 bit Y address, resulting in so many wasted cycles to compute the screen coordinates. The Commodore 64 could only push out 160 horizontal pixels in full 16 color mode, so my goal of 224 pixels with 256 colors was not bad as a comparison.

I continued to work out ideas and specifications on the notepad while taking shelter in the shade of a huge coral wall along the beach. The name "Lazarus-64" was penciled on the top of the notebook, and it seemed fitting considering the mythical character that rose from the dead. This project would basically revive the lost days of 8 bit computing using components that were actually available in the early 1980's such as 8 bit static RAM chips, 74 series logic gates, and a lot of tricky timing to carve out an NTSC signal. All of this retro hardware would then be "jacked" into modern 8 bit microcontroller that would basically act like a cartridge and CPU all in one.

A few months later when time allowed, I dug the Lazarus sketches out of my luggage and began to study the scary details of what it would take to actually generate a perfect NTSC signal to drive my video system out to a standard television screen. Some of my goals included not using any parts that were not available in 1980, so taking the easy way out by dropping in an NTSC video generator chip was not going to be an option. I dug deep into the old Atari documentation and NTSC specs, looking at what some of the old Jedi Masters such as Jay Miner (Atari 2600) did back in the days. At first, not much of this ancient data made much sense, but after some late nights the hairy details of the NTSC signal came into focus and I knew what it would take to make a color image on a television set.

To make a stable video image with the number of colors I wanted, it would take about a eight 74HC series logic chips just for the chroma phase generator, but that certainly fit with the project goals of only using true retro components. Now the next step was to decide on how the host microcontroller would talk to the video memory as this would ultimately determine how much "power" the final project would have. I decided very early in the prototyping phase that Lazarus-64 would squeeze as much bandwidth as possible out of the 70 nanosecond static RAM used as video memory, allowing the host microcontroller to read and write pixels at a blazing fast 14.318 MHz rate. This may seem slow compared to modern video hardware, but compared to the game systems and computers of the 1980's, this is at least 20 times as fast. The Nintendo 8 bit console could not even reach half a megahertz of video bandwidth. So began the creation of what I call "The Lazarus-64 Memory Switcher" - the circuitry that makes this project both easy to program and lighting fast.

After several months of trial and error as well as 200 or more hand drawn circuit diagrams, I had a design that would meet all of my original requirements. Since each small circuit was only partially tested on a small breadboard, the next step would be to breadboard the entire system to see if it would actually work.

I knew the prototype would occupy a huge chunk of breadboard real estate, so rather than attempt to string six or more small breadboards together, I decided to create one massive breadboard to hold the entire design as well as the host microcontroller. Normally, i would just stick the components through some perforated board and solder all of the wires on the underside, but the Lazarus-64 project was going to be a massive circuit with many hundreds of wires, so a design flaw would be a monumental mess if it were hard wired. I purchased ten small solderless breadboard blocks and then bolted them all down to a steel baking tray to make a good grounding base. All power and ground lines were interconnected and decoupled using .1uF capacitors for good noise immunity. The massive breadboard was also wired with composite video jacks, a 5 volt power supply, power switch, and even an analog VGA port in case I wanted to build a different version.


Here are some older prototype videos...




NEXT PAGE - The Color Generation Circuit