diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 69a82093b..71808552c 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -1392,7 +1392,7 @@ ide_writeb(uint16_t addr, uint8_t val, void *priv) ide->blockcount = 0; /* Turn on the activity indicator *here* so that it gets turned on less times. */ - /* ui_sb_update_icon(SB_HDD | hdd[ide->hdd_num].bus, 1); */ + ui_sb_update_icon(SB_HDD | hdd[ide->hdd_num].bus, 1); case WIN_READ: case WIN_READ_NORETRY: @@ -1425,7 +1425,7 @@ ide_writeb(uint16_t addr, uint8_t val, void *priv) ide->blockcount = 0; /* Turn on the activity indicator *here* so that it gets turned on less times. */ - /* ui_sb_update_icon(SB_HDD | hdd[ide->hdd_num].bus, 1); */ + ui_sb_update_icon(SB_HDD | hdd[ide->hdd_num].bus, 1); case WIN_WRITE: case WIN_WRITE_NORETRY: @@ -2130,7 +2130,7 @@ ide_callback(void *priv) ide->atastat = DRDY_STAT | DSC_STAT; ide_irq_raise(ide); - /* ui_sb_update_icon(SB_HDD | hdd[ide->hdd_num].bus, 1); */ + ui_sb_update_icon(SB_HDD | hdd[ide->hdd_num].bus, 1); return; case WIN_DRIVE_DIAGNOSTICS: diff --git a/src/disk/zip.c b/src/disk/zip.c index 2ff5b4e52..2da62f4af 100644 --- a/src/disk/zip.c +++ b/src/disk/zip.c @@ -886,6 +886,7 @@ 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); } @@ -998,6 +999,7 @@ zip_cmd_error(zip_t *dev) dev->packet_status = PHASE_ERROR; dev->callback = 50.0 * ZIP_TIME; zip_set_callback(dev); + ui_sb_update_icon(SB_ZIP | dev->id, 0); zip_log("ZIP %i: [%02X] ERROR: %02X/%02X/%02X\n", dev->id, dev->current_cdb[0], zip_sense_key, zip_asc, zip_ascq); } @@ -1015,6 +1017,7 @@ zip_unit_attention(zip_t *dev) dev->packet_status = PHASE_ERROR; dev->callback = 50.0 * ZIP_TIME; zip_set_callback(dev); + ui_sb_update_icon(SB_ZIP | dev->id, 0); zip_log("ZIP %i: UNIT ATTENTION\n", dev->id); } diff --git a/src/scsi/scsi_cdrom.c b/src/scsi/scsi_cdrom.c index d6690bb74..c1b312100 100644 --- a/src/scsi/scsi_cdrom.c +++ b/src/scsi/scsi_cdrom.c @@ -694,6 +694,7 @@ 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); } @@ -804,6 +805,7 @@ scsi_cdrom_cmd_error(scsi_cdrom_t *dev) dev->packet_status = PHASE_ERROR; dev->callback = 50.0 * CDROM_TIME; scsi_cdrom_set_callback(dev); + ui_sb_update_icon(SB_CDROM | dev->id, 0); scsi_cdrom_log("CD-ROM %i: ERROR: %02X/%02X/%02X\n", dev->id, scsi_cdrom_sense_key, scsi_cdrom_asc, scsi_cdrom_ascq); } @@ -821,6 +823,7 @@ scsi_cdrom_unit_attention(scsi_cdrom_t *dev) dev->packet_status = PHASE_ERROR; dev->callback = 50.0 * CDROM_TIME; scsi_cdrom_set_callback(dev); + ui_sb_update_icon(SB_CDROM | dev->id, 0); scsi_cdrom_log("CD-ROM %i: UNIT ATTENTION\n", dev->id); } diff --git a/src/scsi/scsi_disk.c b/src/scsi/scsi_disk.c index a154685b4..91256b4dc 100644 --- a/src/scsi/scsi_disk.c +++ b/src/scsi/scsi_disk.c @@ -294,6 +294,7 @@ 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); } @@ -363,6 +364,7 @@ scsi_disk_cmd_error(scsi_disk_t *dev) dev->phase = 3; dev->packet_status = PHASE_ERROR; dev->callback = 50.0 * SCSI_TIME; + ui_sb_update_icon(SB_HDD | dev->drv->bus, 0); scsi_disk_log("SCSI HD %i: ERROR: %02X/%02X/%02X\n", dev->id, scsi_disk_sense_key, scsi_disk_asc, scsi_disk_ascq); } @@ -715,6 +717,11 @@ scsi_disk_command(scsi_common_t *sc, uint8_t *cdb) scsi_disk_data_command_finish(dev, alloc_length, alloc_length / dev->requested_blocks, alloc_length, 0); else scsi_disk_data_command_finish(dev, alloc_length, alloc_length, alloc_length, 0); + + if (dev->packet_status != PHASE_COMPLETE) + ui_sb_update_icon(SB_HDD | dev->drv->bus, 1); + else + ui_sb_update_icon(SB_HDD | dev->drv->bus, 0); return; case GPCMD_VERIFY_6: @@ -782,6 +789,11 @@ scsi_disk_command(scsi_common_t *sc, uint8_t *cdb) scsi_disk_data_command_finish(dev, alloc_length, alloc_length / dev->requested_blocks, alloc_length, 1); else scsi_disk_data_command_finish(dev, alloc_length, alloc_length, alloc_length, 1); + + if (dev->packet_status != PHASE_COMPLETE) + ui_sb_update_icon(SB_HDD | dev->drv->bus, 1); + else + ui_sb_update_icon(SB_HDD | dev->drv->bus, 0); return; case GPCMD_WRITE_SAME_10: @@ -819,6 +831,11 @@ scsi_disk_command(scsi_common_t *sc, uint8_t *cdb) scsi_disk_set_phase(dev, SCSI_PHASE_DATA_OUT); scsi_disk_data_command_finish(dev, 512, 512, alloc_length, 1); + + if (dev->packet_status != PHASE_COMPLETE) + ui_sb_update_icon(SB_HDD | dev->drv->bus, 1); + else + ui_sb_update_icon(SB_HDD | dev->drv->bus, 0); return; case GPCMD_MODE_SENSE_6: