|
|
1.1 root 1: /*
2: Hatari - configuration.c
3:
4: This file is distributed under the GNU Public License, version 2 or at
5: your option any later version. Read the file gpl.txt for details.
6:
7: Configuration File
8:
9: The configuration file is now stored in an ASCII format to allow the user
10: to edit the file manually.
11: */
12: const char Configuration_fileid[] = "Hatari configuration.c : " __DATE__ " " __TIME__;
13:
14: #include <SDL_keysym.h>
15:
16: #include "main.h"
17: #include "configuration.h"
18: #include "cfgopts.h"
19: #include "file.h"
20: #include "log.h"
21: #include "m68000.h"
22: #include "memorySnapShot.h"
23: #include "paths.h"
24: #include "screen.h"
25: #include "video.h"
1.1.1.2 root 26: #include "avi_record.h"
27: #include "clocks_timings.h"
1.1 root 28:
29:
30: CNF_PARAMS ConfigureParams; /* List of configuration for the emulator */
31: char sConfigFileName[FILENAME_MAX]; /* Stores the name of the configuration file */
32:
33:
34: /* Used to load/save logging options */
35: static const struct Config_Tag configs_Log[] =
36: {
37: { "sLogFileName", String_Tag, ConfigureParams.Log.sLogFileName },
38: { "sTraceFileName", String_Tag, ConfigureParams.Log.sTraceFileName },
39: { "nTextLogLevel", Int_Tag, &ConfigureParams.Log.nTextLogLevel },
40: { "nAlertDlgLogLevel", Int_Tag, &ConfigureParams.Log.nAlertDlgLogLevel },
41: { "bConfirmQuit", Bool_Tag, &ConfigureParams.Log.bConfirmQuit },
42: { NULL , Error_Tag, NULL }
43: };
44:
1.1.1.3 ! root 45: /* Used to load/save configuration dialog options */
! 46: static const struct Config_Tag configs_ConfigDialog[] =
! 47: {
! 48: { "bShowConfigDialogAtStartup", Bool_Tag, &ConfigureParams.ConfigDialog.bShowConfigDialogAtStartup },
! 49: { NULL , Error_Tag, NULL }
! 50: };
! 51:
1.1 root 52: /* Used to load/save debugger options */
53: static const struct Config_Tag configs_Debugger[] =
54: {
55: { "nNumberBase", Int_Tag, &ConfigureParams.Debugger.nNumberBase },
56: { "nDisasmLines", Int_Tag, &ConfigureParams.Debugger.nDisasmLines },
57: { "nMemdumpLines", Int_Tag, &ConfigureParams.Debugger.nMemdumpLines },
58: { NULL , Error_Tag, NULL }
59: };
60:
61: /* Used to load/save screen options */
62: static const struct Config_Tag configs_Screen[] =
63: {
64: { "nMonitorType", Int_Tag, &ConfigureParams.Screen.nMonitorType },
1.1.1.2 root 65: // { "nFrameSkips", Int_Tag, &ConfigureParams.Screen.nFrameSkips },
1.1 root 66: { "bFullScreen", Bool_Tag, &ConfigureParams.Screen.bFullScreen },
1.1.1.2 root 67: { "bKeepResolution", Bool_Tag, &ConfigureParams.Screen.bKeepResolution },
1.1 root 68: { "bAllowOverscan", Bool_Tag, &ConfigureParams.Screen.bAllowOverscan },
69: { "nSpec512Threshold", Int_Tag, &ConfigureParams.Screen.nSpec512Threshold },
70: { "nForceBpp", Int_Tag, &ConfigureParams.Screen.nForceBpp },
71: { "bAspectCorrect", Bool_Tag, &ConfigureParams.Screen.bAspectCorrect },
72: { "bUseExtVdiResolutions", Bool_Tag, &ConfigureParams.Screen.bUseExtVdiResolutions },
73: { "nVdiWidth", Int_Tag, &ConfigureParams.Screen.nVdiWidth },
74: { "nVdiHeight", Int_Tag, &ConfigureParams.Screen.nVdiHeight },
75: { "nVdiColors", Int_Tag, &ConfigureParams.Screen.nVdiColors },
76: { "bShowStatusbar", Bool_Tag, &ConfigureParams.Screen.bShowStatusbar },
77: { "bShowDriveLed", Bool_Tag, &ConfigureParams.Screen.bShowDriveLed },
1.1.1.2 root 78: { "bCrop", Bool_Tag, &ConfigureParams.Screen.bCrop },
1.1 root 79: { "nMaxWidth", Int_Tag, &ConfigureParams.Screen.nMaxWidth },
80: { "nMaxHeight", Int_Tag, &ConfigureParams.Screen.nMaxHeight },
81: { NULL , Error_Tag, NULL }
82: };
83:
84: /* Used to load/save keyboard options */
85: static const struct Config_Tag configs_Keyboard[] =
86: {
87: { "bDisableKeyRepeat", Bool_Tag, &ConfigureParams.Keyboard.bDisableKeyRepeat },
88: { "nKeymapType", Int_Tag, &ConfigureParams.Keyboard.nKeymapType },
89: { "szMappingFileName", String_Tag, ConfigureParams.Keyboard.szMappingFileName },
90: { NULL , Error_Tag, NULL }
91: };
92:
93: /* Used to load/save shortcut key bindings with modifiers options */
94: static const struct Config_Tag configs_ShortCutWithMod[] =
95: {
96: { "keyOptions", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_OPTIONS] },
97: { "keyFullScreen", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_FULLSCREEN] },
98: { "keyMouseMode", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_MOUSEGRAB] },
99: { "keyColdReset", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_COLDRESET] },
100: { "keyWarmReset", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_WARMRESET] },
101: { "keyScreenShot", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_SCREENSHOT] },
102: { "keyBossKey", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_BOSSKEY] },
103: { "keyCursorEmu", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_CURSOREMU] },
104: { "keyFastForward",Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_FASTFORWARD] },
105: { "keyRecAnim", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_RECANIM] },
106: { "keyRecSound", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_RECSOUND] },
107: { "keySound", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_SOUND] },
108: { "keyPause", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_PAUSE] },
109: { "keyDebugger", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_DEBUG] },
110: { "keyQuit", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_QUIT] },
111: { "keyLoadMem", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_LOADMEM] },
112: { "keySaveMem", Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_SAVEMEM] },
113: { "keyInsertDiskA",Int_Tag, &ConfigureParams.Shortcut.withModifier[SHORTCUT_INSERTDISKA] },
114: { NULL , Error_Tag, NULL }
115: };
116:
117: /* Used to load/save shortcut key bindings without modifiers options */
118: static const struct Config_Tag configs_ShortCutWithoutMod[] =
119: {
120: { "keyOptions", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_OPTIONS] },
121: { "keyFullScreen", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_FULLSCREEN] },
122: { "keyMouseMode", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_MOUSEGRAB] },
123: { "keyColdReset", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_COLDRESET] },
124: { "keyWarmReset", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_WARMRESET] },
125: { "keyScreenShot", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_SCREENSHOT] },
126: { "keyBossKey", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_BOSSKEY] },
127: { "keyCursorEmu", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_CURSOREMU] },
128: { "keyFastForward",Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_FASTFORWARD] },
129: { "keyRecAnim", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_RECANIM] },
130: { "keyRecSound", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_RECSOUND] },
131: { "keySound", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_SOUND] },
132: { "keyPause", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_PAUSE] },
133: { "keyDebugger", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_DEBUG] },
134: { "keyQuit", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_QUIT] },
135: { "keyLoadMem", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_LOADMEM] },
136: { "keySaveMem", Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_SAVEMEM] },
137: { "keyInsertDiskA",Int_Tag, &ConfigureParams.Shortcut.withoutModifier[SHORTCUT_INSERTDISKA] },
138: { NULL , Error_Tag, NULL }
139: };
140:
141:
142: /* Used to load/save sound options */
143: static const struct Config_Tag configs_Sound[] =
144: {
1.1.1.2 root 145: { "bEnableMicrophone", Bool_Tag, &ConfigureParams.Sound.bEnableMicrophone },
146: { "bEnableSound", Bool_Tag, &ConfigureParams.Sound.bEnableSound },
147: { "nPlaybackFreq", Int_Tag, &ConfigureParams.Sound.nPlaybackFreq },
148: { "nSdlAudioBufferSize", Int_Tag, &ConfigureParams.Sound.SdlAudioBufferSize },
149: { "szYMCaptureFileName", String_Tag, ConfigureParams.Sound.szYMCaptureFileName },
150: // { "YmVolumeMixing", Int_Tag, &ConfigureParams.Sound.YmVolumeMixing },
1.1 root 151: { NULL , Error_Tag, NULL }
152: };
153:
154: /* Used to load/save memory options */
155: static const struct Config_Tag configs_Memory[] =
156: {
1.1.1.3 ! root 157: { "nMemoryBankSize0", Int_Tag, &ConfigureParams.Memory.nMemoryBankSize[0] },
! 158: { "nMemoryBankSize1", Int_Tag, &ConfigureParams.Memory.nMemoryBankSize[1] },
! 159: { "nMemoryBankSize2", Int_Tag, &ConfigureParams.Memory.nMemoryBankSize[2] },
! 160: { "nMemoryBankSize3", Int_Tag, &ConfigureParams.Memory.nMemoryBankSize[3] },
! 161: { "nMemorySpeed", Int_Tag, &ConfigureParams.Memory.nMemorySpeed },
1.1 root 162: { "bAutoSave", Bool_Tag, &ConfigureParams.Memory.bAutoSave },
163: { "szMemoryCaptureFileName", String_Tag, ConfigureParams.Memory.szMemoryCaptureFileName },
164: { "szAutoSaveFileName", String_Tag, ConfigureParams.Memory.szAutoSaveFileName },
165: { NULL , Error_Tag, NULL }
166: };
167:
168:
169: /* Used to load/save floppy options */
170: static const struct Config_Tag configs_Floppy[] =
171: {
172: { "bAutoInsertDiskB", Bool_Tag, &ConfigureParams.DiskImage.bAutoInsertDiskB },
173: { "bSlowFloppy", Bool_Tag, &ConfigureParams.DiskImage.bSlowFloppy },
174: { "nWriteProtection", Int_Tag, &ConfigureParams.DiskImage.nWriteProtection },
175: { "szDiskAZipPath", String_Tag, ConfigureParams.DiskImage.szDiskZipPath[0] },
176: { "szDiskAFileName", String_Tag, ConfigureParams.DiskImage.szDiskFileName[0] },
177: { "szDiskBZipPath", String_Tag, ConfigureParams.DiskImage.szDiskZipPath[1] },
178: { "szDiskBFileName", String_Tag, ConfigureParams.DiskImage.szDiskFileName[1] },
179: { "szDiskImageDirectory", String_Tag, ConfigureParams.DiskImage.szDiskImageDirectory },
180: { NULL , Error_Tag, NULL }
181: };
182:
1.1.1.3 ! root 183: /* Used to load/save boot options */
! 184: static const struct Config_Tag configs_Boot[] =
1.1 root 185: {
1.1.1.3 ! root 186: { "nBootDevice", Int_Tag, &ConfigureParams.Boot.nBootDevice },
! 187: { "bEnableDRAMTest", Bool_Tag, &ConfigureParams.Boot.bEnableDRAMTest },
! 188: { "bEnablePot", Bool_Tag, &ConfigureParams.Boot.bEnablePot },
! 189: { "bEnableSoundTest", Bool_Tag, &ConfigureParams.Boot.bEnableSoundTest },
! 190: { "bEnableSCSITest", Bool_Tag, &ConfigureParams.Boot.bEnableSCSITest },
! 191: { "bLoopPot", Bool_Tag, &ConfigureParams.Boot.bLoopPot },
! 192: { "bVerbose", Bool_Tag, &ConfigureParams.Boot.bVerbose },
! 193: { "bExtendedPot", Bool_Tag, &ConfigureParams.Boot.bExtendedPot },
! 194: { NULL , Error_Tag, NULL }
! 195: };
! 196:
! 197: /* Used to load/save SCSI options */
! 198: static const struct Config_Tag configs_SCSI[] =
! 199: {
! 200: { "szImageName0", String_Tag, ConfigureParams.SCSI.target[0].szImageName },
! 201: { "bAttached0", Bool_Tag, &ConfigureParams.SCSI.target[0].bAttached },
! 202: { "bCDROM0", Bool_Tag, &ConfigureParams.SCSI.target[0].bCDROM },
! 203:
! 204: { "szImageName1", String_Tag, ConfigureParams.SCSI.target[1].szImageName },
! 205: { "bAttached1", Bool_Tag, &ConfigureParams.SCSI.target[1].bAttached },
! 206: { "bCDROM1", Bool_Tag, &ConfigureParams.SCSI.target[1].bCDROM },
! 207:
! 208: { "szImageName2", String_Tag, ConfigureParams.SCSI.target[2].szImageName },
! 209: { "bAttached2", Bool_Tag, &ConfigureParams.SCSI.target[2].bAttached },
! 210: { "bCDROM2", Bool_Tag, &ConfigureParams.SCSI.target[2].bCDROM },
! 211:
! 212: { "szImageName3", String_Tag, ConfigureParams.SCSI.target[3].szImageName },
! 213: { "bAttached3", Bool_Tag, &ConfigureParams.SCSI.target[3].bAttached },
! 214: { "bCDROM3", Bool_Tag, &ConfigureParams.SCSI.target[3].bCDROM },
! 215:
! 216: { "szImageName4", String_Tag, ConfigureParams.SCSI.target[4].szImageName },
! 217: { "bAttached4", Bool_Tag, &ConfigureParams.SCSI.target[4].bAttached },
! 218: { "bCDROM4", Bool_Tag, &ConfigureParams.SCSI.target[4].bCDROM },
! 219:
! 220: { "szImageName5", String_Tag, ConfigureParams.SCSI.target[5].szImageName },
! 221: { "bAttached5", Bool_Tag, &ConfigureParams.SCSI.target[5].bAttached },
! 222: { "bCDROM5", Bool_Tag, &ConfigureParams.SCSI.target[5].bCDROM },
! 223:
! 224: { "szImageName6", String_Tag, ConfigureParams.SCSI.target[6].szImageName },
! 225: { "bAttached6", Bool_Tag, &ConfigureParams.SCSI.target[6].bAttached },
! 226: { "bCDROM6", Bool_Tag, &ConfigureParams.SCSI.target[6].bCDROM },
! 227:
! 228: { "bBootFromHardDisk", Bool_Tag, &ConfigureParams.SCSI.bBootFromHardDisk },
! 229: { "nWriteProtection", Int_Tag, &ConfigureParams.SCSI.nWriteProtection },
1.1 root 230: { NULL , Error_Tag, NULL }
231: };
232:
233: /* Used to load/save ROM options */
234: static const struct Config_Tag configs_Rom[] =
235: {
1.1.1.3 ! root 236: { "szRom030FileName", String_Tag, ConfigureParams.Rom.szRom030FileName },
! 237: { "szRom040FileName", String_Tag, ConfigureParams.Rom.szRom040FileName },
! 238: { "szRomTurboFileName", String_Tag, ConfigureParams.Rom.szRomTurboFileName },
1.1 root 239: { NULL , Error_Tag, NULL }
240: };
241:
242: /* Used to load/save RS232 options */
243: static const struct Config_Tag configs_Rs232[] =
244: {
245: { "bEnableRS232", Bool_Tag, &ConfigureParams.RS232.bEnableRS232 },
246: { "szOutFileName", String_Tag, ConfigureParams.RS232.szOutFileName },
247: { "szInFileName", String_Tag, ConfigureParams.RS232.szInFileName },
248: { NULL , Error_Tag, NULL }
249: };
250:
251: /* Used to load/save printer options */
252: static const struct Config_Tag configs_Printer[] =
253: {
254: { "bEnablePrinting", Bool_Tag, &ConfigureParams.Printer.bEnablePrinting },
255: { "bPrintToFile", Bool_Tag, &ConfigureParams.Printer.bPrintToFile },
256: { "szPrintToFileName", String_Tag, ConfigureParams.Printer.szPrintToFileName },
257: { NULL , Error_Tag, NULL }
258: };
259:
260: /* Used to load/save MIDI options */
261: static const struct Config_Tag configs_Midi[] =
262: {
263: { "bEnableMidi", Bool_Tag, &ConfigureParams.Midi.bEnableMidi },
264: { "sMidiInFileName", String_Tag, ConfigureParams.Midi.sMidiInFileName },
265: { "sMidiOutFileName", String_Tag, ConfigureParams.Midi.sMidiOutFileName },
266: { NULL , Error_Tag, NULL }
267: };
268:
269: /* Used to load/save system options */
270: static const struct Config_Tag configs_System[] =
271: {
1.1.1.3 ! root 272: { "nMachineType", Int_Tag, &ConfigureParams.System.nMachineType },
! 273: { "bColor", Bool_Tag, &ConfigureParams.System.bColor },
! 274: { "bTurbo", Bool_Tag, &ConfigureParams.System.bTurbo },
! 275: { "bADB", Bool_Tag, &ConfigureParams.System.bADB },
! 276: { "nSCSI", Bool_Tag, &ConfigureParams.System.nSCSI },
! 277: { "nRTC", Bool_Tag, &ConfigureParams.System.nRTC },
! 278:
1.1 root 279: { "nCpuLevel", Int_Tag, &ConfigureParams.System.nCpuLevel },
280: { "nCpuFreq", Int_Tag, &ConfigureParams.System.nCpuFreq },
281: { "bCompatibleCpu", Bool_Tag, &ConfigureParams.System.bCompatibleCpu },
282: { "bBlitter", Bool_Tag, &ConfigureParams.System.bBlitter },
283: { "nDSPType", Int_Tag, &ConfigureParams.System.nDSPType },
284: { "bRealTimeClock", Bool_Tag, &ConfigureParams.System.bRealTimeClock },
285: { "bPatchTimerD", Bool_Tag, &ConfigureParams.System.bPatchTimerD },
286: { "bFastForward", Bool_Tag, &ConfigureParams.System.bFastForward },
1.1.1.2 root 287:
288: #if ENABLE_WINUAE_CPU
289: { "bAddressSpace24", Bool_Tag, &ConfigureParams.System.bAddressSpace24 },
290: { "bCycleExactCpu", Bool_Tag, &ConfigureParams.System.bCycleExactCpu },
291: { "n_FPUType", Int_Tag, &ConfigureParams.System.n_FPUType },
292: { "bCompatibleFPU", Bool_Tag, &ConfigureParams.System.bCompatibleFPU },
293: { "bMMU", Bool_Tag, &ConfigureParams.System.bMMU },
294: #endif
295: { NULL , Error_Tag, NULL }
296: };
297:
298: /* Used to load/save video options */
299: static const struct Config_Tag configs_Video[] =
300: {
301: { "AviRecordVcodec", Int_Tag, &ConfigureParams.Video.AviRecordVcodec },
302: { "AviRecordFps", Int_Tag, &ConfigureParams.Video.AviRecordFps },
303: { "AviRecordFile", String_Tag, ConfigureParams.Video.AviRecordFile },
1.1 root 304: { NULL , Error_Tag, NULL }
305: };
306:
307:
308: /*-----------------------------------------------------------------------*/
309: /**
310: * Set default configuration values.
311: */
312: void Configuration_SetDefault(void)
313: {
314: int i;
315: const char *psHomeDir;
316: const char *psWorkingDir;
317:
318: psHomeDir = Paths_GetHatariHome();
319: psWorkingDir = Paths_GetWorkingDir();
320:
321: /* Clear parameters */
322: memset(&ConfigureParams, 0, sizeof(CNF_PARAMS));
323:
1.1.1.3 ! root 324:
1.1 root 325: /* Set defaults for logging and tracing */
326: strcpy(ConfigureParams.Log.sLogFileName, "stderr");
327: strcpy(ConfigureParams.Log.sTraceFileName, "stderr");
328: ConfigureParams.Log.nTextLogLevel = LOG_TODO;
329: ConfigureParams.Log.nAlertDlgLogLevel = LOG_ERROR;
330: ConfigureParams.Log.bConfirmQuit = true;
1.1.1.3 ! root 331:
! 332: /* Set defaults for config dialog */
! 333: ConfigureParams.ConfigDialog.bShowConfigDialogAtStartup = true;
1.1 root 334:
335: /* Set defaults for debugger */
336: ConfigureParams.Debugger.nNumberBase = 10;
337: ConfigureParams.Debugger.nDisasmLines = 8;
338: ConfigureParams.Debugger.nMemdumpLines = 8;
339:
340: /* Set defaults for floppy disk images */
341: ConfigureParams.DiskImage.bAutoInsertDiskB = true;
342: ConfigureParams.DiskImage.bSlowFloppy = false;
343: ConfigureParams.DiskImage.nWriteProtection = WRITEPROT_OFF;
344: for (i = 0; i < 2; i++)
345: {
346: ConfigureParams.DiskImage.szDiskZipPath[i][0] = '\0';
347: ConfigureParams.DiskImage.szDiskFileName[i][0] = '\0';
348: }
349: strcpy(ConfigureParams.DiskImage.szDiskImageDirectory, psWorkingDir);
350: File_AddSlashToEndFileName(ConfigureParams.DiskImage.szDiskImageDirectory);
351:
1.1.1.3 ! root 352: /* Set defaults for Boot options */
! 353: ConfigureParams.Boot.nBootDevice = BOOT_ROM;
! 354: ConfigureParams.Boot.bEnableDRAMTest = false;
! 355: ConfigureParams.Boot.bEnablePot = true;
! 356: ConfigureParams.Boot.bEnableSoundTest = true;
! 357: ConfigureParams.Boot.bEnableSCSITest = true;
! 358: ConfigureParams.Boot.bLoopPot = false;
! 359: ConfigureParams.Boot.bVerbose = true;
! 360: ConfigureParams.Boot.bExtendedPot = false;
! 361:
! 362: /* Set defaults for SCSI disks */
! 363: int target;
! 364: for (target = 0; target < ESP_MAX_DEVS; target++) {
! 365: strcpy(ConfigureParams.SCSI.target[target].szImageName, psWorkingDir);
! 366: ConfigureParams.SCSI.target[target].bAttached = false;
! 367: ConfigureParams.SCSI.target[target].bCDROM = false;
! 368: }
! 369:
1.1 root 370: /* Set defaults for Keyboard */
371: ConfigureParams.Keyboard.bDisableKeyRepeat = false;
372: ConfigureParams.Keyboard.nKeymapType = KEYMAP_SYMBOLIC;
373: strcpy(ConfigureParams.Keyboard.szMappingFileName, "");
374:
375: /* Set defaults for Shortcuts */
376: ConfigureParams.Shortcut.withoutModifier[SHORTCUT_OPTIONS] = SDLK_F12;
377: ConfigureParams.Shortcut.withoutModifier[SHORTCUT_FULLSCREEN] = SDLK_F11;
1.1.1.2 root 378:
379: ConfigureParams.Shortcut.withModifier[SHORTCUT_PAUSE] = SDLK_p;
380: ConfigureParams.Shortcut.withModifier[SHORTCUT_DEBUG] = SDLK_d;
381:
1.1 root 382: ConfigureParams.Shortcut.withModifier[SHORTCUT_OPTIONS] = SDLK_o;
383: ConfigureParams.Shortcut.withModifier[SHORTCUT_FULLSCREEN] = SDLK_f;
384: ConfigureParams.Shortcut.withModifier[SHORTCUT_MOUSEGRAB] = SDLK_m;
385: ConfigureParams.Shortcut.withModifier[SHORTCUT_COLDRESET] = SDLK_c;
386: ConfigureParams.Shortcut.withModifier[SHORTCUT_WARMRESET] = SDLK_r;
387: ConfigureParams.Shortcut.withModifier[SHORTCUT_SCREENSHOT] = SDLK_g;
388: ConfigureParams.Shortcut.withModifier[SHORTCUT_BOSSKEY] = SDLK_i;
389: ConfigureParams.Shortcut.withModifier[SHORTCUT_CURSOREMU] = SDLK_j;
390: ConfigureParams.Shortcut.withModifier[SHORTCUT_FASTFORWARD] = SDLK_x;
391: ConfigureParams.Shortcut.withModifier[SHORTCUT_RECANIM] = SDLK_a;
392: ConfigureParams.Shortcut.withModifier[SHORTCUT_RECSOUND] = SDLK_y;
393: ConfigureParams.Shortcut.withModifier[SHORTCUT_SOUND] = SDLK_s;
394: ConfigureParams.Shortcut.withModifier[SHORTCUT_QUIT] = SDLK_q;
395: ConfigureParams.Shortcut.withModifier[SHORTCUT_LOADMEM] = SDLK_l;
396: ConfigureParams.Shortcut.withModifier[SHORTCUT_SAVEMEM] = SDLK_k;
1.1.1.2 root 397: ConfigureParams.Shortcut.withModifier[SHORTCUT_INSERTDISKA] = SDLK_1;
1.1 root 398:
399: /* Set defaults for Memory */
1.1.1.3 ! root 400: memset(ConfigureParams.Memory.nMemoryBankSize, 16,
! 401: sizeof(ConfigureParams.Memory.nMemoryBankSize)); /* 64 MiB */
! 402: ConfigureParams.Memory.nMemorySpeed = MEMORY_100NS;
1.1 root 403: ConfigureParams.Memory.bAutoSave = false;
404: sprintf(ConfigureParams.Memory.szMemoryCaptureFileName, "%s%chatari.sav",
405: psHomeDir, PATHSEP);
406: sprintf(ConfigureParams.Memory.szAutoSaveFileName, "%s%cauto.sav",
407: psHomeDir, PATHSEP);
408:
409: /* Set defaults for Printer */
410: ConfigureParams.Printer.bEnablePrinting = false;
411: ConfigureParams.Printer.bPrintToFile = true;
412: sprintf(ConfigureParams.Printer.szPrintToFileName, "%s%chatari.prn",
413: psHomeDir, PATHSEP);
414:
415: /* Set defaults for RS232 */
416: ConfigureParams.RS232.bEnableRS232 = false;
417: strcpy(ConfigureParams.RS232.szOutFileName, "/dev/modem");
418: strcpy(ConfigureParams.RS232.szInFileName, "/dev/modem");
419:
420: /* Set defaults for MIDI */
421: ConfigureParams.Midi.bEnableMidi = false;
422: strcpy(ConfigureParams.Midi.sMidiInFileName, "/dev/snd/midiC1D0");
423: strcpy(ConfigureParams.Midi.sMidiOutFileName, "/dev/snd/midiC1D0");
424:
425: /* Set defaults for Screen */
426: ConfigureParams.Screen.bFullScreen = false;
1.1.1.2 root 427: ConfigureParams.Screen.bKeepResolution = true;
428: // ConfigureParams.Screen.nFrameSkips = AUTO_FRAMESKIP_LIMIT;
1.1 root 429: ConfigureParams.Screen.bAllowOverscan = true;
430: ConfigureParams.Screen.nSpec512Threshold = 16;
431: ConfigureParams.Screen.nForceBpp = 0;
432: ConfigureParams.Screen.bAspectCorrect = true;
433: ConfigureParams.Screen.nMonitorType = MONITOR_TYPE_RGB;
434: ConfigureParams.Screen.bUseExtVdiResolutions = false;
435: ConfigureParams.Screen.bShowStatusbar = true;
436: ConfigureParams.Screen.bShowDriveLed = true;
1.1.1.2 root 437: ConfigureParams.Screen.bCrop = false;
1.1 root 438: /* target 800x600 screen with statusbar out of screen */
1.1.1.2 root 439: ConfigureParams.Screen.nMaxWidth = 0;
440: ConfigureParams.Screen.nMaxHeight = 0;
1.1 root 441:
442: /* Set defaults for Sound */
1.1.1.2 root 443: ConfigureParams.Sound.bEnableMicrophone = true;
1.1 root 444: ConfigureParams.Sound.bEnableSound = true;
445: ConfigureParams.Sound.nPlaybackFreq = 44100;
446: sprintf(ConfigureParams.Sound.szYMCaptureFileName, "%s%chatari.wav",
447: psWorkingDir, PATHSEP);
448: ConfigureParams.Sound.SdlAudioBufferSize = 0;
1.1.1.2 root 449: // ConfigureParams.Sound.YmVolumeMixing = YM_TABLE_MIXING;
1.1 root 450:
451: /* Set defaults for Rom */
1.1.1.3 ! root 452: sprintf(ConfigureParams.Rom.szRom030FileName, "%s%cRev_1.0_v41.BIN",
! 453: Paths_GetWorkingDir(), PATHSEP);
! 454: sprintf(ConfigureParams.Rom.szRom040FileName, "%s%cRev_2.5_v66.BIN",
! 455: Paths_GetWorkingDir(), PATHSEP);
! 456: sprintf(ConfigureParams.Rom.szRomTurboFileName, "%s%cRev_3.3_v74.BIN",
! 457: Paths_GetWorkingDir(), PATHSEP);
! 458:
1.1 root 459:
460: /* Set defaults for System */
1.1.1.3 ! root 461: ConfigureParams.System.nMachineType = NEXT_CUBE030;
! 462: ConfigureParams.System.bColor = false;
! 463: ConfigureParams.System.bTurbo = false;
! 464: ConfigureParams.System.bADB = false;
! 465: ConfigureParams.System.nSCSI = NCR53C90;
! 466: ConfigureParams.System.nRTC = MC68HC68T1;
! 467:
! 468: ConfigureParams.System.nCpuLevel = 3;
! 469: ConfigureParams.System.nCpuFreq = 25;
1.1 root 470: ConfigureParams.System.bCompatibleCpu = true;
471: ConfigureParams.System.bBlitter = false;
472: ConfigureParams.System.nDSPType = DSP_TYPE_NONE;
473: ConfigureParams.System.bPatchTimerD = true;
474: ConfigureParams.System.bRealTimeClock = true;
475: ConfigureParams.System.bFastForward = false;
1.1.1.2 root 476:
477: #if ENABLE_WINUAE_CPU
478: ConfigureParams.System.bAddressSpace24 = false;
479: ConfigureParams.System.bCycleExactCpu = false;
1.1.1.3 ! root 480: ConfigureParams.System.n_FPUType = FPU_68882;
1.1.1.2 root 481: ConfigureParams.System.bCompatibleFPU = true;
482: ConfigureParams.System.bMMU = true;
483: #endif
484:
485: /* Set defaults for Video */
486: #if HAVE_LIBPNG
487: ConfigureParams.Video.AviRecordVcodec = AVI_RECORD_VIDEO_CODEC_PNG;
488: #else
489: ConfigureParams.Video.AviRecordVcodec = AVI_RECORD_VIDEO_CODEC_BMP;
490: #endif
491: ConfigureParams.Video.AviRecordFps = 0; /* automatic FPS */
492: sprintf(ConfigureParams.Video.AviRecordFile, "%s%chatari.avi", psWorkingDir, PATHSEP);
493:
1.1 root 494:
495: /* Initialize the configuration file name */
496: if (strlen(psHomeDir) < sizeof(sConfigFileName)-13)
1.1.1.2 root 497: sprintf(sConfigFileName, "%s%cprevious.cfg", psHomeDir, PATHSEP);
1.1 root 498: else
1.1.1.2 root 499: strcpy(sConfigFileName, "previous.cfg");
1.1 root 500:
501: #if defined(__AMIGAOS4__)
502: /* Fix default path names on Amiga OS */
1.1.1.3 ! root 503: sprintf(ConfigureParams.Rom.szRom030FileName, "%sRev_1.0_v41.BIN", Paths_GetWorkingDir());
! 504: sprintf(ConfigureParams.Rom.szRom040FileName, "%sRev_2.5_v66.BIN", Paths_GetWorkingDir());
! 505: sprintf(ConfigureParams.Rom.szRom040FileName, "%sRev_3.3_v74.BIN", Paths_GetWorkingDir());
1.1 root 506: #endif
507: }
508:
509:
510: /*-----------------------------------------------------------------------*/
511: /**
512: * Copy details from configuration structure into global variables for system,
513: * clean file names, etc... Called from main.c and dialog.c files.
514: */
515: void Configuration_Apply(bool bReset)
516: {
517: if (bReset)
518: {
519: /* Set resolution change */
520: }
1.1.1.2 root 521: // if (ConfigureParams.Screen.nFrameSkips < AUTO_FRAMESKIP_LIMIT)
522: // {
523: // nFrameSkips = ConfigureParams.Screen.nFrameSkips;
524: // }
525:
526: /* Init clocks for this machine */
527: ClocksTimings_InitMachine ( ConfigureParams.System.nMachineType );
528:
529:
1.1 root 530: /* Sound settings */
531: /* SDL sound buffer in ms */
532: // SdlAudioBufferSize = ConfigureParams.Sound.SdlAudioBufferSize;
533: // if ( SdlAudioBufferSize == 0 ) /* use default setting for SDL */
534: // ;
535: // else if ( SdlAudioBufferSize < 10 ) /* min of 10 ms */
536: // SdlAudioBufferSize = 10;
537: // else if ( SdlAudioBufferSize > 100 ) /* max of 100 ms */
538: // SdlAudioBufferSize = 100;
539:
540: /* Set playback frequency */
541: // Audio_SetOutputAudioFreq(ConfigureParams.Sound.nPlaybackFreq);
542:
1.1.1.2 root 543: /* YM Mixing */
544: // if ( ( ConfigureParams.Sound.YmVolumeMixing != YM_LINEAR_MIXING )
545: // && ( ConfigureParams.Sound.YmVolumeMixing != YM_TABLE_MIXING ) )
546: // ConfigureParams.Sound.YmVolumeMixing = YM_TABLE_MIXING;
547:
548: // YmVolumeMixing = ConfigureParams.Sound.YmVolumeMixing;
549: // Sound_SetYmVolumeMixing();
550:
551: /* Check/constrain CPU settings and change corresponding
552: * UAE cpu_level & cpu_compatible variables
553: */
554: M68000_CheckCpuSettings();
555:
1.1.1.3 ! root 556: /* Check memory size for each bank and change to supported values */
! 557: Configuration_CheckMemory(ConfigureParams.Memory.nMemoryBankSize);
! 558:
! 559: /* Clean file and directory names */
! 560: File_MakeAbsoluteName(ConfigureParams.Rom.szRom030FileName);
! 561: File_MakeAbsoluteName(ConfigureParams.Rom.szRom040FileName);
! 562: File_MakeAbsoluteName(ConfigureParams.Rom.szRomTurboFileName);
! 563:
! 564: int target;
! 565: for (target = 0; target < ESP_MAX_DEVS; target++) {
! 566: File_MakeAbsoluteName(ConfigureParams.SCSI.target[target].szImageName);
! 567: }
! 568:
1.1 root 569: File_MakeAbsoluteName(ConfigureParams.Memory.szMemoryCaptureFileName);
570: File_MakeAbsoluteName(ConfigureParams.Sound.szYMCaptureFileName);
571: if (strlen(ConfigureParams.Keyboard.szMappingFileName) > 0)
572: File_MakeAbsoluteName(ConfigureParams.Keyboard.szMappingFileName);
1.1.1.2 root 573: File_MakeAbsoluteName(ConfigureParams.Video.AviRecordFile);
1.1 root 574:
575: /* make path names absolute, but handle special file names */
576: File_MakeAbsoluteSpecialName(ConfigureParams.Log.sLogFileName);
577: File_MakeAbsoluteSpecialName(ConfigureParams.Log.sTraceFileName);
578: File_MakeAbsoluteSpecialName(ConfigureParams.RS232.szInFileName);
579: File_MakeAbsoluteSpecialName(ConfigureParams.RS232.szOutFileName);
580: File_MakeAbsoluteSpecialName(ConfigureParams.Midi.sMidiInFileName);
581: File_MakeAbsoluteSpecialName(ConfigureParams.Midi.sMidiOutFileName);
582: File_MakeAbsoluteSpecialName(ConfigureParams.Printer.szPrintToFileName);
583: }
584:
585:
586: /*-----------------------------------------------------------------------*/
587: /**
1.1.1.3 ! root 588: * Check memory bank sizes for compatibility with the selected system.
! 589: */
! 590: int Configuration_CheckMemory(int *banksize) {
! 591: int i;
! 592:
! 593: #define RESTRICTIVE_MEMCHECK 0
! 594: #if RESTRICTIVE_MEMCHECK
! 595: /* To boot we need at least 4 MB in bank0 */
! 596: if (banksize[0]<4) {
! 597: banksize[0]=4;
! 598: }
! 599:
! 600: /* On monochrome non-Turbo NeXTstations only the first
! 601: * 2 banks are accessible via memory sockets */
! 602: if (ConfigureParams.System.nMachineType == NEXT_STATION &&
! 603: !ConfigureParams.System.bTurbo && !ConfigureParams.System.bColor) {
! 604: banksize[2]=0;
! 605: banksize[3]=0;
! 606: }
! 607: #endif
! 608:
! 609: if (ConfigureParams.System.bTurbo) {
! 610: for (i=0; i<4; i++) {
! 611: if (banksize[i]<=0)
! 612: banksize[i]=0;
! 613: else if (banksize[i]<=2)
! 614: banksize[i]=2;
! 615: else if (banksize[i]<=8)
! 616: banksize[i]=8;
! 617: else if (banksize[i]<=32)
! 618: banksize[i]=32;
! 619: else
! 620: banksize[i]=32;
! 621: }
! 622: } else if (ConfigureParams.System.bColor) {
! 623: for (i=0; i<4; i++) {
! 624: if (banksize[i]<=0)
! 625: banksize[i]=0;
! 626: else if (banksize[i]<=2)
! 627: banksize[i]=2;
! 628: else if (banksize[i]<=8)
! 629: banksize[i]=8;
! 630: else
! 631: banksize[i]=8;
! 632: }
! 633: } else {
! 634: for (i=0; i<4; i++) {
! 635: if (banksize[i]<=0)
! 636: banksize[i]=0;
! 637: else if (banksize[i]<=1)
! 638: banksize[i]=1;
! 639: else if (banksize[i]<=4)
! 640: banksize[i]=4;
! 641: else if (banksize[i]<=16)
! 642: banksize[i]=16;
! 643: else
! 644: banksize[i]=16;
! 645: }
! 646: }
! 647: return (banksize[0]+banksize[1]+banksize[2]+banksize[3]);
! 648: }
! 649:
! 650:
! 651: /*-----------------------------------------------------------------------*/
! 652: /**
1.1 root 653: * Load a settings section from the configuration file.
654: */
655: static int Configuration_LoadSection(const char *pFilename, const struct Config_Tag configs[], const char *pSection)
656: {
657: int ret;
658:
659: ret = input_config(pFilename, configs, pSection);
660:
661: if (ret < 0)
662: fprintf(stderr, "Can not load configuration file %s (section %s).\n",
663: pFilename, pSection);
664:
665: return ret;
666: }
667:
668:
669: /*-----------------------------------------------------------------------*/
670: /**
671: * Load program setting from configuration file. If psFileName is NULL, use
672: * the configuration file given in configuration / last selected by user.
673: */
674: void Configuration_Load(const char *psFileName)
675: {
676: if (psFileName == NULL)
677: psFileName = sConfigFileName;
678:
679: if (!File_Exists(psFileName))
680: {
1.1.1.2 root 681: Log_Printf(LOG_DEBUG, "Configuration file %s not found.\n", psFileName);
1.1 root 682: return;
683: }
684:
685: Configuration_LoadSection(psFileName, configs_Log, "[Log]");
1.1.1.3 ! root 686: Configuration_LoadSection(psFileName, configs_ConfigDialog, "[ConfigDialog]");
1.1 root 687: Configuration_LoadSection(psFileName, configs_Debugger, "[Debugger]");
688: Configuration_LoadSection(psFileName, configs_Screen, "[Screen]");
689: Configuration_LoadSection(psFileName, configs_Keyboard, "[Keyboard]");
690: Configuration_LoadSection(psFileName, configs_ShortCutWithMod, "[ShortcutsWithModifiers]");
691: Configuration_LoadSection(psFileName, configs_ShortCutWithoutMod, "[ShortcutsWithoutModifiers]");
692: Configuration_LoadSection(psFileName, configs_Sound, "[Sound]");
693: Configuration_LoadSection(psFileName, configs_Memory, "[Memory]");
694: Configuration_LoadSection(psFileName, configs_Floppy, "[Floppy]");
1.1.1.3 ! root 695: Configuration_LoadSection(psFileName, configs_Boot, "[Boot]");
! 696: Configuration_LoadSection(psFileName, configs_SCSI, "[HardDisk]");
1.1 root 697: Configuration_LoadSection(psFileName, configs_Rom, "[ROM]");
698: Configuration_LoadSection(psFileName, configs_Rs232, "[RS232]");
699: Configuration_LoadSection(psFileName, configs_Printer, "[Printer]");
700: Configuration_LoadSection(psFileName, configs_Midi, "[Midi]");
701: Configuration_LoadSection(psFileName, configs_System, "[System]");
1.1.1.2 root 702: Configuration_LoadSection(psFileName, configs_Video, "[Video]");
1.1 root 703: }
704:
705:
706: /*-----------------------------------------------------------------------*/
707: /**
708: * Save a settings section to configuration file
709: */
710: static int Configuration_SaveSection(const char *pFilename, const struct Config_Tag configs[], const char *pSection)
711: {
712: int ret;
713:
714: ret = update_config(pFilename, configs, pSection);
715:
716: if (ret < 0)
717: fprintf(stderr, "Error while updating section %s in %s\n", pSection, pFilename);
718:
719: return ret;
720: }
721:
722:
723: /*-----------------------------------------------------------------------*/
724: /**
725: * Save program setting to configuration file
726: */
727: void Configuration_Save(void)
728: {
729: if (Configuration_SaveSection(sConfigFileName, configs_Log, "[Log]") < 0)
730: {
731: Log_AlertDlg(LOG_ERROR, "Error saving config file.");
732: return;
733: }
1.1.1.3 ! root 734: Configuration_SaveSection(sConfigFileName, configs_ConfigDialog, "[ConfigDialog]");
1.1 root 735: Configuration_SaveSection(sConfigFileName, configs_Debugger, "[Debugger]");
736: Configuration_SaveSection(sConfigFileName, configs_Screen, "[Screen]");
737: Configuration_SaveSection(sConfigFileName, configs_Keyboard, "[Keyboard]");
738: Configuration_SaveSection(sConfigFileName, configs_ShortCutWithMod, "[ShortcutsWithModifiers]");
739: Configuration_SaveSection(sConfigFileName, configs_ShortCutWithoutMod, "[ShortcutsWithoutModifiers]");
740: Configuration_SaveSection(sConfigFileName, configs_Sound, "[Sound]");
741: Configuration_SaveSection(sConfigFileName, configs_Memory, "[Memory]");
742: Configuration_SaveSection(sConfigFileName, configs_Floppy, "[Floppy]");
1.1.1.3 ! root 743: Configuration_SaveSection(sConfigFileName, configs_Boot, "[Boot]");
! 744: Configuration_SaveSection(sConfigFileName, configs_SCSI, "[HardDisk]");
1.1 root 745: Configuration_SaveSection(sConfigFileName, configs_Rom, "[ROM]");
746: Configuration_SaveSection(sConfigFileName, configs_Rs232, "[RS232]");
747: Configuration_SaveSection(sConfigFileName, configs_Printer, "[Printer]");
748: Configuration_SaveSection(sConfigFileName, configs_Midi, "[Midi]");
749: Configuration_SaveSection(sConfigFileName, configs_System, "[System]");
1.1.1.2 root 750: Configuration_SaveSection(sConfigFileName, configs_Video, "[Video]");
1.1 root 751: }
752:
753:
754: /*-----------------------------------------------------------------------*/
755: /**
756: * Save/restore snapshot of configuration variables
757: * ('MemorySnapShot_Store' handles type)
758: */
759: void Configuration_MemorySnapShot_Capture(bool bSave)
1.1.1.3 ! root 760: {
! 761: /* ROM files */
! 762: MemorySnapShot_Store(ConfigureParams.Rom.szRom030FileName, sizeof(ConfigureParams.Rom.szRom030FileName));
! 763: MemorySnapShot_Store(ConfigureParams.Rom.szRom040FileName, sizeof(ConfigureParams.Rom.szRom040FileName));
! 764: MemorySnapShot_Store(ConfigureParams.Rom.szRomTurboFileName, sizeof(ConfigureParams.Rom.szRomTurboFileName));
! 765:
! 766: /* Memory options */
! 767: MemorySnapShot_Store(ConfigureParams.Memory.nMemoryBankSize, sizeof(ConfigureParams.Memory.nMemoryBankSize));
! 768: MemorySnapShot_Store(&ConfigureParams.Memory.nMemorySpeed, sizeof(ConfigureParams.Memory.nMemorySpeed));
! 769:
! 770: /* SCSI disks */
! 771: int target;
! 772: for (target = 0; target < ESP_MAX_DEVS; target++) {
! 773: MemorySnapShot_Store(ConfigureParams.SCSI.target[target].szImageName, sizeof(ConfigureParams.SCSI.target[target].szImageName));
! 774: MemorySnapShot_Store(&ConfigureParams.SCSI.target[target].bAttached, sizeof(ConfigureParams.SCSI.target[target].bAttached));
! 775: MemorySnapShot_Store(&ConfigureParams.SCSI.target[target].bCDROM, sizeof(ConfigureParams.SCSI.target[target].bCDROM));
! 776: }
1.1 root 777:
1.1.1.3 ! root 778: /* Monitor options */
1.1 root 779: MemorySnapShot_Store(&ConfigureParams.Screen.nMonitorType, sizeof(ConfigureParams.Screen.nMonitorType));
780: MemorySnapShot_Store(&ConfigureParams.Screen.bUseExtVdiResolutions, sizeof(ConfigureParams.Screen.bUseExtVdiResolutions));
781: MemorySnapShot_Store(&ConfigureParams.Screen.nVdiWidth, sizeof(ConfigureParams.Screen.nVdiWidth));
782: MemorySnapShot_Store(&ConfigureParams.Screen.nVdiHeight, sizeof(ConfigureParams.Screen.nVdiHeight));
783: MemorySnapShot_Store(&ConfigureParams.Screen.nVdiColors, sizeof(ConfigureParams.Screen.nVdiColors));
784:
1.1.1.3 ! root 785: /* System options */
1.1 root 786: MemorySnapShot_Store(&ConfigureParams.System.nCpuLevel, sizeof(ConfigureParams.System.nCpuLevel));
787: MemorySnapShot_Store(&ConfigureParams.System.nCpuFreq, sizeof(ConfigureParams.System.nCpuFreq));
788: MemorySnapShot_Store(&ConfigureParams.System.bCompatibleCpu, sizeof(ConfigureParams.System.bCompatibleCpu));
1.1.1.3 ! root 789:
! 790: MemorySnapShot_Store(&ConfigureParams.System.nMachineType, sizeof(ConfigureParams.System.nMachineType));
! 791: MemorySnapShot_Store(&ConfigureParams.System.bColor, sizeof(ConfigureParams.System.bColor));
! 792: MemorySnapShot_Store(&ConfigureParams.System.bTurbo, sizeof(ConfigureParams.System.bTurbo));
! 793: MemorySnapShot_Store(&ConfigureParams.System.bADB, sizeof(ConfigureParams.System.bADB));
! 794: MemorySnapShot_Store(&ConfigureParams.System.nSCSI, sizeof(ConfigureParams.System.nSCSI));
! 795: MemorySnapShot_Store(&ConfigureParams.System.nRTC, sizeof(ConfigureParams.System.nRTC));
! 796:
1.1 root 797: MemorySnapShot_Store(&ConfigureParams.System.bBlitter, sizeof(ConfigureParams.System.bBlitter));
798: MemorySnapShot_Store(&ConfigureParams.System.nDSPType, sizeof(ConfigureParams.System.nDSPType));
799: MemorySnapShot_Store(&ConfigureParams.System.bRealTimeClock, sizeof(ConfigureParams.System.bRealTimeClock));
800: MemorySnapShot_Store(&ConfigureParams.System.bPatchTimerD, sizeof(ConfigureParams.System.bPatchTimerD));
1.1.1.2 root 801:
802: #if ENABLE_WINUAE_CPU
803: MemorySnapShot_Store(&ConfigureParams.System.bAddressSpace24, sizeof(ConfigureParams.System.bAddressSpace24));
804: MemorySnapShot_Store(&ConfigureParams.System.bCycleExactCpu, sizeof(ConfigureParams.System.bCycleExactCpu));
805: MemorySnapShot_Store(&ConfigureParams.System.n_FPUType, sizeof(ConfigureParams.System.n_FPUType));
806: MemorySnapShot_Store(&ConfigureParams.System.bCompatibleFPU, sizeof(ConfigureParams.System.bCompatibleFPU));
807: MemorySnapShot_Store(&ConfigureParams.System.bMMU, sizeof(ConfigureParams.System.bMMU));
808: #endif
809:
1.1.1.3 ! root 810: /* Other */
1.1 root 811: MemorySnapShot_Store(&ConfigureParams.DiskImage.bSlowFloppy, sizeof(ConfigureParams.DiskImage.bSlowFloppy));
812:
813: if (!bSave)
814: Configuration_Apply(true);
815: }
816:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.