Subject: Re: Ethernet on LC630???
To: Bill Studenmund <wrstuden@loki.stanford.edu>
From: Michael R Zucca <mrz5149@cs.rit.edu>
List: port-mac68k
Date: 02/16/1998 12:45:50
> >   
> > + 		#if 0
> >   		if (sense == 0)
> >   			found = 0;
> > + 		#endif
> 
> I've seen this mentioned before. If you have a machine which reports '0'
> when there is in fact a screen, what does it report when there's no
> screen? Or, how does it report no screen? It sounds like the problem's
> just different machines have different "no screen" reporting styles.

The Quadras, unlike the II's, support extended sense codes. Checking if
a monitor is connected is more than simply checking if the sense register
is a certain value.

What you do is you reset the sense lines to get a base sense code. Then
you pull one line hi and collect the bits from the other two lines for
each of the three sense lines. Bit shift the values and OR them together
using the right incantation and you have an extended sense code.

The base plus extended sense codes tell you what monitor is connected, if
any, to your monitor port.

The trouble with checking if the sense register is zero is that when MacOS
is collecting its sense info, the last part of the extended sense code
could have been zero. That value sticks around past NetBSD boot and suddenly
we think there's no monitor. Not good :-)