I wonder how MMC chips gets their internal power-on reset state.
The MMC1 most likely set itself on power-up in the same state as when something is written to it with D7 = 1, that is it sets itself in 16kb switching mode and low-PRG bankswitching, so that the reset vector and code can be safely put at $c000-$ffff of the last bank (like UNROM games) and only games changing the bankswitching mode would have to mirror their reset code/vectors in all banks.
So the MMC1 is internally made so that at least two of it's flip-flops power on in a known state. I guess the MMC1C also has the WRAM disable flip-flop reset to a known state.
Is this done with an internal voltage comparator and all this stuff, or is it done with any other trick or does the flip-flops just got manufactured so that they would be set on power-on ?
Does the Reset button affect this ?
I think an idea (without using the lockout chip reset line, wich is cheating because that line doesn't exist on the Famicom) would be to watch the M2 line. A internal monostable could be constantly be retriggered by the M2 line, and when the system enters its reset mode, the M2 would no longer oscillate (I guess), so the monostable would reset the MMC after a while. This would most likely require an external capacity, and the MMC1 doesn't have any external capacity. Of course another idea would be to watch for subsequent reads of $fffc and $fffd, but since the MMC1 don't connect to all adress lines, this won't make it.
I don't think the MMC2, MMC3 and MMC4 has a known initial state, because all of them have a hardwired bank somewhere, so the game can accurately start in there and reset all other stuff by software. The MMC5 on the other hand, reset in a known state, in 8kb PRG bankswitching mode and with all banks set to the last. Most likely again, all it's internal register flip-flops default to 1 at power-on.
So, any more idea how this is done ?
On a side-note, even trough the (innacurate) firebug mapper doccument gives power-on states for all mappers, I assume most of them are wrong and can power-on just randomly. (i.e. CNROM, UNROM and AOROM has no logic to set any bank on power-on, forcing mapper 7 games to get their reset vectors and code mirrored in all banks).
The MMC1 most likely set itself on power-up in the same state as when something is written to it with D7 = 1, that is it sets itself in 16kb switching mode and low-PRG bankswitching, so that the reset vector and code can be safely put at $c000-$ffff of the last bank (like UNROM games) and only games changing the bankswitching mode would have to mirror their reset code/vectors in all banks.
So the MMC1 is internally made so that at least two of it's flip-flops power on in a known state. I guess the MMC1C also has the WRAM disable flip-flop reset to a known state.
Is this done with an internal voltage comparator and all this stuff, or is it done with any other trick or does the flip-flops just got manufactured so that they would be set on power-on ?
Does the Reset button affect this ?
I think an idea (without using the lockout chip reset line, wich is cheating because that line doesn't exist on the Famicom) would be to watch the M2 line. A internal monostable could be constantly be retriggered by the M2 line, and when the system enters its reset mode, the M2 would no longer oscillate (I guess), so the monostable would reset the MMC after a while. This would most likely require an external capacity, and the MMC1 doesn't have any external capacity. Of course another idea would be to watch for subsequent reads of $fffc and $fffd, but since the MMC1 don't connect to all adress lines, this won't make it.
I don't think the MMC2, MMC3 and MMC4 has a known initial state, because all of them have a hardwired bank somewhere, so the game can accurately start in there and reset all other stuff by software. The MMC5 on the other hand, reset in a known state, in 8kb PRG bankswitching mode and with all banks set to the last. Most likely again, all it's internal register flip-flops default to 1 at power-on.
So, any more idea how this is done ?
On a side-note, even trough the (innacurate) firebug mapper doccument gives power-on states for all mappers, I assume most of them are wrong and can power-on just randomly. (i.e. CNROM, UNROM and AOROM has no logic to set any bank on power-on, forcing mapper 7 games to get their reset vectors and code mirrored in all banks).