update_irq:\r
#ifndef EMU_CORE_DEBUG\r
// update IRQ level\r
- if (!SekShouldInterrupt()) // hack\r
{\r
int lines, pints, irq = 0;\r
lines = (pvid->reg[1] & 0x20) | (pvid->reg[0] & 0x10);\r
pints = pvid->pending_ints & lines;\r
if (pints & 0x20) irq = 6;\r
else if (pints & 0x10) irq = pvid->hint_irq;\r
- if (SekIrqLevel < irq)\r
+ if (irq) {\r
+ // VDP irqs have highest prio, overwrite old level\r
SekInterrupt(irq); // update line\r
\r
- // this is broken because cost of current insn isn't known here\r
- if (irq) SekEndRun(21); // make it delayed\r
+ // this is broken because cost of current insn isn't known here\r
+ SekEndRun(21); // make it delayed\r
+ } else if (SekIrqLevel >= pvid->hint_irq) {\r
+ // no VDP irq, query lower irqs\r
+ SekInterrupt(PicoPicoIrqAck(0));\r
+ }\r
}\r
#endif\r
}\r