--- xmil/ievent.c 2004/08/11 12:08:16 1.1 +++ xmil/ievent.c 2004/08/14 12:16:17 1.4 @@ -6,7 +6,7 @@ #include "ievent.h" - IEVENT ievent; +// ここでデイジーチェイン typedef BRESULT (*IEVENTFN)(UINT id); @@ -19,7 +19,7 @@ static BRESULT dummy(UINT id) { static const IEVENTFN ieventfn[IEVENT_MAX] = { dummy, // IEVENT_SIO - dummy, // IEVENT_DMA + ieitem_dmac, // IEVENT_DMA ieitem_ctc, // IEVENT_CTC0 ieitem_ctc, // IEVENT_CTC1 ieitem_ctc, // IEVENT_CTC2 @@ -28,21 +28,24 @@ static const IEVENTFN ieventfn[IEVENT_MA // ---- -void ievent_reset(void) { -} - void ievent_progress(void) { UINT i; UINT bit; - if ((CPU_REQIRQ == 0) || (!Z80_ABLEINTERRUPT())) { + if ((CPU_REQIRQ == 0) || (Z80_DI)) { return; } for (i=0, bit=1; i> 1; + if (!(r & bit)) { + return; } + nevent_forceexit(); }