Concerning Trainer...

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
Rid
Posts: 66
Joined: Sun May 10, 2009 4:06 am

Concerning Trainer...

Post by Rid »

Making an iNES analyser, I saw that there was a bit for indicating the presence of a "trainer" : a 512 byte long area located at the beginning of a rom file.

But what exactly is a trainer, and most over all what is its utility?
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku »

It's 512 bytes of code preloaded at $7000 (in cartridge RAM) before the game starts. The code is used to emulate mappers via software, thus all ROMs using them are hacked.
User avatar
Rid
Posts: 66
Joined: Sun May 10, 2009 4:06 am

Post by Rid »

Ok

Does this is used by hackers because it's hard, and expensive to find and install mapper chips on boards?
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

It's also used for the "Swim Cheat" version of Super Mario Bros, a hacked rom where you press Select to make mario swim.
It's basically a way to do a tiny rom expansion for games without needing to hack them, but to actually use such a thing on hardware requires the cartridge WRAM to be preloaded with the trainer. So games with a trainer are always games which don't natively have cartridge WRAM.
So the trainer is for specialized copiers or emulators only.

It's not really about "emulating a mapper", it's about hacking the bankswitching code to call WRAM code instead.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku »

It was used by Famicom pirates in the 80s to sell games that otherwise wouldn't work on their hardware.
Dwedit wrote:It's not really about "emulating a mapper", it's about hacking the bankswitching code to call WRAM code instead.
Well that WRAM code processes the input into discrete writes for the copier hardware and will dump kilobytes of PRG ROM out $2007 to run CHR bankswitched games on CHR-RAM.

Most games with WRAM can still have trainers, of course it's more work to move things, but it happens.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

User avatar
Rid
Posts: 66
Joined: Sun May 10, 2009 4:06 am

Post by Rid »

Ok, thank for all of you :D
User avatar
MottZilla
Posts: 2835
Joined: Wed Dec 06, 2006 8:18 pm

Post by MottZilla »

kyuusaku wrote: Most games with WRAM can still have trainers, of course it's more work to move things, but it happens.
Also it is important to note that games with WRAM don't always have 8KB of it, some just have 2KB. I think Gradius 2 is one of them and I have seen versions of it floating around with a trainer for a MMC3 hack that makes it run although not very well.
Post Reply