MMC1 failing on hw, working in emulators

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

MMC1 failing on hw, working in emulators

Post by calima »

The consensus on nesdev and other sites like Kevtris' is that all MMC1 variants boot with the last 16kb bank fixed to C000.

I've made a MMC1 ROM with 32kb PRG, and the reset code only in the last part. It works in every emulator, including fceux and nintendulator, yet I got a report it black-screens on a SLROM board. The board itself was confirmed working with another ROM.

Has anyone seen if the currently-in-production MMC1 chips act differently?
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: MMC1 failing on hw, working in emulators

Post by Dwedit »

There are multiple revisions of the MMC1, some may start in a predictable state, others do not. Notice how every single MMC1 game has the boot code near the end of each bank. (except maybe the games with hardwired fixed 32K prg) You also usually see the game title right before the boot code.

So I don't know where you heard the consensus, but they don't start in a predictable state.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: MMC1 failing on hw, working in emulators

Post by rainwarrior »

Edit: reply is to OP, Dwedit posted while I was typing.

Is that really consensus? I was always under the impression that it was standard for MMC1 games to have a reset stub in every bank.

I think emulators might be powering on like that because of SEROM / SHROM / SH1ROM, which were assigned to mapper 1 despite having no PRG banking. (Compatibility for these games with minimal effort.)

In cases like this where the power-on state is inconsistent / undefined, emulator authors often still want a consistent startup state, so they make an arbitrary choice. Setting the high ranged bank to the last bank (and the low ranged bank to the first bank) seems to be a common arbitrary startup choice for many mappers / emulators.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: MMC1 failing on hw, working in emulators

Post by lidnariq »

It is not consensus at all. At least MMC1 and MMC1A are known to not necessarily boot in 16+16F mode.
AWJ
Posts: 433
Joined: Mon Nov 10, 2008 3:09 pm

Re: MMC1 failing on hw, working in emulators

Post by AWJ »

Dwedit wrote:There are multiple revisions of the MMC1, some may start in a predictable state, others do not. Notice how every single MMC1 game has the boot code near the end of each bank. (except maybe the games with hardwired fixed 32K prg)
Final Fantasy (both Japan and US versions) and Final Fantasy II don't.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: MMC1 failing on hw, working in emulators

Post by Dwedit »

Indeed, Final Fantasy 1 does not put the boot code at the end of every bank. It also uses the MMC1B on SNROM.

Maybe it's a board revision thing. SLROM-03 uses MMC1A, and SLROM-04 and higher use MMC1B or MMC1B2.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
3gengames
Formerly 65024U
Posts: 2284
Joined: Sat Mar 27, 2010 12:57 pm

Re: MMC1 failing on hw, working in emulators

Post by 3gengames »

All MMC1 versions have slightly different default values and fixed page values and such. MMC1B2 should have that last page fixed IIRC. MMC1 and MMC1A do not AFAIK. I have the concrete information on the forum, somewhere.
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: MMC1 failing on hw, working in emulators

Post by Dwedit »

Doesn't Super Mario Bros + Duck Hunt + World Class Track Meet use the original MMC1? Yet the rom doesn't have entry points on every page.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: MMC1 failing on hw, working in emulators

Post by lidnariq »

Here's a rather old thread where Blargg surveyed his collection of MMC1 carts and found that all revisions powered up with the final PRG bank switched into the upper quarter of CPU memory space.

And yet ... here we have evidence that this is not always true. I have no idea what's going on.


(re: Dwedit: SMB/DH/WCTM NesCartDB entry; vectors are present in MMC1 banks 0,1,3,5, and 7)
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: MMC1 failing on hw, working in emulators

Post by thefox »

calima wrote:yet I got a report it black-screens on a SLROM board
Let's get the first question out of the way: Was this a Nintendo board, or a repro board?
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: MMC1 failing on hw, working in emulators

Post by Memblers »

I can confirm for sure that at least one MMC1A MMC1B2/SNROM cart I have does boot in random 32kB banks. I made my own multicart with it long ago, it's just some selected NROM games and my menu + CHR loader in the last bank only. Sometimes it will boot into the menu, sometimes it won't. I can keep cycling the power and watch it boot into various banks somewhat randomly (doesn't seem like it would boot into every possible bank, IIRC), running the games with uninitialized CHR-RAM until it eventually catches the menu bank. The cart was originally Ultima Exodus.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: MMC1 failing on hw, working in emulators

Post by koitsu »

Memblers wrote:I can confirm for sure that at least one MMC1A/SNROM cart I have does boot in random 32kB banks. I made my own multicart with it long ago, it's just some selected NROM games and my menu + CHR loader in the last bank only. Sometimes it will boot into the menu, sometimes it won't. I can keep cycling the power and watch it boot into various banks somewhat randomly (doesn't seem like it would boot into every possible bank, IIRC), running the games with uninitialized CHR-RAM until it eventually catches the menu bank. The cart was originally Ultima Exodus.
Interesting, considering Ultima: Exodus is labelled MMC1B2. I think odds are in this case there are multiple revisions floating around with different MMC1 revs.
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: MMC1 failing on hw, working in emulators

Post by Memblers »

Ah, I figured I'd better open it up and check (after all, it was like 16 years ago when I last looked at the board), and it looks like I remembered wrong, it actually is MMC1B2. With the S on it (Sharp?), code 8952 5 AA. So it is still MMC1B2, but is a different manufacturer than the one in the database, maybe that matters.
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: MMC1 failing on hw, working in emulators

Post by calima »

Yeah, I was referring to that blargg thread. And here too people mention ROMs that don't put the reset vec in every 16kb bank.

In one of the MMC1 threads here, a test ROM was mentioned. I'll see if I can track that down, perhaps it will tell me what kind of MMC1 I'm dealing with.
Was this a Nintendo board, or a repro board?
A new repro board.
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: MMC1 failing on hw, working in emulators

Post by calima »

The MMC1 test ROMs were by 3gengames, but all links are dead, and nothing in archive.org. @3gen, did any of them show the bootup state for an arbitrary MMC1?
Post Reply