|
|
| version 1.4, 2003/11/12 20:02:54 | version 1.6, 2003/11/30 11:20:55 |
|---|---|
| Line 171 void pic_irq(void) { | Line 171 void pic_irq(void) { |
| nevent_reset(NEVENT_PICMASK); | nevent_reset(NEVENT_PICMASK); |
| } | } |
| i286_interrupt((BYTE)((p->pi[0].icw[1] & 0xf8) | irq)); | i286_interrupt((BYTE)((p->pi[0].icw[1] & 0xf8) | irq)); |
| // TRACEOUT(("hardware-int %.2x", (p->pi[0].icw[1] & 0xf8) | irq)); | |
| return; | return; |
| } | } |
| if ((!p->pi[0].levels) || | if ((!p->pi[0].levels) || |
| Line 211 void pic_irq(void) { | Line 212 void pic_irq(void) { |
| p->pi[0].irr &= ~(1 << sirq); | p->pi[0].irr &= ~(1 << sirq); |
| p->pi[0].level[p->pi[0].levels++] = sirq; | p->pi[0].level[p->pi[0].levels++] = sirq; |
| } | } |
| // TRACEOUT(("hardware int %.2x", (p->pi[1].icw[1] & 0xf8) | irq)); | // TRACEOUT(("hardware-int %.2x", (p->pi[1].icw[1] & 0xf8) | irq)); |
| i286_interrupt((BYTE)((p->pi[1].icw[1] & 0xf8) | irq)); | i286_interrupt((BYTE)((p->pi[1].icw[1] & 0xf8) | irq)); |
| } | } |
| } | } |
| Line 337 static void IOOUTCALL pic_o00(UINT port, | Line 338 static void IOOUTCALL pic_o00(UINT port, |
| } | } |
| } | } |
| #if defined(TRACE) | |
| extern int piccnt; | |
| #endif | |
| static void IOOUTCALL pic_o02(UINT port, BYTE dat) { | static void IOOUTCALL pic_o02(UINT port, BYTE dat) { |
| PICITEM picp; | PICITEM picp; |
| Line 344 static void IOOUTCALL pic_o02(UINT port, | Line 349 static void IOOUTCALL pic_o02(UINT port, |
| // TRACEOUT(("pic %x %x", port, dat)); | // TRACEOUT(("pic %x %x", port, dat)); |
| picp = &pic.pi[(port >> 3) & 1]; | picp = &pic.pi[(port >> 3) & 1]; |
| if (!picp->writeicw) { | if (!picp->writeicw) { |
| #if 1 // マスクのセットだけなら nevent_forceexit()をコールしない | |
| if ((isI286DI) || (pic.ext_irq) || | |
| ((picp->imr & dat) == picp->imr)) { | |
| picp->imr = dat; | |
| return; | |
| } | |
| // リセットされたビットは割り込みある? | |
| if (!(picp->irr & (picp->imr & (~dat)))) { | |
| picp->imr = dat; | |
| return; | |
| } | |
| #endif | |
| picp->imr = dat; | picp->imr = dat; |
| #if defined(TRACE) | |
| piccnt++; | |
| #endif | |
| } | } |
| else { | else { |
| picp->icw[picp->writeicw] = dat; | picp->icw[picp->writeicw] = dat; |