Skip to content

Instantly share code, notes, and snippets.

View HoLyVieR's full-sized avatar

Olivier Arteau HoLyVieR

  • Montreal, QC, Canada
View GitHub Profile
@HoLyVieR
HoLyVieR / gist:1616679
Created January 15, 2012 18:25
Gameboy-Online - Export SAV file
/**
* This will let you export SAV file from a ROM.
* NOTE : Just change the "filename" variable to name of the ROM.
*/
// Getting the data //
var filename = "ROM_NAME";
var rawData = JSON.parse(localStorage["SRAM_" + filename]) // Data is stored JSON format in localStorage //
.map(function (a) { return String.fromCharCode(a); }) // We convert each value in the array to the char value //
.join(""); // We make it into a big string which is the data of the save file //