diff options
author | 2013-06-14 19:17:43 +0000 | |
---|---|---|
committer | 2013-06-14 19:17:43 +0000 | |
commit | e3bbb0a27d46d011c724fa886c5087c7a8daff6e (patch) | |
tree | cf71355001c6e375d28f721d7f6c0925cb798398 /src/emu/machine/idectrl.c | |
parent | 358509548ac512cf1fa7b3f81e258f4ac58cfe43 (diff) |
Renamed some #defines to match up closer to the ATA specification. Added validation to register access, switching Primal Rage 2 away from using the DMA interface in it's DMA handler as the game only executes normal read commands (nw)
Diffstat (limited to 'src/emu/machine/idectrl.c')
-rw-r--r-- | src/emu/machine/idectrl.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c index d7d3d12bc59..80d19baf03f 100644 --- a/src/emu/machine/idectrl.c +++ b/src/emu/machine/idectrl.c @@ -232,6 +232,15 @@ WRITE16_MEMBER( ide_controller_device::write_cs1 ) m_slot[i]->dev()->write_cs1(space, offset, data, mem_mask); } +WRITE_LINE_MEMBER( ide_controller_device::write_dmack ) +{ +// printf( "write_dmack %04x\n", state ); + + for (int i = 0; i < 2; i++) + if (m_slot[i]->dev() != NULL) + m_slot[i]->dev()->write_dmack(state); +} + WRITE8_MEMBER( ide_controller_device::write_via_config ) { // printf( "write via config %04x %04x %04x\n", offset, data, mem_mask ); @@ -416,7 +425,9 @@ bus_master_ide_controller_device::bus_master_ide_controller_device(const machine dma_last_buffer(0), bus_master_command(0), bus_master_status(0), - bus_master_descriptor(0) + bus_master_descriptor(0), + m_irq(0), + m_dmarq(0) { } @@ -568,6 +579,8 @@ WRITE32_MEMBER( bus_master_ide_controller_device::ide_bus_master32_w ) void bus_master_ide_controller_device::execute_dma() { + write_dmack(ASSERT_LINE); + while (m_dmarq && (bus_master_status & IDE_BUSMASTER_STATUS_ACTIVE)) { /* if we're out of space, grab the next descriptor */ @@ -624,4 +637,6 @@ void bus_master_ide_controller_device::execute_dma() } } } + + write_dmack(CLEAR_LINE); } |