Annotation of hatari/src/configuration.c, revision 1.1.1.25

1.1       root        1: /*
1.1.1.6   root        2:   Hatari - configuration.c
                      3: 
1.1.1.20  root        4:   This file is distributed under the GNU General Public License, version 2
                      5:   or at your option any later version. Read the file gpl.txt for details.
1.1       root        6: 
                      7:   Configuration File
                      8: 
1.1.1.6   root        9:   The configuration file is now stored in an ASCII format to allow the user
                     10:   to edit the file manually.
1.1       root       11: */
1.1.1.14  root       12: const char Configuration_fileid[] = "Hatari configuration.c : " __DATE__ " " __TIME__;
1.1.1.10  root       13: 
1.1.1.21  root       14: #include <SDL_keyboard.h>
1.1.1.25! root       15: #include <SDL_joystick.h>
1.1       root       16: 
                     17: #include "main.h"
                     18: #include "configuration.h"
1.1.1.9   root       19: #include "cfgopts.h"
1.1.1.8   root       20: #include "audio.h"
1.1.1.17  root       21: #include "sound.h"
1.1.1.5   root       22: #include "file.h"
1.1.1.9   root       23: #include "log.h"
                     24: #include "m68000.h"
1.1.1.12  root       25: #include "memorySnapShot.h"
                     26: #include "paths.h"
1.1.1.9   root       27: #include "screen.h"
1.1.1.22  root       28: #include "statusbar.h"
1.1.1.9   root       29: #include "vdi.h"
                     30: #include "video.h"
1.1.1.17  root       31: #include "avi_record.h"
                     32: #include "clocks_timings.h"
1.1.1.20  root       33: #include "68kDisass.h"
1.1.1.21  root       34: #include "fdc.h"
1.1.1.22  root       35: #include "dsp.h"
                     36: #include "joy.h"
1.1.1.23  root       37: #include "falcon/crossbar.h"
1.1.1.24  root       38: #include "stMemory.h"
1.1.1.6   root       39: 
                     40: 
                     41: CNF_PARAMS ConfigureParams;                 /* List of configuration for the emulator */
1.1.1.7   root       42: char sConfigFileName[FILENAME_MAX];         /* Stores the name of the configuration file */
1.1.1.6   root       43: 
                     44: 
1.1.1.9   root       45: /* Used to load/save logging options */
                     46: static const struct Config_Tag configs_Log[] =
                     47: {
                     48:        { "sLogFileName", String_Tag, ConfigureParams.Log.sLogFileName },
1.1.1.13  root       49:        { "sTraceFileName", String_Tag, ConfigureParams.Log.sTraceFileName },
1.1.1.9   root       50:        { "nTextLogLevel", Int_Tag, &ConfigureParams.Log.nTextLogLevel },
                     51:        { "nAlertDlgLogLevel", Int_Tag, &ConfigureParams.Log.nAlertDlgLogLevel },
1.1.1.12  root       52:        { "bConfirmQuit", Bool_Tag, &ConfigureParams.Log.bConfirmQuit },
1.1.1.20  root       53:        { "bNatFeats", Bool_Tag, &ConfigureParams.Log.bNatFeats },
                     54:        { "bConsoleWindow", Bool_Tag, &ConfigureParams.Log.bConsoleWindow },
1.1.1.9   root       55:        { NULL , Error_Tag, NULL }
                     56: };
                     57: 
1.1.1.16  root       58: /* Used to load/save debugger options */
                     59: static const struct Config_Tag configs_Debugger[] =
                     60: {
                     61:        { "nNumberBase", Int_Tag, &ConfigureParams.Debugger.nNumberBase },
1.1.1.24  root       62:        { "nSymbolLines", Int_Tag, &ConfigureParams.Debugger.nSymbolLines },
1.1.1.16  root       63:        { "nMemdumpLines", Int_Tag, &ConfigureParams.Debugger.nMemdumpLines },
1.1.1.24  root       64:        { "nDisasmLines", Int_Tag, &ConfigureParams.Debugger.nDisasmLines },
                     65:        { "nExceptionDebugMask", Int_Tag, &ConfigureParams.Debugger.nExceptionDebugMask },
1.1.1.20  root       66:        { "nDisasmOptions", Int_Tag, &ConfigureParams.Debugger.nDisasmOptions },
                     67:        { "bDisasmUAE", Bool_Tag, &ConfigureParams.Debugger.bDisasmUAE },
1.1.1.24  root       68:        { "bSymbolsResident", Bool_Tag, &ConfigureParams.Debugger.bSymbolsResident },
                     69:        { "bMatchAllSymbols", Bool_Tag, &ConfigureParams.Debugger.bMatchAllSymbols },
1.1.1.16  root       70:        { NULL , Error_Tag, NULL }
                     71: };
1.1.1.9   root       72: 
1.1.1.6   root       73: /* Used to load/save screen options */
1.1.1.9   root       74: static const struct Config_Tag configs_Screen[] =
1.1.1.6   root       75: {
1.1.1.13  root       76:        { "nMonitorType", Int_Tag, &ConfigureParams.Screen.nMonitorType },
                     77:        { "nFrameSkips", Int_Tag, &ConfigureParams.Screen.nFrameSkips },
1.1.1.9   root       78:        { "bFullScreen", Bool_Tag, &ConfigureParams.Screen.bFullScreen },
1.1.1.17  root       79:        { "bKeepResolution", Bool_Tag, &ConfigureParams.Screen.bKeepResolution },
1.1.1.24  root       80: #if WITH_SDL2
                     81:        { "bResizable", Bool_Tag, &ConfigureParams.Screen.bResizable },
                     82: #else
1.1.1.18  root       83:        { "bKeepResolutionST", Bool_Tag, &ConfigureParams.Screen.bKeepResolutionST },
1.1.1.23  root       84: #endif
1.1.1.9   root       85:        { "bAllowOverscan", Bool_Tag, &ConfigureParams.Screen.bAllowOverscan },
1.1.1.12  root       86:        { "nSpec512Threshold", Int_Tag, &ConfigureParams.Screen.nSpec512Threshold },
                     87:        { "nForceBpp", Int_Tag, &ConfigureParams.Screen.nForceBpp },
1.1.1.16  root       88:        { "bAspectCorrect", Bool_Tag, &ConfigureParams.Screen.bAspectCorrect },
1.1.1.9   root       89:        { "bUseExtVdiResolutions", Bool_Tag, &ConfigureParams.Screen.bUseExtVdiResolutions },
1.1.1.12  root       90:        { "nVdiWidth", Int_Tag, &ConfigureParams.Screen.nVdiWidth },
                     91:        { "nVdiHeight", Int_Tag, &ConfigureParams.Screen.nVdiHeight },
1.1.1.9   root       92:        { "nVdiColors", Int_Tag, &ConfigureParams.Screen.nVdiColors },
1.1.1.22  root       93:        { "bMouseWarp", Bool_Tag, &ConfigureParams.Screen.bMouseWarp },
1.1.1.13  root       94:        { "bShowStatusbar", Bool_Tag, &ConfigureParams.Screen.bShowStatusbar },
                     95:        { "bShowDriveLed", Bool_Tag, &ConfigureParams.Screen.bShowDriveLed },
1.1.1.17  root       96:        { "bCrop", Bool_Tag, &ConfigureParams.Screen.bCrop },
1.1.1.18  root       97:        { "bForceMax", Bool_Tag, &ConfigureParams.Screen.bForceMax },
1.1.1.16  root       98:        { "nMaxWidth", Int_Tag, &ConfigureParams.Screen.nMaxWidth },
                     99:        { "nMaxHeight", Int_Tag, &ConfigureParams.Screen.nMaxHeight },
1.1.1.22  root      100: #if WITH_SDL2
1.1.1.24  root      101:        { "bUseSdlRenderer", Bool_Tag, &ConfigureParams.Screen.bUseSdlRenderer },
1.1.1.22  root      102:        { "nRenderScaleQuality", Int_Tag, &ConfigureParams.Screen.nRenderScaleQuality },
1.1.1.24  root      103:        { "bUseVsync", Bool_Tag, &ConfigureParams.Screen.bUseVsync },
1.1.1.22  root      104: #endif
1.1.1.9   root      105:        { NULL , Error_Tag, NULL }
1.1.1.6   root      106: };
                    107: 
1.1.1.10  root      108: /* Used to load/save joystick 0 options */
1.1.1.23  root      109: #if !WITH_SDL2
                    110: static const struct Config_Tag configs_Joystick0_Sdl1[] =
1.1.1.6   root      111: {
1.1.1.10  root      112:        { "nKeyCodeUp", Int_Tag, &ConfigureParams.Joysticks.Joy[0].nKeyCodeUp },
                    113:        { "nKeyCodeDown", Int_Tag, &ConfigureParams.Joysticks.Joy[0].nKeyCodeDown },
                    114:        { "nKeyCodeLeft", Int_Tag, &ConfigureParams.Joysticks.Joy[0].nKeyCodeLeft },
                    115:        { "nKeyCodeRight", Int_Tag, &ConfigureParams.Joysticks.Joy[0].nKeyCodeRight },
                    116:        { "nKeyCodeFire", Int_Tag, &ConfigureParams.Joysticks.Joy[0].nKeyCodeFire },
1.1.1.9   root      117:        { NULL , Error_Tag, NULL }
1.1.1.6   root      118: };
1.1.1.23  root      119: #endif
                    120: static const struct Config_Tag configs_Joystick0[] =
                    121: {
                    122:        { "nJoystickMode", Int_Tag, &ConfigureParams.Joysticks.Joy[0].nJoystickMode },
                    123:        { "bEnableAutoFire", Bool_Tag, &ConfigureParams.Joysticks.Joy[0].bEnableAutoFire },
                    124:        { "bEnableJumpOnFire2", Bool_Tag, &ConfigureParams.Joysticks.Joy[0].bEnableJumpOnFire2 },
                    125:        { "nJoyId", Int_Tag, &ConfigureParams.Joysticks.Joy[0].nJoyId },
                    126:        { "kUp", Key_Tag, &ConfigureParams.Joysticks.Joy[0].nKeyCodeUp },
                    127:        { "kDown", Key_Tag, &ConfigureParams.Joysticks.Joy[0].nKeyCodeDown },
                    128:        { "kLeft", Key_Tag, &ConfigureParams.Joysticks.Joy[0].nKeyCodeLeft },
                    129:        { "kRight", Key_Tag, &ConfigureParams.Joysticks.Joy[0].nKeyCodeRight },
                    130:        { "kFire", Key_Tag, &ConfigureParams.Joysticks.Joy[0].nKeyCodeFire },
                    131:        { NULL , Error_Tag, NULL }
                    132: };
1.1.1.10  root      133: 
                    134: /* Used to load/save joystick 1 options */
1.1.1.23  root      135: #if !WITH_SDL2
                    136: static const struct Config_Tag configs_Joystick1_Sdl1[] =
1.1.1.6   root      137: {
1.1.1.10  root      138:        { "nKeyCodeUp", Int_Tag, &ConfigureParams.Joysticks.Joy[1].nKeyCodeUp },
                    139:        { "nKeyCodeDown", Int_Tag, &ConfigureParams.Joysticks.Joy[1].nKeyCodeDown },
                    140:        { "nKeyCodeLeft", Int_Tag, &ConfigureParams.Joysticks.Joy[1].nKeyCodeLeft },
                    141:        { "nKeyCodeRight", Int_Tag, &ConfigureParams.Joysticks.Joy[1].nKeyCodeRight },
                    142:        { "nKeyCodeFire", Int_Tag, &ConfigureParams.Joysticks.Joy[1].nKeyCodeFire },
                    143:        { NULL , Error_Tag, NULL }
                    144: };
1.1.1.23  root      145: #endif
                    146: static const struct Config_Tag configs_Joystick1[] =
                    147: {
                    148:        { "nJoystickMode", Int_Tag, &ConfigureParams.Joysticks.Joy[1].nJoystickMode },
                    149:        { "bEnableAutoFire", Bool_Tag, &ConfigureParams.Joysticks.Joy[1].bEnableAutoFire },
                    150:        { "bEnableJumpOnFire2", Bool_Tag, &ConfigureParams.Joysticks.Joy[1].bEnableJumpOnFire2 },
                    151:        { "nJoyId", Int_Tag, &ConfigureParams.Joysticks.Joy[1].nJoyId },
                    152:        { "kUp", Key_Tag, &ConfigureParams.Joysticks.Joy[1].nKeyCodeUp },
                    153:        { "kDown", Key_Tag, &ConfigureParams.Joysticks.Joy[1].nKeyCodeDown },
                    154:        { "kLeft", Key_Tag, &ConfigureParams.Joysticks.Joy[1].nKeyCodeLeft },
                    155:        { "kRight", Key_Tag, &ConfigureParams.Joysticks.Joy[1].nKeyCodeRight },
                    156:        { "kFire", Key_Tag, &ConfigureParams.Joysticks.Joy[1].nKeyCodeFire },
                    157:        { NULL , Error_Tag, NULL }
                    158: };
1.1.1.10  root      159: 
                    160: /* Used to load/save joystick 2 options */
