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

1.1       root        1: /*
1.1.1.3   root        2:   Hatari - configuration.h
                      3: 
1.1.1.17  root        4:   This file is distributed under the GNU General Public License, version 2
                      5:   or at 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.19  root       11: /* if header's struct contents depend on configuration options, header must include config.h */
                     12: #include "config.h"
                     13: 
1.1.1.13  root       14: /* Logging and tracing */
1.1.1.6   root       15: typedef struct
                     16: {
                     17:   char sLogFileName[FILENAME_MAX];
1.1.1.10  root       18:   char sTraceFileName[FILENAME_MAX];
1.1.1.6   root       19:   int nTextLogLevel;
                     20:   int nAlertDlgLogLevel;
1.1.1.10  root       21:   bool bConfirmQuit;
1.1.1.17  root       22:   bool bNatFeats;
                     23:   bool bConsoleWindow; /* for now, used just for Windows */
1.1.1.6   root       24: } CNF_LOG;
                     25: 
                     26: 
1.1.1.13  root       27: /* debugger */
                     28: typedef struct
                     29: {
                     30:   int nNumberBase;
1.1.1.21  root       31:   int nSymbolLines;
1.1.1.13  root       32:   int nMemdumpLines;
1.1.1.21  root       33:   int nDisasmLines;
                     34:   int nExceptionDebugMask;
1.1.1.17  root       35:   int nDisasmOptions;
                     36:   bool bDisasmUAE;
1.1.1.21  root       37:   /* load symbols immediately on program start, and keep them after its termination */
                     38:   bool bSymbolsResident;
                     39:   /* whether to match all symbols or just types relevant for given command */
                     40:   bool bMatchAllSymbols;
1.1.1.13  root       41: } CNF_DEBUGGER;
                     42: 
                     43: 
1.1.1.5   root       44: /* ROM (TOS + cartridge) configuration */
1.1.1.3   root       45: typedef struct
                     46: {
1.1.1.5   root       47:   char szTosImageFileName[FILENAME_MAX];
1.1.1.15  root       48:   bool bPatchTos;
1.1.1.5   root       49:   char szCartridgeImageFileName[FILENAME_MAX];
                     50: } CNF_ROM;
1.1.1.3   root       51: 
                     52: 
                     53: /* Sound configuration */
                     54: typedef struct
                     55: {
1.1.1.14  root       56:   bool bEnableMicrophone;
1.1.1.10  root       57:   bool bEnableSound;
1.1.1.16  root       58:   bool bEnableSoundSync;
1.1.1.12  root       59:   int nPlaybackFreq;
1.1.1.13  root       60:   int SdlAudioBufferSize;
1.1.1.14  root       61:   char szYMCaptureFileName[FILENAME_MAX];
                     62:   int YmVolumeMixing;
1.1.1.3   root       63: } CNF_SOUND;
                     64: 
                     65: 
                     66: 
1.1.1.4   root       67: /* RS232 configuration */
1.1.1.3   root       68: typedef struct
                     69: {
1.1.1.10  root       70:   bool bEnableRS232;
1.1.1.22! root       71:   bool bEnableSccB;
1.1.1.4   root       72:   char szOutFileName[FILENAME_MAX];
                     73:   char szInFileName[FILENAME_MAX];
1.1.1.22! root       74:   char sSccBInFileName[FILENAME_MAX];
        !            75:   char sSccBOutFileName[FILENAME_MAX];
1.1.1.3   root       76: } CNF_RS232;
                     77: 
                     78: 
                     79: /* Dialog Keyboard */
                     80: typedef enum
                     81: {
                     82:   KEYMAP_SYMBOLIC,  /* Use keymapping with symbolic (ASCII) key codes */
                     83:   KEYMAP_SCANCODE,  /* Use keymapping with PC keyboard scancodes */
                     84:   KEYMAP_LOADED     /* Use keymapping with a map configuration file */
                     85: } KEYMAPTYPE;
                     86: 
                     87: typedef struct
                     88: {
1.1.1.10  root       89:   bool bDisableKeyRepeat;
1.1.1.3   root       90:   KEYMAPTYPE nKeymapType;
1.1.1.4   root       91:   char szMappingFileName[FILENAME_MAX];
1.1.1.3   root       92: } CNF_KEYBOARD;
                     93: 
                     94: 
1.1.1.8   root       95: typedef enum {
                     96:   SHORTCUT_OPTIONS,
                     97:   SHORTCUT_FULLSCREEN,
1.1.1.21  root       98:   SHORTCUT_BORDERS,
1.1.1.13  root       99:   SHORTCUT_MOUSEGRAB,
1.1.1.8   root      100:   SHORTCUT_COLDRESET,
                    101:   SHORTCUT_WARMRESET,
                    102:   SHORTCUT_SCREENSHOT,
                    103:   SHORTCUT_BOSSKEY,
                    104:   SHORTCUT_CURSOREMU,
1.1.1.10  root      105:   SHORTCUT_FASTFORWARD,
1.1.1.8   root      106:   SHORTCUT_RECANIM,
                    107:   SHORTCUT_RECSOUND,
                    108:   SHORTCUT_SOUND,
1.1.1.12  root      109:   SHORTCUT_DEBUG,
1.1.1.10  root      110:   SHORTCUT_PAUSE,
1.1.1.8   root      111:   SHORTCUT_QUIT,
1.1.1.9   root      112:   SHORTCUT_LOADMEM,
                    113:   SHORTCUT_SAVEMEM,
1.1.1.10  root      114:   SHORTCUT_INSERTDISKA,
1.1.1.19  root      115:   SHORTCUT_JOY_0,
                    116:   SHORTCUT_JOY_1,
                    117:   SHORTCUT_PAD_A,
                    118:   SHORTCUT_PAD_B,
1.1.1.8   root      119:   SHORTCUT_KEYS,  /* number of shortcuts */
                    120:   SHORTCUT_NONE
                    121: } SHORTCUTKEYIDX;
                    122: 
                    123: typedef struct
                    124: {
                    125:   int withModifier[SHORTCUT_KEYS];
                    126:   int withoutModifier[SHORTCUT_KEYS];
                    127: } CNF_SHORTCUT;
                    128: 
                    129: 
1.1.1.3   root      130: typedef struct
                    131: {
1.1.1.21  root      132:   int STRamSize_KB;
                    133:   int TTRamSize_KB;
1.1.1.10  root      134:   bool bAutoSave;
1.1.1.4   root      135:   char szMemoryCaptureFileName[FILENAME_MAX];
1.1.1.9   root      136:   char szAutoSaveFileName[FILENAME_MAX];
1.1.1.3   root      137: } CNF_MEMORY;
                    138: 
                    139: 
                    140: /* Joystick configuration */
1.1.1.7   root      141: typedef enum
                    142: {
                    143:   JOYSTICK_DISABLED,
                    144:   JOYSTICK_REALSTICK,
                    145:   JOYSTICK_KEYBOARD
                    146: } JOYSTICKMODE;
1.1.1.19  root      147: #define JOYSTICK_MODES 3
1.1.1.7   root      148: 
1.1.1.3   root      149: typedef struct
                    150: {
1.1.1.7   root      151:   JOYSTICKMODE nJoystickMode;
1.1.1.10  root      152:   bool bEnableAutoFire;
1.1.1.12  root      153:   bool bEnableJumpOnFire2;
1.1.1.7   root      154:   int nJoyId;
                    155:   int nKeyCodeUp, nKeyCodeDown, nKeyCodeLeft, nKeyCodeRight, nKeyCodeFire;
1.1.1.3   root      156: } JOYSTICK;
                    157: 
1.1.1.19  root      158: enum
                    159: {
                    160:        JOYID_JOYSTICK0,
                    161:        JOYID_JOYSTICK1,
                    162:        JOYID_STEPADA,
                    163:        JOYID_STEPADB,
                    164:        JOYID_PARPORT1,
                    165:        JOYID_PARPORT2,
                    166:        JOYSTICK_COUNT
                    167: };
1.1.1.8   root      168: 
1.1.1.3   root      169: typedef struct
                    170: {
1.1.1.8   root      171:   JOYSTICK Joy[JOYSTICK_COUNT];
1.1.1.3   root      172: } CNF_JOYSTICKS;
                    173: 
                    174: 
1.1.1.7   root      175: /* Disk image configuration */
1.1.1.6   root      176: 
                    177: typedef enum
                    178: {
                    179:   WRITEPROT_OFF,
                    180:   WRITEPROT_ON,
                    181:   WRITEPROT_AUTO
                    182: } WRITEPROTECTION;
                    183: 
1.1.1.10  root      184: #define MAX_FLOPPYDRIVES 2
                    185: 
