mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2024-11-14 21:37:42 -07:00
make it fasterer
This commit is contained in:
parent
29bca33bc6
commit
b569c03884
@ -506,9 +506,9 @@ s32 ARMv5::Execute()
|
||||
AddCycles_C();
|
||||
}
|
||||
|
||||
s32 diff = Cycles - lastcycles;
|
||||
NDS::RunTimingCriticalDevices(0, diff >> ClockShift);
|
||||
lastcycles = Cycles - (diff & ClockDiffMask);
|
||||
//s32 diff = Cycles - lastcycles;
|
||||
//NDS::RunTimingCriticalDevices(0, diff >> ClockShift);
|
||||
//lastcycles = Cycles - (diff & ClockDiffMask);
|
||||
|
||||
// TODO optimize this shit!!!
|
||||
if (Halted)
|
||||
|
@ -24,6 +24,9 @@
|
||||
|
||||
// access timing for cached regions
|
||||
// this would be an average between cache hits and cache misses
|
||||
// this was measured to be close to hardware average
|
||||
// a value of 1 would represent a perfect cache, but that causes
|
||||
// games to run too fast, causing a number of issues
|
||||
const int kDataCacheTiming = 2;
|
||||
const int kCodeCacheTiming = 1;
|
||||
|
||||
|
@ -246,8 +246,6 @@ s32 DMA::Run(s32 cycles)
|
||||
writefn(CurDstAddr, readfn(CurSrcAddr));
|
||||
|
||||
cycles -= unitcycles;
|
||||
NDS::RunTimingCriticalDevices(CPU, unitcycles);
|
||||
|
||||
CurSrcAddr += SrcAddrInc<<1;
|
||||
CurDstAddr += DstAddrInc<<1;
|
||||
IterCount--;
|
||||
@ -310,8 +308,6 @@ s32 DMA::Run(s32 cycles)
|
||||
writefn(CurDstAddr, readfn(CurSrcAddr));
|
||||
|
||||
cycles -= unitcycles;
|
||||
NDS::RunTimingCriticalDevices(CPU, unitcycles);
|
||||
|
||||
CurSrcAddr += SrcAddrInc<<2;
|
||||
CurDstAddr += DstAddrInc<<2;
|
||||
IterCount--;
|
||||
|
@ -804,14 +804,18 @@ u32 RunFrame()
|
||||
ndscyclestorun = ARM9->Cycles >> 1;
|
||||
}
|
||||
|
||||
RunTimingCriticalDevices(0, ndscyclestorun);
|
||||
|
||||
if (CPUStop & 0x0FFF0000)
|
||||
{
|
||||
s32 cycles = ndscyclestorun - ARM7Offset;
|
||||
s32 critcycles = cycles;
|
||||
cycles = DMAs[4]->Run(cycles);
|
||||
if (cycles > 0) cycles = DMAs[5]->Run(cycles);
|
||||
if (cycles > 0) cycles = DMAs[6]->Run(cycles);
|
||||
if (cycles > 0) cycles = DMAs[7]->Run(cycles);
|
||||
ARM7Offset = -cycles;
|
||||
RunTimingCriticalDevices(1, critcycles);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user