home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 9
/
FreshFishVol9-CD2.bin
/
bbs
/
util
/
mpatch-37.4.lha
/
MPatch
/
MPatch.DOC
< prev
next >
Wrap
Text File
|
1994-04-09
|
12KB
|
255 lines
MPATCH - The Monitor Patch Utility, V37.4
=========================================
WHY MPATCH?
-----------
Some time ago, I upgraded my old A2000 with the latest Denise revision
since I do a lot of writing and DTP on my AMIGA, and that 50 Hz PAL
display started to hurt my eyes. The MULTISCAN mode was better, but
my C1960 monitor seemed to have problems sync'ing on the 60 Hz signal:
the picture was always stretched vertically, so I had to switch to
MANUAL and adjust the vertical size manually. However, the PAL mode
was then squeezed vertically, resulting in a very odd aspect ratio; so
I had to switch from MANUAL to AUTO and back every time a program
came up with a PAL screen.
The EURO72 mode introduced with V38 was a bit better but its 640 x 400
screen tended to become quite crowded once I had one or two CLI windows
and the SE window open on it. Also some older software, like the famous
PowerPacker, would always open a 60 Hz Productivity screen - so it had
to be Multiscan (and switching manually) again.
Then, one day, I scanned my C include files in search of some struct
definition, and came across the monitor.h file, spotted the word
VSYNCTRUE somewhere, and the rest was history. I had already toyed with
various sync settings on a graphics card, and so I knew that some
monitors (like the C1960) use the polarity of the sync signals to
determine the aspect of the video signals they receive. I just had no
idea that the ECS chipset supports positive sync signals as well.
All I had to do is to find out where the BeamCon0 values are stored,
and then write this small program. As I tested it, I found some
other goodies to include, and so MPATCH grew ...
USAGE
-----
MPATCH can only be run from the CLI or Shell.
MPATCH <monitor-name> [HSYNCTRUE][VSYNCTRUE][SYNCTRUE][LOLDIS]
[HSYNCDELAY <delay>][VSYNCDELAY <delay>]
<monitor-name> is the name of the monitor to be patched, e.g.
"multiscan.monitor". Note that the ".monitor" extension *MUST*
be given. Upper/lowercase is also important. V38 (2.1) monitor
names are all in lower case; the new modes introduced with V39
(3.0), however, are mixed case. You must type "DoublePAL" or
"DoubleNTSC" in order that these names be recognized.
HSYNCTRUE - changes the horizontal sync signal's polarity to positive,
or "true" (1) logical level. By default, all monitors have their syncs
set to negative, or "false" (0) logical level.
VSYNCTRUE - changes the vertical sync signal's polarity to positive,
or "true" (1) logical level. By default, all monitors have their syncs
set to negative, or "false" (0) logical level.
SYNCTRUE - this is just a shortcut for HSYNCTRUE VSYNCTRUE; so if you
specify SYNCTRUE, both syncs are switched to "true" (see above for
details)
LOLDIS - means "LOng LIne DISable". By default, every second scanline
is a "long line" due to DMA timing restrictions. (The exact length
of a PAL video scanline would be 227.5 DMA cycles per line. Since
0.5 cycles are impossible, every second scanline is displayed with
a length of 228 cycles, hence the name "long line")
This flag is set by default for all nonstandard modes.
It should be set for the NTSC mode on PAL AMIGAs as well, at least
if you are using "BBlank" or a similar utility that enables border
blanking; otherwise the right border might look a bit wobbly.
The following options can only be used with VGA/Multiscan modes, and will
be ignored if used with the PAL or NTSC modes.
HSYNCDELAY <value> - Modifies the position of the horizontal sync pulse in
the horizontal blanking period.
Negative values will move the display to the right, positive values
will move it to the left. Although any value may be given, only values
between -6 and +8 are reasonable. However, specifying a value beyond
this range can do no harm, but will set the values to their allowable
minimum or maximum respectively.
VSYNCDELAY <value> - Modifies the position of the sync pulse in the
vertical blanking period.
<value> is in scanlines. Positive values move the display "up", while
negative values move it "down". Any value may be given, but any value
beyond the limits of the specified monitor will be ignored and the
timings will be set to their allowable minimum or maximum respectively.
The MPATCH command will most likely find a place in your startup-sequence
or user-startup file. It must be inserted after the monitor definitions
have been added to the system's database; I recommend putting it somewhere
at the top of your user-startup file.
HOW TO FIND THE CORRECT SETTINGS FOR YOUR MONITOR
-------------------------------------------------
Before you start patching around, you should select your "default" display
mode and adjust the monitor's controls so that it fills most of the screen
and is centered horizontally and vertically. If you own a monitor that has
a ADD/NOR switch (might also be labeled differently on your monitor, so
consult your manual), set it to ADD (or whatever it is labeled). Such
switches are found on the C1960 and some older VGA/SVGA multiscans.
If your monitor supports PAL or NTSC display, use one of these modes to
adjust the picture position, since it is not possible to adjust the position
of any video mode with MPATCH.
DO NOT TOUCH any of the monitor's controls afterwards - you won't need to
anyway. (Close the small trapdoor if the monitor has one!)
Now, open a shell window and invoke the Overscan Preferences editor. Select
the monitor you wish to patch. Click on the "Set Text Overscan" gadget.
Note to which direction the display is offset. Note whether it appears
vertically stretched or squeezed. Click "Cancel" (or press <ESCAPE>), and
activate your shell window. Now type: "mpatch <monitor_name>", where
<monitor_name> is the name of the monitor you selected in the Overscan
editor. Add one or more switches following the guidelines below:
* If a mode appears stretched vertically (on my C1960, the MultiScan mode
used to behave this way), try the SYNCTRUE switch.
* If a mode appears squeezed vertically, try the VSYNCTRUE switch.
* If a mode appears to be too far to the right, try the HSYNCDELAY option
with a positive value. The effect of HSYNCDELAY is cumulative, so if you
specify HSYNCDELAY 2, find the picture is still too far to the right,
you must not type HSYNCDELAY 4, but HSYNCDELAY 2, since the old setting
is still in effect. Typing HSYNCDELAY 4 would result in a total delay
of 6! You may of course specify a negative value if you specified a
value too large.
Generally, monitors with a scan rate below 31.5 kHz tend to be too far
to the right, such as the super72 or Double... modes
* If a mode appears to be too far to the left, try the HSYNCDELAY option
with a negative value.
* If the right border appears to be somewhat instable, try the LOLDIS
switch.
Press <ENTER> and go back to the Overscan editor. Click "Set Text Overscan"
again. The display should now be somewhat different. If you are satisfied,
note all the switches you set and add a line at the top(!) of your
"S:user-startup" file. If you wish to patch your workbench screen's monitor
as well, you *MUST* insert the MPATCH command before any text is printed
to the console window, or the changes will not affect the workbench screen.
Repeat the above steps for all monitors you wish to patch.
On my system, I have the following lines at the top of my "S:User-Startup"
mpatch multiscan.monitor synctrue hsyncdelay -1
mpatch euro72.monitor hsyncdelay -1
mpatch super72.monitor vsynctrue hsyncdelay 8
mpatch DoublePAL.monitor synctrue hsyncdelay 4
mpatch DoubleNTSC.monitor synctrue hsyncdelay 4
With these settings, all modes(!) are perfectly centered on the screen, and
the Super72 display fills the whole screen and has the correct aspect ratio.
TECHNICAL DETAILS
-----------------
A) SYNC POLARITY
----------------
Some monitors, especially the C1960 and most VGA Multiscans, use the
polarity of the sync signals to determine the aspect of the picture they
are displaying. The term "polarity", although frequently used in this
co