|
|
1.1 root 1: /*
1.1.1.3 root 2: Hatari - configuration.h
3:
1.1.1.17 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:
1.1.1.3 root 8: #ifndef HATARI_CONFIGURATION_H
9: #define HATARI_CONFIGURATION_H
10:
1.1.1.19 root 11: /* if header's struct contents depend on configuration options, header must include config.h */
12: #include "config.h"
13:
1.1.1.13 root 14: /* Logging and tracing */
1.1.1.6 root 15: typedef struct
16: {
17: char sLogFileName[FILENAME_MAX];
1.1.1.10 root 18: char sTraceFileName[FILENAME_MAX];
1.1.1.6 root 19: int nTextLogLevel;
20: int nAlertDlgLogLevel;
1.1.1.10 root 21: bool bConfirmQuit;
1.1.1.17 root 22: bool bNatFeats;
23: bool bConsoleWindow; /* for now, used just for Windows */
1.1.1.6 root 24: } CNF_LOG;
25:
26:
1.1.1.13 root 27: /* debugger */
28: typedef struct
29: {
30: int nNumberBase;
1.1.1.21! root 31: int nSymbolLines;
1.1.1.13 root 32: int nMemdumpLines;
1.1.1.21! root 33: int nDisasmLines;
! 34: int nExceptionDebugMask;
1.1.1.17 root 35: int nDisasmOptions;
36: bool bDisasmUAE;
1.1.1.21! root 37: /* load symbols immediately on program start, and keep them after its termination */
! 38: bool bSymbolsResident;
! 39: /* whether to match all symbols or just types relevant for given command */
! 40: bool bMatchAllSymbols;
1.1.1.13 root 41: } CNF_DEBUGGER;
42:
43:
1.1.1.5 root 44: /* ROM (TOS + cartridge) configuration */
1.1.1.3 root 45: typedef struct
46: {
1.1.1.5 root 47: char szTosImageFileName[FILENAME_MAX];
1.1.1.15 root 48: bool bPatchTos;
1.1.1.5 root 49: char szCartridgeImageFileName[FILENAME_MAX];
50: } CNF_ROM;
1.1.1.3 root 51:
52:
53: /* Sound configuration */
54: typedef struct
55: {
1.1.1.14 root 56: bool bEnableMicrophone;
1.1.1.10 root 57: bool bEnableSound;
1.1.1.16 root 58: bool bEnableSoundSync;
1.1.1.12 root 59: int nPlaybackFreq;
1.1.1.13 root 60: int SdlAudioBufferSize;
1.1.1.14 root 61: char szYMCaptureFileName[FILENAME_MAX];
62: int YmVolumeMixing;
1.1.1.3 root 63: } CNF_SOUND;
64:
65:
66:
1.1.1.4 root 67: /* RS232 configuration */
1.1.1.3 root 68: typedef struct
69: {
1.1.1.10 root 70: bool bEnableRS232;
1.1.1.4 root 71: char szOutFileName[FILENAME_MAX];
72: char szInFileName[FILENAME_MAX];
1.1.1.3 root 73: } CNF_RS232;
74:
75:
76: /* Dialog Keyboard */
77: typedef enum
78: {
79: KEYMAP_SYMBOLIC, /* Use keymapping with symbolic (ASCII) key codes */
80: KEYMAP_SCANCODE, /* Use keymapping with PC keyboard scancodes */
81: KEYMAP_LOADED /* Use keymapping with a map configuration file */
82: } KEYMAPTYPE;
83:
84: typedef struct
85: {
1.1.1.10 root 86: bool bDisableKeyRepeat;
1.1.1.3 root 87: KEYMAPTYPE nKeymapType;
1.1.1.4 root 88: char szMappingFileName[FILENAME_MAX];
1.1.1.3 root 89: } CNF_KEYBOARD;
90:
91:
1.1.1.8 root 92: typedef enum {
93: SHORTCUT_OPTIONS,
94: SHORTCUT_FULLSCREEN,
1.1.1.21! root 95: SHORTCUT_BORDERS,
1.1.1.13 root 96: SHORTCUT_MOUSEGRAB,
1.1.1.8 root 97: SHORTCUT_COLDRESET,
98: SHORTCUT_WARMRESET,
99: SHORTCUT_SCREENSHOT,
100: SHORTCUT_BOSSKEY,
101: SHORTCUT_CURSOREMU,
1.1.1.10 root 102: SHORTCUT_FASTFORWARD,
1.1.1.8 root 103: SHORTCUT_RECANIM,
104: SHORTCUT_RECSOUND,
105: SHORTCUT_SOUND,
1.1.1.12 root 106: SHORTCUT_DEBUG,
1.1.1.10 root 107: SHORTCUT_PAUSE,
1.1.1.8 root 108: SHORTCUT_QUIT,
1.1.1.9 root 109: SHORTCUT_LOADMEM,
110: SHORTCUT_SAVEMEM,
1.1.1.10 root 111: SHORTCUT_INSERTDISKA,
1.1.1.19 root 112: SHORTCUT_JOY_0,
113: SHORTCUT_JOY_1,
114: SHORTCUT_PAD_A,
115: SHORTCUT_PAD_B,
1.1.1.8 root 116: SHORTCUT_KEYS, /* number of shortcuts */
117: SHORTCUT_NONE
118: } SHORTCUTKEYIDX;
119:
120: typedef struct
121: {
122: int withModifier[SHORTCUT_KEYS];
123: int withoutModifier[SHORTCUT_KEYS];
124: } CNF_SHORTCUT;
125:
126:
1.1.1.3 root 127: typedef struct
128: {
1.1.1.21! root 129: int STRamSize_KB;
! 130: int TTRamSize_KB;
1.1.1.10 root 131: bool bAutoSave;
1.1.1.4 root 132: char szMemoryCaptureFileName[FILENAME_MAX];
1.1.1.9 root 133: char szAutoSaveFileName[FILENAME_MAX];
1.1.1.3 root 134: } CNF_MEMORY;
135:
136:
137: /* Joystick configuration */
1.1.1.7 root 138: typedef enum
139: {
140: JOYSTICK_DISABLED,
141: JOYSTICK_REALSTICK,
142: JOYSTICK_KEYBOARD
143: } JOYSTICKMODE;
1.1.1.19 root 144: #define JOYSTICK_MODES 3
1.1.1.7 root 145:
1.1.1.3 root 146: typedef struct
147: {
1.1.1.7 root 148: JOYSTICKMODE nJoystickMode;
1.1.1.10 root 149: bool bEnableAutoFire;
1.1.1.12 root 150: bool bEnableJumpOnFire2;
1.1.1.7 root 151: int nJoyId;
152: int nKeyCodeUp, nKeyCodeDown, nKeyCodeLeft, nKeyCodeRight, nKeyCodeFire;
1.1.1.3 root 153: } JOYSTICK;
154:
1.1.1.19 root 155: enum
156: {
157: JOYID_JOYSTICK0,
158: JOYID_JOYSTICK1,
159: JOYID_STEPADA,
160: JOYID_STEPADB,
161: JOYID_PARPORT1,
162: JOYID_PARPORT2,
163: JOYSTICK_COUNT
164: };
1.1.1.8 root 165:
1.1.1.3 root 166: typedef struct
167: {
1.1.1.8 root 168: JOYSTICK Joy[JOYSTICK_COUNT];
1.1.1.3 root 169: } CNF_JOYSTICKS;
170:
171:
1.1.1.7 root 172: /* Disk image configuration */
1.1.1.6 root 173:
174: typedef enum
175: {
176: WRITEPROT_OFF,
177: WRITEPROT_ON,
178: WRITEPROT_AUTO
179: } WRITEPROTECTION;
180:
1.1.1.10 root 181: #define MAX_FLOPPYDRIVES 2
182:
1.1.1.3 root 183: typedef struct
184: {
1.1.1.10 root 185: bool bAutoInsertDiskB;
1.1.1.15 root 186: bool FastFloppy; /* true to speed up FDC emulation */
1.1.1.18 root 187: bool EnableDriveA;
188: bool EnableDriveB;
189: int DriveA_NumberOfHeads;
190: int DriveB_NumberOfHeads;
1.1.1.6 root 191: WRITEPROTECTION nWriteProtection;
1.1.1.10 root 192: char szDiskZipPath[MAX_FLOPPYDRIVES][FILENAME_MAX];
193: char szDiskFileName[MAX_FLOPPYDRIVES][FILENAME_MAX];
1.1.1.7 root 194: char szDiskImageDirectory[FILENAME_MAX];
195: } CNF_DISKIMAGE;
1.1.1.3 root 196:
197:
1.1.1.15 root 198: /* Hard drives configuration: C: - Z: */
199: #define MAX_HARDDRIVES 24
200: #define DRIVE_C 0
1.1.1.19 root 201: #define DRIVE_SKIP -1
1.1.1.3 root 202:
1.1.1.17 root 203: typedef enum
204: {
205: GEMDOS_NOP,
206: GEMDOS_UPPER,
207: GEMDOS_LOWER
208: } GEMDOS_CHR_CONV;
209:
1.1.1.3 root 210: typedef struct
211: {
1.1.1.19 root 212: int nGemdosDrive;
1.1.1.10 root 213: bool bUseHardDiskDirectories;
1.1.1.13 root 214: bool bUseIdeMasterHardDiskImage;
215: bool bUseIdeSlaveHardDiskImage;
216: WRITEPROTECTION nWriteProtection;
1.1.1.17 root 217: GEMDOS_CHR_CONV nGemdosCase;
1.1.1.19 root 218: bool bFilenameConversion;
1.1.1.21! root 219: bool bGemdosHostTime;
1.1.1.13 root 220: bool bBootFromHardDisk;
1.1.1.7 root 221: char szHardDiskDirectories[MAX_HARDDRIVES][FILENAME_MAX];
1.1.1.13 root 222: char szIdeMasterHardDiskImage[FILENAME_MAX];
223: char szIdeSlaveHardDiskImage[FILENAME_MAX];
1.1.1.7 root 224: } CNF_HARDDISK;
1.1.1.3 root 225:
1.1.1.18 root 226: /* SCSI/ACSI configuration */
227: #define MAX_ACSI_DEVS 8
1.1.1.19 root 228: #define MAX_SCSI_DEVS 8
1.1.1.18 root 229:
230: typedef struct
231: {
232: bool bUseDevice;
233: char sDeviceFile[FILENAME_MAX];
234: } CNF_SCSIDEV;
235:
1.1.1.9 root 236: /* Falcon register $FFFF8006 bits 6 & 7 (mirrored in $FFFF82C0 bits 0 & 1):
237: * 00 Monochrome
238: * 01 RGB - Colormonitor
239: * 10 VGA - Colormonitor
240: * 11 TV
241: */
242: #define FALCON_MONITOR_MONO 0x00 /* SM124 */
243: #define FALCON_MONITOR_RGB 0x40
244: #define FALCON_MONITOR_VGA 0x80
245: #define FALCON_MONITOR_TV 0xC0
246:
247: typedef enum
248: {
249: MONITOR_TYPE_MONO,
250: MONITOR_TYPE_RGB,
251: MONITOR_TYPE_VGA,
252: MONITOR_TYPE_TV
253: } MONITORTYPE;
1.1.1.3 root 254:
255: /* Screen configuration */
256: typedef struct
257: {
1.1.1.10 root 258: MONITORTYPE nMonitorType;
259: int nFrameSkips;
260: bool bFullScreen;
1.1.1.14 root 261: bool bKeepResolution;
1.1.1.21! root 262: #if WITH_SDL2
! 263: bool bResizable;
! 264: #else
1.1.1.15 root 265: bool bKeepResolutionST;
1.1.1.20 root 266: #endif
1.1.1.10 root 267: bool bAllowOverscan;
1.1.1.13 root 268: bool bAspectCorrect;
1.1.1.10 root 269: bool bUseExtVdiResolutions;
1.1.1.9 root 270: int nSpec512Threshold;
271: int nForceBpp;
1.1.1.5 root 272: int nVdiColors;
1.1.1.9 root 273: int nVdiWidth;
274: int nVdiHeight;
1.1.1.19 root 275: bool bMouseWarp;
1.1.1.10 root 276: bool bShowStatusbar;
277: bool bShowDriveLed;
1.1.1.14 root 278: bool bCrop;
1.1.1.15 root 279: bool bForceMax;
1.1.1.13 root 280: int nMaxWidth;
281: int nMaxHeight;
1.1.1.19 root 282: #if WITH_SDL2
1.1.1.21! root 283: bool bUseSdlRenderer;
1.1.1.19 root 284: int nRenderScaleQuality;
285: bool bUseVsync;
286: #endif
1.1.1.21! root 287: bool DisableVideo;
1.1.1.3 root 288: } CNF_SCREEN;
289:
290:
291: /* Printer configuration */
292: typedef struct
293: {
1.1.1.10 root 294: bool bEnablePrinting;
1.1.1.4 root 295: char szPrintToFileName[FILENAME_MAX];
1.1.1.3 root 296: } CNF_PRINTER;
297:
298:
1.1.1.4 root 299: /* Midi configuration */
300: typedef struct
301: {
1.1.1.10 root 302: bool bEnableMidi;
1.1.1.11 root 303: char sMidiInFileName[FILENAME_MAX];
304: char sMidiOutFileName[FILENAME_MAX];
1.1.1.21! root 305: char sMidiInPortName[FILENAME_MAX];
! 306: char sMidiOutPortName[FILENAME_MAX];
1.1.1.4 root 307: } CNF_MIDI;
308:
309:
1.1.1.3 root 310: /* Dialog System */
311: typedef enum
312: {
1.1.1.6 root 313: MACHINE_ST,
1.1.1.20 root 314: MACHINE_MEGA_ST,
1.1.1.8 root 315: MACHINE_STE,
1.1.1.20 root 316: MACHINE_MEGA_STE,
1.1.1.9 root 317: MACHINE_TT,
1.1.1.20 root 318: MACHINE_FALCON
1.1.1.6 root 319: } MACHINETYPE;
320:
1.1.1.9 root 321: typedef enum
322: {
323: DSP_TYPE_NONE,
324: DSP_TYPE_DUMMY,
325: DSP_TYPE_EMU
326: } DSPTYPE;
327:
1.1.1.14 root 328: #if ENABLE_WINUAE_CPU
329: typedef enum
330: {
1.1.1.16 root 331: FPU_NONE = 0,
332: FPU_68881 = 68881,
333: FPU_68882 = 68882,
334: FPU_CPU = 68040
1.1.1.14 root 335: } FPUTYPE;
336: #endif
337:
1.1.1.20 root 338: typedef enum
339: {
340: VIDEO_TIMING_MODE_RANDOM = 0,
341: VIDEO_TIMING_MODE_WS1,
342: VIDEO_TIMING_MODE_WS2,
343: VIDEO_TIMING_MODE_WS3,
344: VIDEO_TIMING_MODE_WS4,
345: } VIDEOTIMINGMODE;
346:
1.1.1.3 root 347: typedef struct
348: {
349: int nCpuLevel;
1.1.1.6 root 350: int nCpuFreq;
1.1.1.14 root 351: bool bCompatibleCpu; /* Prefetch mode */
1.1.1.6 root 352: MACHINETYPE nMachineType;
1.1.1.10 root 353: bool bBlitter; /* TRUE if Blitter is enabled */
1.1.1.9 root 354: DSPTYPE nDSPType; /* how to "emulate" DSP */
1.1.1.10 root 355: bool bPatchTimerD;
1.1.1.15 root 356: bool bFastBoot; /* Enable to patch TOS for fast boot */
1.1.1.10 root 357: bool bFastForward;
1.1.1.19 root 358: bool bAddressSpace24; /* Always set to true with old UAE cpu */
1.1.1.20 root 359: VIDEOTIMINGMODE VideoTimingMode;
1.1.1.15 root 360:
1.1.1.14 root 361: #if ENABLE_WINUAE_CPU
362: bool bCycleExactCpu;
363: FPUTYPE n_FPUType;
364: bool bCompatibleFPU; /* More compatible FPU */
1.1.1.21! root 365: bool bSoftFloatFPU;
1.1.1.14 root 366: bool bMMU; /* TRUE if MMU is enabled */
367: #endif
1.1.1.3 root 368: } CNF_SYSTEM;
369:
1.1.1.14 root 370: typedef struct
371: {
372: int AviRecordVcodec;
373: int AviRecordFps;
374: char AviRecordFile[FILENAME_MAX];
375: } CNF_VIDEO;
1.1.1.3 root 376:
377: /* State of system is stored in this structure */
378: /* On reset, variables are copied into system globals and used. */
379: typedef struct
380: {
381: /* Configure */
1.1.1.6 root 382: CNF_LOG Log;
1.1.1.13 root 383: CNF_DEBUGGER Debugger;
1.1.1.3 root 384: CNF_SCREEN Screen;
385: CNF_JOYSTICKS Joysticks;
386: CNF_KEYBOARD Keyboard;
1.1.1.8 root 387: CNF_SHORTCUT Shortcut;
1.1.1.3 root 388: CNF_SOUND Sound;
389: CNF_MEMORY Memory;
1.1.1.7 root 390: CNF_DISKIMAGE DiskImage;
391: CNF_HARDDISK HardDisk;
1.1.1.18 root 392: CNF_SCSIDEV Acsi[MAX_ACSI_DEVS];
1.1.1.19 root 393: CNF_SCSIDEV Scsi[MAX_SCSI_DEVS];
1.1.1.5 root 394: CNF_ROM Rom;
1.1.1.3 root 395: CNF_RS232 RS232;
396: CNF_PRINTER Printer;
1.1.1.4 root 397: CNF_MIDI Midi;
1.1.1.3 root 398: CNF_SYSTEM System;
1.1.1.14 root 399: CNF_VIDEO Video;
1.1.1.3 root 400: } CNF_PARAMS;
401:
402:
403: extern CNF_PARAMS ConfigureParams;
1.1.1.4 root 404: extern char sConfigFileName[FILENAME_MAX];
1.1 root 405:
1.1.1.20 root 406: static inline bool Config_IsMachineST(void)
407: {
408: return ConfigureParams.System.nMachineType == MACHINE_ST ||
409: ConfigureParams.System.nMachineType == MACHINE_MEGA_ST;
410: }
411:
412: static inline bool Config_IsMachineSTE(void)
413: {
414: return ConfigureParams.System.nMachineType == MACHINE_STE ||
415: ConfigureParams.System.nMachineType == MACHINE_MEGA_STE;
416: }
417:
418: static inline bool Config_IsMachineTT(void)
419: {
420: return ConfigureParams.System.nMachineType == MACHINE_TT;
421: }
422:
423: static inline bool Config_IsMachineFalcon(void)
424: {
425: return ConfigureParams.System.nMachineType == MACHINE_FALCON;
426: }
427:
1.1.1.2 root 428: extern void Configuration_SetDefault(void);
1.1.1.10 root 429: extern void Configuration_Apply(bool bReset);
1.1.1.6 root 430: extern void Configuration_Load(const char *psFileName);
1.1.1.3 root 431: extern void Configuration_Save(void);
1.1.1.10 root 432: extern void Configuration_MemorySnapShot_Capture(bool bSave);
1.1.1.21! root 433: extern void Configuration_ChangeCpuFreq ( int CpuFreq_new );
1.1.1.3 root 434:
435: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.