News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

"Monochrome Card" in DOS PCI system

Started by bruce000, January 05, 2012, 06:35:00 PM

Previous topic - Next topic

bruce000

I would like to know how to spoof DOS (6.2) into thinking that a true monochrome card is present.  I have developed a PCI card that has ASCII display memory starting at b0000, like a monochrome card, and would like to use it through DOS calls for a status window in applications where the VGA display is doing graphics.  (I have a ton of code that uses this configuration and want to migrate to PCI only motherboards.)  To get the PCI card looking at the correct memory and I/O locations I change the PCI BARs after boot, therefore there is no "monochrome card" present at boot time and DOS does not detect it.  I've tried changing the "equipment" variable in DOS to no avail, specifically a "MODE MONO" simply does monochrome emulation on the VGA display.

-thanks

dedndave

you might try setting video mode 7
the EGA/VGA card should emulate an MDA/HGC
        mov     ax,7
        int     10h

bruce000

Yes, that will get a MDA compatible display but it uses the VGA display, which is otherwise occupied.

dedndave

are you saying you made your own graphics card ?
help me understand, here

there is probably no way to "spoof" dos into anything - lol
it relies on the BIOS (which may be on the graphics adapter, itself) to provide services
it looks for MDA compatible I/O ports at boot to discover the presence of the card
not sure if an MDA can co-exist with an EGA or VGA - never tried that
an MDA can co-exist with a CGA, of course

however - you could likely write your own INT 10h handlers to support your adapter
load the handlers in a .SYS driver file or, perhaps, a TSR
probably wouldn't be as bad as it sounds for an MDA

bruce000

Thanks for the quick reply.  I guess my original post was not clear.  I have been using ISA systems with a VGA and an MDA installed for 20+ years.  (This means I have 20+ years of code that I would like to continue to use.)  For obvious reasons I wish to migrate to an all PCI system.  Whatever the boot process, DOS does not believe that there is an MDA card in the system.  I would like to hack DOS, after it boots. to convince it that there is an MDA card present.  The PCI boot process makes it quite hard to have the BARs set to emulate an MDA card at the time that DOS boots.  (I believe it can be done but it would require installing an "expansion ROM" and writing code that would run as the PCI BIOS sorts out the assignments for all the PCI devices in the system.)

dedndave

well - i am going to take a guess, here
the newer VGA cards do not expect to find an MDA present - and, thus do not allow it
i.e., the problem lies with the VGA adapter
the older VGA card was designed to co-exist with an MDA

you see, the I/O addresses that MDA cards used was in a certain range
and - CGA I/O addresses were in another (3B8h and 3D8h come to mind)
newer VGA cards emulate the MDA - and are detected by "answering" queries to those addresses
(a motorola 6845 CRTC appears to be present, which was used on both MDA and CGA adapters)

you might have better luck by trying to get the system to recognize 2 VGA adapters, then set one of them to mode 7
otherwise, find some old hardware and make it work   :P

MichaelW

At least at one time there were VGA adapters that supported two displays, for example the Matrox G450. I had a G450 at one time, but I can't recall experimenting with two displays, under Windows or DOS.
eschew obfuscation

kalpha

Bruce000 did you make progress?
If you google for
detecting MDA calls monochrome
and see the Dr Dobbs posting that may help, from what I understand, for DOS to believe there is an MDA it queries an address which is normally set by BIOS at boot up.
I don't think VGA cards or settings have any bearing on this.
Could you post more detail about your PCI MDA card?
It would be really useful for some powerbasic DOS programming I still work with.
The other alternatives I've thought of but not had time to look into is (probably having to hack somewhat)
DOSBOX (not a lot of help there unless you want to play games)
DOSEMU
or
something like BOCHS, VirtualBox etc.