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

Function intlev

src/custom.cpp:3118–3146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3116}
3117
3118int intlev(void)
3119{
3120 if (irq_forced) {
3121 int lvl = irq_forced;
3122 if (irq_forced_delay == 0) {
3123 irq_forced = 0;
3124 } else if (irq_forced_delay > 0 && get_cycles() > irq_forced_delay) {
3125 irq_forced = 0;
3126 irq_forced_delay = 0;
3127 }
3128 return lvl;
3129 }
3130 uae_u16 imask = intreq2 & intena2;
3131 if (!(imask && (intena2 & 0x4000)))
3132 return 0;
3133 if (imask & (0x4000 | 0x2000)) // 13 14
3134 return 6;
3135 if (imask & (0x1000 | 0x0800)) // 11 12
3136 return 5;
3137 if (imask & (0x0400 | 0x0200 | 0x0100 | 0x0080)) // 7 8 9 10
3138 return 4;
3139 if (imask & (0x0040 | 0x0020 | 0x0010)) // 4 5 6
3140 return 3;
3141 if (imask & 0x0008) // 3
3142 return 2;
3143 if (imask & (0x0001 | 0x0002 | 0x0004)) // 0 1 2
3144 return 1;
3145 return 0;
3146}
3147
3148void rethink_uae_int(void)
3149{

Callers 11

cpuboard_rethinkFunction · 0.70
dumpcustomFunction · 0.70
Exception_normalFunction · 0.70
do_interruptFunction · 0.70
haltloop_doFunction · 0.70
dointFunction · 0.70
do_specialtiesFunction · 0.70
run_cpu_threadFunction · 0.70
exec_nostatsFunction · 0.70
execute_normalFunction · 0.70
uae_ppc_emulateFunction · 0.50

Calls 1

get_cyclesFunction · 0.85

Tested by

no test coverage detected