Merge pull request #1041 from RachelBryk/kill-g_CoreStartupParameter
Kill Core::g_CoreStartupParameter.
This commit is contained in:
commit
d1439bc1db
|
@ -8,6 +8,7 @@
|
||||||
#include "AudioCommon/DPL2Decoder.h"
|
#include "AudioCommon/DPL2Decoder.h"
|
||||||
#include "AudioCommon/OpenALStream.h"
|
#include "AudioCommon/OpenALStream.h"
|
||||||
#include "Common/Thread.h"
|
#include "Common/Thread.h"
|
||||||
|
#include "Core/ConfigManager.h"
|
||||||
|
|
||||||
#if defined HAVE_OPENAL && HAVE_OPENAL
|
#if defined HAVE_OPENAL && HAVE_OPENAL
|
||||||
|
|
||||||
|
@ -127,7 +128,7 @@ void OpenALStream::SoundLoop()
|
||||||
{
|
{
|
||||||
Common::SetCurrentThreadName("Audio thread - openal");
|
Common::SetCurrentThreadName("Audio thread - openal");
|
||||||
|
|
||||||
bool surround_capable = Core::g_CoreStartupParameter.bDPL2Decoder;
|
bool surround_capable = SConfig::GetInstance().m_LocalCoreStartupParameter.bDPL2Decoder;
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
bool float32_capable = false;
|
bool float32_capable = false;
|
||||||
const ALenum AL_FORMAT_STEREO_FLOAT32 = 0;
|
const ALenum AL_FORMAT_STEREO_FLOAT32 = 0;
|
||||||
|
@ -139,7 +140,7 @@ void OpenALStream::SoundLoop()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u32 ulFrequency = m_mixer->GetSampleRate();
|
u32 ulFrequency = m_mixer->GetSampleRate();
|
||||||
numBuffers = Core::g_CoreStartupParameter.iLatency + 2; // OpenAL requires a minimum of two buffers
|
numBuffers = SConfig::GetInstance().m_LocalCoreStartupParameter.iLatency + 2; // OpenAL requires a minimum of two buffers
|
||||||
|
|
||||||
memset(uiBuffers, 0, numBuffers * sizeof(ALuint));
|
memset(uiBuffers, 0, numBuffers * sizeof(ALuint));
|
||||||
uiSource = 0;
|
uiSource = 0;
|
||||||
|
|
|
@ -23,10 +23,6 @@ extern bool g_aspect_wide;
|
||||||
namespace Core
|
namespace Core
|
||||||
{
|
{
|
||||||
|
|
||||||
// Get core parameters
|
|
||||||
// TODO: kill, use SConfig instead
|
|
||||||
extern SCoreStartupParameter g_CoreStartupParameter;
|
|
||||||
|
|
||||||
bool GetIsFramelimiterTempDisabled();
|
bool GetIsFramelimiterTempDisabled();
|
||||||
void SetIsFramelimiterTempDisabled(bool disable);
|
void SetIsFramelimiterTempDisabled(bool disable);
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Licensed under GPLv2
|
// Licensed under GPLv2
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/FifoPlayer/FifoAnalyzer.h"
|
#include "Core/FifoPlayer/FifoAnalyzer.h"
|
||||||
|
|
||||||
|
@ -75,7 +76,7 @@ void GetTlutLoadData(u32 &tlutAddr, u32 &memAddr, u32 &tlutXferCount, BPMemory &
|
||||||
tlutXferCount = (bpMem.tmem_config.tlut_dest & 0x1FFC00) >> 5;
|
tlutXferCount = (bpMem.tmem_config.tlut_dest & 0x1FFC00) >> 5;
|
||||||
|
|
||||||
// TODO - figure out a cleaner way.
|
// TODO - figure out a cleaner way.
|
||||||
if (Core::g_CoreStartupParameter.bWii)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||||
memAddr = bpMem.tmem_config.tlut_src << 5;
|
memAddr = bpMem.tmem_config.tlut_src << 5;
|
||||||
else
|
else
|
||||||
memAddr = (bpMem.tmem_config.tlut_src & 0xFFFFF) << 5;
|
memAddr = (bpMem.tmem_config.tlut_src & 0xFFFFF) << 5;
|
||||||
|
|
|
@ -143,10 +143,10 @@ int GetFunctionFlagsByIndex(u32 index)
|
||||||
|
|
||||||
bool IsEnabled(int flags)
|
bool IsEnabled(int flags)
|
||||||
{
|
{
|
||||||
if (flags == HLE::HLE_TYPE_MEMORY && Core::g_CoreStartupParameter.bMMU)
|
if (flags == HLE::HLE_TYPE_MEMORY && SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (flags == HLE::HLE_TYPE_DEBUG && !Core::g_CoreStartupParameter.bEnableDebugging && PowerPC::GetMode() != MODE_INTERPRETER)
|
if (flags == HLE::HLE_TYPE_DEBUG && !SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging && PowerPC::GetMode() != MODE_INTERPRETER)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -115,7 +115,7 @@ CEXIMemoryCard::CEXIMemoryCard(const int index, bool gciFolder)
|
||||||
// Disney Sports : Soccer GDKEA4
|
// Disney Sports : Soccer GDKEA4
|
||||||
// Use a 16Mb (251 block) memory card for these games
|
// Use a 16Mb (251 block) memory card for these games
|
||||||
bool useMC251;
|
bool useMC251;
|
||||||
IniFile gameIni = Core::g_CoreStartupParameter.LoadGameIni();
|
IniFile gameIni = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadGameIni();
|
||||||
gameIni.GetOrCreateSection("Core")->Get("MemoryCard251", &useMC251, false);
|
gameIni.GetOrCreateSection("Core")->Get("MemoryCard251", &useMC251, false);
|
||||||
u16 sizeMb = useMC251 ? MemCard251Mb : MemCard2043Mb;
|
u16 sizeMb = useMC251 ? MemCard251Mb : MemCard2043Mb;
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ void CEXIMemoryCard::SetupGciFolder(u16 sizeMb)
|
||||||
{
|
{
|
||||||
|
|
||||||
DiscIO::IVolume::ECountry CountryCode = DiscIO::IVolume::COUNTRY_UNKNOWN;
|
DiscIO::IVolume::ECountry CountryCode = DiscIO::IVolume::COUNTRY_UNKNOWN;
|
||||||
auto strUniqueID = Core::g_CoreStartupParameter.m_strUniqueID;
|
auto strUniqueID = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID;
|
||||||
|
|
||||||
u32 CurrentGameId = 0;
|
u32 CurrentGameId = 0;
|
||||||
if (strUniqueID == TITLEID_SYSMENU_STRING)
|
if (strUniqueID == TITLEID_SYSMENU_STRING)
|
||||||
|
@ -168,7 +168,7 @@ void CEXIMemoryCard::SetupGciFolder(u16 sizeMb)
|
||||||
case DiscIO::IVolume::COUNTRY_UNKNOWN:
|
case DiscIO::IVolume::COUNTRY_UNKNOWN:
|
||||||
{
|
{
|
||||||
// The current game's region is not passed down to the EXI device level.
|
// The current game's region is not passed down to the EXI device level.
|
||||||
// Usually, we can retrieve the region from Core::g_CoreStartupParameter.m_strUniqueId.
|
// Usually, we can retrieve the region from SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueId.
|
||||||
// The Wii System Menu requires a lookup based on the version number.
|
// The Wii System Menu requires a lookup based on the version number.
|
||||||
// This is not possible in some cases ( e.g. FIFO logs, homebrew elf/dol files).
|
// This is not possible in some cases ( e.g. FIFO logs, homebrew elf/dol files).
|
||||||
// Instead, we then lookup the region from the memory card name
|
// Instead, we then lookup the region from the memory card name
|
||||||
|
@ -176,7 +176,7 @@ void CEXIMemoryCard::SetupGciFolder(u16 sizeMb)
|
||||||
// For now take advantage of this.
|
// For now take advantage of this.
|
||||||
// Future options:
|
// Future options:
|
||||||
// Set memory card directory path in the checkMemcardPath function.
|
// Set memory card directory path in the checkMemcardPath function.
|
||||||
// or Add region to Core::g_CoreStartupParameter.
|
// or Add region to SConfig::GetInstance().m_LocalCoreStartupParameter.
|
||||||
// or Pass region down to the EXI device creation.
|
// or Pass region down to the EXI device creation.
|
||||||
|
|
||||||
std::string memcardFilename = (card_index == 0) ? SConfig::GetInstance().m_strMemoryCardA : SConfig::GetInstance().m_strMemoryCardB;
|
std::string memcardFilename = (card_index == 0) ? SConfig::GetInstance().m_strMemoryCardA : SConfig::GetInstance().m_strMemoryCardB;
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include "Common/ChunkFile.h"
|
#include "Common/ChunkFile.h"
|
||||||
#include "Common/StdMakeUnique.h"
|
#include "Common/StdMakeUnique.h"
|
||||||
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/HW/GCMemcard.h"
|
#include "Core/HW/GCMemcard.h"
|
||||||
#include "Core/HW/GCMemcardRaw.h"
|
#include "Core/HW/GCMemcardRaw.h"
|
||||||
|
@ -60,7 +61,7 @@ MemoryCard::~MemoryCard()
|
||||||
|
|
||||||
void MemoryCard::FlushThread()
|
void MemoryCard::FlushThread()
|
||||||
{
|
{
|
||||||
if (!Core::g_CoreStartupParameter.bEnableMemcardSaving)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableMemcardSaving)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "Common/Atomic.h"
|
#include "Common/Atomic.h"
|
||||||
#include "Common/Common.h"
|
#include "Common/Common.h"
|
||||||
|
|
||||||
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/HW/GPFifo.h"
|
#include "Core/HW/GPFifo.h"
|
||||||
#include "Core/HW/Memmap.h"
|
#include "Core/HW/Memmap.h"
|
||||||
|
@ -240,8 +241,8 @@ u32 Read_Opcode(u32 _Address)
|
||||||
return 0x00000000;
|
return 0x00000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bMMU &&
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU &&
|
||||||
!Core::g_CoreStartupParameter.bTLBHack &&
|
!SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack &&
|
||||||
(_Address & ADDR_MASK_MEM1))
|
(_Address & ADDR_MASK_MEM1))
|
||||||
{
|
{
|
||||||
// TODO: Check for MSR instruction address translation flag before translating
|
// TODO: Check for MSR instruction address translation flag before translating
|
||||||
|
@ -880,7 +881,7 @@ static u32 TranslateBlockAddress(const u32 addr, const XCheckTLBFlag _Flag)
|
||||||
u32 batu = (m_MSR.PR ? BATU_Vp : BATU_Vs);
|
u32 batu = (m_MSR.PR ? BATU_Vp : BATU_Vs);
|
||||||
|
|
||||||
// Check for enhanced mode (secondary BAT enable) using 8 BATs
|
// Check for enhanced mode (secondary BAT enable) using 8 BATs
|
||||||
bool enhanced_bats = Core::g_CoreStartupParameter.bWii && HID4.SBE;
|
bool enhanced_bats = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii && HID4.SBE;
|
||||||
|
|
||||||
if (_Flag != FLAG_OPCODE)
|
if (_Flag != FLAG_OPCODE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "Common/Common.h"
|
#include "Common/Common.h"
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
|
|
||||||
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/CoreTiming.h"
|
#include "Core/CoreTiming.h"
|
||||||
#include "Core/State.h"
|
#include "Core/State.h"
|
||||||
|
@ -136,10 +137,10 @@ void Preset(bool _bNTSC)
|
||||||
m_VBeamPos = 0; // RG4JC0 checks for a zero VBeamPos
|
m_VBeamPos = 0; // RG4JC0 checks for a zero VBeamPos
|
||||||
|
|
||||||
// 54MHz, capable of progressive scan
|
// 54MHz, capable of progressive scan
|
||||||
m_Clock = Core::g_CoreStartupParameter.bProgressive;
|
m_Clock = SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive;
|
||||||
|
|
||||||
// Say component cable is plugged
|
// Say component cable is plugged
|
||||||
m_DTVStatus.component_plugged = Core::g_CoreStartupParameter.bProgressive;
|
m_DTVStatus.component_plugged = SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive;
|
||||||
|
|
||||||
UpdateParameters();
|
UpdateParameters();
|
||||||
}
|
}
|
||||||
|
@ -171,7 +172,7 @@ void Init()
|
||||||
|
|
||||||
fields = 1;
|
fields = 1;
|
||||||
|
|
||||||
m_DTVStatus.ntsc_j = Core::g_CoreStartupParameter.bForceNTSCJ;
|
m_DTVStatus.ntsc_j = SConfig::GetInstance().m_LocalCoreStartupParameter.bForceNTSCJ;
|
||||||
|
|
||||||
for (UVIInterruptRegister& reg : m_InterruptRegister)
|
for (UVIInterruptRegister& reg : m_InterruptRegister)
|
||||||
{
|
{
|
||||||
|
@ -399,7 +400,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
|
||||||
|
|
||||||
void SetRegionReg(char region)
|
void SetRegionReg(char region)
|
||||||
{
|
{
|
||||||
if (!Core::g_CoreStartupParameter.bForceNTSCJ)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bForceNTSCJ)
|
||||||
m_DTVStatus.ntsc_j = region == 'J';
|
m_DTVStatus.ntsc_j = region == 'J';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -477,7 +478,7 @@ void UpdateParameters()
|
||||||
|
|
||||||
int GetNumFields()
|
int GetNumFields()
|
||||||
{
|
{
|
||||||
if (Core::g_CoreStartupParameter.bVBeamSpeedHack)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bVBeamSpeedHack)
|
||||||
return (2 / fields);
|
return (2 / fields);
|
||||||
else
|
else
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -491,7 +492,7 @@ unsigned int GetTicksPerLine()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (Core::g_CoreStartupParameter.bVBeamSpeedHack)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bVBeamSpeedHack)
|
||||||
return TicksPerFrame / s_lineCount;
|
return TicksPerFrame / s_lineCount;
|
||||||
else
|
else
|
||||||
return TicksPerFrame / (s_lineCount / (2 / fields)) ;
|
return TicksPerFrame / (s_lineCount / (2 / fields)) ;
|
||||||
|
|
|
@ -200,14 +200,14 @@ bool Wiimote::Read()
|
||||||
|
|
||||||
if (result > 0 && m_channel > 0)
|
if (result > 0 && m_channel > 0)
|
||||||
{
|
{
|
||||||
if (Core::g_CoreStartupParameter.iBBDumpPort > 0 &&
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.iBBDumpPort > 0 &&
|
||||||
index == WIIMOTE_BALANCE_BOARD)
|
index == WIIMOTE_BALANCE_BOARD)
|
||||||
{
|
{
|
||||||
static sf::SocketUDP Socket;
|
static sf::SocketUDP Socket;
|
||||||
Socket.Send((char*)rpt.data(),
|
Socket.Send((char*)rpt.data(),
|
||||||
rpt.size(),
|
rpt.size(),
|
||||||
sf::IPAddress::LocalHost,
|
sf::IPAddress::LocalHost,
|
||||||
Core::g_CoreStartupParameter.iBBDumpPort);
|
SConfig::GetInstance().m_LocalCoreStartupParameter.iBBDumpPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add it to queue
|
// Add it to queue
|
||||||
|
@ -234,10 +234,10 @@ bool Wiimote::Write()
|
||||||
|
|
||||||
if (!is_speaker_data || m_last_audio_report.GetTimeDifference() > 5)
|
if (!is_speaker_data || m_last_audio_report.GetTimeDifference() > 5)
|
||||||
{
|
{
|
||||||
if (Core::g_CoreStartupParameter.iBBDumpPort > 0 && index == WIIMOTE_BALANCE_BOARD)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.iBBDumpPort > 0 && index == WIIMOTE_BALANCE_BOARD)
|
||||||
{
|
{
|
||||||
static sf::SocketUDP Socket;
|
static sf::SocketUDP Socket;
|
||||||
Socket.Send((char*)rpt.data(), rpt.size(), sf::IPAddress::LocalHost, Core::g_CoreStartupParameter.iBBDumpPort);
|
Socket.Send((char*)rpt.data(), rpt.size(), sf::IPAddress::LocalHost, SConfig::GetInstance().m_LocalCoreStartupParameter.iBBDumpPort);
|
||||||
}
|
}
|
||||||
IOWrite(rpt.data(), rpt.size());
|
IOWrite(rpt.data(), rpt.size());
|
||||||
|
|
||||||
|
|
|
@ -175,9 +175,9 @@ void Init()
|
||||||
ReadHeader();
|
ReadHeader();
|
||||||
std::thread md5thread(CheckMD5);
|
std::thread md5thread(CheckMD5);
|
||||||
md5thread.detach();
|
md5thread.detach();
|
||||||
if ((strncmp((char *)tmpHeader.gameID, Core::g_CoreStartupParameter.GetUniqueID().c_str(), 6)))
|
if ((strncmp((char *)tmpHeader.gameID, SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID().c_str(), 6)))
|
||||||
{
|
{
|
||||||
PanicAlert("The recorded game (%s) is not the same as the selected game (%s)", tmpHeader.gameID, Core::g_CoreStartupParameter.GetUniqueID().c_str());
|
PanicAlert("The recorded game (%s) is not the same as the selected game (%s)", tmpHeader.gameID, SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID().c_str());
|
||||||
EndPlayInput(false);
|
EndPlayInput(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -471,7 +471,7 @@ bool BeginRecordingInput(int controllers)
|
||||||
|
|
||||||
// This is only done here if starting from save state because otherwise we won't have the titleid. Otherwise it's set in WII_IPC_HLE_Device_es.cpp.
|
// This is only done here if starting from save state because otherwise we won't have the titleid. Otherwise it's set in WII_IPC_HLE_Device_es.cpp.
|
||||||
// TODO: find a way to GetTitleDataPath() from Movie::Init()
|
// TODO: find a way to GetTitleDataPath() from Movie::Init()
|
||||||
if (Core::g_CoreStartupParameter.bWii)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||||
{
|
{
|
||||||
if (File::Exists(Common::GetTitleDataPath(g_titleID) + "banner.bin"))
|
if (File::Exists(Common::GetTitleDataPath(g_titleID) + "banner.bin"))
|
||||||
Movie::g_bClearSave = false;
|
Movie::g_bClearSave = false;
|
||||||
|
@ -831,7 +831,7 @@ void LoadInput(const std::string& filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangePads(true);
|
ChangePads(true);
|
||||||
if (Core::g_CoreStartupParameter.bWii)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||||
ChangeWiiPads(true);
|
ChangeWiiPads(true);
|
||||||
|
|
||||||
u64 totalSavedBytes = t_record.GetSize() - 256;
|
u64 totalSavedBytes = t_record.GetSize() - 256;
|
||||||
|
@ -1123,9 +1123,9 @@ void SaveRecording(const std::string& filename)
|
||||||
memset(&header, 0, sizeof(DTMHeader));
|
memset(&header, 0, sizeof(DTMHeader));
|
||||||
|
|
||||||
header.filetype[0] = 'D'; header.filetype[1] = 'T'; header.filetype[2] = 'M'; header.filetype[3] = 0x1A;
|
header.filetype[0] = 'D'; header.filetype[1] = 'T'; header.filetype[2] = 'M'; header.filetype[3] = 0x1A;
|
||||||
strncpy((char *)header.gameID, Core::g_CoreStartupParameter.GetUniqueID().c_str(), 6);
|
strncpy((char *)header.gameID, SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID().c_str(), 6);
|
||||||
header.bWii = Core::g_CoreStartupParameter.bWii;
|
header.bWii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
|
||||||
header.numControllers = g_numPads & (Core::g_CoreStartupParameter.bWii ? 0xFF : 0x0F);
|
header.numControllers = g_numPads & (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii ? 0xFF : 0x0F);
|
||||||
|
|
||||||
header.bFromSaveState = g_bRecordingFromSaveState;
|
header.bFromSaveState = g_bRecordingFromSaveState;
|
||||||
header.frameCount = g_totalFrames;
|
header.frameCount = g_totalFrames;
|
||||||
|
@ -1216,7 +1216,7 @@ void GetSettings()
|
||||||
bSyncGPU = SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPU;
|
bSyncGPU = SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPU;
|
||||||
iCPUCore = SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore;
|
iCPUCore = SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore;
|
||||||
bNetPlay = NetPlay::IsNetPlayRunning();
|
bNetPlay = NetPlay::IsNetPlayRunning();
|
||||||
if (!Core::g_CoreStartupParameter.bWii)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||||
g_bClearSave = !File::Exists(SConfig::GetInstance().m_strMemoryCardA);
|
g_bClearSave = !File::Exists(SConfig::GetInstance().m_strMemoryCardA);
|
||||||
memcards |= (SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD) << 0;
|
memcards |= (SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD) << 0;
|
||||||
memcards |= (SConfig::GetInstance().m_EXIDevice[1] == EXIDEVICE_MEMORYCARD) << 1;
|
memcards |= (SConfig::GetInstance().m_EXIDevice[1] == EXIDEVICE_MEMORYCARD) << 1;
|
||||||
|
|
|
@ -359,7 +359,7 @@ void Interpreter::dcbtst(UGeckoInstruction _inst)
|
||||||
void Interpreter::dcbz(UGeckoInstruction _inst)
|
void Interpreter::dcbz(UGeckoInstruction _inst)
|
||||||
{
|
{
|
||||||
// HACK but works... we think
|
// HACK but works... we think
|
||||||
if (!Core::g_CoreStartupParameter.bDCBZOFF)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bDCBZOFF)
|
||||||
Memory::ClearCacheLine(Helper_Get_EA_X(_inst) & (~31));
|
Memory::ClearCacheLine(Helper_Get_EA_X(_inst) & (~31));
|
||||||
if (!JitInterface::GetCore())
|
if (!JitInterface::GetCore())
|
||||||
PowerPC::CheckExceptions();
|
PowerPC::CheckExceptions();
|
||||||
|
|
|
@ -142,27 +142,27 @@ void Jit64::Init()
|
||||||
where this cause problems, so I'm enabling this by default, since I seem to get perhaps as much as 20% more
|
where this cause problems, so I'm enabling this by default, since I seem to get perhaps as much as 20% more
|
||||||
fps with this option enabled. If you suspect that this option cause problems you can also disable it from the
|
fps with this option enabled. If you suspect that this option cause problems you can also disable it from the
|
||||||
debugging window. */
|
debugging window. */
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
{
|
{
|
||||||
jo.enableBlocklink = false;
|
jo.enableBlocklink = false;
|
||||||
Core::g_CoreStartupParameter.bSkipIdle = false;
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!Core::g_CoreStartupParameter.bJITBlockLinking)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bJITBlockLinking)
|
||||||
{
|
{
|
||||||
jo.enableBlocklink = false;
|
jo.enableBlocklink = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
jo.enableBlocklink = !Core::g_CoreStartupParameter.bMMU;
|
jo.enableBlocklink = !SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
jo.fpAccurateFcmp = Core::g_CoreStartupParameter.bEnableFPRF;
|
jo.fpAccurateFcmp = SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableFPRF;
|
||||||
jo.optimizeGatherPipe = true;
|
jo.optimizeGatherPipe = true;
|
||||||
jo.fastInterrupts = false;
|
jo.fastInterrupts = false;
|
||||||
jo.accurateSinglePrecision = true;
|
jo.accurateSinglePrecision = true;
|
||||||
js.memcheck = Core::g_CoreStartupParameter.bMMU;
|
js.memcheck = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU;
|
||||||
|
|
||||||
gpr.SetEmitter(this);
|
gpr.SetEmitter(this);
|
||||||
fpr.SetEmitter(this);
|
fpr.SetEmitter(this);
|
||||||
|
@ -372,7 +372,7 @@ void Jit64::Trace()
|
||||||
|
|
||||||
void STACKALIGN Jit64::Jit(u32 em_address)
|
void STACKALIGN Jit64::Jit(u32 em_address)
|
||||||
{
|
{
|
||||||
if (GetSpaceLeft() < 0x10000 || blocks.IsFull() || Core::g_CoreStartupParameter.bJITNoBlockCache)
|
if (GetSpaceLeft() < 0x10000 || blocks.IsFull() || SConfig::GetInstance().m_LocalCoreStartupParameter.bJITNoBlockCache)
|
||||||
{
|
{
|
||||||
ClearCache();
|
ClearCache();
|
||||||
}
|
}
|
||||||
|
@ -386,7 +386,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
|
||||||
{
|
{
|
||||||
int blockSize = code_buf->GetSize();
|
int blockSize = code_buf->GetSize();
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
{
|
{
|
||||||
// Comment out the following to disable breakpoints (speed-up)
|
// Comment out the following to disable breakpoints (speed-up)
|
||||||
if (!Profiler::g_ProfileBlocks)
|
if (!Profiler::g_ProfileBlocks)
|
||||||
|
@ -453,7 +453,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
|
||||||
fpr.Start();
|
fpr.Start();
|
||||||
|
|
||||||
js.downcountAmount = 0;
|
js.downcountAmount = 0;
|
||||||
if (!Core::g_CoreStartupParameter.bEnableDebugging)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
js.downcountAmount += PatchEngine::GetSpeedhackCycles(code_block.m_address);
|
js.downcountAmount += PatchEngine::GetSpeedhackCycles(code_block.m_address);
|
||||||
|
|
||||||
js.skipnext = false;
|
js.skipnext = false;
|
||||||
|
@ -567,7 +567,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
|
||||||
SetJumpTarget(clearInt);
|
SetJumpTarget(clearInt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != CPU_STEPPING)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != CPU_STEPPING)
|
||||||
{
|
{
|
||||||
gpr.Flush();
|
gpr.Flush();
|
||||||
fpr.Flush();
|
fpr.Flush();
|
||||||
|
|
|
@ -25,14 +25,14 @@ void Jit64AsmRoutineManager::Generate()
|
||||||
|
|
||||||
const u8* outerLoop = GetCodePtr();
|
const u8* outerLoop = GetCodePtr();
|
||||||
ABI_CallFunction(reinterpret_cast<void *>(&CoreTiming::Advance));
|
ABI_CallFunction(reinterpret_cast<void *>(&CoreTiming::Advance));
|
||||||
FixupBranch skipToRealDispatch = J(Core::g_CoreStartupParameter.bEnableDebugging); //skip the sync and compare first time
|
FixupBranch skipToRealDispatch = J(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging); //skip the sync and compare first time
|
||||||
|
|
||||||
dispatcher = GetCodePtr();
|
dispatcher = GetCodePtr();
|
||||||
// The result of slice decrementation should be in flags if somebody jumped here
|
// The result of slice decrementation should be in flags if somebody jumped here
|
||||||
// IMPORTANT - We jump on negative, not carry!!!
|
// IMPORTANT - We jump on negative, not carry!!!
|
||||||
FixupBranch bail = J_CC(CC_BE, true);
|
FixupBranch bail = J_CC(CC_BE, true);
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
{
|
{
|
||||||
TEST(32, M((void*)PowerPC::GetStatePtr()), Imm32(PowerPC::CPU_STEPPING));
|
TEST(32, M((void*)PowerPC::GetStatePtr()), Imm32(PowerPC::CPU_STEPPING));
|
||||||
FixupBranch notStepping = J_CC(CC_Z);
|
FixupBranch notStepping = J_CC(CC_Z);
|
||||||
|
@ -55,11 +55,11 @@ void Jit64AsmRoutineManager::Generate()
|
||||||
FixupBranch no_mem;
|
FixupBranch no_mem;
|
||||||
FixupBranch exit_mem;
|
FixupBranch exit_mem;
|
||||||
FixupBranch exit_vmem;
|
FixupBranch exit_vmem;
|
||||||
if (Core::g_CoreStartupParameter.bWii)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||||
mask = JIT_ICACHE_EXRAM_BIT;
|
mask = JIT_ICACHE_EXRAM_BIT;
|
||||||
if (Core::g_CoreStartupParameter.bMMU || Core::g_CoreStartupParameter.bTLBHack)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
|
||||||
mask |= JIT_ICACHE_VMEM_BIT;
|
mask |= JIT_ICACHE_VMEM_BIT;
|
||||||
if (Core::g_CoreStartupParameter.bWii || Core::g_CoreStartupParameter.bMMU || Core::g_CoreStartupParameter.bTLBHack)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii || SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
|
||||||
{
|
{
|
||||||
TEST(32, R(RSCRATCH), Imm32(mask));
|
TEST(32, R(RSCRATCH), Imm32(mask));
|
||||||
no_mem = J_CC(CC_NZ);
|
no_mem = J_CC(CC_NZ);
|
||||||
|
@ -68,12 +68,12 @@ void Jit64AsmRoutineManager::Generate()
|
||||||
MOV(64, R(RSCRATCH2), Imm64((u64)jit->GetBlockCache()->iCache));
|
MOV(64, R(RSCRATCH2), Imm64((u64)jit->GetBlockCache()->iCache));
|
||||||
MOV(32, R(RSCRATCH), MComplex(RSCRATCH2, RSCRATCH, SCALE_1, 0));
|
MOV(32, R(RSCRATCH), MComplex(RSCRATCH2, RSCRATCH, SCALE_1, 0));
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bWii || Core::g_CoreStartupParameter.bMMU || Core::g_CoreStartupParameter.bTLBHack)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii || SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
|
||||||
{
|
{
|
||||||
exit_mem = J();
|
exit_mem = J();
|
||||||
SetJumpTarget(no_mem);
|
SetJumpTarget(no_mem);
|
||||||
}
|
}
|
||||||
if (Core::g_CoreStartupParameter.bMMU || Core::g_CoreStartupParameter.bTLBHack)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
|
||||||
{
|
{
|
||||||
TEST(32, R(RSCRATCH), Imm32(JIT_ICACHE_VMEM_BIT));
|
TEST(32, R(RSCRATCH), Imm32(JIT_ICACHE_VMEM_BIT));
|
||||||
FixupBranch no_vmem = J_CC(CC_Z);
|
FixupBranch no_vmem = J_CC(CC_Z);
|
||||||
|
@ -81,10 +81,10 @@ void Jit64AsmRoutineManager::Generate()
|
||||||
MOV(64, R(RSCRATCH2), Imm64((u64)jit->GetBlockCache()->iCacheVMEM));
|
MOV(64, R(RSCRATCH2), Imm64((u64)jit->GetBlockCache()->iCacheVMEM));
|
||||||
MOV(32, R(RSCRATCH), MComplex(RSCRATCH2, RSCRATCH, SCALE_1, 0));
|
MOV(32, R(RSCRATCH), MComplex(RSCRATCH2, RSCRATCH, SCALE_1, 0));
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bWii) exit_vmem = J();
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) exit_vmem = J();
|
||||||
SetJumpTarget(no_vmem);
|
SetJumpTarget(no_vmem);
|
||||||
}
|
}
|
||||||
if (Core::g_CoreStartupParameter.bWii)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||||
{
|
{
|
||||||
TEST(32, R(RSCRATCH), Imm32(JIT_ICACHE_EXRAM_BIT));
|
TEST(32, R(RSCRATCH), Imm32(JIT_ICACHE_EXRAM_BIT));
|
||||||
FixupBranch no_exram = J_CC(CC_Z);
|
FixupBranch no_exram = J_CC(CC_Z);
|
||||||
|
@ -94,9 +94,9 @@ void Jit64AsmRoutineManager::Generate()
|
||||||
|
|
||||||
SetJumpTarget(no_exram);
|
SetJumpTarget(no_exram);
|
||||||
}
|
}
|
||||||
if (Core::g_CoreStartupParameter.bWii || Core::g_CoreStartupParameter.bMMU || Core::g_CoreStartupParameter.bTLBHack)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii || SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
|
||||||
SetJumpTarget(exit_mem);
|
SetJumpTarget(exit_mem);
|
||||||
if (Core::g_CoreStartupParameter.bWii && (Core::g_CoreStartupParameter.bMMU || Core::g_CoreStartupParameter.bTLBHack))
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii && (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack))
|
||||||
SetJumpTarget(exit_vmem);
|
SetJumpTarget(exit_vmem);
|
||||||
|
|
||||||
TEST(32, R(RSCRATCH), R(RSCRATCH));
|
TEST(32, R(RSCRATCH), R(RSCRATCH));
|
||||||
|
|
|
@ -100,7 +100,7 @@ void Jit64::SetFPRFIfNeeded(UGeckoInstruction inst, X64Reg xmm)
|
||||||
// As far as we know, the games that use this flag only need FPRF for fmul and fmadd, but
|
// As far as we know, the games that use this flag only need FPRF for fmul and fmadd, but
|
||||||
// FPRF is fast enough in JIT that we might as well just enable it for every float instruction
|
// FPRF is fast enough in JIT that we might as well just enable it for every float instruction
|
||||||
// if the enableFPRF flag is set.
|
// if the enableFPRF flag is set.
|
||||||
if (Core::g_CoreStartupParameter.bEnableFPRF && js.op->wantsFPRF)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableFPRF && js.op->wantsFPRF)
|
||||||
SetFPRF(xmm);
|
SetFPRF(xmm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ void Jit64::fcmpx(UGeckoInstruction inst)
|
||||||
int a = inst.FA;
|
int a = inst.FA;
|
||||||
int b = inst.FB;
|
int b = inst.FB;
|
||||||
int crf = inst.CRFD;
|
int crf = inst.CRFD;
|
||||||
bool fprf = Core::g_CoreStartupParameter.bEnableFPRF && js.op->wantsFPRF;
|
bool fprf = SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableFPRF && js.op->wantsFPRF;
|
||||||
|
|
||||||
fpr.Lock(a,b);
|
fpr.Lock(a,b);
|
||||||
fpr.BindToRegister(b, true);
|
fpr.BindToRegister(b, true);
|
||||||
|
|
|
@ -203,7 +203,7 @@ void Jit64::reg_imm(UGeckoInstruction inst)
|
||||||
if (a == 0) // lis
|
if (a == 0) // lis
|
||||||
{
|
{
|
||||||
// Merge with next instruction if loading a 32-bits immediate value (lis + addi, lis + ori)
|
// Merge with next instruction if loading a 32-bits immediate value (lis + addi, lis + ori)
|
||||||
if (!js.isLastInstruction && !Core::g_CoreStartupParameter.bEnableDebugging)
|
if (!js.isLastInstruction && !SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
{
|
{
|
||||||
if ((js.next_inst.OPCD == 14) && (js.next_inst.RD == d) && (js.next_inst.RA == d)) // addi
|
if ((js.next_inst.OPCD == 14) && (js.next_inst.RD == d) && (js.next_inst.RA == d)) // addi
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,9 +21,9 @@ void Jit64::lXXx(UGeckoInstruction inst)
|
||||||
int a = inst.RA, b = inst.RB, d = inst.RD;
|
int a = inst.RA, b = inst.RB, d = inst.RD;
|
||||||
|
|
||||||
// Skip disabled JIT instructions
|
// Skip disabled JIT instructions
|
||||||
FALLBACK_IF(Core::g_CoreStartupParameter.bJITLoadStorelbzxOff && (inst.OPCD == 31) && (inst.SUBOP10 == 87));
|
FALLBACK_IF(SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelbzxOff && (inst.OPCD == 31) && (inst.SUBOP10 == 87));
|
||||||
FALLBACK_IF(Core::g_CoreStartupParameter.bJITLoadStorelXzOff && ((inst.OPCD == 34) || (inst.OPCD == 40) || (inst.OPCD == 32)));
|
FALLBACK_IF(SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelXzOff && ((inst.OPCD == 34) || (inst.OPCD == 40) || (inst.OPCD == 32)));
|
||||||
FALLBACK_IF(Core::g_CoreStartupParameter.bJITLoadStorelwzOff && (inst.OPCD == 32));
|
FALLBACK_IF(SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelwzOff && (inst.OPCD == 32));
|
||||||
|
|
||||||
// Determine memory access size and sign extend
|
// Determine memory access size and sign extend
|
||||||
int accessSize = 0;
|
int accessSize = 0;
|
||||||
|
@ -264,14 +264,14 @@ void Jit64::dcbz(UGeckoInstruction inst)
|
||||||
{
|
{
|
||||||
INSTRUCTION_START
|
INSTRUCTION_START
|
||||||
JITDISABLE(bJITLoadStoreOff);
|
JITDISABLE(bJITLoadStoreOff);
|
||||||
if (Core::g_CoreStartupParameter.bDCBZOFF)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDCBZOFF)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int a = inst.RA;
|
int a = inst.RA;
|
||||||
int b = inst.RB;
|
int b = inst.RB;
|
||||||
|
|
||||||
u32 mem_mask = Memory::ADDR_MASK_HW_ACCESS;
|
u32 mem_mask = Memory::ADDR_MASK_HW_ACCESS;
|
||||||
if (Core::g_CoreStartupParameter.bMMU || Core::g_CoreStartupParameter.bTLBHack)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
|
||||||
mem_mask |= Memory::ADDR_MASK_MEM1;
|
mem_mask |= Memory::ADDR_MASK_MEM1;
|
||||||
|
|
||||||
MOV(32, R(RSCRATCH), gpr.R(b));
|
MOV(32, R(RSCRATCH), gpr.R(b));
|
||||||
|
|
|
@ -247,21 +247,21 @@ void JitIL::Init()
|
||||||
{
|
{
|
||||||
jo.optimizeStack = true;
|
jo.optimizeStack = true;
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
{
|
{
|
||||||
jo.enableBlocklink = false;
|
jo.enableBlocklink = false;
|
||||||
Core::g_CoreStartupParameter.bSkipIdle = false;
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!Core::g_CoreStartupParameter.bJITBlockLinking)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bJITBlockLinking)
|
||||||
{
|
{
|
||||||
jo.enableBlocklink = false;
|
jo.enableBlocklink = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Speed boost, but not 100% safe
|
// Speed boost, but not 100% safe
|
||||||
jo.enableBlocklink = !Core::g_CoreStartupParameter.bMMU;
|
jo.enableBlocklink = !SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ void JitIL::Init()
|
||||||
jo.optimizeGatherPipe = true;
|
jo.optimizeGatherPipe = true;
|
||||||
jo.fastInterrupts = false;
|
jo.fastInterrupts = false;
|
||||||
jo.accurateSinglePrecision = false;
|
jo.accurateSinglePrecision = false;
|
||||||
js.memcheck = Core::g_CoreStartupParameter.bMMU;
|
js.memcheck = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU;
|
||||||
|
|
||||||
trampolines.Init();
|
trampolines.Init();
|
||||||
AllocCodeSpace(CODE_SIZE);
|
AllocCodeSpace(CODE_SIZE);
|
||||||
|
@ -504,7 +504,7 @@ void JitIL::Trace()
|
||||||
|
|
||||||
void STACKALIGN JitIL::Jit(u32 em_address)
|
void STACKALIGN JitIL::Jit(u32 em_address)
|
||||||
{
|
{
|
||||||
if (GetSpaceLeft() < 0x10000 || blocks.IsFull() || Core::g_CoreStartupParameter.bJITNoBlockCache)
|
if (GetSpaceLeft() < 0x10000 || blocks.IsFull() || SConfig::GetInstance().m_LocalCoreStartupParameter.bJITNoBlockCache)
|
||||||
{
|
{
|
||||||
ClearCache();
|
ClearCache();
|
||||||
}
|
}
|
||||||
|
@ -517,7 +517,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
|
||||||
{
|
{
|
||||||
int blockSize = code_buf->GetSize();
|
int blockSize = code_buf->GetSize();
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
{
|
{
|
||||||
// Comment out the following to disable breakpoints (speed-up)
|
// Comment out the following to disable breakpoints (speed-up)
|
||||||
if (!Profiler::g_ProfileBlocks)
|
if (!Profiler::g_ProfileBlocks)
|
||||||
|
@ -599,7 +599,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
|
||||||
ibuild.Reset();
|
ibuild.Reset();
|
||||||
|
|
||||||
js.downcountAmount = 0;
|
js.downcountAmount = 0;
|
||||||
if (!Core::g_CoreStartupParameter.bEnableDebugging)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
js.downcountAmount += PatchEngine::GetSpeedhackCycles(code_block.m_address);
|
js.downcountAmount += PatchEngine::GetSpeedhackCycles(code_block.m_address);
|
||||||
|
|
||||||
// Translate instructions
|
// Translate instructions
|
||||||
|
@ -656,7 +656,7 @@ const u8* JitIL::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBloc
|
||||||
ibuild.EmitExtExceptionCheck(ibuild.EmitIntConst(ops[i].address));
|
ibuild.EmitExtExceptionCheck(ibuild.EmitIntConst(ops[i].address));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != CPU_STEPPING)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging && breakpoints.IsAddressBreakPoint(ops[i].address) && GetState() != CPU_STEPPING)
|
||||||
{
|
{
|
||||||
ibuild.EmitBreakPointCheck(ibuild.EmitIntConst(ops[i].address));
|
ibuild.EmitBreakPointCheck(ibuild.EmitIntConst(ops[i].address));
|
||||||
}
|
}
|
||||||
|
|
|
@ -285,7 +285,7 @@ void JitArm::PrintDebug(UGeckoInstruction inst, u32 level)
|
||||||
|
|
||||||
void STACKALIGN JitArm::Jit(u32 em_address)
|
void STACKALIGN JitArm::Jit(u32 em_address)
|
||||||
{
|
{
|
||||||
if (GetSpaceLeft() < 0x10000 || blocks.IsFull() || Core::g_CoreStartupParameter.bJITNoBlockCache)
|
if (GetSpaceLeft() < 0x10000 || blocks.IsFull() || SConfig::GetInstance().m_LocalCoreStartupParameter.bJITNoBlockCache)
|
||||||
{
|
{
|
||||||
ClearCache();
|
ClearCache();
|
||||||
}
|
}
|
||||||
|
@ -305,7 +305,7 @@ const u8* JitArm::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBlo
|
||||||
{
|
{
|
||||||
int blockSize = code_buf->GetSize();
|
int blockSize = code_buf->GetSize();
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
{
|
{
|
||||||
// Comment out the following to disable breakpoints (speed-up)
|
// Comment out the following to disable breakpoints (speed-up)
|
||||||
blockSize = 1;
|
blockSize = 1;
|
||||||
|
@ -394,7 +394,7 @@ const u8* JitArm::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBlo
|
||||||
fpr.Start(js.fpa);
|
fpr.Start(js.fpa);
|
||||||
js.downcountAmount = 0;
|
js.downcountAmount = 0;
|
||||||
|
|
||||||
if (!Core::g_CoreStartupParameter.bEnableDebugging)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
js.downcountAmount += PatchEngine::GetSpeedhackCycles(em_address);
|
js.downcountAmount += PatchEngine::GetSpeedhackCycles(em_address);
|
||||||
|
|
||||||
js.skipnext = false;
|
js.skipnext = false;
|
||||||
|
@ -445,7 +445,7 @@ const u8* JitArm::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBlo
|
||||||
POP(4, R0, R1, R2, R3);
|
POP(4, R0, R1, R2, R3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
{
|
{
|
||||||
// Add run count
|
// Add run count
|
||||||
static const u64 One = 1;
|
static const u64 One = 1;
|
||||||
|
|
|
@ -52,7 +52,7 @@ void JitArm::UnsafeStoreFromReg(ARMReg dest, ARMReg value, int accessSize, s32 o
|
||||||
|
|
||||||
void JitArm::SafeStoreFromReg(bool fastmem, s32 dest, u32 value, s32 regOffset, int accessSize, s32 offset)
|
void JitArm::SafeStoreFromReg(bool fastmem, s32 dest, u32 value, s32 regOffset, int accessSize, s32 offset)
|
||||||
{
|
{
|
||||||
if (Core::g_CoreStartupParameter.bFastmem && fastmem)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem && fastmem)
|
||||||
{
|
{
|
||||||
ARMReg RA;
|
ARMReg RA;
|
||||||
ARMReg RB;
|
ARMReg RB;
|
||||||
|
@ -269,7 +269,7 @@ void JitArm::SafeLoadToReg(bool fastmem, u32 dest, s32 addr, s32 offsetReg, int
|
||||||
{
|
{
|
||||||
ARMReg RD = gpr.R(dest);
|
ARMReg RD = gpr.R(dest);
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bFastmem && fastmem)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem && fastmem)
|
||||||
{
|
{
|
||||||
// Preload for fastmem
|
// Preload for fastmem
|
||||||
if (offsetReg != -1)
|
if (offsetReg != -1)
|
||||||
|
@ -478,7 +478,7 @@ void JitArm::lmw(UGeckoInstruction inst)
|
||||||
{
|
{
|
||||||
INSTRUCTION_START
|
INSTRUCTION_START
|
||||||
JITDISABLE(bJITLoadStoreOff);
|
JITDISABLE(bJITLoadStoreOff);
|
||||||
FALLBACK_IF(!Core::g_CoreStartupParameter.bFastmem);
|
FALLBACK_IF(!SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem);
|
||||||
|
|
||||||
u32 a = inst.RA;
|
u32 a = inst.RA;
|
||||||
ARMReg rA = gpr.GetReg();
|
ARMReg rA = gpr.GetReg();
|
||||||
|
@ -504,7 +504,7 @@ void JitArm::stmw(UGeckoInstruction inst)
|
||||||
{
|
{
|
||||||
INSTRUCTION_START
|
INSTRUCTION_START
|
||||||
JITDISABLE(bJITLoadStoreOff);
|
JITDISABLE(bJITLoadStoreOff);
|
||||||
FALLBACK_IF(!Core::g_CoreStartupParameter.bFastmem);
|
FALLBACK_IF(!SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem);
|
||||||
|
|
||||||
u32 a = inst.RA;
|
u32 a = inst.RA;
|
||||||
ARMReg rA = gpr.GetReg();
|
ARMReg rA = gpr.GetReg();
|
||||||
|
|
|
@ -132,7 +132,7 @@ void JitArm::lfXX(UGeckoInstruction inst)
|
||||||
if (update)
|
if (update)
|
||||||
MOV(RA, rB);
|
MOV(RA, rB);
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bFastmem)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem)
|
||||||
{
|
{
|
||||||
Operand2 mask(2, 1); // ~(Memory::MEMVIEW32_MASK)
|
Operand2 mask(2, 1); // ~(Memory::MEMVIEW32_MASK)
|
||||||
BIC(rB, rB, mask); // 1
|
BIC(rB, rB, mask); // 1
|
||||||
|
@ -299,7 +299,7 @@ void JitArm::stfXX(UGeckoInstruction inst)
|
||||||
MOV(RA, rB);
|
MOV(RA, rB);
|
||||||
SetCC();
|
SetCC();
|
||||||
}
|
}
|
||||||
if (Core::g_CoreStartupParameter.bFastmem)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem)
|
||||||
{
|
{
|
||||||
Operand2 mask(2, 1); // ~(Memory::MEMVIEW32_MASK)
|
Operand2 mask(2, 1); // ~(Memory::MEMVIEW32_MASK)
|
||||||
BIC(rB, rB, mask); // 1
|
BIC(rB, rB, mask); // 1
|
||||||
|
|
|
@ -22,7 +22,7 @@ void JitArm::psq_l(UGeckoInstruction inst)
|
||||||
// R12 contains scale
|
// R12 contains scale
|
||||||
// R11 contains type
|
// R11 contains type
|
||||||
// R10 is the ADDR
|
// R10 is the ADDR
|
||||||
FALLBACK_IF(js.memcheck || !Core::g_CoreStartupParameter.bFastmem);
|
FALLBACK_IF(js.memcheck || !SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem);
|
||||||
|
|
||||||
bool update = inst.OPCD == 57;
|
bool update = inst.OPCD == 57;
|
||||||
s32 offset = inst.SIMM_12;
|
s32 offset = inst.SIMM_12;
|
||||||
|
@ -62,7 +62,7 @@ void JitArm::psq_lx(UGeckoInstruction inst)
|
||||||
// R12 contains scale
|
// R12 contains scale
|
||||||
// R11 contains type
|
// R11 contains type
|
||||||
// R10 is the ADDR
|
// R10 is the ADDR
|
||||||
FALLBACK_IF(js.memcheck || !Core::g_CoreStartupParameter.bFastmem);
|
FALLBACK_IF(js.memcheck || !SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem);
|
||||||
|
|
||||||
bool update = inst.SUBOP10 == 38;
|
bool update = inst.SUBOP10 == 38;
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ void JitArm::psq_st(UGeckoInstruction inst)
|
||||||
// R12 contains scale
|
// R12 contains scale
|
||||||
// R11 contains type
|
// R11 contains type
|
||||||
// R10 is the ADDR
|
// R10 is the ADDR
|
||||||
FALLBACK_IF(js.memcheck || !Core::g_CoreStartupParameter.bFastmem);
|
FALLBACK_IF(js.memcheck || !SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem);
|
||||||
|
|
||||||
bool update = inst.OPCD == 61;
|
bool update = inst.OPCD == 61;
|
||||||
s32 offset = inst.SIMM_12;
|
s32 offset = inst.SIMM_12;
|
||||||
|
@ -160,7 +160,7 @@ void JitArm::psq_stx(UGeckoInstruction inst)
|
||||||
// R12 contains scale
|
// R12 contains scale
|
||||||
// R11 contains type
|
// R11 contains type
|
||||||
// R10 is the ADDR
|
// R10 is the ADDR
|
||||||
FALLBACK_IF(js.memcheck || !Core::g_CoreStartupParameter.bFastmem);
|
FALLBACK_IF(js.memcheck || !SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem);
|
||||||
|
|
||||||
bool update = inst.SUBOP10 == 39;
|
bool update = inst.SUBOP10 == 39;
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ void JitArm64::SingleStep()
|
||||||
|
|
||||||
void STACKALIGN JitArm64::Jit(u32 em_address)
|
void STACKALIGN JitArm64::Jit(u32 em_address)
|
||||||
{
|
{
|
||||||
if (GetSpaceLeft() < 0x10000 || blocks.IsFull() || Core::g_CoreStartupParameter.bJITNoBlockCache)
|
if (GetSpaceLeft() < 0x10000 || blocks.IsFull() || SConfig::GetInstance().m_LocalCoreStartupParameter.bJITNoBlockCache)
|
||||||
{
|
{
|
||||||
ClearCache();
|
ClearCache();
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ const u8* JitArm64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitB
|
||||||
{
|
{
|
||||||
int blockSize = code_buf->GetSize();
|
int blockSize = code_buf->GetSize();
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
{
|
{
|
||||||
// Comment out the following to disable breakpoints (speed-up)
|
// Comment out the following to disable breakpoints (speed-up)
|
||||||
blockSize = 1;
|
blockSize = 1;
|
||||||
|
@ -229,7 +229,7 @@ const u8* JitArm64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitB
|
||||||
gpr.Start(js.gpa);
|
gpr.Start(js.gpa);
|
||||||
fpr.Start(js.fpa);
|
fpr.Start(js.fpa);
|
||||||
|
|
||||||
if (!Core::g_CoreStartupParameter.bEnableDebugging)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
js.downcountAmount += PatchEngine::GetSpeedhackCycles(em_address);
|
js.downcountAmount += PatchEngine::GetSpeedhackCycles(em_address);
|
||||||
|
|
||||||
// Translate instructions
|
// Translate instructions
|
||||||
|
|
|
@ -51,8 +51,8 @@
|
||||||
|
|
||||||
#define FALLBACK_IF(cond) do { if (cond) { FallBackToInterpreter(inst); return; } } while (0)
|
#define FALLBACK_IF(cond) do { if (cond) { FallBackToInterpreter(inst); return; } } while (0)
|
||||||
|
|
||||||
#define JITDISABLE(setting) FALLBACK_IF(Core::g_CoreStartupParameter.bJITOff || \
|
#define JITDISABLE(setting) FALLBACK_IF(SConfig::GetInstance().m_LocalCoreStartupParameter.bJITOff || \
|
||||||
Core::g_CoreStartupParameter.setting)
|
SConfig::GetInstance().m_LocalCoreStartupParameter.setting)
|
||||||
|
|
||||||
class JitBase : public CPUCoreBase
|
class JitBase : public CPUCoreBase
|
||||||
{
|
{
|
||||||
|
|
|
@ -253,12 +253,12 @@ void EmuCodeBlock::SafeLoadToReg(X64Reg reg_value, const Gen::OpArg & opAddress,
|
||||||
{
|
{
|
||||||
registersInUse &= ~(1 << reg_value);
|
registersInUse &= ~(1 << reg_value);
|
||||||
}
|
}
|
||||||
if (!Core::g_CoreStartupParameter.bMMU &&
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU &&
|
||||||
Core::g_CoreStartupParameter.bFastmem &&
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem &&
|
||||||
!opAddress.IsImm() &&
|
!opAddress.IsImm() &&
|
||||||
!(flags & (SAFE_LOADSTORE_NO_SWAP | SAFE_LOADSTORE_NO_FASTMEM))
|
!(flags & (SAFE_LOADSTORE_NO_SWAP | SAFE_LOADSTORE_NO_FASTMEM))
|
||||||
#ifdef ENABLE_MEM_CHECK
|
#ifdef ENABLE_MEM_CHECK
|
||||||
&& !Core::g_CoreStartupParameter.bEnableDebugging
|
&& !SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -269,13 +269,13 @@ void EmuCodeBlock::SafeLoadToReg(X64Reg reg_value, const Gen::OpArg & opAddress,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
u32 mem_mask = Memory::ADDR_MASK_HW_ACCESS;
|
u32 mem_mask = Memory::ADDR_MASK_HW_ACCESS;
|
||||||
if (Core::g_CoreStartupParameter.bMMU || Core::g_CoreStartupParameter.bTLBHack)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
|
||||||
{
|
{
|
||||||
mem_mask |= Memory::ADDR_MASK_MEM1;
|
mem_mask |= Memory::ADDR_MASK_MEM1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_MEM_CHECK
|
#ifdef ENABLE_MEM_CHECK
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
{
|
{
|
||||||
mem_mask |= Memory::EXRAM_MASK;
|
mem_mask |= Memory::EXRAM_MASK;
|
||||||
}
|
}
|
||||||
|
@ -298,7 +298,7 @@ void EmuCodeBlock::SafeLoadToReg(X64Reg reg_value, const Gen::OpArg & opAddress,
|
||||||
{
|
{
|
||||||
UnsafeLoadToReg(reg_value, opAddress, accessSize, offset, signExtend);
|
UnsafeLoadToReg(reg_value, opAddress, accessSize, offset, signExtend);
|
||||||
}
|
}
|
||||||
else if (!Core::g_CoreStartupParameter.bMMU && MMIO::IsMMIOAddress(address) && accessSize != 64)
|
else if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU && MMIO::IsMMIOAddress(address) && accessSize != 64)
|
||||||
{
|
{
|
||||||
MMIOLoadToReg(Memory::mmio_mapping, reg_value, registersInUse,
|
MMIOLoadToReg(Memory::mmio_mapping, reg_value, registersInUse,
|
||||||
address, accessSize, signExtend);
|
address, accessSize, signExtend);
|
||||||
|
@ -418,11 +418,11 @@ u8 *EmuCodeBlock::UnsafeWriteRegToReg(X64Reg reg_value, X64Reg reg_addr, int acc
|
||||||
|
|
||||||
void EmuCodeBlock::SafeWriteRegToReg(X64Reg reg_value, X64Reg reg_addr, int accessSize, s32 offset, u32 registersInUse, int flags)
|
void EmuCodeBlock::SafeWriteRegToReg(X64Reg reg_value, X64Reg reg_addr, int accessSize, s32 offset, u32 registersInUse, int flags)
|
||||||
{
|
{
|
||||||
if (!Core::g_CoreStartupParameter.bMMU &&
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU &&
|
||||||
Core::g_CoreStartupParameter.bFastmem &&
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bFastmem &&
|
||||||
!(flags & (SAFE_LOADSTORE_NO_SWAP | SAFE_LOADSTORE_NO_FASTMEM))
|
!(flags & (SAFE_LOADSTORE_NO_SWAP | SAFE_LOADSTORE_NO_FASTMEM))
|
||||||
#ifdef ENABLE_MEM_CHECK
|
#ifdef ENABLE_MEM_CHECK
|
||||||
&& !Core::g_CoreStartupParameter.bEnableDebugging
|
&& !SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -454,13 +454,13 @@ void EmuCodeBlock::SafeWriteRegToReg(X64Reg reg_value, X64Reg reg_addr, int acce
|
||||||
|
|
||||||
u32 mem_mask = Memory::ADDR_MASK_HW_ACCESS;
|
u32 mem_mask = Memory::ADDR_MASK_HW_ACCESS;
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bMMU || Core::g_CoreStartupParameter.bTLBHack)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
|
||||||
{
|
{
|
||||||
mem_mask |= Memory::ADDR_MASK_MEM1;
|
mem_mask |= Memory::ADDR_MASK_MEM1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_MEM_CHECK
|
#ifdef ENABLE_MEM_CHECK
|
||||||
if (Core::g_CoreStartupParameter.bEnableDebugging)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
|
||||||
{
|
{
|
||||||
mem_mask |= Memory::EXRAM_MASK;
|
mem_mask |= Memory::EXRAM_MASK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ void JitILBase::fp_arith_s(UGeckoInstruction inst)
|
||||||
FALLBACK_IF(inst.Rc || (inst.SUBOP5 != 25 && inst.SUBOP5 != 20 && inst.SUBOP5 != 21));
|
FALLBACK_IF(inst.Rc || (inst.SUBOP5 != 25 && inst.SUBOP5 != 20 && inst.SUBOP5 != 21));
|
||||||
|
|
||||||
// Only the interpreter has "proper" support for (some) FP flags
|
// Only the interpreter has "proper" support for (some) FP flags
|
||||||
FALLBACK_IF(inst.SUBOP5 == 25 && Core::g_CoreStartupParameter.bEnableFPRF);
|
FALLBACK_IF(inst.SUBOP5 == 25 && SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableFPRF);
|
||||||
|
|
||||||
IREmitter::InstLoc val = ibuild.EmitLoadFReg(inst.FA);
|
IREmitter::InstLoc val = ibuild.EmitLoadFReg(inst.FA);
|
||||||
switch (inst.SUBOP5)
|
switch (inst.SUBOP5)
|
||||||
|
@ -49,7 +49,7 @@ void JitILBase::fmaddXX(UGeckoInstruction inst)
|
||||||
FALLBACK_IF(inst.Rc);
|
FALLBACK_IF(inst.Rc);
|
||||||
|
|
||||||
// Only the interpreter has "proper" support for (some) FP flags
|
// Only the interpreter has "proper" support for (some) FP flags
|
||||||
FALLBACK_IF(inst.SUBOP5 == 29 && Core::g_CoreStartupParameter.bEnableFPRF);
|
FALLBACK_IF(inst.SUBOP5 == 29 && SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableFPRF);
|
||||||
|
|
||||||
IREmitter::InstLoc val = ibuild.EmitLoadFReg(inst.FA);
|
IREmitter::InstLoc val = ibuild.EmitLoadFReg(inst.FA);
|
||||||
val = ibuild.EmitFDMul(val, ibuild.EmitLoadFReg(inst.FC));
|
val = ibuild.EmitFDMul(val, ibuild.EmitLoadFReg(inst.FC));
|
||||||
|
|
|
@ -131,7 +131,7 @@ void JitILBase::dcbz(UGeckoInstruction inst)
|
||||||
|
|
||||||
// TODO!
|
// TODO!
|
||||||
#if 0
|
#if 0
|
||||||
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bJITOff || SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStoreOff)
|
||||||
{
|
{
|
||||||
Default(inst);
|
Default(inst);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -556,7 +556,7 @@ u32 PPCAnalyzer::Analyze(u32 address, CodeBlock *block, CodeBuffer *buffer, u32
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bMMU && (address & JIT_ICACHE_VMEM_BIT))
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU && (address & JIT_ICACHE_VMEM_BIT))
|
||||||
{
|
{
|
||||||
if (!Memory::TranslateAddress(address, Memory::FLAG_OPCODE))
|
if (!Memory::TranslateAddress(address, Memory::FLAG_OPCODE))
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,7 +104,7 @@ static void DoState(PointerWrap &p)
|
||||||
g_video_backend->DoState(p);
|
g_video_backend->DoState(p);
|
||||||
p.DoMarker("video_backend");
|
p.DoMarker("video_backend");
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bWii)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||||
Wiimote::DoState(p.GetPPtr(), p.GetMode());
|
Wiimote::DoState(p.GetPPtr(), p.GetMode());
|
||||||
p.DoMarker("Wiimote");
|
p.DoMarker("Wiimote");
|
||||||
|
|
||||||
|
|
|
@ -276,9 +276,9 @@ void wxCheatsWindow::OnEvent_Close(wxCloseEvent& ev)
|
||||||
void wxCheatsWindow::UpdateGUI()
|
void wxCheatsWindow::UpdateGUI()
|
||||||
{
|
{
|
||||||
// load code
|
// load code
|
||||||
m_gameini_default = Core::g_CoreStartupParameter.LoadDefaultGameIni();
|
m_gameini_default = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadDefaultGameIni();
|
||||||
m_gameini_local = Core::g_CoreStartupParameter.LoadLocalGameIni();
|
m_gameini_local = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadLocalGameIni();
|
||||||
m_gameini_local_path = Core::g_CoreStartupParameter.m_strGameIniLocal;
|
m_gameini_local_path = SConfig::GetInstance().m_LocalCoreStartupParameter.m_strGameIniLocal;
|
||||||
Load_ARCodes();
|
Load_ARCodes();
|
||||||
Load_GeckoCodes();
|
Load_GeckoCodes();
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ void wxCheatsWindow::UpdateGUI()
|
||||||
|
|
||||||
// write the ISO name in the title
|
// write the ISO name in the title
|
||||||
if (Core::IsRunning())
|
if (Core::IsRunning())
|
||||||
SetTitle(title + ": " + Core::g_CoreStartupParameter.GetUniqueID() + " - " + Core::g_CoreStartupParameter.m_strName);
|
SetTitle(title + ": " + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + " - " + SConfig::GetInstance().m_LocalCoreStartupParameter.m_strName);
|
||||||
else
|
else
|
||||||
SetTitle(title);
|
SetTitle(title);
|
||||||
}
|
}
|
||||||
|
@ -319,7 +319,7 @@ void wxCheatsWindow::Load_ARCodes()
|
||||||
|
|
||||||
void wxCheatsWindow::Load_GeckoCodes()
|
void wxCheatsWindow::Load_GeckoCodes()
|
||||||
{
|
{
|
||||||
m_geckocode_panel->LoadCodes(m_gameini_default, m_gameini_local, Core::g_CoreStartupParameter.GetUniqueID(), true);
|
m_geckocode_panel->LoadCodes(m_gameini_default, m_gameini_local, SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCheatsWindow::OnEvent_CheatsList_ItemSelected(wxCommandEvent& WXUNUSED (event))
|
void wxCheatsWindow::OnEvent_CheatsList_ItemSelected(wxCommandEvent& WXUNUSED (event))
|
||||||
|
|
|
@ -501,37 +501,37 @@ void CCodeWindow::OnCPUMode(wxCommandEvent& event)
|
||||||
bAutomaticStart = !bAutomaticStart;
|
bAutomaticStart = !bAutomaticStart;
|
||||||
return;
|
return;
|
||||||
case IDM_JITOFF:
|
case IDM_JITOFF:
|
||||||
Core::g_CoreStartupParameter.bJITOff = event.IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITOff = event.IsChecked();
|
||||||
break;
|
break;
|
||||||
case IDM_JITLSOFF:
|
case IDM_JITLSOFF:
|
||||||
Core::g_CoreStartupParameter.bJITLoadStoreOff = event.IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStoreOff = event.IsChecked();
|
||||||
break;
|
break;
|
||||||
case IDM_JITLSLXZOFF:
|
case IDM_JITLSLXZOFF:
|
||||||
Core::g_CoreStartupParameter.bJITLoadStorelXzOff = event.IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelXzOff = event.IsChecked();
|
||||||
break;
|
break;
|
||||||
case IDM_JITLSLWZOFF:
|
case IDM_JITLSLWZOFF:
|
||||||
Core::g_CoreStartupParameter.bJITLoadStorelwzOff = event.IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelwzOff = event.IsChecked();
|
||||||
break;
|
break;
|
||||||
case IDM_JITLSLBZXOFF:
|
case IDM_JITLSLBZXOFF:
|
||||||
Core::g_CoreStartupParameter.bJITLoadStorelbzxOff = event.IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelbzxOff = event.IsChecked();
|
||||||
break;
|
break;
|
||||||
case IDM_JITLSFOFF:
|
case IDM_JITLSFOFF:
|
||||||
Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff = event.IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStoreFloatingOff = event.IsChecked();
|
||||||
break;
|
break;
|
||||||
case IDM_JITLSPOFF:
|
case IDM_JITLSPOFF:
|
||||||
Core::g_CoreStartupParameter.bJITLoadStorePairedOff = event.IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorePairedOff = event.IsChecked();
|
||||||
break;
|
break;
|
||||||
case IDM_JITFPOFF:
|
case IDM_JITFPOFF:
|
||||||
Core::g_CoreStartupParameter.bJITFloatingPointOff = event.IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITFloatingPointOff = event.IsChecked();
|
||||||
break;
|
break;
|
||||||
case IDM_JITIOFF:
|
case IDM_JITIOFF:
|
||||||
Core::g_CoreStartupParameter.bJITIntegerOff = event.IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITIntegerOff = event.IsChecked();
|
||||||
break;
|
break;
|
||||||
case IDM_JITPOFF:
|
case IDM_JITPOFF:
|
||||||
Core::g_CoreStartupParameter.bJITPairedOff = event.IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITPairedOff = event.IsChecked();
|
||||||
break;
|
break;
|
||||||
case IDM_JITSROFF:
|
case IDM_JITSROFF:
|
||||||
Core::g_CoreStartupParameter.bJITSystemRegistersOff = event.IsChecked();
|
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITSystemRegistersOff = event.IsChecked();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Licensed under GPLv2
|
// Licensed under GPLv2
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/HW/Memmap.h"
|
#include "Core/HW/Memmap.h"
|
||||||
|
|
||||||
|
@ -93,7 +94,7 @@ void SWBPWritten(int address, int newvalue)
|
||||||
u8 *ptr = nullptr;
|
u8 *ptr = nullptr;
|
||||||
|
|
||||||
// TODO - figure out a cleaner way.
|
// TODO - figure out a cleaner way.
|
||||||
if (Core::g_CoreStartupParameter.bWii)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||||
ptr = Memory::GetPointer(bpmem.tmem_config.tlut_src << 5);
|
ptr = Memory::GetPointer(bpmem.tmem_config.tlut_src << 5);
|
||||||
else
|
else
|
||||||
ptr = Memory::GetPointer((bpmem.tmem_config.tlut_src & 0xFFFFF) << 5);
|
ptr = Memory::GetPointer((bpmem.tmem_config.tlut_src & 0xFFFFF) << 5);
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
#include "Common/Thread.h"
|
#include "Common/Thread.h"
|
||||||
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/HW/Memmap.h"
|
#include "Core/HW/Memmap.h"
|
||||||
|
|
||||||
|
@ -268,7 +269,7 @@ static void BPWritten(const BPCmd& bp)
|
||||||
u8 *ptr = nullptr;
|
u8 *ptr = nullptr;
|
||||||
|
|
||||||
// TODO - figure out a cleaner way.
|
// TODO - figure out a cleaner way.
|
||||||
if (Core::g_CoreStartupParameter.bWii)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||||
ptr = Memory::GetPointer(bpmem.tmem_config.tlut_src << 5);
|
ptr = Memory::GetPointer(bpmem.tmem_config.tlut_src << 5);
|
||||||
else
|
else
|
||||||
ptr = Memory::GetPointer((bpmem.tmem_config.tlut_src & 0xFFFFF) << 5);
|
ptr = Memory::GetPointer((bpmem.tmem_config.tlut_src & 0xFFFFF) << 5);
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include "Common/MemoryUtil.h"
|
#include "Common/MemoryUtil.h"
|
||||||
#include "Common/Thread.h"
|
#include "Common/Thread.h"
|
||||||
|
|
||||||
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/Core.h"
|
#include "Core/Core.h"
|
||||||
#include "Core/CoreTiming.h"
|
#include "Core/CoreTiming.h"
|
||||||
#include "Core/HW/Memmap.h"
|
#include "Core/HW/Memmap.h"
|
||||||
|
@ -158,7 +159,7 @@ void RunGpuLoop()
|
||||||
fifo.isGpuReadingData = true;
|
fifo.isGpuReadingData = true;
|
||||||
CommandProcessor::isPossibleWaitingSetDrawDone = fifo.bFF_GPLinkEnable ? true : false;
|
CommandProcessor::isPossibleWaitingSetDrawDone = fifo.bFF_GPLinkEnable ? true : false;
|
||||||
|
|
||||||
if (!Core::g_CoreStartupParameter.bSyncGPU || Common::AtomicLoad(CommandProcessor::VITicks) > CommandProcessor::m_cpClockOrigin)
|
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPU || Common::AtomicLoad(CommandProcessor::VITicks) > CommandProcessor::m_cpClockOrigin)
|
||||||
{
|
{
|
||||||
u32 readPtr = fifo.CPReadPointer;
|
u32 readPtr = fifo.CPReadPointer;
|
||||||
u8 *uData = Memory::GetPointer(readPtr);
|
u8 *uData = Memory::GetPointer(readPtr);
|
||||||
|
@ -175,7 +176,7 @@ void RunGpuLoop()
|
||||||
|
|
||||||
cyclesExecuted = OpcodeDecoder_Run(GetVideoBufferEndPtr());
|
cyclesExecuted = OpcodeDecoder_Run(GetVideoBufferEndPtr());
|
||||||
|
|
||||||
if (Core::g_CoreStartupParameter.bSyncGPU && Common::AtomicLoad(CommandProcessor::VITicks) >= cyclesExecuted)
|
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bSyncGPU && Common::AtomicLoad(CommandProcessor::VITicks) >= cyclesExecuted)
|
||||||
Common::AtomicAdd(CommandProcessor::VITicks, -(s32)cyclesExecuted);
|
Common::AtomicAdd(CommandProcessor::VITicks, -(s32)cyclesExecuted);
|
||||||
|
|
||||||
Common::AtomicStore(fifo.CPReadPointer, readPtr);
|
Common::AtomicStore(fifo.CPReadPointer, readPtr);
|
||||||
|
|
Loading…
Reference in New Issue