-
Notifications
You must be signed in to change notification settings - Fork 49
/
vga.d
146 lines (103 loc) · 3.93 KB
/
vga.d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
Name{number}
vga - AdvanceCAB VGA Mode Remapper For DOS
Synopsis
:vga [/l] [/u] [/a] [/c CONFIG] [/d] [/e]
Description
The `vga' utility is a TSR (Terminate Stay Resident) VGA BIOS
wrapper that substitutes the default list of VGA video modes
with a list of the favorite modes which work best with your
video hardware.
The `vga.exe' executable can be used as a standard executable or
it can also be loaded as a `sys' driver in the `config.sys' as a
`device'. Please note that the `sys' version can't be unloaded.
At the startup the configuration file `vga.rc', created with
the utility `vgav', is read and all the modelines present
are activated. The format of this configuration file is
specified in the document `advv.txt'.
These are some example rc files:
ntsc.rc - NTSC TV.
pal.rc - PAL TV.
standard.rc - Arcade Standard Resolution (15 kHz).
medium.rc - Arcade Medium Resolution (25 kHz).
extended.rc - Arcade Extended Resolution (16.5 kHz).
pcvga.rc - VGA PC Monitor.
pcsvga60.rc - SVGA PC Multisync Monitor.
From all the modelines in the configuration file three of them
are chosen for the standard VGA mode 1h, 3h and 13h.
1h - width of 40*9 or 40*8 pixel.
3h - width of 80*9 or 80*8 pixel.
13h - width of 320 pixel and height of 200.
All the other modelines are used to adjust any other XMode
detected. When the current video mode width and height match
a modeline, the modeline is automatically set.
Options
These are the command line options supported:
/l
Load in memory the utility and adjust the current video
mode if a corresponding mode is defined in the config
file.
/u
Unload the utility.
/a
Adjust the current video mode if a corresponding mode
is defined in the config file without loading in memory
the utility.
/c CONFIG
Use an arbitrary configuration file for the /l and /a
commands.
/d
Disable all the video output from others programs.
This option works only if the program is loaded in
memory. Remember to reenable the video output before
running your programs.
/e
Enable the video output.
You can force a video mode reset in text mode using the standard
DOS command:
:mode co80
or with the `video' utility.
Cards
This utility should works with any VGA compatible board.
How It Works
This utility intercepts all the VGA BIOS calls and if it detects
a ModeSet call for a know mode it uses his version of the mode.
At any call of the interrupt 08h and 21h some VGA registers are
read. If a VGA mode with the size of a know modeline is detected
the mode is adjusted to match the mode defined in the
configuration file.
The disabling of the video output works ignoring all the int
10h calls.
Limitations
Only the `modelines' compatible with the vga hardware are used.
The text modes can use only the pixel clocks 28.322, 25.175,
14.161 and 12.587 MHz. The graphics modes can use only the
pixelclocks 14.161, 12.587, 7.080 and 6.293 MHz.
Examples
Load it:
:vga /l
Load it with an arbitrary configuration file:
:vga /l /c c:\myconf.rc
Unload it:
:vga /u
Load it in the config.sys file:
:device=c:\cab\vga.exe /l /c c:\cab\vga.rc
Adjust the current video mode in the config.sys without loading
in memory the utility:
:device=c:\cab\vga.exe /a /c c:\cab\vga.rc
Adjust the current video mode in the config.sys and disable
all the video output:
:device=c:\cab\vga.exe /l /d /c c:\cab\vga.rc
the latter is probably the most interesting use. You can load
`vga' as soon as possible to adjust the video output and prevent
other programs to write to the screen. You can also use the
`video' utility to load an arbitrary image to display.
After the system is initialized you can insert in the autoexec.bat
the command:
:c:\cab\vga /e
to reenable the video output.
Bugs
The configuration file is checked only for the
`device_video_modeline' options.
All the other options are ignored.
Copyright
This file is Copyright (C) 2003 Andrea Mazzoleni.