DarkMatterCore / sbn64

Simple Byteswapper for N64 Saves
29 stars 2 forks source link

Should note that SBN64 can convert saves from Wii VC > WiiU VC #3

Open YaketyJoe opened 4 years ago

YaketyJoe commented 4 years ago

Hola!

I was trying to transfer my Mario Kart 64 virtual console save from the Wii to WiiU. This program worked! I am so happy that I did not lose progress and can play with the WiiU features. It should be noted in the program that this is possible.

You were asking about this in the GBAtemp forum, so here are the steps I did:

Wii VC to WiiU VC Conversion: *make sure you run the WiiVC and WiiU games and then turn the power off while running the game. This avoids creating a savestate, which will overwrite normal saves upon loading.

  1. On WiiU, use SaveMii Mod to extract both Wii and WiiU saves (this creates the correct filenames and paths on SD card)
  2. Put the Wii save and sbn64.exe in the same folder. _Below is an example of Mario Kart 64 (Savemii named the Wii save "EEPNKTE" and the WiiU save "Unkte0.024.sav")
  3. In Windows' CMD prompt, go to the correct directoy and run this: sbn64 -i "EEP_NKTE" -o "Unkte0.024.sav" -s wiivc -d wii64

            Simple Byteswapper for N64 Saves v1.73 - By DarkMatterCore
    
            Detected save type: EEPROM (128 Kbits).
    
            Conversion process successfully completed!
  4. Copy "Unkte0.024.sav" back to WiiU Mario Kart 64 path on the SD card and use SaveMii to import back to Wii U.
DarkMatterCore commented 4 years ago

Hi there. Thanks for the heads up! Have you been able to test any additional converted saves with other Wii U N64 VC titles?

I was never able to get a Wii U back in the day, so proper support for its N64 save format wasn't added into the program (not intentionally, at least). Sounds like Wii U EEPROM saves are stored using Little Endian byte order, just like EEPROM saves from PC emulators.

YaketyJoe commented 4 years ago

I have not been able to test other N64 titles. When I get time, I can try a few more.

Here are the three VC saves (Wii, Wii U original, Wii U conversion). Maybe that can help you see what the differences are in this case. I did the conversion because I saw the Wii save being 16kb, and WiiU 1kb. Converted is 2kb. So all three are different sizes, but it still worked.

MK64 Saves examples.zip

YaketyJoe commented 4 years ago

After checking here, it seems N64 had many different save formats. It appears the above info is for Mario Kart's "4Kbit EEPROM" save format.

http://micro-64.com/database/gamesave.shtml

YaketyJoe commented 4 years ago

I tried Paper Mario, which uses "1Mbit Flash RAM" and it did not need any conversion between Wii and WiiU VC.

DarkMatterCore commented 4 years ago

Nice, thanks. I'll check out the provided save files.

Were there any size differences between the Flash RAM saves from Paper Mario?

YaketyJoe commented 4 years ago

No, Paper Mario’s saves were both 128kb files, so I just tried it without conversion and it worked.

When you look at the MK64 saves I provided, please let me know if conversion was even necessary. I only did it because the file sizes were so different (1kb vs 16kb). But I’m not 100% it was a necessary step.

DarkMatterCore commented 4 years ago

I just checked the EEPROM save files. The only difference is that the Wii save is padded up to 16 KiB, but the Wii U save only takes up 512 bytes.

This, along with the fact that the Paper Mario save size was the same in both game versions and didn't need any changes at all, leads me to believe that the N64 emulator in Wii U VC releases uses Big Endian byte ordering + the exact size from the save method used by the game it's bundled with. Mario Kart 64 actually uses a 4 Kbit EEPROM (512 bytes), and Paper Mario uses a 1 Mbit FlashRAM (128 KiB).

The Wii U N64 VC emulator is capable of tolerating save file size differences, while the Wii N64 VC emulator isn't. This explains why the "converted" EEPROM save worked fine with Mario Kart 64, even though it was actually bigger than the original save file.

Adding proper support for Wii U N64 saves should be easy, but more tests are needed. I'd really like to take a look at save files from games that use other save methods.

DarkMatterCore commented 4 years ago

@YaketyJoe I've been looking for people with a Wii U and at least one of the N64 VC games that use a different same method on my own. Proper support for Wii U savegames is something I wish to accomplish.

Support for libretro savefiles is also on my plans.

YaketyJoe commented 4 years ago

@DarkMatterCore Hola Pablo,

Libretro support, that’s great! I have also been looking into it, and I happen to own another N64 game that uses a different save type. Will try it and send you the saves, when I get a chance.

I was wondering if you would be interested in expanding this program beyond N64 titles and support all the Virtual Consoles in Wii/WiiU/3DS? A sort of “VC Universal Save Converter”, which I think would make it an essential/popular tool in the community. The idea that you can play on the Wii, then go to emulator on PC, then play on a flashcart on real original hardware, maybe even dump the save into a real cart....and then switch back to Wii/U if you wanted to. There would be no limit to the saves. It is already possible with N64, using your tool. (Most flashcarts use the same savetype as emulators anyways, so it’s mostly conversion from Wii>>>PC)

I have looked into GBA VC on WiiU and transferring to PC (mGBA emulator), and it’s just a simple 8192 byte swap at a specific address, using a hex editor. I managed to go back and forth. Since this is too complicated for most players, your tool could facilitate this.

Would you be interested?

DarkMatterCore commented 4 years ago

@YaketyJoe Thanks a lot! I'll be waiting for your additional input on this matter. 😃

And sure, I'm more than open to that idea. I'll need time to get familiar with all the save methods use by the consoles emulated in VC releases across Wii, Wii U and 3DS, though, as well as save methods use by PC emulators (Snes9x, VBA, mGBA, etc.).

YaketyJoe commented 4 years ago

Awesome, thanks for your interest. Here is a GBA save as an example, from the game "Gunstar Super Heroes" USA. WiiU Save: data_008_0000.bin mGBA SAVE: Gunstar Super Heroes (USA).sav

In the WiiU BIN file, using a Hex editor, always select from x4080 a total of 8192 bytes. The just paste to overwrite all of the MGBA save file. Do the reverse to send back to WiiU. WiiU GBA saves always have the same filename (data_008_0000.bin) so it’s even simpler.

GBA-GuntarSuperHeroes-saves.zip

MORE INFO: https://gbatemp.net/threads/using-your-gba-savegames-sav-on-wii-u-vc-bin.522864/ https://gbatemp.net/threads/gba-virtual-console-save-conversion.460839/ https://gbatemp.net/threads/tutorial-bring-your-wiiu-gba-saves-to-3ds-gba-vc.464919/

DarkMatterCore commented 4 years ago

Thanks for the provided information. I'll check it out.

Zaybomb commented 2 years ago

Hey, I know this thread is dead, but how do you extract a paper mario 64 save from vwii and then use it for wii u VC? I dont understand

Zaybomb commented 2 years ago

I have the data.bin but what do i do now?

Zaybomb commented 2 years ago

wait

Zaybomb commented 2 years ago

yeah I dont get it. I have the data.bin, where do I go from here to make it work for wii u vc paper mario 64?

Zaybomb commented 2 years ago

I got it