nesdev.parodius.com Forum Index nesdev.parodius.com
NES Development and Strangulation Records message boards
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Simple Zelda MMC1 question
Goto page 1, 2  Next
 
Post new topic   Reply to topic    nesdev.parodius.com Forum Index -> NESdev
View previous topic :: View next topic  
Author Message
kyuusaku



Joined: 27 Sep 2004
Posts: 1354
Location: .ma.us

PostPosted: Wed Nov 09, 2005 6:00 pm    Post subject: Simple Zelda MMC1 question Reply with quote

Why does Zelda "switch" VROM banks when it uses CHR RAM? Something to do with A13? It has no purpose whatsoever does it?

Last edited by kyuusaku on Wed Nov 09, 2005 6:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
Quietust



Joined: 19 Sep 2004
Posts: 1028

PostPosted: Wed Nov 09, 2005 6:09 pm    Post subject: Reply with quote

On MMC1 (and even MMC3) cartridges with CHR RAM, the bank select line(s) are usually still connected to the mapper chip, allowing the RAM to be banked like normal. However, most games will just map in the default banks and leave them as-is (though some do not, such as the Famicom RPG 'Lagrange Point').
Back to top
View user's profile Send private message
kyuusaku



Joined: 27 Sep 2004
Posts: 1354
Location: .ma.us

PostPosted: Wed Nov 09, 2005 6:18 pm    Post subject: Reply with quote

The game isn't banking CHR RAM in "4k mode" though, its switching to bank 1 which I assume does absolutely nothing since in "8k mode", A0-12 are fixed. Am I missing something? Thanks
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Nov 11, 2005 7:41 am    Post subject: Reply with quote

Zelda only writes to $A000/C000 during the initialization code. The code first writes to all four addresses ($8000/A000/C000/E000) with bit 7 set (Reset port). It doesn't actually need to do this, as setting bit 7 has the same meaning regardless of what address you write to, but a number of games write it to all four registers anyway, most likely to be sure the MMC1 is reset properly. Zelda then writes to $A000 setting the register to zero, thus mapping CHR bank 0 from $0000-1FFF (since bit 4 of $8000 is clear). Again, not technically necessary since there's only one 8K bank, but it is still good programming practice to do so to avoid ambiguity. After these writes, Zelda never touches $A000 or $C000 again for the remainder of execution (near as I can tell, anyway).
Back to top
Bregalad



Joined: 12 Nov 2004
Posts: 4141
Location: Jongny, VD, Switzerland

PostPosted: Fri Nov 11, 2005 9:27 am    Post subject: Reply with quote

This is definitely not needed, because I made myself a FF2 card, and I forgot to turn back the dummy bit to MMC1 registers done to modify the game to use mapper 2, I only did it for PRG and MMC1 mode registers, I forgot to do it for CHR registers, but the game still works fine. However, I think it should be done when the mapper is reseted scince all official MMC1 games using CHRAM does this.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Disch



Joined: 10 Nov 2004
Posts: 1587

PostPosted: Fri Nov 11, 2005 9:31 am    Post subject: Reply with quote

FF2 on UxROM?

but UxROM has no SRAM
Back to top
View user's profile Send private message
Bregalad



Joined: 12 Nov 2004
Posts: 4141
Location: Jongny, VD, Switzerland

PostPosted: Fri Nov 11, 2005 9:59 am    Post subject: Reply with quote

You know, the hacked version that use mapper 2 on witch the english translation was randomly based, there is about a fourty threads talking about that on both new and old board.
Of curse, UxROM has no SRAM, but it is only a hacked version, and because of this, everyone (including me in the past) think that FF2 is UNROM, even if it is SNROM actually.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
kyuusaku



Joined: 27 Sep 2004
Posts: 1354
Location: .ma.us

PostPosted: Fri Nov 11, 2005 11:23 am    Post subject: Reply with quote