1.1.1.23  root      161: #if !WITH_SDL2
                    162: static const struct Config_Tag configs_Joystick2_Sdl1[] =
1.1.1.10  root      163: {
                    164:        { "nKeyCodeUp", Int_Tag, &ConfigureParams.Joysticks.Joy[2].nKeyCodeUp },
                    165:        { "nKeyCodeDown", Int_Tag, &ConfigureParams.Joysticks.Joy[2].nKeyCodeDown },
                    166:        { "nKeyCodeLeft", Int_Tag, &ConfigureParams.Joysticks.Joy[2].nKeyCodeLeft },
                    167:        { "nKeyCodeRight", Int_Tag, &ConfigureParams.Joysticks.Joy[2].nKeyCodeRight },
                    168:        { "nKeyCodeFire", Int_Tag, &ConfigureParams.Joysticks.Joy[2].nKeyCodeFire },
                    169:        { NULL , Error_Tag, NULL }
                    170: };
1.1.1.23  root      171: #endif
                    172: static const struct Config_Tag configs_Joystick2[] =
                    173: {
                    174:        { "nJoystickMode", Int_Tag, &ConfigureParams.Joysticks.Joy[2].nJoystickMode },
                    175:        { "bEnableAutoFire", Bool_Tag, &ConfigureParams.Joysticks.Joy[2].bEnableAutoFire },
                    176:        { "bEnableJumpOnFire2", Bool_Tag, &ConfigureParams.Joysticks.Joy[2].bEnableJumpOnFire2 },
                    177:        { "nJoyId", Int_Tag, &ConfigureParams.Joysticks.Joy[2].nJoyId },
                    178:        { "kUp", Key_Tag, &ConfigureParams.Joysticks.Joy[2].nKeyCodeUp },
                    179:        { "kDown", Key_Tag, &ConfigureParams.Joysticks.Joy[2].nKeyCodeDown },
                    180:        { "kLeft", Key_Tag, &ConfigureParams.Joysticks.Joy[2].nKeyCodeLeft },
                    181:        { "kRight", Key_Tag, &ConfigureParams.Joysticks.Joy[2].nKeyCodeRight },
                    182:        { "kFire", Key_Tag, &ConfigureParams.Joysticks.Joy[2].nKeyCodeFire },
                    183:        { NULL , Error_Tag, NULL }
                    184: };
1.1.1.10  root      185: 
                    186: /* Used to load/save joystick 3 options */
1.1.1.23  root      187: #if !WITH_SDL2
                    188: static const struct Config_Tag configs_Joystick3_Sdl1[] =
1.1.1.10  root      189: {
                    190:        { "nKeyCodeUp", Int_Tag, &ConfigureParams.Joysticks.Joy[3].nKeyCodeUp },
                    191:        { "nKeyCodeDown", Int_Tag, &ConfigureParams.Joysticks.Joy[3].nKeyCodeDown },
                    192:        { "nKeyCodeLeft", Int_Tag, &ConfigureParams.Joysticks.Joy[3].nKeyCodeLeft },
                    193:        { "nKeyCodeRight", Int_Tag, &ConfigureParams.Joysticks.Joy[3].nKeyCodeRight },
                    194:        { "nKeyCodeFire", Int_Tag, &ConfigureParams.Joysticks.Joy[3].nKeyCodeFire },
                    195:        { NULL , Error_Tag, NULL }
                    196: };
1.1.1.23  root      197: #endif
                    198: static const struct Config_Tag configs_Joystick3[] =
                    199: {
                    200:        { "nJoystickMode", Int_Tag, &ConfigureParams.Joysticks.Joy[3].nJoystickMode },
                    201:        { "bEnableAutoFire", Bool_Tag, &ConfigureParams.Joysticks.Joy[3].bEnableAutoFire },
                    202:        { "bEnableJumpOnFire2", Bool_Tag, &ConfigureParams.Joysticks.Joy[3].bEnableJumpOnFire2 },
                    203:        { "nJoyId", Int_Tag, &ConfigureParams.Joysticks.Joy[3].nJoyId },
                    204:        { "kUp", Key_Tag, &ConfigureParams.Joysticks.Joy[3].nKeyCodeUp },
                    205:        { "kDown", Key_Tag, &ConfigureParams.Joysticks.Joy[3].nKeyCodeDown },
                    206:        { "kLeft", Key_Tag, &ConfigureParams.Joysticks.Joy[3].nKeyCodeLeft },
                    207:        { "kRight", Key_Tag, &ConfigureParams.Joysticks.Joy[3].nKeyCodeRight },
                    208:        { "kFire", Key_Tag, &ConfigureParams.Joysticks.Joy[3].nKeyCodeFire },
                    209:        { NULL , Error_Tag, NULL }
                    210: };
1.1.1.10  root      211: 
                    212: /* Used to load/save joystick 4 options */
1.1.1.23  root      213: #if !WITH_SDL2
                    214: static const struct Config_Tag configs_Joystick4_Sdl1[] =
1.1.1.10  root      215: {
                    216:        { "nKeyCodeUp", Int_Tag, &ConfigureParams.Joysticks.Joy[4].nKeyCodeUp },
                    217:        { "nKeyCodeDown", Int_Tag, &ConfigureParams.Joysticks.Joy[4].nKeyCodeDown },
                    218:        { "nKeyCodeLeft", Int_Tag, &ConfigureParams.Joysticks.Joy[4].nKeyCodeLeft },
                    219:        { "nKeyCodeRight", Int_Tag, &ConfigureParams.Joysticks.Joy[4].nKeyCodeRight },
                    220:        { "nKeyCodeFire", Int_Tag, &ConfigureParams.Joysticks.Joy[4].nKeyCodeFire },
                    221:        { NULL , Error_Tag, NULL }
                    222: };
1.1.1.23  root      223: #endif
                    224: static const struct Config_Tag configs_Joystick4[] =
                    225: {
                    226:        { "nJoystickMode", Int_Tag, &ConfigureParams.Joysticks.Joy[4].nJoystickMode },
                    227:        { "bEnableAutoFire", Bool_Tag, &ConfigureParams.Joysticks.Joy[4].bEnableAutoFire },
                    228:        { "bEnableJumpOnFire2", Bool_Tag, &ConfigureParams.Joysticks.Joy[4].bEnableJumpOnFire2 },
                    229:        { "nJoyId", Int_Tag, &ConfigureParams.Joysticks.Joy[4].nJoyId },
                    230:        { "kUp", Key_Tag, &ConfigureParams.Joysticks.Joy[4].nKeyCodeUp },
                    231:        { "kDown", Key_Tag, &ConfigureParams.Joysticks.Joy[4].nKeyCodeDown },
                    232:        { "kLeft", Key_Tag, &ConfigureParams.Joysticks.Joy[4].nKeyCodeLeft },
                    233:        { "kRight", Key_Tag, &ConfigureParams.Joysticks.Joy[4].nKeyCodeRight },
                    234:        { "kFire", Key_Tag, &ConfigureParams.Joysticks.Joy[4].nKeyCodeFire },
                    235:        { NULL , Error_Tag, NULL }
                    236: };
1.1.1.10  root      237: 
                    238: /* Used to load/save joystick 5 options */
1.1.1.23  root      239: #if !WITH_SDL2
                    240: static const struct Config_Tag configs_Joystick5_Sdl1[] =
1.1.1.10  root      241: {
                    242:        { "nKeyCodeUp", Int_Tag, &ConfigureParams.Joysticks.Joy[5].nKeyCodeUp },
                    243:        { "nKeyCodeDown", Int_Tag, &ConfigureParams.Joysticks.Joy[5].nKeyCodeDown },
                    244:        { "nKeyCodeLeft", Int_Tag, &ConfigureParams.Joysticks.Joy[5].nKeyCodeLeft },
                    245:        { "nKeyCodeRight", Int_Tag, &ConfigureParams.Joysticks.Joy[5].nKeyCodeRight },
                    246:        { "nKeyCodeFire", Int_Tag, &ConfigureParams.Joysticks.Joy[5].nKeyCodeFire },
1.1.1.9   root      247:        { NULL , Error_Tag, NULL }
1.1.1.6   root      248: };
1.1.1.23  root      249: #endif
                    250: static const struct Config_Tag configs_Joystick5[] =
                    251: {
                    252:        { "nJoystickMode", Int_Tag, &ConfigureParams.Joysticks.Joy[5].nJoystickMode },
                    253:        { "bEnableAutoFire", Bool_Tag, &ConfigureParams.Joysticks.Joy[5].bEnableAutoFire },
                    254:        { "bEnableJumpOnFire2", Bool_Tag, &ConfigureParams.Joysticks.Joy[5].bEnableJumpOnFire2 },
                    255:        { "nJoyId", Int_Tag, &ConfigureParams.Joysticks.Joy[5].nJoyId },
                    256:        { "kUp", Key_Tag, &ConfigureParams.Joysticks.Joy[5].nKeyCodeUp },
                    257:        { "kDown", Key_Tag, &ConfigureParams.Joysticks.Joy[5].nKeyCodeDown },
                    258:        { "kLeft", Key_Tag, &ConfigureParams.Joysticks.Joy[5].nKeyCodeLeft },
                    259:        { "kRight", Key_Tag, &ConfigureParams.Joysticks.Joy[5].nKeyCodeRight },
                    260:        { "kFire", Key_Tag, &ConfigureParams.Joysticks.Joy[5].nKeyCodeFire },
                    261:        { NULL , Error_Tag, NULL }
                    262: };
1.1.1.5   root      263: 
1.1.1.6   root      264: /* Used to load/save keyboard options */
1.1.1.9   root      265: static const struct Config_Tag configs_Keyboard[] =
1.1.1.6   root      266: {
1.1.1.9   root      267:        { "bDisableKeyRepeat", Bool_Tag, &ConfigureParams.Keyboard.bDisableKeyRepeat },
                    268:        { "nKeymapType", Int_Tag, &ConfigureParams.Keyboard.nKeymapType },
                    269:        { "szMappingFileName", String_Tag, ConfigureParams.Keyboard.szMappingFileName },
                    270:        { NULL , Error_Tag, NULL }
1.1.1.6   root      271: };
1.1       root      272: 
1.1.1.23  root      273: #if !WITH_SDL2
1.1.1.11  root      274: /* Used to load/save shortcut key bindings with modifiers options */
1.1.1.23  root      275: static const struct Config_Tag configs_ShortCutWithMod_Sdl1[] =
1.1.1.11  root      276: {
                    277:        { "keyOptions",    Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_OPTIONS] },
                    278:        { "keyFullScreen", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_FULLSCREEN] },
1.1.1.16  root      279:        { "keyMouseMode",  Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_MOUSEGRAB] },
1.1.1.11  root      280:        { "keyColdReset",  Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_COLDRESET] },
                    281:        { "keyWarmReset",  Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_WARMRESET] },
                    282:        { "keyScreenShot", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_SCREENSHOT] },
                    283:        { "keyBossKey",    Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_BOSSKEY] },
                    284:        { "keyCursorEmu",  Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_CURSOREMU] },
1.1.1.13  root      285:        { "keyFastForward",Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_FASTFORWARD] },
1.1.1.11  root      286:        { "keyRecAnim",    Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_RECANIM] },
                    287:        { "keyRecSound",   Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_RECSOUND] },
                    288:        { "keySound",      Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_SOUND] },
1.1.1.15  root      289:        { "keyPause",      Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_PAUSE] },
                    290:        { "keyDebugger",   Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_DEBUG] },
1.1.1.11  root      291:        { "keyQuit",       Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_QUIT] },
1.1.1.12  root      292:        { "keyLoadMem",    Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_LOADMEM] },
                    293:        { "keySaveMem",    Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_SAVEMEM] },
1.1.1.13  root      294:        { "keyInsertDiskA",Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_INSERTDISKA] },
1.1.1.22  root      295:        { "keySwitchJoy0", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_JOY_0] },
                    296:        { "keySwitchJoy1", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_JOY_1] },
                    297:        { "keySwitchPadA", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_PAD_A] },
                    298:        { "keySwitchPadB", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_PAD_B] },
1.1.1.11  root      299:        { NULL , Error_Tag, NULL }
                    300: };
                    301: 
                    302: /* Used to load/save shortcut key bindings without modifiers options */
1.1.1.23  root      303: static const struct Config_Tag configs_ShortCutWithoutMod_Sdl1[] =
1.1.1.11  root      304: {
                    305:        { "keyOptions",    Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_OPTIONS] },
                    306:        { "keyFullScreen", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_FULLSCREEN] },
1.1.1.16  root      307:        { "keyMouseMode",  Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_MOUSEGRAB] },
1.1.1.11  root      308:        { "keyColdReset",  Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_COLDRESET] },
                    309:        { "keyWarmReset",  Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_WARMRESET] },
                    310:        { "keyScreenShot", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_SCREENSHOT] },
                    311:        { "keyBossKey",    Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_BOSSKEY] },
                    312:        { "keyCursorEmu",  Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_CURSOREMU] },
1.1.1.13  root      313:        { "keyFastForward",Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_FASTFORWARD] },
1.1.1.11  root      314:        { "keyRecAnim",    Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_RECANIM] },
                    315:        { "keyRecSound",   Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_RECSOUND] },
                    316:        { "keySound",      Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_SOUND] },
