mirror of https://github.com/snes9xgit/snes9x.git
Use IRQTransition again.
This commit is contained in:
parent
756f370021
commit
e8afbb5e46
21
cpuexec.cpp
21
cpuexec.cpp
|
@ -243,14 +243,8 @@ void S9xMainLoop (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((CPU.Cycles >= Timings.NextIRQTimer))
|
if (CPU.IRQTransition)
|
||||||
{
|
{
|
||||||
S9xUpdateIRQPositions(false);
|
|
||||||
|
|
||||||
#ifdef DEBUGGER
|
|
||||||
S9xTraceMessage ("Timer triggered\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (CPU.WaitingForInterrupt)
|
if (CPU.WaitingForInterrupt)
|
||||||
{
|
{
|
||||||
CPU.WaitingForInterrupt = FALSE;
|
CPU.WaitingForInterrupt = FALSE;
|
||||||
|
@ -259,10 +253,20 @@ void S9xMainLoop (void)
|
||||||
while (CPU.Cycles >= CPU.NextEvent)
|
while (CPU.Cycles >= CPU.NextEvent)
|
||||||
S9xDoHEventProcessing();
|
S9xDoHEventProcessing();
|
||||||
}
|
}
|
||||||
|
CPU.IRQTransition = FALSE;
|
||||||
CPU.IRQLine = TRUE;
|
CPU.IRQLine = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CPU.Cycles >= Timings.NextIRQTimer)
|
||||||
|
{
|
||||||
|
#ifdef DEBUGGER
|
||||||
|
S9xTraceMessage ("Timer triggered\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
S9xUpdateIRQPositions(false);
|
||||||
|
CPU.IRQTransition = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if ((CPU.IRQLine || CPU.IRQExternal) && !CheckFlag(IRQ))
|
if ((CPU.IRQLine || CPU.IRQExternal) && !CheckFlag(IRQ))
|
||||||
{
|
{
|
||||||
/* The flag pushed onto the stack is the new value */
|
/* The flag pushed onto the stack is the new value */
|
||||||
|
@ -273,7 +277,6 @@ void S9xMainLoop (void)
|
||||||
/* Change IRQ flag for instructions that set it only on last cycle */
|
/* Change IRQ flag for instructions that set it only on last cycle */
|
||||||
CHECK_FOR_IRQ_CHANGE();
|
CHECK_FOR_IRQ_CHANGE();
|
||||||
|
|
||||||
|
|
||||||
#ifdef DEBUGGER
|
#ifdef DEBUGGER
|
||||||
if ((CPU.Flags & BREAK_FLAG) && !(CPU.Flags & SINGLE_STEP_FLAG))
|
if ((CPU.Flags & BREAK_FLAG) && !(CPU.Flags & SINGLE_STEP_FLAG))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue