Skip to content

Commit

Permalink
appleramdac: Fix clock divisor 1x.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
joevt authored and dingusdev committed Nov 13, 2024
1 parent e7eb1c8 commit f53a7cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion devices/video/appleramdac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit f53a7cc

Please sign in to comment.