Introduction: CHIP-8 and the Pocket Mini Computer
This time I'm setting the time machine for the year 1977, when the average monthly rent as $240.00 and a gallon of gas was 65 cents. Jimmy Carter was the president of the United States, and while home computers were available, they were a pretty big investment. The Apple II with 48k of ram would set you back $2,638.00 (That around $9,065.66 today!)
Geeks longed for their own computers, this where the COSMAC VIP comes in. It arrived in kit form costing only $275.00.
This Instructable will teach you how to build your own CHIP-8 compatible computer using the Pocket Mini Computer. I'll even show you how to build your own 4x4 keypad controller. (The game controller of the 70's)
The Pocket Mini Computer (See page 2 for more information)
If you choose to "roll your own" PMC configuration, you'll need to duplicate the VGA, SD, AUDIO, and SRAM circuits)
Parts for the DIY 4x4 keypad:
- 16 Tact Switches
- A 5x7cm perf board
- 2 - 4.7k resistors
- 1 - PCF8574A IC
- 1 - Solderless mini breadboard
- Wire/Solder/Soldering Station
- A quiet, well-lit place to work
Step 1: The RCA COSMAC VIP
Let me introduce you to the RCA COSMAC VIP, The DIY "kit" computer of 1977.
Check out these "cutting edge" specs!
- Model: VP-111
- Year: 1977
- Price: US$275 (in kit form)
- CPU: RCA CDP1802 @ 1.76MHz
- Memory: 2048 byte RAM, 512 byte ROM
- Interface: 16-key "hex" keypad
- Display: composite video, 64x32 pixels
- Ports: audio, video, cassette, parallel
- Storage: optional external cassette
- OS: RCA "CHIP-8" language
This machine arrived pretty much like the Pocket Mini Computer kit does today. A package of parts!
The image on this page is an assembled unit. The keyboard isn't missing! It's that 4X4 keypad you see in the corner of the unit! The VIP was programmed in a type of "Interpreted_language" called CHIP-8. Fortunately, the COSMAC VIP was quite a bit more advanced than many of it's predecessors, it connected to a TV as it's video display. It came with 20 games, but you had to type them in to play them.
I'll spare you all that typing with our PMC version of the COSMAC VIP.
Step 2: The Pocket Mini Computer
What's a Pocket Mini Computer? I'm glad you asked!
The Pocket Mini Computer is an open source "mini computer" design which uses the Parallax Propeller microcontroller as it's brain. The kit from Propellerpowered.com comes pre-loaded with a retro-style BASIC. The hardware itself is extremely powerful & featured.
The Pocket Mini Computer is quite a bit more advanced than the COSMAC VIP.
Here's the specs:
- The Pocket Mini Computer hardware specifications:
- Parallax Propeller Quickstart Board (8 cogs, 32K RAM, 64K EEPROM)
- Improved VGA Output
- Stereo R/L Audio Output
- PS/2 Keyboard/Mouse Input
- Wii(tm) compatible controller connection
- Optional microSD adapter connector
- Optional iR connector
- Experimenter's port
The Pocket Mini Computer is language compatible with Spin, Assembly (PASM), C, and BASIC.
- COLOR BASIC features:
- 4094 available bytes free
- 64 colors
- 1 "SIDlike" audio channel
- 127 character re-programmable character set
- plot, line, and box graphics commands
- I/O access commands
- 95+ BASIC Commands, operators, and functions
- SD operating system
- Full screen editor (requires a microSD card.)
- Ability to execute non-basic binary programs
- Extended memory features (requires a 23K256 SRAM chip)
More details about the Pocket Mini Computer can be found on this Wiki.
Schematics and Souce Code are avaible for anyone who wants to "roll their own".
Step 3: CHIP-8
All about CHIP-8, the OS of the COSMAC VIP:
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. It was made to allow video games to be more easily.
Roughly twenty years after CHIP-8 was introduced, derived interpreters appeared for some models of graphing calculators (from the late 1980s onward, these handheld devices in many ways have more computing power than most mid-1970s microcomputers for hobbyists).
Today, we'll be running the CHIP-8 OS on our Propellerpowered Pocket Computer. A single propeller cog will act as the 1802 CPU, while another cog will act as the CDP1864 video display chip, while another will read our input from our own DIY 4x4 keypad.
Step 4: The COSMAC 4X4 Keyboard
A lot of the electronics hardware in the 70s had a DIY feel to it. The COSMAC VIP kit was no different.
This project simple wouldn't feel right without building your own 4x4 Keyboard for our PMC COSMAC VIP setup.
This project is also compatible with those cheap 4x4 Membrane Keypads you can get from almost everywhere, but I want to encourage your to build you own controller. It's a bit of soldering, but I've mapped it out completely, and it can be built with ease in an evening.
Step 5: DIY 4X4 Keypad: Required Parts
So, you are going to build your own 4x4 Keypad! Good for you!
Here's the parts you'll need:
1 - 5x7cm perf board
16 - tact switches
Some 1mm heatshink tubing
Some Hookup wire (AWG 22)
Find a quiet, well-lit place to work and let's dig in!
Step 6: DIY 4X4 Keypad: Step 1
Insert the 16 tact switches in 4 rows of 4 switches as shown in the image.
Note: Make sure the connection points for each switch is "up & down."
We'll be building this keypad upside down. The spacing should be "two holes" between each switch, and "1 hole" between each row.
(if you've never used "tact" switches before, have a look at image 2 to see how they work.)
Step 7: DIY 4X4 Keypad: Step 2
1) Once all the switches are installed, flip the board over (carefully!) and solder each of the switch contacts into the perf board.
2) Solder a wire down the one side of the all the switches as shown:
(The Image 2 diagram shows the placement of the switches as well as the connection points for the four wires.)
Step 8: DIY 4X4 Keypad: Step 3
1) Next solder a connection between each switch "across" the board. You want to use a small amount of heat shrink tubing (as shown) to make sure it doesn't contact the vertical wires we attached in Step 2.
(The Image 2 diagram shows these connections as black lines. Connect them to each of the "Red Dot" labeled switch positions.)
Step 9: DIY 4X4 Keypad: Step 4
1) Next connect four wires to each of the "White Dot" positions in the Image 2 diagram. I used wires with coating in this step to insure that they didn't touch any of the other connections. (Note the yellow, black, blue, and yellow wires.)
Note the PIN designations in the bottom of Image 2. These are important and will be referred to in the circuit itself.
Step 10: DIY 4X4 Keypad: Step 5
I'm going to give you some license in this step. You could simply plug the wires directly into a breadboard and jump to the circuit itself. I wanted a little cord so that it felt more like a game controller. I used a 12" piece of CAT5 Ethernet cable I had laying in my wire box. I terminated the wire with a simple PCB male jumper. (Image 2) My controller has some "reach" and it's breadboard friendly.
Step 11: The PCF8574A I2C Circuit
Time to build the circuit itself!
Grab your PCF8574A chip, a could 4.7k resistors and a small solderless breadboard.
This circuit will read the eight switch lines coming from our 4x4 keypad and translate them into two I2C channels easily connected to our Pocket Mini Computer. Remember those PIN designations I told you about a page or two ago?
1) Connect those wires to the P0-P7 connection points of the PCF8574 IC.
2) Add the two 4.7k resistors between SDA and 3.3v, & SCL and 3.3v.
3) Finally, make the SDA connection to P12, and the SCL connection to P13 of the Experimenter's port on the Propeller powered PMC.
(Step 3 assumes that you have either built your own DIY or "Kit" version of the Pocket Mini Computer.)
If you "cheated" and bought the 4x4 Membrane Keypad, I've included the connection points in the image below.
Additional: The PCF8574 and PCF8574A chips will work interchangeably with the project. You'll need to change the address $38 in the source-code to $20 if you use the PCF8574 chip instead of the PCF8574A I've used in this Instructable.
Step 12: Loading the CHIP-8 Software
- Download the CHIP-8_PMC.zip and extract it to an empty folder.
- Copy the contents of the folder Chip8SDHexKeypadVGA to your microSD card.
- Replace the microSD card and boot your Pocket Mini Computer.
- At the READY. prompt, type LOAD"C8LOAD.BAS" and RUN the program once loaded.
- Select your program by number and enjoy!
The keypad layout is shown as Image 2.
Step 13: Credits
This project simply wouldn't be possible without the MIT licensed contributions of several individuals.
John A. Williams: Who brought this project to my attention and created the PMC version of the CHIP-8 emulator. (I think John's trying to get my head out of the Commodore stuff. He's managed it this time. :) )
Andy Schenk: Creator of the original CHIP-8 emulator for the Propeller. It deserved a lot more time in the spot-light. I'm hoping this Instructable will do exactly that!
Kwabena W. Agyeman: Creator of the VGA64 6 Bits Per Pixel Engine which acts as the Video Display Processor in this project.
Andre' LaMothe: Creator of the SPI SRAM Driver used by the Pocket Mini Computer and this project.
Thanks to Chip Gracey for the Propeller chip!
This project has honestly given me a great respect for the computer kits of the 70s. I've even been working on a CHIP-8 assembler recently which should allow me to write CHIP-8 code on the Pocket Mini Computer. It's not done yet, but John, you've got me hooked!
Drop in the forums at Propellerpowered and tell us how you made out with your PMC version of the COSMAC VIP.