Question about Genesis Plus DC save file

This forum is for discussion pertaining to homebrew software for the Dreamcast, such as homebrew games, emulators/interpreters, and other homebrew software/applications. Porting requests and developmental ideas are not to be made here; you can make those here. If you need any help burning discs for homebrew software, this is the place to ask as well.
Post Reply
User avatar
TheRedFox
Insane DCEmu
Insane DCEmu
Posts: 152
Joined: Tue Aug 05, 2008 1:57 pm

Question about Genesis Plus DC save file

Post by TheRedFox » Mon Sep 09, 2013 11:00 pm

Well this is my first post on this forum for years, and I kind of feel bad that it's a request for help...

I had been playing Phantasy Star IV on Genesis Plus DC. I saved my progress and exited to the main menu (L+R+Start), as usual, before opening the game again, because I've been burned one to many times by forgetting to do that, and ending up starting off from where ever I started before that session, but there was no save file awaiting me when I started back up
Some things that might be relevant:
I have been running GPDC off of an SD card
I have been able to resume game play many times before
I have two possibly relevent files on my vmu (it was my rear vmu, but I switched it to the front as a test): one is called SP1_PHAN.001 and is 18 blocks, and the other is an actual gps file for PSIV that I think is probably a clean SRAM file from last time that I reopened PSIV, but I'm not positive

actually, the more that I type out my situation, the more it seems like my SRAM somehow got deleted, but I don't see how it could have.

Anyway, for any PSIV fans out there, I just got to the point where I rescued that one android (can't remember the name), and tried to fight Zio, but was unable to harm him, and he seriously injured Alys. Pretty rough place to stop being able to play the game :(

I don't know if you guys can help, but if so, Thank you.
_______
EDIT: It's not a perfect solution, but I found a site where people have uploaded .srm files from PSIV. It seems as if that's the most common format for Genesis Emulators to use. Is there any way, that anyone knows of to convert from .srm to Genesis+ DC format (.gps, I think)?

EDIT 2: I tried copying the file onto the VMU, and it's clearly a lot bigger than a Genesis Plus save file (it's like 12 blocks, I think), and just renaming it also doesn't work. It's possible that renaming plus some hex editing might do something, but I kind of doubt it, I'm thinking that the gps files are some sort of compressed SRAM dumps. any other ideas?
Wyrd bi∂ ful aræd
BlackAura2
DCEmu Newbie
DCEmu Newbie
Posts: 3
Joined: Wed Sep 11, 2013 9:15 pm

Re: Question about Genesis Plus DC save file

Post by BlackAura2 » Wed Sep 11, 2013 9:35 pm

(BlackAura here, author of GP/DC - Don't have my main account password on me at the moment, so...)

The .gps file should be the save file. It's named with an 8-digit hex code (the ROM's checksum).

From what I remember, the save files are compressed using Deflate, and there's a Dreamcast VMU header and probably some other internal header stuck on the beginning. I also seem to remember the actual save data is in a slightly different format than the stardard .srm format used by most other emulators, probably trying to make the size of the save file smaller. And I think it's byte-swapped as well.

It's probably possible to convert them, but it's not something you could really do by hand. If I get time, I'll see if I can throw together a converter, but I don't have a Dreamcast set up anymore, so I won't be able to test it or anything.

As to where your save went, GP/DC always saves to the first VMU. So if you had multiple VMUs plugged in, it might have ended up on a different one. Maybe. The saving code is also a bit dodgy - if something went wrong (ran out of space, for example), the save file would probably have just disappeared.
User avatar
TheRedFox
Insane DCEmu
Insane DCEmu
Posts: 152
Joined: Tue Aug 05, 2008 1:57 pm

Re: Question about Genesis Plus DC save file

Post by TheRedFox » Thu Sep 12, 2013 11:10 pm

Wow, thanks for the reply!
based on what you said, I'm pretty sure I know the exact problem that occured. I noticed when I was looking over my vmus after the incident that Cave Story, which I was trying out recently had made a shit ton of files that actually filled up the first VMU. not sure how, but it must have overwritten PSIV or else maybe it was an issue with swapping the VMUs around (I have had to do that a few times recently for various reasons).
I would very much appreciate it if you could make a conversion program, but I can understand if you didn't have time or something. I definately couldn't convert it by hand because I have next to no experience using a hex editor anyways. Not without some kind of an in depth tutorial anyhow.
Thanks, in any case.
Wyrd bi∂ ful aræd
BlackAura2
DCEmu Newbie
DCEmu Newbie
Posts: 3
Joined: Wed Sep 11, 2013 9:15 pm

Re: Question about Genesis Plus DC save file

Post by BlackAura2 » Sun Sep 15, 2013 1:07 am

I have a (very) rough conversion program, which might work. I've attached a converted Phantasy Star 4 save file. I'll put the converter up somewhere as well, when I get a chance to compile a Windows version of it.
Attachments
Phantasy Star IV Save.zip
Phantasy Star 4 save file
(1.13 KiB) Downloaded 38 times
User avatar
TheRedFox
Insane DCEmu
Insane DCEmu
Posts: 152
Joined: Tue Aug 05, 2008 1:57 pm

Re: Question about Genesis Plus DC save file

Post by TheRedFox » Sun Sep 15, 2013 1:37 pm

Thanks!
Incedentally, I actually use Linux rather than Windows (though I have access to Windows), but I need to have at least a makefile to be able to compile something, because I never learned how to write a makefile.
Wyrd bi∂ ful aræd
BlackAura2
DCEmu Newbie
DCEmu Newbie
Posts: 3
Joined: Wed Sep 11, 2013 9:15 pm

Re: Question about Genesis Plus DC save file

Post by BlackAura2 » Sun Sep 15, 2013 6:39 pm

OK, this should work on Linux (only tested it on a Mac so far, but it does build with both Clang and GCC, so it should be fine).

Basically, build it using the makefile. You'll get a binary called convert_save. You need both the original ROM file (it pulls information it needs out of the header), and the save you want to convert. Run it like:

Code: Select all

./convert_save rom_file_name.bin save_file_name.srm
That will spit out a (hopefully) working .gps file in the current directory.
Attachments
convert_save.zip
Genesis Plus / DC Save Converter
(4.4 KiB) Downloaded 40 times
Last edited by BlackAura2 on Sun Sep 15, 2013 10:47 pm, edited 1 time in total.
User avatar
TheRedFox
Insane DCEmu
Insane DCEmu
Posts: 152
Joined: Tue Aug 05, 2008 1:57 pm

Re: Question about Genesis Plus DC save file

Post by TheRedFox » Sun Sep 15, 2013 10:16 pm

Thanks. I will try it once I have some time and report back.
EDIT: my first attempt was unsuccessful. Everything looks good, but it still fails to bring up the continue option, However, I have one more thing that I'm gonna try, because the ROM on the Genesis+ iso might have a slightly different name than the one that I have on my Hard Drive, for some reason, so I'll see if I still have the uniso'd files for Genesis+ somewhere.
Otherwise, I noticed that you said in your description save-file-name.src. I assumed it was a typo and used my regular srm file, but if it was not, in fact, a typo, then it's possible that I had the SRAM in the wrong format or something.
EDIT 2: I checked to see if the original file was named differently, and it was (P-STAR4.bin vs pstar4.bin). I don't know why I would change the name, but I did. Still wasn't enough though :( . It's still possible I'm doing something wrong, but I'm not sure what.
Wyrd bi∂ ful aræd
Post Reply