From 7c203b40c8a7e8fcde0ce86966e7c9c6c38a0a92 Mon Sep 17 00:00:00 2001 From: joevt Date: Sun, 18 Feb 2024 05:05:48 -0800 Subject: [PATCH] appleramdac: Reset comp_index on address change. --- devices/video/appleramdac.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/devices/video/appleramdac.cpp b/devices/video/appleramdac.cpp index 3206f93..06a430b 100644 --- a/devices/video/appleramdac.cpp +++ b/devices/video/appleramdac.cpp @@ -60,6 +60,7 @@ void AppleRamdac::iodev_write(uint32_t address, uint16_t value) { switch(address) { case RamdacRegs::ADDRESS: this->dac_addr = value; + this->comp_index = 0; break; case RamdacRegs::CURSOR_CLUT: this->clut_color[this->comp_index++] = value;