Re: low pixel clock modeline

Search this archive.

From: Matan Ziv-Av (matan@svgalib.org)
Date: Fri 12 Jan 2001 - 00:40:48 IST


> I'm trying to use svgalib with homebuilt VGA to TV converter (to show images
> on TV screen).
> 
> I took example Modeline for ZX Spectrum emulatator (with pixel clock about
> 12Mhz),modified for TV sync. frequencies, created new mode with newmode
> directive in svgalib.conf, and now can see vgatest image on TV.
> 
> Pixel clock in my new mode is about 12Mhz, like in ZX Spectrum example. When I
> try another pixel clock, about 14 Mhz (like in SVGATextMode config for TV), my
> new mode disappears from vgatest list. Why? What pixel clocks can I use?
> 
> svgalib ver 1.4.0
> video card cirrus logic 5428

The 5428 has an internal clock chip that can be programmed to
practically any clock. The problem is that the cirrus driver itself only
allows a set of fixed clocks:

static int cirrus_fixed_clocks[NU_FIXED_CLOCKS] =
{
    12599, 18000, 19600,
    25227, 28325, 31500, 36025, 37747, 39992, 41164,
    45076, 49867, 64983, 72163, 75000, 80013, 85226, 89998,
    95019, 100226, 108035
};

static unsigned char fixed_clock_numerator[NU_FIXED_CLOCKS] =
{
    0x2C, 0x27, 0x28,
    0x4A, 0x5B, 0x42, 0x4E, 0x3A, 0x51, 0x45,
    0x55, 0x65, 0x76, 0x7E, 0x6E, 0x5F, 0x7D, 0x58,
    0x49, 0x46, 0x53
};

static unsigned char fixed_clock_denominator[NU_FIXED_CLOCKS] =
{
    0x33, 0x3e, 0x3a,
    0x2B, 0x2F, 0x1F, 0x3E, 0x17, 0x3A, 0x30,
    0x36, 0x3A, 0x34, 0x32, 0x2A, 0x22, 0x2A, 0x1C,
    0x16, 0x14, 0x16
};

A good solution is to implement clock programming in the driver. If that
is an overkill for you, replacing the first number in each array with
something like 14006, 0x2d, 0x2f, which should work.



-- 
Matan Ziv-Av.                         matan@svgalib.org


------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST