2012-12-19 09:30:18 +00:00
|
|
|
/****************************************************************************
|
|
|
|
* *
|
|
|
|
* Project 64 - A Nintendo 64 emulator. *
|
|
|
|
* http://www.pj64-emu.com/ *
|
|
|
|
* Copyright (C) 2012 Project64. All rights reserved. *
|
|
|
|
* *
|
|
|
|
* License: *
|
|
|
|
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
|
|
|
|
* *
|
|
|
|
****************************************************************************/
|
2012-09-24 01:14:02 +00:00
|
|
|
#include "stdafx.h"
|
|
|
|
|
2012-11-29 11:23:35 +00:00
|
|
|
bool CGameSettings::m_bSMM_StoreInstruc;
|
|
|
|
bool CGameSettings::m_bSMM_Protect;
|
|
|
|
bool CGameSettings::m_bSMM_ValidFunc;
|
|
|
|
bool CGameSettings::m_bSMM_PIDMA;
|
|
|
|
bool CGameSettings::m_bSMM_TLB;
|
2012-10-14 01:05:52 +00:00
|
|
|
bool CGameSettings::m_bUseTlb;
|
2012-09-28 20:07:45 +00:00
|
|
|
DWORD CGameSettings::m_CountPerOp = 2;
|
|
|
|
DWORD CGameSettings::m_ViRefreshRate = 1500;
|
2012-11-13 05:44:13 +00:00
|
|
|
DWORD CGameSettings::m_AiCountPerBytes = 500;
|
2012-10-05 23:53:11 +00:00
|
|
|
bool CGameSettings::m_DelayDP = false;
|
|
|
|
bool CGameSettings::m_DelaySI = false;
|
|
|
|
DWORD CGameSettings::m_RdramSize = 0;
|
2012-12-31 12:46:03 +00:00
|
|
|
bool CGameSettings::m_bFixedAudio = true;
|
|
|
|
bool CGameSettings::m_bSyncingToAudio = true;
|
|
|
|
bool CGameSettings::m_bSyncToAudio = true;
|
|
|
|
bool CGameSettings::m_bFastSP = true;
|
|
|
|
bool CGameSettings::m_b32Bit = true;
|
2012-10-25 08:34:25 +00:00
|
|
|
bool CGameSettings::m_RspAudioSignal;
|
2012-11-29 11:23:35 +00:00
|
|
|
bool CGameSettings::m_bRomInMemory;
|
|
|
|
bool CGameSettings::m_RegCaching;
|
|
|
|
bool CGameSettings::m_bLinkBlocks;
|
|
|
|
DWORD CGameSettings::m_LookUpMode; //FUNC_LOOKUP_METHOD
|
2015-01-26 03:43:37 +00:00
|
|
|
SYSTEM_TYPE CGameSettings::m_SystemType = SYSTEM_NTSC;
|
2012-09-24 01:14:02 +00:00
|
|
|
|
2012-11-29 11:23:35 +00:00
|
|
|
void CGameSettings::RefreshGameSettings()
|
2012-09-24 01:14:02 +00:00
|
|
|
{
|
2012-11-29 11:23:35 +00:00
|
|
|
m_bSMM_StoreInstruc = false /*g_Settings->LoadBool(Game_SMM_StoreInstruc)*/;
|
|
|
|
m_bSMM_Protect = g_Settings->LoadBool(Game_SMM_Protect);
|
|
|
|
m_bSMM_ValidFunc = g_Settings->LoadBool(Game_SMM_ValidFunc);
|
|
|
|
m_bSMM_PIDMA = g_Settings->LoadBool(Game_SMM_PIDMA);
|
|
|
|
m_bSMM_TLB = g_Settings->LoadBool(Game_SMM_TLB);
|
|
|
|
m_bUseTlb = g_Settings->LoadBool(Game_UseTlb);
|
|
|
|
m_ViRefreshRate = g_Settings->LoadDword(Game_ViRefreshRate);
|
|
|
|
m_AiCountPerBytes = g_Settings->LoadDword(Game_AiCountPerBytes);
|
|
|
|
m_CountPerOp = g_Settings->LoadDword(Game_CounterFactor);
|
|
|
|
m_RdramSize = g_Settings->LoadDword(Game_RDRamSize);
|
|
|
|
m_DelaySI = g_Settings->LoadBool(Game_DelaySI);
|
|
|
|
m_DelayDP = g_Settings->LoadBool(Game_DelayDP);
|
|
|
|
m_bFixedAudio = g_Settings->LoadBool(Game_FixedAudio);
|
|
|
|
m_bSyncToAudio = m_bFixedAudio ? g_Settings->LoadBool(Game_SyncViaAudio) : false;
|
|
|
|
m_b32Bit = g_Settings->LoadBool(Game_32Bit);
|
|
|
|
m_bFastSP = g_Settings->LoadBool(Game_FastSP);
|
|
|
|
m_RspAudioSignal = g_Settings->LoadBool(Game_RspAudioSignal);
|
|
|
|
m_bRomInMemory = g_Settings->LoadBool(Game_LoadRomToMemory);
|
|
|
|
m_RegCaching = g_Settings->LoadBool(Game_RegCache);
|
|
|
|
m_bLinkBlocks = g_Settings->LoadBool(Game_BlockLinking);
|
|
|
|
m_LookUpMode = g_Settings->LoadDword(Game_FuncLookupMode);
|
2015-01-26 03:43:37 +00:00
|
|
|
m_SystemType = (SYSTEM_TYPE)g_Settings->LoadDword(Game_SystemType);
|
2012-12-30 20:22:11 +00:00
|
|
|
|
2012-12-31 12:46:03 +00:00
|
|
|
m_bSyncingToAudio = m_bSyncToAudio;
|
2012-12-30 20:22:11 +00:00
|
|
|
if (m_CountPerOp == 0)
|
|
|
|
{
|
|
|
|
m_CountPerOp = 2;
|
|
|
|
}
|
2012-12-31 12:46:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CGameSettings::SpeedChanged (int SpeedLimit )
|
|
|
|
{
|
|
|
|
int FullSpeed = g_System->m_SystemType == SYSTEM_PAL ? 50 : 60;
|
|
|
|
m_bSyncingToAudio = SpeedLimit == FullSpeed ? m_bSyncToAudio : false;
|
|
|
|
}
|