NESHawk - a small speedup (a few fps) - don't call Board.ClockPPU unless it is implemented
This commit is contained in:
parent
3d443b3e2f
commit
ebdb244714
|
@ -404,6 +404,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
}
|
||||
Board.Dispose();
|
||||
Board = newboard;
|
||||
ppu.HasClockPPU = Board.GetType().GetMethod(nameof(INESBoard.ClockPPU)).DeclaringType != typeof(NESBoardBase);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
{
|
||||
public int cpu_step, cpu_stepcounter;
|
||||
|
||||
public bool HasClockPPU = false;
|
||||
|
||||
// this only handles region differences within the PPU
|
||||
int preNMIlines;
|
||||
int postNMIlines;
|
||||
|
@ -333,7 +335,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
Reg2002_vblank_clear_pending = false;
|
||||
}
|
||||
|
||||
nes.Board.ClockPPU();
|
||||
if (HasClockPPU)
|
||||
{
|
||||
nes.Board.ClockPPU();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue