nes: vrc4, vrc6, vrc7: change to use CPU cycle counting
This commit is contained in:
parent
e487e39c9e
commit
5cff02b74d
|
@ -311,7 +311,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
irq_counter++;
|
||||
}
|
||||
|
||||
public override void ClockPPU()
|
||||
public override void ClockCPU()
|
||||
{
|
||||
if (type == 2) return;
|
||||
if (!irq_enabled) return;
|
||||
|
@ -319,12 +319,12 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
if (irq_mode)
|
||||
{
|
||||
ClockIRQ();
|
||||
throw new InvalidOperationException("needed a test case for this; you found one!");
|
||||
//throw new InvalidOperationException("needed a test case for this; you found one!");
|
||||
}
|
||||
else
|
||||
{
|
||||
irq_prescaler--;
|
||||
if (irq_prescaler == 0)
|
||||
irq_prescaler -= 3;
|
||||
if (irq_prescaler <= 0)
|
||||
{
|
||||
irq_prescaler += 341;
|
||||
ClockIRQ();
|
||||
|
|
|
@ -243,7 +243,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
irq_counter++;
|
||||
}
|
||||
|
||||
public override void ClockPPU()
|
||||
public override void ClockCPU()
|
||||
{
|
||||
if (!irq_enabled) return;
|
||||
|
||||
|
@ -253,8 +253,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
}
|
||||
else
|
||||
{
|
||||
irq_prescaler--;
|
||||
if (irq_prescaler == 0)
|
||||
irq_prescaler -= 3;
|
||||
if (irq_prescaler <= 0)
|
||||
{
|
||||
irq_prescaler += 341;
|
||||
ClockIRQ();
|
||||
|
|
|
@ -222,19 +222,19 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
irq_counter++;
|
||||
}
|
||||
|
||||
public override void ClockPPU()
|
||||
public override void ClockCPU()
|
||||
{
|
||||
if (!irq_enabled) return;
|
||||
|
||||
if (irq_mode)
|
||||
{
|
||||
ClockIRQ();
|
||||
throw new InvalidOperationException("needed a test case for this; you found one!");
|
||||
//throw new InvalidOperationException("needed a test case for this; you found one!");
|
||||
}
|
||||
else
|
||||
{
|
||||
irq_prescaler--;
|
||||
if (irq_prescaler == 0)
|
||||
irq_prescaler -= 3;
|
||||
if (irq_prescaler <= 0)
|
||||
{
|
||||
irq_prescaler += 341;
|
||||
ClockIRQ();
|
||||
|
|
Loading…
Reference in New Issue