src/mame/drivers/saturn.c
| r12483 | r12484 | |
| 435 | 435 | **********************************************************************************/ |
| 436 | 436 | /* |
| 437 | 437 | DMA TODO: |
| 438 | -fix src / dst add values |
| 438 | 439 | -Add timings(but how fast are each DMA?). |
| 439 | 440 | -Add level priority & DMA status register. |
| 440 | | -Set boundaries. |
| 441 | 441 | */ |
| 442 | 442 | |
| 443 | 443 | #define DIRECT_MODE(_lv_) (!(state->m_scu_regs[5+(_lv_*8)] & 0x01000000)) |
| r12483 | r12484 | |
| 705 | 705 | if(single_dma_step == 2) |
| 706 | 706 | popmessage("Single DMA step == 2??? Contact MAMEdev"); |
| 707 | 707 | |
| 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 | { |
| 708 | 720 | for (; state->m_scu.size[dma_ch] > 0; state->m_scu.size[dma_ch]-=single_dma_step) |
| 709 | 721 | { |
| 710 | 722 | /* Many games directly accesses CD-ROM register 0x05818000, it must be a dword access with current implementation otherwise it won't work */ |
| r12483 | r12484 | |
| 716 | 728 | } |
| 717 | 729 | else if(state->m_scu.dst_add[dma_ch] == 2) |
| 718 | 730 | 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 | } |
| 719 | 735 | else if(state->m_scu.dst_add[dma_ch] == 8) |
| 720 | 736 | { |
| 721 | 737 | /* TRUSTED, Battle Garegga and Batsugun graphics */ |
| r12483 | r12484 | |
| 743 | 759 | state->m_scu.dst[dma_ch]+=state->m_scu.dst_add[dma_ch]; |
| 744 | 760 | state->m_scu.src[dma_ch]+=state->m_scu.src_add[dma_ch]; |
| 745 | 761 | } |
| 762 | } |
| 746 | 763 | |
| 747 | 764 | state->m_scu.size[dma_ch] = tmp_size; |
| 748 | 765 | if(!(DRUP(dma_ch))) state->m_scu.src[dma_ch] = tmp_src; |