Index:
[thread]
[date]
[subject]
[author]
From: Andreas Beck <becka@rz.uni-duesseldorf.de>
To : ggi-develop@eskimo.com
Date: Tue, 8 Jun 1999 01:39:36 +0200
Re: Monitor-definition
> I have an HP A1097C fixed-frequency monitor connected to an Matrox
> Millenium I (capable of sync-on-green, which I use). It works great with
> XFree86, and it would be even greater if it worked with KGIcon as well.
> But .../kgicon/kgi/monitor/monosync doesn't include my monitor. I've tried
> to add it, but got confused by htiming[HTIMINGS] and vtiming[VTIMINGS]. Is
> there a simple way to convert XF86 modelines to these entries?
Yes - look:
#ifdef __VGA__
/* VGA From: Steffen Seeger, [Seeger@physik.tu-chemnitz.de]
** Date: 21 Nov 95
** Note: normally VGA monitors have a bandwidth of 30 MHz. But as this
** would only allow for 640 pixel horizontally the bandwidth is set to
** 32 MHz, which will make 800 pixel modes possible (e.g. 100x50 textmode).
*/
#define MON_VERSION "0.00 ALPHA"
static struct kgi_monitor
monitor = {
"standard", /* manufacturer */
"14\" VGA", /* model */
GM_ALL, /* supported modes */
0, /* special capabilities */
{ 800, 480 }, /* maximum resolution */
NULL, /* Private data hook */
{ 240, 180 }, /* picture size [mm] */
VGA_COLOR, /* VGA color monitor */
SYNC_NORMAL, /* normal syncing, VESA */
{ 25000000, 32000000 }, /* pixel clock range */
{ 31100, 31900 }, /* hfreq range */
{ 50, 70 } /* vfreq range */
};
** That should be no problem for you to fill in - right ?
#define HTIMINGS 1
#define VTIMINGS 3
** Just the number of different timings that work. Probably both 1 for a
** "true" monosync monitor.
static struct kgi_timing
htiming[HTIMINGS] = /* horizontal timing in ns, descending hfreq */
{/* width bstart sstart send bend total dummy */
{ 25422, 25422, 27011, 30824, 31142, 31778, 0 } /* 31.468 kHz */
};
static struct kgi_timing
vtiming[VTIMINGS] = /* vertical timing in lines */
{ /* width bstart sstart send bend total polarity & htiming */
{ 480, 488, 489, 491, 516, 524, HNEG | VNEG | 0 }, /* 60 Hz */
{ 400, 407, 412, 414, 442, 449, HNEG | VPOS | 0 }, /* 70 Hz */
{ 350, 356, 387, 389, 443, 449, HPOS | VNEG | 0 } /* 70 Hz */
};
#endif /* __VGA__ */
** Let's look at the XF86 modeline to understand that:
# 640x400 @ 70 Hz, 31.5 kHz hsync
Modeline "640x400" 25.175 640 664 760 800 400 409 411 450
# 640x480 @ 60 Hz, 31.5 kHz hsync
Modeline "640x480" 25.175 640 664 760 800 480 491 493 525
First of all, note, that the VTIMINGS are almost the same. It's just that
GGI also handles blank-start and -end separately.
You can use some arbitrary value between width and syncstart or
syncend and total respectively.
That is, a XF86 Modeline is in GGI terms:
Modeline "640x480" 25.175 640 664 760 800 width sstart send total
The X timing is handled differently. the reason is, that the monitor can't
"see" the pixelclock. It just sees a given horizontal frequency.
For that reason, we give horizontal timing in nanoseconds (a
1/1 000 000 000th of a second) instead of pixels.
So let's convert the 640x480 Entry to a GGI style entry:
One pixel takes 1/pixclock seconds. Pixclock is given in MHz, so
1 pixel = 1/25.175 Mhz = 0.03972 microseconds = 39.72 nanoseconds.
=> width = 640*39.72ns = 25422ns
=> sstart= 664*39.72ns = 26375ns
=> send = 664*39.72ns = 30189ns
=> total = 800*39.72ns = 31778ns
O.K. - you see that people have different ideas of where exactly to put
the SYNC pulse, but you get the idea.
CU, ANdy
--
= Andreas Beck | Email : <andreas.beck@ggi-project.org> =
Index:
[thread]
[date]
[subject]
[author]