Previous 15994 Revisions Next

r12484 Friday 5th August, 2011 at 01:33:58 UTC by Angelo Salese
SCU DMA fix for Advanced World War
[src/mame/drivers]saturn.c

src/mame/drivers/saturn.c
r12483r12484
435435**********************************************************************************/
436436/*
437437DMA TODO:
438-fix src / dst add values
438439-Add timings(but how fast are each DMA?).
439440-Add level priority & DMA status register.
440-Set boundaries.
441441*/
442442
443443#define DIRECT_MODE(_lv_)         (!(state->m_scu_regs[5+(_lv_*8)] & 0x01000000))
r12483r12484
705705   if(single_dma_step == 2)
706706      popmessage("Single DMA step == 2??? Contact MAMEdev");
707707
708   /* Advanced World War screen */
709   if(state->m_scu.dst_add[dma_ch] == 0x40)
710   {
711      for (; state->m_scu.size[dma_ch] > 0; state->m_scu.size[dma_ch]-=2)
712      {
713         space->write_word(state->m_scu.dst[dma_ch],     space->read_word(state->m_scu.src[dma_ch]  ));
714         state->m_scu.dst[dma_ch]+=0x20;
715         state->m_scu.src[dma_ch]+=2;
716      }
717   }
718   else
719   {
708720   for (; state->m_scu.size[dma_ch] > 0; state->m_scu.size[dma_ch]-=single_dma_step)
709721   {
710722      /* Many games directly accesses CD-ROM register 0x05818000, it must be a dword access with current implementation otherwise it won't work */
r12483r12484
716728      }
717729      else if(state->m_scu.dst_add[dma_ch] == 2)
718730         space->write_word(state->m_scu.dst[dma_ch],space->read_word(state->m_scu.src[dma_ch]));
731      else if(state->m_scu.dst_add[dma_ch] == 0x40)
732      {
733         space->write_word(state->m_scu.dst[dma_ch],     space->read_word(state->m_scu.src[dma_ch]  ));
734      }
719735      else if(state->m_scu.dst_add[dma_ch] == 8)
720736      {
721737         /* TRUSTED, Battle Garegga and Batsugun graphics */
r12483r12484
743759      state->m_scu.dst[dma_ch]+=state->m_scu.dst_add[dma_ch];
744760      state->m_scu.src[dma_ch]+=state->m_scu.src_add[dma_ch];
745761   }
762   }
746763
747764   state->m_scu.size[dma_ch] = tmp_size;
748765   if(!(DRUP(dma_ch))) state->m_scu.src[dma_ch] = tmp_src;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team