[Gameboy] Patch a game from MBC1 to MBC5 (Memory Bank Controllers)

  • Thread starter Thread starter Moneyforthecash
  • Start date Start date
  • Views Views 7,916
  • Replies Replies 6
  • Likes Likes 2

Moneyforthecash

Well-Known Member
Newcomer
Joined
Dec 9, 2018
Messages
50
Reaction score
34
Trophies
1
XP
705
Country
Austria
Hello, I need your help. I have some Roms on my flashcard which don't work. A simple workaround would be to change the MBC1 to MBC5.
Unfortunately I have no idea how this works.

Here are a few helpful links

Game list:
https://catskull.net/gb-rom-database/

An already existing topic where already diligently discussed and also some fixes were made available:
http://forums.nesdev.com/viewtopic.php?f=20&t=5804

Detailed explanation of the Memory Bank Controllers:
http://gbdev.gg8.se/wiki/articles/Memory_Bank_Controllers

Downloading Fixes:
https://thegaminguniverse.org/ninjagaiden4/mottzilla/smartcard.html

Fixes GameBoy ROMs internal Header Data:
https://github.com/elseyf/gbfix
 
Last edited by Moneyforthecash,
Basically, while the Game Boy only directly supports game cards with up to 32 kB of ROM (in red and grey) (plus optionally 8 kB of RAM, in green), all interactions between console and gamecard are ultimately (attempts to) read or write one of these areas, so clever people back in the NES days (if not earlier) thought of adding more electronics to allow sliding these 32+8K windows over larger capacities, usually by accepting writes to ROM addresses (that would normally do nothing) and interpreting them - and these are called mappers!

Since they're not part of the console itself, there can be a pretty much unlimited number of different mappers (although luckily for emulator/flashcard/replica developers, in practice less than 10 designs have been used, unlike the hundreds on the NES!)

So, remembering that the goal of a mapper is to make the right data accessible in the right address at the right time (for example with a "write 4 to 0x1000 to make 4*0x4000 accessible at 0x4000"), converting to a different mapper would mean finding all those actions and converting them to the appropriate new type (for example with a "write 8 to 0x23A1 to make 8*0x2000 accessible at 0x4000"), but a simple find/replace of the corresponding machine code is probably unsuitable, because not only a match could accidentally happen in non-program data (like graphics/audio/level design), but also because due to indirect addressing modes, you cannot look at a single memory access instruction and necessarily know where it's pointing at...
 
Since they're not part of the console itself, there can be a pretty much unlimited number of different mappers (although luckily for emulator/flashcard/replica developers, in practice less than 10 designs have been used, unlike the hundreds on the NES!

With the help of a real topic related expert I learned how to patch and hack the games correctly.

You were absolutely right. The number of values to change are completely different. Some games had a maximum of 5 values to change and others like Kid Icarus had a minimum of 50.

My DMG-01 now starts these games.
 
@Creeju
MBC Changing.png
 

Site & Scene News

Popular threads in this forum