mirror of https://github.com/snes9xgit/snes9x.git
Fix case when vtimer and htimer are enabled and the timer would have triggered earlier on the current line.
This commit is contained in:
parent
c932d4e37a
commit
d33c9eaad5
|
@ -889,7 +889,7 @@ static uint8 debug_cpu_op_print (char *Line, uint8 Bank, uint16 Address)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(Line, "%-44s A:%04X X:%04X Y:%04X D:%04X DB:%02X S:%04X P:%c%c%c%c%c%c%c%c%c HC:%04ld VC:%03ld FC:%02d %03x %c",
|
sprintf(Line, "%-44s A:%04X X:%04X Y:%04X D:%04X DB:%02X S:%04X P:%c%c%c%c%c%c%c%c%c HC:%04ld VC:%03ld FC:%02d %03x %c %c%c",
|
||||||
Line, Registers.A.W, Registers.X.W, Registers.Y.W,
|
Line, Registers.A.W, Registers.X.W, Registers.Y.W,
|
||||||
Registers.D.W, Registers.DB, Registers.S.W,
|
Registers.D.W, Registers.DB, Registers.S.W,
|
||||||
CheckEmulation() ? 'E' : 'e',
|
CheckEmulation() ? 'E' : 'e',
|
||||||
|
@ -905,7 +905,9 @@ static uint8 debug_cpu_op_print (char *Line, uint8 Bank, uint16 Address)
|
||||||
(long) CPU.V_Counter,
|
(long) CPU.V_Counter,
|
||||||
IPPU.FrameCount,
|
IPPU.FrameCount,
|
||||||
(CPU.IRQExternal ? 0x100 : 0) | (PPU.HTimerEnabled ? 0x10 : 0) | (PPU.VTimerEnabled ? 0x01 : 0),
|
(CPU.IRQExternal ? 0x100 : 0) | (PPU.HTimerEnabled ? 0x10 : 0) | (PPU.VTimerEnabled ? 0x01 : 0),
|
||||||
CPU.NMIPending ? 'N' : '.');
|
CPU.NMIPending ? 'N' : '.',
|
||||||
|
CPU.IRQTransition ? 'T' : ' ',
|
||||||
|
CPU.IRQLine ? 'L' : ' ');
|
||||||
|
|
||||||
return (Size);
|
return (Size);
|
||||||
}
|
}
|
||||||
|
|
7
ppu.cpp
7
ppu.cpp
|
@ -274,7 +274,7 @@ static int CyclesUntilNext (int hc, int vc)
|
||||||
int32 total = 0;
|
int32 total = 0;
|
||||||
int vpos = CPU.V_Counter;
|
int vpos = CPU.V_Counter;
|
||||||
|
|
||||||
if (vc - vpos >= 0)
|
if (vc - vpos > 0)
|
||||||
{
|
{
|
||||||
// It's still in this frame */
|
// It's still in this frame */
|
||||||
// Add number of lines
|
// Add number of lines
|
||||||
|
@ -285,6 +285,11 @@ static int CyclesUntilNext (int hc, int vc)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (vc == vpos && hc > CPU.Cycles)
|
||||||
|
{
|
||||||
|
return hc;
|
||||||
|
}
|
||||||
|
|
||||||
total += (Timings.V_Max - vpos) * Timings.H_Max;
|
total += (Timings.V_Max - vpos) * Timings.H_Max;
|
||||||
if (vpos <= 240 && Timings.InterlaceField && !IPPU.Interlace)
|
if (vpos <= 240 && Timings.InterlaceField && !IPPU.Interlace)
|
||||||
total -= ONE_DOT_CYCLE;
|
total -= ONE_DOT_CYCLE;
|
||||||
|
|
Loading…
Reference in New Issue