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

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

unix.superglobalmegacorp.com

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