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

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

unix.superglobalmegacorp.com

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