Previous 15994 Revisions Next

r12480 Thursday 4th August, 2011 at 21:29:46 UTC by Angelo Salese
Fixed regression
[src/mame/drivers]saturn.c

src/mame/drivers/saturn.c
r12479r12480
666666   saturn_state *state = space->machine().driver_data<saturn_state>();
667667   UINT32 tmp_src,tmp_dst,tmp_size;
668668   UINT8 single_dma_step;
669   UINT8 cd_transfer_flag;
669670
670   if(state->m_scu.src_add[dma_ch] == 0)
671   if(state->m_scu.src_add[dma_ch] == 0 || state->m_scu.dst_add[dma_ch] != 4)
671672   {
672673   if(LOG_SCU) printf("DMA lv %d transfer START\n"
673674                      "Start %08x End %08x Size %04x\n",dma_ch,state->m_scu.src[dma_ch],state->m_scu.dst[dma_ch],state->m_scu.size[dma_ch]);
r12479r12480
696697   if(!(DWUP(dma_ch))) tmp_dst = state->m_scu.dst[dma_ch];
697698
698699   single_dma_step = state->m_scu.dst_add[dma_ch];
700   cd_transfer_flag = state->m_scu.src_add[dma_ch] == 0 && state->m_scu.src[dma_ch] == 0x05818000;
699701
700   if(single_dma_step > 4)
702   if(single_dma_step > 4 && !cd_transfer_flag)
701703      single_dma_step = 4;
702704
703705   if(single_dma_step == 2)
r12479r12480
706708   for (; state->m_scu.size[dma_ch] > 0; state->m_scu.size[dma_ch]-=single_dma_step)
707709   {
708710      /* Many games directly accesses CD-ROM register 0x05818000, it must be a dword access with current implementation otherwise it won't work */
709      if(state->m_scu.src_add[dma_ch] == 0)
711      if(cd_transfer_flag)
710712      {
711713         space->write_dword(state->m_scu.dst[dma_ch],  space->read_dword(state->m_scu.src[dma_ch]  ));
712714         if(state->m_scu.dst_add[dma_ch] == 8)
r12479r12480
790792      if(indirect_src & 0x80000000)
791793         job_done = 1;
792794
793      if(state->m_scu.src_add[dma_ch] == 0)
795      if(state->m_scu.src_add[dma_ch] == 0 || state->m_scu.dst_add[dma_ch] != 4)
794796      {
795797         if(LOG_SCU) printf("DMA lv %d indirect mode transfer START\n"
796798                          "Index %08x Start %08x End %08x Size %04x\n",dma_ch,tmp_src,indirect_src,indirect_dst,indirect_size);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team