trunk/src/emu/machine/idectrl.c
| r23671 | r23672 | |
| 1006 | 1006 | /* return the current status and clear any pending interrupts */ |
| 1007 | 1007 | case IDE_BANK0_STATUS_COMMAND: |
| 1008 | 1008 | result = dev->status; |
| 1009 | | if (last_status_timer->elapsed() > TIME_PER_ROTATION) |
| 1009 | if (dev->last_status_timer->elapsed() > TIME_PER_ROTATION) |
| 1010 | 1010 | { |
| 1011 | 1011 | result |= IDE_STATUS_HIT_INDEX; |
| 1012 | | last_status_timer->adjust(attotime::never); |
| 1012 | dev->last_status_timer->adjust(attotime::never); |
| 1013 | 1013 | } |
| 1014 | 1014 | if (dev->interrupt_pending == ASSERT_LINE) |
| 1015 | 1015 | set_irq(CLEAR_LINE); |
| r23671 | r23672 | |
| 1067 | 1067 | { |
| 1068 | 1068 | case IDE_BANK1_STATUS_CONTROL: |
| 1069 | 1069 | result = dev->status; |
| 1070 | | if (last_status_timer->elapsed() > TIME_PER_ROTATION) |
| 1070 | if (dev->last_status_timer->elapsed() > TIME_PER_ROTATION) |
| 1071 | 1071 | { |
| 1072 | 1072 | result |= IDE_STATUS_HIT_INDEX; |
| 1073 | | last_status_timer->adjust(attotime::never); |
| 1073 | dev->last_status_timer->adjust(attotime::never); |
| 1074 | 1074 | } |
| 1075 | 1075 | break; |
| 1076 | 1076 | |
| r23671 | r23672 | |
| 1311 | 1311 | slot[1] = subdevice<ide_slot_device>("1"); |
| 1312 | 1312 | |
| 1313 | 1313 | /* create a timer for timing status */ |
| 1314 | | last_status_timer = timer_alloc(TID_NULL); |
| 1315 | 1314 | reset_timer = timer_alloc(TID_RESET_CALLBACK); |
| 1316 | 1315 | |
| 1317 | 1316 | /* register ide states */ |
trunk/src/emu/machine/idehd.c
| r23671 | r23672 | |
| 2 | 2 | |
| 3 | 3 | #define PRINTF_IDE_COMMANDS 0 |
| 4 | 4 | |
| 5 | enum |
| 6 | { |
| 7 | TID_NULL, |
| 8 | TID_DELAYED_INTERRUPT, |
| 9 | TID_DELAYED_INTERRUPT_BUFFER_READY, |
| 10 | TID_RESET_CALLBACK, |
| 11 | TID_SECURITY_ERROR_DONE, |
| 12 | TID_READ_SECTOR_DONE_CALLBACK, |
| 13 | TID_WRITE_SECTOR_DONE_CALLBACK |
| 14 | }; |
| 15 | |
| 5 | 16 | //************************************************************************** |
| 6 | 17 | // IDE DEVICE INTERFACE |
| 7 | 18 | //************************************************************************** |
| r23671 | r23672 | |
| 272 | 283 | |
| 273 | 284 | save_item(NAME(dma_active)); |
| 274 | 285 | save_item(NAME(verify_only)); |
| 286 | |
| 287 | last_status_timer = timer_alloc(TID_NULL); |
| 275 | 288 | } |
| 276 | 289 | |
| 277 | 290 | //------------------------------------------------- |