|
|
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;
17: } CNF_LOG;
18:
19:
1.1.1.5 root 20: /* ROM (TOS + cartridge) configuration */
1.1.1.3 root 21: typedef struct
22: {
1.1.1.5 root 23: char szTosImageFileName[FILENAME_MAX];
24: char szCartridgeImageFileName[FILENAME_MAX];
25: } CNF_ROM;
1.1.1.3 root 26:
27:
28: /* Sound configuration */
29: typedef enum
30: {
31: PLAYBACK_LOW,
32: PLAYBACK_MEDIUM,
33: PLAYBACK_HIGH
34: } SOUND_QUALITIY;
35:
36: typedef struct
37: {
38: BOOL bEnableSound;
39: SOUND_QUALITIY nPlaybackQuality;
1.1.1.4 root 40: char szYMCaptureFileName[FILENAME_MAX];
1.1.1.3 root 41: } CNF_SOUND;
42:
43:
44:
1.1.1.4 root 45: /* RS232 configuration */
1.1.1.3 root 46: typedef struct
47: {
48: BOOL bEnableRS232;
1.1.1.4 root 49: char szOutFileName[FILENAME_MAX];
50: char szInFileName[FILENAME_MAX];
1.1.1.3 root 51: } CNF_RS232;
52:
53:
54: /* Dialog Keyboard */
55: typedef enum
56: {
57: KEYMAP_SYMBOLIC, /* Use keymapping with symbolic (ASCII) key codes */
58: KEYMAP_SCANCODE, /* Use keymapping with PC keyboard scancodes */
59: KEYMAP_LOADED /* Use keymapping with a map configuration file */
60: } KEYMAPTYPE;
61:
62: typedef struct
63: {
64: BOOL bDisableKeyRepeat;
65: KEYMAPTYPE nKeymapType;
1.1.1.4 root 66: char szMappingFileName[FILENAME_MAX];
1.1.1.3 root 67: } CNF_KEYBOARD;
68:
69:
1.1.1.8 ! root 70: typedef enum {
! 71: SHORTCUT_OPTIONS,
! 72: SHORTCUT_FULLSCREEN,
! 73: SHORTCUT_MOUSEMODE,
! 74: SHORTCUT_COLDRESET,
! 75: SHORTCUT_WARMRESET,
! 76: SHORTCUT_SCREENSHOT,
! 77: SHORTCUT_BOSSKEY,
! 78: SHORTCUT_CURSOREMU,
! 79: SHORTCUT_MAXSPEED,
! 80: SHORTCUT_RECANIM,
! 81: SHORTCUT_RECSOUND,
! 82: SHORTCUT_SOUND,
! 83: SHORTCUT_QUIT,
! 84: SHORTCUT_KEYS, /* number of shortcuts */
! 85: SHORTCUT_NONE
! 86: } SHORTCUTKEYIDX;
! 87:
! 88: typedef struct
! 89: {
! 90: int withModifier[SHORTCUT_KEYS];
! 91: int withoutModifier[SHORTCUT_KEYS];
! 92: } CNF_SHORTCUT;
! 93:
! 94:
1.1.1.3 root 95: typedef struct
96: {
1.1.1.7 root 97: int nMemorySize;
1.1.1.4 root 98: char szMemoryCaptureFileName[FILENAME_MAX];
1.1.1.3 root 99: } CNF_MEMORY;
100:
101:
102: /* Joystick configuration */
1.1.1.7 root 103: typedef enum
104: {
105: JOYSTICK_DISABLED,
106: JOYSTICK_REALSTICK,
107: JOYSTICK_KEYBOARD
108: } JOYSTICKMODE;
109:
1.1.1.3 root 110: typedef struct
111: {
1.1.1.7 root 112: JOYSTICKMODE nJoystickMode;
1.1.1.3 root 113: BOOL bEnableAutoFire;
1.1.1.7 root 114: int nJoyId;
115: int nKeyCodeUp, nKeyCodeDown, nKeyCodeLeft, nKeyCodeRight, nKeyCodeFire;
1.1.1.3 root 116: } JOYSTICK;
117:
1.1.1.8 ! root 118: #define JOYSTICK_COUNT 6
! 119:
1.1.1.3 root 120: typedef struct
121: {
1.1.1.8 ! root 122: JOYSTICK Joy[JOYSTICK_COUNT];
1.1.1.3 root 123: } CNF_JOYSTICKS;
124:
125:
1.1.1.7 root 126: /* Disk image configuration */
1.1.1.6 root 127:
128: typedef enum
129: {
130: WRITEPROT_OFF,
131: WRITEPROT_ON,
132: WRITEPROT_AUTO
133: } WRITEPROTECTION;
134:
1.1.1.3 root 135: typedef struct
136: {
1.1.1.7 root 137: BOOL bAutoInsertDiskB;
1.1.1.6 root 138: WRITEPROTECTION nWriteProtection;
1.1.1.7 root 139: char szDiskImageDirectory[FILENAME_MAX];
140: } CNF_DISKIMAGE;
1.1.1.3 root 141:
142:
1.1.1.7 root 143: /* Hard drives configuration */
1.1.1.3 root 144: #define MAX_HARDDRIVES 1
145:
146: typedef enum
147: {
148: DRIVE_C,
149: DRIVE_D,
150: DRIVE_E,
151: DRIVE_F
152: } DRIVELETTER;
153:
154: typedef struct
155: {
1.1.1.7 root 156: BOOL bBootFromHardDisk;
157: int nHardDiskDir;
158: BOOL bUseHardDiskDirectories;
159: BOOL bUseHardDiskImage;
160: char szHardDiskDirectories[MAX_HARDDRIVES][FILENAME_MAX];
161: char szHardDiskImage[FILENAME_MAX];
162: } CNF_HARDDISK;
1.1.1.3 root 163:
164:
165: /* Screen configuration */
166: typedef struct
167: {
168: BOOL bFullScreen;
169: BOOL bFrameSkip;
1.1.1.5 root 170: BOOL bAllowOverscan;
171: BOOL bInterleavedScreen;
1.1.1.3 root 172: int ChosenDisplayMode;
1.1.1.5 root 173: BOOL bUseHighRes;
174: BOOL bUseExtVdiResolutions;
175: int nVdiResolution;
176: int nVdiColors;
1.1.1.3 root 177: BOOL bCaptureChange;
178: int nFramesPerSecond;
179: } CNF_SCREEN;
180:
181:
182: /* Printer configuration */
183: typedef struct
184: {
185: BOOL bEnablePrinting;
186: BOOL bPrintToFile;
1.1.1.4 root 187: char szPrintToFileName[FILENAME_MAX];
1.1.1.3 root 188: } CNF_PRINTER;
189:
190:
1.1.1.4 root 191: /* Midi configuration */
192: typedef struct
193: {
194: BOOL bEnableMidi;
195: char szMidiOutFileName[FILENAME_MAX];
196: } CNF_MIDI;
197:
198:
1.1.1.3 root 199: /* Dialog System */
200: typedef enum
201: {
202: MINMAXSPEED_MIN,
203: MINMAXSPEED_1,
204: MINMAXSPEED_2,
205: MINMAXSPEED_3,
206: MINMAXSPEED_MAX
207: } MINMAXSPEED_TYPE;
208:
1.1.1.6 root 209: typedef enum
210: {
211: MACHINE_ST,
1.1.1.8 ! root 212: MACHINE_STE,
! 213: MACHINE_TT
1.1.1.6 root 214: } MACHINETYPE;
215:
1.1.1.3 root 216: typedef struct
217: {
218: int nCpuLevel;
1.1.1.6 root 219: int nCpuFreq;
1.1.1.3 root 220: BOOL bCompatibleCpu;
1.1.1.6 root 221: /*BOOL bAddressSpace24;*/
222: MACHINETYPE nMachineType;
1.1.1.3 root 223: BOOL bBlitter; /* TRUE if blitter is enabled */
1.1.1.6 root 224: BOOL bRealTimeClock;
1.1.1.4 root 225: BOOL bPatchTimerD;
226: BOOL bSlowFDC; /* TRUE to slow down FDC emulation */
1.1.1.3 root 227: MINMAXSPEED_TYPE nMinMaxSpeed;
228: } CNF_SYSTEM;
229:
230:
231: /* State of system is stored in this structure */
232: /* On reset, variables are copied into system globals and used. */
233: typedef struct
234: {
235: /* Configure */
1.1.1.6 root 236: CNF_LOG Log;
1.1.1.3 root 237: CNF_SCREEN Screen;
238: CNF_JOYSTICKS Joysticks;
239: CNF_KEYBOARD Keyboard;
1.1.1.8 ! root 240: CNF_SHORTCUT Shortcut;
1.1.1.3 root 241: CNF_SOUND Sound;
242: CNF_MEMORY Memory;
1.1.1.7 root 243: CNF_DISKIMAGE DiskImage;
244: CNF_HARDDISK HardDisk;
1.1.1.5 root 245: CNF_ROM Rom;
1.1.1.3 root 246: CNF_RS232 RS232;
247: CNF_PRINTER Printer;
1.1.1.4 root 248: CNF_MIDI Midi;
1.1.1.3 root 249: CNF_SYSTEM System;
250: } CNF_PARAMS;
251:
252:
1.1 root 253: extern BOOL bFirstTimeInstall;
1.1.1.3 root 254: extern CNF_PARAMS ConfigureParams;
1.1.1.4 root 255: extern char sConfigFileName[FILENAME_MAX];
1.1 root 256:
1.1.1.2 root 257: extern void Configuration_SetDefault(void);
1.1.1.5 root 258: extern void Configuration_WorkOnDetails(BOOL bReset);
1.1.1.6 root 259: extern void Configuration_Load(const char *psFileName);
1.1.1.3 root 260: extern void Configuration_Save(void);
261:
262: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.