CHIP-8 Computer
Introduction: CHIP-8 Computer
CHIP-8 is an interpreted programming language for a virtual graphics computer. [1]
It was developed by RCA engineer <PERSON> in the mid-1970’s to allow video games to be more easily programmed for the COSMAC VIP 8-bit microcomputer.
Many of these games are in the public domain. [2]
This instructable explains how to make a virtual CHIP-8 graphics computer that can play these games using Processing 3 (freeware), an Arduino UNO R3, and a hexadecimal keypad. The keypad, which is optional, allows two players at the same time.
This instructable also explains how to create your own games using CHIP-8
Apart from games my version of CHIP-8 is great for learning how to program as:
* breakpoints may be set
* single-stepping is supported
* all register contents are displayed when single-stepping
* all instructions are disassembled when single stepping
The estimated cost of parts is less than $20.
Images
* The video shows the CHIP-8 virtual computer in action. The game “Jumping Sprite” is developed in this instructable. Deceptively simple ... difficult to master. 983
A public domain game called “BRIX” is also demonstrated in which the idea is to knock out as many bricks as possible before missing the ball with the paddle.
* The CHIP-8 computer is shown in the cover photo.
* Photo 2 shows the external hexadecimal keypad. Construction is simple ... a baseboard, four jumper wires and a wire link. [3]
* Photo 3 is a screen shot of the game “BRIX” in single step mode. In this mode the register contents are displayed and the next instruction is disassembled. The blue trace can be turned off in the CHIP-8 header ... but is helpful when debugging.
Notes
[1]
CHIP-8 is an acronym for:
Comprehensive Hexadecimal Interpretive Programming – 8-Bit
CHIP-8 details may be found at https://en.wikipedia.org/wiki/CHIP-8
[2]
There are many public domain CHIP-8 programs ... just Google CHIP-8 to find them.
One such games pack is available from https://www.zophar.net/pdroms/chip8/chip-8-games-...
Be aware that programs written for later versions of CHIP-8 may not run as some have extra instructions and a different starting address.
[3]
Construction details for the hexadecimal keypad are described in my instructable https://www.instructables.com/id/Touch-Keypad/
The Arduino keypad software for talking to CHIP-8 is included in this instructable.
Step 1: Parts List
My CHIP-8 software supports two players.
Option 1 (single player)
Nothing is required for this option other than keypad stickers.
CHIP-8 reconfigures your PC keyboard as follows when it is running:
1 2 3 4 ===> 1 2 3 C
Q W E R ===> 4 5 6 D
A S D F ===> 7 8 9 E
Z X C V ===> A 0 B F
The cost for this option is the price of some (optional) keypad stickers
Option 2 (two players)
The external keyboard (photo 1) offers the following advantages:
* two players can play as both keyboards are recognised
* the keypad layout is rectangular rather than slanted.
* you aren’t leaning over the CPU keyboard
* you can sit back to watch the screen
The following parts are required for this option:
* 1 onlyArduino UNO R3
* 1 only TTP229 capacitive touch keypad
* 4 only male-female Arduino jumper leads
* 8 only M3 x 9mm theaded nylon spacers
* 12 only M3 x 5mm bolts
* 1 only USB cable
* 1 only piece of scrap plastic for the baseboard
The estimated cost of parts for this option is less than $20.
Installing the hex keypad
Apart from the four jumper wires you also need to install a wire link.
Construction details are in my instructable https://www.instructables.com/id/Touch-Keypad/.
To activate this keypad
* Download and install the attached file “chip8_keyboard.ino” to your Arduino
* The keypad is recognised by setting “ExternalKeypad = true;” in the CHIP-8 header. 175