mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 14:19:55 -06:00
jit: make everything configurable
This commit is contained in:
26
src/NDS.cpp
26
src/NDS.cpp
@ -566,7 +566,7 @@ void Reset()
|
||||
KeyCnt = 0;
|
||||
RCnt = 0;
|
||||
|
||||
ARMJIT::ResetBlocks();
|
||||
ARMJIT::InvalidateBlockCache();
|
||||
|
||||
NDSCart::Reset();
|
||||
GBACart::Reset();
|
||||
@ -794,6 +794,11 @@ bool DoSavestate(Savestate* file)
|
||||
GPU::SetPowerCnt(PowerControl9);
|
||||
}
|
||||
|
||||
if (!file->Saving)
|
||||
{
|
||||
ARMJIT::InvalidateBlockCache();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -884,6 +889,7 @@ void RunSystem(u64 timestamp)
|
||||
}
|
||||
}
|
||||
|
||||
template <bool EnableJIT>
|
||||
u32 RunFrame()
|
||||
{
|
||||
FrameStartTimestamp = SysTimestamp;
|
||||
@ -917,7 +923,10 @@ u32 RunFrame()
|
||||
}
|
||||
else
|
||||
{
|
||||
ARM9->Execute();
|
||||
if (EnableJIT)
|
||||
ARM9->ExecuteJIT();
|
||||
else
|
||||
ARM9->Execute();
|
||||
}
|
||||
|
||||
RunTimers(0);
|
||||
@ -940,7 +949,10 @@ u32 RunFrame()
|
||||
}
|
||||
else
|
||||
{
|
||||
ARM7->Execute();
|
||||
if (EnableJIT)
|
||||
ARM7->ExecuteJIT();
|
||||
else
|
||||
ARM7->Execute();
|
||||
}
|
||||
|
||||
RunTimers(1);
|
||||
@ -970,6 +982,14 @@ u32 RunFrame()
|
||||
return GPU::TotalScanlines;
|
||||
}
|
||||
|
||||
u32 RunFrame()
|
||||
{
|
||||
if (Config::JIT_Enable)
|
||||
return RunFrame<true>();
|
||||
else
|
||||
return RunFrame<false>();
|
||||
}
|
||||
|
||||
void Reschedule(u64 target)
|
||||
{
|
||||
if (CurCPU == 0)
|
||||
|
Reference in New Issue
Block a user