diff options
author | 2013-01-05 22:43:37 +0000 | |
---|---|---|
committer | 2013-01-05 22:43:37 +0000 | |
commit | dac3c173c67c5db6fd9d7e47c58360f64e92e791 (patch) | |
tree | 6c60af10483518c9d0ca46dd2478bb6111308876 /src | |
parent | 5bf7f966fd2532561c4b8656c13638a0b7f5f20f (diff) |
Revert of a portion of r20073:
idectrl.c [Peter Ferrie]
- correct status flags for multi-sector reads
- implement more correct controller reset values
- fix phantom slave drive detection problem
Causes problems noted with many MAME games such as Area 51: Site 4, Primal Rage 2, All Viper.c games among others that are either not starting or constantly RE-starting looking for proper IDE communications.
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/machine/idectrl.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c index d473a245d51..d777e9316ce 100644 --- a/src/emu/machine/idectrl.c +++ b/src/emu/machine/idectrl.c @@ -518,10 +518,8 @@ void ide_controller_device::continue_read() /* reset the totals */ buffer_offset = 0; - /* clear just the busy flag - the buffer ready flag stays set until all sectors are read - */ -// status &= ~IDE_STATUS_BUFFER_READY; + /* clear the buffer ready and busy flag */ + status &= ~IDE_STATUS_BUFFER_READY; status &= ~IDE_STATUS_BUSY; if (master_password_enable || user_password_enable) @@ -542,7 +540,6 @@ void ide_controller_device::continue_read() read_next_sector(); else { - status &= ~IDE_STATUS_BUFFER_READY; /* now clear it */ bus_master_status &= ~IDE_BUSMASTER_STATUS_ACTIVE; dma_active = 0; } @@ -699,7 +696,7 @@ void ide_controller_device::read_first_sector() void ide_controller_device::read_next_sector() { /* mark ourselves busy */ -// status |= IDE_STATUS_BUSY; + status |= IDE_STATUS_BUSY; if (command == IDE_COMMAND_READ_MULTIPLE_BLOCK) { @@ -1183,10 +1180,6 @@ UINT32 ide_controller_device::ide_controller_read(int bank, offs_t offset, int s status &= ~IDE_STATUS_DRIVE_READY; } } - else - { - return 0; - } switch (BANK(bank, offset)) { @@ -1439,17 +1432,9 @@ void ide_controller_device::ide_controller_write(int bank, offs_t offset, int si //if (data == 0x04) if (data & 0x04) { -// status |= IDE_STATUS_BUSY; -// status &= ~IDE_STATUS_DRIVE_READY; -// reset_timer->adjust(attotime::from_msec(5)); - device_reset(); /* deliver instantly to support buggy BIOSes that don't poll properly */ - sector_count = 1; - drive[0].cur_sector = 1; - drive[0].cur_head = 0; - drive[0].cur_cylinder = 0; - drive[1].cur_sector = 1; - drive[1].cur_head = 0; - drive[1].cur_cylinder = 0; + status |= IDE_STATUS_BUSY; + status &= ~IDE_STATUS_DRIVE_READY; + reset_timer->adjust(attotime::from_msec(5)); } break; } |