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++;
|
irq_counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ClockPPU()
|
public override void ClockCPU()
|
||||||
{
|
{
|
||||||
if (type == 2) return;
|
if (type == 2) return;
|
||||||
if (!irq_enabled) return;
|
if (!irq_enabled) return;
|
||||||
|
@ -319,12 +319,12 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
||||||
if (irq_mode)
|
if (irq_mode)
|
||||||
{
|
{
|
||||||
ClockIRQ();
|
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
|
else
|
||||||
{
|
{
|
||||||
irq_prescaler--;
|
irq_prescaler -= 3;
|
||||||
if (irq_prescaler == 0)
|
if (irq_prescaler <= 0)
|
||||||
{
|
{
|
||||||
irq_prescaler += 341;
|
irq_prescaler += 341;
|
||||||
ClockIRQ();
|
ClockIRQ();
|
||||||
|
|
|
@ -243,7 +243,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
||||||
irq_counter++;
|
irq_counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ClockPPU()
|
public override void ClockCPU()
|
||||||
{
|
{
|
||||||
if (!irq_enabled) return;
|
if (!irq_enabled) return;
|
||||||
|
|
||||||
|
@ -253,8 +253,8 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
irq_prescaler--;
|
irq_prescaler -= 3;
|
||||||
if (irq_prescaler == 0)
|
if (irq_prescaler <= 0)
|
||||||
{
|
{
|
||||||
irq_prescaler += 341;
|
irq_prescaler += 341;
|
||||||
ClockIRQ();
|
ClockIRQ();
|
||||||
|
|
|
@ -222,19 +222,19 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
||||||
irq_counter++;
|
irq_counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ClockPPU()
|
public override void ClockCPU()
|
||||||
{
|
{
|
||||||
if (!irq_enabled) return;
|
if (!irq_enabled) return;
|
||||||
|
|
||||||
if (irq_mode)
|
if (irq_mode)
|
||||||
{
|
{
|
||||||
ClockIRQ();
|
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
|
else
|
||||||
{
|
{
|
||||||
irq_prescaler--;
|
irq_prescaler -= 3;
|
||||||
if (irq_prescaler == 0)
|
if (irq_prescaler <= 0)
|
||||||
{
|
{
|
||||||
irq_prescaler += 341;
|
irq_prescaler += 341;
|
||||||
ClockIRQ();
|
ClockIRQ();
|
||||||
|
|
Loading…
Reference in New Issue