Sega Genesis rom/sram address mapping

Discussion of development of software for any "obsolete" computer or video game system.
User avatar
poorstudenthobbyist
Posts: 146
Joined: Fri Jun 24, 2016 4:20 pm

Re: Sega Genesis rom/sram address mapping

Post by poorstudenthobbyist » Sun Sep 20, 2020 9:37 pm

I made this circuit but I'm having some trouble holding some saves - it looks like the trend is games that are greater than 16 Mbit do not have any issues, but 16 Mbit and less do. I don't see why that would be a problem here, though. I'm a bit stumped.
Check out my website for NES, SNES, and Genesis tutorials here. And visit my store for some custom tools and boards for making games here.

You can also follow me on Twitter for infrequent updates and bad jokes!

lidnariq
Posts: 9853
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Sega Genesis rom/sram address mapping

Post by lidnariq » Sun Sep 20, 2020 9:41 pm

Don't 2MB (and smaller) games always leave RAM enabled?

User avatar
poorstudenthobbyist
Posts: 146
Joined: Fri Jun 24, 2016 4:20 pm

Re: Sega Genesis rom/sram address mapping

Post by poorstudenthobbyist » Sun Sep 20, 2020 9:46 pm

I'm having trouble finding the circuit, and I don't actually have a Genesis cart like that to check unfortunately. But even then, shouldn't this still work? Or do 16 Mbit games not use $A130F1 to pulse the /TIME signal?

Also, one game did show save data when booting it up for the first time, it was just garbage and the game froze when I tried to load it. But that makes it seem that it's at least reading the SRAM in some capacity.
Check out my website for NES, SNES, and Genesis tutorials here. And visit my store for some custom tools and boards for making games here.

You can also follow me on Twitter for infrequent updates and bad jokes!

lidnariq
Posts: 9853
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Sega Genesis rom/sram address mapping

Post by lidnariq » Sun Sep 20, 2020 9:59 pm

poorstudenthobbyist wrote:
Sun Sep 20, 2020 9:46 pm
Or do 16 Mbit games not use $A130F1 to pulse the /TIME signal?
Exactly that. They rely on RAM always being enabled... well, at least, not under software control. (They're still disabled by the battery management IC)

User avatar
poorstudenthobbyist
Posts: 146
Joined: Fri Jun 24, 2016 4:20 pm

Re: Sega Genesis rom/sram address mapping

Post by poorstudenthobbyist » Mon Sep 21, 2020 6:14 am

Ok, thanks for that. So, going by this which was said earlier:
Sik wrote:
Wed Sep 10, 2014 8:30 pm
For games with 2MB of ROM or less, there isn't an overlap, and there you would use a 74xx chip just to invert the chip enable signal for one of the ICs =P (so one gets enabled in the $000000-$1FFFFF range and the other in the $200000-$3FFFFF range)
And going off the diagram from TmEE, what I did was:
Remove the '74 completely
Connected A and B to A21 on the top decoder (ignored the bottom one) so at $200000, A21 is 1. (A21 here being pin B9)
Switched SRAM and ROM locations on the decoder so when A21 is 0, the ROM is enabled, and when it's 1, the RAM is enabled.

This didn't end up working though. The game boots fine, but no saves work.

My save circuit is the same as the one I used for my SNES boards:

Image
Check out my website for NES, SNES, and Genesis tutorials here. And visit my store for some custom tools and boards for making games here.

You can also follow me on Twitter for infrequent updates and bad jokes!

User avatar
Fisher
Posts: 1121
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Sega Genesis rom/sram address mapping

Post by Fisher » Mon Sep 21, 2020 3:47 pm

Krzysiobal made a schematic of a Sonic 3 a while ago here.
There are PCB p0rn pictures on the begining of that same thread.
Hope this can be usefull.

User avatar
poorstudenthobbyist
Posts: 146
Joined: Fri Jun 24, 2016 4:20 pm

Re: Sega Genesis rom/sram address mapping

Post by poorstudenthobbyist » Mon Sep 21, 2020 6:55 pm

Fisher wrote:
Mon Sep 21, 2020 3:47 pm
Krzysiobal made a schematic of a Sonic 3 a while ago here.
There are PCB p0rn pictures on the begining of that same thread.
Hope this can be usefull.
Thanks for this, I did see this a while back and looked at it a bit again yesterday but missed the schematic. Though, I think that schematic raises more questions than it answers haha. I'm guessing some of that has to do with the "lock-on technology" with S&K.

As it turns out, my schematic did actually end up working... so far. Still going through some more rigorous testing. I'm testing on a Genesis 2 and a Super Retro Trio 3, and was having inconsistent results switching between the two consoles and various test set ups. What I realized was in my save circuit, I was using a 100k ohm for the base resistor instead of the 10k I originally had. This was because I was testing a different problem with the save circuit detailed on this post. The short explanation of that problem is, seemingly, the output of the 68000 processor on the Genesis for the /VRES line doesn't play nice if you use too small of a resistor to energize the base of a transistor for the save circuit.

Well, apparently, that problem also manifests itself if you use too LARGE of a resistor. Because changing the 100k with a 10k fixed the issue. I didn't immediately think that was an issue, because I had tested those boards with a 100k earlier and it worked fine. But maybe it was a borderline case where it was only barely working. The set up had some probes and hanging wires on the board, so maybe that interacted with the circuit and allowed the 100k to work normally, but after taking all that extra stuff off it stops working? Not sure. I might take some scope traces and put them here if they're interesting to look at.

I'm still going to be testing a few different ROMs to make sure the problem is fixed, but it's nice to know that the logic I proposed was indeed correct.
Check out my website for NES, SNES, and Genesis tutorials here. And visit my store for some custom tools and boards for making games here.

You can also follow me on Twitter for infrequent updates and bad jokes!

User avatar
Fisher
Posts: 1121
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Sega Genesis rom/sram address mapping

Post by Fisher » Tue Sep 22, 2020 4:24 pm

O yeah!
Glad to know it worked. :-)

If I remember correctly, when I changed the broken FeRAM of that cartridge, I also used a 10K resistor as pull-up on the SRAM's /CE.
I used this circuit, that's pretty similar if not exactly the same you described.
There are some pictures of the fixed cartridge on that same thread, more preciselly here.

I tried that cartridge a while ago and indeed the saves are intact.
Looks like that's the way to go.

Post Reply