MMC5 RAM / ROM read only toggle

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
colinvella
Posts: 74
Joined: Sun Jun 05, 2016 1:41 pm

MMC5 RAM / ROM read only toggle

Post by colinvella »

I'm currently implementing an MMC5 mapper for my emulator.
According to the specs, the high bit (bit 7) in the MMC5 bank switching registers PRG Bank 0, 1 and 2 ($5114, $5115, $5116) control the ROM/RAM mode of these banks.

By question is: when a bank is set to ROM mode (read only), what should happen if an attempt is made to write to the ROM?
Tile IDE and tile engine for XNA: http://tide.codeplex.com/
Fancy Fish Mod - Minecraft Mod: http://fancyfishmod.weebly.com/
User avatar
Quietust
Posts: 1920
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: MMC5 RAM / ROM read only toggle

Post by Quietust »

colinvella wrote:when a bank is set to ROM mode (read only), what should happen if an attempt is made to write to the ROM?
Nothing, of course.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
User avatar
colinvella
Posts: 74
Joined: Sun Jun 05, 2016 1:41 pm

Re: MMC5 RAM / ROM read only toggle

Post by colinvella »

Quietust wrote:Nothing, of course.
Thanks!

Just as a clarification summary, concerning ROM/RAM banks:

When reading, the corresponding ROM/RAM mode determines whether to read from ROM or RAM (using the bank switching logic based on the PRG bank mode and corresponding bank register)

When writing, ROM mode does nothing, while RAM mode writes into RAM (again using the bank switching logic as for reading)

Is my understanding correct?

Also, what is the exact role of Protect 1 and 2. Do these prevent writing to RAM banks and RAM/ROM banks in RAM mode? Should such writes be ignored when both Protect 1 and Protect 2 are set ?
Tile IDE and tile engine for XNA: http://tide.codeplex.com/
Fancy Fish Mod - Minecraft Mod: http://fancyfishmod.weebly.com/
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: MMC5 RAM / ROM read only toggle

Post by tepples »

Quietust wrote:
colinvella wrote:what should happen if an attempt is made to write to the ROM?
Nothing, of course.
Perhaps "of course" wasn't so clear in the era of in-circuit reprogramming of flash memory.
Post Reply