From f53a7cce328a1e53782578d05aa93476a7296b91 Mon Sep 17 00:00:00 2001 From: joevt Date: Sat, 4 May 2024 22:49:42 -0700 Subject: [PATCH] appleramdac: Fix clock divisor 1x. If bits 6 and 7 are 3, then the divisor should be 1 instead of 16. 0 -> 2x 1 -> 4x 2 -> 8x 3 -> 1x (not 16x). This change affects RGB 12 inch dislay 512 x 384 60Hz mode in Platinum. --- devices/video/appleramdac.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/video/appleramdac.cpp b/devices/video/appleramdac.cpp index 8789c92..1b0016e 100644 --- a/devices/video/appleramdac.cpp +++ b/devices/video/appleramdac.cpp @@ -168,7 +168,7 @@ void AppleRamdac::iodev_write(uint32_t address, uint16_t value) { } int AppleRamdac::get_clock_div() { - return 1 << ((dac_cr >> 6) + 1); + return 1 << (((dac_cr >> 6) + 1) & 3); } int AppleRamdac::get_pix_width() {