Previous 15994 Revisions Next

r12224 Thursday 14th July, 2011 at 00:06:05 UTC by Angelo Salese
Wrong irq mask in pending irq check, this fixes broken introdon in MAME, nw
[src/mame/drivers]saturn.c

src/mame/drivers/saturn.c
r12223r12224
518518}
519519
520520/* test pending irqs */
521static void scu_test_irq(running_machine &machine)
521static void scu_test_pending_irq(running_machine &machine)
522522{
523523   saturn_state *state = machine.driver_data<saturn_state>();
524524   int i;
r12223r12224
533533
534534   for(i=0;i<31;i++)
535535   {
536      if((state->m_scu_regs[0xa0/4] & 1 << i) && (state->m_scu.ist & 1 << i))
536      if((!(state->m_scu_regs[0xa0/4] & 1 << i)) && (state->m_scu.ist & 1 << i))
537537      {
538538         if(irq_level[i] != -1) /* TODO: cheap check for undefined irqs */
539539            device_set_input_line_and_vector(state->m_maincpu, irq_level[i], HOLD_LINE, 0x40 + i);
r12223r12224
665665      state->m_scu_irq.vdp1_end =   (((state->m_scu_regs[0xa0/4] & 0x2000)>>13) ^ 1);
666666      state->m_scu_irq.abus =       (((state->m_scu_regs[0xa0/4] & 0x8000)>>15) ^ 1);
667667
668      scu_test_irq(space->machine());
668      scu_test_pending_irq(space->machine());
669669
670670      if(state->m_scu_irq.dsp_end || state->m_scu_irq.pad)
671         if(state->m_scu_regs[0xa0/4] != 0x80)
671         if(state->m_scu_regs[0xa0/4] != 0x80 || state->m_scu_regs[0xa0/4] != 0xacbab8be)
672672            popmessage("Enabled funky IRQ %08x, contact MAMEdev",state->m_scu_regs[0xa0/4] ^ 0xffffffff);
673673
674674      break;
r12223r12224
676676      case 0xa4/4:
677677      if(LOG_SCU) logerror("PC=%08x IRQ status reg set:%08x %08x\n",cpu_get_pc(&space->device()),state->m_scu_regs[41],mem_mask);
678678
679      state->m_scu.ist &= state->m_scu_regs[offset];
679      state->m_scu.ist = state->m_scu_regs[offset];
680680      break;
681681      case 0xa8/4: if(LOG_SCU) logerror("A-Bus IRQ ACK %08x\n",state->m_scu_regs[42]); break;
682682      case 0xc4/4: if(LOG_SCU) logerror("SCU SDRAM set: %02x\n",state->m_scu_regs[49]); break;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team