gtf.bas

Implementation of the General Timing Formulae

Author

Marcel Sondaar

License

Public Domain

Summary
gtf.basImplementation of the General Timing Formulae
Functions
LoadDefaultDisplayValuesGets a standard value for the monitor settings
GTF_ComputeFromRefreshComputes the CRTC settings given a resolution and frequency
GTF_ComputeFromHFreqComputes the CRTC settings given a resolution and horizontal frequency
Todo’s
write me
Functions
GTF_ComputeFromDotclockComputes the CRTC settings given a resolution and dot clock
Todo’s
write me

Functions

LoadDefaultDisplayValues

Sub LoadDefaultDisplayValues(ByRef vdp As VESA_display_properties)

Gets a standard value for the monitor settings

in

vdpA pointer to a <VESA_dislpay_properties> structure that needs to be filled out

out

A <MonitorSettings> Structure containing default values

GTF_ComputeFromRefresh

Function GTF_ComputeFromRefresh(
   ByRef Refresh As Single,
   ByRef vmp As VESA_mode_properties,
   ByRef vdp As VESA_display_properties,
   ByRef vt As VESA_timings
) As Integer

Computes the CRTC settings given a resolution and frequency

in

vfreqThe refresh rate to use in Hz
vmpThe mode’s properties
vdpThe display’s properties
vtA pointer to a structure of vesa timings to be computed.

out

Returns zero on success, nonzero if the timing could not be established

GTF_ComputeFromHFreq

Computes the CRTC settings given a resolution and horizontal frequency

in

h_freqThe horizontal frequency in Hz
vmpThe mode’s properties
vdpThe display’s properties
vtA pointer to a structure of vesa timings to be computed.

out

Returns zero on success, nonzero if the timing could not be established

Todo’s

write me

Functions

GTF_ComputeFromDotclock

Function GTF_ComputeFromDotclock(
   ByVal Dotclock As Single,
   ByRef vmp As VESA_mode_properties,
   ByRef vdp As VESA_display_properties,
   ByRef vt As VESA_timings
) As Integer

Computes the CRTC settings given a resolution and dot clock

in

dotclockThe dot clock to use in MHz
vmpThe mode’s properties
vdpThe display’s properties
vtA pointer to a structure of vesa timings to be computed.

out

Returns zero on success, nonzero if the timing could not be established

Todo’s

write me

Sub LoadDefaultDisplayValues(ByRef vdp As VESA_display_properties)
Gets a standard value for the monitor settings
Function GTF_ComputeFromRefresh(
   ByRef Refresh As Single,
   ByRef vmp As VESA_mode_properties,
   ByRef vdp As VESA_display_properties,
   ByRef vt As VESA_timings
) As Integer
Computes the CRTC settings given a resolution and frequency
Function GTF_ComputeFromDotclock(
   ByVal Dotclock As Single,
   ByRef vmp As VESA_mode_properties,
   ByRef vdp As VESA_display_properties,
   ByRef vt As VESA_timings
) As Integer
Computes the CRTC settings given a resolution and dot clock