mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-11-18 18:05:21 +00:00
Revert to no nested native ppc interrupt processing, also filter out cases
where InterruptFlags is 0.
This commit is contained in:
parent
fb42e00b8d
commit
48213aa5eb
@ -929,7 +929,13 @@ void HandleInterrupt(powerpc_registers *r)
|
||||
if (int32(ReadMacInt32(XLM_IRQ_NEST)) > 0)
|
||||
return;
|
||||
|
||||
// Increment interrupt counter
|
||||
// Do nothing if there is no pending interrupt
|
||||
if (InterruptFlags == 0)
|
||||
return;
|
||||
|
||||
// Current interrupt nest level
|
||||
static int interrupt_depth = 0;
|
||||
++interrupt_depth;
|
||||
#if EMUL_TIME_STATS
|
||||
interrupt_count++;
|
||||
#endif
|
||||
@ -945,7 +951,7 @@ void HandleInterrupt(powerpc_registers *r)
|
||||
#if INTERRUPTS_IN_NATIVE_MODE
|
||||
case MODE_NATIVE:
|
||||
// 68k emulator inactive, in nanokernel?
|
||||
if (r->gpr[1] != KernelDataAddr) {
|
||||
if (r->gpr[1] != KernelDataAddr && interrupt_depth == 1) {
|
||||
|
||||
// Prepare for 68k interrupt level 1
|
||||
WriteMacInt16(tswap32(kernel_data->v[0x67c >> 2]), 1);
|
||||
@ -1003,6 +1009,9 @@ void HandleInterrupt(powerpc_registers *r)
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
// We are done with this interrupt
|
||||
--interrupt_depth;
|
||||
}
|
||||
|
||||
static void get_resource(void);
|
||||
|
Loading…
Reference in New Issue
Block a user