| 3116 | } |
| 3117 | |
| 3118 | int 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 | |
| 3148 | void rethink_uae_int(void) |
| 3149 | { |
no test coverage detected