Fix PRAMDAC. Now it shows as working in Windows 2000?

This commit is contained in:
starfrost013
2024-11-27 17:41:54 +00:00
parent 15a2f6435c
commit baeca30c6d
2 changed files with 111 additions and 6 deletions

View File

@@ -54,16 +54,16 @@ uint32_t nv3_pramdac_get_vram_clock_register()
// M divisor [7-0]
// N divisor [16-8]
// P divisor [18-16]
return (nv3->pramdac.memory_clock_m << 16) & 0xFF;
+ (nv3->pramdac.memory_clock_n << 8) & 0xFF;
+ (nv3->pramdac.memory_clock_p) & 0x07; // 0-3
return (nv3->pramdac.memory_clock_m);
+ (nv3->pramdac.memory_clock_n << 8);
+ (nv3->pramdac.memory_clock_p << 16); // 0-3
}
uint32_t nv3_pramdac_get_pixel_clock_register()
{
return (nv3->pramdac.pixel_clock_m << 16) & 0xFF;
+ (nv3->pramdac.pixel_clock_n << 8) & 0xFF;
+ (nv3->pramdac.pixel_clock_p) & 0x07; // 0-3
return (nv3->pramdac.pixel_clock_m);
+ (nv3->pramdac.pixel_clock_n << 8);
+ (nv3->pramdac.pixel_clock_p << 16); // 0-3
}
void nv3_pramdac_set_vram_clock_register(uint32_t value)