diff --git a/src/disk/hdc_ide_cmd640.c b/src/disk/hdc_ide_cmd640.c index 1efd9245c..1613dbab0 100644 --- a/src/disk/hdc_ide_cmd640.c +++ b/src/disk/hdc_ide_cmd640.c @@ -35,6 +35,7 @@ #include <86box/hdc_ide.h> #include <86box/hdc_ide_sff8038i.h> #include <86box/zip.h> +#include <86box/mo.h> typedef struct @@ -332,6 +333,11 @@ cmd640_reset(void *p) (zip_drives[i].ide_channel < 4) && zip_drives[i].priv) zip_reset((scsi_common_t *) zip_drives[i].priv); } + for (i = 0; i < MO_NUM; i++) { + if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && + (mo_drives[i].ide_channel < 4) && mo_drives[i].priv) + mo_reset((scsi_common_t *) mo_drives[i].priv); + } cmd640_set_irq(0x00, p); cmd640_set_irq(0x01, p); diff --git a/src/disk/hdc_ide_sff8038i.c b/src/disk/hdc_ide_sff8038i.c index 6af33b4c7..cde2f1d8a 100644 --- a/src/disk/hdc_ide_sff8038i.c +++ b/src/disk/hdc_ide_sff8038i.c @@ -41,6 +41,7 @@ #include <86box/hdc_ide.h> #include <86box/hdc_ide_sff8038i.h> #include <86box/zip.h> +#include <86box/mo.h> static int next_id = 0; @@ -440,6 +441,11 @@ sff_reset(void *p) (zip_drives[i].ide_channel < 4) && zip_drives[i].priv) zip_reset((scsi_common_t *) zip_drives[i].priv); } + for (i = 0; i < MO_NUM; i++) { + if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && + (mo_drives[i].ide_channel < 4) && mo_drives[i].priv) + mo_reset((scsi_common_t *) mo_drives[i].priv); + } sff_bus_master_set_irq(0x00, p); sff_bus_master_set_irq(0x01, p); diff --git a/src/pc.c b/src/pc.c index 7ff09ac70..2650e8e9f 100644 --- a/src/pc.c +++ b/src/pc.c @@ -67,6 +67,7 @@ #include <86box/scsi_device.h> #include <86box/cdrom.h> #include <86box/zip.h> +#include <86box/mo.h> #include <86box/scsi_disk.h> #include <86box/cdrom_image.h> #include <86box/network.h> @@ -519,6 +520,7 @@ usage: mouse_init(); cdrom_global_init(); zip_global_init(); + mo_global_init(); /* Load the configuration file. */ config_load(); @@ -705,6 +707,8 @@ pc_reset_hard_close(void) zip_close(); + mo_close(); + scsi_disk_close(); closeal(); @@ -787,6 +791,8 @@ pc_reset_hard_init(void) zip_hard_reset(); + mo_hard_reset(); + scsi_disk_hard_reset(); /* Reset and reconfigure the Network Card layer. */ @@ -888,6 +894,8 @@ pc_close(thread_t *ptr) zip_close(); + mo_close(); + scsi_disk_close(); }