--- hatari/src/includes/configuration.h 2019/04/09 08:50:26 1.1.1.15 +++ hatari/src/includes/configuration.h 2019/04/09 08:58:10 1.1.1.21 @@ -1,13 +1,16 @@ /* Hatari - configuration.h - This file is distributed under the GNU Public License, version 2 or at - your option any later version. Read the file gpl.txt for details. + This file is distributed under the GNU General Public License, version 2 + or at your option any later version. Read the file gpl.txt for details. */ #ifndef HATARI_CONFIGURATION_H #define HATARI_CONFIGURATION_H +/* if header's struct contents depend on configuration options, header must include config.h */ +#include "config.h" + /* Logging and tracing */ typedef struct { @@ -16,6 +19,8 @@ typedef struct int nTextLogLevel; int nAlertDlgLogLevel; bool bConfirmQuit; + bool bNatFeats; + bool bConsoleWindow; /* for now, used just for Windows */ } CNF_LOG; @@ -23,8 +28,16 @@ typedef struct typedef struct { int nNumberBase; - int nDisasmLines; + int nSymbolLines; int nMemdumpLines; + int nDisasmLines; + int nExceptionDebugMask; + int nDisasmOptions; + bool bDisasmUAE; + /* load symbols immediately on program start, and keep them after its termination */ + bool bSymbolsResident; + /* whether to match all symbols or just types relevant for given command */ + bool bMatchAllSymbols; } CNF_DEBUGGER; @@ -42,6 +55,7 @@ typedef struct { bool bEnableMicrophone; bool bEnableSound; + bool bEnableSoundSync; int nPlaybackFreq; int SdlAudioBufferSize; char szYMCaptureFileName[FILENAME_MAX]; @@ -78,6 +92,7 @@ typedef struct typedef enum { SHORTCUT_OPTIONS, SHORTCUT_FULLSCREEN, + SHORTCUT_BORDERS, SHORTCUT_MOUSEGRAB, SHORTCUT_COLDRESET, SHORTCUT_WARMRESET, @@ -94,6 +109,10 @@ typedef enum { SHORTCUT_LOADMEM, SHORTCUT_SAVEMEM, SHORTCUT_INSERTDISKA, + SHORTCUT_JOY_0, + SHORTCUT_JOY_1, + SHORTCUT_PAD_A, + SHORTCUT_PAD_B, SHORTCUT_KEYS, /* number of shortcuts */ SHORTCUT_NONE } SHORTCUTKEYIDX; @@ -107,7 +126,8 @@ typedef struct typedef struct { - int nMemorySize; + int STRamSize_KB; + int TTRamSize_KB; bool bAutoSave; char szMemoryCaptureFileName[FILENAME_MAX]; char szAutoSaveFileName[FILENAME_MAX]; @@ -121,6 +141,7 @@ typedef enum JOYSTICK_REALSTICK, JOYSTICK_KEYBOARD } JOYSTICKMODE; +#define JOYSTICK_MODES 3 typedef struct { @@ -131,7 +152,16 @@ typedef struct int nKeyCodeUp, nKeyCodeDown, nKeyCodeLeft, nKeyCodeRight, nKeyCodeFire; } JOYSTICK; -#define JOYSTICK_COUNT 6 +enum +{ + JOYID_JOYSTICK0, + JOYID_JOYSTICK1, + JOYID_STEPADA, + JOYID_STEPADB, + JOYID_PARPORT1, + JOYID_PARPORT2, + JOYSTICK_COUNT +}; typedef struct { @@ -154,6 +184,10 @@ typedef struct { bool bAutoInsertDiskB; bool FastFloppy; /* true to speed up FDC emulation */ + bool EnableDriveA; + bool EnableDriveB; + int DriveA_NumberOfHeads; + int DriveB_NumberOfHeads; WRITEPROTECTION nWriteProtection; char szDiskZipPath[MAX_FLOPPYDRIVES][FILENAME_MAX]; char szDiskFileName[MAX_FLOPPYDRIVES][FILENAME_MAX]; @@ -164,22 +198,41 @@ typedef struct /* Hard drives configuration: C: - Z: */ #define MAX_HARDDRIVES 24 #define DRIVE_C 0 +#define DRIVE_SKIP -1 + +typedef enum +{ + GEMDOS_NOP, + GEMDOS_UPPER, + GEMDOS_LOWER +} GEMDOS_CHR_CONV; typedef struct { - int nHardDiskDir; + int nGemdosDrive; bool bUseHardDiskDirectories; - bool bUseHardDiskImage; bool bUseIdeMasterHardDiskImage; bool bUseIdeSlaveHardDiskImage; WRITEPROTECTION nWriteProtection; + GEMDOS_CHR_CONV nGemdosCase; + bool bFilenameConversion; + bool bGemdosHostTime; bool bBootFromHardDisk; char szHardDiskDirectories[MAX_HARDDRIVES][FILENAME_MAX]; - char szHardDiskImage[FILENAME_MAX]; char szIdeMasterHardDiskImage[FILENAME_MAX]; char szIdeSlaveHardDiskImage[FILENAME_MAX]; } CNF_HARDDISK; +/* SCSI/ACSI configuration */ +#define MAX_ACSI_DEVS 8 +#define MAX_SCSI_DEVS 8 + +typedef struct +{ + bool bUseDevice; + char sDeviceFile[FILENAME_MAX]; +} CNF_SCSIDEV; + /* Falcon register $FFFF8006 bits 6 & 7 (mirrored in $FFFF82C0 bits 0 & 1): * 00 Monochrome * 01 RGB - Colormonitor @@ -206,7 +259,11 @@ typedef struct int nFrameSkips; bool bFullScreen; bool bKeepResolution; +#if WITH_SDL2 + bool bResizable; +#else bool bKeepResolutionST; +#endif bool bAllowOverscan; bool bAspectCorrect; bool bUseExtVdiResolutions; @@ -215,12 +272,19 @@ typedef struct int nVdiColors; int nVdiWidth; int nVdiHeight; + bool bMouseWarp; bool bShowStatusbar; bool bShowDriveLed; bool bCrop; bool bForceMax; int nMaxWidth; int nMaxHeight; +#if WITH_SDL2 + bool bUseSdlRenderer; + int nRenderScaleQuality; + bool bUseVsync; +#endif + bool DisableVideo; } CNF_SCREEN; @@ -228,7 +292,6 @@ typedef struct typedef struct { bool bEnablePrinting; - bool bPrintToFile; char szPrintToFileName[FILENAME_MAX]; } CNF_PRINTER; @@ -239,6 +302,8 @@ typedef struct bool bEnableMidi; char sMidiInFileName[FILENAME_MAX]; char sMidiOutFileName[FILENAME_MAX]; + char sMidiInPortName[FILENAME_MAX]; + char sMidiOutPortName[FILENAME_MAX]; } CNF_MIDI; @@ -246,10 +311,11 @@ typedef struct typedef enum { MACHINE_ST, + MACHINE_MEGA_ST, MACHINE_STE, - MACHINE_TT, - MACHINE_FALCON, MACHINE_MEGA_STE, + MACHINE_TT, + MACHINE_FALCON } MACHINETYPE; typedef enum @@ -262,13 +328,22 @@ typedef enum #if ENABLE_WINUAE_CPU typedef enum { - FPU_NONE, - FPU_68881, - FPU_68882, - FPU_CPU + FPU_NONE = 0, + FPU_68881 = 68881, + FPU_68882 = 68882, + FPU_CPU = 68040 } FPUTYPE; #endif +typedef enum +{ + VIDEO_TIMING_MODE_RANDOM = 0, + VIDEO_TIMING_MODE_WS1, + VIDEO_TIMING_MODE_WS2, + VIDEO_TIMING_MODE_WS3, + VIDEO_TIMING_MODE_WS4, +} VIDEOTIMINGMODE; + typedef struct { int nCpuLevel; @@ -277,16 +352,17 @@ typedef struct MACHINETYPE nMachineType; bool bBlitter; /* TRUE if Blitter is enabled */ DSPTYPE nDSPType; /* how to "emulate" DSP */ - bool bRealTimeClock; bool bPatchTimerD; bool bFastBoot; /* Enable to patch TOS for fast boot */ bool bFastForward; + bool bAddressSpace24; /* Always set to true with old UAE cpu */ + VIDEOTIMINGMODE VideoTimingMode; #if ENABLE_WINUAE_CPU - bool bAddressSpace24; bool bCycleExactCpu; FPUTYPE n_FPUType; bool bCompatibleFPU; /* More compatible FPU */ + bool bSoftFloatFPU; bool bMMU; /* TRUE if MMU is enabled */ #endif } CNF_SYSTEM; @@ -313,6 +389,8 @@ typedef struct CNF_MEMORY Memory; CNF_DISKIMAGE DiskImage; CNF_HARDDISK HardDisk; + CNF_SCSIDEV Acsi[MAX_ACSI_DEVS]; + CNF_SCSIDEV Scsi[MAX_SCSI_DEVS]; CNF_ROM Rom; CNF_RS232 RS232; CNF_PRINTER Printer; @@ -325,10 +403,33 @@ typedef struct extern CNF_PARAMS ConfigureParams; extern char sConfigFileName[FILENAME_MAX]; +static inline bool Config_IsMachineST(void) +{ + return ConfigureParams.System.nMachineType == MACHINE_ST || + ConfigureParams.System.nMachineType == MACHINE_MEGA_ST; +} + +static inline bool Config_IsMachineSTE(void) +{ + return ConfigureParams.System.nMachineType == MACHINE_STE || + ConfigureParams.System.nMachineType == MACHINE_MEGA_STE; +} + +static inline bool Config_IsMachineTT(void) +{ + return ConfigureParams.System.nMachineType == MACHINE_TT; +} + +static inline bool Config_IsMachineFalcon(void) +{ + return ConfigureParams.System.nMachineType == MACHINE_FALCON; +} + extern void Configuration_SetDefault(void); extern void Configuration_Apply(bool bReset); extern void Configuration_Load(const char *psFileName); extern void Configuration_Save(void); extern void Configuration_MemorySnapShot_Capture(bool bSave); +extern void Configuration_ChangeCpuFreq ( int CpuFreq_new ); #endif