// Detect It Easy: detection rule file
// Author: BJNFNE <bjnfne@web.de>

// https://www.psdevwiki.com/ps3/PS2_Savedata
meta("format", "PS2 Memory Card");

function detect() {
    if (Binary.compare("'Sony PS2 Memory Card Format'20")) {
        var versionNumber = Binary.getString(28, 7).trim();

        if (/^\d+\.\d+\.\d+\.\d+$/.test(versionNumber)) {
            sVersion = versionNumber;
            bDetected = true;
        }
    }

    return result();
}