1.1.1.15  root      317:        { "keyPause",      Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_PAUSE] },
                    318:        { "keyDebugger",   Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_DEBUG] },
1.1.1.11  root      319:        { "keyQuit",       Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_QUIT] },
1.1.1.12  root      320:        { "keyLoadMem",    Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_LOADMEM] },
                    321:        { "keySaveMem",    Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_SAVEMEM] },
1.1.1.13  root      322:        { "keyInsertDiskA",Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_INSERTDISKA] },
1.1.1.22  root      323:        { "keySwitchJoy0", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_JOY_0] },
                    324:        { "keySwitchJoy1", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_JOY_1] },
                    325:        { "keySwitchPadA", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_PAD_A] },
                    326:        { "keySwitchPadB", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_PAD_B] },
1.1.1.11  root      327:        { NULL , Error_Tag, NULL }
                    328: };
1.1.1.23  root      329: #endif
                    330: 
                    331: /* Used to load/save shortcut key bindings with modifiers options */
                    332: static const struct Config_Tag configs_ShortCutWithMod[] =
                    333: {
                    334:        { "kOptions",    Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_OPTIONS] },
                    335:        { "kFullScreen", Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_FULLSCREEN] },
1.1.1.24  root      336:        { "kBorders",    Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_BORDERS] },
1.1.1.23  root      337:        { "kMouseMode",  Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_MOUSEGRAB] },
                    338:        { "kColdReset",  Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_COLDRESET] },
                    339:        { "kWarmReset",  Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_WARMRESET] },
                    340:        { "kScreenShot", Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_SCREENSHOT] },
                    341:        { "kBossKey",    Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_BOSSKEY] },
                    342:        { "kCursorEmu",  Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_CURSOREMU] },
                    343:        { "kFastForward",Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_FASTFORWARD] },
                    344:        { "kRecAnim",    Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_RECANIM] },
                    345:        { "kRecSound",   Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_RECSOUND] },
                    346:        { "kSound",      Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_SOUND] },
                    347:        { "kPause",      Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_PAUSE] },
                    348:        { "kDebugger",   Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_DEBUG] },
                    349:        { "kQuit",       Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_QUIT] },
                    350:        { "kLoadMem",    Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_LOADMEM] },
                    351:        { "kSaveMem",    Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_SAVEMEM] },
                    352:        { "kInsertDiskA",Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_INSERTDISKA] },
                    353:        { "kSwitchJoy0", Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_JOY_0] },
                    354:        { "kSwitchJoy1", Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_JOY_1] },
                    355:        { "kSwitchPadA", Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_PAD_A] },
                    356:        { "kSwitchPadB", Key_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_PAD_B] },
                    357:        { NULL , Error_Tag, NULL }
                    358: };
                    359: 
                    360: /* Used to load/save shortcut key bindings without modifiers options */
                    361: static const struct Config_Tag configs_ShortCutWithoutMod[] =
                    362: {
                    363:        { "kOptions",    Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_OPTIONS] },
                    364:        { "kFullScreen", Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_FULLSCREEN] },
1.1.1.24  root      365:        { "kBorders",    Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_BORDERS] },
1.1.1.23  root      366:        { "kMouseMode",  Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_MOUSEGRAB] },
                    367:        { "kColdReset",  Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_COLDRESET] },
                    368:        { "kWarmReset",  Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_WARMRESET] },
                    369:        { "kScreenShot", Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_SCREENSHOT] },
                    370:        { "kBossKey",    Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_BOSSKEY] },
                    371:        { "kCursorEmu",  Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_CURSOREMU] },
                    372:        { "kFastForward",Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_FASTFORWARD] },
                    373:        { "kRecAnim",    Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_RECANIM] },
                    374:        { "kRecSound",   Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_RECSOUND] },
                    375:        { "kSound",      Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_SOUND] },
                    376:        { "kPause",      Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_PAUSE] },
                    377:        { "kDebugger",   Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_DEBUG] },
                    378:        { "kQuit",       Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_QUIT] },
                    379:        { "kLoadMem",    Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_LOADMEM] },
                    380:        { "kSaveMem",    Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_SAVEMEM] },
                    381:        { "kInsertDiskA",Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_INSERTDISKA] },
                    382:        { "kSwitchJoy0", Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_JOY_0] },
                    383:        { "kSwitchJoy1", Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_JOY_1] },
                    384:        { "kSwitchPadA", Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_PAD_A] },
                    385:        { "kSwitchPadB", Key_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_PAD_B] },
                    386:        { NULL , Error_Tag, NULL }
                    387: };
1.1.1.11  root      388: 
                    389: 
1.1.1.6   root      390: /* Used to load/save sound options */
1.1.1.9   root      391: static const struct Config_Tag configs_Sound[] =
1.1.1.6   root      392: {
1.1.1.17  root      393:        { "bEnableMicrophone", Bool_Tag, &ConfigureParams.Sound.bEnableMicrophone },
1.1.1.9   root      394:        { "bEnableSound", Bool_Tag, &ConfigureParams.Sound.bEnableSound },
1.1.1.19  root      395:        { "bEnableSoundSync", Bool_Tag, &ConfigureParams.Sound.bEnableSoundSync },
1.1.1.15  root      396:        { "nPlaybackFreq", Int_Tag, &ConfigureParams.Sound.nPlaybackFreq },
1.1.1.16  root      397:        { "nSdlAudioBufferSize", Int_Tag, &ConfigureParams.Sound.SdlAudioBufferSize },
1.1.1.17  root      398:        { "szYMCaptureFileName", String_Tag, ConfigureParams.Sound.szYMCaptureFileName },
                    399:        { "YmVolumeMixing", Int_Tag, &ConfigureParams.Sound.YmVolumeMixing },
1.1.1.9   root      400:        { NULL , Error_Tag, NULL }
1.1.1.6   root      401: };
                    402: 
                    403: /* Used to load/save memory options */
1.1.1.9   root      404: static const struct Config_Tag configs_Memory[] =
1.1.1.6   root      405: {
1.1.1.24  root      406:        { "nMemorySize", Int_Tag, &ConfigureParams.Memory.STRamSize_KB },
                    407:        { "nTTRamSize", Int_Tag, &ConfigureParams.Memory.TTRamSize_KB },
1.1.1.12  root      408:        { "bAutoSave", Bool_Tag, &ConfigureParams.Memory.bAutoSave },
1.1.1.9   root      409:        { "szMemoryCaptureFileName", String_Tag, ConfigureParams.Memory.szMemoryCaptureFileName },
1.1.1.12  root      410:        { "szAutoSaveFileName", String_Tag, ConfigureParams.Memory.szAutoSaveFileName },
1.1.1.9   root      411:        { NULL , Error_Tag, NULL }
1.1.1.6   root      412: };
                    413: 
                    414: 
                    415: /* Used to load/save floppy options */
1.1.1.9   root      416: static const struct Config_Tag configs_Floppy[] =
1.1.1.6   root      417: {
1.1.1.10  root      418:        { "bAutoInsertDiskB", Bool_Tag, &ConfigureParams.DiskImage.bAutoInsertDiskB },
1.1.1.18  root      419:        { "FastFloppy", Bool_Tag, &ConfigureParams.DiskImage.FastFloppy },
1.1.1.21  root      420:        { "EnableDriveA", Bool_Tag, &ConfigureParams.DiskImage.EnableDriveA },
                    421:        { "DriveA_NumberOfHeads", Int_Tag, &ConfigureParams.DiskImage.DriveA_NumberOfHeads },
                    422:        { "EnableDriveB", Bool_Tag, &ConfigureParams.DiskImage.EnableDriveB },
                    423:        { "DriveB_NumberOfHeads", Int_Tag, &ConfigureParams.DiskImage.DriveB_NumberOfHeads },
1.1.1.10  root      424:        { "nWriteProtection", Int_Tag, &ConfigureParams.DiskImage.nWriteProtection },
1.1.1.13  root      425:        { "szDiskAZipPath", String_Tag, ConfigureParams.DiskImage.szDiskZipPath[0] },
                    426:        { "szDiskAFileName", String_Tag, ConfigureParams.DiskImage.szDiskFileName[0] },
                    427:        { "szDiskBZipPath", String_Tag, ConfigureParams.DiskImage.szDiskZipPath[1] },
                    428:        { "szDiskBFileName", String_Tag, ConfigureParams.DiskImage.szDiskFileName[1] },
1.1.1.10  root      429:        { "szDiskImageDirectory", String_Tag, ConfigureParams.DiskImage.szDiskImageDirectory },
                    430:        { NULL , Error_Tag, NULL }
                    431: };
                    432: 
1.1.1.6   root      433: /* Used to load/save HD options */
1.1.1.10  root      434: static const struct Config_Tag configs_HardDisk[] =
1.1.1.6   root      435: {
1.1.1.22  root      436:        { "nGemdosDrive", Int_Tag, &ConfigureParams.HardDisk.nGemdosDrive },
1.1.1.10  root      437:        { "bBootFromHardDisk", Bool_Tag, &ConfigureParams.HardDisk.bBootFromHardDisk },
                    438:        { "bUseHardDiskDirectory", Bool_Tag, &ConfigureParams.HardDisk.bUseHardDiskDirectories },
                    439:        { "szHardDiskDirectory", String_Tag, ConfigureParams.HardDisk.szHardDiskDirectories[DRIVE_C] },
1.1.1.20  root      440:        { "nGemdosCase", Int_Tag, &ConfigureParams.HardDisk.nGemdosCase },
1.1.1.16  root      441:        { "nWriteProtection", Int_Tag, &ConfigureParams.HardDisk.nWriteProtection },
1.1.1.22  root      442:        { "bFilenameConversion", Bool_Tag, &ConfigureParams.HardDisk.bFilenameConversion },
1.1.1.24  root      443:        { "bGemdosHostTime", Bool_Tag, &ConfigureParams.HardDisk.bGemdosHostTime },
1.1.1.25! root      444:        { NULL , Error_Tag, NULL }
        !           445: };
        !           446: 
        !           447: static const struct Config_Tag configs_HardDisk_Old[] =
        !           448: {      /* only used for loading */
1.1.1.21  root      449:        { "bUseHardDiskImage", Bool_Tag, &ConfigureParams.Acsi[0].bUseDevice },
                    450:        { "szHardDiskImage", String_Tag, ConfigureParams.Acsi[0].sDeviceFile },
1.1.1.25! root      451:        { "bUseIdeMasterHardDiskImage", Bool_Tag, &ConfigureParams.Ide[0].bUseDevice },
        !           452:        { "szIdeMasterHardDiskImage", String_Tag, ConfigureParams.Ide[0].sDeviceFile },
        !           453:        { "bUseIdeSlaveHardDiskImage", Bool_Tag, &ConfigureParams.Ide[1].bUseDevice },
        !           454:        { "szIdeSlaveHardDiskImage", String_Tag, ConfigureParams.Ide[1].sDeviceFile },
1.1.1.10  root      455:        { NULL , Error_Tag, NULL }
                    456: };
                    457: 
1.1.1.21  root      458: /* Used to load/save ACSI options */
                    459: static const struct Config_Tag configs_Acsi[] =
                    460: {
1.1.1.25! root      461:        { "bUseDevice0", Bool_Tag, &ConfigureParams.Acsi[0].bUseDevice },
        !           462:        { "sDeviceFile0", String_Tag, ConfigureParams.Acsi[0].sDeviceFile },
        !           463:        { "nBlockSize0", Int_Tag, &ConfigureParams.Acsi[0].nBlockSize },
1.1.1.21  root      464:        { "bUseDevice1", Bool_Tag, &ConfigureParams.Acsi[1].bUseDevice },
                    465:        { "sDeviceFile1", String_Tag, ConfigureParams.Acsi[1].sDeviceFile },
1.1.1.25! root      466:        { "nBlockSize1", Int_Tag, &ConfigureParams.Acsi[1].nBlockSize },
1.1.1.21  root      467:        { "bUseDevice2", Bool_Tag, &ConfigureParams.Acsi[2].bUseDevice },
                    468:        { "sDeviceFile2", String_Tag, ConfigureParams.Acsi[2].sDeviceFile },
1.1.1.25! root      469:        { "nBlockSize2", Int_Tag, &ConfigureParams.Acsi[2].nBlockSize },
1.1.1.21  root      470:        { "bUseDevice3", Bool_Tag, &ConfigureParams.Acsi[3].bUseDevice },
                    471:        { "sDeviceFile3", String_Tag, ConfigureParams.Acsi[3].sDeviceFile },
1.1.1.25! root      472:        { "nBlockSize3", Int_Tag, &ConfigureParams.Acsi[3].nBlockSize },
1.1.1.21  root      473:        { "bUseDevice4", Bool_Tag, &ConfigureParams.Acsi[4].bUseDevice },
                    474:        { "sDeviceFile4", String_Tag, ConfigureParams.Acsi[4].sDeviceFile },
1.1.1.25! root      475:        { "nBlockSize4", Int_Tag, &ConfigureParams.Acsi[4].nBlockSize },
1.1.1.21  root      476:        { "bUseDevice5", Bool_Tag, &ConfigureParams.Acsi[5].bUseDevice },
                    477:        { "sDeviceFile5", String_Tag, ConfigureParams.Acsi[5].sDeviceFile },
1.1.1.25! root      478:        { "nBlockSize5", Int_Tag, &ConfigureParams.Acsi[5].nBlockSize },
1.1.1.21  root      479:        { "bUseDevice6", Bool_Tag, &ConfigureParams.Acsi[6].bUseDevice },
                    480:        { "sDeviceFile6", String_Tag, ConfigureParams.Acsi[6].sDeviceFile },
1.1.1.25! root      481:        { "nBlockSize6", Int_Tag, &ConfigureParams.Acsi[6].nBlockSize },
1.1.1.21  root      482:        { "bUseDevice7", Bool_Tag, &ConfigureParams.Acsi[7].bUseDevice },
                    483:        { "sDeviceFile7", String_Tag, ConfigureParams.Acsi[7].sDeviceFile },
1.1.1.25! root      484:        { "nBlockSize7", Int_Tag, &ConfigureParams.Acsi[7].nBlockSize },
1.1.1.21  root      485:        { NULL , Error_Tag, NULL }
                    486: };
                    487: 
