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

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

unix.superglobalmegacorp.com

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