Exemple #1
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;
                }
            }
        }
Exemple #2
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;
                }
            }
        }
Exemple #3
0
        /// <summary>
        /// Load DOS options values from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options DOS data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "xms":
                    XMS = SimpleIniParse.GetBool(data.Value);
                    break;

                case "ems":
                    EMS = SimpleIniParse.GetBool(data.Value);
                    break;

                case "umb":
                    UMB = SimpleIniParse.GetBool(data.Value);
                    break;

                case "keyboardlayout":
                    KeyboardLayout = new KeyboardLayout(data.Value.ToString());
                    break;

                default:
                    break;
                }
            }
        }
        /// <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;
                }
            }
        }
        /// <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;
                }
            }
        }
Exemple #6
0
        /// <summary>
        /// Load IPX options values from dictionary
        /// </summary>
        /// <param name="dictionary">Dictionary with options IPX data</param>
        public override void LoadDictionary(IDictionary <string, object> dictionary)
        {
            foreach (var data in dictionary)
            {
                switch (data.Key)
                {
                case "ipx":
                    IPX = SimpleIniParse.GetBool(data.Value);
                    break;

                default:
                    break;
                }
            }
        }
Exemple #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;
                }
            }
        }
Exemple #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;
                }
            }
        }
Exemple #9
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;
                }
            }
        }