Previous 15994 Revisions Next

r1149 Friday 19th October, 2007 at 14:21:48 UTC by Curt Coder
[MFP68901] Fixed IMR write
[src/mess/machine]68901mfp.c

src/mess/machine/68901mfp.c
r1148r1149
7676   {
7777      if ((BIT(gpold, bit) == 1) && (BIT(gpnew, bit) == 0)) // if transition from 1 to 0 is detected...
7878      {
79         logerror("MFP68901 #%u Edge Transition Detected on GPIO%u\n", which, bit);
80
7981         if (mfp_p->ier & GPIO_MASK[bit]) // AND interrupt enabled bit is set...
8082         {
81            logerror("MFP68901 #%u Edge Transition Detected on GPIO%u\n", which, bit);
83            logerror("MFP68901 #%u Interrupt Pending for GPIO%u\n", which, bit);
8284
8385            mfp_p->ipr |= GPIO_MASK[bit]; // set interrupt pending bit
8486         }
r1148r1149
114116               mfp_p->isr |= (1 << ch); // set interrupt in service bit (bit will be cleared later by the interrupt service routine)
115117            }
116118
117            mfp_p->intf->irq_callback(which, ASSERT_LINE, (mfp_p->vr & 0xf0) | ch); // fire interrupt callback
119            mfp_p->intf->irq_callback(which, HOLD_LINE, (mfp_p->vr & 0xf0) | ch); // fire interrupt callback
118120
119121            return;
120122         }
r1148r1149
583585   case MFP68901_REGISTER_IMRA:
584586      logerror("MFP68901 #%u Interrupt Mask Register A : %x\n", which, data);
585587      mfp_p->imr = (data << 8) | (mfp_p->imr & 0xff);
588      mfp_p->isr &= mfp_p->imr;
586589      break;
587590
588591   case MFP68901_REGISTER_IMRB:
589592      logerror("MFP68901 #%u Interrupt Mask Register B : %x\n", which, data);
590593      mfp_p->imr = (mfp_p->imr & 0xff00) | data;
594      mfp_p->isr &= mfp_p->imr;
591595      break;
592596
593597   case MFP68901_REGISTER_VR:

Previous 15994 Revisions Next


© 1998-2018 The MESS Team