|
|
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.6 root 11: /* Logging */
12: typedef struct
13: {
14: char sLogFileName[FILENAME_MAX];
15: int nTextLogLevel;
16: int nAlertDlgLogLevel;
1.1.1.9 ! root 17: BOOL bConfirmQuit;
1.1.1.6 root 18: } CNF_LOG;
19:
20:
1.1.1.5 root 21: /* ROM (TOS + cartridge) configuration */
1.1.1.3 root 22: typedef struct
23: {
1.1.1.5 root 24: char szTosImageFileName[FILENAME_MAX];
25: char szCartridgeImageFileName[FILENAME_MAX];
26: } CNF_ROM;
1.1.1.3 root 27:
28:
29: /* Sound configuration */
30: typedef enum
31: {
32: PLAYBACK_LOW,
33: PLAYBACK_MEDIUM,
34: PLAYBACK_HIGH
1.1.1.9 ! root 35: } SOUND_QUALITY;
1.1.1.3 root 36:
37: typedef struct
38: {
39: BOOL bEnableSound;
1.1.1.9 ! root 40: SOUND_QUALITY nPlaybackQuality;
1.1.1.4 root 41: char szYMCaptureFileName[FILENAME_MAX];
1.1.1.3 root 42: } CNF_SOUND;
43:
44:
45:
1.1.1.4 root 46: /* RS232 configuration */
1.1.1.3 root 47: typedef struct
48: {
49: BOOL bEnableRS232;
1.1.1.4 root 50: char szOutFileName[FILENAME_MAX];
51: char szInFileName[FILENAME_MAX];
1.1.1.3 root 52: } CNF_RS232;
53:
54:
55: /* Dialog Keyboard */
56: typedef enum
57: {
58: KEYMAP_SYMBOLIC, /* Use keymapping with symbolic (ASCII) key codes */
59: KEYMAP_SCANCODE, /* Use keymapping with PC keyboard scancodes */
60: KEYMAP_LOADED /* Use keymapping with a map configuration file */
61: } KEYMAPTYPE;
62:
63: typedef struct
64: {
65: BOOL bDisableKeyRepeat;
66: KEYMAPTYPE nKeymapType;
1.1.1.4 root 67: char szMappingFileName[FILENAME_MAX];
1.1.1.3 root 68: } CNF_KEYBOARD;
69:
70:
1.1.1.8 root 71: typedef enum {
72: SHORTCUT_OPTIONS,
73: SHORTCUT_FULLSCREEN,
74: SHORTCUT_MOUSEMODE,
75: SHORTCUT_COLDRESET,
76: SHORTCUT_WARMRESET,
77: SHORTCUT_SCREENSHOT,
78: SHORTCUT_BOSSKEY,
79: SHORTCUT_CURSOREMU,
80: SHORTCUT_MAXSPEED,
81: SHORTCUT_RECANIM,
82: SHORTCUT_RECSOUND,
83: SHORTCUT_SOUND,
84: SHORTCUT_QUIT,
1.1.1.9 ! root 85: SHORTCUT_LOADMEM,
! 86: SHORTCUT_SAVEMEM,
1.1.1.8 root 87: SHORTCUT_KEYS, /* number of shortcuts */
88: SHORTCUT_NONE
89: } SHORTCUTKEYIDX;
90:
91: typedef struct
92: {
93: int withModifier[SHORTCUT_KEYS];
94: int withoutModifier[SHORTCUT_KEYS];
95: } CNF_SHORTCUT;
96:
97:
1.1.1.3 root 98: typedef struct
99: {
1.1.1.7 root 100: int nMemorySize;
1.1.1.9 ! root 101: BOOL bAutoSave;
1.1.1.4 root 102: char szMemoryCaptureFileName[FILENAME_MAX];
1.1.1.9 ! root 103: char szAutoSaveFileName[FILENAME_MAX];
1.1.1.3 root 104: } CNF_MEMORY;
105:
106:
107: /* Joystick configuration */
1.1.1.7 root 108: typedef enum
109: {
110: JOYSTICK_DISABLED,
111: JOYSTICK_REALSTICK,
112: JOYSTICK_KEYBOARD
113: } JOYSTICKMODE;
114:
1.1.1.3 root 115: typedef struct
116: {
1.1.1.7 root 117: JOYSTICKMODE nJoystickMode;
1.1.1.3 root 118: BOOL bEnableAutoFire;
1.1.1.7 root 119: int nJoyId;
120: int nKeyCodeUp, nKeyCodeDown, nKeyCodeLeft, nKeyCodeRight, nKeyCodeFire;
1.1.1.3 root 121: } JOYSTICK;
122:
1.1.1.8 root 123: #define JOYSTICK_COUNT 6
124:
1.1.1.3 root 125: typedef struct
126: {
1.1.1.8 root 127: JOYSTICK Joy[JOYSTICK_COUNT];
1.1.1.3 root 128: } CNF_JOYSTICKS;
129:
130:
1.1.1.7 root 131: /* Disk image configuration */
1.1.1.6 root 132:
133: typedef enum
134: {
135: WRITEPROT_OFF,
136: WRITEPROT_ON,
137: WRITEPROT_AUTO
138: } WRITEPROTECTION;
139:
1.1.1.3 root 140: typedef struct
141: {
1.1.1.7 root 142: BOOL bAutoInsertDiskB;
1.1.1.6 root 143: WRITEPROTECTION nWriteProtection;
1.1.1.7 root 144: char szDiskImageDirectory[FILENAME_MAX];
145: } CNF_DISKIMAGE;
1.1.1.3 root 146:
147:
1.1.1.7 root 148: /* Hard drives configuration */
1.1.1.3 root 149: #define MAX_HARDDRIVES 1
150:
151: typedef enum
152: {
153: DRIVE_C,
154: DRIVE_D,
155: DRIVE_E,
156: DRIVE_F
157: } DRIVELETTER;
158:
159: typedef struct
160: {
1.1.1.7 root 161: BOOL bBootFromHardDisk;
162: int nHardDiskDir;
163: BOOL bUseHardDiskDirectories;
164: BOOL bUseHardDiskImage;
165: char szHardDiskDirectories[MAX_HARDDRIVES][FILENAME_MAX];
166: char szHardDiskImage[FILENAME_MAX];
1.1.1.9 ! root 167: BOOL bUseIdeHardDiskImage;
! 168: char szIdeHardDiskImage[FILENAME_MAX];
1.1.1.7 root 169: } CNF_HARDDISK;
1.1.1.3 root 170:
1.1.1.9 ! root 171: /* Falcon register $FFFF8006 bits 6 & 7 (mirrored in $FFFF82C0 bits 0 & 1):
! 172: * 00 Monochrome
! 173: * 01 RGB - Colormonitor
! 174: * 10 VGA - Colormonitor
! 175: * 11 TV
! 176: */
! 177: #define FALCON_MONITOR_MASK 0x3F
! 178: #define FALCON_MONITOR_MONO 0x00 /* SM124 */
! 179: #define FALCON_MONITOR_RGB 0x40
! 180: #define FALCON_MONITOR_VGA 0x80
! 181: #define FALCON_MONITOR_TV 0xC0
! 182:
! 183: typedef enum
! 184: {
! 185: MONITOR_TYPE_MONO,
! 186: MONITOR_TYPE_RGB,
! 187: MONITOR_TYPE_VGA,
! 188: MONITOR_TYPE_TV
! 189: } MONITORTYPE;
1.1.1.3 root 190:
191: /* Screen configuration */
192: typedef struct
193: {
1.1.1.9 ! root 194: MONITORTYPE MonitorType;
! 195: int FrameSkips;
1.1.1.3 root 196: BOOL bFullScreen;
1.1.1.5 root 197: BOOL bAllowOverscan;
1.1.1.9 ! root 198: BOOL bZoomLowRes;
1.1.1.5 root 199: BOOL bUseExtVdiResolutions;
1.1.1.9 ! root 200: int nSpec512Threshold;
! 201: int nForceBpp;
1.1.1.5 root 202: int nVdiColors;
1.1.1.9 ! root 203: int nVdiWidth;
! 204: int nVdiHeight;
1.1.1.3 root 205: BOOL bCaptureChange;
206: int nFramesPerSecond;
1.1.1.9 ! root 207: int nWindowBorderPixelsLeft;
! 208: int nWindowBorderPixelsRight;
! 209: int nWindowBorderPixelsBottom;
! 210: int nFullScreenBorderPixelsLeft;
! 211: int nFullScreenBorderPixelsRight;
! 212: int nFullScreenBorderPixelsBottom;
1.1.1.3 root 213: } CNF_SCREEN;
214:
215:
216: /* Printer configuration */
217: typedef struct
218: {
219: BOOL bEnablePrinting;
220: BOOL bPrintToFile;
1.1.1.4 root 221: char szPrintToFileName[FILENAME_MAX];
1.1.1.3 root 222: } CNF_PRINTER;
223:
224:
1.1.1.4 root 225: /* Midi configuration */
226: typedef struct
227: {
228: BOOL bEnableMidi;
229: char szMidiOutFileName[FILENAME_MAX];
230: } CNF_MIDI;
231:
232:
1.1.1.3 root 233: /* Dialog System */
234: typedef enum
235: {
236: MINMAXSPEED_MIN,
237: MINMAXSPEED_1,
238: MINMAXSPEED_2,
239: MINMAXSPEED_3,
240: MINMAXSPEED_MAX
241: } MINMAXSPEED_TYPE;
242:
1.1.1.6 root 243: typedef enum
244: {
245: MACHINE_ST,
1.1.1.8 root 246: MACHINE_STE,
1.1.1.9 ! root 247: MACHINE_TT,
! 248: MACHINE_FALCON
1.1.1.6 root 249: } MACHINETYPE;
250:
1.1.1.9 ! root 251: typedef enum
! 252: {
! 253: DSP_TYPE_NONE,
! 254: DSP_TYPE_DUMMY,
! 255: DSP_TYPE_EMU
! 256: } DSPTYPE;
! 257:
1.1.1.3 root 258: typedef struct
259: {
260: int nCpuLevel;
1.1.1.6 root 261: int nCpuFreq;
1.1.1.3 root 262: BOOL bCompatibleCpu;
1.1.1.6 root 263: /*BOOL bAddressSpace24;*/
264: MACHINETYPE nMachineType;
1.1.1.9 ! root 265: BOOL bBlitter; /* TRUE if Blitter is enabled */
! 266: DSPTYPE nDSPType; /* how to "emulate" DSP */
1.1.1.6 root 267: BOOL bRealTimeClock;
1.1.1.4 root 268: BOOL bPatchTimerD;
269: BOOL bSlowFDC; /* TRUE to slow down FDC emulation */
1.1.1.3 root 270: MINMAXSPEED_TYPE nMinMaxSpeed;
271: } CNF_SYSTEM;
272:
273:
274: /* State of system is stored in this structure */
275: /* On reset, variables are copied into system globals and used. */
276: typedef struct
277: {
278: /* Configure */
1.1.1.6 root 279: CNF_LOG Log;
1.1.1.3 root 280: CNF_SCREEN Screen;
281: CNF_JOYSTICKS Joysticks;
282: CNF_KEYBOARD Keyboard;
1.1.1.8 root 283: CNF_SHORTCUT Shortcut;
1.1.1.3 root 284: CNF_SOUND Sound;
285: CNF_MEMORY Memory;
1.1.1.7 root 286: CNF_DISKIMAGE DiskImage;
287: CNF_HARDDISK HardDisk;
1.1.1.5 root 288: CNF_ROM Rom;
1.1.1.3 root 289: CNF_RS232 RS232;
290: CNF_PRINTER Printer;
1.1.1.4 root 291: CNF_MIDI Midi;
1.1.1.3 root 292: CNF_SYSTEM System;
293: } CNF_PARAMS;
294:
295:
1.1 root 296: extern BOOL bFirstTimeInstall;
1.1.1.3 root 297: extern CNF_PARAMS ConfigureParams;
1.1.1.4 root 298: extern char sConfigFileName[FILENAME_MAX];
1.1 root 299:
1.1.1.2 root 300: extern void Configuration_SetDefault(void);
1.1.1.9 ! root 301: extern void Configuration_Apply(BOOL bReset);
1.1.1.6 root 302: extern void Configuration_Load(const char *psFileName);
1.1.1.3 root 303: extern void Configuration_Save(void);
1.1.1.9 ! root 304: extern void Configuration_MemorySnapShot_Capture(BOOL bSave);
1.1.1.3 root 305:
306: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.