Skip to content

Stupid feature: official Nintendo header/footer support #419

Description

@vaguerant

Feel free to close on sight.

I don't know how consistent Nintendo has been with their format for NES ROM headers (e.g. on Wii they used classic iNES headers but later platforms have not), but is it worth supporting any of these, even just to the extent of recognizing that there is one, skipping over it and trying to match the ROM to the database instead?

As an example, I have the eShop game NES Remix on Wii U, which is a collection of minigames challenges based around a NES emulator. The ROMs are relatively easy to access, assuming you have a modified console. Taking a look at them, I can see that they're pretty normal.

Dr. Mario

The first game I tested with was F_DOCTORJ.bin, which header/footer aside is byte-for-byte identical to Dr. Mario (Japan, USA) (Rev 1).nes from No-Intro.

Here is the header for that file:

00 00 00 00 60 00 01 00 30 00 00 00 40 00 01 00
60 00 01 00 00 00 00 00 4B 00 01 00 4B 00 01 00
57 55 50 2D 46 41 41 4A 00 00 00 00 00 00 00 00  // WUP-FAAJ
4E 45 53 00 02 04 12 00 00 00 00 00 00 00 00 00  // NES

WUP-FAAJ is the internal title ID for the Japanese Virtual Console eShop version of Super Mario Bros.--that's not a typo, Dr. Mario's title ID is WUP-FB5J and that is not what's in the header. Dr. Mario was not released on Virtual Console until several months after the release of NES Remix, so it's likely it did not have a final title ID at this point, so they reused an existing one.

At the end of the file is a footer:

3C 00 00 00 00 00 12 00 E8 03 02 09 00 00 00 01
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Super Mario Bros.

I know this is a bit confusing, but the next ROM I looked at was WUP-FAAJ.bin. This is actually Super Mario Bros., unlike Dr. Mario which just uses its title ID in the header. ROM matches Super Mario Bros. (World).nes from No-Intro.

Header:

00 00 00 00 60 A0 00 00 30 00 00 00 40 A0 00 00
60 A0 00 00 00 00 00 00 4B A0 00 00 4B A0 00 00
57 55 50 2D 46 41 41 4A 00 00 00 00 00 00 00 00  // WUP-FAAJ
4E 45 53 00 02 01 01 00 00 00 00 00 00 00 00 00  // NES

Footer:

3C 00 00 00 00 00 01 00 25 00 02 09 00 00 00 01
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

The Legend of Zelda

One more, WUP-FBAE.bin. I can go through all of them if you want more data-points to determine the meaning of the header/footer bytes, but for now you're getting three.

Header:

00 00 00 00 60 00 02 00 30 00 00 00 40 00 02 00
60 00 02 00 00 00 00 00 4B 00 02 00 4B 00 02 00
57 55 50 2D 46 41 38 45 00 00 00 00 00 00 00 00  // WUP-FA8E
4E 45 53 00 08 00 12 00 00 00 00 00 00 00 00 00  // NES

Oddly, while the filename is correct (FBAE is the title ID for Zelda on Virtual Console), the header does not match. WUP-FA8E is actually Metroid. ROM matches Legend of Zelda, The (USA).nes in No-Intro.

Footer:

3C 01 00 01 00 00 12 00 9F 00 02 09 00 00 00 01
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Cards on the table, I'm interested in this because the RetroArch port of Nestopia UE on the Wii U supports reading the proprietary Wii U file system, which means it's entirely possible to navigate through the title folders and see a bunch of NES ROMs just sitting there in this annoying format that you can't use. 100% of my enthusiasm for this idea comes from the fact that I think it would just be funny to play your legitimately purchased NES ROMs, unmodified, directly from the media where they are stored, on the console where you bought them. I have no better reason why you should support this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions