Previous 15994 Revisions Next

r14810 Monday 26th March, 2012 at 21:28:06 UTC by Angelo Salese
Small fix for ADPCM irq not supposed to fire an irq when it resets
[src/mess/machine]pce.c

src/mess/machine/pce.c
r14809r14810
386386   memory_set_bankptr( machine, "bank10", pce_cd.bram + ( pce_cd.bram_locked ? PCE_BRAM_SIZE : 0 ) );
387387}
388388
389static void adpcm_stop(running_machine &machine)
389static void adpcm_stop(running_machine &machine, UINT8 irq_flag)
390390{
391391   pce_state *state = machine.driver_data<pce_state>();
392392   pce_cd_t &pce_cd = state->m_cd;
393393   pce_cd.regs[0x0c] |= PCE_CD_ADPCM_STOP_FLAG;
394394   pce_cd.regs[0x0c] &= ~PCE_CD_ADPCM_PLAY_FLAG;
395395   //pce_cd.regs[0x03] = (pce_cd.regs[0x03] & ~0x0c) | (PCE_CD_SAMPLE_STOP_PLAY);
396   pce_cd_set_irq_line( machine, PCE_CD_IRQ_SAMPLE_FULL_PLAY, ASSERT_LINE );
396   if(irq_flag)
397      pce_cd_set_irq_line( machine, PCE_CD_IRQ_SAMPLE_FULL_PLAY, ASSERT_LINE );
397398   pce_cd.regs[0x0d] &= ~0x60;
398399   pce_cd.msm_idle = 1;
399400}
r14809r14810
446447      {
447448         //pce_cd_set_irq_line( device->machine(), PCE_CD_IRQ_SAMPLE_HALF_PLAY, CLEAR_LINE );
448449         //pce_cd_set_irq_line( device->machine(), PCE_CD_IRQ_SAMPLE_FULL_PLAY, CLEAR_LINE );
449         adpcm_stop(device->machine());
450         adpcm_stop(device->machine(),1);
450451         msm5205_reset_w(device, 1);
451452      }
452453   }
r14809r14810
14081409         pce_cd.msm_end_addr = 0;
14091410         pce_cd.msm_half_addr = 0;
14101411         pce_cd.msm_nibble = 0;
1411         adpcm_stop(space->machine());
1412         adpcm_stop(space->machine(), 0);
14121413         msm5205_reset_w( space->machine().device( "msm5205"), 1 );
14131414      }
14141415
r14809r14810
14281429      else if ( (data & 0x40) == 0 )
14291430      {
14301431         /* used by Buster Bros to cancel an in-flight sample */
1431         adpcm_stop(space->machine());
1432         adpcm_stop(space->machine(), 0);
14321433         msm5205_reset_w( space->machine().device( "msm5205"), 1 );
14331434      }
14341435

Previous 15994 Revisions Next


© 1998-2018 The MESS Team