Representing GTMP3 games in NES format

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
Posts: 1287
Joined: Thu May 19, 2005 11:30 am

Representing GTMP3 games in NES format

Post by NewRisingSun » Sat Feb 13, 2021 3:50 am

GTMP3 is an extension to GTROM that adds an SD card slot and a microcontroller to play .MP3 files at the command of the 6502 program. How shall these MP3 files be made available to emulators that run the respective games as NES 2.0 ROM files? I see two alternatives: internally and externally.

Internally would mean that all MP3 files that originally were on the SD card are included in chunks as NES 2.0 MIsc. ROM data. Each chunk header would include the size of the file as well as the directory and file numbers. Note that the GTMP3 specification does not permit arbitrary filenames, but essentially requires numbered filenames and directories, except for two hard-coded alphanumeric directory names, MP3 and ADVERT, which could be assigned special numbers. This internal approach would continue the iNES format tradition of having everything a game needs in a single file, with all the advantages that this brings. The disadvantage would be a very large .NES file, and that somebody would need to write a one-time utility that creates the chunked Misc. ROM data from the individual MP3 files.

Externally would mean that all MP3 files would be stored outside the .NES file, and the emulator would look for the GTMP3 directory structure in the .NES file's directory. This implies that you cannot have several GTMP3 .NES files in the same directory, or the GTMP3 directory names would need to have the .NES file's name as a prefix, or the .NES file plus GTMP3 directory structure would have to reside in an archive file. The advantage would be that the .NES file would be small, could be redistributed without the MP3 data if so desired, and may make it easier for the emulator to read the MP3 files as an input. It would expose the MP3 files to the user, which may be desirable or undesirable, and would also follow the precedent set by MSU1 on the SNES, whether that's a good thing or not.


Posts: 1306
Joined: Tue Oct 06, 2015 10:16 am

Re: Representing GTMP3 games in NES format

Post by calima » Sat Feb 13, 2021 11:15 am

Option C) I would put the mp3 structure in a zip, named like the rom but with the extension as gtmp3. The rom itself would not be in the zip. This preserves compatibility with existing emulators, leaving the mp3s as progressive enhancement. Also keeps it easy to make the distributable carts, just unpack the zip on the sd.

Posts: 22288
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)

Re: Representing GTMP3 games in NES format

Post by tepples » Sat Feb 13, 2021 6:16 pm

I'd go further with option C by require the zip to use the Store method, not Deflate, for two reasons:
1. MP3 is already compressed.
2. An MCU emulating GTMP3 may have enough grunt to decode the Zip directory and spoonfeed packets to a hardware MP3 decoder but not enough to decode Deflate.

Post Reply