Chipception
A CHIP-8 and SUPER-CHIP interpreter written in XO-CHIP. Because CHIP-8 interpreters have been written in every programming language and the platform also deserves one written in CHIP-8 itself! ๐
Install / Use
/learn @Timendus/ChipceptionREADME
Chipception

A CHIP-8 and SUPER-CHIP interpreter written in XO-CHIP. My submission to Octojam 10. Because CHIP-8 interpreters have been written in every programming language and the platform also deserves one written in CHIP-8 itself! ๐
- This program on Itch.io
- Run Chipception in your browser
- Download the ROM
- Chipception was featured on the OctoJam 10 Showcase (YouTube)
How to use Chipception
Chipception will provide you with a menu (known as the launcher app) from which you can select ROMs to run. You can run at most six ROMs in parallel. Note that the launcher app itself counts as a ROM.
The launcher app will properly start ROMs in either CHIP-8 or SUPER-CHIP mode, and with the correct quirks. You can not change those settings interactively.

These are the keys that control the launcher:
| CHIP-8 key | Qwerty key | Function |
| ---------- | -------------- | -------------------------------------- |
| 5 | W or โ | Go up one ROM in the launcher app |
| 8 | S or โ | Go down one ROM in the launcher app |
| 6 | E or space | Start selected ROM in the launcher app |
The CHIP-8 key A (or Z on a querty keyboard) acts as a global modifier key,
like a ctrl or alt key on a computer. It can be used from anywhere to send
these commands to Chipception:
| CHIP-8 keys | Qwerty keys | Function |
| ----------- | ----------- | -------------------------------------- |
| A + 1 | Z + 1 | Cycle through windows ("Alt-Tab") |
| A + B | Z + C | <ins>C</ins>lose focussed interpreter |
| A + D | Z + R | <ins>R</ins>eset focussed interpreter |
| A + 5 | Z + W | Move focussed <ins>w</ins>indow around |
| A + E | Z + F | <ins>F</ins>ullscreen the window |
| A + 8 | Z + S | <ins>S</ins>tart the launcher app |
When you are moving a window, these are the relevant keys:
| CHIP-8 key | Qwerty key | Function |
| ---------- | -----------| --------------------------- |
| 5 | W or โ | Move window up |
| 8 | S or โ | Move window down |
| 7 | A or โ | Move window left |
| 9 | D or โ | Move window right |
| A | Z | Return to normal execution |
The concept

