Super Game Boy Hardware Corrupter

One of my favorite Twitch Streamers, Vinny Vinesauce, regularly hosts streams where he glitches videogames for comedic effect. This is often done in an emulator with special software, but I created a device that allows for deliberate, controlled glitches on the original Game Boy hardware. He used the device in one of his streams, click here for a link.

The device is based around the Super Game Boy (SGB), a Super Nintendo cartridge that allows gamers to play Game Boy games on their TVs. Interestingly, the cartridge actually contains all the CPU and RAM chips that a regular Game Boy has, which makes the innards functionally identical to the original system.

I hooked the VRAM address and data bus, the WRAM address and data bus, and the Cartridge address and data bus up to an arduino with the help of some shift registers. In order to induce a glitch, one of the lines is pulled low, thereby changing the data or address being sent through the system.

I was met with interesting timing challenges during this project. If any of the lines are pulled low for more than one or two cycles in the SGB, it resulted in a hard crash instead of a glitch. The SGB runs at about 4Mhz, while the Arduino runs at a firm 16Mhz. I thought that as long as I kept my code efficient enough, the Arduino would certainly execute my code fast enough to quickly pull a line low for a single SGB cycle. In practice though, this was not the case. I learned that the Arduino’s digitalWrite() functions actually took around 50 cycles to complete, leaving the SGB lines pulled low for around 13 cycles no matter how efficient my code was. In order to solve this problem, I had to write some basic assembly instead of using the stock Arduino functions. With this improvement, I was able to get enough granularity to keep lines pulled low for a single SGB cycle.

If you have any questions about the corrupter, I’d love to answer them. I’m on Discord at grant#3970

Video of the Corrupter

GitHub and Manual

Photos of the device in progress and completed