Expanding MBC2 ROM to 512kb

Discussion of programming and development for the original Game Boy and Game Boy Color.
Post Reply
Pennywise
Posts: 71
Joined: Tue Jul 14, 2009 11:04 am

Expanding MBC2 ROM to 512kb

Post by Pennywise »

I know technically the MBC2 can't support more than 256kb, but it's possible to expand NES games beyond their mapper limitations and still have them work on an emulator or a flashcart.

My question is if I expanded an MBC2 ROM to 512kb, could I access that additional 256kb of space. Would it work on a flashcart like the Everdrive? etc.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Expanding MBC2 ROM to 512kb

Post by lidnariq »

The physical MBC2 IC cannot support more than 256 KiB, but beyond that it really depends on just how anal-retentive the programmer for the emulator/PLD was.

You should be able to hack it to work on an MBC1+RAM or MBC5+RAM, anyway, since the MBC2 is approximately a subset.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: Expanding MBC2 ROM to 512kb

Post by MottZilla »

You probably could convert it to a different MBC. It may require some effort depending on how the game is programmed.
Pennywise
Posts: 71
Joined: Tue Jul 14, 2009 11:04 am

Re: Expanding MBC2 ROM to 512kb

Post by Pennywise »

Well, I changed some of the values in the header and the game seems to work ok. In fact, it seems to work too good without me actually putting any effort into it.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Expanding MBC2 ROM to 512kb

Post by lidnariq »

What, an MBC2 game working ok if emulated as MBC1/5 ?
Nah, that mostly makes sense, vis pandocs.
User avatar
MottZilla
Posts: 2837
Joined: Wed Dec 06, 2006 8:18 pm

Re: Expanding MBC2 ROM to 512kb

Post by MottZilla »

Unlike the NES the situation with the MBCs isn't nearly as crazy. You can run into some incompatibility for example with the 64MB SmartCard. The SC basically is a MBC5 with a Master Bank Register. It just exists so you can have a menu with more than one game on each page of the cartridge. It doesn't unfortunately have any ability to bank SRAM or adjust the behavior of the MBC for compatibility.

The main issues you end up with with MBC1 versus MBC5 are the behavior of writing Zero to the Program Bank register. On MBC1 this will actually choose the second 16KB bank of ROM. But with the MBC5 it will actually choose the first 16KB bank of ROM. There are a number of games that will crash because of this.

Not related to mapper conversion but related to the SC, the other problem is you don't have any Master Bank Register write protection. This is the other main reason fixes are required. Certain games perform odd writes to the cartridge space, sometimes intentional and other times not. This tends to disrupt the MBR and crash the game. But most of these problems can be corrected.
Post Reply