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

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: 
                     11: /* Logging and tracing */
                     12: typedef struct
                     13: {
                     14:   char sLogFileName[FILENAME_MAX];
                     15:   char sTraceFileName[FILENAME_MAX];
                     16:   int nTextLogLevel;
                     17:   int nAlertDlgLogLevel;
                     18:   bool bConfirmQuit;
                     19: } CNF_LOG;
                     20: 
                     21: 
                     22: /* debugger */
                     23: typedef struct
                     24: {
                     25:   int nNumberBase;
                     26:   int nDisasmLines;
                     27:   int nMemdumpLines;
                     28: } CNF_DEBUGGER;
                     29: 
                     30: 
                     31: /* ROM (TOS + cartridge) configuration */
                     32: typedef struct
                     33: {
                     34:   char szTosImageFileName[FILENAME_MAX];
                     35:   char szCartridgeImageFileName[FILENAME_MAX];
                     36: } CNF_ROM;
                     37: 
                     38: 
                     39: /* Sound configuration */
                     40: typedef struct
                     41: {
                     42:   bool bEnableSound;
                     43:   int nPlaybackFreq;
                     44:   char szYMCaptureFileName[FILENAME_MAX];
                     45:   int SdlAudioBufferSize;
                     46: } CNF_SOUND;
                     47: 
                     48: 
                     49: 
                     50: /* RS232 configuration */
                     51: typedef struct
                     52: {
                     53:   bool bEnableRS232;
                     54:   char szOutFileName[FILENAME_MAX];
                     55:   char szInFileName[FILENAME_MAX];
                     56: } CNF_RS232;
                     57: 
                     58: 
                     59: /* Dialog Keyboard */
                     60: typedef enum
                     61: {
                     62:   KEYMAP_SYMBOLIC,  /* Use keymapping with symbolic (ASCII) key codes */
                     63:   KEYMAP_SCANCODE,  /* Use keymapping with PC keyboard scancodes */
                     64:   KEYMAP_LOADED     /* Use keymapping with a map configuration file */
                     65: } KEYMAPTYPE;
                     66: 
                     67: typedef struct
                     68: {
                     69:   bool bDisableKeyRepeat;
                     70:   KEYMAPTYPE nKeymapType;
                     71:   char szMappingFileName[FILENAME_MAX];
                     72: } CNF_KEYBOARD;
                     73: 
                     74: 
                     75: typedef enum {
                     76:   SHORTCUT_OPTIONS,
                     77:   SHORTCUT_FULLSCREEN,
                     78:   SHORTCUT_MOUSEGRAB,
                     79:   SHORTCUT_COLDRESET,
                     80:   SHORTCUT_WARMRESET,
                     81:   SHORTCUT_SCREENSHOT,
                     82:   SHORTCUT_BOSSKEY,
                     83:   SHORTCUT_CURSOREMU,
                     84:   SHORTCUT_FASTFORWARD,
                     85:   SHORTCUT_RECANIM,
                     86:   SHORTCUT_RECSOUND,
                     87:   SHORTCUT_SOUND,
                     88:   SHORTCUT_DEBUG,
                     89:   SHORTCUT_PAUSE,
                     90:   SHORTCUT_QUIT,
                     91:   SHORTCUT_LOADMEM,
                     92:   SHORTCUT_SAVEMEM,
                     93:   SHORTCUT_INSERTDISKA,
                     94:   SHORTCUT_KEYS,  /* number of shortcuts */
                     95:   SHORTCUT_NONE
                     96: } SHORTCUTKEYIDX;
                     97: 
                     98: typedef struct
                     99: {
                    100:   int withModifier[SHORTCUT_KEYS];
                    101:   int withoutModifier[SHORTCUT_KEYS];
                    102: } CNF_SHORTCUT;
                    103: 
                    104: 
                    105: typedef struct
                    106: {
                    107:   int nMemorySize;
                    108:   bool bAutoSave;
                    109:   char szMemoryCaptureFileName[FILENAME_MAX];
                    110:   char szAutoSaveFileName[FILENAME_MAX];
                    111: } CNF_MEMORY;
                    112: 
                    113: 
                    114: /* Joystick configuration */
                    115: typedef enum
                    116: {
                    117:   JOYSTICK_DISABLED,
                    118:   JOYSTICK_REALSTICK,
                    119:   JOYSTICK_KEYBOARD
                    120: } JOYSTICKMODE;
                    121: 
                    122: typedef struct
                    123: {
                    124:   JOYSTICKMODE nJoystickMode;
                    125:   bool bEnableAutoFire;
                    126:   bool bEnableJumpOnFire2;
                    127:   int nJoyId;
                    128:   int nKeyCodeUp, nKeyCodeDown, nKeyCodeLeft, nKeyCodeRight, nKeyCodeFire;
                    129: } JOYSTICK;
                    130: 
                    131: #define JOYSTICK_COUNT 6
                    132: 
                    133: typedef struct
                    134: {
                    135:   JOYSTICK Joy[JOYSTICK_COUNT];
                    136: } CNF_JOYSTICKS;
                    137: 
                    138: 
                    139: /* Disk image configuration */
                    140: 
                    141: typedef enum
                    142: {
                    143:   WRITEPROT_OFF,
                    144:   WRITEPROT_ON,
                    145:   WRITEPROT_AUTO
                    146: } WRITEPROTECTION;
                    147: 
                    148: #define MAX_FLOPPYDRIVES 2
                    149: 
                    150: typedef struct
                    151: {
                    152:   bool bAutoInsertDiskB;
                    153:   bool bSlowFloppy;                  /* true to slow down FDC emulation */
                    154:   WRITEPROTECTION nWriteProtection;
                    155:   char szDiskZipPath[MAX_FLOPPYDRIVES][FILENAME_MAX];
                    156:   char szDiskFileName[MAX_FLOPPYDRIVES][FILENAME_MAX];
                    157:   char szDiskImageDirectory[FILENAME_MAX];
                    158: } CNF_DISKIMAGE;
                    159: 
                    160: 
                    161: /* Hard drives configuration */
                    162: #define MAX_HARDDRIVES  23
                    163: 
                    164: typedef enum
                    165: {
                    166:   DRIVE_C,
                    167:   DRIVE_D,
                    168:   DRIVE_E,
                    169:   DRIVE_F
                    170: } DRIVELETTER;
                    171: 
                    172: typedef struct
                    173: {
                    174:   int nHardDiskDir;
                    175:   bool bUseHardDiskDirectories;
                    176:   bool bUseHardDiskImage;
                    177:   bool bUseIdeMasterHardDiskImage;
                    178:   bool bUseIdeSlaveHardDiskImage;
                    179:   WRITEPROTECTION nWriteProtection;
                    180:   bool bBootFromHardDisk;
                    181:   char szHardDiskDirectories[MAX_HARDDRIVES][FILENAME_MAX];
                    182:   char szHardDiskImage[FILENAME_MAX];
                    183:   char szIdeMasterHardDiskImage[FILENAME_MAX];
                    184:   char szIdeSlaveHardDiskImage[FILENAME_MAX];
                    185: } CNF_HARDDISK;
                    186: 
                    187: /* Falcon register $FFFF8006 bits 6 & 7 (mirrored in $FFFF82C0 bits 0 & 1):
                    188:  * 00 Monochrome
                    189:  * 01 RGB - Colormonitor
                    190:  * 10 VGA - Colormonitor
                    191:  * 11 TV
                    192:  */
                    193: #define FALCON_MONITOR_MASK 0x3F
                    194: #define FALCON_MONITOR_MONO 0x00  /* SM124 */
                    195: #define FALCON_MONITOR_RGB  0x40
                    196: #define FALCON_MONITOR_VGA  0x80
                    197: #define FALCON_MONITOR_TV   0xC0
                    198: 
                    199: typedef enum
                    200: {
                    201:   MONITOR_TYPE_MONO,
                    202:   MONITOR_TYPE_RGB,
                    203:   MONITOR_TYPE_VGA,
                    204:   MONITOR_TYPE_TV
                    205: } MONITORTYPE;
                    206: 
                    207: /* Screen configuration */
                    208: typedef struct
                    209: {
                    210:   MONITORTYPE nMonitorType;
                    211:   int nFrameSkips;
                    212:   bool bFullScreen;
                    213:   bool bAllowOverscan;
                    214:   bool bAspectCorrect;
                    215:   bool bUseExtVdiResolutions;
                    216:   int nSpec512Threshold;
                    217:   int nForceBpp;
                    218:   int nVdiColors;
                    219:   int nVdiWidth;
                    220:   int nVdiHeight;
                    221:   bool bShowStatusbar;
                    222:   bool bShowDriveLed;
                    223:   bool bCaptureChange;
                    224:   int nMaxWidth;
                    225:   int nMaxHeight;
                    226: } CNF_SCREEN;
                    227: 
                    228: 
                    229: /* Printer configuration */
                    230: typedef struct
                    231: {
                    232:   bool bEnablePrinting;
                    233:   bool bPrintToFile;
                    234:   char szPrintToFileName[FILENAME_MAX];
                    235: } CNF_PRINTER;
                    236: 
                    237: 
                    238: /* Midi configuration */
                    239: typedef struct
                    240: {
                    241:   bool bEnableMidi;
                    242:   char sMidiInFileName[FILENAME_MAX];
                    243:   char sMidiOutFileName[FILENAME_MAX];
                    244: } CNF_MIDI;
                    245: 
                    246: 
                    247: /* Dialog System */
                    248: typedef enum
                    249: {
                    250:   MACHINE_ST,
                    251:   MACHINE_STE,
                    252:   MACHINE_TT,
                    253:   MACHINE_FALCON
                    254: } MACHINETYPE;
                    255: 
                    256: typedef enum
                    257: {
                    258:   DSP_TYPE_NONE,
                    259:   DSP_TYPE_DUMMY,
                    260:   DSP_TYPE_EMU
                    261: } DSPTYPE;
                    262: 
                    263: typedef struct
                    264: {
                    265:   int nCpuLevel;
                    266:   int nCpuFreq;
                    267:   bool bCompatibleCpu;
                    268:   /*bool bAddressSpace24;*/
                    269:   MACHINETYPE nMachineType;
                    270:   bool bBlitter;                  /* TRUE if Blitter is enabled */
                    271:   DSPTYPE nDSPType;               /* how to "emulate" DSP */
                    272:   bool bRealTimeClock;
                    273:   bool bPatchTimerD;
                    274:   bool bFastForward;
                    275: } CNF_SYSTEM;
                    276: 
                    277: 
                    278: /* State of system is stored in this structure */
                    279: /* On reset, variables are copied into system globals and used. */
                    280: typedef struct
                    281: {
                    282:   /* Configure */
                    283:   CNF_LOG Log;
                    284:   CNF_DEBUGGER Debugger;
                    285:   CNF_SCREEN Screen;
                    286:   CNF_JOYSTICKS Joysticks;
                    287:   CNF_KEYBOARD Keyboard;
                    288:   CNF_SHORTCUT Shortcut;
                    289:   CNF_SOUND Sound;
                    290:   CNF_MEMORY Memory;
                    291:   CNF_DISKIMAGE DiskImage;
                    292:   CNF_HARDDISK HardDisk;
                    293:   CNF_ROM Rom;
                    294:   CNF_RS232 RS232;
                    295:   CNF_PRINTER Printer;
                    296:   CNF_MIDI Midi;
                    297:   CNF_SYSTEM System;
                    298: } CNF_PARAMS;
                    299: 
                    300: 
                    301: extern CNF_PARAMS ConfigureParams;
                    302: extern char sConfigFileName[FILENAME_MAX];
                    303: 
                    304: extern void Configuration_SetDefault(void);
                    305: extern void Configuration_Apply(bool bReset);
                    306: extern void Configuration_Load(const char *psFileName);
                    307: extern void Configuration_Save(void);
                    308: extern void Configuration_MemorySnapShot_Capture(bool bSave);
                    309: 
                    310: #endif

unix.superglobalmegacorp.com

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