removed assert from src/emu/cpu/sh4/sh4dmac.c and always set proper channel in sh4_ddt_dma (nw)

This commit is contained in:
Oliver Stöneberg 2014-04-02 18:04:40 +00:00
parent 8fb3f001be
commit ddc2acd46b
4 changed files with 6 additions and 7 deletions

View File

@ -436,7 +436,6 @@ void sh4_dma_ddt(device_t *device, struct sh4_ddt_dma *s)
if (sh4->cpu_type != CPU_TYPE_SH4)
fatalerror("sh4_dma_ddt uses sh4->m[] with SH3\n");
assert(s->channel >= 0 && s->channel < ARRAY_LENGTH(sh4->dma_timer_active));
if (sh4->dma_timer_active[s->channel])
return;
if (s->mode >= 0) {

View File

@ -86,7 +86,7 @@ void dc_state::generic_dma(UINT32 main_adr, void *dma_ptr, UINT32 length, UINT32
ddt.length = length;
ddt.size =size;
ddt.direction = to_mainram;
ddt.channel = -1;
ddt.channel = 0;
ddt.mode = -1;
sh4_dma_ddt(m_maincpu, &ddt);
}

View File

@ -118,7 +118,7 @@ void maple_dc_device::dma_step()
ddtdata.size = 4; // bytes per word
ddtdata.buffer = header; // destination buffer
ddtdata.direction = 0; // 0 source to buffer, 1 buffer to source
ddtdata.channel = -1; // not used
ddtdata.channel = 0;
ddtdata.mode = -1; // copy from/to buffer
sh4_dma_ddt(cpu, &ddtdata);
dma_adr += 8;
@ -134,7 +134,7 @@ void maple_dc_device::dma_step()
ddtdata.size = 4; // bytes per word
ddtdata.buffer = data; // destination buffer
ddtdata.direction = 0; // 0 source to buffer, 1 buffer to source
ddtdata.channel = -1; // not used
ddtdata.channel = 0;
ddtdata.mode = -1; // copy from/to buffer
sh4_dma_ddt(cpu, &ddtdata);
dma_adr += length*4;
@ -189,7 +189,7 @@ void maple_dc_device::dma_step()
ddtdata.size = 4; // bytes per word
ddtdata.buffer = &data; // destination buffer
ddtdata.direction = 1; // 0 source to buffer, 1 buffer to source
ddtdata.channel = -1; // not used
ddtdata.channel = 0;
ddtdata.mode = -1; // copy from/to buffer
sh4_dma_ddt(cpu, &ddtdata);
dma_state = dma_endflag ? DMA_DONE : DMA_SEND;
@ -214,7 +214,7 @@ void maple_dc_device::dma_step()
ddtdata.size = 4; // bytes per word
ddtdata.buffer = data; // destination buffer
ddtdata.direction = 1; // 0 source to buffer, 1 buffer to source
ddtdata.channel = -1; // not used
ddtdata.channel = 0;
ddtdata.mode = -1; // copy from/to buffer
sh4_dma_ddt(cpu, &ddtdata);
dma_dest += length*4;

View File

@ -68,7 +68,7 @@ TIMER_CALLBACK_MEMBER(dc_cons_state::atapi_xfer_end )
ddtdata.size = 4;
ddtdata.buffer = sector_buffer;
ddtdata.direction=1; // 0 source to buffer, 1 buffer to destination
ddtdata.channel= -1; // not used
ddtdata.channel= 0;
ddtdata.mode= -1; // copy from/to buffer
printf("ATAPI: DMA one sector to %x, %x remaining\n", atapi_xferbase, atapi_xferlen);
sh4_dma_ddt(m_maincpu, &ddtdata);