--- a/src/sh4/intc.c Thu Jun 15 10:27:10 2006 +0000 +++ b/src/sh4/intc.c Tue Jan 23 08:17:06 2007 +0000 @@ -1,5 +1,5 @@ /** - * $Id: intc.c,v 1.6 2006-06-15 10:27:10 nkeynes Exp $ + * $Id: intc.c,v 1.7 2007-01-06 04:06:36 nkeynes Exp $ * * SH4 onboard interrupt controller (INTC) implementation * @@ -20,6 +20,7 @@ #include "sh4mmio.h" #include "sh4core.h" #include "intc.h" +#include "eventq.h" struct intc_sources_t { char *name; @@ -106,7 +107,8 @@ intc_state.num_pending = 0; for( i=0; i 0 && (sh4r.sr&SR_BL)==0 && - SH4_INTMASK() < PRIORITY(intc_state.pending[intc_state.num_pending-1]) ) - sh4r.int_pending = 1; - else sh4r.int_pending = 0; + SH4_INTMASK() < PRIORITY(intc_state.pending[intc_state.num_pending-1]) ) { + sh4r.event_pending = 0; + sh4r.event_types |= PENDING_IRQ ; + } + else { + sh4r.event_pending = event_get_next_time(); + sh4r.event_types &= (~PENDING_IRQ); + } }