|
From: Matan Ziv-Av <ma...@sv...> - 2000-07-09 15:11:54
|
On Sat, 8 Jul 2000, James Simmons wrote:
> > The mdacon driver detects a mda card only by checking if memory at
> > 0xb0000 is accessible (for write and read). If your vga card does decode
> > those addressess, I can think of the following options:
> > * enable the commented out tests in mda_detect.
>
> Short term solution.
It might be a good solution. It seems to me that test_mda_b is wrong. It
does not restore the register value to what it was, which might be the
reason. Try replacing the function with
static int test_mda_b(unsigned char val, unsigned char reg)
{
unsigned long flags;
unsigned char save;
save_flags(flags); cli();
outb_p(reg, mda_index_port);
udelay(20);
save=inb_p(mda_value_port);
udelay(20);
outb (val, mda_value_port);
udelay(20); val = (inb_p(mda_value_port) == val);
udelay(20);
outb_p(save,mda_value_port);
restore_flags(flags);
return val;
}
This works on my mda without the reported cursor problems. Please check
if it indeed Does not recognise your vga card.
> > * make the mda driver disable all pci vga cards, before probing for mda.
> > * don't insmod mdacon.c on a system without a mda driver.
> > * find a better way to detect an mda card.
>
> Long term solution. Just have to find info on MDA. Anyone know where docs
> are for MDA ?
Actually, I am not sure that there is such a test. the 6845 is very
simple, and if a vga card emulates it it might emulate it completely.
From PC Intern and vgadoc4b:
port 0x3b8 Control:
bit 0 - must be 1
bit 3 - enable screen
bit 5 - bit 7 of attribute is 0-bold 1-blinking
port 0x3ba Status (RO):
bit 0 - Horiz sync
bit 3 - pixel status (current pixel sent to monitor)
All other bits are 1.
port 0x3b4, 0x3b5 CRTC:
index
0 Horizontal Total Register (-1)
1 Horizontal Displayed Register (-1)
2 Horizontal Sync Position Register
3 Horizontal Sync Width Register
4 Vertical Total Register
5 Vertical Total Adjust Register
6 Vertical Displayed Register
7 Vertical SyncPosition Register
8 Interlace Mode Register
9 Maximum Scan Line Register (-1)
a Cursor Start Register (bits 0-4 cursor start,
bits 5-6 cursor attributes)
b Cursor End Register
c Start Address High Register
d Start Address Low Register
e Cursor Location High Register
f Cursor Location Low Register
--
Matan Ziv-Av. ma...@sv...
|