Previous 15994 Revisions Next

r9936 Wednesday 5th January, 2011 at 21:15:59 UTC by Wilbert Pol
z80.c: Sync with mame.
[src/emu/cpu/z80]z80.c z80daisy.c

src/emu/cpu/z80/z80.c
r9935r9936
36793679      /* update the IRQ state via the daisy chain */
36803680      z80->irq_state = state;
36813681      if (z80->daisy.present())
3682         z80->irq_state = z80->daisy.update_irq_state();
3682         z80->irq_state = ( z80->daisy.update_irq_state() == ASSERT_LINE ) ? ASSERT_LINE : z80->irq_state;
36833683
36843684      /* the main execute loop will take the interrupt */
36853685   }
src/emu/cpu/z80/z80daisy.c
r9935r9936
144144
145145int z80_daisy_chain::call_ack_device()
146146{
147   int vector = 0;
148
147149   // loop over all devices; dev[0] is the highest priority
148150   for (daisy_entry *daisy = m_daisy_list; daisy != NULL; daisy = daisy->m_next)
149151   {
150152      // if this device is asserting the INT line, that's the one we want
151153      int state = daisy->m_interface->z80daisy_irq_state();
154      vector = daisy->m_interface->z80daisy_irq_ack();
152155      if (state & Z80_DAISY_INT)
153         return daisy->m_interface->z80daisy_irq_ack();
156         return vector;
154157   }
155158   logerror("z80daisy_call_ack_device: failed to find an device to ack!\n");
156   return 0;
159   return vector;
157160}
158161
159162

Previous 15994 Revisions Next


© 1998-2018 The MESS Team