NTSC (TV scanrate) VGA in BIOS success
Posted: Mon Jun 28, 2004 10:42 pm
I was successful in patching my Award 4.51pg bios to post in an NTSC video mode.
Many old mono monitors, TV's, small LCD's etc are fixed-scan at NTSC
clockrates and have different sync-pulse characteristics. Most, if not all,
VGA cards can drive at these rates, but there was never an "official IBM"
specification for such a VGA mode, likey due to marketing practices of the
time.
To do this, I took a DOS TSR driver and modified it for use in a BIOS
environment and made the appropriate call into it.
http://www.ccs.neu.edu/home/bchafy/ntscbios.zip
There's still bugs/issues (see below), but it's close.
Where/Howto Patch:
--------------------------
Disassemble original.tmp with your favorite disassembler.
Search for the string "Ally" and note the begining data block address.
For example, in at least two separate 4.51pg motherboard bios's of mine, the
disassembly looked like:
E000:383A 65 64 00 db 'ed', 0
E000:383D 2C 20 41 6E 20 45 db ', An Energy Star Ally', 0
E000:3843 6E 65 72 67 79 20
The start of this text data block is 383D.
Now, search for 383D (or whatever is is). If lucky, you should find code
similar to:
E000:1F96 BE 383D mov si,383Dh
E000:1F99 E8 3FB3 call sub_217 ; (5F4F)
E000:1F9C 5A pop dx
si is a register commonly used as a reference to some string data.
(ie es:si, ds:si, etc). Feeling lucky, I took a leap of faith and
replaced the call sub_217 to my driver and see what would happen.
(keeping a backup bios chip handy!).
On bootup it worked!! A few things were missing at
the top. No EPA procedure was executed and the first line of text (and the little
award logo was not displayed). The top line was blank but the second line
displayed the usual (C) Award Bios... All was well through the post and
and dos, etc booted fine.
Bugs/Caveats
-----------------------
There is one big caveat, however. For whatever reason, when I press DEL and
go into the CMOS Setup Utility, the mode switches back to normal VGA. Im
not sure of the cause as of yet (just got this working late yesterday).
It is possible the interrupt table was reset,
or a video mode was set external to int10, or just a bug in the driver.
However, after exiting the CMOS config, POST starts in the NTSC mode as
usual.
If andybody knows where the CMOS Setup Utility entry points are (or what to
search for), let me know.
About the driver:
------------------------
This is a VGA->NTSC video driver for use in a BIOS.
It is based on Tomi Engdal's vga2ntsc.com video driver.
Much of the original code had to be rewritten to work within the limitations
of a bios:
Works with complete position independence. Internal address references are now
offsets instead of absolute.
Read-only data environment. The original driver used to write data to the local
data segment.
Removed all DOS/DOS-services references and replaced with low-level eqivalents.
Adding the driver to original.tmp
------------------------
Find an empty place in your original.tmp, and paste in the driver wherever
there is enough free space.
The entry point to the driver is at whatever the starting address is.
For example I pasted the driver in my original.tmp starting at address
E000:D700. A "call D700" initializes it.
More info
------------------------
It runs a VGA card at NTSC-equivalent scanrates.
This makes the output of a VGA card suitable for use in a TV or other
NTSC-clocked display (for example a small 6" lcd or old mono monitor).
The driver is an ISR for INT 10.
Upon execution, the orignal INT 10 pointer is moved to INT E2. There's nothing
special about INT E2, any other free interrupt could have been used.
Tomi Engdal's original DOS driver:
http://www.hut.fi/Misc/Electronics/circ ... a2tv06.zip
Other links, (hardware, etc):
http://www.hut.fi/Misc/Electronics/circ ... index.html
http://home1.gte.net/bs/sharp2.html
Many old mono monitors, TV's, small LCD's etc are fixed-scan at NTSC
clockrates and have different sync-pulse characteristics. Most, if not all,
VGA cards can drive at these rates, but there was never an "official IBM"
specification for such a VGA mode, likey due to marketing practices of the
time.
To do this, I took a DOS TSR driver and modified it for use in a BIOS
environment and made the appropriate call into it.
http://www.ccs.neu.edu/home/bchafy/ntscbios.zip
There's still bugs/issues (see below), but it's close.
Where/Howto Patch:
--------------------------
Disassemble original.tmp with your favorite disassembler.
Search for the string "Ally" and note the begining data block address.
For example, in at least two separate 4.51pg motherboard bios's of mine, the
disassembly looked like:
E000:383A 65 64 00 db 'ed', 0
E000:383D 2C 20 41 6E 20 45 db ', An Energy Star Ally', 0
E000:3843 6E 65 72 67 79 20
The start of this text data block is 383D.
Now, search for 383D (or whatever is is). If lucky, you should find code
similar to:
E000:1F96 BE 383D mov si,383Dh
E000:1F99 E8 3FB3 call sub_217 ; (5F4F)
E000:1F9C 5A pop dx
si is a register commonly used as a reference to some string data.
(ie es:si, ds:si, etc). Feeling lucky, I took a leap of faith and
replaced the call sub_217 to my driver and see what would happen.
(keeping a backup bios chip handy!).
On bootup it worked!! A few things were missing at
the top. No EPA procedure was executed and the first line of text (and the little
award logo was not displayed). The top line was blank but the second line
displayed the usual (C) Award Bios... All was well through the post and
and dos, etc booted fine.
Bugs/Caveats
-----------------------
There is one big caveat, however. For whatever reason, when I press DEL and
go into the CMOS Setup Utility, the mode switches back to normal VGA. Im
not sure of the cause as of yet (just got this working late yesterday).
It is possible the interrupt table was reset,
or a video mode was set external to int10, or just a bug in the driver.
However, after exiting the CMOS config, POST starts in the NTSC mode as
usual.
If andybody knows where the CMOS Setup Utility entry points are (or what to
search for), let me know.
About the driver:
------------------------
This is a VGA->NTSC video driver for use in a BIOS.
It is based on Tomi Engdal's vga2ntsc.com video driver.
Much of the original code had to be rewritten to work within the limitations
of a bios:
Works with complete position independence. Internal address references are now
offsets instead of absolute.
Read-only data environment. The original driver used to write data to the local
data segment.
Removed all DOS/DOS-services references and replaced with low-level eqivalents.
Adding the driver to original.tmp
------------------------
Find an empty place in your original.tmp, and paste in the driver wherever
there is enough free space.
The entry point to the driver is at whatever the starting address is.
For example I pasted the driver in my original.tmp starting at address
E000:D700. A "call D700" initializes it.
More info
------------------------
It runs a VGA card at NTSC-equivalent scanrates.
This makes the output of a VGA card suitable for use in a TV or other
NTSC-clocked display (for example a small 6" lcd or old mono monitor).
The driver is an ISR for INT 10.
Upon execution, the orignal INT 10 pointer is moved to INT E2. There's nothing
special about INT E2, any other free interrupt could have been used.
Tomi Engdal's original DOS driver:
http://www.hut.fi/Misc/Electronics/circ ... a2tv06.zip
Other links, (hardware, etc):
http://www.hut.fi/Misc/Electronics/circ ... index.html
http://home1.gte.net/bs/sharp2.html