1.1.1.22  root      488: /* Used to load/save SCSI options */
                    489: static const struct Config_Tag configs_Scsi[] =
                    490: {
1.1.1.25! root      491:        { "bUseDevice0", Bool_Tag, &ConfigureParams.Scsi[0].bUseDevice },
        !           492:        { "sDeviceFile0", String_Tag, ConfigureParams.Scsi[0].sDeviceFile },
        !           493:        { "nBlockSize0", Int_Tag, &ConfigureParams.Scsi[0].nBlockSize },
1.1.1.22  root      494:        { "bUseDevice1", Bool_Tag, &ConfigureParams.Scsi[1].bUseDevice },
                    495:        { "sDeviceFile1", String_Tag, ConfigureParams.Scsi[1].sDeviceFile },
1.1.1.25! root      496:        { "nBlockSize1", Int_Tag, &ConfigureParams.Scsi[1].nBlockSize },
1.1.1.22  root      497:        { "bUseDevice2", Bool_Tag, &ConfigureParams.Scsi[2].bUseDevice },
                    498:        { "sDeviceFile2", String_Tag, ConfigureParams.Scsi[2].sDeviceFile },
1.1.1.25! root      499:        { "nBlockSize2", Int_Tag, &ConfigureParams.Scsi[2].nBlockSize },
1.1.1.22  root      500:        { "bUseDevice3", Bool_Tag, &ConfigureParams.Scsi[3].bUseDevice },
                    501:        { "sDeviceFile3", String_Tag, ConfigureParams.Scsi[3].sDeviceFile },
1.1.1.25! root      502:        { "nBlockSize3", Int_Tag, &ConfigureParams.Scsi[3].nBlockSize },
1.1.1.22  root      503:        { "bUseDevice4", Bool_Tag, &ConfigureParams.Scsi[4].bUseDevice },
                    504:        { "sDeviceFile4", String_Tag, ConfigureParams.Scsi[4].sDeviceFile },
1.1.1.25! root      505:        { "nBlockSize4", Int_Tag, &ConfigureParams.Scsi[4].nBlockSize },
1.1.1.22  root      506:        { "bUseDevice5", Bool_Tag, &ConfigureParams.Scsi[5].bUseDevice },
                    507:        { "sDeviceFile5", String_Tag, ConfigureParams.Scsi[5].sDeviceFile },
1.1.1.25! root      508:        { "nBlockSize5", Int_Tag, &ConfigureParams.Scsi[5].nBlockSize },
1.1.1.22  root      509:        { "bUseDevice6", Bool_Tag, &ConfigureParams.Scsi[6].bUseDevice },
                    510:        { "sDeviceFile6", String_Tag, ConfigureParams.Scsi[6].sDeviceFile },
1.1.1.25! root      511:        { "nBlockSize6", Int_Tag, &ConfigureParams.Scsi[6].nBlockSize },
1.1.1.22  root      512:        { "bUseDevice7", Bool_Tag, &ConfigureParams.Scsi[7].bUseDevice },
                    513:        { "sDeviceFile7", String_Tag, ConfigureParams.Scsi[7].sDeviceFile },
1.1.1.25! root      514:        { "nBlockSize7", Int_Tag, &ConfigureParams.Scsi[7].nBlockSize },
        !           515:        { NULL , Error_Tag, NULL }
        !           516: };
        !           517: 
        !           518: /* Used to load/save IDE options */
        !           519: static const struct Config_Tag configs_Ide[] =
        !           520: {
        !           521:        { "bUseDevice0", Bool_Tag, &ConfigureParams.Ide[0].bUseDevice },
        !           522:        { "nByteSwap0", Int_Tag, &ConfigureParams.Ide[0].nByteSwap },
        !           523:        { "sDeviceFile0", String_Tag, ConfigureParams.Ide[0].sDeviceFile },
        !           524:        { "nBlockSize0", Int_Tag, &ConfigureParams.Ide[0].nBlockSize },
        !           525:        { "nDeviceType0", Int_Tag, &ConfigureParams.Ide[0].nDeviceType },
        !           526:        { "bUseDevice1", Bool_Tag, &ConfigureParams.Ide[1].bUseDevice },
        !           527:        { "nByteSwap1", Int_Tag, &ConfigureParams.Ide[1].nByteSwap },
        !           528:        { "sDeviceFile1", String_Tag, ConfigureParams.Ide[1].sDeviceFile },
        !           529:        { "nBlockSize1", Int_Tag, &ConfigureParams.Ide[1].nBlockSize },
        !           530:        { "nDeviceType1", Int_Tag, &ConfigureParams.Ide[1].nDeviceType },
1.1.1.22  root      531:        { NULL , Error_Tag, NULL }
                    532: };
                    533: 
1.1.1.8   root      534: /* Used to load/save ROM options */
1.1.1.9   root      535: static const struct Config_Tag configs_Rom[] =
1.1.1.6   root      536: {
1.1.1.9   root      537:        { "szTosImageFileName", String_Tag, ConfigureParams.Rom.szTosImageFileName },
1.1.1.18  root      538:        { "bPatchTos", Bool_Tag, &ConfigureParams.Rom.bPatchTos },
1.1.1.9   root      539:        { "szCartridgeImageFileName", String_Tag, ConfigureParams.Rom.szCartridgeImageFileName },
                    540:        { NULL , Error_Tag, NULL }
1.1.1.6   root      541: };
                    542: 
                    543: /* Used to load/save RS232 options */
1.1.1.9   root      544: static const struct Config_Tag configs_Rs232[] =
1.1.1.6   root      545: {
1.1.1.9   root      546:        { "bEnableRS232", Bool_Tag, &ConfigureParams.RS232.bEnableRS232 },
                    547:        { "szOutFileName", String_Tag, ConfigureParams.RS232.szOutFileName },
                    548:        { "szInFileName", String_Tag, ConfigureParams.RS232.szInFileName },
1.1.1.25! root      549:        { "bEnableSccB", Bool_Tag, &ConfigureParams.RS232.bEnableSccB },
        !           550:        { "sSccBOutFileName", String_Tag, ConfigureParams.RS232.sSccBOutFileName },
        !           551: //     { "sSccBInFileName", String_Tag, ConfigureParams.RS232.sSccBInFileName },
1.1.1.9   root      552:        { NULL , Error_Tag, NULL }
1.1.1.6   root      553: };
                    554: 
                    555: /* Used to load/save printer options */
1.1.1.9   root      556: static const struct Config_Tag configs_Printer[] =
1.1.1.6   root      557: {
1.1.1.9   root      558:        { "bEnablePrinting", Bool_Tag, &ConfigureParams.Printer.bEnablePrinting },
                    559:        { "szPrintToFileName", String_Tag, ConfigureParams.Printer.szPrintToFileName },
                    560:        { NULL , Error_Tag, NULL }
1.1.1.6   root      561: };
                    562: 
1.1.1.7   root      563: /* Used to load/save MIDI options */
1.1.1.9   root      564: static const struct Config_Tag configs_Midi[] =
1.1.1.7   root      565: {
1.1.1.9   root      566:        { "bEnableMidi", Bool_Tag, &ConfigureParams.Midi.bEnableMidi },
1.1.1.14  root      567:        { "sMidiInFileName", String_Tag, ConfigureParams.Midi.sMidiInFileName },
                    568:        { "sMidiOutFileName", String_Tag, ConfigureParams.Midi.sMidiOutFileName },
1.1.1.24  root      569:        { "sMidiInPortName", String_Tag, ConfigureParams.Midi.sMidiInPortName },
                    570:        { "sMidiOutPortName", String_Tag, ConfigureParams.Midi.sMidiOutPortName },
1.1.1.9   root      571:        { NULL , Error_Tag, NULL }
1.1.1.7   root      572: };
                    573: 
1.1.1.23  root      574: /* Used to load system options from old config files */
                    575: static int nOldMachineType;
                    576: static bool bOldRealTimeClock;
                    577: static const struct Config_Tag configs_System_Old[] =
                    578: {
                    579:        { "nMachineType", Int_Tag, &nOldMachineType },
                    580:        { "bRealTimeClock", Bool_Tag, &bOldRealTimeClock },
                    581:        { NULL , Error_Tag, NULL }
                    582: };
1.1.1.6   root      583: /* Used to load/save system options */
1.1.1.9   root      584: static const struct Config_Tag configs_System[] =
1.1.1.6   root      585: {
1.1.1.9   root      586:        { "nCpuLevel", Int_Tag, &ConfigureParams.System.nCpuLevel },
                    587:        { "nCpuFreq", Int_Tag, &ConfigureParams.System.nCpuFreq },
                    588:        { "bCompatibleCpu", Bool_Tag, &ConfigureParams.System.bCompatibleCpu },
1.1.1.23  root      589:        { "nModelType", Int_Tag, &ConfigureParams.System.nMachineType },
1.1.1.9   root      590:        { "bBlitter", Bool_Tag, &ConfigureParams.System.bBlitter },
1.1.1.12  root      591:        { "nDSPType", Int_Tag, &ConfigureParams.System.nDSPType },
1.1.1.9   root      592:        { "bPatchTimerD", Bool_Tag, &ConfigureParams.System.bPatchTimerD },
1.1.1.18  root      593:        { "bFastBoot", Bool_Tag, &ConfigureParams.System.bFastBoot },
1.1.1.13  root      594:        { "bFastForward", Bool_Tag, &ConfigureParams.System.bFastForward },
1.1.1.22  root      595:        { "bAddressSpace24", Bool_Tag, &ConfigureParams.System.bAddressSpace24 },
1.1.1.17  root      596: 
                    597: #if ENABLE_WINUAE_CPU
                    598:        { "bCycleExactCpu", Bool_Tag, &ConfigureParams.System.bCycleExactCpu },
                    599:        { "n_FPUType", Int_Tag, &ConfigureParams.System.n_FPUType },
1.1.1.23  root      600: /* JIT { "bCompatibleFPU", Bool_Tag, &ConfigureParams.System.bCompatibleFPU }, */
1.1.1.24  root      601:        { "bSoftFloatFPU", Bool_Tag, &ConfigureParams.System.bSoftFloatFPU },
1.1.1.17  root      602:        { "bMMU", Bool_Tag, &ConfigureParams.System.bMMU },
                    603: #endif
1.1.1.23  root      604:        { "VideoTiming", Int_Tag, &ConfigureParams.System.VideoTimingMode },
1.1.1.17  root      605:        { NULL , Error_Tag, NULL }
                    606: };
                    607: 
                    608: /* Used to load/save video options */
                    609: static const struct Config_Tag configs_Video[] =
                    610: {
                    611:        { "AviRecordVcodec", Int_Tag, &ConfigureParams.Video.AviRecordVcodec },
                    612:        { "AviRecordFps", Int_Tag, &ConfigureParams.Video.AviRecordFps },
                    613:        { "AviRecordFile", String_Tag, ConfigureParams.Video.AviRecordFile },
1.1.1.9   root      614:        { NULL , Error_Tag, NULL }
1.1.1.6   root      615: };
1.1       root      616: 
                    617: 
                    618: /*-----------------------------------------------------------------------*/
1.1.1.12  root      619: /**
                    620:  * Set default configuration values.
                    621:  */
