Skip to content

Instantly share code, notes, and snippets.

@welcoMattic
Forked from HoLyVieR/gist:1616679
Last active January 2, 2024 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save welcoMattic/2a2909e5b98aa8d745dfd0df0a6b3091 to your computer and use it in GitHub Desktop.
Save welcoMattic/2a2909e5b98aa8d745dfd0df0a6b3091 to your computer and use it in GitHub Desktop.
Gameplay - Export SAV file
// Getting the data //
var filename = "ROM_NAME";
var rawData = base64ToArray(findValue("B64_SRAM_" + filename)).map(function (a) { return String.fromCharCode(a); }).join("");
var tmpLink = document.createElement("a");
tmpLink.href = "data:application/force-download," + escape(rawData);
document.body.appendChild(tmpLink);
@jbmorley
Copy link

That's awesome. What emulator are you using this with?

@welcoMattic
Copy link
Author

welcoMattic commented Aug 29, 2016

@jbmorley
Copy link

👍 Have you successfully imported that into a different (desktop?) emulator?

@welcoMattic
Copy link
Author

Yes, in to Gba4iOS

@guiohm21
Copy link

guiohm21 commented Jan 6, 2017

Hello, I can not download my file.sav from my backup on my iphone.
Do I need GitHub Desktop first?
I do not know the open source: /

Thank you ;)

@MarceloZeri
Copy link

MarceloZeri commented Feb 1, 2017

@welcoMattic How do I decode it back to a sav file? I got a text starting with this:

%10%10%10%10%10%10%1E%1F%1E%1F%10%10%10%10%10%10()%10%10%10%10%10%10%10%10.%2F.%2F%10%10%10%10%10%1089%10%1

Thanks.

Edit:

It worked! The sav file worked fine in both OpenEmu and gba4ios.
I took the contents of saveState.B64_SRAM_POKEMON_GLD (<= my rom of pokemon gold), saved it in a text file and decode it back from base64 using this online tool: http://www.motobit.com/util/base64-decoder-encoder.asp

@zensir
Copy link

zensir commented Apr 18, 2017

many thanks for this! I would love to use this to import my .sav to my LSDJ cartridge. any instructions on how to use this script would be apreciated. thanks for sharing this!

@Xanol13
Copy link

Xanol13 commented May 8, 2017

Can anyone tell me how to execute this? Would this be on iOS, or from PC? The code looks very good but I just don't know how to use it to extract a Game Play Color save.

@MikeG1990
Copy link

@jbmorley any updates on getting the save file exported?

@fankimm
Copy link

fankimm commented Jan 21, 2019

@MarceloZeri can you tell how to excute this script?

I tried this but it doesn't work... please help me

plzhelp

@fankimm
Copy link

fankimm commented Jan 21, 2019

@welcoMattic How do I decode it back to a sav file? I got a text starting with this:

%10%10%10%10%10%10%1E%1F%1E%1F%10%10%10%10%10%10()%10%10%10%10%10%10%10%10.%2F.%2F%10%10%10%10%10%1089%10%1

Thanks.

Edit:

It worked! The sav file worked fine in both OpenEmu and gba4ios.
I took the contents of saveState.B64_SRAM_POKEMON_GLD (<= my rom of pokemon gold), saved it in a text file and decode it back from base64 using this online tool: http://www.motobit.com/util/base64-decoder-encoder.asp

please help me out

@fankimm
Copy link

fankimm commented Jan 26, 2019

How to import .sav files to Game Play Color
https://www.youtube.com/watch?v=t56EQPtCA3w&feature=youtu.be
How to export .sav file from Game Play Color https://youtu.be/H5MI1CRyL0E

@LetsPlay75
Copy link

Please help.. how do I export it to my windows 10?

@Huse24
Copy link

Huse24 commented Jan 2, 2024

Hello. Im new to using github and would like to export my sav file from gameplay. how do you use the code without having a mac?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment