From fd2e6c5b096a0bc57e81af9868db10969d5ee798 Mon Sep 17 00:00:00 2001 From: joevt Date: Sun, 5 Feb 2023 00:47:57 -0800 Subject: [PATCH] Fix ATIRage I/O accesses. - Don't log anything if the I/O access is not for this device. A different device might handle it. - Don't return true for I/O access if an I/O access is not performed. Otherwise the I/O access won't be passed to other devices. --- devices/video/atirage.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/devices/video/atirage.cpp b/devices/video/atirage.cpp index 935dca1..d5c6176 100644 --- a/devices/video/atirage.cpp +++ b/devices/video/atirage.cpp @@ -348,17 +348,13 @@ void ATIRage::write_reg(uint32_t offset, uint32_t value, uint32_t size) } bool ATIRage::io_access_allowed(uint32_t offset) { - if (!(this->command & 1)) { + if (offset >= this->io_base && offset < (this->io_base + 0x100)) { + if (this->command & 1) { + return true; + } LOG_F(WARNING, "ATI I/O space disabled in the command reg"); - return false; } - - if (offset < this->io_base || offset > (this->io_base + 0x100)) { - LOG_F(WARNING, "Rage: I/O out of range, base=0x%X, offset=0x%X", io_base, offset); - return false; - } - - return true; + return false; }