ROM Hack [Request] Skyward Sword HD Save editor/Converter

  • Thread starter Thread starter SAIYAN48
  • Start date Start date
  • Views Views 21,750
  • Replies Replies 25
  • Likes Likes 1
So, I have been tinkering with an editor but hadn't got to the CRC/Checksum issue. The only reason the Wii editor needs Wii keys is that it's expecting to work on saves exported to SD cards (not the wiiking2.sav file itself) which are encrypted with an AES key shared between all Wiis. It's not relevant here as we'd only ever be working on the unencrypted save.

That being said, I quickly adapted what little editor I had to load Wii files (I had an unencrypted save hanging around in my Dolphin setup, there's also Wii homebrew that will dump unencrypted saves) and it sort of worked. I say sort of because I could get the quantities for materials/bugs loaded correctly by switching to reading data as big-endian; I have no idea how that would affect all the other flags in the save file meaning that a converter would first have to thoroughly document every part of the save file on both the Wii and Switch to guarantee a proper conversion.

On the subject of the checksums, using the information from Antidote I was able to get a CRC32 calculating correctly for the Wii version. However I could not get the same calculation working for the Switch save — it would appear some combination of the polynomial, initial value, and final XOR value have been changed (or I'm missing something else, as I only barely follow the maths for CRC calculation). These are not impossible to figure out, but outside of the scope of what work I'm willing to put in. Not to mention the data at 0x1D890 and 0x1D9B0 which does not appear to exist on the Wii (it only has an extra 0x80 bytes after the third save slot) would also need to be figured out. If someone else gave me the information I need I'd happily implement it and upload what I have, but for now cheat codes/memory editing looks like it will be the more reliable option for tweaking your save unless we can get someone skilled in reverse-engineering such things on the case.

Edit:
The extra 0x80 bytes are the end of the Wii file appear to be a copy of the skip.dat file. This is similar on the Switch, except for the fact that skip.dat is 0xA0 bytes and in my save the data in wiiking2.sav was not a 100% mirror of the accompanying skip.dat.
 
Last edited by BtEtta, , Reason: More information
I wish the save files had a completely different structure. Now it almost feels like it's possible, but yet still out of reach.
I'm halfway through the game on Wii version and just realized the switch HD one runs so much better. Would be nice if I you could hop over just like that. Well, the universe is never kind.
 
  • Like
Reactions: Carller0
I managed to do some sort of hacky save editing with my save and @Lacius '.
So what I did was merging my first save file slot (Normal mode) with Lacius' 2nd save file slot (Hero Mode).
I did some tests, and while most failed, at the end I managed to make it work.

So here's how I pulled it off:
  • According to Antidote's notes, the save file structure from Skyward Sword HD is, for a major part of it, almost identical to that of the Wii's save data. There's still the header, which occupies the first 0x20 bytes of the wiiking2.sav file, and then you have 0x53C0 bytes for each save file.
  • With that info, 1st Save slot begins at 0x53E0 (which is the 0x20 bytes of the header + 0x53C0 of the first save) in the wiiking2.sav, 2nd save beings at 0xA7A0 and the 3rd save begins at 0xFB60.
  • Now here comes the tricky part...
    Copy-pasting any of the save files into another .sav file won't work, if you end up doing that, you end up with a corrupted file in whichever slot you copied into the .sav file.
    For the following things, which I assume are additional checksums of sorts, can't tell which ones yet (possibly MD5?), we need to go to 0x1D890 and 0x1D9B0.
  • The data at 0x1D890 I am not sure what it is. It's a pair of bytes, and the second one always seems to be 07 for me. Only the one exactly at 0x1D890 might need to be changed, but I am unsure if this one is required to be changed or not. I changed this one to the exact same value I had from the save file I was copying the data from. It was A0, and in my original save it was 22, so I left it as 22 (even though I don't know what this one does).
  • Last, we have what seems to be the additional checksums per-file.
    We have a set of 0x10 bytes of data at 0x1D9B0, which are duplicated at 0x1DA04. I copied the whole section from 0x1D9B0 up to 0x1DA20. This seems to be data related to corruption/checksum of the 1st save slot. 2nd slot and 3rd slot follow after those addresses in a very similar pattern, you can easily make them up in between all the 00s. Though, it's worth noting that we have 4 patterns in a similar manner, so one of those could be for the Autosave (unsure which one corresponds to 2nd, 3rd and Autosave, some trial and error might help, but I'm sure those are related to the slots checks).

  • Since I wanted my 1st save slot to be the one I played in Normal Mode with my name, I pasted the whole save data of the 1st save slot from mine from 0x20 - 0x53E0 to the other save, and then the extra checks from 0x1D9B0 - 0x1DA20 into the other file too. With that, I saved the wiiking2.sav changes in the Hex editor (HxD), and then imported the test save back with Edizon... And voala! I had my 1st slot Normal Mode save working, alongside the Hero mode save in the 2nd slot.
I have attached my modified save for those curious to check.
Hopefully this helps towards a creation of a proper save editor for Skyward Sword HD.
I know Antidote's save editor for the Wii version could be easily modified to take into account the new HD version stuff, it's just a matter of adding the proper code for this, and it should be feasible.
Sadly, that amount of advanced coding is out of my hands, so I'll leave that to a more experienced programmer, I feel my research here was quite fruitful for those wanted to dive into the save stuff properly.
I've been searching the web for days now and this is the closest I have found to a solution. Sorry to resurrect such an old topic, but do. You guys know if there was any progress to import a save slot from wii to switch? Or any help/tips on how to use the hex editor to do it myself?
(never messed with a hex editor before, but I'm more than capable to follow instructions)
Any help would be much appreciated.

Thanks in advance to anyone who replies this! (and sorry for those who may feel annoyed to receive a new notification from such an old thread)
 

Site & Scene News

Popular threads in this forum