nes: vrc4, vrc6, vrc7: change to use CPU cycle counting

This commit is contained in:
goyuken 2012-10-31 19:40:18 +00:00
parent e487e39c9e
commit 5cff02b74d
3 changed files with 11 additions and 11 deletions

View File

@ -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();

View File

@ -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();

View File

@ -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();