Bad Apple!! in XO-CHIP

This is an attempt to bring the well known Bad Apple!! music video to XO-CHIP, music and all. It's a collaboration between Kouzeru and myself for Octojam 9.


  • E or space plays and pauses the video
  • Q restarts the video
  • D or right arrow steps one frame at a time
  • If you're on mobile, tap the video once or twice to play / pause

The concept

In recent years the Bad Apple music video has been ported to many retro systems, becoming one of those Internet phenomena of which you stop asking "can it play Bad Apple?" and start asking "when will it play Bad Apple?".

For this year's Octojam I set out to make that happen for XO-CHIP, and I asked Kouzeru to support this project by writing a 1-bit arrangement of the Bad Apple music for his XO-Tracker, which he did in a stellar way!

But how much can you really fit in XO-CHIP's ~64k of memory? When I'm hand-writing code it seems like I never come near the limit. Would it be enough space to store an entire music video?

So this project quickly devolved into the question "can it play ALL of Bad Apple?" and me learning more about image and video compression and trying different techniques to try to achieve an impossible compression ratio while still being able to decode that mess using CHIP-8 instructions.

Run the program at the top of the page to see how far I got! ;)

Again, many thanks to Kouzeru for making this project possible!

The results

  • A binary in which I have tried my very best to fit as much of the Bad Apple video into XO-CHIP's memory as I can, at the best quality I could manage. This is the program that you see running at the top of this page.
  • Another binary in which I try to make the video look as good as possible, at a higher resolution and 30 FPS, with hardly any artefacts. The frames are compressed at about an 83% or sixfold compression rate, but the video is still only 16 seconds long. See this video play in your browser here.
  • The source code (GPLv3) and more background information in my development notes can be found on Github as always.
StatusIn development
Rated 5.0 out of 5 stars
(3 total ratings)
Tags8-Bit, Animation, bad-apple, Black and White, chip-8, movie, Retro, Touhou, video, xo-chip


bad-apple-high-quality.ch8 63 kB
bad-apple-long-runtime.ch8 59 kB


Log in with to leave a comment.


Imagine my surprise to see I wasn’t the only one to submit a Bad Apple to this Octojam!

This is fantastic. I especially love the music in your version!


Oh, I just replied here :P I am at least equally surprised right now! It feels like we would probably have gotten even further by working together :')