Duplicating data on SNES games for bigger memories

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Duplicating data on SNES games for bigger memories
by on (#142080)
This was always a mystery for me: why do you need to duplicate the game data if you want to program it on a bigger memory?? For instance the game is 2MB and if you want to write it on 4MB memory, you have to duplicate the data twice to fill the entire 4MB space. Just thinking about it.... why the hell do you need to do that, what's the point of this?? The last 2MB of memory should never be triggered at all since there's no point of that.....

But either way if you have to do it, this is my main problem: if you have 2MB game on 4MB memory, you have to duplicate the entire data twice and 1MB on 4MB means 4x1MB etc. But the problem appears when you have 3MB game on a 4MB memory. Well it actually is still easy (I guess...) since you have to copy the last 1/3 (1MB) of data to fill that empty 1MB gap. That is OK and fully understandable. But how about if I have a game that is 2,5MB, so..... what should I do about it?? Duplicate the last 3/8 (1,5MB) of data or last 0,5MB * 3??
Re: Duplicating data on SNES games for bigger memories
by on (#142082)
MaarioS wrote:
This was always a mystery for me: why do you need to duplicate the game data if you want to program it on a bigger memory??

You have to either duplicate it or connect the memory's high address lines to ground. For example, to put a 1 MB game on a 4 MB memory, you would ground A20 and A21 on the memory and leave A20 and A21 (HiROM) or A21 and A22 (LoROM) on the cart disconnected.

Quote:
why the hell do you need to do that, what's the point of this?? The last 2MB of memory should never be triggered at all since there's no point of that

You'd be surprised at how many games rely on the entire memory being mirrored. Mega Man X is 1.25 MB and will break early on if you don't properly duplicate the last .25 MB four times.

Quote:
But how about if I have a game that is 2,5MB, so..... what should I do about it?? Duplicate the last 3/8 (1,5MB) of data or last 0,5MB * 3??

A 2.5 MB game like Street Fighter II Turbo is stored on two chips. The first is 2 MB and the second is .5 MB. So to put it on one chip, you'd mirror the last .5 MB up to 4 MB.
Re: Duplicating data on SNES games for bigger memories
by on (#142084)
Ah alright I kind of get it but I still don't entirely get this idea and it really pisses me off.... Well the examples you provided to me seem really simple and it's OK but how about if I have something more crazy like a game that is 2,25MB for instance or even worse, for example Clock Tower which size is ridiculous: 3,12MB. So how the hell are you supposed to duplicate data to fill in 4MB memory?? Or even better Super Metroid: Zero Mission hack which is just the worst thing ever: 3,46MB (3 637 248 bytes). How to mirror it?? This is a big question....

To put it simple, I don't entirely get this formula how exactly you are supposed to duplicate data and why...

AH and how about this situation: you have 2,5MB game and you want to write it on 8MB chip. So this means 8MB-2,5MB= 5,5MB gap. How are you supposed to fill it?? Duplicating last 0,5MB * 12??
Re: Duplicating data on SNES games for bigger memories
by on (#142085)
ALL SNES games are made from one or two ROMs where both are powers of two in size.

Clock Tower is 3 MiB = 2 MiB + 1 MiB, and it is mirrored by duplicating the last 1 MiB.

Now that you have a explicitly mirrored form that is a power of two in size, you just duplicate that chunk as needed.
Re: Duplicating data on SNES games for bigger memories
by on (#142086)
No sorry I meant to say Clock Tower ENglish translation which is 3,12MB (3MB + 128KB). So how are you supposed to duplicate it?? And how about Metroid Zero Mission which is 3,46MB??
Re: Duplicating data on SNES games for bigger memories
by on (#142091)
I think with the translations and other ROM-hacks that use expansion, you can just $FF-pad them. If they depended on mirroring like MMX does, we'd know by now.
Re: Duplicating data on SNES games for bigger memories
by on (#142095)
I don't have any knowledge on the subject or really have any place being here, but what's this whole mirroring nonsense? Why not just leave the unused part of the rom full of 0s? Why even have any blank space to begin with? You can almost always add more graphics to make animation smoother, unless you've literally filled up all but 2 bytes.

Also, Shouldn't this topic be located under SNESdev, seeing that this really doesn't have anything to do with the NES or the Famicom?
Re: Duplicating data on SNES games for bigger memories
by on (#142099)
Other users have used the report button to report Super NES reproduction topics in SNESdev to moderators. (Source)
Re: Duplicating data on SNES games for bigger memories
by on (#142101)
Where is that, unless you are being sarcastic or something.
Re: Duplicating data on SNES games for bigger memories
by on (#142104)
The report button is on the right and looks like Image.
Re: Duplicating data on SNES games for bigger memories
by on (#142785)
Quote:
You'd be surprised at how many games rely on the entire memory being mirrored. Mega Man X is 1.25 MB and will break early on if you don't properly duplicate the last .25 MB four times.


Just want to make sure that I understand you correctly. For a game like Mega Man X, the last part of the rom (in this case the 0.25MB exceeding the first 1MB that) should be mirrored until the total rom size is 8Mbit, 16Mbit or 32Mbit?

Btw, my Mega Man X rom file is 1.5MB. With the logic above, that would mean that I should mirror the last 0.5MB so that the rom file is 2MB (16Mbit)?

BR