RED-Project icon indicating copy to clipboard operation
RED-Project copied to clipboard

Super Smash Brothers for Wii U Masterpieces

Open bhmurphy opened this issue 7 months ago • 2 comments

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:

Getting the initial ROM files

  1. Follow the instructions of Sm4shExplorer to load your SSB4 dump.
  2. 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. Mario
  • DMGKY.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

  1. Open the .bin file in your hex editor.
  2. Search for the beginning of the iNES header. This starts with the characters NES.
  3. Erase all bytes before the byte that NES is found on. This should be 48 bytes.
  4. 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.
  5. 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.
  6. 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.

  1. Open the .bin file in your hex editor.
  2. Search for the beginning of the iNES header. This starts with the characters NES.
  3. Erase all bytes before the byte that NES is found on. This should be 48 bytes.
  4. 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.
  5. 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 file
    • FDN.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

  1. 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.
  2. Erase from byte 0x10000 to the end of the file.
  3. 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.

  1. Erase the first 48 bytes of the file.
  2. Navigate to the end of the ROM, before the PCM audio section. This is different based on the ROM:
    • JAA.bin → Super Mario World
    • JAC.bin → F-Zero
    • JCV.bin → Pilotwings
    • JCW.bin → Super Mario Kart These ROMs end at byte 0x7FFFF. The PCM audio starts on byte 0x800000
    • JAV.bin → Super Metroid
    • JBM.bin → Earthbound These ROMs end at byte 0x2FFFFF. The PCM audio starts on byte x300000
    • JCC.bin → Kirby Super Star The ROM ends at byte 0x3FFFFF. The PCM audio starts on byte 0x400000
  3. Select all of the bytes in the PCM section (from the start byte to the end of the .bin file). Cut this out of the .bin file, 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.).
  4. Your modified .bin file is now your ROM file. Use [vcromclaim's snesrestore.py script](https://github.com/Plombo/vcromclaim/blob/master/snesrestore.py to merge the PCM audio into the ROM file.
  5. The end result of snesresstore.py should 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 avatar May 25 '25 02:05 bhmurphy

@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.

Martualt avatar Jun 04 '25 19:06 Martualt

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.

RealRelativeEase avatar Jun 09 '25 15:06 RealRelativeEase