|
|
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.3 ! root 11:
! 12: /* Configuration Dialog */
! 13: typedef struct
! 14: {
! 15: bool bShowConfigDialogAtStartup;
! 16: } CNF_CONFIGDLG;
! 17:
1.1 root 18: /* Logging and tracing */
19: typedef struct
20: {
21: char sLogFileName[FILENAME_MAX];
22: char sTraceFileName[FILENAME_MAX];
23: int nTextLogLevel;
24: int nAlertDlgLogLevel;
25: bool bConfirmQuit;
26: } CNF_LOG;
27:
28:
1.1.1.3 ! root 29: /* Debugger */
1.1 root 30: typedef struct
31: {
32: int nNumberBase;
33: int nDisasmLines;
34: int nMemdumpLines;
35: } CNF_DEBUGGER;
36:
37:
1.1.1.3 ! root 38: /* ROM configuration */
1.1 root 39: typedef struct
40: {
1.1.1.3 ! root 41: char szRom030FileName[FILENAME_MAX];
! 42: char szRom040FileName[FILENAME_MAX];
! 43: char szRomTurboFileName[FILENAME_MAX];
1.1 root 44: } CNF_ROM;
45:
46:
47: /* Sound configuration */
48: typedef struct
49: {
1.1.1.2 root 50: bool bEnableMicrophone;
1.1 root 51: bool bEnableSound;
52: int nPlaybackFreq;
53: int SdlAudioBufferSize;
1.1.1.2 root 54: char szYMCaptureFileName[FILENAME_MAX];
55: int YmVolumeMixing;
1.1 root 56: } CNF_SOUND;
57:
58:
59:
60: /* RS232 configuration */
61: typedef struct
62: {
63: bool bEnableRS232;
64: char szOutFileName[FILENAME_MAX];
65: char szInFileName[FILENAME_MAX];
66: } CNF_RS232;
67:
68:
69: /* Dialog Keyboard */
70: typedef enum
71: {
72: KEYMAP_SYMBOLIC, /* Use keymapping with symbolic (ASCII) key codes */
73: KEYMAP_SCANCODE, /* Use keymapping with PC keyboard scancodes */
74: KEYMAP_LOADED /* Use keymapping with a map configuration file */
75: } KEYMAPTYPE;
76:
77: typedef struct
78: {
79: bool bDisableKeyRepeat;
80: KEYMAPTYPE nKeymapType;
81: char szMappingFileName[FILENAME_MAX];
82: } CNF_KEYBOARD;
83:
84:
85: typedef enum {
86: SHORTCUT_OPTIONS,
87: SHORTCUT_FULLSCREEN,
88: SHORTCUT_MOUSEGRAB,
89: SHORTCUT_COLDRESET,
90: SHORTCUT_WARMRESET,
91: SHORTCUT_SCREENSHOT,
92: SHORTCUT_BOSSKEY,
93: SHORTCUT_CURSOREMU,
94: SHORTCUT_FASTFORWARD,
95: SHORTCUT_RECANIM,
96: SHORTCUT_RECSOUND,
97: SHORTCUT_SOUND,
98: SHORTCUT_DEBUG,
99: SHORTCUT_PAUSE,
100: SHORTCUT_QUIT,
101: SHORTCUT_LOADMEM,
102: SHORTCUT_SAVEMEM,
103: SHORTCUT_INSERTDISKA,
104: SHORTCUT_KEYS, /* number of shortcuts */
105: SHORTCUT_NONE
106: } SHORTCUTKEYIDX;
107:
108: typedef struct
109: {
110: int withModifier[SHORTCUT_KEYS];
111: int withoutModifier[SHORTCUT_KEYS];
112: } CNF_SHORTCUT;
113:
1.1.1.3 ! root 114: /* Memory configuration */
! 115:
! 116: typedef enum
! 117: {
! 118: MEMORY_120NS,
! 119: MEMORY_100NS,
! 120: MEMORY_80NS,
! 121: MEMORY_60NS
! 122: } MEMORY_SPEED;
1.1 root 123:
124: typedef struct
125: {
1.1.1.3 ! root 126: int nMemoryBankSize[4];
! 127: MEMORY_SPEED nMemorySpeed;
1.1 root 128: bool bAutoSave;
129: char szMemoryCaptureFileName[FILENAME_MAX];
130: char szAutoSaveFileName[FILENAME_MAX];
131: } CNF_MEMORY;
132:
133:
1.1.1.3 ! root 134: /* Dialog Boot options */
1.1 root 135:
1.1.1.3 ! root 136: typedef enum
1.1 root 137: {
1.1.1.3 ! root 138: BOOT_ROM,
! 139: BOOT_SCSI,
! 140: BOOT_ETHERNET,
! 141: BOOT_MO,
! 142: BOOT_FLOPPY
! 143: } BOOT_DEVICE;
1.1 root 144:
145: typedef struct
146: {
1.1.1.3 ! root 147: BOOT_DEVICE nBootDevice;
! 148: bool bEnableDRAMTest;
! 149: bool bEnablePot;
! 150: bool bExtendedPot;
! 151: bool bEnableSoundTest;
! 152: bool bEnableSCSITest;
! 153: bool bLoopPot;
! 154: bool bVerbose;
! 155: } CNF_BOOT;
1.1 root 156:
157:
158: /* Disk image configuration */
159:
160: typedef enum
161: {
162: WRITEPROT_OFF,
163: WRITEPROT_ON,
164: WRITEPROT_AUTO
165: } WRITEPROTECTION;
166:
167: #define MAX_FLOPPYDRIVES 2
168:
169: typedef struct
170: {
171: bool bAutoInsertDiskB;
172: bool bSlowFloppy; /* true to slow down FDC emulation */
173: WRITEPROTECTION nWriteProtection;
174: char szDiskZipPath[MAX_FLOPPYDRIVES][FILENAME_MAX];
175: char szDiskFileName[MAX_FLOPPYDRIVES][FILENAME_MAX];
176: char szDiskImageDirectory[FILENAME_MAX];
177: } CNF_DISKIMAGE;
178:
179:
180: /* Hard drives configuration */
181: #define MAX_HARDDRIVES 23
182:
183: typedef enum
184: {
185: DRIVE_C,
186: DRIVE_D,
187: DRIVE_E,
188: DRIVE_F
189: } DRIVELETTER;
190:
1.1.1.3 ! root 191: typedef struct {
! 192: char szImageName[FILENAME_MAX];
! 193: bool bAttached;
! 194: bool bCDROM;
! 195: } SCSIDISK;
! 196:
! 197: #define ESP_MAX_DEVS 7
1.1 root 198: typedef struct
199: {
1.1.1.3 ! root 200: SCSIDISK target[ESP_MAX_DEVS];
! 201:
1.1 root 202: WRITEPROTECTION nWriteProtection;
203: bool bBootFromHardDisk;
1.1.1.3 ! root 204: } CNF_SCSI;
1.1 root 205:
206: /* Falcon register $FFFF8006 bits 6 & 7 (mirrored in $FFFF82C0 bits 0 & 1):
207: * 00 Monochrome
208: * 01 RGB - Colormonitor
209: * 10 VGA - Colormonitor
210: * 11 TV
211: */
212: #define FALCON_MONITOR_MONO 0x00 /* SM124 */
213: #define FALCON_MONITOR_RGB 0x40
214: #define FALCON_MONITOR_VGA 0x80
215: #define FALCON_MONITOR_TV 0xC0
216:
217: typedef enum
218: {
219: MONITOR_TYPE_MONO,
220: MONITOR_TYPE_RGB,
221: MONITOR_TYPE_VGA,
222: MONITOR_TYPE_TV
223: } MONITORTYPE;
224:
225: /* Screen configuration */
226: typedef struct
227: {
228: MONITORTYPE nMonitorType;
229: int nFrameSkips;
230: bool bFullScreen;
1.1.1.2 root 231: bool bKeepResolution;
1.1 root 232: bool bAllowOverscan;
233: bool bAspectCorrect;
234: bool bUseExtVdiResolutions;
235: int nSpec512Threshold;
236: int nForceBpp;
237: int nVdiColors;
238: int nVdiWidth;
239: int nVdiHeight;
240: bool bShowStatusbar;
241: bool bShowDriveLed;
1.1.1.2 root 242: bool bCrop;
1.1 root 243: int nMaxWidth;
244: int nMaxHeight;
245: } CNF_SCREEN;
246:
247:
248: /* Printer configuration */
249: typedef struct
250: {
251: bool bEnablePrinting;
252: bool bPrintToFile;
253: char szPrintToFileName[FILENAME_MAX];
254: } CNF_PRINTER;
255:
256:
257: /* Midi configuration */
258: typedef struct
259: {
260: bool bEnableMidi;
261: char sMidiInFileName[FILENAME_MAX];
262: char sMidiOutFileName[FILENAME_MAX];
263: } CNF_MIDI;
264:
265:
266: /* Dialog System */
267: typedef enum
268: {
1.1.1.3 ! root 269: NEXT_CUBE030,
! 270: NEXT_CUBE040,
! 271: NEXT_STATION
1.1 root 272: } MACHINETYPE;
273:
274: typedef enum
275: {
1.1.1.3 ! root 276: NCR53C90,
! 277: NCR53C90A
! 278: } SCSICHIP;
! 279:
! 280: typedef enum
! 281: {
! 282: MC68HC68T1,
! 283: MCS1850
! 284: } RTCCHIP;
! 285:
! 286: typedef enum
! 287: {
1.1 root 288: DSP_TYPE_NONE,
289: DSP_TYPE_DUMMY,
290: DSP_TYPE_EMU
291: } DSPTYPE;
292:
1.1.1.2 root 293: #if ENABLE_WINUAE_CPU
294: typedef enum
295: {
1.1.1.3 ! root 296: FPU_NONE = 0,
! 297: FPU_68881 = 68881,
! 298: FPU_68882 = 68882,
! 299: FPU_CPU = 68040
1.1.1.2 root 300: } FPUTYPE;
301: #endif
302:
1.1 root 303: typedef struct
304: {
1.1.1.3 ! root 305: bool bColor;
! 306: bool bTurbo;
! 307: bool bADB;
! 308: SCSICHIP nSCSI;
! 309: RTCCHIP nRTC;
1.1 root 310: int nCpuLevel;
311: int nCpuFreq;
1.1.1.2 root 312: bool bCompatibleCpu; /* Prefetch mode */
1.1 root 313: MACHINETYPE nMachineType;
314: bool bBlitter; /* TRUE if Blitter is enabled */
315: DSPTYPE nDSPType; /* how to "emulate" DSP */
316: bool bRealTimeClock;
317: bool bPatchTimerD;
318: bool bFastForward;
1.1.1.2 root 319:
320: #if ENABLE_WINUAE_CPU
321: bool bAddressSpace24;
322: bool bCycleExactCpu;
323: FPUTYPE n_FPUType;
324: bool bCompatibleFPU; /* More compatible FPU */
325: bool bMMU; /* TRUE if MMU is enabled */
326: #endif
327:
1.1 root 328: } CNF_SYSTEM;
329:
1.1.1.2 root 330: typedef struct
331: {
332: int AviRecordVcodec;
333: int AviRecordFps;
334: char AviRecordFile[FILENAME_MAX];
335: } CNF_VIDEO;
336:
337:
1.1 root 338:
339: /* State of system is stored in this structure */
340: /* On reset, variables are copied into system globals and used. */
341: typedef struct
342: {
343: /* Configure */
1.1.1.3 ! root 344: CNF_CONFIGDLG ConfigDialog;
1.1 root 345: CNF_LOG Log;
346: CNF_DEBUGGER Debugger;
347: CNF_SCREEN Screen;
348: CNF_KEYBOARD Keyboard;
349: CNF_SHORTCUT Shortcut;
350: CNF_SOUND Sound;
351: CNF_MEMORY Memory;
352: CNF_DISKIMAGE DiskImage;
1.1.1.3 ! root 353: CNF_BOOT Boot;
! 354: CNF_SCSI SCSI;
1.1 root 355: CNF_ROM Rom;
356: CNF_RS232 RS232;
357: CNF_PRINTER Printer;
358: CNF_MIDI Midi;
359: CNF_SYSTEM System;
1.1.1.2 root 360: CNF_VIDEO Video;
1.1 root 361: } CNF_PARAMS;
362:
363:
364: extern CNF_PARAMS ConfigureParams;
365: extern char sConfigFileName[FILENAME_MAX];
366:
367: extern void Configuration_SetDefault(void);
368: extern void Configuration_Apply(bool bReset);
1.1.1.3 ! root 369: extern int Configuration_CheckMemory(int *banksize);
1.1 root 370: extern void Configuration_Load(const char *psFileName);
371: extern void Configuration_Save(void);
372: extern void Configuration_MemorySnapShot_Capture(bool bSave);
373:
374: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.