mirror of
https://github.com/holub/mame
synced 2025-06-02 19:06:43 +03:00
wd33c9x - clarify hardware reset
Hardware reset triggers a SCSI_STATUS_RESET interrupt when the MR signal is asserted, but this is also true when the device first powers on. Move the interrupt generation to device_reset so all hardware resets trigger the interrupt.
This commit is contained in:
parent
88e9c67917
commit
37c3d87807
@ -415,6 +415,8 @@ void wd33c9x_base_device::device_start()
|
|||||||
|
|
||||||
void wd33c9x_base_device::device_reset()
|
void wd33c9x_base_device::device_reset()
|
||||||
{
|
{
|
||||||
|
// This is a hardware reset. Software reset is handled
|
||||||
|
// under COMMAND_CC_RESET.
|
||||||
scsi_bus->ctrl_w(scsi_refid, 0, S_ALL);
|
scsi_bus->ctrl_w(scsi_refid, 0, S_ALL);
|
||||||
scsi_bus->ctrl_wait(scsi_refid, S_SEL|S_BSY|S_RST, S_ALL);
|
scsi_bus->ctrl_wait(scsi_refid, S_SEL|S_BSY|S_RST, S_ALL);
|
||||||
m_addr = 0;
|
m_addr = 0;
|
||||||
@ -433,6 +435,10 @@ void wd33c9x_base_device::device_reset()
|
|||||||
m_irq_cb(CLEAR_LINE);
|
m_irq_cb(CLEAR_LINE);
|
||||||
m_drq_cb(CLEAR_LINE);
|
m_drq_cb(CLEAR_LINE);
|
||||||
m_drq_state = false;
|
m_drq_state = false;
|
||||||
|
|
||||||
|
// Hardware reset triggers a SCSI_STATUS_RESET interrupt.
|
||||||
|
irq_fifo_push(SCSI_STATUS_RESET);
|
||||||
|
update_irq();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -668,13 +674,7 @@ WRITE_LINE_MEMBER(wd33c9x_base_device::reset_w)
|
|||||||
{
|
{
|
||||||
if (state) {
|
if (state) {
|
||||||
LOGMASKED(LOG_LINES, "Reset via MR line\n");
|
LOGMASKED(LOG_LINES, "Reset via MR line\n");
|
||||||
// FIXME: hardware reset is not the same as software reset, and
|
|
||||||
// wd33c93a behaves differently to wd33c93
|
|
||||||
device_reset();
|
device_reset();
|
||||||
|
|
||||||
// hardware reset produces an interrupt
|
|
||||||
m_regs[AUXILIARY_STATUS] |= AUXILIARY_STATUS_INT;
|
|
||||||
m_irq_cb(ASSERT_LINE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user