MiSTer-devel / GBA_MiSTer

GBA for MiSTer
GNU General Public License v2.0
143 stars 44 forks source link

Question about converting save files containing RTC data #138

Closed euan-forrester closed 10 months ago

euan-forrester commented 10 months ago

Hello, I'm the author of savefileconverter.com

I recently had a user mention that they were unable to convert a Pokemon Emerald save file to work with the MiSTer GBA core. It seems that this specific game wants a save file that's 0x22000 bytes long, instead of the usual 0x20000 bytes.

Thanks very much for any information you're able to give me!

RobertPeip commented 10 months ago

I cannot see why the RTC data would be at the beginning, because it's at the end. (file is attached) Pokemon - Smaragd-Edition (Germany).zip

You can just generate the file with the normal size without extra data and it can be loaded, it behaves the same as adding additional zeros at the end.

Unfortunatly you cannot just add browser time, because the RTC format is the internal time of the game + the offset at point of turning mister/game off so when turned back on it can count up to the new time. So best is really just use raw data and leave RTC away.

euan-forrester commented 10 months ago

Yeah, that was the first thing I told him: to just load a regular raw save file and he said it didn't work but he'd gotten other games to work so I assumed he didn't make any mistakes with the file.

Then he gave me a sample file, which was 0x22000 bytes long. But I see yours is 0x20200 bytes. And yeah, the RTC data is much more obvious in yours.

It also makes much more sense for the core to append the RTC data to the end than to the beginning of the file.

Okay so it seems that this user is just confused. I thought that I had vetted him enough before coming here, but clearly I didn't so I apologize. Thanks for the help, and the confirmation that everything works the way I thought it would!

RobertPeip commented 10 months ago

No worries, if you have any question, don't hesitate to ask and thank you for your work!

euan-forrester commented 10 months ago

Thanks very much! You've been really helpful and kind in our interactions and in ones I've seen with other people and I really appreciate it!