src/mame/drivers/saturn.c
| r12479 | r12480 | |
| 666 | 666 | saturn_state *state = space->machine().driver_data<saturn_state>(); |
| 667 | 667 | UINT32 tmp_src,tmp_dst,tmp_size; |
| 668 | 668 | UINT8 single_dma_step; |
| 669 | UINT8 cd_transfer_flag; |
| 669 | 670 | |
| 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) |
| 671 | 672 | { |
| 672 | 673 | if(LOG_SCU) printf("DMA lv %d transfer START\n" |
| 673 | 674 | "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]); |
| r12479 | r12480 | |
| 696 | 697 | if(!(DWUP(dma_ch))) tmp_dst = state->m_scu.dst[dma_ch]; |
| 697 | 698 | |
| 698 | 699 | 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; |
| 699 | 701 | |
| 700 | | if(single_dma_step > 4) |
| 702 | if(single_dma_step > 4 && !cd_transfer_flag) |
| 701 | 703 | single_dma_step = 4; |
| 702 | 704 | |
| 703 | 705 | if(single_dma_step == 2) |
| r12479 | r12480 | |
| 706 | 708 | for (; state->m_scu.size[dma_ch] > 0; state->m_scu.size[dma_ch]-=single_dma_step) |
| 707 | 709 | { |
| 708 | 710 | /* 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) |
| 710 | 712 | { |
| 711 | 713 | space->write_dword(state->m_scu.dst[dma_ch], space->read_dword(state->m_scu.src[dma_ch] )); |
| 712 | 714 | if(state->m_scu.dst_add[dma_ch] == 8) |
| r12479 | r12480 | |
| 790 | 792 | if(indirect_src & 0x80000000) |
| 791 | 793 | job_done = 1; |
| 792 | 794 | |
| 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) |
| 794 | 796 | { |
| 795 | 797 | if(LOG_SCU) printf("DMA lv %d indirect mode transfer START\n" |
| 796 | 798 | "Index %08x Start %08x End %08x Size %04x\n",dma_ch,tmp_src,indirect_src,indirect_dst,indirect_size); |