trunk/src/emu/machine/ataintf.c
| r26008 | r26009 | |
| 19 | 19 | |
| 20 | 20 | void ata_interface_device::set_irq(int state) |
| 21 | 21 | { |
| 22 | | // printf( "irq %d\n", state ); |
| 22 | // printf( "%s: irq %d\n", machine().describe_context(), state ); |
| 23 | 23 | |
| 24 | 24 | m_irq_handler(state); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | void ata_interface_device::set_dmarq(int state) |
| 28 | 28 | { |
| 29 | | // printf( "dmarq %d\n", state ); |
| 29 | // printf( "%s: dmarq %d\n", machine().describe_context(), state ); |
| 30 | 30 | |
| 31 | 31 | m_dmarq_handler(state); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | void ata_interface_device::set_dasp(int state) |
| 35 | 35 | { |
| 36 | | // printf( "dasp %d\n", state ); |
| 36 | // printf( "%s: dasp %d\n", machine().describe_context(), state ); |
| 37 | 37 | |
| 38 | 38 | m_dasp_handler(state); |
| 39 | 39 | } |
| r26008 | r26009 | |
| 132 | 132 | if (m_slot[i]->dev() != NULL) |
| 133 | 133 | result &= m_slot[i]->dev()->read_dma(); |
| 134 | 134 | |
| 135 | | // printf( "read_dma %04x\n", result ); |
| 135 | // printf( "%s: read_dma %04x\n", machine().describe_context(), result ); |
| 136 | 136 | return result; |
| 137 | 137 | } |
| 138 | 138 | |
| r26008 | r26009 | |
| 145 | 145 | |
| 146 | 146 | // { static int last_status = -1; if (offset == 7 ) { if( result == last_status ) return last_status; last_status = result; } else last_status = -1; } |
| 147 | 147 | |
| 148 | | // printf( "read cs0 %04x %04x %04x\n", offset, result, mem_mask ); |
| 148 | // printf( "%s: read cs0 %04x %04x %04x\n", machine().describe_context(), offset, result, mem_mask ); |
| 149 | 149 | |
| 150 | 150 | return result; |
| 151 | 151 | } |
| r26008 | r26009 | |
| 157 | 157 | if (m_slot[i]->dev() != NULL) |
| 158 | 158 | result &= m_slot[i]->dev()->read_cs1(space, offset, mem_mask); |
| 159 | 159 | |
| 160 | | // printf( "read cs1 %04x %04x %04x\n", offset, result, mem_mask ); |
| 160 | // printf( "%s: read cs1 %04x %04x %04x\n", machine().describe_context(), offset, result, mem_mask ); |
| 161 | 161 | |
| 162 | 162 | return result; |
| 163 | 163 | } |
| r26008 | r26009 | |
| 171 | 171 | |
| 172 | 172 | void ata_interface_device::write_dma( UINT16 data ) |
| 173 | 173 | { |
| 174 | | // printf( "write_dma %04x\n", data ); |
| 174 | // printf( "%s: write_dma %04x\n", machine().describe_context(), data ); |
| 175 | 175 | |
| 176 | 176 | for (int i = 0; i < 2; i++) |
| 177 | 177 | if (m_slot[i]->dev() != NULL) |
| r26008 | r26009 | |
| 180 | 180 | |
| 181 | 181 | WRITE16_MEMBER( ata_interface_device::write_cs0 ) |
| 182 | 182 | { |
| 183 | | // printf( "write cs0 %04x %04x %04x\n", offset, data, mem_mask ); |
| 183 | // printf( "%s: write cs0 %04x %04x %04x\n", machine().describe_context(), offset, data, mem_mask ); |
| 184 | 184 | |
| 185 | 185 | for (int i = 0; i < 2; i++) |
| 186 | 186 | if (m_slot[i]->dev() != NULL) |
| r26008 | r26009 | |
| 189 | 189 | |
| 190 | 190 | WRITE16_MEMBER( ata_interface_device::write_cs1 ) |
| 191 | 191 | { |
| 192 | | // printf( "write cs1 %04x %04x %04x\n", offset, data, mem_mask ); |
| 192 | // printf( "%s: write cs1 %04x %04x %04x\n", machine().describe_context(), offset, data, mem_mask ); |
| 193 | 193 | |
| 194 | 194 | for (int i = 0; i < 2; i++) |
| 195 | 195 | if (m_slot[i]->dev() != NULL) |
| r26008 | r26009 | |
| 198 | 198 | |
| 199 | 199 | WRITE_LINE_MEMBER( ata_interface_device::write_dmack ) |
| 200 | 200 | { |
| 201 | | // printf( "write_dmack %04x\n", state ); |
| 201 | // printf( "%s: write_dmack %04x\n", machine().describe_context(), state ); |
| 202 | 202 | |
| 203 | 203 | for (int i = 0; i < 2; i++) |
| 204 | 204 | if (m_slot[i]->dev() != NULL) |