mirror of
https://github.com/holub/mame
synced 2025-06-26 22:29:10 +03:00
moved the reset timer across (nw)
This commit is contained in:
parent
12a7bb6ea2
commit
f37f07dc2e
@ -128,10 +128,6 @@ void ide_controller_device::device_timer(emu_timer &timer, device_timer_id id, i
|
|||||||
set_irq(ASSERT_LINE);
|
set_irq(ASSERT_LINE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TID_RESET_CALLBACK:
|
|
||||||
reset();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case TID_SECURITY_ERROR_DONE:
|
case TID_SECURITY_ERROR_DONE:
|
||||||
/* clear error state */
|
/* clear error state */
|
||||||
dev->status &= ~IDE_STATUS_ERROR;
|
dev->status &= ~IDE_STATUS_ERROR;
|
||||||
@ -1266,7 +1262,7 @@ WRITE16_MEMBER( ide_controller_device::write_cs1 )
|
|||||||
{
|
{
|
||||||
dev->status |= IDE_STATUS_BUSY;
|
dev->status |= IDE_STATUS_BUSY;
|
||||||
dev->status &= ~IDE_STATUS_DRIVE_READY;
|
dev->status &= ~IDE_STATUS_DRIVE_READY;
|
||||||
reset_timer->adjust(attotime::from_msec(5));
|
dev->reset_timer->adjust(attotime::from_msec(5));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1310,9 +1306,6 @@ void ide_controller_device::device_start()
|
|||||||
slot[0] = subdevice<ide_slot_device>("0");
|
slot[0] = subdevice<ide_slot_device>("0");
|
||||||
slot[1] = subdevice<ide_slot_device>("1");
|
slot[1] = subdevice<ide_slot_device>("1");
|
||||||
|
|
||||||
/* create a timer for timing status */
|
|
||||||
reset_timer = timer_alloc(TID_RESET_CALLBACK);
|
|
||||||
|
|
||||||
/* register ide states */
|
/* register ide states */
|
||||||
save_item(NAME(config_unknown));
|
save_item(NAME(config_unknown));
|
||||||
save_item(NAME(config_register));
|
save_item(NAME(config_register));
|
||||||
|
@ -130,8 +130,6 @@ private:
|
|||||||
UINT8 config_register[IDE_CONFIG_REGISTERS];
|
UINT8 config_register[IDE_CONFIG_REGISTERS];
|
||||||
UINT8 config_register_num;
|
UINT8 config_register_num;
|
||||||
|
|
||||||
emu_timer * reset_timer;
|
|
||||||
|
|
||||||
UINT8 cur_drive;
|
UINT8 cur_drive;
|
||||||
ide_slot_device *slot[2];
|
ide_slot_device *slot[2];
|
||||||
|
|
||||||
|
@ -284,7 +284,9 @@ void ide_hdd_device::device_start()
|
|||||||
save_item(NAME(dma_active));
|
save_item(NAME(dma_active));
|
||||||
save_item(NAME(verify_only));
|
save_item(NAME(verify_only));
|
||||||
|
|
||||||
|
/* create a timer for timing status */
|
||||||
last_status_timer = timer_alloc(TID_NULL);
|
last_status_timer = timer_alloc(TID_NULL);
|
||||||
|
reset_timer = timer_alloc(TID_RESET_CALLBACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
@ -330,6 +332,16 @@ void ide_hdd_device::device_reset()
|
|||||||
status = IDE_STATUS_DRIVE_READY | IDE_STATUS_SEEK_COMPLETE;
|
status = IDE_STATUS_DRIVE_READY | IDE_STATUS_SEEK_COMPLETE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ide_hdd_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||||
|
{
|
||||||
|
switch(id)
|
||||||
|
{
|
||||||
|
case TID_RESET_CALLBACK:
|
||||||
|
reset();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// read device key
|
// read device key
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
@ -68,6 +68,7 @@ public:
|
|||||||
UINT8 gnetreadlock;
|
UINT8 gnetreadlock;
|
||||||
|
|
||||||
emu_timer * last_status_timer;
|
emu_timer * last_status_timer;
|
||||||
|
emu_timer * reset_timer;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UINT8 m_features[IDE_DISK_SECTOR_SIZE];
|
UINT8 m_features[IDE_DISK_SECTOR_SIZE];
|
||||||
@ -93,6 +94,7 @@ protected:
|
|||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual void device_start();
|
virtual void device_start();
|
||||||
virtual void device_reset();
|
virtual void device_reset();
|
||||||
|
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||||
|
|
||||||
// optional information overrides
|
// optional information overrides
|
||||||
virtual machine_config_constructor device_mconfig_additions() const;
|
virtual machine_config_constructor device_mconfig_additions() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user