trunk/src/emu/machine/idehd.c
| r26044 | r26045 | |
| 434 | 434 | |
| 435 | 435 | /* just set a timer */ |
| 436 | 436 | int new_lba = lba_address(); |
| 437 | | attotime seek_time; |
| 437 | int diff = abs(m_cur_lba - new_lba); |
| 438 | int total_sectors = m_num_cylinders * m_num_heads * m_num_sectors; |
| 439 | attotime seek_time = TIME_NO_SEEK_MULTISECTOR + ((TIME_SEEK_MULTISECTOR * diff) / total_sectors); |
| 438 | 440 | |
| 439 | | if (new_lba == m_cur_lba || new_lba == m_cur_lba + 1) |
| 440 | | start_busy(TIME_NO_SEEK_MULTISECTOR, PARAM_COMMAND); |
| 441 | | else |
| 442 | | start_busy(TIME_SEEK_MULTISECTOR, PARAM_COMMAND); |
| 441 | start_busy(seek_time, PARAM_COMMAND); |
| 443 | 442 | |
| 444 | 443 | m_cur_lba = new_lba; |
| 445 | 444 | } |