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

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

unix.superglobalmegacorp.com

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