MMC1 failing on hw, working in emulators
Moderator: Moderators
Re: MMC1 failing on hw, working in emulators
Yeah, they all showed initial boot state of the mapper like WRAM enabled, banks accessible, etc. Here's the ROM from archive, should be most recent AFAIK:
https://drive.google.com/open?id=0B1laU ... WxfMDg1MVk
It should give you the info you want. Turn power off for a little while, turn it on, and if it boots in random banks, it'll change. Like I said, IIRC MMC1B2 iss the only one I remember always booting in the last bank. MMC1 and MMC1A all boot randomly, if I remember correctly. If you want the source, I'll put it on Github.
https://drive.google.com/open?id=0B1laU ... WxfMDg1MVk
It should give you the info you want. Turn power off for a little while, turn it on, and if it boots in random banks, it'll change. Like I said, IIRC MMC1B2 iss the only one I remember always booting in the last bank. MMC1 and MMC1A all boot randomly, if I remember correctly. If you want the source, I'll put it on Github.
Last edited by 3gengames on Fri Oct 21, 2016 11:10 am, edited 1 time in total.
Re: MMC1 failing on hw, working in emulators
Thanks, will report back. Looks very useful, why not post it to a permanent location and link from the wiki?
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: MMC1 failing on hw, working in emulators
This forum is a pretty good place to upload it.calima wrote:Why not post it to a permanent location
- Attachments
-
- MMC1Test.nes
- (256.02 KiB) Downloaded 286 times
Re: MMC1 failing on hw, working in emulators
It was a Retrostage board, and it consistently booted in 0f / the last bank.
Now I'm completely out of ideas. Why would a MMC1 ROM work in emulators but not in hw, if the init code is correctly reached?
Now I'm completely out of ideas. Why would a MMC1 ROM work in emulators but not in hw, if the init code is correctly reached?
Re: MMC1 failing on hw, working in emulators
Have you made sure to initialize all mapper registers?
Is it possible that their MMC1 implementation is somehow incompatible? (There are some minor details that one might get wrong, like the ignoring of double-writes and the fact that only the address of the last write determines the target register. Whether this would be an issue depends on how your program uses MMC1, though.)
Is it possible that their MMC1 implementation is somehow incompatible? (There are some minor details that one might get wrong, like the ignoring of double-writes and the fact that only the address of the last write determines the target register. Whether this would be an issue depends on how your program uses MMC1, though.)
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Re: MMC1 failing on hw, working in emulators
Make sure the pointers for NMI and such in the last bank 0F point to the upper region and not the lower one? Maybe it's made to assume two boot banks in order and it is booting into the lower bank instead of the upper, which still fails. My test program there always boots to the upper bank and all the code is there, too.
Re: MMC1 failing on hw, working in emulators
Yes, the init code is in the upper bank, starting at 0xFEDA.
This is the MMC1 part:
NMI shouldn't matter, since interrupts are disabled when in there.
edit: I wonder if Retrostage is a member here?
@3gengames
So the test ROM couldn't detect booting to an odd bank?
This is the MMC1 part:
Code: Select all
; MMC1 init
lda #$80
sta $8000
lda #$00
sta $e000
sta $e000
sta $e000
sta $e000
sta $e000
sta $8000
sta $8000
sta $8000
sta $8000
sta $8000
edit: I wonder if Retrostage is a member here?
@3gengames
So the test ROM couldn't detect booting to an odd bank?
Re: MMC1 failing on hw, working in emulators
One last dumb idea:
NES consoles are finicky in general about cartridges. Clean it and blow on it?
NES consoles are finicky in general about cartridges. Clean it and blow on it?
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: MMC1 failing on hw, working in emulators
It will detect booting in an odd bank because the odd bank will appear in the last bank and be booted from. That's what the bank booted in will tell you, what bank appeared in the upper region at first.
Re: MMC1 failing on hw, working in emulators
Try burning an appropriately sized Holy Diver Batman ROM to the cart.
Also put this in the last 15 bytes of all banks (starting at base + $3FF1):
"Why write $FF over $FF? I thought MMC1 didn't have bus conflicts."
It doesn't. I designed this code to work not only on MMC1 but also on AOROM, BNROM, and the mapper 180 variant of UNROM.
Also put this in the last 15 bytes of all banks (starting at base + $3FF1):
Code: Select all
entry_fff1:
sei
lda #$FF
sta entry_fff1+2
jmp reset_handler
.assert reset_handler >= $C000, error, "reset handler must be in the fixed bank"
.addr nmi_handler, entry_fff1, irq_handler
It doesn't. I designed this code to work not only on MMC1 but also on AOROM, BNROM, and the mapper 180 variant of UNROM.
Re: MMC1 failing on hw, working in emulators
Mystery continues as time allows.Retrostage wrote:My mapper is based off of the MMC1B, which during power-on will default to a 16Kb banking and PRG-RAM enabled state. $C000-$FFFF is fixed on power-up.