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