diff options
Diffstat (limited to 'src/atimach64.c')
-rw-r--r-- | src/atimach64.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/atimach64.c b/src/atimach64.c index 98eb894d..dee82c45 100644 --- a/src/atimach64.c +++ b/src/atimach64.c @@ -594,6 +594,42 @@ ATIMach64Calculate { int VDisplay; + /* Clobber mode timings */ + if (pATI->OptionPanelDisplay && (pATI->LCDPanelID >= 0) && + !pMode->CrtcHAdjusted && !pMode->CrtcVAdjusted && + (!pATI->OptionLCDSync || (pMode->type & M_T_BUILTIN))) + { + int VScan; + + pMode->Clock = pATI->LCDClock; + pMode->Flags &= ~(V_DBLSCAN | V_INTERLACE | V_CLKDIV2); + + /* + * Use doublescanning or multiscanning to get around vertical blending + * limitations. + */ + VScan = pATI->LCDVertical / pMode->VDisplay; + { + pMode->VScan = 0; + if (VScan > 1) + { + VScan = 2; + pMode->Flags |= V_DBLSCAN; + } + } + + pMode->HSyncStart = pMode->HDisplay + pATI->LCDHSyncStart; + pMode->HSyncEnd = pMode->HSyncStart + pATI->LCDHSyncWidth; + pMode->HTotal = pMode->HDisplay + pATI->LCDHBlankWidth; + + pMode->VSyncStart = pMode->VDisplay + + ATIDivide(pATI->LCDVSyncStart, VScan, 0, 0); + pMode->VSyncEnd = pMode->VSyncStart + + ATIDivide(pATI->LCDVSyncWidth, VScan, 0, 1); + pMode->VTotal = pMode->VDisplay + + ATIDivide(pATI->LCDVBlankWidth, VScan, 0, 0); + } + /* If not already done adjust horizontal timings */ if (!pMode->CrtcHAdjusted) { |