From 6c564cb72096f7882d0acb40ae029d4e1beec2d5 Mon Sep 17 00:00:00 2001 From: Maxim Poliakovski Date: Wed, 9 Mar 2022 16:54:48 +0100 Subject: [PATCH] amic: fix MACE register range. --- devices/ioctrl/amic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devices/ioctrl/amic.cpp b/devices/ioctrl/amic.cpp index 668b306..bc7dd9b 100644 --- a/devices/ioctrl/amic.cpp +++ b/devices/ioctrl/amic.cpp @@ -107,7 +107,7 @@ uint32_t AMIC::read(uint32_t reg_start, uint32_t offset, int size) case 4: // SCC registers return this->escc->read((offset >> 1) & 0xF); case 0xA: // MACE registers - return this->mace->read((offset >> 4) & 0xF); + return this->mace->read((offset >> 4) & 0x1F); case 0x10: // SCSI registers return this->scsi->read((offset >> 4) & 0xF); case 0x14: // Sound registers @@ -188,7 +188,7 @@ void AMIC::write(uint32_t reg_start, uint32_t offset, uint32_t value, int size) this->escc->write((offset >> 1) & 0xF, value); return; case 0xA: // MACE registers - this->mace->write((offset >> 4) & 0xF, value); + this->mace->write((offset >> 4) & 0x1F, value); return; case 0x10: this->scsi->write((offset >> 4) & 0xF, value);