diff options
Diffstat (limited to 'src/devices/machine/idehd.cpp')
-rw-r--r-- | src/devices/machine/idehd.cpp | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/devices/machine/idehd.cpp b/src/devices/machine/idehd.cpp index 1f4be38d491..e0ce5098e9a 100644 --- a/src/devices/machine/idehd.cpp +++ b/src/devices/machine/idehd.cpp @@ -27,7 +27,8 @@ ata_mass_storage_device::ata_mass_storage_device(const machine_config &mconfig, m_num_sectors(0), m_num_heads(0), m_cur_lba(0), m_block_count(0), m_sectors_until_int(0), m_master_password_enable(0), m_user_password_enable(0), m_master_password(nullptr), - m_user_password(nullptr) + m_user_password(nullptr), + m_dma_transfer_time(attotime::zero) { } @@ -426,7 +427,10 @@ void ata_mass_storage_device::fill_buffer() if (m_sector_count > 0) { set_dasp(ASSERT_LINE); - start_busy(TIME_BETWEEN_SECTORS, PARAM_COMMAND); + if (m_command == IDE_COMMAND_READ_DMA) + start_busy(TIME_BETWEEN_SECTORS + m_dma_transfer_time, PARAM_COMMAND); + else + start_busy(TIME_BETWEEN_SECTORS, PARAM_COMMAND); } break; } @@ -632,7 +636,7 @@ void ata_mass_storage_device::process_command() { case IDE_COMMAND_READ_SECTORS: case IDE_COMMAND_READ_SECTORS_NORETRY: - LOGPRINT(("IDE Read multiple: C=%d H=%d S=%d LBA=%d count=%d\n", + LOGPRINT(("IDE Read multiple: C=%u H=%d S=%u LBA=%u count=%u\n", (m_cylinder_high << 8) | m_cylinder_low, m_device_head & IDE_DEVICE_HEAD_HS, m_sector_number, lba_address(), m_sector_count)); m_sectors_until_int = 1; @@ -642,7 +646,7 @@ void ata_mass_storage_device::process_command() break; case IDE_COMMAND_READ_MULTIPLE: - LOGPRINT(("IDE Read multiple block: C=%d H=%d S=%d LBA=%d count=%d\n", + LOGPRINT(("IDE Read multiple block: C=%u H=%u S=%u LBA=%u count=%u\n", (m_cylinder_high << 8) | m_cylinder_low, m_device_head & IDE_DEVICE_HEAD_HS, m_sector_number, lba_address(), m_sector_count)); m_sectors_until_int = 1; @@ -653,7 +657,7 @@ void ata_mass_storage_device::process_command() case IDE_COMMAND_VERIFY_SECTORS: case IDE_COMMAND_VERIFY_SECTORS_NORETRY: - LOGPRINT(("IDE Read verify multiple with/without retries: C=%d H=%d S=%d LBA=%d count=%d\n", + LOGPRINT(("IDE Read verify multiple with/without retries: C=%u H=%u S=%u LBA=%u count=%u\n", (m_cylinder_high << 8) | m_cylinder_low, m_device_head & IDE_DEVICE_HEAD_HS, m_sector_number, lba_address(), m_sector_count)); /* reset the buffer */ @@ -664,7 +668,7 @@ void ata_mass_storage_device::process_command() break; case IDE_COMMAND_READ_DMA: - LOGPRINT(("IDE Read multiple DMA: C=%d H=%d S=%d LBA=%d count=%d\n", + LOGPRINT(("IDE Read multiple DMA: C=%u H=%u S=%u LBA=%u count=%u\n", (m_cylinder_high << 8) | m_cylinder_low, m_device_head & IDE_DEVICE_HEAD_HS, m_sector_number, lba_address(), m_sector_count)); /* reset the buffer */ @@ -676,7 +680,7 @@ void ata_mass_storage_device::process_command() case IDE_COMMAND_WRITE_SECTORS: case IDE_COMMAND_WRITE_SECTORS_NORETRY: - LOGPRINT(("IDE Write multiple: C=%d H=%d S=%d LBA=%d count=%d\n", + LOGPRINT(("IDE Write multiple: C=%u H=%u S=%u LBA=%u count=%u\n", (m_cylinder_high << 8) | m_cylinder_low, m_device_head & IDE_DEVICE_HEAD_HS, m_sector_number, lba_address(), m_sector_count)); /* reset the buffer */ @@ -687,7 +691,7 @@ void ata_mass_storage_device::process_command() break; case IDE_COMMAND_WRITE_MULTIPLE: - LOGPRINT(("IDE Write multiple block: C=%d H=%d S=%d LBA=%d count=%d\n", + LOGPRINT(("IDE Write multiple block: C=%u H=%u S=%u LBA=%u count=%u\n", (m_cylinder_high << 8) | m_cylinder_low, m_device_head & IDE_DEVICE_HEAD_HS, m_sector_number, lba_address(), m_sector_count)); /* reset the buffer */ @@ -698,7 +702,7 @@ void ata_mass_storage_device::process_command() break; case IDE_COMMAND_WRITE_DMA: - LOGPRINT(("IDE Write multiple DMA: C=%d H=%d S=%d LBA=%d count=%d\n", + LOGPRINT(("IDE Write multiple DMA: C=%u H=%u S=%u LBA=%u count=%u\n", (m_cylinder_high << 8) | m_cylinder_low, m_device_head & IDE_DEVICE_HEAD_HS, m_sector_number, lba_address(), m_sector_count)); /* reset the buffer */ @@ -745,7 +749,7 @@ void ata_mass_storage_device::process_command() break; case IDE_COMMAND_SET_CONFIG: - LOGPRINT(("IDE Set configuration (%d heads, %d sectors)\n", (m_device_head & IDE_DEVICE_HEAD_HS) + 1, m_sector_count)); + LOGPRINT(("IDE Set configuration (%u heads, %u sectors)\n", (m_device_head & IDE_DEVICE_HEAD_HS) + 1, m_sector_count)); start_busy(MINIMUM_COMMAND_TIME, PARAM_COMMAND); break; @@ -758,7 +762,7 @@ void ata_mass_storage_device::process_command() break; case IDE_COMMAND_SET_BLOCK_COUNT: - LOGPRINT(("IDE Set block count (%d)\n", m_sector_count)); + LOGPRINT(("IDE Set block count (%u)\n", m_sector_count)); m_block_count = m_sector_count; @@ -828,8 +832,8 @@ void ide_hdd_device::device_reset() m_num_cylinders = hdinfo->cylinders; m_num_sectors = hdinfo->sectors; m_num_heads = hdinfo->heads; - if (PRINTF_IDE_COMMANDS) osd_printf_debug("CHS: %d %d %d\n", m_num_cylinders, m_num_heads, m_num_sectors); - osd_printf_debug("CHS: %d %d %d\n", m_num_cylinders, m_num_heads, m_num_sectors); + if (PRINTF_IDE_COMMANDS) osd_printf_debug("CHS: %u %u %u\n", m_num_cylinders, m_num_heads, m_num_sectors); + osd_printf_debug("CHS: %u %u %u\n", m_num_cylinders, m_num_heads, m_num_sectors); } // build the features page |