mirror of
https://github.com/holub/mame
synced 2025-06-26 14:24:12 +03:00
moved the status timer across (nw)
This commit is contained in:
parent
493194ac6f
commit
12a7bb6ea2
@ -1006,10 +1006,10 @@ READ16_MEMBER( ide_controller_device::read_cs0 )
|
||||
/* return the current status and clear any pending interrupts */
|
||||
case IDE_BANK0_STATUS_COMMAND:
|
||||
result = dev->status;
|
||||
if (last_status_timer->elapsed() > TIME_PER_ROTATION)
|
||||
if (dev->last_status_timer->elapsed() > TIME_PER_ROTATION)
|
||||
{
|
||||
result |= IDE_STATUS_HIT_INDEX;
|
||||
last_status_timer->adjust(attotime::never);
|
||||
dev->last_status_timer->adjust(attotime::never);
|
||||
}
|
||||
if (dev->interrupt_pending == ASSERT_LINE)
|
||||
set_irq(CLEAR_LINE);
|
||||
@ -1067,10 +1067,10 @@ READ16_MEMBER( ide_controller_device::read_cs1 )
|
||||
{
|
||||
case IDE_BANK1_STATUS_CONTROL:
|
||||
result = dev->status;
|
||||
if (last_status_timer->elapsed() > TIME_PER_ROTATION)
|
||||
if (dev->last_status_timer->elapsed() > TIME_PER_ROTATION)
|
||||
{
|
||||
result |= IDE_STATUS_HIT_INDEX;
|
||||
last_status_timer->adjust(attotime::never);
|
||||
dev->last_status_timer->adjust(attotime::never);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1311,7 +1311,6 @@ void ide_controller_device::device_start()
|
||||
slot[1] = subdevice<ide_slot_device>("1");
|
||||
|
||||
/* create a timer for timing status */
|
||||
last_status_timer = timer_alloc(TID_NULL);
|
||||
reset_timer = timer_alloc(TID_RESET_CALLBACK);
|
||||
|
||||
/* register ide states */
|
||||
|
@ -130,7 +130,6 @@ private:
|
||||
UINT8 config_register[IDE_CONFIG_REGISTERS];
|
||||
UINT8 config_register_num;
|
||||
|
||||
emu_timer * last_status_timer;
|
||||
emu_timer * reset_timer;
|
||||
|
||||
UINT8 cur_drive;
|
||||
|
@ -2,6 +2,17 @@
|
||||
|
||||
#define PRINTF_IDE_COMMANDS 0
|
||||
|
||||
enum
|
||||
{
|
||||
TID_NULL,
|
||||
TID_DELAYED_INTERRUPT,
|
||||
TID_DELAYED_INTERRUPT_BUFFER_READY,
|
||||
TID_RESET_CALLBACK,
|
||||
TID_SECURITY_ERROR_DONE,
|
||||
TID_READ_SECTOR_DONE_CALLBACK,
|
||||
TID_WRITE_SECTOR_DONE_CALLBACK
|
||||
};
|
||||
|
||||
//**************************************************************************
|
||||
// IDE DEVICE INTERFACE
|
||||
//**************************************************************************
|
||||
@ -272,6 +283,8 @@ void ide_hdd_device::device_start()
|
||||
|
||||
save_item(NAME(dma_active));
|
||||
save_item(NAME(verify_only));
|
||||
|
||||
last_status_timer = timer_alloc(TID_NULL);
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -67,6 +67,8 @@ public:
|
||||
|
||||
UINT8 gnetreadlock;
|
||||
|
||||
emu_timer * last_status_timer;
|
||||
|
||||
protected:
|
||||
UINT8 m_features[IDE_DISK_SECTOR_SIZE];
|
||||
UINT16 m_num_cylinders;
|
||||
|
Loading…
Reference in New Issue
Block a user