From f69941a462e6d98111bbec3cfd3965f2fcddb6a1 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 17 Apr 2020 01:40:10 +0200 Subject: [PATCH] Also applied the fixes to the AT MFM/RLL and AT ESDI controllers. --- src/disk/hdc_esdi_at.c | 6 ++++-- src/disk/hdc_st506_at.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/disk/hdc_esdi_at.c b/src/disk/hdc_esdi_at.c index ad1135117..8efdf6657 100644 --- a/src/disk/hdc_esdi_at.c +++ b/src/disk/hdc_esdi_at.c @@ -223,7 +223,8 @@ esdi_writew(uint16_t port, uint16_t val, void *priv) if (port > 0x01f0) { esdi_write(port, val & 0xff, priv); - esdi_write(port + 1, (val >> 8) & 0xff, priv); + if (port != 0x01f7) + esdi_write(port + 1, (val >> 8) & 0xff, priv); } else { esdi->buffer[esdi->pos >> 1] = val; esdi->pos += 2; @@ -397,7 +398,8 @@ esdi_readw(uint16_t port, void *priv) if (port > 0x01f0) { temp = esdi_read(port, priv); - temp |= (esdi_read(port + 1, priv) << 8); + if (port != 0x01f7) + temp |= (esdi_read(port + 1, priv) << 8); } else { temp = esdi->buffer[esdi->pos >> 1]; esdi->pos += 2; diff --git a/src/disk/hdc_st506_at.c b/src/disk/hdc_st506_at.c index 879200424..d43088d1c 100644 --- a/src/disk/hdc_st506_at.c +++ b/src/disk/hdc_st506_at.c @@ -378,7 +378,8 @@ mfm_writew(uint16_t port, uint16_t val, void *priv) if (port > 0x01f0) { mfm_write(port, val & 0xff, priv); - mfm_write(port + 1, (val >> 8) & 0xff, priv); + if (port != 0x01f7) + mfm_write(port + 1, (val >> 8) & 0xff, priv); } else { mfm->buffer[mfm->pos >> 1] = val; mfm->pos += 2; @@ -465,7 +466,8 @@ mfm_readw(uint16_t port, void *priv) if (port > 0x01f0) { ret = mfm_read(port, priv); - ret |= (mfm_read(port + 1, priv) << 8); + if (port != 0x01f7) + ret |= (mfm_read(port + 1, priv) << 8); } else { ret = mfm->buffer[mfm->pos >> 1]; mfm->pos += 2;