|
|
1.1 root 1: /*
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.
6: */
7:
8: #ifndef HATARI_CONFIGURATION_H
9: #define HATARI_CONFIGURATION_H
10:
11: /* Logging and tracing */
12: typedef struct
13: {
14: char sLogFileName[FILENAME_MAX];
15: char sTraceFileName[FILENAME_MAX];
16: int nTextLogLevel;
17: int nAlertDlgLogLevel;
18: bool bConfirmQuit;
19: } CNF_LOG;
20:
21:
22: /* debugger */
23: typedef struct
24: {
25: int nNumberBase;
26: int nDisasmLines;
27: int nMemdumpLines;
28: } CNF_DEBUGGER;
29:
30:
31: /* ROM (TOS + cartridge) configuration */
32: typedef struct
33: {
34: char szTosImageFileName[FILENAME_MAX];
35: char szCartridgeImageFileName[FILENAME_MAX];
36: } CNF_ROM;
37:
38:
39: /* Sound configuration */
40: typedef struct
41: {
1.1.1.2 ! root 42: bool bEnableMicrophone;
1.1 root 43: bool bEnableSound;
44: int nPlaybackFreq;
45: int SdlAudioBufferSize;
1.1.1.2 ! root 46: char szYMCaptureFileName[FILENAME_MAX];
! 47: int YmVolumeMixing;
1.1 root 48: } CNF_SOUND;
49:
50:
51:
52: /* RS232 configuration */
53: typedef struct
54: {
55: bool bEnableRS232;
56: char szOutFileName[FILENAME_MAX];
57: char szInFileName[FILENAME_MAX];
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: {
71: bool bDisableKeyRepeat;
72: KEYMAPTYPE nKeymapType;
73: char szMappingFileName[FILENAME_MAX];
74: } CNF_KEYBOARD;
75:
76:
77: typedef enum {
78: SHORTCUT_OPTIONS,
79: SHORTCUT_FULLSCREEN,
80: SHORTCUT_MOUSEGRAB,
81: SHORTCUT_COLDRESET,
82: SHORTCUT_WARMRESET,
83: SHORTCUT_SCREENSHOT,
84: SHORTCUT_BOSSKEY,
85: SHORTCUT_CURSOREMU,
86: SHORTCUT_FASTFORWARD,
87: SHORTCUT_RECANIM,
88: SHORTCUT_RECSOUND,
89: SHORTCUT_SOUND,
90: SHORTCUT_DEBUG,
91: SHORTCUT_PAUSE,
92: SHORTCUT_QUIT,
93: SHORTCUT_LOADMEM,
94: SHORTCUT_SAVEMEM,
95: SHORTCUT_INSERTDISKA,
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:
107: typedef struct
108: {
109: int nMemorySize;
110: bool bAutoSave;
111: char szMemoryCaptureFileName[FILENAME_MAX];
112: char szAutoSaveFileName[FILENAME_MAX];
113: } CNF_MEMORY;
114:
115:
116: /* Joystick configuration */
117: typedef enum
118: {
119: JOYSTICK_DISABLED,
120: JOYSTICK_REALSTICK,
121: JOYSTICK_KEYBOARD
122: } JOYSTICKMODE;
123:
124: typedef struct
125: {
126: JOYSTICKMODE nJoystickMode;
127: bool bEnableAutoFire;
128: bool bEnableJumpOnFire2;
129: int nJoyId;
130: int nKeyCodeUp, nKeyCodeDown, nKeyCodeLeft, nKeyCodeRight, nKeyCodeFire;
131: } JOYSTICK;
132:
133: #define JOYSTICK_COUNT 6
134:
135: typedef struct
136: {
137: JOYSTICK Joy[JOYSTICK_COUNT];
138: } CNF_JOYSTICKS;
139:
140:
141: /* Disk image configuration */
142:
143: typedef enum
144: {
145: WRITEPROT_OFF,
146: WRITEPROT_ON,
147: WRITEPROT_AUTO
148: } WRITEPROTECTION;
149:
150: #define MAX_FLOPPYDRIVES 2
151:
152: typedef struct
153: {
154: bool bAutoInsertDiskB;
155: bool bSlowFloppy; /* true to slow down FDC emulation */
156: WRITEPROTECTION nWriteProtection;
157: char szDiskZipPath[MAX_FLOPPYDRIVES][FILENAME_MAX];
158: char szDiskFileName[MAX_FLOPPYDRIVES][FILENAME_MAX];
159: char szDiskImageDirectory[FILENAME_MAX];
160: } CNF_DISKIMAGE;
161:
162:
163: /* Hard drives configuration */
164: #define MAX_HARDDRIVES 23
165:
166: typedef enum
167: {
168: DRIVE_C,
169: DRIVE_D,
170: DRIVE_E,
171: DRIVE_F
172: } DRIVELETTER;
173:
174: typedef struct
175: {
176: int nHardDiskDir;
177: bool bUseHardDiskDirectories;
178: bool bUseHardDiskImage;
179: bool bUseIdeMasterHardDiskImage;
180: bool bUseIdeSlaveHardDiskImage;
181: WRITEPROTECTION nWriteProtection;
182: bool bBootFromHardDisk;
183: char szHardDiskDirectories[MAX_HARDDRIVES][FILENAME_MAX];
184: char szHardDiskImage[FILENAME_MAX];
185: char szIdeMasterHardDiskImage[FILENAME_MAX];
186: char szIdeSlaveHardDiskImage[FILENAME_MAX];
187: } CNF_HARDDISK;
188:
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;
207:
208: /* Screen configuration */
209: typedef struct
210: {
211: MONITORTYPE nMonitorType;
212: int nFrameSkips;
213: bool bFullScreen;
1.1.1.2 ! root 214: bool bKeepResolution;
1.1 root 215: bool bAllowOverscan;
216: bool bAspectCorrect;
217: bool bUseExtVdiResolutions;
218: int nSpec512Threshold;
219: int nForceBpp;
220: int nVdiColors;
221: int nVdiWidth;
222: int nVdiHeight;
223: bool bShowStatusbar;
224: bool bShowDriveLed;
1.1.1.2 ! root 225: bool bCrop;
1.1 root 226: int nMaxWidth;
227: int nMaxHeight;
228: } CNF_SCREEN;
229:
230:
231: /* Printer configuration */
232: typedef struct
233: {
234: bool bEnablePrinting;
235: bool bPrintToFile;
236: char szPrintToFileName[FILENAME_MAX];
237: } CNF_PRINTER;
238:
239:
240: /* Midi configuration */
241: typedef struct
242: {
243: bool bEnableMidi;
244: char sMidiInFileName[FILENAME_MAX];
245: char sMidiOutFileName[FILENAME_MAX];
246: } CNF_MIDI;
247:
248:
249: /* Dialog System */
250: typedef enum
251: {
252: MACHINE_ST,
253: MACHINE_STE,
254: MACHINE_TT,
1.1.1.2 ! root 255: MACHINE_FALCON,
! 256: MACHINE_MEGA_STE,
1.1 root 257: } MACHINETYPE;
258:
259: typedef enum
260: {
261: DSP_TYPE_NONE,
262: DSP_TYPE_DUMMY,
263: DSP_TYPE_EMU
264: } DSPTYPE;
265:
1.1.1.2 ! 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 root 276: typedef struct
277: {
278: int nCpuLevel;
279: int nCpuFreq;
1.1.1.2 ! root 280: bool bCompatibleCpu; /* Prefetch mode */
1.1 root 281: MACHINETYPE nMachineType;
282: bool bBlitter; /* TRUE if Blitter is enabled */
283: DSPTYPE nDSPType; /* how to "emulate" DSP */
284: bool bRealTimeClock;
285: bool bPatchTimerD;
286: bool bFastForward;
1.1.1.2 ! 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
! 295:
1.1 root 296: } CNF_SYSTEM;
297:
1.1.1.2 ! root 298: typedef struct
! 299: {
! 300: int AviRecordVcodec;
! 301: int AviRecordFps;
! 302: char AviRecordFile[FILENAME_MAX];
! 303: } CNF_VIDEO;
! 304:
! 305:
1.1 root 306:
307: /* State of system is stored in this structure */
308: /* On reset, variables are copied into system globals and used. */
309: typedef struct
310: {
311: /* Configure */
312: CNF_LOG Log;
313: CNF_DEBUGGER Debugger;
314: CNF_SCREEN Screen;
315: CNF_JOYSTICKS Joysticks;
316: CNF_KEYBOARD Keyboard;
317: CNF_SHORTCUT Shortcut;
318: CNF_SOUND Sound;
319: CNF_MEMORY Memory;
320: CNF_DISKIMAGE DiskImage;
321: CNF_HARDDISK HardDisk;
322: CNF_ROM Rom;
323: CNF_RS232 RS232;
324: CNF_PRINTER Printer;
325: CNF_MIDI Midi;
326: CNF_SYSTEM System;
1.1.1.2 ! root 327: CNF_VIDEO Video;
1.1 root 328: } CNF_PARAMS;
329:
330:
331: extern CNF_PARAMS ConfigureParams;
332: extern char sConfigFileName[FILENAME_MAX];
333:
334: extern void Configuration_SetDefault(void);
335: extern void Configuration_Apply(bool bReset);
336: extern void Configuration_Load(const char *psFileName);
337: extern void Configuration_Save(void);
338: extern void Configuration_MemorySnapShot_Capture(bool bSave);
339:
340: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.