--- previous/src/includes/configuration.h 2018/04/24 19:28:11 1.1.1.3 +++ previous/src/includes/configuration.h 2018/04/24 19:34:16 1.1.1.6 @@ -5,10 +5,20 @@ your option any later version. Read the file gpl.txt for details. */ +#pragma once + #ifndef HATARI_CONFIGURATION_H #define HATARI_CONFIGURATION_H +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#define ENABLE_TESTING 0 + /* Configuration Dialog */ typedef struct { @@ -49,23 +59,8 @@ typedef struct { bool bEnableMicrophone; bool bEnableSound; - int nPlaybackFreq; - int SdlAudioBufferSize; - char szYMCaptureFileName[FILENAME_MAX]; - int YmVolumeMixing; } CNF_SOUND; - - -/* RS232 configuration */ -typedef struct -{ - bool bEnableRS232; - char szOutFileName[FILENAME_MAX]; - char szInFileName[FILENAME_MAX]; -} CNF_RS232; - - /* Dialog Keyboard */ typedef enum { @@ -76,7 +71,7 @@ typedef enum typedef struct { - bool bDisableKeyRepeat; + bool bSwapCmdAlt; KEYMAPTYPE nKeymapType; char szMappingFileName[FILENAME_MAX]; } CNF_KEYBOARD; @@ -88,19 +83,13 @@ typedef enum { SHORTCUT_MOUSEGRAB, SHORTCUT_COLDRESET, SHORTCUT_WARMRESET, - SHORTCUT_SCREENSHOT, - SHORTCUT_BOSSKEY, SHORTCUT_CURSOREMU, - SHORTCUT_FASTFORWARD, - SHORTCUT_RECANIM, - SHORTCUT_RECSOUND, SHORTCUT_SOUND, - SHORTCUT_DEBUG, + SHORTCUT_DEBUG_M68K, + SHORTCUT_DEBUG_I860, SHORTCUT_PAUSE, SHORTCUT_QUIT, - SHORTCUT_LOADMEM, - SHORTCUT_SAVEMEM, - SHORTCUT_INSERTDISKA, + SHORTCUT_DIMENSION, SHORTCUT_KEYS, /* number of shortcuts */ SHORTCUT_NONE } SHORTCUTKEYIDX; @@ -111,6 +100,22 @@ typedef struct int withoutModifier[SHORTCUT_KEYS]; } CNF_SHORTCUT; + +/* Dialog Mouse */ +#define MOUSE_LIN_MIN 0.1 +#define MOUSE_LIN_MAX 10.0 +#define MOUSE_EXP_MIN 0.5 +#define MOUSE_EXP_MAX 1.0 +typedef struct +{ + bool bEnableAutoGrab; + float fLinSpeedNormal; + float fLinSpeedLocked; + float fExpSpeedNormal; + float fExpSpeedLocked; +} CNF_MOUSE; + + /* Memory configuration */ typedef enum @@ -125,9 +130,6 @@ typedef struct { int nMemoryBankSize[4]; MEMORY_SPEED nMemorySpeed; - bool bAutoSave; - char szMemoryCaptureFileName[FILENAME_MAX]; - char szAutoSaveFileName[FILENAME_MAX]; } CNF_MEMORY; @@ -155,113 +157,111 @@ typedef struct } CNF_BOOT; -/* Disk image configuration */ +/* Hard drives configuration */ +#define ESP_MAX_DEVS 7 +typedef enum { + DEVTYPE_NONE, + DEVTYPE_HARDDISK, + DEVTYPE_CD, + DEVTYPE_FLOPPY, + NUM_DEVTYPES +} SCSI_DEVTYPE; + +typedef struct { + char szImageName[FILENAME_MAX]; + SCSI_DEVTYPE nDeviceType; + bool bDiskInserted; + bool bWriteProtected; +} SCSIDISK; typedef enum { - WRITEPROT_OFF, - WRITEPROT_ON, - WRITEPROT_AUTO + WRITEPROT_OFF, + WRITEPROT_ON, + WRITEPROT_AUTO } WRITEPROTECTION; -#define MAX_FLOPPYDRIVES 2 +typedef struct { + SCSIDISK target[ESP_MAX_DEVS]; + int nWriteProtection; +} CNF_SCSI; -typedef struct -{ - bool bAutoInsertDiskB; - bool bSlowFloppy; /* true to slow down FDC emulation */ - WRITEPROTECTION nWriteProtection; - char szDiskZipPath[MAX_FLOPPYDRIVES][FILENAME_MAX]; - char szDiskFileName[MAX_FLOPPYDRIVES][FILENAME_MAX]; - char szDiskImageDirectory[FILENAME_MAX]; -} CNF_DISKIMAGE; +/* Magneto-optical drives configuration */ +#define MO_MAX_DRIVES 2 +typedef struct { + char szImageName[FILENAME_MAX]; + bool bDriveConnected; + bool bDiskInserted; + bool bWriteProtected; +} MODISK; -/* Hard drives configuration */ -#define MAX_HARDDRIVES 23 +typedef struct { + MODISK drive[MO_MAX_DRIVES]; +} CNF_MO; -typedef enum -{ - DRIVE_C, - DRIVE_D, - DRIVE_E, - DRIVE_F -} DRIVELETTER; +/* Floppy disk drives configuration */ +#define FLP_MAX_DRIVES 2 typedef struct { - char szImageName[FILENAME_MAX]; - bool bAttached; - bool bCDROM; -} SCSIDISK; + char szImageName[FILENAME_MAX]; + bool bDriveConnected; + bool bDiskInserted; + bool bWriteProtected; +} FLPDISK; -#define ESP_MAX_DEVS 7 -typedef struct +typedef struct { + FLPDISK drive[FLP_MAX_DRIVES]; +} CNF_FLOPPY; + + +/* Ethernet configuration */ +typedef enum { - SCSIDISK target[ESP_MAX_DEVS]; - - WRITEPROTECTION nWriteProtection; - bool bBootFromHardDisk; -} CNF_SCSI; + ENET_SLIRP, + ENET_PCAP +} ENET_INTERFACE; -/* Falcon register $FFFF8006 bits 6 & 7 (mirrored in $FFFF82C0 bits 0 & 1): - * 00 Monochrome - * 01 RGB - Colormonitor - * 10 VGA - Colormonitor - * 11 TV - */ -#define FALCON_MONITOR_MONO 0x00 /* SM124 */ -#define FALCON_MONITOR_RGB 0x40 -#define FALCON_MONITOR_VGA 0x80 -#define FALCON_MONITOR_TV 0xC0 +typedef struct { + bool bEthernetConnected; + bool bTwistedPair; + ENET_INTERFACE nHostInterface; + char szInterfaceName[FILENAME_MAX]; +} CNF_ENET; typedef enum { - MONITOR_TYPE_MONO, - MONITOR_TYPE_RGB, - MONITOR_TYPE_VGA, - MONITOR_TYPE_TV + MONITOR_TYPE_DUAL, + MONITOR_TYPE_CPU, + MONITOR_TYPE_DIMENSION, } MONITORTYPE; /* Screen configuration */ typedef struct { MONITORTYPE nMonitorType; - int nFrameSkips; + int nMonitorNum; bool bFullScreen; - bool bKeepResolution; - bool bAllowOverscan; - bool bAspectCorrect; - bool bUseExtVdiResolutions; - int nSpec512Threshold; - int nForceBpp; - int nVdiColors; - int nVdiWidth; - int nVdiHeight; bool bShowStatusbar; bool bShowDriveLed; - bool bCrop; - int nMaxWidth; - int nMaxHeight; } CNF_SCREEN; /* Printer configuration */ -typedef struct +typedef enum { - bool bEnablePrinting; - bool bPrintToFile; - char szPrintToFileName[FILENAME_MAX]; -} CNF_PRINTER; - + PAPER_A4, + PAPER_LETTER, + PAPER_B5, + PAPER_LEGAL +} PAPER_SIZE; -/* Midi configuration */ typedef struct { - bool bEnableMidi; - char sMidiInFileName[FILENAME_MAX]; - char sMidiOutFileName[FILENAME_MAX]; -} CNF_MIDI; - + bool bPrinterConnected; + PAPER_SIZE nPaperSize; + char szPrintToFileName[FILENAME_MAX]; +} CNF_PRINTER; /* Dialog System */ typedef enum @@ -280,7 +280,7 @@ typedef enum typedef enum { MC68HC68T1, - MCS1850 + MCCS1850 } RTCCHIP; typedef enum @@ -290,7 +290,6 @@ typedef enum DSP_TYPE_EMU } DSPTYPE; -#if ENABLE_WINUAE_CPU typedef enum { FPU_NONE = 0, @@ -298,43 +297,42 @@ typedef enum FPU_68882 = 68882, FPU_CPU = 68040 } FPUTYPE; -#endif typedef struct { bool bColor; bool bTurbo; - bool bADB; + bool bNBIC; SCSICHIP nSCSI; RTCCHIP nRTC; int nCpuLevel; int nCpuFreq; bool bCompatibleCpu; /* Prefetch mode */ MACHINETYPE nMachineType; - bool bBlitter; /* TRUE if Blitter is enabled */ + bool bRealtime; /* TRUE if realtime sources shoud be used */ DSPTYPE nDSPType; /* how to "emulate" DSP */ + bool bDSPMemoryExpansion; bool bRealTimeClock; - bool bPatchTimerD; - bool bFastForward; - -#if ENABLE_WINUAE_CPU - bool bAddressSpace24; - bool bCycleExactCpu; FPUTYPE n_FPUType; bool bCompatibleFPU; /* More compatible FPU */ bool bMMU; /* TRUE if MMU is enabled */ -#endif - } CNF_SYSTEM; +/* Floppy disk drives configuration */ +#define ND_MAX_BOARDS 3 typedef struct { - int AviRecordVcodec; - int AviRecordFps; - char AviRecordFile[FILENAME_MAX]; -} CNF_VIDEO; - + bool bEnabled; + int nMemoryBankSize[4]; + char szRomFileName[FILENAME_MAX]; +} NDBOARD; +typedef struct { + bool bI860Thread; + bool bMainDisplay; + int nMainDisplay; + NDBOARD board[ND_MAX_BOARDS]; +} CNF_ND; /* State of system is stored in this structure */ /* On reset, variables are copied into system globals and used. */ @@ -342,33 +340,42 @@ typedef struct { /* Configure */ CNF_CONFIGDLG ConfigDialog; - CNF_LOG Log; - CNF_DEBUGGER Debugger; - CNF_SCREEN Screen; - CNF_KEYBOARD Keyboard; - CNF_SHORTCUT Shortcut; - CNF_SOUND Sound; - CNF_MEMORY Memory; - CNF_DISKIMAGE DiskImage; - CNF_BOOT Boot; - CNF_SCSI SCSI; - CNF_ROM Rom; - CNF_RS232 RS232; - CNF_PRINTER Printer; - CNF_MIDI Midi; - CNF_SYSTEM System; - CNF_VIDEO Video; + CNF_LOG Log; + CNF_DEBUGGER Debugger; + CNF_SCREEN Screen; + CNF_KEYBOARD Keyboard; + CNF_SHORTCUT Shortcut; + CNF_MOUSE Mouse; + CNF_SOUND Sound; + CNF_MEMORY Memory; + CNF_BOOT Boot; + CNF_SCSI SCSI; + CNF_MO MO; + CNF_FLOPPY Floppy; + CNF_ENET Ethernet; + CNF_ROM Rom; + CNF_PRINTER Printer; + CNF_SYSTEM System; + CNF_ND Dimension; } CNF_PARAMS; extern CNF_PARAMS ConfigureParams; extern char sConfigFileName[FILENAME_MAX]; -extern void Configuration_SetDefault(void); -extern void Configuration_Apply(bool bReset); -extern int Configuration_CheckMemory(int *banksize); -extern void Configuration_Load(const char *psFileName); -extern void Configuration_Save(void); -extern void Configuration_MemorySnapShot_Capture(bool bSave); +void Configuration_SetDefault(void); +void Configuration_SetSystemDefaults(void); +void Configuration_Apply(bool bReset); +int Configuration_CheckMemory(int *banksize); +int Configuration_CheckDimensionMemory(int *banksize); +void Configuration_CheckDimensionSettings(void); +void Configuration_CheckEthernetSettings(void); +void Configuration_Load(const char *psFileName); +void Configuration_Save(void); +void Configuration_MemorySnapShot_Capture(bool bSave); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif