|
|
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.13 root 11: /* Logging and tracing */
1.1.1.6 root 12: typedef struct
13: {
14: char sLogFileName[FILENAME_MAX];
1.1.1.10 root 15: char sTraceFileName[FILENAME_MAX];
1.1.1.6 root 16: int nTextLogLevel;
17: int nAlertDlgLogLevel;
1.1.1.10 root 18: bool bConfirmQuit;
1.1.1.17! root 19: bool bNatFeats;
! 20: bool bConsoleWindow; /* for now, used just for Windows */
1.1.1.6 root 21: } CNF_LOG;
22:
23:
1.1.1.13 root 24: /* debugger */
25: typedef struct
26: {
27: int nNumberBase;
28: int nDisasmLines;
29: int nMemdumpLines;
1.1.1.17! root 30: int nDisasmOptions;
! 31: bool bDisasmUAE;
1.1.1.13 root 32: } CNF_DEBUGGER;
33:
34:
1.1.1.5 root 35: /* ROM (TOS + cartridge) configuration */
1.1.1.3 root 36: typedef struct
37: {
1.1.1.5 root 38: char szTosImageFileName[FILENAME_MAX];
1.1.1.15 root 39: bool bPatchTos;
1.1.1.5 root 40: char szCartridgeImageFileName[FILENAME_MAX];
41: } CNF_ROM;
1.1.1.3 root 42:
43:
44: /* Sound configuration */
45: typedef struct
46: {
1.1.1.14 root 47: bool bEnableMicrophone;
1.1.1.10 root 48: bool bEnableSound;
1.1.1.16 root 49: bool bEnableSoundSync;
1.1.1.12 root 50: int nPlaybackFreq;
1.1.1.13 root 51: int SdlAudioBufferSize;
1.1.1.14 root 52: char szYMCaptureFileName[FILENAME_MAX];
53: int YmVolumeMixing;
1.1.1.3 root 54: } CNF_SOUND;
55:
56:
57:
1.1.1.4 root 58: /* RS232 configuration */
1.1.1.3 root 59: typedef struct
60: {
1.1.1.10 root 61: bool bEnableRS232;
1.1.1.4 root 62: char szOutFileName[FILENAME_MAX];
63: char szInFileName[FILENAME_MAX];
1.1.1.3 root 64: } CNF_RS232;
65:
66:
67: /* Dialog Keyboard */
68: typedef enum
69: {
70: KEYMAP_SYMBOLIC, /* Use keymapping with symbolic (ASCII) key codes */
71: KEYMAP_SCANCODE, /* Use keymapping with PC keyboard scancodes */
72: KEYMAP_LOADED /* Use keymapping with a map configuration file */
73: } KEYMAPTYPE;
74:
75: typedef struct
76: {
1.1.1.10 root 77: bool bDisableKeyRepeat;
1.1.1.3 root 78: KEYMAPTYPE nKeymapType;
1.1.1.4 root 79: char szMappingFileName[FILENAME_MAX];
1.1.1.3 root 80: } CNF_KEYBOARD;
81:
82:
1.1.1.8 root 83: typedef enum {
84: SHORTCUT_OPTIONS,
85: SHORTCUT_FULLSCREEN,
1.1.1.13 root 86: SHORTCUT_MOUSEGRAB,
1.1.1.8 root 87: SHORTCUT_COLDRESET,
88: SHORTCUT_WARMRESET,
89: SHORTCUT_SCREENSHOT,
90: SHORTCUT_BOSSKEY,
91: SHORTCUT_CURSOREMU,
1.1.1.10 root 92: SHORTCUT_FASTFORWARD,
1.1.1.8 root 93: SHORTCUT_RECANIM,
94: SHORTCUT_RECSOUND,
95: SHORTCUT_SOUND,
1.1.1.12 root 96: SHORTCUT_DEBUG,
1.1.1.10 root 97: SHORTCUT_PAUSE,
1.1.1.8 root 98: SHORTCUT_QUIT,
1.1.1.9 root 99: SHORTCUT_LOADMEM,
100: SHORTCUT_SAVEMEM,
1.1.1.10 root 101: SHORTCUT_INSERTDISKA,
1.1.1.8 root 102: SHORTCUT_KEYS, /* number of shortcuts */
103: SHORTCUT_NONE
104: } SHORTCUTKEYIDX;
105:
106: typedef struct
107: {
108: int withModifier[SHORTCUT_KEYS];
109: int withoutModifier[SHORTCUT_KEYS];
110: } CNF_SHORTCUT;
111:
112:
1.1.1.3 root 113: typedef struct
114: {
1.1.1.7 root 115: int nMemorySize;
1.1.1.10 root 116: bool bAutoSave;
1.1.1.4 root 117: char szMemoryCaptureFileName[FILENAME_MAX];
1.1.1.9 root 118: char szAutoSaveFileName[FILENAME_MAX];
1.1.1.3 root 119: } CNF_MEMORY;
120:
121:
122: /* Joystick configuration */
1.1.1.7 root 123: typedef enum
124: {
125: JOYSTICK_DISABLED,
126: JOYSTICK_REALSTICK,
127: JOYSTICK_KEYBOARD
128: } JOYSTICKMODE;
129:
1.1.1.3 root 130: typedef struct
131: {
1.1.1.7 root 132: JOYSTICKMODE nJoystickMode;
1.1.1.10 root 133: bool bEnableAutoFire;
1.1.1.12 root 134: bool bEnableJumpOnFire2;
1.1.1.7 root 135: int nJoyId;
136: int nKeyCodeUp, nKeyCodeDown, nKeyCodeLeft, nKeyCodeRight, nKeyCodeFire;
1.1.1.3 root 137: } JOYSTICK;
138:
1.1.1.8 root 139: #define JOYSTICK_COUNT 6
140:
1.1.1.3 root 141: typedef struct
142: {
1.1.1.8 root 143: JOYSTICK Joy[JOYSTICK_COUNT];
1.1.1.3 root 144: } CNF_JOYSTICKS;
145:
146:
1.1.1.7 root 147: /* Disk image configuration */
1.1.1.6 root 148:
149: typedef enum
150: {
151: WRITEPROT_OFF,
152: WRITEPROT_ON,
153: WRITEPROT_AUTO
154: } WRITEPROTECTION;
155:
1.1.1.10 root 156: #define MAX_FLOPPYDRIVES 2
157:
1.1.1.3 root 158: typedef struct
159: {
1.1.1.10 root 160: bool bAutoInsertDiskB;
1.1.1.15 root 161: bool FastFloppy; /* true to speed up FDC emulation */
1.1.1.6 root 162: WRITEPROTECTION nWriteProtection;
1.1.1.10 root 163: char szDiskZipPath[MAX_FLOPPYDRIVES][FILENAME_MAX];
164: char szDiskFileName[MAX_FLOPPYDRIVES][FILENAME_MAX];
1.1.1.7 root 165: char szDiskImageDirectory[FILENAME_MAX];
166: } CNF_DISKIMAGE;
1.1.1.3 root 167:
168:
1.1.1.15 root 169: /* Hard drives configuration: C: - Z: */
170: #define MAX_HARDDRIVES 24
171: #define DRIVE_C 0
1.1.1.3 root 172:
1.1.1.17! root 173: typedef enum
! 174: {
! 175: GEMDOS_NOP,
! 176: GEMDOS_UPPER,
! 177: GEMDOS_LOWER
! 178: } GEMDOS_CHR_CONV;
! 179:
1.1.1.3 root 180: typedef struct
181: {
1.1.1.7 root 182: int nHardDiskDir;
1.1.1.10 root 183: bool bUseHardDiskDirectories;
184: bool bUseHardDiskImage;
1.1.1.13 root 185: bool bUseIdeMasterHardDiskImage;
186: bool bUseIdeSlaveHardDiskImage;
187: WRITEPROTECTION nWriteProtection;
1.1.1.17! root 188: GEMDOS_CHR_CONV nGemdosCase;
1.1.1.13 root 189: bool bBootFromHardDisk;
1.1.1.7 root 190: char szHardDiskDirectories[MAX_HARDDRIVES][FILENAME_MAX];
191: char szHardDiskImage[FILENAME_MAX];
1.1.1.13 root 192: char szIdeMasterHardDiskImage[FILENAME_MAX];
193: char szIdeSlaveHardDiskImage[FILENAME_MAX];
1.1.1.7 root 194: } CNF_HARDDISK;
1.1.1.3 root 195:
1.1.1.9 root 196: /* Falcon register $FFFF8006 bits 6 & 7 (mirrored in $FFFF82C0 bits 0 & 1):
197: * 00 Monochrome
198: * 01 RGB - Colormonitor
199: * 10 VGA - Colormonitor
200: * 11 TV
201: */
202: #define FALCON_MONITOR_MONO 0x00 /* SM124 */
203: #define FALCON_MONITOR_RGB 0x40
204: #define FALCON_MONITOR_VGA 0x80
205: #define FALCON_MONITOR_TV 0xC0
206:
207: typedef enum
208: {
209: MONITOR_TYPE_MONO,
210: MONITOR_TYPE_RGB,
211: MONITOR_TYPE_VGA,
212: MONITOR_TYPE_TV
213: } MONITORTYPE;
1.1.1.3 root 214:
215: /* Screen configuration */
216: typedef struct
217: {
1.1.1.10 root 218: MONITORTYPE nMonitorType;
219: int nFrameSkips;
220: bool bFullScreen;
1.1.1.14 root 221: bool bKeepResolution;
1.1.1.15 root 222: bool bKeepResolutionST;
1.1.1.10 root 223: bool bAllowOverscan;
1.1.1.13 root 224: bool bAspectCorrect;
1.1.1.10 root 225: bool bUseExtVdiResolutions;
1.1.1.9 root 226: int nSpec512Threshold;
227: int nForceBpp;
1.1.1.5 root 228: int nVdiColors;
1.1.1.9 root 229: int nVdiWidth;
230: int nVdiHeight;
1.1.1.10 root 231: bool bShowStatusbar;
232: bool bShowDriveLed;
1.1.1.14 root 233: bool bCrop;
1.1.1.15 root 234: bool bForceMax;
1.1.1.13 root 235: int nMaxWidth;
236: int nMaxHeight;
1.1.1.3 root 237: } CNF_SCREEN;
238:
239:
240: /* Printer configuration */
241: typedef struct
242: {
1.1.1.10 root 243: bool bEnablePrinting;
1.1.1.4 root 244: char szPrintToFileName[FILENAME_MAX];
1.1.1.3 root 245: } CNF_PRINTER;
246:
247:
1.1.1.4 root 248: /* Midi configuration */
249: typedef struct
250: {
1.1.1.10 root 251: bool bEnableMidi;
1.1.1.11 root 252: char sMidiInFileName[FILENAME_MAX];
253: char sMidiOutFileName[FILENAME_MAX];
1.1.1.4 root 254: } CNF_MIDI;
255:
256:
1.1.1.3 root 257: /* Dialog System */
258: typedef enum
259: {
1.1.1.6 root 260: MACHINE_ST,
1.1.1.8 root 261: MACHINE_STE,
1.1.1.9 root 262: MACHINE_TT,
1.1.1.14 root 263: MACHINE_FALCON,
1.1.1.17! root 264: MACHINE_MEGA_STE
1.1.1.6 root 265: } MACHINETYPE;
266:
1.1.1.9 root 267: typedef enum
268: {
269: DSP_TYPE_NONE,
270: DSP_TYPE_DUMMY,
271: DSP_TYPE_EMU
272: } DSPTYPE;
273:
1.1.1.14 root 274: #if ENABLE_WINUAE_CPU
275: typedef enum
276: {
1.1.1.16 root 277: FPU_NONE = 0,
278: FPU_68881 = 68881,
279: FPU_68882 = 68882,
280: FPU_CPU = 68040
1.1.1.14 root 281: } FPUTYPE;
282: #endif
283:
1.1.1.3 root 284: typedef struct
285: {
286: int nCpuLevel;
1.1.1.6 root 287: int nCpuFreq;
1.1.1.14 root 288: bool bCompatibleCpu; /* Prefetch mode */
1.1.1.6 root 289: MACHINETYPE nMachineType;
1.1.1.10 root 290: bool bBlitter; /* TRUE if Blitter is enabled */
1.1.1.9 root 291: DSPTYPE nDSPType; /* how to "emulate" DSP */
1.1.1.10 root 292: bool bRealTimeClock;
293: bool bPatchTimerD;
1.1.1.15 root 294: bool bFastBoot; /* Enable to patch TOS for fast boot */
1.1.1.10 root 295: bool bFastForward;
1.1.1.15 root 296:
1.1.1.14 root 297: #if ENABLE_WINUAE_CPU
298: bool bAddressSpace24;
299: bool bCycleExactCpu;
300: FPUTYPE n_FPUType;
301: bool bCompatibleFPU; /* More compatible FPU */
302: bool bMMU; /* TRUE if MMU is enabled */
303: #endif
1.1.1.3 root 304: } CNF_SYSTEM;
305:
1.1.1.14 root 306: typedef struct
307: {
308: int AviRecordVcodec;
309: int AviRecordFps;
310: char AviRecordFile[FILENAME_MAX];
311: } CNF_VIDEO;
1.1.1.3 root 312:
313: /* State of system is stored in this structure */
314: /* On reset, variables are copied into system globals and used. */
315: typedef struct
316: {
317: /* Configure */
1.1.1.6 root 318: CNF_LOG Log;
1.1.1.13 root 319: CNF_DEBUGGER Debugger;
1.1.1.3 root 320: CNF_SCREEN Screen;
321: CNF_JOYSTICKS Joysticks;
322: CNF_KEYBOARD Keyboard;
1.1.1.8 root 323: CNF_SHORTCUT Shortcut;
1.1.1.3 root 324: CNF_SOUND Sound;
325: CNF_MEMORY Memory;
1.1.1.7 root 326: CNF_DISKIMAGE DiskImage;
327: CNF_HARDDISK HardDisk;
1.1.1.5 root 328: CNF_ROM Rom;
1.1.1.3 root 329: CNF_RS232 RS232;
330: CNF_PRINTER Printer;
1.1.1.4 root 331: CNF_MIDI Midi;
1.1.1.3 root 332: CNF_SYSTEM System;
1.1.1.14 root 333: CNF_VIDEO Video;
1.1.1.3 root 334: } CNF_PARAMS;
335:
336:
337: extern CNF_PARAMS ConfigureParams;
1.1.1.4 root 338: extern char sConfigFileName[FILENAME_MAX];
1.1 root 339:
1.1.1.2 root 340: extern void Configuration_SetDefault(void);
1.1.1.10 root 341: extern void Configuration_Apply(bool bReset);
1.1.1.6 root 342: extern void Configuration_Load(const char *psFileName);
1.1.1.3 root 343: extern void Configuration_Save(void);
1.1.1.10 root 344: extern void Configuration_MemorySnapShot_Capture(bool bSave);
1.1.1.3 root 345:
346: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.