Annotation of previous/src/includes/configuration.h, revision 1.1.1.4

1.1       root        1: /*
                      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.
                      6: */
                      7: 
                      8: #ifndef HATARI_CONFIGURATION_H
                      9: #define HATARI_CONFIGURATION_H
                     10: 
1.1.1.3   root       11: 
                     12: /* Configuration Dialog */
                     13: typedef struct
                     14: {
                     15:   bool bShowConfigDialogAtStartup;
                     16: } CNF_CONFIGDLG;
                     17: 
1.1       root       18: /* Logging and tracing */
                     19: typedef struct
                     20: {
                     21:   char sLogFileName[FILENAME_MAX];
                     22:   char sTraceFileName[FILENAME_MAX];
                     23:   int nTextLogLevel;
                     24:   int nAlertDlgLogLevel;
                     25:   bool bConfirmQuit;
                     26: } CNF_LOG;
                     27: 
                     28: 
1.1.1.3   root       29: /* Debugger */
1.1       root       30: typedef struct
                     31: {
                     32:   int nNumberBase;
                     33:   int nDisasmLines;
                     34:   int nMemdumpLines;
                     35: } CNF_DEBUGGER;
                     36: 
                     37: 
1.1.1.3   root       38: /* ROM configuration */
1.1       root       39: typedef struct
                     40: {
1.1.1.3   root       41:     char szRom030FileName[FILENAME_MAX];
                     42:     char szRom040FileName[FILENAME_MAX];
                     43:     char szRomTurboFileName[FILENAME_MAX];
1.1       root       44: } CNF_ROM;
                     45: 
                     46: 
                     47: /* Sound configuration */
                     48: typedef struct
                     49: {
1.1.1.2   root       50:   bool bEnableMicrophone;
1.1       root       51:   bool bEnableSound;
                     52: } CNF_SOUND;
                     53: 
                     54: 
                     55: 
                     56: /* RS232 configuration */
                     57: typedef struct
                     58: {
                     59:   bool bEnableRS232;
                     60:   char szOutFileName[FILENAME_MAX];
                     61:   char szInFileName[FILENAME_MAX];
                     62: } CNF_RS232;
                     63: 
                     64: 
                     65: /* Dialog Keyboard */
                     66: typedef enum
                     67: {
                     68:   KEYMAP_SYMBOLIC,  /* Use keymapping with symbolic (ASCII) key codes */
                     69:   KEYMAP_SCANCODE,  /* Use keymapping with PC keyboard scancodes */
                     70:   KEYMAP_LOADED     /* Use keymapping with a map configuration file */
                     71: } KEYMAPTYPE;
                     72: 
                     73: typedef struct
                     74: {
                     75:   bool bDisableKeyRepeat;
1.1.1.4 ! root       76:   bool bSwapCmdAlt;
1.1       root       77:   KEYMAPTYPE nKeymapType;
                     78:   char szMappingFileName[FILENAME_MAX];
                     79: } CNF_KEYBOARD;
                     80: 
                     81: 
                     82: typedef enum {
                     83:   SHORTCUT_OPTIONS,
                     84:   SHORTCUT_FULLSCREEN,
                     85:   SHORTCUT_MOUSEGRAB,
                     86:   SHORTCUT_COLDRESET,
                     87:   SHORTCUT_WARMRESET,
                     88:   SHORTCUT_SCREENSHOT,
                     89:   SHORTCUT_BOSSKEY,
                     90:   SHORTCUT_CURSOREMU,
                     91:   SHORTCUT_FASTFORWARD,
                     92:   SHORTCUT_RECANIM,
                     93:   SHORTCUT_RECSOUND,
                     94:   SHORTCUT_SOUND,
                     95:   SHORTCUT_DEBUG,
                     96:   SHORTCUT_PAUSE,
                     97:   SHORTCUT_QUIT,
                     98:   SHORTCUT_LOADMEM,
                     99:   SHORTCUT_SAVEMEM,
1.1.1.4 ! root      100:   SHORTCUT_DIMENSION,
1.1       root      101:   SHORTCUT_KEYS,  /* number of shortcuts */
                    102:   SHORTCUT_NONE
                    103: } SHORTCUTKEYIDX;
                    104: 
                    105: typedef struct
                    106: {
                    107:   int withModifier[SHORTCUT_KEYS];
                    108:   int withoutModifier[SHORTCUT_KEYS];
                    109: } CNF_SHORTCUT;
                    110: 
