Bucket Mouse
Active member
NES games are Mapper 30. There are good and bad sides to this. The good is that Mapper 30 supports animated background tiles and Flash saving wherever possible. The bad is that Mapper 30 was developed by the hobby market and isn't supported by every emulator. Finding a browser emulator that will play a Mapper 30 game, for example, is pretty hard. Also, the Flash saving isn't supported everywhere either. It's designed for physical carts that use Flash memory, and doesn't work properly on some emulators or the Everdrive.
But there is a way to convert your game to a more common mapper: Mapper 2. This conversion will ensure 100% compatibility with anything that can play an NES game. You will lose the benefits of Mapper 30 though (no Flash saving, no animated background tiles....the tiles will simply not move).
I'm making this topic because I found out recently a Mapper 2 conversion has two steps, and most people aren't aware of the second one. The first step is to load the game ROM in Mesen, open the Debugger, and pick the "Tools" menu inside there. Select "Edit iNES Header" and simply change "30" to "2," then hit Save As.
The Mapper 2 conversion works on most emulators by just doing this, but Step 2 is kind of an important step. If an improperly converted Mapper 2 game is played on an original NES, it could create something called a "bus conflict" when switching banks. It's not a good thing:
Bus conflict - NESdev Wiki
To prevent this possiblity, the script that switches banks must be revised a bit. Look in your Subroutines folder for doBankswitchY.asm. It looks like this:
Get rid of that and replace it with this:
Now your ROM is 100% Mapper 2 compatible, and will cause no issues with a real NES (or with FCEUX, which also locks up). This change is also compatible with Mapper 30.
But there is a way to convert your game to a more common mapper: Mapper 2. This conversion will ensure 100% compatibility with anything that can play an NES game. You will lose the benefits of Mapper 30 though (no Flash saving, no animated background tiles....the tiles will simply not move).
I'm making this topic because I found out recently a Mapper 2 conversion has two steps, and most people aren't aware of the second one. The first step is to load the game ROM in Mesen, open the Debugger, and pick the "Tools" menu inside there. Select "Edit iNES Header" and simply change "30" to "2," then hit Save As.
The Mapper 2 conversion works on most emulators by just doing this, but Step 2 is kind of an important step. If an improperly converted Mapper 2 game is played on an original NES, it could create something called a "bus conflict" when switching banks. It's not a good thing:
Bus conflict - NESdev Wiki
To prevent this possiblity, the script that switches banks must be revised a bit. Look in your Subroutines folder for doBankswitchY.asm. It looks like this:
Code:
doBankswitchY:
STA currentBank
bankswitchNoSave:
AND #%00011111
ORA chrRamBank
STA $c000
RTS
Get rid of that and replace it with this:
Code:
doBankswitchY:
bankswitchNoSave:
STA currentBank
TXA
PHA
LDA currentBank
TAX
STA bankBytes,x
PLA
TAX
RTS
bankBytes:
.db $00, $01, $02, $03, $04, $05, $06, $07, $08, $09, $0A, $0B, $0C, $0D, $0E, $0F, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $1A, $1B, $1C, $1D, $1E, $1F
Now your ROM is 100% Mapper 2 compatible, and will cause no issues with a real NES (or with FCEUX, which also locks up). This change is also compatible with Mapper 30.