[comp.os.minix] ATI VGAWonder

bc@ux1.cso.uiuc.edu (B.C.) (01/16/90)

I got the following message:

Unexpected interrupt or trap: vector = 13.  pc = 0x147  text+data+bss = 0x11E

My Norton Programmer's Guide tells me that interrupt 13 (decimal) is invoked
during the vertical retrace period on a color display.  I am using an ATI
VGAWonder 512k VGA card.  It seems to work OK, but I have gotten this error
twice.  Paul Allen tells me that the kernel ought to charge right on after it
gets this error, but it doesn't -- it hangs.  Completely.

I am wondering if anyone else:

	1)  Has this problem.
	2)  Has an ATI VGAWonder (256 or 512k)
	3)  Knows what I can do about it.

Please email me with responses (b-cox2@uiuc.edu) and I'll post a summary of the
responses.

Ben Cox
b-cox2@uiuc.edu

hysell@kodak.UUCP (John Hysell) (01/17/90)

In article <1990Jan16.045403.18941@ux1.cso.uiuc.edu>, bc@ux1.cso.uiuc.edu (B.C.) writes:
> I got the following message:
> 
> Unexpected interrupt or trap: vector = 13.  pc = 0x147  text+data+bss = 0x11E
> 
> My Norton Programmer's Guide tells me that interrupt 13 (decimal) is invoked
> during the vertical retrace period on a color display.  I am using an ATI
> VGAWonder 512k VGA card.  It seems to work OK, but I have gotten this error
> twice.  Paul Allen tells me that the kernel ought to charge right on after it
> gets this error, but it doesn't -- it hangs.  Completely.
> 
> 	2)  Has an ATI VGAWonder (256 or 512k)
> 	3)  Knows what I can do about it.

   I have an ATI VGAWONDER with 512K (I think it's a GREAT video board!), and	   have used it with MINIX 1.2 in an IBM XT, and am using it now with MINIX 1.3
   in an IBM AT with an INTEL 386-INBOARD, and 3.5 megs of RAM, a WD-1003
   controller and 2 seagate ST251 drives.  The ATI card drives a NEC MultiSync.
     While using it with MINIX 1.2 on the XT, I used to have all sorts of video
   problems.  I finally found that if I booted DOS and used the ATI utility
   program VSETUP and forced the card into CGA; SHUT OFF THE XT; and then booted   MINIX from a cold start, everything would work fine.
     Later, while running MINIX 1.2 on the AT, I did not have these problems.
   The chief difference (aside from obvious machine change) was that I have
   reconfigured the ATI card for 16-bit I/O.  Under MINIX 1.3, it remains very
   stable.  (Next; to try MINIX 1.5)

Good luck;
-John Hysell
hysell@kodak.com
hysell@kodak.uucp

chasm@attctc.Dallas.TX.US (Charles Marslett) (01/18/90)

In article <2275@kodak.UUCP>, hysell@kodak.UUCP (John Hysell) writes:
> In article <1990Jan16.045403.18941@ux1.cso.uiuc.edu>, bc@ux1.cso.uiuc.edu (B.C.) writes:
> > I got the following message:
> > 
> > Unexpected interrupt or trap: vector = 13.  pc = 0x147  text+data+bss = 0x11E
> > 
> > My Norton Programmer's Guide tells me that interrupt 13 (decimal) is invoked
> > during the vertical retrace period on a color display.  I am using an ATI
> > VGAWonder 512k VGA card.  It seems to work OK, but I have gotten this error
> > twice.  Paul Allen tells me that the kernel ought to charge right on after it
> > gets this error, but it doesn't -- it hangs.  Completely.
> > 

The problem is that the ATI card is generating an interrupt on a (BIOS) mode
set -- and there is no routine to handle it.  Some motherboard BIOSes clear
the interrupt (being designed after the VGA came out), others do not.

A (really) permanent fix is to cut the INT-2 line on the VGA Wonder card (not
nice, really).  Another, more esthetic, and less reliable, fix is to execute
the following code fragment before starting MINIX (say in the boot image
initialzation code):

    MOV   DX,03D4h    ; Get the CRTC address
    MOV   AL,11h      ; Select register 0x11, Vertical-Sync-End
    OUT   DX,AL
    INC   DX
    IN    AL,DX       ; Read the old value
    OR    AL,20h      ; Set bit 5 (disable vertical interrupts)
    AND   AL,0FFH-10h ; Clear any pending vertical interupt
    OUT   DX,AL       ; Issue the new state

    JMP   $+2         ; For those with latent paranoia
    JMP   $+2         ; (or who have programmed 3780s)
    JMP   $+2
    OUT   DX,AL       ; We clear the interrupts twice!

If this fixes the problem, it's a general one, not unique to ATI -- and it's
the reason IBM cut the interrupt pin loose on the true blue VGA.

Charles Marslett
chasm@attctc.dallas.tx.us
[of course, it could also be unique to ATI, and then this is all non-sequitur]

>    problems.  I finally found that if I booted DOS and used the ATI utility
>    program VSETUP and forced the card into CGA; SHUT OFF THE XT; and then booted
>   MINIX from a cold start, everything would work fine.
>      Later, while running MINIX 1.2 on the AT, I did not have these problems.
>    The chief difference (aside from obvious machine change) was that I have
>    reconfigured the ATI card for 16-bit I/O.  Under MINIX 1.3, it remains very
>    stable.  (Next; to try MINIX 1.5)

It should be more stable, the EGA is (rather) well supported with 1.3, but
did not work to well with 1.1 or 1.2.

> Good luck;
> -John Hysell
> hysell@kodak.com
> hysell@kodak.uucp

Ditto,

Charles Marslett
chasm@attctc.dallas.tx.us