1.1.1.4 ! root      111: 
        !           112: /* Dialog Mouse */
        !           113: #define MOUSE_LIN_MIN   0.1
        !           114: #define MOUSE_LIN_MAX   10.0
        !           115: #define MOUSE_EXP_MIN   0.5
        !           116: #define MOUSE_EXP_MAX   1.0
        !           117: typedef struct
        !           118: {
        !           119:     bool bEnableAutoGrab;
        !           120:     float fLinSpeedNormal;
        !           121:     float fLinSpeedLocked;
        !           122:     float fExpSpeedNormal;
        !           123:     float fExpSpeedLocked;
        !           124: } CNF_MOUSE;
        !           125: 
        !           126: 
1.1.1.3   root      127: /* Memory configuration */
                    128: 
                    129: typedef enum
                    130: {
                    131:   MEMORY_120NS,
                    132:   MEMORY_100NS,
                    133:   MEMORY_80NS,
                    134:   MEMORY_60NS
                    135: } MEMORY_SPEED;
1.1       root      136: 
                    137: typedef struct
                    138: {
1.1.1.3   root      139:   int nMemoryBankSize[4];
                    140:   MEMORY_SPEED nMemorySpeed;
1.1       root      141:   bool bAutoSave;
                    142:   char szMemoryCaptureFileName[FILENAME_MAX];
                    143:   char szAutoSaveFileName[FILENAME_MAX];
                    144: } CNF_MEMORY;
                    145: 
                    146: 
1.1.1.3   root      147: /* Dialog Boot options */
1.1       root      148: 
1.1.1.3   root      149: typedef enum
1.1       root      150: {
1.1.1.3   root      151:     BOOT_ROM,
                    152:     BOOT_SCSI,
                    153:     BOOT_ETHERNET,
                    154:     BOOT_MO,
                    155:     BOOT_FLOPPY
                    156: } BOOT_DEVICE;
1.1       root      157: 
                    158: typedef struct
                    159: {
1.1.1.3   root      160:     BOOT_DEVICE nBootDevice;
                    161:     bool bEnableDRAMTest;
                    162:     bool bEnablePot;
                    163:     bool bExtendedPot;
                    164:     bool bEnableSoundTest;
                    165:     bool bEnableSCSITest;
                    166:     bool bLoopPot;
                    167:     bool bVerbose;
                    168: } CNF_BOOT;
1.1       root      169: 
                    170: 
1.1.1.4 ! root      171: /* Hard drives configuration */
        !           172: #define ESP_MAX_DEVS 7
        !           173: typedef enum {
        !           174:     DEVTYPE_NONE,
        !           175:     DEVTYPE_HARDDISK,
        !           176:     DEVTYPE_CD,
        !           177:     DEVTYPE_FLOPPY,
        !           178:     NUM_DEVTYPES
        !           179: } SCSI_DEVTYPE;
1.1       root      180: 
1.1.1.4 ! root      181: typedef struct {
        !           182:     char szImageName[FILENAME_MAX];
        !           183:     SCSI_DEVTYPE nDeviceType;
        !           184:     bool bDiskInserted;
        !           185:     bool bWriteProtected;
        !           186: } SCSIDISK;
1.1       root      187: 
1.1.1.4 ! root      188: typedef struct {
        !           189:     SCSIDISK target[ESP_MAX_DEVS];
        !           190: } CNF_SCSI;
1.1       root      191: 
                    192: 
1.1.1.4 ! root      193: /* Magneto-optical drives configuration */
        !           194: #define MO_MAX_DRIVES   2
        !           195: typedef struct {
        !           196:     char szImageName[FILENAME_MAX];
        !           197:     bool bDriveConnected;
        !           198:     bool bDiskInserted;
        !           199:     bool bWriteProtected;
        !           200: } MODISK;
        !           201: 
        !           202: typedef struct {
        !           203:     MODISK drive[MO_MAX_DRIVES];
        !           204: } CNF_MO;
1.1       root      205: 
                    206: 
1.1.1.4 ! root      207: /* Floppy disk drives configuration */
        !           208: #define FLP_MAX_DRIVES   2
