StaticbyteSwaps bytes in a Uint8Array.
Uint8Array to swap bytes in
Determine if the input array should be modified in place (default: false, returns a new Uint8Array)
Swapped bytes Uint8Array
StaticdetectStaticdetectStaticdetectDetect the FileFormat based on size SRA: < 0x8000 bytes (32KB) SRM: 0x48800 (contains EEPROM, MemPak, SRAM, FlashRAM sections)
StaticloadLoad a save file from either format and always return the core SRA save
to load the save file data from, is also used for automatic format detection
StaticloadStaticsaveWrites the savefile to disk in the desired file format
to write the file to
save file format to write
savefile data to write
force a byte swap before writing (when converting from SRA to SRM the swap will be done automatically, force swapping will reverse the effect in that case)
Detects the FileFormat of save file (SRA or SRM) based on file size and returns the appropriate SaveFile instance.