src/mame/machine/snes.c
| r7743 | r7744 | |
| 1779 | 1779 | { |
| 1780 | 1780 | snes_state *state = (snes_state *)space->machine->driver_data; |
| 1781 | 1781 | |
| 1782 | /* every byte transfer takes 8 master cycles */ |
| 1783 | cpu_adjust_icount(space->cpu,-8); |
| 1784 | |
| 1782 | 1785 | if (state->dma_channel[dma].dmap & 0x80) /* PPU->CPU */ |
| 1783 | 1786 | { |
| 1784 | 1787 | if (bbus == 0x2180 && ((abus & 0xfe0000) == 0x7e0000 || (abus & 0x40e000) == 0x0000)) |
| r7743 | r7744 | |
| 1980 | 1983 | UINT16 bbus; |
| 1981 | 1984 | UINT32 abus, abus_bank, length; |
| 1982 | 1985 | |
| 1986 | /* FIXME: we also need to round to the nearest 8 master cycles */ |
| 1987 | |
| 1988 | /* overhead steals 8 master cycles, correct? */ |
| 1989 | cpu_adjust_icount(space->cpu,-8); |
| 1990 | |
| 1983 | 1991 | /* Assume priority of the 8 DMA channels is 0-7 */ |
| 1984 | 1992 | for (i = 0; i < 8; i++) |
| 1985 | 1993 | { |
| r7743 | r7744 | |
| 2090 | 2098 | /* We're done, so write the new abus back to the registers */ |
| 2091 | 2099 | state->dma_channel[i].src_addr = abus; |
| 2092 | 2100 | state->dma_channel[i].trans_size = 0; |
| 2101 | /* active channel takes 8 master cycles */ |
| 2102 | cpu_adjust_icount(space->cpu,-8); |
| 2093 | 2103 | } |
| 2094 | 2104 | } |
| 2105 | |
| 2106 | /* finally, take yet another 8 master cycles for the aforementioned overhead */ |
| 2107 | cpu_adjust_icount(space->cpu,-8); |
| 2095 | 2108 | } |
| 2096 | 2109 | |
| 2097 | 2110 | READ8_HANDLER( superfx_r_bank1 ) |