Making retro video games on today’s micro controllers brings many challenges, especially when using only the micro controller itself to handle the entire experience. Complex graphics, sound, game logic and input is taxing enough on the small chips, toss in NTSC color graphics and you have a whole different bear on your hands.
[rossum] set out making the Arduinocade retro game system using an overclocked Arduino Uno, and not much more. Supporting 4 voice sound and IR game controllers, the system also boasts 27 simultaneous colors all in software. These colors and the resolution feel like they’re impossible without a graphics chip to offload some of the work. While doing all of this the ATmega328p is also playing some faithful reproductions of classic arcade games.
The uses a couple of interesting tricks. Color is generated with NTSC color artifacts, where the screen is really black and white, but thanks to a delay or two in the signal generation the bits are out of phase from the reference “color burst” signal and appear on-screen as unique colors. This approach was used in the 8 bit Apple II personal computers to generate its colors, and also on the early IBM PC’s with CGA cards to drastically increase color depth. In this case, the chip is overclocked with a 28.6363 MHz crystal (a multiple of NTSC timing) and the SPI hardware leveraged to shift out all the necessary pixels. Check out how great it looks and sounds after the break.
It’s good to see an old trick on a new project and we are off to play some games!
26 thoughts on “Retro Games On ArduinoCade Just Shouldn’t Be Possible”
Not sure you can really describe something as “drastically increased” when the end result is 16, and also the same as the number of colours supported in hardware…
Arduinocade looks cool! Lots of nice tiny video projects around at the moment…
Depends how you look at it. In a world of Millions of colors, simply having 16 is hardly anything.
But to go from black and white (2) to 16, is 8 times the output it used to have. I would certainly call that a drastic increase considering what it used to be.
The end result is 1024:
This is pretty much how they did it back then, with slightly different hardware. All of the early Atari/Commodore/etc stuff ran at multiple/divisor of the color clock (I think it was Jay Miner who designed a nifty little multi-tap delay line to shift the signal phase, which is the moral equivalent of a shift register run at a much higher clock rate.)
Atari only used artifacting in hirez mode on 400/800/XL/XE/5200. and even then only squeezed an extra 2 colors out which don’t show up of you use a proper s-video monitor which most of the 8-bit series supported. Atari machines had a programmable graphics coprocessor with a 256 color palette. Could even display all 256 colors at once flipping between 16 color and 16 Luma modes rapidly. Apple was lazy OTOH and used fugly artifacting for everything.
While this is cool and I love ballblazer, this is only possible because of the high clock rate of the microcontroller.
Ballblazer from LucasArts! I remember playing that on my old Atari 800XL. It was sort of a futuristic first-person air hockey game.
I dream of having a similar 8 bit controller running a diagnostic/tuning GUI on a 6″ CRT in the dash of a classic 80s car like a Nissan 280ZX. Sadly my car is a ’99 model so I’ll have to use Windows CE to go ‘period correct’ :(
Yes, i would really rather have a buick (and i do! only much older)
also check https://www.youtube.com/watch?v=LoYSCuAwPUg
My 86 300ZX has a sweet VFD dash like this:
You get one color (VFD green) but it’s very retro.
The 280ZX had a digital dash too. What I was saying is a tuning interface that lets you control AFR, ignition advance, boost pressure etc and monitor the AFR, ignition advance, vacuum/boost, battery voltage etc. There are systems which perform these functions, but none which look like they would have been possible in the 80’s.
The reason I mentioned the 280ZX is that it came with an optional 6″ CRT TV. That means an Arduino, some passives and some clever coding is all it would take to add it. Sadly it’s carbureted, so an RB20/25/26/30 swap would probably be necessary to actually adjust fueling digitally.
Or instead of sticking a massively overweight and stupidly long motor in that kills the balance of the car, you could use a VQ from a later model Fairlady.
JOUST! for the WIN
I love Rossum’s stuff. That guy is a microcontroller wizard.
“[rossum] set out making the Arduinocade retro game system using an overclocked Arduino Uno”
Actually he used a Arduino Pro Mini. It even says Pro Mini in big letters…
The games look fast and snappy, very cool.
I think this is absolutely amazing! I’m very impressed and excited to see this. I think I might just build one. Does anybody know of a cheap graphics chip that one could use with an ATmega328p in case I did want to offload the graphics processing?
Well – there are quite a few like the EVE or the gameduino, but it would not have the cool of doing it in the AVR CPU.
If your not going to be totally minimalist then you may as well use and ARM. Then you may as well use an ARM with a MALI. Then you may as well just write things in objectionable C on the ARM in an iPhone. Before you know it you are writing games with farm animals in them.
So as you can see going down that path of “just add one little graphics chip” and you straight away venture into “not cool at all”
I guess I see your point but I don’t agree that adding a “little graphics chip” would equate to “not cool at all”. I haven’t ventured into ARM because it doesn’t seem to be as easy as Arduino has been.
You could always just add another atmega328 ;-)
rossum, you should port asteroids too it :) If you upped the CPU to one with 4K of RAM you could probably just cut and paste most of the version I did for the Uzebox.
I was thinking the exact same thing. I’m not smart enough to do it myself, though. I’m sure I’ll be able to build this project, though. And I might be able to add to the selection of games – I’m more comfortable with the programming side of things than I am with resistors and stuff :-)
Christopher, If you are just after a programming challenge and want to make games, then the Uzebox may be more your thing. It has already a lot of games, examples and tutorials for it. Rossum has actually built and shown off a uzebox built into a picture frame further down his blog there :)
I thought the same until I started with the Teensy. It’s ARM but runs code uploaded straight outta the Arduino IDE. Basically the same as using an Uno but you get 96MHz, an analog output (!), interrupts on every pin, more PWM and analog pins than you can use and the ability to make it work as a USB device (keyboard/mouse/joystick etc). The only thing it lacks is a socket to connect to the 14 smd pads of the 41 pins (only 27 are through-hole).
Teensy is still too expensive for my comfort. I see a lot of STM32F boards on eBay that are priced right. They’re only $5 and run anywhere from ~32Khz on up.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)