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

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

unix.superglobalmegacorp.com

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