Horz & Vert Display Frequency

5 views
Skip to first unread message

Chris Fulton

unread,
Dec 20, 1995, 3:00:00 AM12/20/95
to
How can I find the Horz & Vert display frequency from the display database?

It's not clear (at least to me) in the .h's as to a single entry in a
struct or if you need to do some calculation to find the result. Prefs
does is but how?

Chris Fulton


--
Posted by Lucy, Amiga CIX OLR by Toby Simpson
CIX: The UK's largest commercial conferencing system!
telnet to cix.compulink.co.uk
(We laughed at life, because if we didn't, we'd cry.)

Klaus_Burkert%2:2437_901.88@gh_uucp.insider.sub.de

unread,
Dec 27, 1995, 3:00:00 AM12/27/95
to
In article <MSGID_2=3A2490=2F1370.98...@fidonet.org>

<2:2490/1370.98@fidonet> wrote:
> How can I find the Horz & Vert display frequency from the display database?
> It's not clear (at least to me) in the .h's as to a single entry in a
> struct or if you need to do some calculation to find the result. Prefs
> does is but how?

You need some calculation, first have a look into graphics/displayinfo.h
In there are

| struct DisplayInfo
| {
| struct QueryHeader Header;
| UWORD NotAvailable; /* if NULL available, else see defines */
| ULONG PropertyFlags; /* Properties of this mode see defines */
| Point Resolution; /* ticks-per-pixel X/Y */
| UWORD PixelSpeed; /* aproximation in nanoseconds */
| UWORD NumStdSprites; /* number of standard amiga sprites */
| UWORD PaletteRange; /* OBSOLETE - use Red/Green/Blue bits instead */
| Point SpriteResolution; /* std sprite ticks-per-pixel X/Y */
| UBYTE pad[4]; /* used internally */
| UBYTE RedBits; /* number of Red bits this display supports (V39) */
| UBYTE GreenBits; /* number of Green bits this display supports (V39) */
| UBYTE BlueBits; /* number of Blue bits this display supports (V39) */
| UBYTE pad2[5]; /* find some use for this. */
| ULONG reserved[2]; /* terminator */
| };

and

| struct MonitorInfo
| {
| struct QueryHeader Header;
| struct MonitorSpec *Mspc; /* pointer to monitor specification */
| Point ViewPosition; /* editable via preferences */
| Point ViewResolution; /* standard monitor ticks-per-pixel */
| struct Rectangle ViewPositionRange; /* fixed, hardware dependent */
| UWORD TotalRows; /* display height in scanlines */
| UWORD TotalColorClocks; /* scanline width in 280 ns units */
| UWORD MinRow; /* absolute minimum active scanline */
| WORD Compatibility; /* how this coexists with others */
| UBYTE pad[32];
| Point MouseTicks;
| Point DefaultViewPosition; /* original, never changes */
| ULONG PreferredModeID; /* for Preferences */
| ULONG reserved[2]; /* terminator */
| };

From "struct DisplayInfo" you need
(1) UWORD PixelSpeed; /* aproximation in nanoseconds */
and from "struct MonitorInfo" you need
(2) UWORD TotalRows; /* display height in scanlines */
and
(3) UWORD TotalColorClocks; /* scanline width in 280 ns units */

Let's take NTSC:HighRes as example.
Out of (1), you can get the pixelclock:
pixelclock = 1000000000 / PixelSpeed
gives you the pixelclock in Hz. In our example PixelSpeed is 70 giving an
pixelclock of 1000000000 / 70 = 14285714. That is 14.285714 MHz.

(3) gives the number of 280ns clocks per line. As we need the number of
pixelclocks per line, we have to adjust this, relating to PixelSpeed:
In our example PixelSpeed is 70, giving 4 pixelclocks per 280ns colorclock.
"NTSC:HighRes" has 226 colorclocks, giving 4 * 226 = 904 pixelclocks per line.
So we get a linefrequency of 14.285714 MHz / 904 clocksperline = 15.803 kHz.

(2) gives the scanlines per frame, our example has 262 lines per frame
giving
15.803 kHz / 262 linesperframe = 60.3 Hz

The prefs program shows slightly different values, this might be due to
rounding or some other magic involved in the video-compatible modes of
the native chipset that don't fit into the documented structures.

Ciao, Klaus.
---
* Origin: Lonly Platform #88 (2:2437/901.88)


Chris Fulton

unread,
Dec 31, 1995, 3:00:00 AM12/31/95
to
Thank you Klaus.

Chris Fulton

Reply all
Reply to author
Forward
0 new messages