1.1.1.3   root      186: typedef struct
                    187: {
1.1.1.10  root      188:   bool bAutoInsertDiskB;
1.1.1.15  root      189:   bool FastFloppy;                     /* true to speed up FDC emulation */
1.1.1.18  root      190:   bool EnableDriveA;
                    191:   bool EnableDriveB;
                    192:   int  DriveA_NumberOfHeads;
                    193:   int  DriveB_NumberOfHeads;
1.1.1.6   root      194:   WRITEPROTECTION nWriteProtection;
1.1.1.10  root      195:   char szDiskZipPath[MAX_FLOPPYDRIVES][FILENAME_MAX];
                    196:   char szDiskFileName[MAX_FLOPPYDRIVES][FILENAME_MAX];
1.1.1.7   root      197:   char szDiskImageDirectory[FILENAME_MAX];
                    198: } CNF_DISKIMAGE;
1.1.1.3   root      199: 
                    200: 
1.1.1.15  root      201: /* Hard drives configuration: C: - Z: */
                    202: #define MAX_HARDDRIVES  24
                    203: #define DRIVE_C 0
1.1.1.19  root      204: #define DRIVE_SKIP -1
1.1.1.3   root      205: 
1.1.1.17  root      206: typedef enum
                    207: {
                    208:   GEMDOS_NOP,
                    209:   GEMDOS_UPPER,
                    210:   GEMDOS_LOWER
                    211: } GEMDOS_CHR_CONV;
                    212: 
1.1.1.3   root      213: typedef struct
                    214: {
1.1.1.19  root      215:   int nGemdosDrive;
1.1.1.10  root      216:   bool bUseHardDiskDirectories;
1.1.1.13  root      217:   WRITEPROTECTION nWriteProtection;
1.1.1.17  root      218:   GEMDOS_CHR_CONV nGemdosCase;
1.1.1.19  root      219:   bool bFilenameConversion;
1.1.1.21  root      220:   bool bGemdosHostTime;
1.1.1.13  root      221:   bool bBootFromHardDisk;
1.1.1.7   root      222:   char szHardDiskDirectories[MAX_HARDDRIVES][FILENAME_MAX];
                    223: } CNF_HARDDISK;
1.1.1.3   root      224: 
1.1.1.22! root      225: /* SCSI/ACSI/IDE configuration */
1.1.1.18  root      226: #define MAX_ACSI_DEVS 8
1.1.1.19  root      227: #define MAX_SCSI_DEVS 8
1.1.1.22! root      228: #define MAX_IDE_DEVS 2
1.1.1.18  root      229: 
                    230: typedef struct
                    231: {
                    232:   bool bUseDevice;
                    233:   char sDeviceFile[FILENAME_MAX];
1.1.1.22! root      234:   int nBlockSize;
1.1.1.18  root      235: } CNF_SCSIDEV;
                    236: 
1.1.1.22! root      237: typedef enum
        !           238: {
        !           239:   BYTESWAP_OFF,
        !           240:   BYTESWAP_ON,
        !           241:   BYTESWAP_AUTO
        !           242: } BYTESWAPPING;
        !           243: 
        !           244: typedef struct
        !           245: {
        !           246:   bool bUseDevice;
        !           247:   BYTESWAPPING nByteSwap;
        !           248:   char sDeviceFile[FILENAME_MAX];
        !           249:   int nBlockSize;
        !           250:   int nDeviceType;
        !           251: } CNF_IDEDEV;
        !           252: 
1.1.1.9   root      253: /* Falcon register $FFFF8006 bits 6 & 7 (mirrored in $FFFF82C0 bits 0 & 1):
                    254:  * 00 Monochrome
                    255:  * 01 RGB - Colormonitor
                    256:  * 10 VGA - Colormonitor
                    257:  * 11 TV
                    258:  */
                    259: #define FALCON_MONITOR_MONO 0x00  /* SM124 */
                    260: #define FALCON_MONITOR_RGB  0x40
                    261: #define FALCON_MONITOR_VGA  0x80
                    262: #define FALCON_MONITOR_TV   0xC0
                    263: 
                    264: typedef enum
                    265: {
                    266:   MONITOR_TYPE_MONO,
                    267:   MONITOR_TYPE_RGB,
                    268:   MONITOR_TYPE_VGA,
                    269:   MONITOR_TYPE_TV
                    270: } MONITORTYPE;