Chipception is a lot of things. It's primarily just a dumb idea and a bit of a joke to write a CHIP-8 interpreter in CHIP-8. But it's also an experiment to start figuring out what an "operating system" for CHIP-8 could look like.
Can we do multitasking? Can we have inter-process communication? How do we do window management? How do you control the "OS" with only a 16-key keypad? What kind of paradigms from PCs, mobile phones or PDAs make sense for CHIP-8?
I'm not sure if I'm done with this experiment yet, but right now it's just a cool talking piece for Octojam 10. And, with it running at 200.000+ instructions per frame, yet another ROM to stress-test people's interpreters ๐
See also
If you like this, you may also enjoy my other CHIP-8 projects:
- 3D Viper Maze (XO-CHIP, Octojam 7) and 3D VIP'r Maze (original CHIP-8)
- Alien Inv8sion (XO-CHIP with "secret 16-colour mode", Octojam 8)
- Bad Apple!! (XO-CHIP, Octojam 9)
If you are a CHIP-8 emulator / interpreter developer, you may be interested in these projects:
- CHIP-8 test suite - A test suite to find all kinds of issues in your interpreter
- CHIP-8 Binary Format - An effort to standardise on a file format for CHIP-8 and friends
- CHIP-8 database - A repository with metadata for CHIP-8 ROMs
Development log
Wait but why..?
I've been thinking about writing a CHIP-8 interpreter in CHIP-8 for almost two years or so. It's just such an insane idea that I can't help but find myself attracted to it.
To be clear: there is absolutely no benefit to just having a CHIP-8 interpreter written in CHIP-8. It would only allow you to run the exact same programs, but slower and probably with more unexpected bugs. Also, it's quite the engineering challenge to make it actually work. So it's a significant investment of time that brings absolutely no tangible benefit. Sounds like my kind of project! ๐
However, thinking about this a bit longer, there are a few cool things we could do with such an interpreter. One is adaptation: it could act as a mediator between programs and interpreters that don't play nice otherwise, without modifying the original program or the interpreter running it. A CHIP-8 program that relies on a version of CHIP-8 (or one with specific quirks) that you don't support in your interpreter could be wrapped in a CHIP-8 CHIP-8 interpreter, and run just fine in your interpreter.
Another kinda cool thing that I wanted to experiment with is multithreaded CHIP-8. A CHIP-8 interpreter written in CHIP-8 could theoretically run multiple CHIP-8 programs in parallel on a single host interpreter. This has no real benefit, but it would be something cool to play with. It also touches on another itch that I have had for a while and that kinda needed scratching: writing an operating system for CHIP-8.
Last Octojam sysl made a program that was a mock-up of a CHIP-8 PDA operating system, that they called BIM. It makes sense for them to model a "CHIP-8 OS" on a PDA-type device, since you can't really "download" or "install" new programs into a running CHIP-8 interpreter. PDAs used to come with a fixed set of "applications" like a calendar or a calculator that were just baked into the ROM of the device, each just running directly on the hardware and taking over full control of the CPU.
However, when I dream about a "CHIP-8 OS", I think about something that resembles the early Unixes, that can run programs in "user mode", with a "kernel" that can do "scheduling" or kill misbehaving programs and maybe some way for programs to communicate with each other.
So maybe, just maybe, starting with a CHIP-8 interpreter in CHIP-8 is the first step on the journey towards a true CHIP-8 operating system. One that runs CHIP-8 programs, that you can switch between or run in parallel. Maybe a few custom opcodes could allow for the program to communicate with the host OS or other programs?
So I drew this image of a four colour XO-CHIP program running a "desktop" GUI with two CHIP-8 programs running in parallel to inspire myself:

Alright, enough rationalizing an irrational project and having crazy pipe dreams about its potential, let's get to coding ๐
Getting started
I came up with the project name "Chipception", short for "CHIP-8 Inception", and got to work.
So what are we up against?
Writing a CHIP-8 interpreter isn't too hard. This will be the fourth time I write one. But writing one in a language that is also the target language brings both a couple of challenges and a couple of shortcuts.
The good news is that many opcodes can just be passed on to the host interpreter as-is. To AND two registers, we just ask the host to AND two registers. Save the result, save the flag register, and we're done (if we're just ignoring quirks).
The bad news is that we will actually need all the registers that CHIP-8 provides us with for running the interpreter. So every opcode will need to operate on virtual registers in memory, adding quite a lot of overhead.
Next to that, it's super hard to predict how a CHIP-8 program will use RAM. So we can't gracefully "share" the 4K of memory space, without a crazy amount of overhead. Our interpreter would have to keep track of which parts of RAM are being written to and do some kind of memory management. But even then: many of the worth while ROMs for CHIP-8 are 80+ percent of the available storage. In those cases there's just not enough space to add the interpreter at all.
Also; there's this little thing called self-modifying code, where a CHIP-8 program modifies itself to achieve some goal. For some programs, this trick may depend on the fact that a reset of the program loads in a fresh new version of the ROM. So this means that to do it right and be a proper interpreter, we have to make a copy of the ROM before we start execution.
Because of these memory requirements and the CPU overhead I very soon had to accept the fact that this was going to be an XO-CHIP project. And that it will only interpret systems that require less memory than XO-CHIP, like CHIP-8 and SUPER-CHIP.
Getting things going!
The first version of this program came together in a little over one evening: initialize virtual registers, fetch an opcode, branch correctly on the opcode, proxy all the CHIP-8 instructions to operate on the virtual registers. I also added in a few quirks for good measure and my CHIP-8 CHIP-8 interpreter was running and passing most of the available tests.
The [quirks test](
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot ๅฏๅชไฝๆถๅ่ฝๅใไฝฟ็จ <qqmedia> ๆ ็ญพ๏ผ็ณป็ปๆ นๆฎๆไปถๆฉๅฑๅ่ชๅจ่ฏๅซ็ฑปๅ๏ผๅพ็/่ฏญ้ณ/่ง้ข/ๆไปถ๏ผใ
