mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Merge branch 'determinism-fixes'
This commit is contained in:
@@ -72,6 +72,13 @@ public:
|
||||
is_set = false;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
std::unique_lock<std::mutex> lk(m_mutex);
|
||||
// no other action required, since wait loops on the predicate and any lingering signal will get cleared on the first iteration
|
||||
is_set = false;
|
||||
}
|
||||
|
||||
private:
|
||||
class IsSet
|
||||
{
|
||||
|
||||
@@ -140,6 +140,7 @@ class VideoBackendHardware : public VideoBackend
|
||||
{
|
||||
void DoState(PointerWrap &p);
|
||||
void RunLoop(bool enable);
|
||||
bool Initialize(void *&) { InitializeShared(); return true; }
|
||||
|
||||
void EmuStateChange(EMUSTATE_CHANGE);
|
||||
|
||||
@@ -165,6 +166,9 @@ class VideoBackendHardware : public VideoBackend
|
||||
readFn16 Video_PERead16();
|
||||
writeFn16 Video_PEWrite16();
|
||||
writeFn32 Video_PEWrite32();
|
||||
|
||||
protected:
|
||||
void InitializeShared();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -346,6 +346,8 @@ void EmuThread()
|
||||
DisplayMessage(cpu_info.Summarize(), 8000);
|
||||
DisplayMessage(_CoreParameter.m_strFilename, 3000);
|
||||
|
||||
Movie::Init();
|
||||
|
||||
HW::Init();
|
||||
|
||||
if (!g_video_backend->Initialize(g_pWindowHandle))
|
||||
|
||||
@@ -133,6 +133,7 @@ void Init()
|
||||
|
||||
void Shutdown()
|
||||
{
|
||||
MoveEvents();
|
||||
ClearPendingEvents();
|
||||
UnregisterAllEvents();
|
||||
|
||||
|
||||
@@ -153,6 +153,12 @@ void Init()
|
||||
m_Volume.hex = 0;
|
||||
m_SampleCounter = 0;
|
||||
m_InterruptTiming = 0;
|
||||
|
||||
g_LastCPUTime = 0;
|
||||
g_CPUCyclesPerSample = 0xFFFFFFFFFFFULL;
|
||||
|
||||
g_AISSampleRate = 48000;
|
||||
g_AIDSampleRate = 32000;
|
||||
}
|
||||
|
||||
void Shutdown()
|
||||
|
||||
@@ -115,6 +115,7 @@ void CCPU::EnableStepping(const bool _bStepping)
|
||||
if (_bStepping)
|
||||
{
|
||||
PowerPC::Pause();
|
||||
m_StepEvent.Reset();
|
||||
g_video_backend->EmuStateChange(EMUSTATE_CHANGE_PAUSE);
|
||||
DSP::GetDSPEmulator()->DSP_ClearAudioBuffer(true);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "MemoryUtil.h"
|
||||
#include "FileUtil.h"
|
||||
#include "../Movie.h"
|
||||
#include "../CoreTiming.h"
|
||||
#include "SystemTimers.h"
|
||||
|
||||
// We should provide an option to choose from the above, or figure out the checksum (the algo in yagcd seems wrong)
|
||||
// so that people can change default language.
|
||||
@@ -342,14 +344,23 @@ void CEXIIPL::TransferByte(u8& _uByte)
|
||||
u32 CEXIIPL::GetGCTime()
|
||||
{
|
||||
u64 ltime = 0;
|
||||
const u32 cJanuary2000 = 0x386D4380; // Seconds between 1.1.1970 and 1.1.2000
|
||||
static const u32 cJanuary2000 = 0x386D4380; // Seconds between 1.1.1970 and 1.1.2000
|
||||
|
||||
// hack in some netplay stuff
|
||||
ltime = NetPlay_GetGCTime();
|
||||
if (Movie::IsRecordingInput() || Movie::IsPlayingInput())
|
||||
ltime = 1234567890; // TODO: Should you be able to set a custom time in movies?
|
||||
else if (0 == ltime)
|
||||
ltime = Common::Timer::GetLocalTimeSinceJan1970();
|
||||
{
|
||||
ltime = Movie::GetRecordingStartTime();
|
||||
|
||||
// let's keep time moving forward, regardless of what it starts at
|
||||
ltime += CoreTiming::GetTicks() / SystemTimers::GetTicksPerSecond();
|
||||
}
|
||||
else
|
||||
{
|
||||
// hack in some netplay stuff
|
||||
ltime = NetPlay_GetGCTime();
|
||||
|
||||
if (0 == ltime)
|
||||
ltime = Common::Timer::GetLocalTimeSinceJan1970();
|
||||
}
|
||||
|
||||
return ((u32)ltime - cJanuary2000);
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ void DoState(PointerWrap &p)
|
||||
void Init()
|
||||
{
|
||||
ResetGatherPipe();
|
||||
memset(m_gatherPipe, 0, sizeof(m_gatherPipe));
|
||||
}
|
||||
|
||||
bool IsEmpty()
|
||||
|
||||
@@ -43,6 +43,7 @@ namespace HW
|
||||
void Init()
|
||||
{
|
||||
CoreTiming::Init();
|
||||
SystemTimers::PreInit();
|
||||
|
||||
State::Init();
|
||||
|
||||
|
||||
@@ -246,10 +246,8 @@ void Init()
|
||||
g_Channel[i].m_InHi.Hex = 0;
|
||||
g_Channel[i].m_InLo.Hex = 0;
|
||||
|
||||
if (Movie::IsUsingPad(i))
|
||||
AddDevice(SIDEVICE_GC_CONTROLLER, i);
|
||||
else if (Movie::IsRecordingInput() || Movie::IsPlayingInput())
|
||||
AddDevice(SIDEVICE_NONE, i);
|
||||
if (Movie::IsRecordingInput() || Movie::IsPlayingInput())
|
||||
AddDevice(Movie::IsUsingPad(i) ? SIDEVICE_GC_CONTROLLER : SIDEVICE_NONE, i);
|
||||
else
|
||||
AddDevice(SConfig::GetInstance().m_SIDevice[i], i);
|
||||
}
|
||||
|
||||
@@ -231,12 +231,19 @@ void PatchEngineCallback(u64 userdata, int cyclesLate)
|
||||
CoreTiming::ScheduleEvent(VideoInterface::GetTicksPerFrame() - cyclesLate, et_PatchEngine);
|
||||
}
|
||||
|
||||
// split from Init to break a circular dependency between VideoInterface::Init and SystemTimers::Init
|
||||
void PreInit()
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||
CPU_CORE_CLOCK = 729000000u;
|
||||
else
|
||||
CPU_CORE_CLOCK = 486000000u;
|
||||
}
|
||||
|
||||
void Init()
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||
{
|
||||
CPU_CORE_CLOCK = 729000000u;
|
||||
|
||||
if (!DSP::GetDSPEmulator()->IsLLE())
|
||||
DSP_PERIOD = (int)(GetTicksPerSecond() * 0.003f);
|
||||
|
||||
@@ -253,8 +260,6 @@ void Init()
|
||||
}
|
||||
else
|
||||
{
|
||||
CPU_CORE_CLOCK = 486000000u;
|
||||
|
||||
if (!DSP::GetDSPEmulator()->IsLLE())
|
||||
DSP_PERIOD = (int)(GetTicksPerSecond() * 0.005f);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ namespace SystemTimers
|
||||
{
|
||||
|
||||
u32 GetTicksPerSecond();
|
||||
void PreInit();
|
||||
void Init();
|
||||
void Shutdown();
|
||||
|
||||
|
||||
@@ -158,6 +158,29 @@ void Preset(bool _bNTSC)
|
||||
|
||||
void Init()
|
||||
{
|
||||
m_VerticalTimingRegister.Hex = 0;
|
||||
m_DisplayControlRegister.Hex = 0;
|
||||
m_HTiming0.Hex = 0;
|
||||
m_HTiming1.Hex = 0;
|
||||
m_VBlankTimingOdd.Hex = 0;
|
||||
m_VBlankTimingEven.Hex = 0;
|
||||
m_BurstBlankingOdd.Hex = 0;
|
||||
m_BurstBlankingEven.Hex = 0;
|
||||
m_XFBInfoTop.Hex = 0;
|
||||
m_XFBInfoBottom.Hex = 0;
|
||||
m_3DFBInfoTop.Hex = 0;
|
||||
m_3DFBInfoBottom.Hex = 0;
|
||||
m_VBeamPos = 0;
|
||||
m_HBeamPos = 0;
|
||||
m_HorizontalStepping.Hex = 0;
|
||||
m_HorizontalScaling.Hex = 0;
|
||||
m_UnkAARegister = 0;
|
||||
m_Clock = 0;
|
||||
m_DTVStatus.Hex = 0;
|
||||
m_FBWidth = 0;
|
||||
m_BorderHBlank.Hex = 0;
|
||||
memset(&m_FilterCoefTables, 0, sizeof(m_FilterCoefTables));
|
||||
|
||||
fields = Core::g_CoreStartupParameter.bVBeam ? 1 : 2;
|
||||
|
||||
m_DTVStatus.ntsc_j = Core::g_CoreStartupParameter.bForceNTSCJ;
|
||||
@@ -165,6 +188,9 @@ void Init()
|
||||
for (int i = 0; i < 4; i++)
|
||||
m_InterruptRegister[i].Hex = 0;
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
m_LatchRegister[i].Hex = 0;
|
||||
|
||||
m_DisplayControlRegister.Hex = 0;
|
||||
UpdateParameters();
|
||||
}
|
||||
|
||||
@@ -48,7 +48,8 @@ void Initialize(void* const hwnd)
|
||||
|
||||
WiimoteReal::Initialize();
|
||||
|
||||
if (Movie::IsPlayingInput()) // reload Wiimotes with our settings
|
||||
// reload Wiimotes with our settings
|
||||
if (Movie::IsPlayingInput() || Movie::IsRecordingInput())
|
||||
Movie::ChangeWiiPads();
|
||||
}
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ Wiimote::Wiimote( const unsigned int index )
|
||||
m_options->settings.push_back(new ControlGroup::Setting(_trans("Upright Wiimote"), false));
|
||||
|
||||
// TODO: This value should probably be re-read if SYSCONF gets changed
|
||||
m_sensor_bar_on_top = (bool)SConfig::GetInstance().m_SYSCONF->GetData<u8>("BT.BAR");
|
||||
m_sensor_bar_on_top = SConfig::GetInstance().m_SYSCONF->GetData<u8>("BT.BAR") != 0;
|
||||
|
||||
// --- reset eeprom/register/values to default ---
|
||||
Reset();
|
||||
@@ -318,7 +318,6 @@ std::string Wiimote::GetName() const
|
||||
bool Wiimote::Step()
|
||||
{
|
||||
const bool has_focus = HAS_FOCUS;
|
||||
const bool is_sideways = m_options->settings[1]->value != 0;
|
||||
|
||||
// TODO: change this a bit
|
||||
m_motion_plus_present = m_extension->settings[0]->value != 0;
|
||||
@@ -329,13 +328,10 @@ bool Wiimote::Step()
|
||||
|
||||
m_rumble->controls[0]->control_ref->State(m_rumble_on);
|
||||
|
||||
// update buttons in status struct
|
||||
m_status.buttons = 0;
|
||||
if (has_focus)
|
||||
// when a movie is active, this button status update is disabled (moved), because movies only record data reports.
|
||||
if(!(Movie::IsPlayingInput() || Movie::IsRecordingInput()))
|
||||
{
|
||||
m_buttons->GetState(&m_status.buttons, button_bitmasks);
|
||||
m_dpad->GetState(&m_status.buttons, is_sideways ? dpad_sideways_bitmasks : dpad_bitmasks);
|
||||
UDPTLayer::GetButtons(m_udp, &m_status.buttons);
|
||||
UpdateButtonsStatus(has_focus);
|
||||
}
|
||||
|
||||
// check if there is a read data request
|
||||
@@ -375,8 +371,27 @@ bool Wiimote::Step()
|
||||
return false;
|
||||
}
|
||||
|
||||
void Wiimote::UpdateButtonsStatus(bool has_focus)
|
||||
{
|
||||
// update buttons in status struct
|
||||
m_status.buttons = 0;
|
||||
if (has_focus)
|
||||
{
|
||||
const bool is_sideways = m_options->settings[1]->value != 0;
|
||||
m_buttons->GetState(&m_status.buttons, button_bitmasks);
|
||||
m_dpad->GetState(&m_status.buttons, is_sideways ? dpad_sideways_bitmasks : dpad_bitmasks);
|
||||
UDPTLayer::GetButtons(m_udp, &m_status.buttons);
|
||||
}
|
||||
}
|
||||
|
||||
void Wiimote::GetCoreData(u8* const data)
|
||||
{
|
||||
// when a movie is active, the button update happens here instead of Wiimote::Step, to avoid potential desync issues.
|
||||
if(Movie::IsPlayingInput() || Movie::IsRecordingInput())
|
||||
{
|
||||
UpdateButtonsStatus(HAS_FOCUS);
|
||||
}
|
||||
|
||||
*(wm_core*)data |= m_status.buttons;
|
||||
}
|
||||
|
||||
@@ -639,7 +654,12 @@ void Wiimote::Update()
|
||||
|
||||
const ReportFeatures& rptf = reporting_mode_features[m_reporting_mode - WM_REPORT_CORE];
|
||||
rptf_size = rptf.size;
|
||||
if (!Movie::IsPlayingInput() || !Movie::PlayWiimote(m_index, data, rptf, m_reg_ir.mode))
|
||||
if (Movie::IsPlayingInput() && Movie::PlayWiimote(m_index, data, rptf, m_reg_ir.mode))
|
||||
{
|
||||
if (rptf.core)
|
||||
m_status.buttons = *(wm_core*)(data + rptf.core);
|
||||
}
|
||||
else
|
||||
{
|
||||
data[0] = 0xA1;
|
||||
data[1] = m_reporting_mode;
|
||||
@@ -741,10 +761,10 @@ void Wiimote::Update()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Movie::IsRecordingInput())
|
||||
{
|
||||
Movie::RecordWiimote(m_index, data, rptf, m_reg_ir.mode);
|
||||
}
|
||||
}
|
||||
if (Movie::IsRecordingInput())
|
||||
{
|
||||
Movie::RecordWiimote(m_index, data, rptf, m_reg_ir.mode);
|
||||
}
|
||||
|
||||
// don't send a data report if auto reporting is off
|
||||
|
||||
@@ -113,6 +113,7 @@ protected:
|
||||
bool Step();
|
||||
void HidOutputReport(const wm_report* const sr, const bool send_ack = true);
|
||||
void HandleExtensionSwap();
|
||||
void UpdateButtonsStatus(bool has_focus);
|
||||
|
||||
void GetCoreData(u8* const data);
|
||||
void GetAccelData(u8* const data, u8* const buttons);
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "IPC_HLE/WII_IPC_HLE_Device_usb.h"
|
||||
#include "VideoBackendBase.h"
|
||||
#include "State.h"
|
||||
#include "Timer.h"
|
||||
|
||||
// large enough for just over 24 hours of single-player recording
|
||||
#define MAX_DTM_LENGTH (40 * 1024 * 1024)
|
||||
@@ -53,6 +54,7 @@ u64 g_currentByte = 0, g_totalBytes = 0;
|
||||
u64 g_currentFrame = 0, g_totalFrames = 0; // VI
|
||||
u64 g_currentLagCount = 0, g_totalLagCount = 0; // just stats
|
||||
u64 g_currentInputCount = 0, g_totalInputCount = 0; // just stats
|
||||
u64 g_recordingStartTime; // seconds since 1970 that recording started
|
||||
|
||||
bool g_bRecordingFromSaveState = false;
|
||||
bool g_bPolled = false;
|
||||
@@ -64,6 +66,7 @@ std::string g_InputDisplay[8];
|
||||
|
||||
ManipFunction mfunc = NULL;
|
||||
|
||||
|
||||
std::string GetInputDisplay()
|
||||
{
|
||||
std::string inputDisplay = "";
|
||||
@@ -102,6 +105,34 @@ void FrameUpdate()
|
||||
g_bPolled = false;
|
||||
}
|
||||
|
||||
// called when game is booting up, even if no movie is active,
|
||||
// but potentially after BeginRecordingInput or PlayInput has been called.
|
||||
void Init()
|
||||
{
|
||||
g_bPolled = false;
|
||||
g_bFrameStep = false;
|
||||
g_bFrameStop = false;
|
||||
g_frameSkipCounter = g_framesToSkip;
|
||||
memset(&g_padState, 0, sizeof(g_padState));
|
||||
for (int i = 0; i < 8; ++i)
|
||||
g_InputDisplay[i].clear();
|
||||
|
||||
if (!IsPlayingInput() && !IsRecordingInput())
|
||||
{
|
||||
g_bRecordingFromSaveState = false;
|
||||
g_rerecords = 0;
|
||||
g_numPads = 0;
|
||||
g_currentByte = 0;
|
||||
g_currentFrame = 0;
|
||||
g_currentLagCount = 0;
|
||||
g_currentInputCount = 0;
|
||||
// we don't clear these things because otherwise we can't resume playback if we load a movie state later
|
||||
//g_totalFrames = g_totalBytes = 0;
|
||||
//delete tmpInput;
|
||||
//tmpInput = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void InputUpdate()
|
||||
{
|
||||
g_currentInputCount++;
|
||||
@@ -196,6 +227,11 @@ bool IsReadOnly()
|
||||
return g_bReadOnly;
|
||||
}
|
||||
|
||||
u64 GetRecordingStartTime()
|
||||
{
|
||||
return g_recordingStartTime;
|
||||
}
|
||||
|
||||
bool IsUsingPad(int controller)
|
||||
{
|
||||
return ((g_numPads & (1 << controller)) != 0);
|
||||
@@ -264,6 +300,7 @@ bool BeginRecordingInput(int controllers)
|
||||
g_currentFrame = g_totalFrames = 0;
|
||||
g_currentLagCount = g_totalLagCount = 0;
|
||||
g_currentInputCount = g_totalInputCount = 0;
|
||||
g_recordingStartTime = Common::Timer::GetLocalTimeSinceJan1970();
|
||||
g_rerecords = 0;
|
||||
g_playMode = MODE_RECORDING;
|
||||
|
||||
@@ -532,6 +569,7 @@ bool PlayInput(const char *filename)
|
||||
g_totalFrames = tmpHeader.frameCount;
|
||||
g_totalLagCount = tmpHeader.lagCount;
|
||||
g_totalInputCount = tmpHeader.inputCount;
|
||||
g_recordingStartTime = tmpHeader.recordingStartTime;
|
||||
|
||||
g_currentFrame = 0;
|
||||
g_currentLagCount = 0;
|
||||
@@ -630,7 +668,7 @@ void LoadInput(const char *filename)
|
||||
}
|
||||
else if(g_currentByte > 0 && g_totalBytes > 0)
|
||||
{
|
||||
// verify identical from movie start to thee save's current frame
|
||||
// verify identical from movie start to the save's current frame
|
||||
u32 len = (u32)g_currentByte;
|
||||
u8* movInput = new u8[len];
|
||||
t_record.ReadArray(movInput, (size_t)len);
|
||||
@@ -676,20 +714,6 @@ void LoadInput(const char *filename)
|
||||
|
||||
g_rerecords = tmpHeader.numRerecords;
|
||||
|
||||
if(g_currentSaveVersion == 0)
|
||||
{
|
||||
// attempt support for old savestates with movies but without movie-related data in DoState.
|
||||
// I'm just guessing here and the old logic was kind of broken anyway, so this probably doesn't work well.
|
||||
g_totalFrames = tmpHeader.frameCount;
|
||||
if(g_totalFrames < tmpHeader.deprecated_totalFrameCount)
|
||||
g_totalFrames = tmpHeader.deprecated_totalFrameCount;
|
||||
u64 frameStart = tmpHeader.deprecated_frameStart ? tmpHeader.deprecated_frameStart : tmpHeader.frameCount;
|
||||
g_currentFrame = frameStart;
|
||||
g_currentByte = frameStart * 8;
|
||||
g_currentLagCount = tmpHeader.lagCount;
|
||||
g_currentInputCount = tmpHeader.inputCount;
|
||||
}
|
||||
|
||||
if (!afterEnd)
|
||||
{
|
||||
if (g_bReadOnly)
|
||||
@@ -817,7 +841,7 @@ bool PlayWiimote(int wiimote, u8 *data, const WiimoteEmu::ReportFeatures& rptf,
|
||||
|
||||
if (size != sizeInMovie)
|
||||
{
|
||||
PanicAlertT("Error in PlayWiimote. %u != %u, byte %d.\nSorry, Wii recording is temporarily broken.", sizeInMovie, size, g_currentByte);
|
||||
PanicAlertT("Fatal desync. Aborting playback. (Error in PlayWiimote: %u != %u, byte %u.)%s", (u32)sizeInMovie, (u32)size, (u32)g_currentByte, (g_numPads & 0xF)?" Try re-creating the recording with all GameCube controllers disabled (in Configure > Gamecube > Device Settings).":"");
|
||||
EndPlayInput(!g_bReadOnly);
|
||||
return false;
|
||||
}
|
||||
@@ -880,6 +904,7 @@ void SaveRecording(const char *filename)
|
||||
header.lagCount = g_totalLagCount;
|
||||
header.inputCount = g_totalInputCount;
|
||||
header.numRerecords = g_rerecords;
|
||||
header.recordingStartTime = g_recordingStartTime;
|
||||
|
||||
// TODO
|
||||
header.uniqueID = 0;
|
||||
|
||||
@@ -89,7 +89,7 @@ struct DTMHeader {
|
||||
u64 frameCount; // Number of frames in the recording
|
||||
u64 inputCount; // Number of input frames in recording
|
||||
u64 lagCount; // Number of lag frames in the recording
|
||||
u64 uniqueID; // A Unique ID comprised of: md5(time + Game ID)
|
||||
u64 uniqueID; // (not implemented) A Unique ID comprised of: md5(time + Game ID)
|
||||
u32 numRerecords; // Number of rerecords/'cuts' of this TAS
|
||||
u8 author[32]; // Author's name (encoded in UTF-8)
|
||||
|
||||
@@ -97,17 +97,15 @@ struct DTMHeader {
|
||||
u8 audioEmulator[16]; // UTF-8 representation of the audio emulator
|
||||
u8 padBackend[16]; // UTF-8 representation of the input backend
|
||||
|
||||
// hack, data that was only used for savestates and would more properly be stored in the savestate itself
|
||||
// the hack has been removed, but these remain defined and reserved here for legacy support purposes
|
||||
u64 deprecated_frameStart; // NOT USED ANYMORE (use g_currentFrame)
|
||||
u64 deprecated_totalFrameCount; // NOT USED ANYMORE (use g_totalFrames or header.frameCount)
|
||||
u64 recordingStartTime; // seconds since 1970 that recording started (used for RTC)
|
||||
|
||||
u8 reserved[111]; // Make heading 256 bytes, just because we can
|
||||
u8 reserved[119]; // Make heading 256 bytes, just because we can
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
void FrameUpdate();
|
||||
void InputUpdate();
|
||||
void Init();
|
||||
|
||||
void SetPolledDevice();
|
||||
|
||||
@@ -117,6 +115,7 @@ bool IsRecordingInputFromSaveState();
|
||||
bool IsJustStartingRecordingInputFromSaveState();
|
||||
bool IsPlayingInput();
|
||||
bool IsReadOnly();
|
||||
u64 GetRecordingStartTime();
|
||||
|
||||
bool IsUsingPad(int controller);
|
||||
bool IsUsingWiimote(int wiimote);
|
||||
|
||||
@@ -80,6 +80,16 @@ namespace PowerPC
|
||||
jit->GetBlockCache()->ClearSafe();
|
||||
}
|
||||
|
||||
void InstructionCache::Init()
|
||||
{
|
||||
memset(data, 0, sizeof(data));
|
||||
memset(tags, 0, sizeof(tags));
|
||||
memset(way_from_valid, 0, sizeof(way_from_valid));
|
||||
memset(way_from_plru, 0, sizeof(way_from_plru));
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
void InstructionCache::Invalidate(u32 addr)
|
||||
{
|
||||
if (!HID0.ICE)
|
||||
|
||||
@@ -50,9 +50,10 @@ namespace PowerPC
|
||||
#endif
|
||||
|
||||
InstructionCache();
|
||||
void Reset();
|
||||
u32 ReadInstruction(u32 addr);
|
||||
void Invalidate(u32 addr);
|
||||
void Init();
|
||||
void Reset();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user