2016-01-27 09:11:59 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Project64-core/N64System/N64Types.h>
|
2018-02-28 21:13:17 +00:00
|
|
|
#include <Project64-core/Settings/DebugSettings.h>
|
2016-01-27 09:11:59 +00:00
|
|
|
|
|
|
|
class CGameSettings
|
|
|
|
{
|
|
|
|
public:
|
2022-01-03 23:37:52 +00:00
|
|
|
CGameSettings();
|
|
|
|
virtual ~CGameSettings();
|
|
|
|
|
2016-01-27 09:11:59 +00:00
|
|
|
void RefreshGameSettings(void);
|
|
|
|
|
2017-08-30 22:58:26 +00:00
|
|
|
inline static bool UseHleGfx(void) { return m_UseHleGfx; }
|
|
|
|
inline static bool bRomInMemory(void) { return m_bRomInMemory; }
|
|
|
|
inline static bool bRegCaching(void) { return m_RegCaching; }
|
2018-02-28 21:13:17 +00:00
|
|
|
inline static bool bLinkBlocks(void) { return m_bLinkBlocks && !CDebugSettings::HaveWriteBP() && !CDebugSettings::HaveReadBP(); }
|
2016-01-27 09:11:59 +00:00
|
|
|
inline static FUNC_LOOKUP_METHOD LookUpMode(void) { return (FUNC_LOOKUP_METHOD)m_LookUpMode; }
|
|
|
|
inline static uint32_t CountPerOp(void) { return m_CountPerOp; }
|
|
|
|
inline static uint32_t ViRefreshRate(void) { return m_ViRefreshRate; }
|
|
|
|
inline static uint32_t AiCountPerBytes(void) { return m_AiCountPerBytes; }
|
2017-08-30 22:58:26 +00:00
|
|
|
inline static bool bDelayDP(void) { return m_DelayDP; }
|
|
|
|
inline static bool bDelaySI(void) { return m_DelaySI; }
|
2019-10-02 22:18:19 +00:00
|
|
|
inline static bool bRandomizeSIPIInterrupts(void) { return m_bRandomizeSIPIInterrupts; }
|
2016-01-27 09:11:59 +00:00
|
|
|
inline static uint32_t RdramSize(void) { return m_RdramSize; }
|
2017-08-30 22:58:26 +00:00
|
|
|
inline static bool bFixedAudio(void) { return m_bFixedAudio; }
|
2017-09-28 11:43:58 +00:00
|
|
|
inline static bool bSyncToAudio(void) { return m_bSyncToAudio; }
|
|
|
|
inline static bool FullSpeed(void) { return m_FullSpeed; }
|
2017-08-30 22:58:26 +00:00
|
|
|
inline static bool bFastSP(void) { return m_bFastSP; }
|
|
|
|
inline static bool b32BitCore(void) { return m_b32Bit; }
|
|
|
|
inline static bool RspAudioSignal(void) { return m_RspAudioSignal; }
|
|
|
|
inline static bool bSMM_StoreInstruc(void) { return m_bSMM_StoreInstruc; }
|
|
|
|
inline static bool bSMM_Protect(void) { return m_bSMM_Protect; }
|
|
|
|
inline static bool bSMM_ValidFunc(void) { return m_bSMM_ValidFunc; }
|
|
|
|
inline static bool bSMM_PIDMA(void) { return m_bSMM_PIDMA; }
|
|
|
|
inline static bool bSMM_TLB(void) { return m_bSMM_TLB; }
|
2016-01-27 09:11:59 +00:00
|
|
|
inline static SYSTEM_TYPE SystemType(void) { return m_SystemType; }
|
|
|
|
inline static CPU_TYPE CpuType(void) { return m_CpuType; }
|
2017-06-15 11:09:49 +00:00
|
|
|
inline static uint32_t OverClockModifier(void) { return m_OverClockModifier; }
|
2021-01-29 23:29:09 +00:00
|
|
|
inline static DISK_SEEK_TYPE DiskSeekTimingType(void) { return m_DiskSeekTimingType; };
|
2022-01-03 23:37:52 +00:00
|
|
|
inline static bool EnableDisk(void) { return m_EnableDisk; }
|
2016-01-27 09:11:59 +00:00
|
|
|
|
2018-12-20 10:19:14 +00:00
|
|
|
void RefreshSyncToAudio(void);
|
2021-03-10 07:39:01 +00:00
|
|
|
static void SetOverClockModifier(bool EnhancmentOverClock, uint32_t EnhancmentOverClockModifier);
|
2018-12-20 10:19:14 +00:00
|
|
|
|
2016-01-27 09:11:59 +00:00
|
|
|
protected:
|
|
|
|
static void SpeedChanged(int32_t SpeedLimit);
|
2022-01-03 23:37:52 +00:00
|
|
|
static void EnableDiskChanged(void);
|
2016-01-27 09:11:59 +00:00
|
|
|
|
|
|
|
private:
|
2022-01-03 23:37:52 +00:00
|
|
|
CGameSettings(const CGameSettings&);
|
|
|
|
CGameSettings& operator=(const CGameSettings&);
|
|
|
|
|
|
|
|
static void EnableDiskChanged(void *);
|
|
|
|
|
2021-05-18 11:51:36 +00:00
|
|
|
// Settings that can be changed on the fly
|
2017-08-30 22:58:26 +00:00
|
|
|
static bool m_UseHleGfx;
|
|
|
|
static bool m_bRomInMemory;
|
|
|
|
static bool m_RegCaching;
|
|
|
|
static bool m_bLinkBlocks;
|
2016-01-27 09:11:59 +00:00
|
|
|
static uint32_t m_LookUpMode; //FUNC_LOOKUP_METHOD
|
|
|
|
static uint32_t m_CountPerOp;
|
|
|
|
static uint32_t m_ViRefreshRate;
|
|
|
|
static uint32_t m_AiCountPerBytes;
|
2017-06-15 11:09:49 +00:00
|
|
|
static bool m_DelayDP;
|
|
|
|
static bool m_DelaySI;
|
2019-10-02 22:18:19 +00:00
|
|
|
static bool m_bRandomizeSIPIInterrupts;
|
2016-01-27 09:11:59 +00:00
|
|
|
static uint32_t m_RdramSize;
|
2017-06-15 11:09:49 +00:00
|
|
|
static bool m_bFixedAudio;
|
|
|
|
static bool m_bSyncToAudio;
|
2017-09-28 11:43:58 +00:00
|
|
|
static bool m_FullSpeed;
|
2017-06-15 11:09:49 +00:00
|
|
|
static bool m_bFastSP;
|
|
|
|
static bool m_b32Bit;
|
|
|
|
static bool m_RspAudioSignal;
|
|
|
|
static bool m_bSMM_StoreInstruc;
|
|
|
|
static bool m_bSMM_Protect;
|
|
|
|
static bool m_bSMM_ValidFunc;
|
|
|
|
static bool m_bSMM_PIDMA;
|
|
|
|
static bool m_bSMM_TLB;
|
2016-01-27 09:11:59 +00:00
|
|
|
static SYSTEM_TYPE m_SystemType;
|
|
|
|
static CPU_TYPE m_CpuType;
|
2017-06-15 11:09:49 +00:00
|
|
|
static uint32_t m_OverClockModifier;
|
2021-01-29 23:29:09 +00:00
|
|
|
static DISK_SEEK_TYPE m_DiskSeekTimingType;
|
2021-03-10 07:39:01 +00:00
|
|
|
static bool m_EnhancmentOverClock;
|
|
|
|
static uint32_t m_EnhancmentOverClockModifier;
|
2022-01-03 23:37:52 +00:00
|
|
|
static bool m_EnableDisk;
|
|
|
|
static int32_t m_RefCount;
|
2016-01-27 09:11:59 +00:00
|
|
|
};
|