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