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

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

unix.superglobalmegacorp.com

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