1.1.1.2   root      622: void Configuration_SetDefault(void)
                    623: {
1.1.1.22  root      624:        int i, maxjoy;
1.1.1.12  root      625:        const char *psHomeDir;
                    626:        const char *psWorkingDir;
                    627: 
                    628:        psHomeDir = Paths_GetHatariHome();
                    629:        psWorkingDir = Paths_GetWorkingDir();
1.1.1.4   root      630: 
1.1.1.9   root      631:        /* Clear parameters */
                    632:        memset(&ConfigureParams, 0, sizeof(CNF_PARAMS));
                    633: 
1.1.1.16  root      634:        /* Set defaults for logging and tracing */
1.1.1.9   root      635:        strcpy(ConfigureParams.Log.sLogFileName, "stderr");
1.1.1.13  root      636:        strcpy(ConfigureParams.Log.sTraceFileName, "stderr");
1.1.1.23  root      637:        ConfigureParams.Log.nTextLogLevel = LOG_INFO;
1.1.1.13  root      638:        ConfigureParams.Log.nAlertDlgLogLevel = LOG_ERROR;
1.1.1.15  root      639:        ConfigureParams.Log.bConfirmQuit = true;
1.1.1.20  root      640:        ConfigureParams.Log.bNatFeats = false;
                    641:        ConfigureParams.Log.bConsoleWindow = false;
1.1.1.9   root      642: 
1.1.1.16  root      643:        /* Set defaults for debugger */
                    644:        ConfigureParams.Debugger.nNumberBase = 10;
1.1.1.24  root      645:        ConfigureParams.Debugger.nSymbolLines = -1; /* <0: use terminal size */
                    646:        ConfigureParams.Debugger.nMemdumpLines = -1; /* <0: use terminal size */
                    647:        ConfigureParams.Debugger.nDisasmLines = -1; /* <0: use terminal size */
                    648:        ConfigureParams.Debugger.nExceptionDebugMask = DEFAULT_EXCEPTIONS;
1.1.1.20  root      649:        /* external one has nicer output, but isn't as complete as UAE one */
                    650:        ConfigureParams.Debugger.bDisasmUAE = false;
1.1.1.24  root      651:        ConfigureParams.Debugger.bSymbolsResident = false;
                    652:        ConfigureParams.Debugger.bMatchAllSymbols = false;
1.1.1.20  root      653:        ConfigureParams.Debugger.nDisasmOptions = Disasm_GetOptions();
1.1.1.16  root      654: 
1.1.1.10  root      655:        /* Set defaults for floppy disk images */
1.1.1.15  root      656:        ConfigureParams.DiskImage.bAutoInsertDiskB = true;
1.1.1.18  root      657:        ConfigureParams.DiskImage.FastFloppy = false;
1.1.1.10  root      658:        ConfigureParams.DiskImage.nWriteProtection = WRITEPROT_OFF;
1.1.1.21  root      659: 
                    660:        ConfigureParams.DiskImage.EnableDriveA = true;
                    661:        FDC_Drive_Set_Enable ( 0 , ConfigureParams.DiskImage.EnableDriveA );
                    662:        ConfigureParams.DiskImage.DriveA_NumberOfHeads = 2;
                    663:        FDC_Drive_Set_NumberOfHeads ( 0 , ConfigureParams.DiskImage.DriveA_NumberOfHeads );
                    664: 
                    665:        ConfigureParams.DiskImage.EnableDriveB = true;
                    666:        FDC_Drive_Set_Enable ( 1 , ConfigureParams.DiskImage.EnableDriveB );
                    667:        ConfigureParams.DiskImage.DriveB_NumberOfHeads = 2;
                    668:        FDC_Drive_Set_NumberOfHeads ( 1 , ConfigureParams.DiskImage.DriveB_NumberOfHeads );
                    669: 
                    670:        for (i = 0; i < MAX_FLOPPYDRIVES; i++)
1.1.1.13  root      671:        {
                    672:                ConfigureParams.DiskImage.szDiskZipPath[i][0] = '\0';
                    673:                ConfigureParams.DiskImage.szDiskFileName[i][0] = '\0';
                    674:        }
1.1.1.12  root      675:        strcpy(ConfigureParams.DiskImage.szDiskImageDirectory, psWorkingDir);
1.1.1.10  root      676:        File_AddSlashToEndFileName(ConfigureParams.DiskImage.szDiskImageDirectory);
                    677: 
                    678:        /* Set defaults for hard disks */
1.1.1.15  root      679:        ConfigureParams.HardDisk.bBootFromHardDisk = false;
1.1.1.22  root      680:        ConfigureParams.HardDisk.bFilenameConversion = false;
1.1.1.24  root      681:        ConfigureParams.HardDisk.bGemdosHostTime = false;
1.1.1.20  root      682:        ConfigureParams.HardDisk.nGemdosCase = GEMDOS_NOP;
1.1.1.16  root      683:        ConfigureParams.HardDisk.nWriteProtection = WRITEPROT_OFF;
1.1.1.22  root      684:        ConfigureParams.HardDisk.nGemdosDrive = DRIVE_C;
1.1.1.15  root      685:        ConfigureParams.HardDisk.bUseHardDiskDirectories = false;
1.1.1.13  root      686:        for (i = 0; i < MAX_HARDDRIVES; i++)
1.1.1.9   root      687:        {
1.1.1.12  root      688:                strcpy(ConfigureParams.HardDisk.szHardDiskDirectories[i], psWorkingDir);
1.1.1.10  root      689:                File_CleanFileName(ConfigureParams.HardDisk.szHardDiskDirectories[i]);
1.1.1.9   root      690:        }
                    691: 
1.1.1.21  root      692:        /* ACSI */
                    693:        for (i = 0; i < MAX_ACSI_DEVS; i++)
                    694:        {
                    695:                ConfigureParams.Acsi[i].bUseDevice = false;
                    696:                strcpy(ConfigureParams.Acsi[i].sDeviceFile, psWorkingDir);
1.1.1.25! root      697:                ConfigureParams.Acsi[i].nBlockSize = 512;
1.1.1.21  root      698:        }
1.1.1.22  root      699:        /* SCSI */
                    700:        for (i = 0; i < MAX_SCSI_DEVS; i++)
                    701:        {
                    702:                ConfigureParams.Scsi[i].bUseDevice = false;
                    703:                strcpy(ConfigureParams.Scsi[i].sDeviceFile, psWorkingDir);
1.1.1.25! root      704:                ConfigureParams.Scsi[i].nBlockSize = 512;
        !           705:        }
        !           706:        /* IDE */
        !           707:        for (i = 0; i < MAX_IDE_DEVS; i++)
        !           708:        {
        !           709:                ConfigureParams.Ide[i].bUseDevice = false;
        !           710:                ConfigureParams.Ide[i].nByteSwap = BYTESWAP_AUTO;
        !           711:                strcpy(ConfigureParams.Ide[i].sDeviceFile, psWorkingDir);
        !           712:                ConfigureParams.Ide[i].nBlockSize = 512;
1.1.1.22  root      713:        }
                    714: 
1.1.1.9   root      715:        /* Set defaults for Joysticks */
1.1.1.22  root      716:        maxjoy = Joy_GetMaxId();
1.1.1.11  root      717:        for (i = 0; i < JOYSTICK_COUNT; i++)
1.1.1.9   root      718:        {
1.1.1.10  root      719:                ConfigureParams.Joysticks.Joy[i].nJoystickMode = JOYSTICK_DISABLED;
1.1.1.15  root      720:                ConfigureParams.Joysticks.Joy[i].bEnableAutoFire = false;
                    721:                ConfigureParams.Joysticks.Joy[i].bEnableJumpOnFire2 = false;
1.1.1.22  root      722:                ConfigureParams.Joysticks.Joy[i].nJoyId = (i > maxjoy ? maxjoy : i);
1.1.1.10  root      723:                ConfigureParams.Joysticks.Joy[i].nKeyCodeUp = SDLK_UP;
                    724:                ConfigureParams.Joysticks.Joy[i].nKeyCodeDown = SDLK_DOWN;
                    725:                ConfigureParams.Joysticks.Joy[i].nKeyCodeLeft = SDLK_LEFT;
                    726:                ConfigureParams.Joysticks.Joy[i].nKeyCodeRight = SDLK_RIGHT;
                    727:                ConfigureParams.Joysticks.Joy[i].nKeyCodeFire = SDLK_RCTRL;
1.1.1.9   root      728:        }
1.1.1.22  root      729:        if (SDL_NumJoysticks() > 0)
                    730:        {
                    731:                /* ST Joystick #1 is default joystick */
                    732:                ConfigureParams.Joysticks.Joy[1].nJoyId = 0;
                    733:                ConfigureParams.Joysticks.Joy[0].nJoyId = (maxjoy ? 1 : 0);
                    734:                ConfigureParams.Joysticks.Joy[1].nJoystickMode = JOYSTICK_REALSTICK;
                    735:        }
1.1.1.9   root      736: 
                    737:        /* Set defaults for Keyboard */
1.1.1.15  root      738:        ConfigureParams.Keyboard.bDisableKeyRepeat = false;
1.1.1.9   root      739:        ConfigureParams.Keyboard.nKeymapType = KEYMAP_SYMBOLIC;
                    740:        strcpy(ConfigureParams.Keyboard.szMappingFileName, "");
1.1.1.11  root      741:   
1.1.1.12  root      742:        /* Set defaults for Shortcuts */
                    743:        ConfigureParams.Shortcut.withoutModifier[SHORTCUT_OPTIONS] = SDLK_F12;
                    744:        ConfigureParams.Shortcut.withoutModifier[SHORTCUT_FULLSCREEN] = SDLK_F11;
1.1.1.13  root      745:        ConfigureParams.Shortcut.withoutModifier[SHORTCUT_PAUSE] = SDLK_PAUSE;
1.1.1.11  root      746:   
1.1.1.15  root      747:        ConfigureParams.Shortcut.withModifier[SHORTCUT_DEBUG] = SDLK_PAUSE;
1.1.1.12  root      748:        ConfigureParams.Shortcut.withModifier[SHORTCUT_OPTIONS] = SDLK_o;
                    749:        ConfigureParams.Shortcut.withModifier[SHORTCUT_FULLSCREEN] = SDLK_f;
1.1.1.24  root      750:        ConfigureParams.Shortcut.withModifier[SHORTCUT_BORDERS] = SDLK_b;
1.1.1.16  root      751:        ConfigureParams.Shortcut.withModifier[SHORTCUT_MOUSEGRAB] = SDLK_m;
1.1.1.12  root      752:        ConfigureParams.Shortcut.withModifier[SHORTCUT_COLDRESET] = SDLK_c;
                    753:        ConfigureParams.Shortcut.withModifier[SHORTCUT_WARMRESET] = SDLK_r;
                    754:        ConfigureParams.Shortcut.withModifier[SHORTCUT_SCREENSHOT] = SDLK_g;
                    755:        ConfigureParams.Shortcut.withModifier[SHORTCUT_BOSSKEY] = SDLK_i;
                    756:        ConfigureParams.Shortcut.withModifier[SHORTCUT_CURSOREMU] = SDLK_j;
1.1.1.13  root      757:        ConfigureParams.Shortcut.withModifier[SHORTCUT_FASTFORWARD] = SDLK_x;
1.1.1.12  root      758:        ConfigureParams.Shortcut.withModifier[SHORTCUT_RECANIM] = SDLK_a;
                    759:        ConfigureParams.Shortcut.withModifier[SHORTCUT_RECSOUND] = SDLK_y;
                    760:        ConfigureParams.Shortcut.withModifier[SHORTCUT_SOUND] = SDLK_s;
                    761:        ConfigureParams.Shortcut.withModifier[SHORTCUT_QUIT] = SDLK_q;
                    762:        ConfigureParams.Shortcut.withModifier[SHORTCUT_LOADMEM] = SDLK_l;
                    763:        ConfigureParams.Shortcut.withModifier[SHORTCUT_SAVEMEM] = SDLK_k;
1.1.1.13  root      764:        ConfigureParams.Shortcut.withModifier[SHORTCUT_INSERTDISKA] = SDLK_d;
1.1.1.22  root      765:        ConfigureParams.Shortcut.withModifier[SHORTCUT_JOY_0] = SDLK_F1;
                    766:        ConfigureParams.Shortcut.withModifier[SHORTCUT_JOY_1] = SDLK_F2;
                    767:        ConfigureParams.Shortcut.withModifier[SHORTCUT_PAD_A] = SDLK_F3;
                    768:        ConfigureParams.Shortcut.withModifier[SHORTCUT_PAD_B] = SDLK_F4;
1.1.1.13  root      769: 
1.1.1.9   root      770:        /* Set defaults for Memory */
1.1.1.24  root      771:        ConfigureParams.Memory.STRamSize_KB = 1024;     /* 1 MiB */
                    772:        ConfigureParams.Memory.TTRamSize_KB = 0;        /* disabled */
1.1.1.15  root      773:        ConfigureParams.Memory.bAutoSave = false;
1.1.1.12  root      774:        sprintf(ConfigureParams.Memory.szMemoryCaptureFileName, "%s%chatari.sav",
                    775:                psHomeDir, PATHSEP);
                    776:        sprintf(ConfigureParams.Memory.szAutoSaveFileName, "%s%cauto.sav",
                    777:                psHomeDir, PATHSEP);
1.1.1.9   root      778: 
                    779:        /* Set defaults for Printer */
1.1.1.15  root      780:        ConfigureParams.Printer.bEnablePrinting = false;
1.1.1.12  root      781:        sprintf(ConfigureParams.Printer.szPrintToFileName, "%s%chatari.prn",
                    782:                psHomeDir, PATHSEP);
1.1.1.9   root      783: 
1.1.1.25! root      784:        /* Set defaults for MFP RS232 (ST/MegaST/STE/MegaSTE/TT) */
1.1.1.15  root      785:        ConfigureParams.RS232.bEnableRS232 = false;
1.1.1.9   root      786:        strcpy(ConfigureParams.RS232.szOutFileName, "/dev/modem");
                    787:        strcpy(ConfigureParams.RS232.szInFileName, "/dev/modem");
1.1.1.25! root      788:        /* Set defaults for SCC RS232 ( MegaSTE/TT/Falcon) */
        !           789:        ConfigureParams.RS232.bEnableSccB = false;
        !           790:        strcpy(ConfigureParams.RS232.sSccBOutFileName, "/dev/modem");
        !           791: //     strcpy(ConfigureParams.RS232.sSccBInFileName, "/dev/modem");
1.1.1.9   root      792: 
                    793:        /* Set defaults for MIDI */
1.1.1.15  root      794:        ConfigureParams.Midi.bEnableMidi = false;
1.1.1.14  root      795:        strcpy(ConfigureParams.Midi.sMidiInFileName, "/dev/snd/midiC1D0");
                    796:        strcpy(ConfigureParams.Midi.sMidiOutFileName, "/dev/snd/midiC1D0");
1.1.1.24  root      797:        strcpy(ConfigureParams.Midi.sMidiInPortName, "Off");
                    798:        strcpy(ConfigureParams.Midi.sMidiOutPortName, "Off");
1.1.1.9   root      799: 
                    800:        /* Set defaults for Screen */
1.1.1.15  root      801:        ConfigureParams.Screen.bFullScreen = false;
1.1.1.17  root      802:        ConfigureParams.Screen.bKeepResolution = true;
1.1.1.24  root      803: #if WITH_SDL2
                    804:        ConfigureParams.Screen.bResizable = true;
                    805: #else
1.1.1.18  root      806:        ConfigureParams.Screen.bKeepResolutionST = false;
1.1.1.23  root      807: #endif
1.1.1.13  root      808:        ConfigureParams.Screen.nFrameSkips = AUTO_FRAMESKIP_LIMIT;
1.1.1.15  root      809:        ConfigureParams.Screen.bAllowOverscan = true;
1.1.1.21  root      810:        ConfigureParams.Screen.nSpec512Threshold = 1;
1.1.1.12  root      811:        ConfigureParams.Screen.nForceBpp = 0;
1.1.1.16  root      812:        ConfigureParams.Screen.bAspectCorrect = true;
1.1.1.13  root      813:        ConfigureParams.Screen.nMonitorType = MONITOR_TYPE_RGB;
1.1.1.15  root      814:        ConfigureParams.Screen.bUseExtVdiResolutions = false;
1.1.1.12  root      815:        ConfigureParams.Screen.nVdiWidth = 640;
                    816:        ConfigureParams.Screen.nVdiHeight = 480;
                    817:        ConfigureParams.Screen.nVdiColors = GEMCOLOR_16;
1.1.1.22  root      818:        ConfigureParams.Screen.bMouseWarp = true;
1.1.1.15  root      819:        ConfigureParams.Screen.bShowStatusbar = true;
                    820:        ConfigureParams.Screen.bShowDriveLed = true;
1.1.1.17  root      821:        ConfigureParams.Screen.bCrop = false;
1.1.1.19  root      822:        /* gives zoomed Falcon/TT windows about same size as ST/STE windows */
1.1.1.22  root      823:        ConfigureParams.Screen.nMaxWidth = 2*NUM_VISIBLE_LINE_PIXELS;
                    824:        ConfigureParams.Screen.nMaxHeight = 2*NUM_VISIBLE_LINES+STATUSBAR_MAX_HEIGHT;
1.1.1.18  root      825:        ConfigureParams.Screen.bForceMax = false;
1.1.1.24  root      826:        ConfigureParams.Screen.DisableVideo = false;
1.1.1.22  root      827: #if WITH_SDL2
1.1.1.24  root      828:        ConfigureParams.Screen.bUseSdlRenderer = true;
1.1.1.22  root      829:        ConfigureParams.Screen.nRenderScaleQuality = 0;
                    830:        ConfigureParams.Screen.bUseVsync = false;
                    831: #endif
1.1.1.9   root      832: 
                    833:        /* Set defaults for Sound */
1.1.1.17  root      834:        ConfigureParams.Sound.bEnableMicrophone = true;
1.1.1.15  root      835:        ConfigureParams.Sound.bEnableSound = true;
1.1.1.19  root      836:        ConfigureParams.Sound.bEnableSoundSync = false;
1.1.1.15  root      837:        ConfigureParams.Sound.nPlaybackFreq = 44100;
1.1.1.12  root      838:        sprintf(ConfigureParams.Sound.szYMCaptureFileName, "%s%chatari.wav",
                    839:                psWorkingDir, PATHSEP);
1.1.1.16  root      840:        ConfigureParams.Sound.SdlAudioBufferSize = 0;
1.1.1.17  root      841:        ConfigureParams.Sound.YmVolumeMixing = YM_TABLE_MIXING;
1.1.1.9   root      842: 
                    843:        /* Set defaults for Rom */
1.1.1.12  root      844:        sprintf(ConfigureParams.Rom.szTosImageFileName, "%s%ctos.img",
                    845:                Paths_GetDataDir(), PATHSEP);
1.1.1.18  root      846:        ConfigureParams.Rom.bPatchTos = true;
1.1.1.9   root      847:        strcpy(ConfigureParams.Rom.szCartridgeImageFileName, "");
                    848: 
                    849:        /* Set defaults for System */
1.1.1.23  root      850:        ConfigureParams.System.nMachineType = MACHINE_ST;
                    851:        ConfigureParams.System.nCpuLevel = 0;
1.1.1.24  root      852:        ConfigureParams.System.nCpuFreq = 8;    nCpuFreqShift = 0;
1.1.1.23  root      853:        ConfigureParams.System.nDSPType = DSP_TYPE_NONE;
1.1.1.19  root      854:        ConfigureParams.System.bAddressSpace24 = true;
1.1.1.23  root      855: #if ENABLE_WINUAE_CPU
1.1.1.19  root      856:        ConfigureParams.System.n_FPUType = FPU_NONE;
1.1.1.23  root      857:        ConfigureParams.System.bCompatibleFPU = true; /* JIT */
1.1.1.24  root      858:        ConfigureParams.System.bSoftFloatFPU = false;
1.1.1.19  root      859:        ConfigureParams.System.bMMU = false;
                    860:        ConfigureParams.System.bCycleExactCpu = true;
                    861: #endif
1.1.1.23  root      862:        ConfigureParams.System.VideoTimingMode = VIDEO_TIMING_MODE_WS3;
1.1.1.19  root      863:        ConfigureParams.System.bCompatibleCpu = true;
                    864:        ConfigureParams.System.bBlitter = false;
1.1.1.25! root      865:        ConfigureParams.System.bPatchTimerD = false;
1.1.1.22  root      866:        ConfigureParams.System.bFastBoot = false;
1.1.1.15  root      867:        ConfigureParams.System.bFastForward = false;
1.1.1.17  root      868: 
                    869:        /* Set defaults for Video */
                    870: #if HAVE_LIBPNG
                    871:        ConfigureParams.Video.AviRecordVcodec = AVI_RECORD_VIDEO_CODEC_PNG;
                    872: #else
                    873:        ConfigureParams.Video.AviRecordVcodec = AVI_RECORD_VIDEO_CODEC_BMP;
                    874: #endif
                    875:        ConfigureParams.Video.AviRecordFps = 0;                 /* automatic FPS */
                    876:        sprintf(ConfigureParams.Video.AviRecordFile, "%s%chatari.avi", psWorkingDir, PATHSEP);
1.1.1.9   root      877: 
                    878:        /* Initialize the configuration file name */
1.1.1.12  root      879:        if (strlen(psHomeDir) < sizeof(sConfigFileName)-13)
                    880:                sprintf(sConfigFileName, "%s%chatari.cfg", psHomeDir, PATHSEP);
1.1.1.9   root      881:        else
                    882:                strcpy(sConfigFileName, "hatari.cfg");
1.1.1.12  root      883: 
                    884: #if defined(__AMIGAOS4__)
                    885:        /* Fix default path names on Amiga OS */
                    886:        sprintf(ConfigureParams.Rom.szTosImageFileName, "%stos.img", Paths_GetDataDir());
                    887: #endif
1.1.1.2   root      888: }
                    889: 
                    890: 
                    891: /*-----------------------------------------------------------------------*/
