|
|
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:
1.1.1.5 ! root 11: #include <stdio.h>
! 12:
! 13: #define ENABLE_TESTING 0
1.1.1.3 root 14:
15: /* Configuration Dialog */
16: typedef struct
17: {
18: bool bShowConfigDialogAtStartup;
19: } CNF_CONFIGDLG;
20:
1.1 root 21: /* Logging and tracing */
22: typedef struct
23: {
24: char sLogFileName[FILENAME_MAX];
25: char sTraceFileName[FILENAME_MAX];
26: int nTextLogLevel;
27: int nAlertDlgLogLevel;
28: bool bConfirmQuit;
29: } CNF_LOG;
30:
31:
1.1.1.3 root 32: /* Debugger */
1.1 root 33: typedef struct
34: {
35: int nNumberBase;
36: int nDisasmLines;
37: int nMemdumpLines;
38: } CNF_DEBUGGER;
39:
40:
1.1.1.3 root 41: /* ROM configuration */
1.1 root 42: typedef struct
43: {
1.1.1.3 root 44: char szRom030FileName[FILENAME_MAX];
45: char szRom040FileName[FILENAME_MAX];
46: char szRomTurboFileName[FILENAME_MAX];
1.1 root 47: } CNF_ROM;
48:
49:
50: /* Sound configuration */
51: typedef struct
52: {
1.1.1.2 root 53: bool bEnableMicrophone;
1.1 root 54: bool bEnableSound;
55: } CNF_SOUND;
56:
57: /* Dialog Keyboard */
58: typedef enum
59: {
60: KEYMAP_SYMBOLIC, /* Use keymapping with symbolic (ASCII) key codes */
61: KEYMAP_SCANCODE, /* Use keymapping with PC keyboard scancodes */
62: KEYMAP_LOADED /* Use keymapping with a map configuration file */
63: } KEYMAPTYPE;
64:
65: typedef struct
66: {
1.1.1.4 root 67: bool bSwapCmdAlt;
1.1 root 68: KEYMAPTYPE nKeymapType;
69: char szMappingFileName[FILENAME_MAX];
70: } CNF_KEYBOARD;
71:
72:
73: typedef enum {
74: SHORTCUT_OPTIONS,
75: SHORTCUT_FULLSCREEN,
76: SHORTCUT_MOUSEGRAB,
77: SHORTCUT_COLDRESET,
78: SHORTCUT_WARMRESET,
79: SHORTCUT_CURSOREMU,
80: SHORTCUT_SOUND,
1.1.1.5 ! root 81: SHORTCUT_DEBUG_M68K,
! 82: SHORTCUT_DEBUG_I860,
1.1 root 83: SHORTCUT_PAUSE,
84: SHORTCUT_QUIT,
1.1.1.4 root 85: SHORTCUT_DIMENSION,
1.1 root 86: SHORTCUT_KEYS, /* number of shortcuts */
87: SHORTCUT_NONE
88: } SHORTCUTKEYIDX;
89:
90: typedef struct
91: {
92: int withModifier[SHORTCUT_KEYS];
93: int withoutModifier[SHORTCUT_KEYS];
94: } CNF_SHORTCUT;
95:
1.1.1.4 root 96:
97: /* Dialog Mouse */
98: #define MOUSE_LIN_MIN 0.1
99: #define MOUSE_LIN_MAX 10.0
100: #define MOUSE_EXP_MIN 0.5
101: #define MOUSE_EXP_MAX 1.0
102: typedef struct
103: {
104: bool bEnableAutoGrab;
105: float fLinSpeedNormal;
106: float fLinSpeedLocked;
107: float fExpSpeedNormal;
108: float fExpSpeedLocked;
109: } CNF_MOUSE;
110:
111:
1.1.1.3 root 112: /* Memory configuration */
113:
114: typedef enum
115: {
116: MEMORY_120NS,
117: MEMORY_100NS,
118: MEMORY_80NS,
119: MEMORY_60NS
120: } MEMORY_SPEED;
1.1 root 121:
122: typedef struct
123: {
1.1.1.3 root 124: int nMemoryBankSize[4];
125: MEMORY_SPEED nMemorySpeed;
1.1 root 126: } CNF_MEMORY;
127:
128:
1.1.1.3 root 129: /* Dialog Boot options */
1.1 root 130:
1.1.1.3 root 131: typedef enum
1.1 root 132: {
1.1.1.3 root 133: BOOT_ROM,
134: BOOT_SCSI,
135: BOOT_ETHERNET,
136: BOOT_MO,
137: BOOT_FLOPPY
138: } BOOT_DEVICE;
1.1 root 139:
140: typedef struct
141: {
1.1.1.3 root 142: BOOT_DEVICE nBootDevice;
143: bool bEnableDRAMTest;
144: bool bEnablePot;
145: bool bExtendedPot;
146: bool bEnableSoundTest;
147: bool bEnableSCSITest;
148: bool bLoopPot;
149: bool bVerbose;
150: } CNF_BOOT;
1.1 root 151:
152:
1.1.1.4 root 153: /* Hard drives configuration */
154: #define ESP_MAX_DEVS 7
155: typedef enum {
156: DEVTYPE_NONE,
157: DEVTYPE_HARDDISK,
158: DEVTYPE_CD,
159: DEVTYPE_FLOPPY,
160: NUM_DEVTYPES
161: } SCSI_DEVTYPE;
1.1 root 162:
1.1.1.4 root 163: typedef struct {
164: char szImageName[FILENAME_MAX];
165: SCSI_DEVTYPE nDeviceType;
166: bool bDiskInserted;
167: bool bWriteProtected;
168: } SCSIDISK;
1.1 root 169:
1.1.1.5 ! root 170: typedef enum
! 171: {
! 172: WRITEPROT_OFF,
! 173: WRITEPROT_ON,
! 174: WRITEPROT_AUTO
! 175: } WRITEPROTECTION;
! 176:
1.1.1.4 root 177: typedef struct {
178: SCSIDISK target[ESP_MAX_DEVS];
1.1.1.5 ! root 179: int nWriteProtection;
1.1.1.4 root 180: } CNF_SCSI;
1.1 root 181:
182:
1.1.1.4 root 183: /* Magneto-optical drives configuration */
184: #define MO_MAX_DRIVES 2
185: typedef struct {
186: char szImageName[FILENAME_MAX];
187: bool bDriveConnected;
188: bool bDiskInserted;
189: bool bWriteProtected;
190: } MODISK;
191:
192: typedef struct {
193: MODISK drive[MO_MAX_DRIVES];
194: } CNF_MO;
1.1 root 195:
196:
1.1.1.4 root 197: /* Floppy disk drives configuration */
198: #define FLP_MAX_DRIVES 2
1.1.1.3 root 199: typedef struct {
1.1.1.4 root 200: char szImageName[FILENAME_MAX];
201: bool bDriveConnected;
202: bool bDiskInserted;
203: bool bWriteProtected;
204: } FLPDISK;
205:
206: typedef struct {
207: FLPDISK drive[FLP_MAX_DRIVES];
208: } CNF_FLOPPY;
209:
210:
211: /* Ethernet configuration */
212: typedef struct {
213: bool bEthernetConnected;
1.1.1.5 ! root 214: bool bTwistedPair;
1.1.1.4 root 215: } CNF_ENET;
1.1.1.3 root 216:
1.1 root 217: typedef enum
218: {
1.1.1.4 root 219: MONITOR_TYPE_DUAL,
220: MONITOR_TYPE_CPU,
221: MONITOR_TYPE_DIMENSION,
1.1 root 222: } MONITORTYPE;
223:
224: /* Screen configuration */
225: typedef struct
226: {
227: MONITORTYPE nMonitorType;
228: bool bFullScreen;
229: bool bShowStatusbar;
230: bool bShowDriveLed;
231: } CNF_SCREEN;
232:
233:
234: /* Printer configuration */
1.1.1.4 root 235: typedef enum
236: {
237: PAPER_A4,
238: PAPER_LETTER,
239: PAPER_B5,
240: PAPER_LEGAL
241: } PAPER_SIZE;
242:
1.1 root 243: typedef struct
244: {
1.1.1.4 root 245: bool bPrinterConnected;
246: PAPER_SIZE nPaperSize;
1.1 root 247: char szPrintToFileName[FILENAME_MAX];
248: } CNF_PRINTER;
249:
250: /* Dialog System */
251: typedef enum
252: {
1.1.1.3 root 253: NEXT_CUBE030,
254: NEXT_CUBE040,
255: NEXT_STATION
1.1 root 256: } MACHINETYPE;
257:
258: typedef enum
259: {
1.1.1.3 root 260: NCR53C90,
261: NCR53C90A
262: } SCSICHIP;
263:
264: typedef enum
265: {
266: MC68HC68T1,
1.1.1.4 root 267: MCCS1850
1.1.1.3 root 268: } RTCCHIP;
269:
270: typedef enum
271: {
1.1 root 272: DSP_TYPE_NONE,
273: DSP_TYPE_DUMMY,
274: DSP_TYPE_EMU
275: } DSPTYPE;
276:
1.1.1.2 root 277: typedef enum
278: {
1.1.1.3 root 279: FPU_NONE = 0,
280: FPU_68881 = 68881,
281: FPU_68882 = 68882,
282: FPU_CPU = 68040
1.1.1.2 root 283: } FPUTYPE;
284:
1.1 root 285: typedef struct
286: {
1.1.1.3 root 287: bool bColor;
288: bool bTurbo;
1.1.1.4 root 289: bool bNBIC;
1.1.1.3 root 290: SCSICHIP nSCSI;
291: RTCCHIP nRTC;
1.1 root 292: int nCpuLevel;
293: int nCpuFreq;
1.1.1.2 root 294: bool bCompatibleCpu; /* Prefetch mode */
1.1 root 295: MACHINETYPE nMachineType;
1.1.1.5 ! root 296: bool bRealtime; /* TRUE if realtime sources shoud be used */
1.1 root 297: DSPTYPE nDSPType; /* how to "emulate" DSP */
1.1.1.4 root 298: bool bDSPMemoryExpansion;
1.1 root 299: bool bRealTimeClock;
1.1.1.2 root 300: FPUTYPE n_FPUType;
301: bool bCompatibleFPU; /* More compatible FPU */
302: bool bMMU; /* TRUE if MMU is enabled */
1.1 root 303: } CNF_SYSTEM;
304:
1.1.1.2 root 305: typedef struct
306: {
1.1.1.4 root 307: bool bEnabled;
1.1.1.5 ! root 308: bool bI860Thread;
! 309: bool bMainDisplay;
! 310: int nMemoryBankSize[4];
1.1.1.4 root 311: char szRomFileName[FILENAME_MAX];
312: } CNF_ND;
313:
1.1 root 314: /* State of system is stored in this structure */
315: /* On reset, variables are copied into system globals and used. */
316: typedef struct
317: {
318: /* Configure */
1.1.1.3 root 319: CNF_CONFIGDLG ConfigDialog;
1.1.1.5 ! root 320: CNF_LOG Log;
! 321: CNF_DEBUGGER Debugger;
! 322: CNF_SCREEN Screen;
! 323: CNF_KEYBOARD Keyboard;
! 324: CNF_SHORTCUT Shortcut;
! 325: CNF_MOUSE Mouse;
! 326: CNF_SOUND Sound;
! 327: CNF_MEMORY Memory;
! 328: CNF_BOOT Boot;
! 329: CNF_SCSI SCSI;
! 330: CNF_MO MO;
! 331: CNF_FLOPPY Floppy;
! 332: CNF_ENET Ethernet;
! 333: CNF_ROM Rom;
! 334: CNF_PRINTER Printer;
! 335: CNF_SYSTEM System;
! 336: CNF_ND Dimension;
1.1 root 337: } CNF_PARAMS;
338:
339:
340: extern CNF_PARAMS ConfigureParams;
341: extern char sConfigFileName[FILENAME_MAX];
342:
1.1.1.5 ! root 343: void Configuration_SetDefault(void);
! 344: void Configuration_SetSystemDefaults(void);
! 345: void Configuration_Apply(bool bReset);
! 346: int Configuration_CheckMemory(int *banksize);
! 347: int Configuration_CheckDimensionMemory(int *banksize);
! 348: void Configuration_CheckDimensionSettings(void);
! 349: void Configuration_CheckEthernetSettings();
! 350: void Configuration_Load(const char *psFileName);
! 351: void Configuration_Save(void);
! 352: void Configuration_MemorySnapShot_Capture(bool bSave);
1.1 root 353:
354: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.