示例#1
0
        /// <summary>
        /// Load GUS options values from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options GUS data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "gus":
                    GUS = SimpleIniParse.GetBool(data.Value);
                    break;

                case "gusrate":
                    GusRate = SimpleIniParse.GetEnum <SampleRate>(data.Value);
                    break;

                case "gusbase":
                    GusBase = SimpleIniParse.GetEnum <IOAddress>(data.Value);
                    break;

                case "gusirq":
                    GusIRQ = SimpleIniParse.GetEnum <IRQ>(data.Value);
                    break;

                case "gusdma":
                    GusDMA = SimpleIniParse.GetEnum <DMA>(data.Value);
                    break;

                case "ultradir":
                    UltraDir = data.Value.ToString();
                    break;

                default:
                    break;
                }
            }
        }
示例#2
0
        /// <summary>
        /// Load Mixer options value from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options DosBox data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "nosound":
                    NoSound = SimpleIniParse.GetBool(data.Value);
                    break;

                case "rate":
                    Rate = SimpleIniParse.GetEnum <SampleRate>(data.Value);
                    break;

                case "blocksize":
                    BlockSize = SimpleIniParse.GetEnum <MixerBlockSize>(data.Value);
                    break;

                case "prebuffer":
                    PreBuffer = SimpleIniParse.GetUInt(data.Value);
                    break;

                default:
                    break;
                }
            }
        }
示例#3
0
        /// <summary>
        /// Load Joystick options values from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options Joystick data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "joysticktype":
                    JoystickType = SimpleIniParse.GetEnum <Joystick>(data.Value);
                    break;

                case "timed":
                    Timed = SimpleIniParse.GetBool(data.Value);
                    break;

                case "autofire":
                    AutoFire = SimpleIniParse.GetBool(data.Value);
                    break;

                case "swap34":
                    Swap34 = SimpleIniParse.GetBool(data.Value);
                    break;

                case "buttonwrap":
                    ButtonWrap = SimpleIniParse.GetBool(data.Value);
                    break;

                default:
                    break;
                }
            }
        }
示例#4
0
        /// <summary>
        /// Load Speaker options values from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options Speaker data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "pcspeaker":
                    PCSpeaker = SimpleIniParse.GetBool(data.Value);
                    break;

                case "pcrate":
                    PCRate = SimpleIniParse.GetEnum <SampleRate>(data.Value);
                    break;

                case "tandy":
                    Tandy = SimpleIniParse.GetEnum <OnOffAuto>(data.Value);
                    break;

                case "tandyrate":
                    TandyRate = SimpleIniParse.GetEnum <SampleRate>(data.Value);
                    break;

                case "disney":
                    Disney = SimpleIniParse.GetBool(data.Value);
                    break;

                default:
                    break;
                }
            }
        }
示例#5
0
        /// <summary>
        /// Load DosBox options value from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options DosBox data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "language":
                    Language = data.Value.ToString();
                    break;

                case "machine":
                    Machine = SimpleIniParse.GetEnum <DosBoxMachine>(data.Value);
                    break;

                case "captures":
                    Captures = data.Value.ToString();;
                    break;

                case "memsize":
                    MemSize = SimpleIniParse.GetUInt(data.Value);
                    break;

                default:
                    break;
                }
            }
        }
示例#6
0
        /// <summary>
        /// Load CPU options value from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options DosBox data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "core":
                    Core = SimpleIniParse.GetEnum <CPUCore>(data.Value);
                    break;

                case "cputype":
                    CPUType = SimpleIniParse.GetEnum <CPUType>(data.Value);
                    break;

                case "cycles":
                    Cycles = new CPUCycles(data.Value.ToString());
                    break;

                case "cycleup":
                    CycleUp = SimpleIniParse.GetUInt(data.Value);
                    break;

                case "cycledown":
                    CycleDown = SimpleIniParse.GetUInt(data.Value);
                    break;

                default:
                    break;
                }
            }
        }
示例#7
0
        /// <summary>
        /// Load Sound Blaster options value from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options DosBox data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "sbtype":
                    SBType = SimpleIniParse.GetEnum <SoundBlaster>(data.Value);
                    break;

                case "sbbase":
                    SBBase = SimpleIniParse.GetEnum <IOAddress>(data.Value);
                    break;

                case "irq":
                    IRQ = SimpleIniParse.GetEnum <IRQ>(data.Value);
                    break;

                case "dma":
                    DMA = SimpleIniParse.GetEnum <DMA>(data.Value);
                    break;

                case "hdma":
                    HDMA = SimpleIniParse.GetEnum <DMA>(data.Value);
                    break;

                case "sbmixer":
                    SBMixer = SimpleIniParse.GetBool(data.Value);
                    break;

                case "oplmode":
                    OplMode = SimpleIniParse.GetEnum <OplMode>(data.Value);
                    break;

                case "oplemu":
                    OplEmu = SimpleIniParse.GetEnum <OplEmu>(data.Value);
                    break;

                case "oplrate":
                    OplRate = SimpleIniParse.GetEnum <SampleRate>(data.Value);
                    break;

                default:
                    break;
                }
            }
        }
示例#8
0
        /// <summary>
        /// Load Render options value from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options Render data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "frameskip":
                    Frameskip = SimpleIniParse.GetUInt(data.Value);
                    break;

                case "aspect":
                    Aspect = SimpleIniParse.GetBool(data.Value);
                    break;

                case "scaler":
                    Scaler = SimpleIniParse.GetEnum <ScalerType>(data.Value);
                    break;

                default:
                    break;
                }
            }
        }
示例#9
0
        /// <summary>
        /// Load Midi options values from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options Midi data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "mpu401":
                    MPU401 = SimpleIniParse.GetEnum <MPU401>(data.Value);
                    break;

                case "mididevice":
                    MidiDevice = SimpleIniParse.GetEnum <MidiDevice>(data.Value);
                    break;

                case "midiconfig":
                    MidiConfig = data.Value.ToString();
                    break;

                default:
                    break;
                }
            }
        }
示例#10
0
        /// <summary>
        /// Load SDL options values from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options SDL data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "fullscreen":
                    FullScreen = SimpleIniParse.GetBool(data.Value);
                    break;

                case "fulldouble":
                    FullDouble = SimpleIniParse.GetBool(data.Value);
                    break;

                case "fullresolution":
                    FullResolution = (Resolution)data.Value.ToString();
                    break;

                case "windowresolution":
                    WindowResolution = (Resolution)data.Value.ToString();
                    break;

                case "output":
                    Output = SimpleIniParse.GetEnum <VideoOutput>(data.Value);
                    break;

                case "autolock":
                    AutoLock = SimpleIniParse.GetBool(data.Value);
                    break;

                case "sensitivity":
                    Sensitivity = SimpleIniParse.GetInt(data.Value);
                    break;

                case "waitonerror":
                    WaitOnError = SimpleIniParse.GetBool(data.Value);
                    break;

                case "priority":
                    if (data.Value is System.Collections.IList priority && priority.Count > 0)
                    {
                        PriorityFocused = SimpleIniParse.GetEnum <PriorityLevel>(priority [0]);

                        if (priority.Count > 1)
                        {
                            PriorityMinimized = SimpleIniParse.GetEnum <PriorityLevel>(priority[1]);
                        }
                    }
                    break;

                case "mapperfile":
                    MapperFile = data.Value?.ToString();
                    break;

                case "usescancodes":
                    UseScanCodes = SimpleIniParse.GetBool(data.Value);
                    break;

                default:
                    break;
                }
            }
        }