Anonymous wrote:
Zelda only writes to $A000/C000 during the initialization code. The code first writes to all four addresses ($8000/A000/C000/E000) with bit 7 set (Reset port). It doesn't actually need to do this, as setting bit 7 has the same meaning regardless of what address you write to, but a number of games write it to all four registers anyway, most likely to be sure the MMC1 is reset properly. Zelda then writes to $A000 setting the register to zero, thus mapping CHR bank 0 from $0000-1FFF (since bit 4 of $8000 is clear). Again, not technically necessary since there's only one 8K bank, but it is still good programming practice to do so to avoid ambiguity. After these writes, Zelda never touches $A000 or $C000 again for the remainder of execution (near as I can tell, anyway).

I was looking at Zelda 1 for FC (1993 version) which I assumed is little different than the US game, I see now that it is after watching the US game. It writes $10 (oops, wouldn't be A13) and $00 to $A000, a lot.

Disch wrote:
FF2 on UxROM?

but UxROM has no SRAM

But on a Famicom copier it does, the MMC1 games hacked for UOROM are so that the older 1987 Famicom copiers could play the games, without trainers or bankswitching registers, only a UOROM like state.
Back to top
View user's profile Send private message
tepples



Joined: 19 Sep 2004
Posts: 6106
Location: NE Indiana, USA (NTSC)

PostPosted: Fri Nov 11, 2005 6:49 pm    Post subject: Reply with quote

How much extra hardware would it take to modify a U*ROM board to take battery-backed SRAM?
Back to top
View user's profile Send private message Visit poster's website AIM Address
kyuusaku



Joined: 27 Sep 2004
Posts: 1354
Location: .ma.us

PostPosted: Fri Nov 11, 2005 8:02 pm    Post subject: Reply with quote

A 74'138, a 6264 and a CR2032, some passive components for healthy operation. It wouldn't be fun getting the SRAM on there though
Back to top
View user's profile Send private message
Memblers
Site Admin


Joined: 20 Sep 2004
Posts: 2181
Location: Indianapolis

PostPosted: Sat Nov 12, 2005 1:48 am    Post subject: Reply with quote

Has anyone tested an NVRAM circuit with just passive components? I thought a controller was needed, to keep the RAM disabled when the power supply is out of the CPU's specs. Maybe the 'hold reset when shutting off' thing is a fix for that, though I'm not sure.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Bregalad



Joined: 12 Nov 2004
Posts: 4141
Location: Jongny, VD, Switzerland

PostPosted: Sat Nov 12, 2005 6:40 am    Post subject: Reply with quote

I'm getting outtopic, but who cares, right ?
So, I happened sometimes to forgot to press RESET while turning the power of on Zelda or Final Fantasy II, and I never happened to loose my saves. However, I happened to lose my saves in some SNES games, while they doesn't say to press the reset button, I still do it on my SNES now by precaution. However, Dragon Quest VI is the only SNES game as far I know to say to hold down the RESET button, I don't know why.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
tepples



Joined: 19 Sep 2004
Posts: 6106
Location: NE Indiana, USA (NTSC)

PostPosted: Sat Nov 12, 2005 8:24 am    Post subject: Reply with quote

Memblers wrote:
Has anyone tested an NVRAM circuit with just passive components? I thought a controller was needed, to keep the RAM disabled when the power supply is out of the CPU's specs.

A controller is needed to map SRAM into CPU$6000. If you're prototyping it out of discrete logic, then you may also have a few gates to spare for extra write protection upon power cycle. I seem to remember in Nintendo Power's article about mappers that the MMC5 was the only MMC with robust power-down safety.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Bregalad



Joined: 12 Nov 2004
Posts: 4141
Location: Jongny, VD, Switzerland

PostPosted: Sat Nov 12, 2005 9:10 am    Post subject: Reply with quote

Just Breed stills says to press reset button while turning off the power.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
kyuusaku



Joined: 27 Sep 2004
Posts: 1354
Location: .ma.us

PostPosted: Sat Nov 12, 2005 12:22 pm    Post subject: Reply with quote

Can someone give an example of a protection in logic?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nesdev.parodius.com Forum Index -> NESdev All times are GMT - 7 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group