RecordStore Management System Save Format Specification 1.1.0

Any data saved from RecordStore is saved to disk in an easy to parse format which includes a JSON metadata file along with the individual records in their own binary files. This makes it simple to implement and allows for efficient handling of save data and for the transfer of such data between different emulators. The format is derived from SquirrelJME's save format with modifications, note that SquirrelJME now follows this specification.

This specification is implemented by:

There are two main file formats:

[baseName].rms -- RecordStore Metadata

Specific types:

The following JSON keys are defined:

baseName Calculation

The baseName hash is calculated as:

public class BaseNameCalculation
{
    public static String calculate(String __ownerName,
        String __ownerVendor, String __recordName)
    {
        /* Encoded with the Basic alphabet: A-Z a-z + / = */
        String base64Encoded = Base64.getEncoder()
            .encodeToString(__recordName.getBytes("utf-8"))
            .toLowerCase()
            .replace('=', '_')
            .replace('/', '~');
        
        return String.format("%08x%02d%s",
            __ownerName.hashCode() ^ __ownerVendor.hashCode(),
            __recordName.length(),
            base64Encoded);
    }
}

DoJa/Star Scratchpads

For DoJa/Star Scratchpads, the following metadata values are always set with the specific values:

All scratchpad data for the given scratchpad is placed into the first record ID of one (1).

[baseName].[recordId] -- Individual record data

This is solely a flat binary file with no headers, footers, or otherwise. It consists only of the bytes that were passed to RecordStore.addRecord() or RecordStore.setRecord().

Changelog