Looking for MMC-3 tutorial

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Looking for MMC-3 tutorial

Post by lidnariq »

DRW wrote:If you go to "Advanced Search" and include "ROM Size" to the columns in the list view, this will actually just be PRG ROM size and not combined ROM size.
"Combined ROM size" is a Cart/Profile attribute.

Individual ROM size is a ROM or Chip attribute.
Furthermore, there doesn't seem to be a choosable column for CHR ROM size in the list view at all. You can only find it if you click the game itself.
Because carts can have more than just two ROMs, even if you restrict it to only licensed software, even first party releases.

In the list, if you added "ROM size" to the list, most entries have a [+] which you can click to display all properties when a cart has more than one of that type.
User avatar
DRW
Posts: 2070
Joined: Sat Sep 07, 2013 2:59 pm

Re: Looking for MMC-3 tutorial

Post by DRW »

O.k., I got my sample ROM to run as MMC3, with working bank switches.

Now the next question:

Since writes to $8000 and $8001 always appear in pairs ($8000 chooses which bank to change, $8001 takes the actual bank number), is the same true for $A000 and $A001?

Unlike with $8000/$8001, I don't see any related features here. $A000 is for mirroring, $A001 is for RAM protection.


Besides, is the whole RAM protection ever used in licensed games? If yes, when do games use which value?

And does it only refer to the battery RAM or to the regular RAM as well?
If it refers to the regular RAM, I don't know how I could ever disable writes at all. Because I pretty much always need the RAM to be accessible.
Available now: My game "City Trouble".
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Looking for MMC-3 tutorial

Post by tokumaru »

DRW wrote:is the same true for $A000 and $A001?
No. Bank selection needs a pair of writes because you need 2 parameters to complete a switch operation (the slot and the bank), but $A000 and $A001 can do their job with a single write each. The IRQ feature will usually require writes to different registers to work properly though, but IIRC you're not using that yet.
Besides, is the whole RAM protection ever used in licensed games? If yes, when do games use which value?
Honestly, I don't know. 8KB is a whole lot of RAM to use just for saving, and if you're using it for other purposes you can't really keep it disabled, can you?
And does it only refer to the battery RAM or to the regular RAM as well?
The mapper controls cartridge RAM only.
User avatar
DRW
Posts: 2070
Joined: Sat Sep 07, 2013 2:59 pm

Re: Looking for MMC-3 tutorial

Post by DRW »

Thanks for the information.

Yeah, I use the additional RAM for code, so that I don't need to bankswitch it.
Although now that the mapper can do bankswitching in 8 KB slices, I already have 24 KB of always available space instead of 16 KB because, after initialization, I simply keep the $A000 bank unchanged and only use bank $8000 for bank switching.

I don't know if I'll actually need the battery RAM for any variables that are not for save states.


By the way, do I need to write to every one of these registers in the beginning to put the mapper into a defined state? Or do some of them have guaranteed default values?

For example, do I have to write to $A001 once or is its initial status well defined?
Available now: My game "City Trouble".
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Looking for MMC-3 tutorial

Post by tokumaru »

DRW wrote:By the way, do I need to write to every one of these registers in the beginning to put the mapper into a defined state?
I'm fairly sure nothing is guaranteed on power up, but even if that wasn't the case, it's better to be safe than sorry, specially considering it takes so little effort to initialize everything.
Post Reply