MMC3 CHR bankswitching

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

Moderator: Moderators

Post Reply
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

MMC3 CHR bankswitching

Post by tokumaru »

I know I've been asking a lot of questions lately, but I'm just trying to solve a certain problem.

What I need to know now is what happens when you change the way each side of the pattern table is divided through bit 7 of the value written to $8000.

Say, if I have the sprite side ($1xxx) divided into 4 1KB banks and the background side ($0xxx) divided into 2 2KB banks, with a few known banks already switched in. If I then changed bit 7 of $8000, what exactly would happen?

Would everything that was already mapped simply change sides (the same 4 banks that were mapped for the sprites would then mapped for the background, and vice versa for the 2 2KB banks)? Or would something more complicated happen?

EDIT: Yeah, some preliminary tests show that yeah, whatever was mapped in one side goes to the other. I guess it was stupid of me to ask this, I could just have tested out, like I just did. But then again, since I tried this in an emulator, it would be nice if someone could confirm this is what happens on a real MMC3, someone that already knows this from past experience. Thanks.
Last edited by tokumaru on Sun Feb 17, 2008 6:14 pm, edited 1 time in total.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

All MMC3 commercial games I've checked does never change the value of the highest 2 bits when writing to $8000, they just use a fixed combination and never change again. I see no clear doccumentation on what happen exactly, and I think the only way to know is to test. Also test on a real MMC3, not any emulator nor the powerpack to confirm this, as no commercial nor homembrew games I know does something like this yet.
I cannot test myself cause I have no EPROM programmer at the momment.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Guess you are right. When I go back home I'll write a simple test and run it in a MMC3 devcart I made a while ago.
Drag
Posts: 1350
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Post by Drag »

A funny thing about this, when I was first starting in nesdev, I thought the MMC3's chr banks acted like ram, so if I set 4 banks on one side of the pattern table, and then flipped that bit, and set 4 banks on the other side of the pattern table, I'd get 8 banks instead of 6.

Needless to say, I was wrong. :P
Last edited by Drag on Sun Feb 17, 2008 5:29 pm, edited 1 time in total.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Drag wrote:when I was first starting in nesdev, I thought the MMC3's chr banks acted like ram, so if I set 4 banks on one side of the pattern table, and then flipped that bit, and set 4 banks on the other side of the pattern table, I'd get 8 banks instead of 6.
Some early emulators might have actually implemented mapper 4 CHR switching that way, as if it were RAMBO-1 and not MMC3.

So who volunteers to write the test ROM for this?
Post Reply