A stack for 16-bit addresses, which is used to call subroutines/functions and return from them.One 16-bit index register called “I” which is used to point at locations in memory.A program counter, often called just “PC”, which points at the current instruction in memory.Display: 64 x 32 pixels (or 128 x 64 for SUPER-CHIP) monochrome, ie.Memory: CHIP-8 has direct access to up to 4 kilobytes of RAM.Many graphical libraries can do this for you, or you can use something like SDL directly. You will also need a way to draw graphics to the screen, and read keypresses.
CHIP-8 programs are binary files, and your emulator will need to read these files and operate on the bytes. You will also need to have a basic understanding of the binary and hexadecimal number systems I will write hexadecimal numbers like this: B3. You should already know some programming before making an emulator, in my opinion, or you’ll have a rough time. This is a CHIP-8 tutorial, not a programming tutorial. Bauer, who made the DREAM 6800 computer and its CHIP-8 interpreter in 1978, invented the following backronym for CHIP-8: Compact Hexadecimal Interpretive Programming – 8-bit. I’ll clear those up for you along the way. With so many different implementations over several decades, there are many inconsistent specifications. However, in 1990 it had a renaissance on the HP48 graphing calculators with CHIP-48 and the now-famous SUPER-CHIP extension with higher resolution. By 1984 the support for CHIP-8 petered out. Instead of using machine language for the VIP’s CDP1802 processor, you could type in simple hexadecimal instructions (with the VIP’s hex keypad) that resembled machine code, but which was actually interpreted on the fly by a small program.ĬHIP-8 soon spread to other computers, like the Finnish Telmac 1800, the Australian DREAM 6800, ETI-660 and MicroBee, and the Canadian ACE VDU. It was intended as a simpler way to make small programs and games for the computer. If you have any suggestions for this guide, or just want to show off an emulator you’ve made, please leave a comment at the end of the page! HistoryĬHIP-8 was created by RCA engineer Joe Weisbecker in 1977 for the COSMAC VIP microcomputer. To be pedantic, you’re writing a CHIP-8 interpreter. An emulator emulates physical hardware in software, but CHIP-8 isn’t a piece of hardware. Like this one:Įveryone calls them “CHIP-8 emulators”, but they’re not actually emulators. It will explain what each part should do, and use some pseudocode at times, but the actual implementation will be up to you.Īlong the way I’ll put tips in green boxes, warnings in orange boxes (things to look out for), and trivia (mostly historical) in blue boxes.
CHIP8 JAVASCRIPT EMULATOR HOW TO
It will tell you how to make a CHIP-8 emulator, but it won’t give away the code.
But how do you do that? Why are there so many different specifications? Make a CHIP-8 emulator for an obscure systemĪ high-level guide to making a CHIP-8 emulator.ĭo you want to get into emulator development? A common advice is to start out with CHIP-8.