From 5c26d3d4b379968bd4b6b8db7a1b9155d55962ca Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 18 May 2023 00:20:23 +0200 Subject: [PATCH] IDE features register is no longer written to both devices at once, fixes CD-ROM boot on the AMI Apollo. --- src/disk/hdc_ide.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index cad5ce111..a99136544 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -1455,9 +1455,15 @@ ide_writeb(uint16_t addr, uint8_t val, void *priv) } ide->cylprecomp = val; +/* The ATA-3 specification says this register is the parameter for the + command and is unclear as to whether or not it's written to both + devices at once. Writing it to both devices at once breaks CD boot + on the AMI Apollo. */ +#ifdef WRITE_PARAM_TO_BOTH_DEVICES if (ide_other->type == IDE_ATAPI) ide_other->sc->features = val; ide_other->cylprecomp = val; +#endif return; case 0x2: /* Sector count */