1.1.1.3   root      271: 
                    272: /* Screen configuration */
                    273: typedef struct
                    274: {
1.1.1.10  root      275:   MONITORTYPE nMonitorType;
                    276:   int nFrameSkips;
                    277:   bool bFullScreen;
1.1.1.14  root      278:   bool bKeepResolution;
1.1.1.21  root      279: #if WITH_SDL2
                    280:   bool bResizable;
                    281: #else
1.1.1.15  root      282:   bool bKeepResolutionST;
1.1.1.20  root      283: #endif
1.1.1.10  root      284:   bool bAllowOverscan;
1.1.1.13  root      285:   bool bAspectCorrect;
1.1.1.10  root      286:   bool bUseExtVdiResolutions;
1.1.1.9   root      287:   int nSpec512Threshold;
                    288:   int nForceBpp;
1.1.1.5   root      289:   int nVdiColors;
1.1.1.9   root      290:   int nVdiWidth;
                    291:   int nVdiHeight;
1.1.1.19  root      292:   bool bMouseWarp;
1.1.1.10  root      293:   bool bShowStatusbar;
                    294:   bool bShowDriveLed;
1.1.1.14  root      295:   bool bCrop;
1.1.1.15  root      296:   bool bForceMax;
1.1.1.13  root      297:   int nMaxWidth;
                    298:   int nMaxHeight;
1.1.1.19  root      299: #if WITH_SDL2
1.1.1.21  root      300:   bool bUseSdlRenderer;
1.1.1.19  root      301:   int nRenderScaleQuality;
                    302:   bool bUseVsync;
                    303: #endif
1.1.1.21  root      304:   bool DisableVideo;
1.1.1.3   root      305: } CNF_SCREEN;
                    306: 
                    307: 
                    308: /* Printer configuration */
                    309: typedef struct
                    310: {
1.1.1.10  root      311:   bool bEnablePrinting;
1.1.1.4   root      312:   char szPrintToFileName[FILENAME_MAX];
1.1.1.3   root      313: } CNF_PRINTER;
                    314: 
                    315: 
1.1.1.4   root      316: /* Midi configuration */
                    317: typedef struct
                    318: {
1.1.1.10  root      319:   bool bEnableMidi;
1.1.1.11  root      320:   char sMidiInFileName[FILENAME_MAX];
                    321:   char sMidiOutFileName[FILENAME_MAX];
1.1.1.21  root      322:   char sMidiInPortName[FILENAME_MAX];
                    323:   char sMidiOutPortName[FILENAME_MAX];
1.1.1.4   root      324: } CNF_MIDI;
                    325: 
                    326: 
1.1.1.3   root      327: /* Dialog System */
                    328: typedef enum
                    329: {
1.1.1.6   root      330:   MACHINE_ST,
1.1.1.20  root      331:   MACHINE_MEGA_ST,
1.1.1.8   root      332:   MACHINE_STE,
1.1.1.20  root      333:   MACHINE_MEGA_STE,
1.1.1.9   root      334:   MACHINE_TT,
1.1.1.20  root      335:   MACHINE_FALCON
1.1.1.6   root      336: } MACHINETYPE;
                    337: 
1.1.1.9   root      338: typedef enum
                    339: {
                    340:   DSP_TYPE_NONE,
                    341:   DSP_TYPE_DUMMY,
                    342:   DSP_TYPE_EMU
                    343: } DSPTYPE;
                    344: 
1.1.1.14  root      345: #if ENABLE_WINUAE_CPU
                    346: typedef enum
                    347: {
1.1.1.16  root      348:   FPU_NONE = 0,
                    349:   FPU_68881 = 68881,
                    350:   FPU_68882 = 68882,
                    351:   FPU_CPU = 68040
1.1.1.14  root      352: } FPUTYPE;
                    353: #endif
                    354: 
1.1.1.20  root      355: typedef enum
                    356: {
                    357:   VIDEO_TIMING_MODE_RANDOM = 0,
                    358:   VIDEO_TIMING_MODE_WS1,
                    359:   VIDEO_TIMING_MODE_WS2,
                    360:   VIDEO_TIMING_MODE_WS3,
                    361:   VIDEO_TIMING_MODE_WS4,
                    362: } VIDEOTIMINGMODE;
                    363: 
