package turgen.decoder;

import java.io.Serializable;

public final class DecoderConfig implements Serializable {
    
    public static final int PL_TURBO_ROM_FILE_FORMAT_BINARY=0;
    public static final int PL_TURBO_ROM_FILE_FORMAT_BASIC=1;
    
    public static final int PL_LOWER_SILESIA_TURBO_2000_FORMAT_AUTOTURBO=0;
    public static final int PL_LOWER_SILESIA_TURBO_2000_FORMAT_UE_UNPROTECTED=1;
    public static final int PL_LOWER_SILESIA_TURBO_2000_FORMAT_UE_PROTECTED=2;
    public static final int PL_LOWER_SILESIA_TURBO_2000_FORMAT_FC10_PROTECTED=3;
    
    /*General settings*/
    public boolean genPrependSampleNumber;
    public boolean genIgnoreBadSum;
    public boolean genPreferAdaptiveSpeedDetection;
    
    /*Monitor mode settings*/
    public boolean monitorSaveAllBytes;
    
    /*Turbo 2000 and Super Turbo (Czechoslovakia)*/
    public boolean csTurboSaveHeaderToExtraFile;
    public boolean csTurboAlwaysSaveAsBinary;
    
    /*Turbo ROM*/
    public int turboROMFileFormat;
    
    /*Lower Silesia Turbo 2000*/
    public int lowerSilesiaTurbo2000FileFormat;
    public boolean lowerSilesiaTurbo2000Verbose;
    
    /*Hard turbo*/
    public boolean hardTurboVerbose;
    

    public void csTurboDefaults() {
        csTurboSaveHeaderToExtraFile=false;
        csTurboAlwaysSaveAsBinary=false;
    }
    
    public void turboROMDefaults() {
        turboROMFileFormat=PL_TURBO_ROM_FILE_FORMAT_BINARY;
    }
    
    public void lowerSilesiaTurbo2000Defaults() {
        lowerSilesiaTurbo2000FileFormat=PL_LOWER_SILESIA_TURBO_2000_FORMAT_AUTOTURBO;
        lowerSilesiaTurbo2000Verbose=true;
    }
    
    public void hardTurboDefaults() {
        hardTurboVerbose=true;
    }

    public void monitorDefaults() {
        monitorSaveAllBytes=false;
    }

    public void generalDefaults() {
        genPrependSampleNumber=true;
        genPreferAdaptiveSpeedDetection=false;
        genIgnoreBadSum=false;
    }
    

    void setAllDefaults() {
        generalDefaults();
        monitorDefaults();
        csTurboDefaults();
        turboROMDefaults();
        lowerSilesiaTurbo2000Defaults();
        hardTurboDefaults();
    }

    public DecoderConfig() {
        setAllDefaults();
    }



}
