Super Smash Brothers for Wii U Masterpieces
I spent today trying to figure out how to extract the Masterpieces from Smash for Wii U. It contains a larger & different selection than what's available in Brawl. From what I can tell, the full games are included in Smash, not just demos (same as Brawl). I took all day to figure out how to do it, but I think I came up with a process for each type of ROM. Not sure if there are already tools available for the things I did by hand. I wanted to write this out in case it helped someone, and maybe if someone checks behind me we can add it to the wiki.
The ROMs are split up into 3 platforms: Gameboy, NES, and SNES. Each one has different instructions you need to follow before the ROMs will actually run in an emulator.
Initial Setup:
Acquire the various tools you'll need:
- A dump of your copy of SSB4. I used these instructions from the CEMU Guide.
- Sm4shExplorer: for extracting files from your SSB4 dump
- vcromclaim's snesrestore.py script if you're planning on extracting the SNES games
- This script from einstein95 if you're planning on extracting Mario: the Lost Levels
- Any hex editor. I used HxD but that's just because it's what I'm used to.
Getting the initial ROM files
- Follow the instructions of Sm4shExplorer to load your SSB4 dump.
- Extract the following folders:
data/soft/gb/rom(Gameboy ROMs)data/soft/hvc/rom(NES & Famicom ROMs)data/soft/shvc/rom(SNES ROMs)
Extracting Gameboy Games
These are super simple, you can just rename the files. They should be playable in an emulator out of the box. I've only tested in mGBA, but I assume they work elsewhere.
DMGVU.bin→ Dr. MarioDMGKY.bin→ Kirby's Dream Land
Extracting NES Games
These ROMs seem to have an extra header in them, as well as a lot of trailing bytes in some cases. I simply removed the extra bytes with a hex editor... not sure if there's a more correct solution. Also, in most of the ROMs, the iNES header start characters weren't terminated correctly. So I had to manually fix that. This should be easy to do with a script, I just haven't had the energy to write one.
The steps I followed to correct each ROM were:
General case:
This applies to the following ROM files:
FAA.bin → Donkey Kong
FAG.bin → Super Mario Bros.
FAK.bin → The Legend of Zelda
FAX.bin → Pac Man
FA7.bin → Yoshi
FA8.bin → Kirby's Adventure
FBD.bin → Kid Icarus
FBI.bin → Punch Out
FBZ.bin → Metroid
FCP.bin → Balloon Fight
FCV.bin → Wrecking Crew
- Open the
.binfile in your hex editor. - Search for the beginning of the iNES header. This starts with the characters
NES. - Erase all bytes before the byte that
NESis found on. This should be 48 bytes. - Check the new 4th byte of the file (this should be the byte after the "S" in "NES"). Ensure this byte is
0x1A. If it's not, update it. - At the bottom of the file, remove the last 32 bytes of the file. In most of these files, this is a line that begins with
<and a line that is all 0s. - Your ROM should now run in an NES emulator
More complicated cases:
These ROMs required cutting off more bytes at the end of the file. The instructions are largely the same, however.
- Open the
.binfile in your hex editor. - Search for the beginning of the iNES header. This starts with the characters
NES. - Erase all bytes before the byte that
NESis found on. This should be 48 bytes. - Check the new 4th byte of the file (this should be the byte after the "S" in "NES"). Ensure this byte is
0x1A. If it's not, update it. - Now, depending on the file, erase the rest of the file starting from a particular position:
FA9.bin→ Zelda II: Erase from byte 0x40040 to end of the fileFDN.bin→ Mega Man II: Erase from byte 0x40010 to end of the file
Most complicated:
Mario: The Lost Levels is a Famicom Game, so it is formatted differently and requires some special treatment. This ROM is FB2.bin
- Find the string
NINTENDO-HVC. Keep the 1 byte before this string, but then delete every byte before that. This should be 48 bytes, just like with the other NES games. - Erase from byte 0x10000 to the end of the file.
- The ROM is in a qd format. For most emulators, you'll need an fds format. You can use this script from einstein95 to convert it to a playable fds ROM.
Extracting SNES Games
These ROMs have PCM audio basically appended to the bottom of the ROMs. We need to remove the extra header information present in these ROMs (similar to the NES ROMs), then extract the PCM audio, and splice it into the ROM to have it be usable with sound.
- Erase the first 48 bytes of the file.
- Navigate to the end of the ROM, before the PCM audio section. This is different based on the ROM:
JAA.bin→ Super Mario WorldJAC.bin→ F-ZeroJCV.bin→ PilotwingsJCW.bin→ Super Mario Kart These ROMs end at byte 0x7FFFF. The PCM audio starts on byte 0x800000JAV.bin→ Super MetroidJBM.bin→ Earthbound These ROMs end at byte 0x2FFFFF. The PCM audio starts on byte x300000JCC.bin→ Kirby Super Star The ROM ends at byte 0x3FFFFF. The PCM audio starts on byte 0x400000
- Select all of the bytes in the PCM section (from the start byte to the end of the
.binfile). Cut this out of the.binfile, and paste it into a new binary file (doesn't matter what it's called, e.g. I called them JCC.pcm, JBM.pcm, etc.). - Your modified
.binfile is now your ROM file. Use [vcromclaim'ssnesrestore.pyscript](https://github.com/Plombo/vcromclaim/blob/master/snesrestore.py to merge the PCM audio into the ROM file. - The end result of
snesresstore.pyshould be playable in an emulator.
Caveats
Since I went through this today, I only tested the ROMs in 2 emulators: mGBA & Mesen. Each test only consisted of me playing a short part of the intro sequence, so there could be some major issues I haven't run into. But for me everything seems to work! Hopefully soon I get the energy to write some scripts for the things I'm doing manually here.
@bhmurphy when trying to use the snesrestore script. At first it gave me an error but, I found the solution: downloading vcromclaim's brrencode3.py script for snesrestore.py to work if not, it wont work.
Thank you for the detailed instructions!
~I've had some issues with SNES games that resulted in ROMs that wouldn't boot in an emulator. Cutting out the first 30 bytes instead of the first 48 bytes worked for the games I've tested (Pilotwings and Super Metroid). I'm using a PAL copy of Smash Wii U, but I don't think the extracted SNES ROMs are PAL versions. I can post SHA-1s for the Masterpieces files if required.~
Edit: This also seems to work with the SNES ROMs included in amiibo Touch & Play.