1.1.1.12  root      892: /**
                    893:  * Copy details from configuration structure into global variables for system,
                    894:  * clean file names, etc...  Called from main.c and dialog.c files.
                    895:  */
1.1.1.13  root      896: void Configuration_Apply(bool bReset)
1.1.1.8   root      897: {
1.1.1.21  root      898:        int i;
1.1.1.24  root      899:        int size;
1.1.1.21  root      900: 
1.1.1.9   root      901:        if (bReset)
                    902:        {
1.1.1.12  root      903:                /* Set resolution change */
1.1.1.9   root      904:                bUseVDIRes = ConfigureParams.Screen.bUseExtVdiResolutions;
1.1.1.13  root      905:                bUseHighRes = ((!bUseVDIRes) && ConfigureParams.Screen.nMonitorType == MONITOR_TYPE_MONO)
1.1.1.12  root      906:                        || (bUseVDIRes && ConfigureParams.Screen.nVdiColors == GEMCOLOR_2);
                    907:                if (bUseHighRes)
                    908:                {
                    909:                        STRes = ST_HIGH_RES;
                    910:                }
                    911:                if (bUseVDIRes)
                    912:                {
1.1.1.25! root      913:                        /* rest of VDI setup done in TOS init */
1.1.1.17  root      914:                        bVdiAesIntercept = true;
1.1.1.12  root      915:                }
1.1.1.9   root      916:        }
1.1.1.13  root      917:        if (ConfigureParams.Screen.nFrameSkips < AUTO_FRAMESKIP_LIMIT)
                    918:        {
                    919:                nFrameSkips = ConfigureParams.Screen.nFrameSkips;
                    920:        }
1.1.1.23  root      921:        if (ConfigureParams.Screen.nForceBpp < 15)      /* Avoid 8-bit depth */
                    922:        {
                    923:                ConfigureParams.Screen.nForceBpp = 0;
                    924:        }
1.1.1.15  root      925: 
1.1.1.24  root      926:        /* Check/convert ST RAM size in KB */
                    927:        size = STMemory_RAM_Validate_Size_KB ( ConfigureParams.Memory.STRamSize_KB );
                    928:        if ( size < 0 )
                    929:                size = 1024;
                    930:        ConfigureParams.Memory.STRamSize_KB = size;
                    931:        STMemory_Init ( ConfigureParams.Memory.STRamSize_KB * 1024 );
                    932: 
                    933:        /* Update variables depending on the new CPU Freq (to do before other ClocksTimings_xxx functions) */
                    934:        Configuration_ChangeCpuFreq ( ConfigureParams.System.nCpuFreq );
                    935: 
1.1.1.17  root      936:        /* Init clocks for this machine */
                    937:        ClocksTimings_InitMachine ( ConfigureParams.System.nMachineType );
                    938: 
1.1.1.23  root      939:        /* Set video timings for this machine */
                    940:        Video_SetTimings ( ConfigureParams.System.nMachineType , ConfigureParams.System.VideoTimingMode );
                    941: 
1.1.1.16  root      942:        /* Sound settings */
                    943:        /* SDL sound buffer in ms */
                    944:        SdlAudioBufferSize = ConfigureParams.Sound.SdlAudioBufferSize;
                    945:        if ( SdlAudioBufferSize == 0 )                  /* use default setting for SDL */
                    946:                ;
                    947:        else if ( SdlAudioBufferSize < 10 )             /* min of 10 ms */
                    948:                SdlAudioBufferSize = 10;
                    949:        else if ( SdlAudioBufferSize > 100 )            /* max of 100 ms */
                    950:                SdlAudioBufferSize = 100;
                    951: 
1.1.1.9   root      952:        /* Set playback frequency */
1.1.1.15  root      953:        Audio_SetOutputAudioFreq(ConfigureParams.Sound.nPlaybackFreq);
                    954: 
1.1.1.17  root      955:        /* YM Mixing */
                    956:        if ( ( ConfigureParams.Sound.YmVolumeMixing != YM_LINEAR_MIXING )
1.1.1.18  root      957:          && ( ConfigureParams.Sound.YmVolumeMixing != YM_TABLE_MIXING  )
                    958:          && ( ConfigureParams.Sound.YmVolumeMixing != YM_MODEL_MIXING ) )
1.1.1.17  root      959:                ConfigureParams.Sound.YmVolumeMixing = YM_TABLE_MIXING;
                    960: 
                    961:        YmVolumeMixing = ConfigureParams.Sound.YmVolumeMixing;
                    962:        Sound_SetYmVolumeMixing();
                    963: 
1.1.1.23  root      964:        /* Falcon : update clocks values if sound freq changed  */
                    965:        if ( Config_IsMachineFalcon() )
                    966:                Crossbar_Recalculate_Clocks_Cycles();
                    967: 
1.1.1.17  root      968:        /* Check/constrain CPU settings and change corresponding
                    969:         * UAE cpu_level & cpu_compatible variables
                    970:         */
1.1.1.25! root      971: //fprintf (stderr,"M68000_CheckCpuSettings conf 1\n" );
1.1.1.17  root      972:        M68000_CheckCpuSettings();
1.1.1.25! root      973: //fprintf (stderr,"M68000_CheckCpuSettings conf 2\n" );
1.1.1.9   root      974: 
                    975:        /* Clean file and directory names */
                    976:        File_MakeAbsoluteName(ConfigureParams.Rom.szTosImageFileName);
1.1.1.11  root      977:        if (strlen(ConfigureParams.Rom.szCartridgeImageFileName) > 0)
                    978:                File_MakeAbsoluteName(ConfigureParams.Rom.szCartridgeImageFileName);
1.1.1.10  root      979:        File_CleanFileName(ConfigureParams.HardDisk.szHardDiskDirectories[0]);
                    980:        File_MakeAbsoluteName(ConfigureParams.HardDisk.szHardDiskDirectories[0]);
1.1.1.12  root      981:        File_MakeAbsoluteName(ConfigureParams.Memory.szMemoryCaptureFileName);
                    982:        File_MakeAbsoluteName(ConfigureParams.Sound.szYMCaptureFileName);
                    983:        if (strlen(ConfigureParams.Keyboard.szMappingFileName) > 0)
                    984:                File_MakeAbsoluteName(ConfigureParams.Keyboard.szMappingFileName);
1.1.1.17  root      985:        File_MakeAbsoluteName(ConfigureParams.Video.AviRecordFile);
1.1.1.21  root      986:        for (i = 0; i < MAX_ACSI_DEVS; i++)
                    987:        {
                    988:                File_MakeAbsoluteName(ConfigureParams.Acsi[i].sDeviceFile);
                    989:        }
1.1.1.22  root      990:        for (i = 0; i < MAX_SCSI_DEVS; i++)
                    991:        {
                    992:                File_MakeAbsoluteName(ConfigureParams.Scsi[i].sDeviceFile);
                    993:        }
1.1.1.25! root      994:        for (i = 0; i < MAX_IDE_DEVS; i++)
        !           995:        {
        !           996:                File_MakeAbsoluteName(ConfigureParams.Ide[i].sDeviceFile);
        !           997:        }
1.1.1.21  root      998: 
1.1.1.12  root      999:        /* make path names absolute, but handle special file names */
                   1000:        File_MakeAbsoluteSpecialName(ConfigureParams.Log.sLogFileName);
1.1.1.13  root     1001:        File_MakeAbsoluteSpecialName(ConfigureParams.Log.sTraceFileName);
1.1.1.14  root     1002:        File_MakeAbsoluteSpecialName(ConfigureParams.RS232.szInFileName);
                   1003:        File_MakeAbsoluteSpecialName(ConfigureParams.RS232.szOutFileName);
1.1.1.25! root     1004: //     File_MakeAbsoluteSpecialName(ConfigureParams.RS232.sSccBInFileName);
        !          1005:        File_MakeAbsoluteSpecialName(ConfigureParams.RS232.sSccBOutFileName);
1.1.1.14  root     1006:        File_MakeAbsoluteSpecialName(ConfigureParams.Midi.sMidiInFileName);
                   1007:        File_MakeAbsoluteSpecialName(ConfigureParams.Midi.sMidiOutFileName);
1.1.1.12  root     1008:        File_MakeAbsoluteSpecialName(ConfigureParams.Printer.szPrintToFileName);
1.1.1.21  root     1009: 
                   1010:        /* Enable/disable floppy drives */
                   1011:        FDC_Drive_Set_Enable ( 0 , ConfigureParams.DiskImage.EnableDriveA );
                   1012:        FDC_Drive_Set_Enable ( 1 , ConfigureParams.DiskImage.EnableDriveB );
                   1013:        FDC_Drive_Set_NumberOfHeads ( 0 , ConfigureParams.DiskImage.DriveA_NumberOfHeads );
                   1014:        FDC_Drive_Set_NumberOfHeads ( 1 , ConfigureParams.DiskImage.DriveB_NumberOfHeads );
1.1.1.22  root     1015: 
1.1.1.25! root     1016:        /* Update disassembler */
1.1.1.22  root     1017: #if ENABLE_WINUAE_CPU
1.1.1.25! root     1018:        Disasm_SetCPUType(ConfigureParams.System.nCpuLevel, ConfigureParams.System.n_FPUType,
        !          1019:                          ConfigureParams.System.bMMU);
1.1.1.22  root     1020: #else
1.1.1.25! root     1021:        Disasm_SetCPUType(ConfigureParams.System.nCpuLevel, 0, false);
1.1.1.22  root     1022: #endif
                   1023: 
                   1024: #if ENABLE_DSP_EMU
                   1025:        /* Enable DSP ? */
                   1026:        if ( ConfigureParams.System.nDSPType == DSP_TYPE_EMU )
                   1027:                DSP_Enable ();
                   1028:        else
                   1029:                DSP_Disable ();
                   1030: #endif
1.1.1.8   root     1031: }
                   1032: 
                   1033: 
                   1034: /*-----------------------------------------------------------------------*/
