slightly optimize main loop
This commit is contained in:
parent
c40efab62f
commit
e77c2011bc
|
@ -1757,11 +1757,8 @@ u32 NDS::RunFrame()
|
||||||
ARM9Target = target << ARM9ClockShift;
|
ARM9Target = target << ARM9ClockShift;
|
||||||
//ARM7Target = target;
|
//ARM7Target = target;
|
||||||
|
|
||||||
//while ((std::max(std::max(ARM9Timestamp, DMA9Timestamp), A9ContentionTS << ARM9ClockShift) < (target << ARM9ClockShift)) && (ARM7Timestamp < target))
|
while (std::max(std::max(ARM9Timestamp, DMA9Timestamp), A9ContentionTS << ARM9ClockShift) < ARM9Target)
|
||||||
{
|
{
|
||||||
//while (std::max(std::max(ARM9Timestamp, DMA9Timestamp), A9ContentionTS << ARM9ClockShift) < (target << ARM9ClockShift))
|
|
||||||
{
|
|
||||||
//ARM9Target = target << ARM9ClockShift;
|
|
||||||
CurCPU = 0;
|
CurCPU = 0;
|
||||||
RunTimers(0);
|
RunTimers(0);
|
||||||
GPU.GPU3D.Run();
|
GPU.GPU3D.Run();
|
||||||
|
@ -1800,7 +1797,6 @@ u32 NDS::RunFrame()
|
||||||
|
|
||||||
//if (MainRAMHandle()) break;
|
//if (MainRAMHandle()) break;
|
||||||
MainRAMHandle();
|
MainRAMHandle();
|
||||||
}
|
|
||||||
|
|
||||||
target = std::max(std::max(ARM9Timestamp, DMA9Timestamp) >> ARM9ClockShift, A9ContentionTS);
|
target = std::max(std::max(ARM9Timestamp, DMA9Timestamp) >> ARM9ClockShift, A9ContentionTS);
|
||||||
if (target == ARM7Timestamp) target++;
|
if (target == ARM7Timestamp) target++;
|
||||||
|
|
Loading…
Reference in New Issue