Ready to feel inadequate with your programming skills? You’ve been warned. Take a look at [Voja’s] single chip video game console using the PIC24. It produces the VGA signal, 5-channel sound, and is presented in a gamepad form-factor with directional pad and two buttons.
He’s been working with PIC24 for a while now generating VGA signals, and he decided it might be fun to create a 2D video game… so he decided to see if he could program a replica of the old Spectrum game Jumping Jack (play it online here).
It uses a PIC24EP512GP202 microcontroller, complete with 512K flash memory, 48k data, and a whopping 28-pins. The game, which is extremely well documented, is laid out over on his projects page. It makes our heads spin just looking at it! This is a great project to compare with the ArduinoCade from last week. Both do an amazing job of pumping out audio and video while leaving enough room for the game to actually run.
Anyway, enough talking about it — just take a look at the following demo!
An amazing job. Reminds me of the old days when memory was small and expensive so programmers had to squeeze every bit out of what was available. Definitively an art to his work. But also demonstrates what some of these small chips are really capable of in the hands of the right program. Awesome work.
My thoughts exactly. Not only that, but he has documented everything really well! Props for that.
Stellar.
I wish every HAD project had such good documentation. Simply amazing and extra props for explaining so well how it works and how you worked around the limitations of the chip.
I haven’t even seen the software part of this project, but the result is stunning! That PCB layout is a work of art, and I love what he did with the acrylic around the connectors. And he used CorelDraw for the schematics! Brilliant! Kudos!
===Jac
At first I thought this was a picture of my product, the Hackvision. (Arduino-programmable video game system) https://nootropicdesign.com/hackvision/
Stuff like this is always impressive, but I’m loathe to consider anything that produces VGA as a “game console” mostly because it doesn’t jack into a good old fashioned TV set. I’ll stick to Rossum’s recent ArCadeDuino.
Converting the timing from Voja’s doublescanned 18MHz 380×600 to an measly 8MHz 380×224 NTSC-compatible should be trivial, and leave more time for doing other things…
ArduinoCade
That’s a very sweet piece of work but nobody should be surprised at the PICs ability to handle this. At 70 MIPS (16-bit) It is a veritable super-computer compared to the 0.8 MIPS (8-bit) 1.79Mhz 6502B used in the Atari 800. On top of that the PIC has 512KB of program memory and 48KB of RAM compared to the Atari’s 16KB. The PIC24EP512GU814 is comparable to an Intel DX4 (486) circa 1994.
Instructions per Second
I’ve got around 6 vintage arcade machines, most run the 6802 and a couple z80’s.
As I understand this comment your saying that an 80’s Era arcade programmer would have been able to blow the roof off the industry if they had this chip in the 80’s and I agree, considering my knowledge of how old game boards work in still amazed they were able to do as much as they could while constantly having to shift bits in and out of ram and rom all over a 16″x24″ board loaded with 74 series ics. Respect to those geniuses who truly are the hero’s of hardware
Remember to take into account that there is no dedicated video hardware here. That was the main consideration in older devices, and how to share the ram. (Beside the DMA, maybe used here.)
Sure, video signal is generated by software. DMA could be used for plain video buffer, but not for sprites with transparent areas.
Amazing project, and one of the best (if not the best) writeups I’ve seen! I recommend reading whole documentation for understanding how those console games worked and which clever tricks programmers (and hw designers) used to get around hw/sw limitations of that time.
The PIC24 is pretty high-powered so this should surprise nobody, and only supporting square waves for its audio is fucking abysmal given what people have been able to pull off on the 8-bit AVR series of chips. At the same time, the graphics are much better than I would have expected for something entirely CPU-driven without a dedicated GPU, so I think there are both positives and negatives to the project.
PIC24 have GPUs, believe it or not.
“Graphics Acceleration Units”
http://www.microchip.com/_images/16-bit/PIC24-Peripherals-Mem-Analog-lrge.jpg
nb I don’t know for sure that the PIC24 in this project has this module.
None of the PIC24EP as intergrated graphics only the PIC24FJxxxDAxxx
From the PIC24FJxxxDAxxx datasheet: “The module also provides an accelerated rendering of […] rectangles, copying of rectangular area between different locations on the screen, drawing texts and decompressing packed data.”
“Drawing texts” seems to be code for “bitplane transformations”
Maybe misusing the LCD parallel interface to drive VGA would be an interesting use case.
Pity the RS232 input is unnecessarily complicated – this PIC has software selectable RXD polarity (RXINV bit) , so just a resistor or two is all you need for real RS232, or TTL UART.
I was pretty interested in the use of the UART to generate variable frequency square waves.
Does anyone know of any attempts at this on an AVR? Just giving it a brief look, it seems that the baud rate can be adjusted dynamically, but keeping the transmit register permanently at 0b01010101 (as stated by the documentation of this project) seems to be impossible on the AVR.
Any ideas?
As long as you keep feeding Tx data quick enough it would work on any UART
Old master did it again. Superb.
Can we get a burger time port for this?
“Unfortunately, microcontrollers which are packed in DIP packages (with thru-hole soldering, convenient for DIY projects and workshops) do not have USB interface but only serial ports, so you have to use RS 232 if you want to download some new game.”
Not true.From memory PIC24FJ64GB002 is one (host and device).
And of course SD card, doable on any micro, would be a good way to store games.
No, microcontrollers 24F can’t be used here, as they are too slow (16 MIPS)
Its called polling..