1.1.1.3   root      209: typedef struct {
1.1.1.4 ! root      210:     char szImageName[FILENAME_MAX];
        !           211:     bool bDriveConnected;
        !           212:     bool bDiskInserted;
        !           213:     bool bWriteProtected;
        !           214: } FLPDISK;
        !           215: 
        !           216: typedef struct {
        !           217:     FLPDISK drive[FLP_MAX_DRIVES];
        !           218: } CNF_FLOPPY;
        !           219: 
        !           220: 
        !           221: /* Ethernet configuration */
        !           222: typedef struct {
        !           223:     bool bEthernetConnected;
        !           224: } CNF_ENET;
1.1.1.3   root      225: 
1.1       root      226: 
                    227: /* Falcon register $FFFF8006 bits 6 & 7 (mirrored in $FFFF82C0 bits 0 & 1):
                    228:  * 00 Monochrome
                    229:  * 01 RGB - Colormonitor
                    230:  * 10 VGA - Colormonitor
                    231:  * 11 TV
                    232:  */
                    233: #define FALCON_MONITOR_MONO 0x00  /* SM124 */
                    234: #define FALCON_MONITOR_RGB  0x40
                    235: #define FALCON_MONITOR_VGA  0x80
                    236: #define FALCON_MONITOR_TV   0xC0
                    237: 
                    238: typedef enum
                    239: {
1.1.1.4 ! root      240:   MONITOR_TYPE_DUAL,
        !           241:   MONITOR_TYPE_CPU,
        !           242:   MONITOR_TYPE_DIMENSION,
1.1       root      243: } MONITORTYPE;
                    244: 
                    245: /* Screen configuration */
                    246: typedef struct
                    247: {
                    248:   MONITORTYPE nMonitorType;
                    249:   int nFrameSkips;
                    250:   bool bFullScreen;
1.1.1.2   root      251:   bool bKeepResolution;
1.1       root      252:   bool bAllowOverscan;
                    253:   bool bAspectCorrect;
                    254:   bool bUseExtVdiResolutions;
                    255:   int nSpec512Threshold;
                    256:   int nForceBpp;
                    257:   int nVdiColors;
                    258:   int nVdiWidth;
                    259:   int nVdiHeight;
                    260:   bool bShowStatusbar;
                    261:   bool bShowDriveLed;
1.1.1.2   root      262:   bool bCrop;
1.1       root      263:   int nMaxWidth;
                    264:   int nMaxHeight;
                    265: } CNF_SCREEN;
                    266: 
                    267: 
                    268: /* Printer configuration */
1.1.1.4 ! root      269: typedef enum
        !           270: {
        !           271:     PAPER_A4,
        !           272:     PAPER_LETTER,
        !           273:     PAPER_B5,
        !           274:     PAPER_LEGAL
        !           275: } PAPER_SIZE;
        !           276: 
1.1       root      277: typedef struct
                    278: {
1.1.1.4 ! root      279:   bool bPrinterConnected;
        !           280:   PAPER_SIZE nPaperSize;
1.1       root      281:   char szPrintToFileName[FILENAME_MAX];
                    282: } CNF_PRINTER;
                    283: 
                    284: 
                    285: /* Midi configuration */
                    286: typedef struct
                    287: {
                    288:   bool bEnableMidi;
                    289:   char sMidiInFileName[FILENAME_MAX];
                    290:   char sMidiOutFileName[FILENAME_MAX];
                    291: } CNF_MIDI;
                    292: 
                    293: 
                    294: /* Dialog System */
                    295: typedef enum
                    296: {
1.1.1.3   root      297:   NEXT_CUBE030,
                    298:   NEXT_CUBE040,
                    299:   NEXT_STATION
1.1       root      300: } MACHINETYPE;
                    301: 
                    302: typedef enum
                    303: {
1.1.1.3   root      304:   NCR53C90,
                    305:   NCR53C90A
                    306: } SCSICHIP;
                    307: 
                    308: typedef enum
                    309: {
                    310:   MC68HC68T1,
1.1.1.4 ! root      311:   MCCS1850
1.1.1.3   root      312: } RTCCHIP;
                    313: 
                    314: typedef enum
                    315: {
1.1       root      316:   DSP_TYPE_NONE,
                    317:   DSP_TYPE_DUMMY,
                    318:   DSP_TYPE_EMU
                    319: } DSPTYPE;
                    320: 
1.1.1.2   root      321: typedef enum
                    322: {
1.1.1.3   root      323:   FPU_NONE = 0,
                    324:   FPU_68881 = 68881,
                    325:   FPU_68882 = 68882,
                    326:   FPU_CPU = 68040
1.1.1.2   root      327: } FPUTYPE;
                    328: 
