MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / ppc_interrupt

Function ppc_interrupt

src/cpuboard.cpp:221–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221bool ppc_interrupt(int new_m68k_ipl)
222{
223 bool m68kint = (io_reg[CSIII_REG_INT] & P5_INT_MASTER) != 0;
224 bool active = (io_reg[CSIII_REG_IPL_EMU] & P5_DISABLE_INT) == 0;
225 bool iplemu = (io_reg[CSIII_REG_INT] & P5_ENABLE_IPL) == 0;
226
227 if (!active)
228 return false;
229
230 if (!m68kint && iplemu && active) {
231
232 uae_u8 ppcipl = (~io_reg[CSIII_REG_IPL_EMU]) & P5_PPC_IPL_MASK;
233 if (new_m68k_ipl < 0)
234 new_m68k_ipl = 0;
235 io_reg[CSIII_REG_IPL_EMU] &= ~P5_M68k_IPL_MASK;
236 io_reg[CSIII_REG_IPL_EMU] |= (new_m68k_ipl << 3) ^ P5_M68k_IPL_MASK;
237 if (new_m68k_ipl > ppcipl) {
238 set_ppc_interrupt();
239 } else {
240 clear_ppc_interrupt();
241 }
242 }
243
244 return m68kint;
245}
246#endif
247
248static bool mapromconfigured(void)

Callers 6

cpuboard_rethinkFunction · 0.85
haltloop_doFunction · 0.85
dointFunction · 0.85
exec_nostatsFunction · 0.85
execute_normalFunction · 0.85
uae_ppc_emulateFunction · 0.85

Calls 2

set_ppc_interruptFunction · 0.85
clear_ppc_interruptFunction · 0.85

Tested by

no test coverage detected