Skip to main content
Topic: MCC8 - PIC24 based CHIP-8 game emulator (Read 8407 times) previous topic - next topic

MCC8 - PIC24 based CHIP-8 game emulator

This is a small handheld PIC24-based CHIP-8 emulator game console. A cheap Noika 1202 LCD is used as the display and a CR123A 3 volt lithium battery for power.   

CHIP-8 is an interpreted programming language, developed by Joseph Weisbecker. It was initially used on the COSMAC VIP and Telmac 1800 8-bit microcomputers in the mid-1970s. CHIP-8 programs are run on a CHIP-8 virtual machine. It was made to allow video games to be more easily programmed for said computers. (

The CHIP-8 instruction set only have about 35 instructions and ir very easy to emulate. The full firmware for the MCC8 only took an evening to write.

The sixteen buttons on the right is a hexadecimal keypad arranged in the same strange order as the COSMAC had for maximum keyplacement compability. Then I've added four extra buttons to go into game selection menu mode and other stuffs for future use.

My original plan was to use a PIC24FJ64GB002 (or 004) so I could connect the MCC8 to a PC to upload and debug new games, but by mistake when soldering I populated the board with a GA instead of a GB so the USB functionality is currently not available.

I've added 23 games into the firmware so they can be loaded into CHIP-8 RAM from the menu.

Hardware and Firmware are at my github as usual.



Re: MCC8 - PIC24 based CHIP-8 game emulator

Reply #1
Some F*ckups.... 

As usual I didn't read the datasheet closely enough so I assumed that the MCLR would have an internal weak pullup as the more modern PICs have. But noooooo :-)  It took me a while do realize this when my code didn't run at all,  except when I singlestepped the code in debug-mode from the Pickit.  The MCLR line on the Pickit is floating after flashing so the pic resetted all the time. During debugging the Pickit asserts the MCLR.

The key matrix is made fully n-key rollover (allowing multiple keys to be pressed and accurately detected at the same time) using diodes.  I managed to put in all the diodes backwards! (At least I'm consistent in my errors :-)  So I had to desolder all of them using a squished hot air nozzle, or else I would have melted the plastic of the tactile switches completely.  Now they only got slightly burned.

And of course, as I wrote in the first post, I soldered a GA- instead of a GB-device so there's no USB on the chip even if it's connected to the microusb connector.

I forgot to add a piezo beeper to the schematic, so  the Chip-8 "sound timer" instruction is kinda useless.  One solution to this would to use one of the spare PIC24 pins I've broken out on the board and just patch in a beeper there.  Or have a "visual bell" on the screen. :-)

I also need to find a better LCD to use.  The 96x68 pixel resolution of the 1202 is not ideal since the CHIP-8 requires a 64x32 pixel screen. Doing 64x32 in a window on the 1202 as I do now makes the image too small for comfort. And the LCD is too lowres for doubling the pixels.  A 128x64 LCD/OLED would be perfect. Then I can run standard Chip-8 in double-pixel mode, and then also emulate the newer SChip-8 that have double the resolution and some extra opcodes.

So for the next revision of this I'll add the beeper, remove the diodes since I don't care about n-key rollover, change to a better LCD, add a eeprom for storing games, and probably change the mechanical buttons to capacitive touch buttons to reduce the soldering a bit. And yes - a MCLR pullup resistor :)

Re: MCC8 - PIC24 based CHIP-8 game emulator

Reply #2
Nice retro Mats. You could potentially add simple monochrome VGA, like what was done on the Maximite http:// and / or Composite Video, like Geoff did on his Pong game http:// has to be the simplest video game circuit I've ever seen!

*edit - Added URL

Re: MCC8 - PIC24 based CHIP-8 game emulator

Reply #3
But with vga/tv output I lose the 'handheldness' of his device.  I'll change the LCD to a OLED in the next version, the lcd is so slow that small moving objects becomes invisible. :-(

Re: MCC8 - PIC24 based CHIP-8 game emulator

Reply #4
Yeah, you've got a point there. But it's retro, so you need to build it into a handheld brick!  ;)

Re: MCC8 - PIC24 based CHIP-8 game emulator

Reply #5
[quote author="Sleepwalker3"]Yeah, you've got a point there. But it's retro, so you need to build it into a handheld brick!  ;)[/quote]


It looks cool Mats!

Re: MCC8 - PIC24 based CHIP-8 game emulator

Reply #6
I want to have a handheld PIC24-based CHIP-8 emulator game console. So what games do we play on it?