1.1.1.3   root      364: typedef struct
                    365: {
                    366:   int nCpuLevel;
1.1.1.6   root      367:   int nCpuFreq;
1.1.1.14  root      368:   bool bCompatibleCpu;            /* Prefetch mode */
1.1.1.6   root      369:   MACHINETYPE nMachineType;
1.1.1.10  root      370:   bool bBlitter;                  /* TRUE if Blitter is enabled */
1.1.1.9   root      371:   DSPTYPE nDSPType;               /* how to "emulate" DSP */
1.1.1.10  root      372:   bool bPatchTimerD;
1.1.1.15  root      373:   bool bFastBoot;                 /* Enable to patch TOS for fast boot */
1.1.1.10  root      374:   bool bFastForward;
1.1.1.19  root      375:   bool bAddressSpace24;           /* Always set to true with old UAE cpu */
1.1.1.20  root      376:   VIDEOTIMINGMODE VideoTimingMode;
1.1.1.15  root      377: 
1.1.1.14  root      378: #if ENABLE_WINUAE_CPU
                    379:   bool bCycleExactCpu;
                    380:   FPUTYPE n_FPUType;
                    381:   bool bCompatibleFPU;            /* More compatible FPU */
1.1.1.21  root      382:   bool bSoftFloatFPU;
1.1.1.14  root      383:   bool bMMU;                      /* TRUE if MMU is enabled */
                    384: #endif
1.1.1.3   root      385: } CNF_SYSTEM;
                    386: 
1.1.1.14  root      387: typedef struct
                    388: {
                    389:   int AviRecordVcodec;
                    390:   int AviRecordFps;
                    391:   char AviRecordFile[FILENAME_MAX];
                    392: } CNF_VIDEO;
1.1.1.3   root      393: 
                    394: /* State of system is stored in this structure */
                    395: /* On reset, variables are copied into system globals and used. */
                    396: typedef struct
                    397: {
                    398:   /* Configure */
1.1.1.6   root      399:   CNF_LOG Log;
1.1.1.13  root      400:   CNF_DEBUGGER Debugger;
1.1.1.3   root      401:   CNF_SCREEN Screen;
                    402:   CNF_JOYSTICKS Joysticks;
                    403:   CNF_KEYBOARD Keyboard;
1.1.1.8   root      404:   CNF_SHORTCUT Shortcut;
1.1.1.3   root      405:   CNF_SOUND Sound;
                    406:   CNF_MEMORY Memory;
1.1.1.7   root      407:   CNF_DISKIMAGE DiskImage;
                    408:   CNF_HARDDISK HardDisk;
1.1.1.18  root      409:   CNF_SCSIDEV Acsi[MAX_ACSI_DEVS];
1.1.1.19  root      410:   CNF_SCSIDEV Scsi[MAX_SCSI_DEVS];
1.1.1.22! root      411:   CNF_IDEDEV Ide[MAX_IDE_DEVS];
1.1.1.5   root      412:   CNF_ROM Rom;
1.1.1.3   root      413:   CNF_RS232 RS232;
                    414:   CNF_PRINTER Printer;
1.1.1.4   root      415:   CNF_MIDI Midi;
1.1.1.3   root      416:   CNF_SYSTEM System;
1.1.1.14  root      417:   CNF_VIDEO Video;
1.1.1.3   root      418: } CNF_PARAMS;
                    419: 
                    420: 
                    421: extern CNF_PARAMS ConfigureParams;
1.1.1.4   root      422: extern char sConfigFileName[FILENAME_MAX];
1.1       root      423: 
1.1.1.20  root      424: static inline bool Config_IsMachineST(void)
                    425: {
                    426:        return ConfigureParams.System.nMachineType == MACHINE_ST ||
                    427:               ConfigureParams.System.nMachineType == MACHINE_MEGA_ST;
                    428: }
                    429: 
                    430: static inline bool Config_IsMachineSTE(void)
                    431: {
                    432:        return ConfigureParams.System.nMachineType == MACHINE_STE ||
                    433:               ConfigureParams.System.nMachineType == MACHINE_MEGA_STE;
                    434: }
                    435: 
                    436: static inline bool Config_IsMachineTT(void)
                    437: {
                    438:        return ConfigureParams.System.nMachineType == MACHINE_TT;
                    439: }
                    440: 
                    441: static inline bool Config_IsMachineFalcon(void)
                    442: {
                    443:        return ConfigureParams.System.nMachineType == MACHINE_FALCON;
                    444: }
                    445: 
1.1.1.2   root      446: extern void Configuration_SetDefault(void);
1.1.1.10  root      447: extern void Configuration_Apply(bool bReset);
1.1.1.6   root      448: extern void Configuration_Load(const char *psFileName);
1.1.1.3   root      449: extern void Configuration_Save(void);
1.1.1.10  root      450: extern void Configuration_MemorySnapShot_Capture(bool bSave);
1.1.1.21  root      451: extern void Configuration_ChangeCpuFreq ( int CpuFreq_new );
1.1.1.3   root      452: 
                    453: #endif

unix.superglobalmegacorp.com

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