Sega Genesis rom/sram address mapping

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Sega Genesis rom/sram address mapping

Post by lidnariq »

Don't 2MB (and smaller) games always leave RAM enabled?
poorstudenthobbyist
Posts: 252
Joined: Fri Jun 24, 2016 4:20 pm

Re: Sega Genesis rom/sram address mapping

Post by poorstudenthobbyist »

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.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Sega Genesis rom/sram address mapping

Post by lidnariq »

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)
poorstudenthobbyist
Posts: 252
Joined: Fri Jun 24, 2016 4:20 pm

Re: Sega Genesis rom/sram address mapping

Post by poorstudenthobbyist »

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
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Sega Genesis rom/sram address mapping

Post by Fisher »

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.
poorstudenthobbyist
Posts: 252
Joined: Fri Jun 24, 2016 4:20 pm

Re: Sega Genesis rom/sram address mapping

Post by poorstudenthobbyist »

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.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Sega Genesis rom/sram address mapping

Post by Fisher »

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.
Guest

Re: Sega Genesis rom/sram address mapping

Post by Guest »

poorstudenthobbyist the question and solution is simple. snes the RST and LOW signal / the mega drive the RST and HIGH signal. even if you use an inverter on the mega drive you will still have problems using your transistor + resistors circuit connected to the RST. was I clear? / no snes works perfectly because the transistor is not always active =) the solution is simple use a mosfet. remove the transistor. save ok
Guest

Re: Sega Genesis rom/sram address mapping

Post by Guest »

changing only the resistor does not solve it. same problem when doing 4in1 on sega. the RST does not change the game without im inverting use a 2n7000 and success
poorstudenthobbyist
Posts: 252
Joined: Fri Jun 24, 2016 4:20 pm

Re: Sega Genesis rom/sram address mapping

Post by poorstudenthobbyist »

darleiv wrote: Sat May 15, 2021 10:02 pm poorstudenthobbyist the question and solution is simple. snes the RST and LOW signal / the mega drive the RST and HIGH signal. even if you use an inverter on the mega drive you will still have problems using your transistor + resistors circuit connected to the RST. was I clear? / no snes works perfectly because the transistor is not always active =) the solution is simple use a mosfet. remove the transistor. save ok
Hmm not sure what you're saying haha
The RESET line on the SNES and the VRES on the Genesis are both active LOW, so the circuit should work for both. I just have to use a 10K for the Genesis base resistor to get it to play nice. I thought about using a 2N7000 instead but the 2N3904 works fine as is.
Guest

Re: Sega Genesis rom/sram address mapping

Post by Guest »

pin / RST of the mega drive is HIGH signal. snes is LOW - they have never been the same. see wikes. and 2n7000 is not a transistor but a mosfet (transistorFET)put a cd4040 in the RST of the mega drive and you will see that it does not reset the logical counter
Guest

Re: Sega Genesis rom/sram address mapping

Post by Guest »

I will try to be more clear. RST signal from the mega drive will always be on high signal. there that generates the bug. on super nintendo does not have this problem the signal is not always loud
Guest

Re: Sega Genesis rom/sram address mapping

Post by Guest »

if you never turn off the base of a transistor it will never invert / the bug there
poorstudenthobbyist
Posts: 252
Joined: Fri Jun 24, 2016 4:20 pm

Re: Sega Genesis rom/sram address mapping

Post by poorstudenthobbyist »

darleiv wrote: Sun May 16, 2021 6:25 pm pin / RST of the mega drive is HIGH signal. snes is LOW - they have never been the same. see wikes. and 2n7000 is not a transistor but a mosfet (transistorFET)put a cd4040 in the RST of the mega drive and you will see that it does not reset the logical counter
I'm not sure I follow. The Genesis/Mega Drive /VRES pin (B27) is HIGH when the game is normally running, and LOW when the reset button is pressed. On the SNES, the /RESET pin (pin 26) is HIGH when the game is normally running, and LOW when the reset button is pressed. They act the same based on the reset button activity. I checked this on an oscilloscope, and again, the save function works fine with my circuit (as long as I use a 10kΩ for RB)
sram.png
sram.png (10.32 KiB) Viewed 4524 times
Guest

Re: Sega Genesis rom/sram address mapping

Post by Guest »

eu fiz este ano passado e nao salvava. mas nao usei 10k mas era pra salvar 1k ou 10k
I did this last year and it didn't save. but I didn't use 10k but it was to save 1k or 10k
Attachments
Sem Título.png
Sem Título.png (7.96 KiB) Viewed 2880 times
Post Reply