Annotation of hatari/src/includes/configuration.h, revision 1.1.1.12

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.