Ninjiteu/N64SaveConverter

Not working for Retroarch SRM file?

Deozaan opened this issue · 10 comments

I'm trying to convert my Banjo Kazooie save from SRM to EEP to use with this Banjo Kazooie Save Editor that only reads/writes EEP files.

My SRM file is only 739 bytes. When I convert it using N64SaveConverter, it becomes a 2 kB EEP file. But BKSaveEditor tells me it's not a valid save. So I tried the pad/trim option to convert the SRM file to 290 kB and then converting it to a 2 kB EEP file but BKSaveEditor still tells me it's not a valid file.

I'm not sure if the problem is with my save being an invalid save format, or N64SaveConverter isn't doing its job correctly, or if the resulting EEP file is valid and the problem lies with BKSaveEditor.

I'd appreciate some insight from someone more knowledgeable on the subject. I can upload my SRM file for troubleshooting if that's not taboo.

The N64 has two kinds of EEP saves, 4 kilobit (512 bytes) and 16 kilobit (2 kilobytes). However, my app uses 2 kilobytes for both of these eep save types. This means that 16 kilobit (2 kilobytes) save types are unchanged and remain 2 kilobytes. But the 4 kilobit (512 bytes) save types are padded with an extra 1.5 kilobytes to make them 2 kilobytes as well. The reason for this is because some emulators require that ALL eeps be 2 kilobytes. Additionally it makes it easier for my app to treat both eeps the same way. Emulators typically don't have an issue reading in saves that are longer than expected. But they usually crash when the save files are shorter than expected. I tried to make my app compatible with as many emulators/devices as possible. And this is why my app works this way.

In your case, I've never tried this Banjo Kazooie save editor. My guess is that it expects a save file that is exactly 512 bytes. And crashes if the file is larger than this. I believe the solution for your issue is to use a hex editor and trim everything after 512 bytes. (I don't know why your SRM is 739 bytes. but that's not a standard size for eeps). I'm guessing everything after 512 bytes is garbage data.

Actually I tried out that Banjo Kazooie save editor just now. And yes, it doesn't like 2 kilobyte eeps. So I trimmed it to 512 bytes and then it worked. See if that works for you.

I've modified a value here and there in a hex editor before, but I'm not super familiar with what I'm doing. That said, I trimmed the converted EEP down so now it says it is only 512 bytes but BKSaveEditor still does not work for me with the 512 byte file. I'm assuming at this point that PEBKAC applies here, but I'm not sure what I'm doing wrong.

EDIT: Perhaps I should state that the SRM file is being created from the Steam version of RetroArch with the Mupen64Plus-Next core. Just in case that makes a difference in the file format.

Email your SRM to ninjithelonebishounen@gmail.com

I'll take a look at it and see if I can get it to work for you.

Sent. Thank you.

Yes, I got it and it worked. Thank you. The issue was that I had enabled SaveRAM compression in RetroArch settings, which resulted in these tiny, non-standard SRM files.

Thank you for your help!

I've asked the creator of BKSaveEditor to support files larger than 512 bytes so that that won't be necessary.