Taking apart the Shantae Switch Port

The game Shantae, originally a title for the Gameboy Color, was released just a short while ago. Modern Vintage Gamer (alias MVG) was involved in the development in the port, and made a great video about the whole project which you can find here.

As an emulator developer myself, the idea of writing an Emulator for a commercial game release was immensely interesting to me, and the fact that it was a Gameboy Emulator, a system I already had a lot of experience with, intrigued me even more. So, as I had recently gotten into modding Switch games, I decided to take a deeper look at the game files of the port.

Upon getting my hands on the game files, thanks to my modded Switch, I proceeded to extract the RomFS section of the game, which usually contains game assets and general files. However, it looked like I had already hit the jackpot:

ROMFS Dump of the Shantae Port

First a quick look in the assets folder. Here we can find a ton of .png files making up the Interface of the game. This is also where sound effects, music and even the opening WayForward splash animation can be found (and replaced, for a more “customized” experience with the game, which is exactly what I did. More on those changes later, though.)

The next thing I had to check out were the .bin files. The file size of 4.096 KB already looked suspiciously Gameboy-ROM-y and, to nobody’s surprise, these files are actually the ROM files the game emulates, as seen in the following footage (recorded from the Emulicious Gameboy Emulator):

Footage of the Switch Port ROM running on a Gameboy Emulator

Notice the distinctive lack of a Capcom logo in the intro, as well as the “Press +” label replacing the “Press Start” label - this is the Switch Port version of the ROM. ShantaeB3ae.bin is the ROM for the Gameboy Color version, while game2.bin is the GBA-Enhanced edition.

An amusing note about the GBA-Enhanced ROM: While the ROM was changed in order to fit the Switch (as explained in MVG’s video linked above), the checksum field in the ROM header remained untouched. The Gameboy uses this checksum field as a sort of primitive copy protection, so if the value doesn’t match up with the rest of the ROM, the Gameboy locks up entirely on the “Gameboy” logo screen. This is exactly what happens with the GBA-Enhanced ROM.

The last and, to be quite honest, least interesting looking file was titled gamedef.xml. However, after opening it up, that file became easily the most interesting out of all of them. Take a look for yourself:

An excerpt of the gamedef.xml file contained in the Shantae game files.

The structure of this XML file suggests that something by the name of Carbon is running in the background of the Shantae Switch port. And reading through the comments, which I’m guessing were originally intended as documentation for the developers, actually reveals an immense amount of information about this Codename Carbon project. Here’s a list of things that can be gathered from the screenshot above (for those who are unfamiliar with XML and what any of this means):

  • Carbon is intended to be a multi-platform Emulator, meaning that it’s supposed to be able to play games of multiple different consoles.
  • The Main Menu of the Shantae Switch Port is dynamically generated using Carbon, making the creation of ports of other games using Carbon as an engine as simple as plug-and-play.
  • The Documentation suggests that Gameboy, Gameboy Color and Gameboy Advance games should be playable, however, the Shantae-version of Carbon only properly supports Gameboy Color games. (Attempting to configure Carbon to run any other console simply crashes the game)
  • Emulation of NES games is mentioned as “a placeholder”, suggesting that an NES emulator core for Carbon is also in the works.

This is big news, especially after some recent and some not-so-recent rumors about Gameboy games coming to the Nintendo Switch Online package. But now to ask the real question: is it a coincidence that Limited Run Games, the company who was part of the development of the Shantae Port, is currently hiring a Programmer with a strong understanding of emulation concepts? I doubt it is, but only time will tell.

To finish off this post, I think it’s only fair to submit my own application for the Limited Run Games job. Here’s a clip of my fully original Pokémon Pinball Port, which I definitely didn’t just mod the Shantae game for:

Written on May 4, 2021