Best way to expand SEGA Gen/MD Rom (For translation patches)

Started by GhaleonUnlimited, May 30, 2019, 11:12:07 AM

Previous topic - Next topic

GhaleonUnlimited

Can you use Lunar Expand with the Genesis, for instance

I need to expand my PSIV relocalization to 4MB (from 3MB) as it's over 3,072 kb, but I'm not finding much info on the easiest way to do that. Lots of info on NES/SNES.

Thanks!
Phantasy Star Generation 4: A PSIV Retranslation
"Found in Fanslation" Podcast
http://psiv.gamesdonelegit.com

Psyklax

I could be wrong, but I think expanding Genesis ROMs is a piece of cake, if I recall correctly. You just add some extra space on the end and it works, or something. Don't take what I'm saying as gospel, though. :D I just think I remember doing some kind of expansion, although now I remember it might have been my title screen change for a Master System game, not Genesis. Hmm...

Now I think about it, I think you can just add extra bytes and change the code to go there, since the 68000 can address a hell of a lot of memory. It's not like the NES which needs a special memory management chip and routines to switch memory in and out - though if you know what you're doing, even that isn't so bad.

GhaleonUnlimited

Thanks much! From doing a little more digging , it sounds like you're right that it doesn't matter that much either way.

I did find a gui for ucon64 and that seems to pad roms OK, in any case, so that seems like a pretty powerful tool in general.
Phantasy Star Generation 4: A PSIV Retranslation
"Found in Fanslation" Podcast
http://psiv.gamesdonelegit.com

KingMike

I think it is a consideration for PS4 to remember that it has to use a mapper to, as I have heard, swap the 0x200000+ region between ROM and SRAM (and reportedly even checks that functionality at some point as a copy-protection measure).

(that is, cart games with save function normally mapped games with a 2MB ROM size limit)
"My watch says 30 chickens" Google, 2018

DougRPG

Hi, you first need to understand the Genesis memory map. The Genesis maps the Rom on the first 4MB of memory. This is the best of the worlds, because the Rom addresses starts on 0x0. So, if your Rom has only 1MB, for example, it's because the developers saved some money using only one 1MB chip, instead of a more expensive 4MB chip.
So answering your question, you only need to increase the file size to 4MB to expand. But like the other guys said, you need to be aware of where the game maps the Sram. It's an implementation detail chosen by the developers, but affects the PCB, because the game's hardware needs to know when to access the data chip or the Sram in the cartridge. Most games maps the Sram to 20:0000-ffff. The PS4 also maps the save to 20:0000-ffff, so the developers made some kind of mapper in the cartridge using the !TIME pin because the Rom has 3MB and also uses the 20:0000-ffff for Rom data. But I think to do a translation you don't need to worry about that.

Adding a little info, the Lunar Expand was made because on the Snes the Rom is mapped in several parts of the memory map, so there are several places to put the Rom data, and depending on the Rom size some parts of the Rom will be mapped in different regions. So expanding is not so straightforward like the Genesis, that only maps on 00-3f:0000-ffff.

Another info, actually the Genesis maps the first 10MB to Rom data, and not only the first 4MB. You can use the 40-7f banks if you want, but no one used this region back on the day because this region is used by the Sega CD. So you can make an 8MB cartridge and it will work without a mapper, as long as the Sega CD is not connected. For emulators you can use this region, as long as the emulator implements this behaviour. Most emulators only cares about licensed games, so most emulators don't support this.
The last 2MB, banks 80-9f, you can also use for Rom, but seems that in this region the processes demands a manual manipulation of the DTACK pin, so is a little more work.