// Detect It Easy: detection rule file
// Author: hypn0 <hypn0@mail.ru>

meta("cruncher", "Crunch-Mania by Thomas Schwarz");

function detect() {
    if (Amiga.compareEP("48e7ffff43fa....2c78....4eae....2c40")) {
        sVersion = "1.8t-1.91";
        sOptions = "Library/Huffman";
        bDetected = true;
    } else if (Amiga.compareEP("48e7ff..3c3c....49fa....4e..4e..4e")) {
        sVersion = "1.8t-1.91";
        sOptions = "Huffman (type 1)";
        bDetected = true;
    } else if (Amiga.compareEP("49fa....7c..4e944e914e942449")) {
        sVersion = "1.8t-1.91";
        sOptions = "Huffman (type 2)";
        bDetected = true;
    } else if (Amiga.compareEP("48e7ffff7c..49fa....4e94....4e")) {
        sVersion = "1.8t-1.91";
        sOptions = "Huffman (type 3)";
        bDetected = true;
    } else if (Amiga.compareEP("7c..49fa....4e944e914e942449")) {
        sVersion = "1.8t-1.91";
        sOptions = "Huffman (type 4)";
        bDetected = true;
    } else if (Amiga.compareEP("4e7148e7ffff3c3c....49fa....4e944e914e942449")) {
        sVersion = "1.8t-1.91";
        sOptions = "Huffman (type 5)";
        bDetected = true;
    } else if (Amiga.compareEP("48e7fffe45fa....43f9........221a241a47ea")) {
        sVersion = "1.9t-1.91";
        sOptions = "Address/Huffman";
        bDetected = true;
    } else if (Amiga.compareEP("48e77fff33fc............33fc............33fc............33fc............45fa....49f9........204c")) {
        sVersion = "1.9t-1.91";
        sOptions = "Address/Pro";
        bDetected = true;
    } else if (Amiga.compareEP("4ff9........48e7fffe4bf9........1abc....1abc....1abc")) {
        sVersion = "1.9t";
        sOptions = "Address/Pro/Huffman";
        bDetected = true;
    } else if (Amiga.compareEP("48e77fff45fa....43f9........221a241a47ea....b7c96f")) {
        sVersion = "1.4-1.91";
        sOptions = "Address";
        bDetected = true;
    } else if (Amiga.compareEP("48e7ffff45fa....221a241a224a287a....d9ccd9cc")) {
        sVersion = "1.4-1.91";
        sOptions = "Simple";
        bDetected = true;
    } else if (Amiga.compareEP("........3c3c....49fa....4e944e914e94244952")) {
        sVersion = "1.4-1.91";
        sOptions = "type 1";
        bDetected = true;
    } else if (Amiga.compareEP("48e7fffe41fa....d1fc........4ed04e94244952")) {
        sVersion = "1.4-1.91";
        sOptions = "type 2";
        bDetected = true;
    } else if (Amiga.compareEP("48e7ffff7c..4e7149fa....4e944e914e94244952")) {
        sVersion = "1.4-1.91";
        sOptions = "type 3";
        bDetected = true;
    } else if (Amiga.compareEP("4ff9........48e77fff45fa....49f9........204c47fa....7e..28db")) {
        sVersion = "1.4-1.8t";
        sOptions = "Address/Pro";
        bDetected = true;
    } else if (Amiga.compareEP("48e7ffff43fa....2c78....4eba....2c40200e67..4eae")) {
        sOptions = "type 1";
        bDetected = true;
    }

    return result();
}