1.1       root      329: typedef struct
                    330: {
1.1.1.3   root      331:   bool bColor;
                    332:   bool bTurbo;
1.1.1.4 ! root      333:   bool bNBIC;
1.1.1.3   root      334:   SCSICHIP nSCSI;
                    335:   RTCCHIP nRTC;
1.1       root      336:   int nCpuLevel;
                    337:   int nCpuFreq;
1.1.1.2   root      338:   bool bCompatibleCpu;            /* Prefetch mode */
1.1       root      339:   MACHINETYPE nMachineType;
                    340:   bool bBlitter;                  /* TRUE if Blitter is enabled */
                    341:   DSPTYPE nDSPType;               /* how to "emulate" DSP */
1.1.1.4 ! root      342:   bool bDSPMemoryExpansion;
1.1       root      343:   bool bRealTimeClock;
                    344:   bool bPatchTimerD;
                    345:   bool bFastForward;
1.1.1.2   root      346:   bool bAddressSpace24;
                    347:   bool bCycleExactCpu;
                    348:   FPUTYPE n_FPUType;
                    349:   bool bCompatibleFPU;            /* More compatible FPU */
                    350:   bool bMMU;                      /* TRUE if MMU is enabled */
1.1       root      351: } CNF_SYSTEM;
                    352: 
1.1.1.2   root      353: typedef struct
                    354: {
1.1.1.4 ! root      355:     bool bEnabled;
        !           356:     int nMemoryBankSize[4];
        !           357:     char szRomFileName[FILENAME_MAX];
        !           358: } CNF_ND;
        !           359: 
        !           360: typedef struct
        !           361: {
1.1.1.2   root      362:   int AviRecordVcodec;
                    363:   int AviRecordFps;
                    364:   char AviRecordFile[FILENAME_MAX];
                    365: } CNF_VIDEO;
                    366: 
                    367: 
1.1       root      368: 
                    369: /* State of system is stored in this structure */
                    370: /* On reset, variables are copied into system globals and used. */
                    371: typedef struct
                    372: {
                    373:   /* Configure */
1.1.1.3   root      374:   CNF_CONFIGDLG ConfigDialog;
1.1       root      375:   CNF_LOG Log;
                    376:   CNF_DEBUGGER Debugger;
                    377:   CNF_SCREEN Screen;
                    378:   CNF_KEYBOARD Keyboard;
                    379:   CNF_SHORTCUT Shortcut;
1.1.1.4 ! root      380:   CNF_MOUSE Mouse;
1.1       root      381:   CNF_SOUND Sound;
                    382:   CNF_MEMORY Memory;
1.1.1.3   root      383:   CNF_BOOT Boot;
                    384:   CNF_SCSI SCSI;
1.1.1.4 ! root      385:   CNF_MO MO;
        !           386:   CNF_FLOPPY Floppy;
        !           387:   CNF_ENET Ethernet;
1.1       root      388:   CNF_ROM Rom;
                    389:   CNF_RS232 RS232;
                    390:   CNF_PRINTER Printer;
                    391:   CNF_MIDI Midi;
                    392:   CNF_SYSTEM System;
1.1.1.4 ! root      393:   CNF_ND Dimension;
1.1.1.2   root      394:   CNF_VIDEO Video;
1.1       root      395: } CNF_PARAMS;
                    396: 
                    397: 
                    398: extern CNF_PARAMS ConfigureParams;
                    399: extern char sConfigFileName[FILENAME_MAX];
                    400: 
                    401: extern void Configuration_SetDefault(void);
1.1.1.4 ! root      402: extern void Configuration_SetSystemDefaults(void);
1.1       root      403: extern void Configuration_Apply(bool bReset);
1.1.1.3   root      404: extern int Configuration_CheckMemory(int *banksize);
1.1.1.4 ! root      405: extern int Configuration_CheckDimensionMemory(int *banksize);
        !           406: extern void Configuration_CheckDimensionSettings(void);
1.1       root      407: extern void Configuration_Load(const char *psFileName);
                    408: extern void Configuration_Save(void);
                    409: extern void Configuration_MemorySnapShot_Capture(bool bSave);
                    410: 
                    411: #endif

unix.superglobalmegacorp.com

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