Expanding a ROM in a MBC1M multi-cart collection

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 a ROM in a MBC1M multi-cart collection

Post by Pennywise »

I'm thinking of working on a GB game that has its own separate release, but I'm probably going to have to expand the ROM. That isn't a problem, but the game is also part of a collection of 3 2mbit games and I was wondering if it'd work with that multi-cart mapper? The game in question also happens to be the last game in the ROM collection, so I was thinking it being expanded wouldn't matter.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Expanding a ROM in a MBC1M multi-cart collection

Post by lidnariq »

Is there a standard way to ask emulators to give you an MBC1M PCB? You might need to pad all the entries up to a normal 2MB MBC1 image for an emulator otherwise
nitro2k01
Posts: 252
Joined: Sat Aug 28, 2010 9:01 am

Re: Expanding a ROM in a MBC1M multi-cart collection

Post by nitro2k01 »

There really isn't a standard for it since it's can't be detected from the header alone. So emulators need to apply heuristics.

I asked beware who made BGB, and he said this:
beware wrote:- rom size 1 MiB. ram size at most 8 kib. header cart type is MBC1
- bank $00 and $10 must have the logo. bank $20 and $30 must have either the logo, or where the logo would be, all $ff bytes.
SameBoy does this check:

Code: Select all

    /* Attempt to "guess" wiring */
    if (gb->cartridge_type->mbc_type == GB_MBC1) {
        if (gb->rom_size >= 0x44000 && memcmp(gb->rom + 0x104, gb->rom + 0x40104, 0x30) == 0) {
            gb->mbc1_wiring = GB_MBC1M_WIRING;
        }
    }
Ie, similar but not identical to BGB. Checking the size, and bank $10 must have the logo.

Other emulators might have still somewhat different approaches, for example whitelisting based on the ROM name.

It might also be worth pointing out that MBC1M support in flash cartridge hardware is not a guarantee, so running the game on hardware might be difficult.
Shonumi
Posts: 342
Joined: Sun Jan 26, 2014 9:31 am

Re: Expanding a ROM in a MBC1M multi-cart collection

Post by Shonumi »

This reminds me of the discussion we had when we properly documented the MBC1M here on NESdev. I believe I stated my own personal approach to handling the MBC1M in my emulator. Basically boils down to a setting the user has to consciously select, no heuristics applied. This is true for other "exotic" cartridges I handle (Pocket Sonar, MBC30, and a bunch of GBA stuff). For a single unique cartridge, heuristics are fine, but I handle over a dozen across multiple systems, so it's inconvenient to try to keep track of them all.

I guess whether or not an emulator supports MBC1M heuristics (or supports the MBC1M at all), you should be very explicit that the ROM you release uses something uncommon. Put its use of the MBC1M very clearly in a README or on the website, and/or maybe include a list of known emulators that have been validated to work with it.
Post Reply