News:

Retrode - Honey, fire up the emulator! My Retrode just arrived

Main Menu

Megadrive SRM Saving issue..getting closer to solving..

Started by gliitch, 05/Jul/2016 06:17:09 PM

Previous topic - Next topic

gliitch

I have just tried testing saving to an  EU cart from an US rom, with Phantasy Star IV. It works, & reads back as if you were playing from a cartridge from your own region. I think its because it's copied straight to the cart itself, without any checks, so provided you have a matching SRM name ie: PhantasyStarTheEnd7FC0 which then matches the bin file on the cart itself, i dont see any reason as to why it wouldn't work.


  I also got a downloaded save to work, turns out i don't think i left it long enough in the retrode to copy properly  :-[ But its awesome that we finally have saving SRM working :D also, you can use games with game genie codes & it will still save your progress, you'll just have to reinput the codes in the emulator.

Nori

Oh my gosh. I can't wait to try this out. This sounds like the holy grail of updates for Genesis/Megadrive fans such as myself!

What file sizes were you working with gliitch? Real Genesis srams appear to be 32 but emulators I use give me 64 kb srams. So does the new update allow the Retrode to correctly rewrite the file size into a 32kb sram?

For what it's worth I've encountered that Phantasy Star IV (US copy) problem back when I first bought the Retrode. I thought it was my battery that was dying, I had backed up my games prior to replacing all the batteries. What happened was save 1 and 3 were wiped. Fortunately all three were close to each other so not much was lost with just the second save. I've never had any other oddity like that with the retrode on the SNES or any other Genesis game.

gliitch

The new update indeed allows for the carts to be read properly, there are still some issues (3rd save slot gets wiped) 1 & 2 are fine, Wannado is on the right track, i can't really speak for genesis owners such as yourself, but for me Phantasy Star 3 / 4 & Shining Force save as they should. The save issue isn't just specific to Phantasy Star 4 but also Shining Force also.

I don't see why Genesis carts would be any differrent. I thought it maybe an issue with the size of the game but Wannado, who is far more knowlegeable about these things would know. He will probably ask you to send him some Genesis save files.

SNES were working from the start i think, at least thats what most people said, it was always just the megadrive that posed a problem. Let me know how it goes for you, as I've only got those 3 games that have SRAM saving, it would be interesting to know if Sonic 3 works, that is if you have it? :)

Wannado

Quote from: Nori on 30/Oct/2016 08:18:05 PM
What file sizes were you working with gliitch? Real Genesis srams appear to be 32 but emulators I use give me 64 kb srams. So does the new update allow the Retrode to correctly rewrite the file size into a 32kb sram?

The cartridge has a 16 bit data bus, but some (many?) games are using only half of it for SRAM.

Most(?) emulators don't seem to care and just pretend that the whole data bus is used. So for each real SRAM byte, they store an unused byte (hex value FF) next to it. This makes the emulator's save file twice as large as the cartridge's SRAM.

In such a case, you must set "[segaSram16bit] 1" in RETRODE.CFG. For more details, see reply #14.

Wannado

I just noticed that v0.20 beta still has a bug in the size computation for MegaDrive/Genesis savegame files (*.srm).

The computed size is one byte too small in many cases, so that the last byte of SRAM is not read or written. If the missing byte is relevant to the game, effects may range from subtle changes to wiping a save slot or the whole save data.

For example, this may be the reason why the third save slot of Phantasy Star IV and Shining Force was wiped in gliitch's tests (see replies #14 and #17 in this thread).

Nori

Great find. Unlike Glitch, in my tests of transferring an existing srm obtained through an emulator to the cart still doesn't work. Although with v0.20 I now get a message notifying me that the cartridge doesn't have the room for the srm (which is two times larger than regular srm's sitting at 64kb instead of 32kb).

Wannado

Once again sorry for the delay. I wasn't able to do much in the past few weeks.

Anyway, the emulator that Nori is using seems to always store the full contents of the address range from 0x200000 to 0x20FFFF1, regardless of what part of that range is really populated with SRAM (according to the ROM header). So srm files written by that emulator are always 64 kiB in size.

I'm adding support for this save format to the firmware (will be v0.21 beta). It will be selected by setting "[segaSram16bit] 2".

1 Note that I couldn't find out if there are any (commercial) games that put SRAM outside that address range, or if that would be possible at all. The ROM header would allow for it, and the address range assigned to the cartridge as a whole (including ROM and RAM) seems to be much larger.

Nori

Wannado you are amazing. Can't wait to try that out in the next version. :D

Wannado

Here it is, f i n a l l y.

I only tested it on the Retrode 2 with a few games (GB, SNES) and an N64 Mempak.

As always, see the enclosed readme.txt for details.

Nori

#24
Quote from: Wannado on 26/Jan/2017 11:16:33 PM
Here it is, f i n a l l y.

I only tested it on the Retrode 2 with a few games (GB, SNES) and an N64 Mempak.

As always, see the enclosed readme.txt for details.

Fantastic! Can't wait to try it out!

Unfortunately when I try to download the file for the Retrode 2 I get this message:
"File could not be saved, because the source file could not be read."

If I force download it I have it visible on the desktop but it tells me the file is either damaged or corrupted. :(

EDIT: Nevermind, a few minutes later it worked! I'm going to try this out at my first break tomorrow (right about to pass out for the night). :)

Nori

It WORKS!

Using SegaSram16bits set to "2" everything I've sent to it worked. You can even change it back to "1", restart the Retrode, and get the save converted to a regular sized file.

It's absolutely amazing. Now the Retrode does both the SNES and Megadrive/Genesis save transferring absolutely flawlessly. It's perfection.

Thank you so much Wannado for your hard work and perseverance at solving what appeared to be, or at least that we thought, was a nearly unsolvable issue. You're the greatest!

So with this issue now solved, what's your next priority with regards to the Retrode? :)