UINT8 a2bus_cffa2000_device::read_c0nx(address_space &space, UINT8 offset) { switch (offset) { case 0: return m_lastdata>>8; case 3: m_writeprotect = false; break; case 4: m_writeprotect = true; break; case 8: m_lastdata = ide_controller_r(m_ide, 0x1f0+offset-8, 2); return m_lastdata & 0xff; case 9: case 0xa: case 0xb: case 0xc: case 0xd: case 0xe: case 0xf: return ide_controller_r(m_ide, 0x1f0+offset-8, 1); } return 0xff; }
/*------------------------------------------------- a2cffa_r - device read function -------------------------------------------------*/ READ8_DEVICE_HANDLER(a2cffa_r) { a2cffa_token *token = get_token(device); if (offset == 0) { return token->lastdata>>8; } else if (offset == 8) { token->lastdata = ide_controller_r(device->machine().devicelist().find("ide"), 0x1f0+offset-8, 2); return token->lastdata & 0xff; } else if (offset > 8) { return ide_controller_r(device->machine().devicelist().find("ide"), 0x1f0+offset-8, 1); } return 0xff; } /*------------------------------------------------- a2cffa_w - device write function -------------------------------------------------*/