diff --git a/src/disk/mo.c b/src/disk/mo.c index e90267b95..44f68effa 100644 --- a/src/disk/mo.c +++ b/src/disk/mo.c @@ -701,7 +701,6 @@ mo_command_common(mo_t *dev) static void mo_command_complete(mo_t *dev) { - ui_sb_update_icon(SB_MO | dev->id, 0); dev->packet_status = PHASE_COMPLETE; mo_command_common(dev); } diff --git a/src/disk/zip.c b/src/disk/zip.c index d4cbd0b41..764dc1f53 100644 --- a/src/disk/zip.c +++ b/src/disk/zip.c @@ -875,7 +875,6 @@ zip_command_common(zip_t *dev) static void zip_command_complete(zip_t *dev) { - ui_sb_update_icon(SB_ZIP | dev->id, 0); dev->packet_status = PHASE_COMPLETE; zip_command_common(dev); } diff --git a/src/qt/qt_machinestatus.cpp b/src/qt/qt_machinestatus.cpp index a074f556e..d6f84ea71 100644 --- a/src/qt/qt_machinestatus.cpp +++ b/src/qt/qt_machinestatus.cpp @@ -393,14 +393,23 @@ MachineStatus::refreshIcons() } for (size_t i = 0; i < CDROM_NUM; ++i) { d->cdrom[i].setActive(machine_status.cdrom[i].active); + if (machine_status.cdrom[i].active) + ui_sb_update_icon(SB_CDROM | i, 0); + d->cdrom[i].setEmpty(machine_status.cdrom[i].empty); } for (size_t i = 0; i < ZIP_NUM; i++) { d->zip[i].setActive(machine_status.zip[i].active); + if (machine_status.zip[i].active) + ui_sb_update_icon(SB_ZIP | i, 0); + d->zip[i].setEmpty(machine_status.zip[i].empty); } for (size_t i = 0; i < MO_NUM; i++) { d->mo[i].setActive(machine_status.mo[i].active); + if (machine_status.mo[i].active) + ui_sb_update_icon(SB_MO | i, 0); + d->mo[i].setEmpty(machine_status.mo[i].empty); } @@ -408,6 +417,8 @@ MachineStatus::refreshIcons() for (size_t i = 0; i < HDD_BUS_USB; i++) { d->hdds[i].setActive(machine_status.hdd[i].active); + if (machine_status.hdd[i].active) + ui_sb_update_icon(SB_HDD | i, 0); } for (size_t i = 0; i < NET_CARD_MAX; i++) { diff --git a/src/scsi/scsi_cdrom.c b/src/scsi/scsi_cdrom.c index f6e4b9cf6..a049c69d0 100644 --- a/src/scsi/scsi_cdrom.c +++ b/src/scsi/scsi_cdrom.c @@ -1080,7 +1080,6 @@ scsi_cdrom_command_common(scsi_cdrom_t *dev) static void scsi_cdrom_command_complete(scsi_cdrom_t *dev) { - ui_sb_update_icon(SB_CDROM | dev->id, 0); dev->packet_status = PHASE_COMPLETE; scsi_cdrom_command_common(dev); dev->tf->phase = 3; @@ -1637,9 +1636,29 @@ skip_ready_check: dev->media_status = (dev->unit_attention) ? MEC_NEW_MEDIA : MEC_NO_CHANGE; if ((scsi_cdrom_command_flags[cdb[0]] & CHECK_READY) && !ready) { - scsi_cdrom_log("CD-ROM %i: Not ready (%02X)\n", dev->id, cdb[0]); - scsi_cdrom_not_ready(dev); - return 0; + if (scsi_cdrom_command_flags[cdb[0]] & SCSI_ONLY) { /*Note by TC1995: Some vendor commands from X vendor don't really check for ready status + but they do on Y vendor. Quite confusing I know.*/ + switch (dev->drv->type) { + case CDROM_TYPE_DEC_RRD45_0436: + case CDROM_TYPE_SONY_CDU541_10i: + case CDROM_TYPE_SONY_CDU561_18k: + case CDROM_TYPE_SONY_CDU76S_100: + case CDROM_TYPE_TEXEL_DMXX24_100: + if (cdb[0] == 0xC0) + break; + scsi_cdrom_log("CD-ROM %i: Not ready (%02X)\n", dev->id, cdb[0]); + scsi_cdrom_not_ready(dev); + return 0; + default: + scsi_cdrom_log("CD-ROM %i: Not ready (%02X)\n", dev->id, cdb[0]); + scsi_cdrom_not_ready(dev); + return 0; + } + } else { + scsi_cdrom_log("CD-ROM %i: Not ready (%02X)\n", dev->id, cdb[0]); + scsi_cdrom_not_ready(dev); + return 0; + } } scsi_cdrom_log("CD-ROM %i: Continuing with command %02X\n", dev->id, cdb[0]); @@ -3223,7 +3242,6 @@ begin: case CDROM_TYPE_TEAC_CD50_100: case CDROM_TYPE_TEAC_R55S_10R: case CDROM_TYPE_TEXEL_DMXX24_100: - case CDROM_TYPE_TOSHIBA_XM3201B_3232: dev->buffer[2] = 0x00; dev->buffer[3] = 0x01; /*SCSI-1 compliant*/ break; @@ -3235,6 +3253,10 @@ begin: case CDROM_TYPE_NEC_464_105: dev->buffer[3] = 0x00; /*SCSI unknown version per NEC manuals*/ break; + case CDROM_TYPE_TOSHIBA_XM3201B_3232: + dev->buffer[2] = 0x01; + dev->buffer[3] = 0x01; /*SCSI-1 compliant*/ + break; default: dev->buffer[2] = 0x02; /*SCSI-2 compliant*/ break; diff --git a/src/scsi/scsi_disk.c b/src/scsi/scsi_disk.c index f29e85431..792dad31b 100644 --- a/src/scsi/scsi_disk.c +++ b/src/scsi/scsi_disk.c @@ -461,7 +461,7 @@ scsi_disk_command_common(scsi_disk_t *dev) (uint64_t) period); dev->callback += period; break; - default: + default: dev->callback = 0; break; } @@ -511,7 +511,6 @@ scsi_disk_command_common(scsi_disk_t *dev) static void scsi_disk_command_complete(scsi_disk_t *dev) { - ui_sb_update_icon(SB_HDD | dev->drv->bus, 0); dev->packet_status = PHASE_COMPLETE; scsi_disk_command_common(dev); } @@ -1647,7 +1646,7 @@ scsi_disk_identify(ide_t *ide, int ide_has_dma) scsi_disk_log("ATAPI Identify: %s\n", device_identify); /* ATAPI device, direct-access device, non-removable media, accelerated DRQ */ - ide->buffer[0] = 0x8000 | (0 << 8) | 0x00 | (2 << 5); + ide->buffer[0] = 0x8000 | (0 << 8) | 0x00 | (2 << 5); ide_padstr((char *) (ide->buffer + 10), "", 20); /* Serial Number */ ide_padstr((char *) (ide->buffer + 23), EMU_VERSION_EX, 8); /* Firmware */