wait a minute, that utility is smb utility international. what did he even do to it that he's calling it his own? and why is it coming with a patch to apply a trainer to the rom? wtf? the original doesn't.
you should probably stay away from this thing if it's adding a trainer to the rom. it looks like it is to me, but i might be mistaken.
Dr. Floppy is confused. Are trainers the same things as headers; i.e. those little 16-byte lines at the beginning of NES ROM's which tell the emulator what to expect from the file in question, but are otherwise ignored by the ROM itself?
No. The header is $10 bytes and tells things like PRG/CHR sizes, mirroring mode, mapper used, etc, etc. This tells the emulator the layout of the board it needs to emulate. It's sort of like a software representation of what hardware the game uses.
Trainers are an additional $200 bytes that follow the header. Traditionally it's placed at $7000-71FF in addressing space -- although more accurate emulators will either put SRAM at that address or leave it open bus if there's no on-cartridge RAM.
Trainers, unlike headers, do not represent anything on the cartridge. They don't exist in any commercial game (or any game that is functional on an actual cartridge) for the simple reason that a trainer doesn't exist anywhere on the hardware. It's not part of PRG or CHR-ROM, and there's no seperate chip for it on a cartridge board.
Trainers were originally used by FFE copiers (I think, anyway). FFE copiers were kind of like the Super Wildcard DX for the SNES -- they would let the user play ROMs on their famicom. The thing is, rather than actually emulate all the dozens of mappers that games use, the FFE had it's own "custom" mappers that games were hacked to use. Since mapper hacks often involve additional code, the FFE copiers had an additional $200 bytes of "trainer" space that could be used for such mapper hacks.
Back in the day, some games only had the dump of the hacked FFE version available, so early emulators like NESticle, iNES, etc had to emulate the FFE mappers and put in the trainer to get those games to work. Nowadays... the proper, unaltered ROMs have been dumped, so there's no longer any need to emulate any FFE mapper numbers, and no longer any need for trainers.
No games actually use FFE mappers -- they're sort of fake mapper numbers. If you look through the GoodNES set, you'll find that the only games to use FFE mapper numbers (6, 8, 12, 17, etc) are games that have been hacked to do so -- and the good dumps of those games all use a different mapper.
Dr. Floppy has received reports that his recent hacks only work on certain emulators, and he very much wants to avoid this event in the future...
Ideally, test your game on the real hardware if you can (PowerPak is good for most things). If that's not an option, test it on as many emulators as you can. Ones you really want it to work on are NEStopia and Nintendulator. If it fails on either of those, odds are there's a serious bug somewhere. Don't bother with older emulators like NESten, NESticle, fwNES, NNNJ, as their emulation isn't exactly what I'd call accurate. I wouldn't rely on FCEU either -- it's debugger is nice for sure, but don't use it as a final word on emulation accuracy... it's really starting to show its age.
And pretty much.. just follow a few simple rules:
1) don't use trainers
2) keep your PRG/CHR sizes a power of 2
3) if you're using a mapper that has bus conflicts, be mindful of them.
4) don't assume the contents of any register on startup.