From f42b23971386750affe711f9dfd4e7ddcdcd4125 Mon Sep 17 00:00:00 2001 From: joevt Date: Sun, 1 Sep 2024 04:02:27 -0700 Subject: [PATCH] heathrow: Use mask, not minus, for address decode. --- devices/ioctrl/heathrow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devices/ioctrl/heathrow.cpp b/devices/ioctrl/heathrow.cpp index 045bdda8..aeb99171 100644 --- a/devices/ioctrl/heathrow.cpp +++ b/devices/ioctrl/heathrow.cpp @@ -266,14 +266,14 @@ void HeathrowIC::write(uint32_t rgn_start, uint32_t offset, uint32_t value, int this->escc->write((offset >> 4) & 0xF, value); break; case 0x14: - this->snd_codec->snd_ctrl_write(offset - 0x14000, value, size); + this->snd_codec->snd_ctrl_write(offset & 0xFF, value, size); break; case 0x15: // SWIM3 this->swim3->write((offset >> 4) & 0xF, value); break; case 0x16: // VIA-CUDA case 0x17: - this->viacuda->write((offset - 0x16000) >> 9, value); + this->viacuda->write((offset >> 9) & 0xF, value); break; case 0x20: // IDE O this->ide_0->write((offset >> 4) & 0x1F, value, size);