mirror of https://github.com/snes9xgit/snes9x.git
Some simplification.
This commit is contained in:
parent
f70592df90
commit
c4cf40c509
19
cpuexec.cpp
19
cpuexec.cpp
|
@ -242,8 +242,14 @@ void S9xMainLoop (void)
|
|||
}
|
||||
}
|
||||
|
||||
if (CPU.IRQTransition)
|
||||
if ((CPU.Cycles >= Timings.NextIRQTimer))
|
||||
{
|
||||
S9xUpdateIRQPositions();
|
||||
|
||||
#ifdef DEBUGGER
|
||||
S9xTraceMessage ("Timer triggered\n");
|
||||
#endif
|
||||
|
||||
if (CPU.WaitingForInterrupt)
|
||||
{
|
||||
CPU.WaitingForInterrupt = FALSE;
|
||||
|
@ -253,20 +259,9 @@ void S9xMainLoop (void)
|
|||
S9xDoHEventProcessing();
|
||||
}
|
||||
|
||||
CPU.IRQTransition = FALSE;
|
||||
CPU.IRQLine = TRUE;
|
||||
}
|
||||
|
||||
if ((CPU.Cycles >= Timings.NextIRQTimer) && !CPU.IRQLine && !CPU.IRQTransition)
|
||||
{
|
||||
S9xUpdateIRQPositions();
|
||||
|
||||
#ifdef DEBUGGER
|
||||
S9xTraceMessage ("Timer triggered\n");
|
||||
#endif
|
||||
CPU.IRQTransition = TRUE;
|
||||
}
|
||||
|
||||
if ((CPU.IRQLine || CPU.IRQExternal) && !CheckFlag(IRQ))
|
||||
{
|
||||
/* The flag pushed onto the stack is the new value */
|
||||
|
|
Loading…
Reference in New Issue