1.1.1.12  root     1035: /**
                   1036:  * Load a settings section from the configuration file.
                   1037:  */
1.1.1.9   root     1038: static int Configuration_LoadSection(const char *pFilename, const struct Config_Tag configs[], const char *pSection)
1.1       root     1039: {
1.1.1.9   root     1040:        int ret;
1.1       root     1041: 
1.1.1.9   root     1042:        ret = input_config(pFilename, configs, pSection);
1.1       root     1043: 
1.1.1.9   root     1044:        if (ret < 0)
1.1.1.25! root     1045:                Log_Printf(LOG_ERROR, "cannot load configuration file %s (section %s).\n",
1.1.1.16  root     1046:                        pFilename, pSection);
1.1       root     1047: 
1.1.1.9   root     1048:        return ret;
1.1       root     1049: }
                   1050: 
                   1051: 
                   1052: /*-----------------------------------------------------------------------*/
1.1.1.12  root     1053: /**
                   1054:  * Load program setting from configuration file. If psFileName is NULL, use
1.1.1.16  root     1055:  * the configuration file given in configuration / last selected by user.
1.1.1.12  root     1056:  */
1.1.1.9   root     1057: void Configuration_Load(const char *psFileName)
1.1       root     1058: {
1.1.1.9   root     1059:        if (psFileName == NULL)
                   1060:                psFileName = sConfigFileName;
                   1061: 
                   1062:        if (!File_Exists(psFileName))
                   1063:        {
1.1.1.17  root     1064:                Log_Printf(LOG_DEBUG, "Configuration file %s not found.\n", psFileName);
1.1.1.9   root     1065:                return;
                   1066:        }
                   1067: 
1.1.1.23  root     1068:        /* Try to load information from old config files */
                   1069:        nOldMachineType = -1;
                   1070:        Configuration_LoadSection(psFileName, configs_System_Old, "[System]");
                   1071:        switch (nOldMachineType)
                   1072:        {
                   1073:         case 0:
                   1074:                if (!bOldRealTimeClock)
                   1075:                        ConfigureParams.System.nMachineType = MACHINE_ST;
                   1076:                else
                   1077:                        ConfigureParams.System.nMachineType = MACHINE_MEGA_ST;
                   1078:                break;
                   1079:         case 1:
                   1080:                ConfigureParams.System.nMachineType = MACHINE_STE;
                   1081:                break;
                   1082:         case 2:
                   1083:                ConfigureParams.System.nMachineType = MACHINE_TT;
                   1084:                break;
                   1085:         case 3:
                   1086:                ConfigureParams.System.nMachineType = MACHINE_FALCON;
                   1087:                break;
                   1088:        }
1.1.1.25! root     1089:        Configuration_LoadSection(psFileName, configs_HardDisk_Old, "[HardDisk]");
1.1.1.23  root     1090: 
                   1091: #if !WITH_SDL2 /* for old SDL1 keycode compatibility */
                   1092:        Configuration_LoadSection(psFileName, configs_ShortCutWithMod_Sdl1, "[ShortcutsWithModifiers]");
                   1093:        Configuration_LoadSection(psFileName, configs_ShortCutWithoutMod_Sdl1, "[ShortcutsWithoutModifiers]");
                   1094:        Configuration_LoadSection(psFileName, configs_Joystick0_Sdl1, "[Joystick0]");
                   1095:        Configuration_LoadSection(psFileName, configs_Joystick1_Sdl1, "[Joystick1]");
                   1096:        Configuration_LoadSection(psFileName, configs_Joystick2_Sdl1, "[Joystick2]");
                   1097:        Configuration_LoadSection(psFileName, configs_Joystick3_Sdl1, "[Joystick3]");
                   1098:        Configuration_LoadSection(psFileName, configs_Joystick4_Sdl1, "[Joystick4]");
                   1099:        Configuration_LoadSection(psFileName, configs_Joystick5_Sdl1, "[Joystick5]");
                   1100: #endif
                   1101: 
1.1.1.25! root     1102:        /* Now the regular loading of the sections:
        !          1103:         * Start with Log so that logging works as early as possible */
1.1.1.9   root     1104:        Configuration_LoadSection(psFileName, configs_Log, "[Log]");
1.1.1.25! root     1105:        Log_SetLevels();
        !          1106: 
1.1.1.16  root     1107:        Configuration_LoadSection(psFileName, configs_Debugger, "[Debugger]");
1.1.1.9   root     1108:        Configuration_LoadSection(psFileName, configs_Screen, "[Screen]");
                   1109:        Configuration_LoadSection(psFileName, configs_Joystick0, "[Joystick0]");
                   1110:        Configuration_LoadSection(psFileName, configs_Joystick1, "[Joystick1]");
1.1.1.10  root     1111:        Configuration_LoadSection(psFileName, configs_Joystick2, "[Joystick2]");
                   1112:        Configuration_LoadSection(psFileName, configs_Joystick3, "[Joystick3]");
                   1113:        Configuration_LoadSection(psFileName, configs_Joystick4, "[Joystick4]");
                   1114:        Configuration_LoadSection(psFileName, configs_Joystick5, "[Joystick5]");
1.1.1.9   root     1115:        Configuration_LoadSection(psFileName, configs_Keyboard, "[Keyboard]");
1.1.1.23  root     1116:        Configuration_LoadSection(psFileName, configs_ShortCutWithMod, "[KeyShortcutsWithMod]");
                   1117:        Configuration_LoadSection(psFileName, configs_ShortCutWithoutMod, "[KeyShortcutsWithoutMod]");
1.1.1.9   root     1118:        Configuration_LoadSection(psFileName, configs_Sound, "[Sound]");
                   1119:        Configuration_LoadSection(psFileName, configs_Memory, "[Memory]");
                   1120:        Configuration_LoadSection(psFileName, configs_Floppy, "[Floppy]");
1.1.1.10  root     1121:        Configuration_LoadSection(psFileName, configs_HardDisk, "[HardDisk]");
1.1.1.21  root     1122:        Configuration_LoadSection(psFileName, configs_Acsi, "[ACSI]");
1.1.1.22  root     1123:        Configuration_LoadSection(psFileName, configs_Scsi, "[SCSI]");
1.1.1.25! root     1124:        Configuration_LoadSection(psFileName, configs_Ide, "[IDE]");
1.1.1.9   root     1125:        Configuration_LoadSection(psFileName, configs_Rom, "[ROM]");
                   1126:        Configuration_LoadSection(psFileName, configs_Rs232, "[RS232]");
                   1127:        Configuration_LoadSection(psFileName, configs_Printer, "[Printer]");
                   1128:        Configuration_LoadSection(psFileName, configs_Midi, "[Midi]");
                   1129:        Configuration_LoadSection(psFileName, configs_System, "[System]");
1.1.1.17  root     1130:        Configuration_LoadSection(psFileName, configs_Video, "[Video]");
1.1       root     1131: }
                   1132: 
                   1133: 
                   1134: /*-----------------------------------------------------------------------*/
1.1.1.12  root     1135: /**
                   1136:  * Save a settings section to configuration file
                   1137:  */
1.1.1.9   root     1138: static int Configuration_SaveSection(const char *pFilename, const struct Config_Tag configs[], const char *pSection)
1.1       root     1139: {
1.1.1.9   root     1140:        int ret;
1.1       root     1141: 
1.1.1.9   root     1142:        ret = update_config(pFilename, configs, pSection);
1.1       root     1143: 
1.1.1.9   root     1144:        if (ret < 0)
1.1.1.25! root     1145:                Log_Printf(LOG_ERROR, "cannot save configuration file %s (section %s)\n",
        !          1146:                           pFilename, pSection);
1.1       root     1147: 
1.1.1.9   root     1148:        return ret;
1.1       root     1149: }
                   1150: 
                   1151: 
                   1152: /*-----------------------------------------------------------------------*/
1.1.1.12  root     1153: /**
                   1154:  * Save program setting to configuration file
                   1155:  */
1.1.1.6   root     1156: void Configuration_Save(void)
1.1       root     1157: {
1.1.1.9   root     1158:        if (Configuration_SaveSection(sConfigFileName, configs_Log, "[Log]") < 0)
                   1159:        {
1.1.1.13  root     1160:                Log_AlertDlg(LOG_ERROR, "Error saving config file.");
1.1.1.9   root     1161:                return;
                   1162:        }
1.1.1.16  root     1163:        Configuration_SaveSection(sConfigFileName, configs_Debugger, "[Debugger]");
1.1.1.9   root     1164:        Configuration_SaveSection(sConfigFileName, configs_Screen, "[Screen]");
                   1165:        Configuration_SaveSection(sConfigFileName, configs_Joystick0, "[Joystick0]");
                   1166:        Configuration_SaveSection(sConfigFileName, configs_Joystick1, "[Joystick1]");
1.1.1.10  root     1167:        Configuration_SaveSection(sConfigFileName, configs_Joystick2, "[Joystick2]");
                   1168:        Configuration_SaveSection(sConfigFileName, configs_Joystick3, "[Joystick3]");
                   1169:        Configuration_SaveSection(sConfigFileName, configs_Joystick4, "[Joystick4]");
                   1170:        Configuration_SaveSection(sConfigFileName, configs_Joystick5, "[Joystick5]");
1.1.1.9   root     1171:        Configuration_SaveSection(sConfigFileName, configs_Keyboard, "[Keyboard]");
1.1.1.23  root     1172:        Configuration_SaveSection(sConfigFileName, configs_ShortCutWithMod, "[KeyShortcutsWithMod]");
                   1173:        Configuration_SaveSection(sConfigFileName, configs_ShortCutWithoutMod, "[KeyShortcutsWithoutMod]");
1.1.1.9   root     1174:        Configuration_SaveSection(sConfigFileName, configs_Sound, "[Sound]");
                   1175:        Configuration_SaveSection(sConfigFileName, configs_Memory, "[Memory]");
                   1176:        Configuration_SaveSection(sConfigFileName, configs_Floppy, "[Floppy]");
1.1.1.10  root     1177:        Configuration_SaveSection(sConfigFileName, configs_HardDisk, "[HardDisk]");
1.1.1.25! root     1178:        Configuration_SaveSection(sConfigFileName, configs_Acsi, "[ACSI]");
        !          1179:        Configuration_SaveSection(sConfigFileName, configs_Scsi, "[SCSI]");
        !          1180:        Configuration_SaveSection(sConfigFileName, configs_Ide, "[IDE]");
1.1.1.9   root     1181:        Configuration_SaveSection(sConfigFileName, configs_Rom, "[ROM]");
                   1182:        Configuration_SaveSection(sConfigFileName, configs_Rs232, "[RS232]");
                   1183:        Configuration_SaveSection(sConfigFileName, configs_Printer, "[Printer]");
                   1184:        Configuration_SaveSection(sConfigFileName, configs_Midi, "[Midi]");
                   1185:        Configuration_SaveSection(sConfigFileName, configs_System, "[System]");
1.1.1.17  root     1186:        Configuration_SaveSection(sConfigFileName, configs_Video, "[Video]");
1.1       root     1187: }
1.1.1.6   root     1188: 
1.1.1.12  root     1189: 
                   1190: /*-----------------------------------------------------------------------*/
                   1191: /**
                   1192:  * Save/restore snapshot of configuration variables
                   1193:  * ('MemorySnapShot_Store' handles type)
                   1194:  */
1.1.1.13  root     1195: void Configuration_MemorySnapShot_Capture(bool bSave)
1.1.1.12  root     1196: {
1.1.1.21  root     1197:        int i;
                   1198: 
1.1.1.12  root     1199:        MemorySnapShot_Store(ConfigureParams.Rom.szTosImageFileName, sizeof(ConfigureParams.Rom.szTosImageFileName));
                   1200:        MemorySnapShot_Store(ConfigureParams.Rom.szCartridgeImageFileName, sizeof(ConfigureParams.Rom.szCartridgeImageFileName));
                   1201: 
1.1.1.24  root     1202:        MemorySnapShot_Store(&ConfigureParams.Memory.STRamSize_KB, sizeof(ConfigureParams.Memory.STRamSize_KB));
                   1203:        MemorySnapShot_Store(&ConfigureParams.Memory.TTRamSize_KB, sizeof(ConfigureParams.Memory.TTRamSize_KB));
1.1.1.12  root     1204: 
1.1.1.18  root     1205:        MemorySnapShot_Store(&ConfigureParams.DiskImage.szDiskFileName[0], sizeof(ConfigureParams.DiskImage.szDiskFileName[0]));
                   1206:        MemorySnapShot_Store(&ConfigureParams.DiskImage.szDiskZipPath[0], sizeof(ConfigureParams.DiskImage.szDiskZipPath[0]));
1.1.1.21  root     1207:        MemorySnapShot_Store(&ConfigureParams.DiskImage.EnableDriveA, sizeof(ConfigureParams.DiskImage.EnableDriveA));
                   1208:        MemorySnapShot_Store(&ConfigureParams.DiskImage.DriveA_NumberOfHeads, sizeof(ConfigureParams.DiskImage.DriveA_NumberOfHeads));
1.1.1.18  root     1209:        MemorySnapShot_Store(&ConfigureParams.DiskImage.szDiskFileName[1], sizeof(ConfigureParams.DiskImage.szDiskFileName[1]));
                   1210:        MemorySnapShot_Store(&ConfigureParams.DiskImage.szDiskZipPath[1], sizeof(ConfigureParams.DiskImage.szDiskZipPath[1]));
1.1.1.21  root     1211:        MemorySnapShot_Store(&ConfigureParams.DiskImage.EnableDriveB, sizeof(ConfigureParams.DiskImage.EnableDriveB));
                   1212:        MemorySnapShot_Store(&ConfigureParams.DiskImage.DriveB_NumberOfHeads, sizeof(ConfigureParams.DiskImage.DriveB_NumberOfHeads));
1.1.1.18  root     1213: 
1.1.1.12  root     1214:        MemorySnapShot_Store(&ConfigureParams.HardDisk.bUseHardDiskDirectories, sizeof(ConfigureParams.HardDisk.bUseHardDiskDirectories));
                   1215:        MemorySnapShot_Store(ConfigureParams.HardDisk.szHardDiskDirectories[DRIVE_C], sizeof(ConfigureParams.HardDisk.szHardDiskDirectories[DRIVE_C]));
1.1.1.21  root     1216:        for (i = 0; i < MAX_ACSI_DEVS; i++)
                   1217:        {
                   1218:                MemorySnapShot_Store(&ConfigureParams.Acsi[i].bUseDevice, sizeof(ConfigureParams.Acsi[i].bUseDevice));
                   1219:                MemorySnapShot_Store(ConfigureParams.Acsi[i].sDeviceFile, sizeof(ConfigureParams.Acsi[i].sDeviceFile));
                   1220:        }
1.1.1.25! root     1221:        for (i = 0; i < MAX_SCSI_DEVS; i++)
1.1.1.22  root     1222:        {
                   1223:                MemorySnapShot_Store(&ConfigureParams.Scsi[i].bUseDevice, sizeof(ConfigureParams.Scsi[i].bUseDevice));
                   1224:                MemorySnapShot_Store(ConfigureParams.Scsi[i].sDeviceFile, sizeof(ConfigureParams.Scsi[i].sDeviceFile));
1.1.1.25! root     1225:        }
        !          1226:        for (i = 0; i < MAX_IDE_DEVS; i++)
        !          1227:        {
        !          1228:                MemorySnapShot_Store(&ConfigureParams.Ide[i].bUseDevice, sizeof(ConfigureParams.Ide[i].bUseDevice));
        !          1229:                MemorySnapShot_Store(&ConfigureParams.Ide[i].nByteSwap, sizeof(ConfigureParams.Ide[i].nByteSwap));
        !          1230:                MemorySnapShot_Store(ConfigureParams.Ide[i].sDeviceFile, sizeof(ConfigureParams.Ide[i].sDeviceFile));
        !          1231:        }
1.1.1.12  root     1232: 
1.1.1.13  root     1233:        MemorySnapShot_Store(&ConfigureParams.Screen.nMonitorType, sizeof(ConfigureParams.Screen.nMonitorType));
1.1.1.12  root     1234:        MemorySnapShot_Store(&ConfigureParams.Screen.bUseExtVdiResolutions, sizeof(ConfigureParams.Screen.bUseExtVdiResolutions));
                   1235:        MemorySnapShot_Store(&ConfigureParams.Screen.nVdiWidth, sizeof(ConfigureParams.Screen.nVdiWidth));
                   1236:        MemorySnapShot_Store(&ConfigureParams.Screen.nVdiHeight, sizeof(ConfigureParams.Screen.nVdiHeight));
                   1237:        MemorySnapShot_Store(&ConfigureParams.Screen.nVdiColors, sizeof(ConfigureParams.Screen.nVdiColors));
                   1238: 
                   1239:        MemorySnapShot_Store(&ConfigureParams.System.nCpuLevel, sizeof(ConfigureParams.System.nCpuLevel));
                   1240:        MemorySnapShot_Store(&ConfigureParams.System.nCpuFreq, sizeof(ConfigureParams.System.nCpuFreq));
                   1241:        MemorySnapShot_Store(&ConfigureParams.System.bCompatibleCpu, sizeof(ConfigureParams.System.bCompatibleCpu));
                   1242:        MemorySnapShot_Store(&ConfigureParams.System.nMachineType, sizeof(ConfigureParams.System.nMachineType));
                   1243:        MemorySnapShot_Store(&ConfigureParams.System.bBlitter, sizeof(ConfigureParams.System.bBlitter));
                   1244:        MemorySnapShot_Store(&ConfigureParams.System.nDSPType, sizeof(ConfigureParams.System.nDSPType));
1.1.1.23  root     1245:        MemorySnapShot_Store(&bOldRealTimeClock, sizeof(bOldRealTimeClock));    /* TODO: Can be removed later */
1.1.1.12  root     1246:        MemorySnapShot_Store(&ConfigureParams.System.bPatchTimerD, sizeof(ConfigureParams.System.bPatchTimerD));
1.1.1.22  root     1247:        MemorySnapShot_Store(&ConfigureParams.System.bAddressSpace24, sizeof(ConfigureParams.System.bAddressSpace24));
1.1.1.17  root     1248: 
                   1249: #if ENABLE_WINUAE_CPU
                   1250:        MemorySnapShot_Store(&ConfigureParams.System.bCycleExactCpu, sizeof(ConfigureParams.System.bCycleExactCpu));
                   1251:        MemorySnapShot_Store(&ConfigureParams.System.n_FPUType, sizeof(ConfigureParams.System.n_FPUType));
                   1252:        MemorySnapShot_Store(&ConfigureParams.System.bCompatibleFPU, sizeof(ConfigureParams.System.bCompatibleFPU));
                   1253:        MemorySnapShot_Store(&ConfigureParams.System.bMMU, sizeof(ConfigureParams.System.bMMU));
                   1254: #endif
                   1255: 
1.1.1.18  root     1256:        MemorySnapShot_Store(&ConfigureParams.DiskImage.FastFloppy, sizeof(ConfigureParams.DiskImage.FastFloppy));
1.1.1.12  root     1257: 
                   1258:        if (!bSave)
1.1.1.15  root     1259:                Configuration_Apply(true);
1.1.1.12  root     1260: }
1.1.1.24  root     1261: 
                   1262: 
                   1263: 
                   1264: /*-----------------------------------------------------------------------*/
                   1265: /**
                   1266:  * This function should be called each time the CPU freq is changed.
                   1267:  * It will update the main configuration, as well as the corresponding
                   1268:  * value for nCpuFreqShift
                   1269:  *
                   1270:  * In case the new CPU freq is different from the current CPU freq, we
                   1271:  * also call MClocksTimings_UpdateCpuFreqEmul and 68000_ChangeCpuFreq
                   1272:  * to update some low level hardware related values
                   1273:  */
                   1274: void Configuration_ChangeCpuFreq ( int CpuFreq_new )
                   1275: {
                   1276:        int     CpuFreq_old = ConfigureParams.System.nCpuFreq;
                   1277: 
                   1278: //fprintf ( stderr , "changing cpu freq %d -> %d\n" , ConfigureParams.System.nCpuFreq , CpuFreq_new );
                   1279: 
                   1280:        /* In case value is not exactly 8, 16 or 32, then we change it so */
                   1281:        if ( CpuFreq_new < 12 )
                   1282:        {
                   1283:                ConfigureParams.System.nCpuFreq = 8;
                   1284:                nCpuFreqShift = 0;
                   1285:        }
                   1286:        else if ( CpuFreq_new > 26 )
                   1287:        {
                   1288:                ConfigureParams.System.nCpuFreq = 32;
                   1289:                nCpuFreqShift = 2;
                   1290:        }
                   1291:        else
                   1292:        {
                   1293:                ConfigureParams.System.nCpuFreq = 16;
                   1294:                nCpuFreqShift = 1;
                   1295:        }
                   1296: 
                   1297:        ClocksTimings_UpdateCpuFreqEmul ( ConfigureParams.System.nMachineType , nCpuFreqShift );
                   1298: 
                   1299:        if ( CpuFreq_old != CpuFreq_new )
                   1300:        {
                   1301:                M68000_ChangeCpuFreq();
                   1302:        }
                   1303: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.