Subject: Quadra onboard video
To: macbsd <port-mac68k@NetBSD.ORG>
From: None <cruller@unicom.net>
List: port-mac68k
Date: 02/20/1997 17:39:13
This is a multi-part message in MIME format.

--------------51F63A81ED5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This may be of interest to whomever is working on the quadra internal
video drivers.  Its Apple's technote on Quadra Video.

Hope it helps,
Gerald

http://devworld.apple.com/ngs/lpp/adrpub/docs/dev/technotes/hw/hw_26.html

--------------51F63A81ED5
Content-Type: text/html; charset=us-ascii; name="hw_26.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="hw_26.html"
Content-Base: "http://devworld.apple.com/ngs/lpp/adrp
	ub/docs/dev/technotes/hw/hw_26.html"

<BASE HREF="http://devworld.apple.com/ngs/lpp/adrpub/docs/dev/technotes/hw/hw_26.html">

<!-- This layout is very simple and designed to provide a general layout possibility for Level 3 pages. -->
<!-- The margin in this template is used only as an indentation for the Document Body. However, the standard
margin space and gutter are still in the overall design, for future potential. -->

<HTML>
<HEAD>

<TITLE>HW 26 - Macintosh Quadra Built-In Video</TITLE>

<!-- AEWStd. Ver. 0.1 -->
<!-- See http://www.apple.com/standards/meta.html for information -->
<!-- within meta area, content surrounded by brackets must be changed to 
refer to the current Apple page or Apple www site -->
<!-- delete the comment containing [optional] to use an optional tag -->
<!-- delete unused meta tags -->

<META NAME="Author-Corporate"    	CONTENT="Apple Computer, Inc.">
<META NAME="Publisher"    		 	CONTENT="Apple Computer, Inc.">
<META NAME="Publisher-Email"     	CONTENT="[Webmaster Email Address]">
<!-- [optional] --><META NAME="OtherAgent-[Relationship]"     
									CONTENT="[Corporate Name]">
<!-- [optional] --><META NAME="Keywords"    CONTENT="[Keywords]">
<!-- [optional] --><META NAME="Description" CONTENT="
 [Textual description of document as you want it to appear in the text
 sections of search engines supporting this field]
">
<META NAME="Identifier-URL"Content="http://www.apple.com/metadata/sample.html">
<META NAME="Identifier"     		CONTENT="[See Instructions]">
<META NAME="Content-Language" 		CONTENT="[See instructions for codes]">
<META NAME="Coverage"      			CONTENT="Worldwide">

<!--Date information--see instructions-->

<!-- [optional] --><LINK rel="Up"   		href="[full URL of parent document]">
<!-- [optional] --><LINK rel="Previous"   	href="[full URL of a previous document in
a sequence]">
<!-- [optional] --><LINK rel="Next"    		href="[full URL of the next document in a
sequence]">
<!-- [optional] --><LINK rel="Page.One" 	href="[full URL of the top of this section]">
<!-- [optional] --><LINK rel="Home" 		href="[full URL of the top of broader section]">
<!-- [optional] --><LINK rel="ToC"   		href="[full URL of local Table of Contents
                                        or
								http://www.apple.com/documents/contents.html]">
<!-- [optional] --><LINK rel="Index"   		href="[full URL of local Index
                                        or
								http://www.apple.com/documents/index.html]">
<!-- [optional] --><LINK rel="Help"   		href="[full URL of local Help
                                        or
								http://www.apple.com/documents/help.html]">
<!-- [optional] --><LINK rel="Bookmark"   href="[full URL of the preferred bookmark
for this page]">

</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <!-- white background -->


<!-- Title Banner -->

<center><IMG BORDER=0 SRC="../../../images/level3.gif" ALT="Title Banner" ISMAP USEMAP="#level3"></a></CENTER><P>
			<BR>
			<MAP NAME="level3">
			<!-- Find It -->
			<AREA SHAPE="RECT" COORDS="7, 9, 69, 30" HREF="../../../find.html">
			<!-- Main -->
			<AREA SHAPE="RECT" COORDS="432, 9, 492, 30" HREF="../../../devworld.shtml">
			</MAP>
			
			<center><h1>Technotes</h1></center>		

<!----------------------------------- Document Body ------------------------------------>

<!-- The Document text should line up with the right edge of the "find it" icon in the banner. -->
<br><center><h3>Macintosh Quadra Built-In Video</h3></center><br><hr><p><TABLE BORDER=0 ALIGN=CENTER CELLPADDING=0><TR><TD WIDTH=90% VALIGN=TOP ALIGN=left><b>Technote HW 26</b></td><TD WIDTH=10% ALIGN=RIGHT VALIGN=TOP><b>November 1991</b></td></tr></table><p><hr><br>Revised by:	Developer Support Center	December 1992<BR>
Written by:	Dale Adams	November 1991<BR><br>This is an in-depth article in three parts, describing the internal video on
the Macintosh Quadra computers. The first part discusses a number of general
Quadra video topics, the second part details how to wire the video connector
sense pins to access all the Quadra's supported video modes, and the third
describes the memory configurations necessary to support each of the video
modes at specific pixel depths.<BR><br><br><h3>
Video Architecture</h3>
<p>
The Macintosh Quadra computers were designed with a flexible video hardware
section in order to support a wide variety of displays. Since the purchaser of
one of these CPUs is paying for a frame buffer on the motherboard (whether he
or she wants it or not), and since the Quadras were designed to be
high-performance machines, the frame buffer was designed both to be very
flexible (to support most displays a user may want to use) and to be relatively
high performance (to match the computer's capabilities).<p>
<p>
Obviously every display made by every third-party monitor vendor can't be
supported by the on-board video, but the Macintosh Quadra computers do support
a much wider range of displays at a higher level of performance than any
previous Macintosh. The Macintosh Quadra 700 and 900 support pixel depths
ranging from 1 to 32 bits per pixel (bpp), Apple displays ranging from the 512
x 384 12-inch color monitor through the 1152 x 870 21-inch color monitor, pixel
clocks ranging from 12 to 100 MHz, and a variety of industry standards such as
VGA, SVGA, NTSC, and PAL. The Macintosh Quadra video port produces RS-343 RGB,
and also provides horizontal, vertical, and composite sync outputs. Composite
or S-video output is not provided, but can be accomplished by use of an
external RGB-to-composite encoder. The Macintosh Quadra 700 and 900 also
support Apple convolution for flicker-reduction on interlaced displays (that
is, NTSC and PAL) at up to 8 bpp. The Macintosh Quadra computers automatically
detect the type of display attached to the video connector via three "sense"
pins on the video connector. Depending on the wiring of these three pins,
software in ROM configures the video hardware for one of the supported display
types. (A full description of sense pin wiring and supported display types is
in the second part of this Tech Note.)<p>
<p>
The Quadra 700 and 900 provide the highest built-in video performance of any
Macintosh CPU to date. In a (very) simplified graphics model, we could say that
performance depends on two main factors: processor horsepower and the bandwidth
the processor has into frame buffer memory. These machines already have a fast
processor--the 68040--that runs standard 32-Bit QuickDraw. To provide high
bandwidth into frame buffer memory, dedicated video RAM (VRAM) was used for the
frame buffer, and that VRAM was placed directly on the 68040 processor's local
bus. This provides the 68040 the same access time into frame buffer memory that
it has into main system RAM. (Transfer rates can exceed 40 MB per second.) In
addition, memory options such as fast page mode are supported, which can
improve graphics performance for operations such as scrolling and off-screen to
on-screen pixmap transfers.<p>
<p>
In a number of cases the design was optimized for high performance over low
cost. A good example of this is 32 bpp operation on Apple's standard 13-inch
RGB monitor at 640 x 480 resolution (and this also applies to VGA and NTSC),
which is probably the most common color monitor in use on the Macintosh. The
actual number of memory bytes needed to support 24 bpp is 640 x 480 x 3 =
921,600. This would seem to fit within 1 MB of memory (as is the case with the
Apple 8*24 video card), but the Quadra computers actually require 2 MB of VRAM
for this mode. The 8*24 card supports 24 bpp at 640 x 480 by using a storage
mode called "chunky planar" to fully utilize all its 1 MB of VRAM. However,
this results in having to perform three separate memory accesses for each
24-bit pixel read from or written to the frame buffer. (This is done in
hardware so software only performs a single read or write.) On a NuBus video
card, this inefficiency is partially masked by the synchronization delays that
occur at the processor-bus/NuBus interface. However, when frame buffer memory
is placed directly on the processor bus, this approach results in a nearly
threefold performance degradation. This was judged unacceptable for the Quadra
machines. Each 24-bit pixel occupies one longword (4-bytes) in VRAM, so the
Quadras actually provide 32 bpp for the 640 x 480 resolution. This pushes the
memory requirement for this mode over the 1 MB boundary (640 x 480 x 4 =
1,228,800 bytes). Performance is improved still more by another frame buffer
architectural feature. Frame buffer memory in the Quadra computers is organized
into four "banks" of 512K per bank. As mentioned earlier, Quadra VRAM can
operate in fast page mode. In addition, each bank of VRAM operates in fast page
mode independently of the other three banks. This causes the number of in-page
"hits" to increase, and thus improves the effective bandwidth into the frame
buffer. Also, at 32 bpp, 640 x 480 resolution, each row is set to 4096 bytes,
or 1024 32-bit pixels. Each successive row is assigned to a different VRAM bank
(modulo 4, of course). This memory organization improves performance during
certain commonly performed graphics operations such as vertical scrolling.<p>
<p>
In any design there are a number of trade-offs to be made, and this is
certainly true for the frame buffer in the Macintosh Quadra machines. While the
video does operate at 32 bpp on displays up to 16 inches, it does not support
21-inch displays at this pixel depth since this would have significantly raised
the cost of the motherboard. (Memory capacity and bus bandwidths would
essentially have to double, and this would be expensive.) It does support NTSC
and PAL timing, but does not provide a composite video output. While it is much
faster than any nonaccelerated video card, there are accelerated video cards
that are faster (and much more expensive, too, by the way). A separate graphics
processor was not added primarily for cost reasons. However, a graphics
processor such as the 29000 RISC chip on the 8*24GC card can only speed up the
graphics operations that it was designed to know about. If an application
program bypasses QuickDraw (which is what most Macintosh graphics accelerators
are designed to speed up), a graphics accelerator will not improve performance,
and can actually cause performance degradation.<p>
<p>
Overall, the Macintosh Quadra video provides a reasonable compromise of cost,
performance, and features, which provides the video needed by the majority of
Macintosh users at a reasonable price.<p>
<p>

<h3>
Supported Display Configurations</h3>
<p>
The Macintosh Quadra frame buffer determines what type of display is attached
to the video connector by examining the state of three sense line pins. The
following chart details how these three pins must be wired for each of the
supported display types. For each supported display, the screen resolution
(horizontal pixels x vertical pixels), dot clock frequency, and the vertical
and horizontal scan rates are listed.<p>
<p>
Basically, the Macintosh Quadra 700 and 900 support any display, whether from
Apple or from another vendor, that meets one of the following specifications:<p>

<b>Standard Sense Codes:</b>
<pre>
                    Sense pins    Hor x Vert     Dot      Vert     Horiz
Display              10  7   4      Pixels      Clock    Refrsh   Refrsh
-----------         -----------   ----------    -----    ------   ------

Apple 21S Color      0   0   0    1152 x 870     100       75      68.7

Apple Portrait       0   0   1     640 x 870    57.2832    75      68.9

12" Apple RGB        0   1   0     512 x 384    15.6672   60.15   24.48

Apple 2-Page Mono.   0   1   1    1152 x 870     100       75      68.7

NTSC                 1   0   0  underscan-512x384 12.2727  59.94   15.7
                     1   0   0  overscan- 640x480 12.2727  59.94   15.7
(To produce a color NTSC signal, an RGB-to-NTSC converter is required.)

12" Apple Monochrome 1   1   0     640 x 480     30.24     66.7    35.0

13" Apple RGB        1   1   0     640 x 480     30.24     66.7    35.0

Extended sense codes will be examined if the following sense code is detected:
                     1   1   1</pre><i><p>
Note 1 on above monitors: </i>A sense pin value of 0 means that the pin should
be grounded to the C&amp;VSYNC.GND signal; a value of 1 means do not connect
the pin.<p>
<i><p>
Note 2 on above monitors:</i> Sense pins 4, 7, and 10 are referred to as
SENSE0, SENSE1, and SENSE2 in pinout tables for the video connectors.<p>
<i><p>
Note 3:</i> The terms <i>underscan</i> and <i>overscan</i> are used to describe
the active video resolution for NTSC and PAL modes. <i>Underscan</i> means that
the active video area appears in a rectangle centered on the screen with a
black surrounding area. This ensures that the entire active video area always
is displayed on all monitors. <i>Overscan</i> utilizes the entire possible
video area for NTSC or PAL. However, most monitors or televisions will cause
some of this video to be lost beyond the edges of the display, so the entire
image will not be seen.<p><b>Extended Sense Codes:</b>
<i><p>
Note for extended sense codes:</i> A sense pin pair value of 0 means those pins
should be tied together (as opposed to grounding the pins to pin 11); a value
of 1 means do not connect the pins. Do <i>not</i> wire any of these pins to
ground.<p>

<pre>                   Sense pins    Hor x Vert      Dot      Vert     Horiz
Display           4-10 10-7 7-4    Pixels       Clock    Refrsh   Refrsh
-----------       -------------   ----------    -----    ------   ------

16" Color,
(i.e., E-Machines)  0   1    1     832 x 624    57.2832    75      49.7

PAL
PAL has two wiring options using the extended sense pin configuration. To produce a color PAL signal, an RGB-to-PAL converter is required.

PAL Option 1        0    0    0  underscan-640x480 14.75   50     15.625
                                 overscan-768x576  14.75   50     15.625

Note: This configuration does not presently doesn't support 24 bits per pixel.

PAL Option 2        1    1    0  underscan-640x480 14.75   50     15.625
                                 overscan-768x576  14.75   50     15.625

Note: This sense code also requires a diode between sense pins 10 and 7, with anode towards pin 7, cathode towards pin 10.


VGA                 1    0    1    640 x 480     25.175    59.95   31.47

SVGA                1    0    1    800 x 600       36        56    35.16
To enable SVGA, after configuring and connecting the monitor for VGA, open the Monitors control panel and select Options. Choose Super VGA from the dialog box and reboot your system.

No external monitor (video halted)
                    1    1    1</pre><p>
Here are the Macintosh Quadra video connector pinouts:<p>

<pre>Pin    Signal          Description
-----  -----------     ----------------------------------------
1      RED.GND         Red Video Ground
2      RED.VID         Red Video
3      CYSNC~          Composite Sync
4      MON.ID1         Monitor ID, Bit 1 (also known as SENSE0)
5      GRN.VID         Green Video
6      GRN.GND         Green Video Ground
7      MON.ID2         Monitor ID, Bit 2 (also known as SENSE1)
8      nc              (no connection)
9      BLU.VID         Blue Video
10     MON.ID3         Monitor ID, Bit 3 (also known as SENSE2)
11     C&amp;VSYNC.GND     CSYNC &amp; VSYNC Ground
12     VSYNC~          Vertical Sync
13     BLU.GND         Blue Video Ground
14     HSYNC.GND       HSYNC Ground
15     HSYNC~          Horizontal Sync
Shell  CHASSIS.GND     Chassis Ground</pre><p>
If your monitor is a VGA type, you can try the following cable pinouts:<p>

<pre>Macintosh Quadra                         VGA Connector
DB-15
-------------                           --------------

2  ------------------- Red Video ------------ 1
1  ------------------- Red Ground ----------- 6
9  ------------------- Blue Video ----------- 3
13 ------------------- Blue Ground ---------- 8
5  ------------------- Green Video ---------- 2
6  ------------------- Green Ground --------- 7
15 ------------------- Hsync ---------------- 13
12 ------------------- Vsync ---------------- 14
14 ------------------- Sync Ground ---------- 10
10 ------------------|
7  ------------------| Connect 7 and 10 so the sense pin ID will equal VGA</pre><p>
There are a few issues to keep in mind with VGA monitors:<p>
<p>
* VGA monitors will vary depending on the vendor. Check with the vendor about
Macintosh Quadra compatibility before buying, or better yet, actually try the
monitor with a Quadra to see if it works and if the quality is acceptable.<p>
<p>
* Vendors have different image quality specifications. There may be significant
differences between Apple monitors and the wide range of VGA monitors. Do a
side-by-side comparison of the monitors you are considering before buying.<p>
<p>
* Many third party cable vendors have off-the-shelf cables that should work.<p>
<p>
Most NTSC devices use an RCA-type phono-connector and the following diagram
uses that as a reference point. A cable wired as follows may allow many
different brands of NTSC monitors to work on a Macintosh Quadra. I would advise
you to test the monitor on a Macintosh Quadra prior to purchase to see if it
meets your expectations.<p>
<p>
Adjust the phono-connector side to whatever type of connector is used (RCA,
BNC, and so on). "Tip" is the pin in the center of the connector (the signal);
the sleeve is the flange around the outer edges of the connector (the chassis
ground).<p>

<pre>   Card Connector                     RCA-Type Phono-Connector
   --------------                     ------------------------
   4      MON.ID1  (sense0) --|
   7      MON.ID2  (sense1) --|
   11     C&amp;VSYNC.GND --------|

   5      GRN.VID  -----------------&gt; Tip (signal)
   Shell  CHASSIS.GND --------------&gt; Sleeve (ground)</pre><p>
By grounding pin 4 and pin 7 to pin 11, the Macintosh Quadra computers are told
that an NTSC monitor is attached. The actual black-and-white video signal is on
pin 5 and connects to the center (Tip) of the phono-plug. The shell of the card
connector connects to the sleeve of the phono-plug.<p>
<p>
To acquire a color NTSC signal from a Quadra (or any Apple Macintosh display
card), an RGB-to-NTSC converter is required, such as those available from
RasterOps, Truevision, and Computer Friends. Sorry, but I do not have the cable
requirements for any of these devices.<p>
<p>

<h3>
VRAM Configurations</h3>
<p>
The Quadra frame buffer supports a variety of pixel depths, from 1 to 32 bits
per pixel. The supported pixel depths (1, 2, 4, 8, or 32 bpp) depend on the
display resolution and the amount of VRAM in the Quadra. The fully expanded
capability of both Quadra machines is the same, that is, both the 900 and 700
can be expanded to 2 MB of VRAM. However, note that 512K of VRAM is the minimum
configuration for the Quadra 700 whereas it is 1 MB of VRAM for the Quadra 900
(this is the amount of VRAM soldered on the motherboard). The Quadra 700 has
six VRAM expansion slots, while the 900 has only four. Also note that only 0.5
MB, 1 MB, and 2 MB configurations are supported (that is, 1.5 MB is not
supported).<p>
<p>
The Quadra 700 and 900 can be expanded using 256K (that is, 128K x 16) 100 nS
VRAM SIMMs. These are the same as the VRAM SIMM shipped in the base
configuration of the Macintosh LC, or the VRAM SIMMs used to expand an Apple
4*8 video card to an 8*24 card. Note that the 512K VRAM SIMMs used to upgrade
the Macintosh LC will <i>not</i> work in a Quadra. (The 256K SIMMs removed from
an LC when performing a VRAM upgrade will work, however. All those old 256K
VRAM SIMMs laying around from upgraded Macintosh LCs can be used to upgrade
Macintosh Quadra 700s and 900s!) The DRAM SIMMs used to upgrade an 8*24GC video
card will also not work.<p>
<p>
The following chart lists the Macintosh Quadra 700 and 900 built-in video's
maximum pixel depth supported depending upon the VRAM configuration:<p>

<pre>Display size                        512K VRAM     1 MB VRAM    2 MB VRAM
                                    ---------     ---------    ---------
12-inch landscape
384 x 512
(such as 12" RGB)                    8 bpp         32 bpp       32 bpp

12-inch Monochrome
640 x 480                            8 bpp          8 bpp        8 bpp

13-inch RGB &amp; VGA
640 x 480                            8 bpp          8 bpp       32 bpp

SVGA
800 x 600                            8 bpp          8 bpp       32 bpp

15-inch Portrait (b/w)
640 x 870                            4 bpp          8 bpp        8 bpp

16" Color,
832 x 624                            8 bpp          8 bpp       32 bpp

2-Page Display (b/w)
1152 x 870                           4 bpp          8 bpp        8 bpp

21" Color
1152 x 870                           4 bpp          8 bpp        8 bpp

PAL without convolution
underscan-640x480                     8 bpp        8 bpp        32 bpp*
overscan-768x576                      8 bpp        8 bpp        32 bpp*

PAL with convolution
underscan-640x480                      n.a.        8 bpp         8 bpp
overscan-768x576                       n.a.        8 bpp         8 bpp

NTSC without convolution
underscan-512x384                     8 bpp        8 bpp        32 bpp
overscan- 640x480                     8 bpp        8 bpp        32 bpp

NTSC with convolution
underscan-512x384                     n.a          8 bpp         8 bpp
overscan- 640x480                     n.s          8 bpp         8 bpp</pre><p>
*Note that there are two ways to cable a PAL monitor to a Macintosh
Q&nbsp;uadra; only by using the proper extended sense code are you able to
achieve 32 bits per pixel. For details, refer to the previous section on Quadra
video sense pinouts.<BR><br><br><hr><center><a href="../../techsupport.shtml">Tech Support</a><br>
<a href="../../technotes.shtml">Technotes</a><br><a href="hw_25.html">Previous Technote</a> | <a href="hw-1.html">Contents</a> | <a href="hw_27.html">Next Technote</a></center><br><!--------------------------- Navigation Area ---------------------------------->
<!-- Navigation Area -->

<BR>

<CENTER>

<A HREF="/images/nav.gif.map">
<IMG SRC="../../../images/nav.gif" WIDTH="500" HEIGHT="32" 
BORDER="0"
ALT="Navigation graphic, see text links"
ISMAP
USEMAP="#nav"></A><BR>

<P>

<FONT SIZE=-1>
<A HREF="../../../devworld.shtml">Main</A> | 
<A HREF="../../technotes.shtml">Top of Section</A> | 
<A HREF="../../../devworld.shtml">What's New</A> | 
Apple Computer, Inc. |
<A HREF="../../../find.html">Find It</A> | 
<A HREF="../../../feedback.html">Feedback</A> | 
<A HREF="../../../help.html">Help</A></FONT><P>
</CENTER>
<!-- Don't forget to add the necessary links for each of these items. -->

<BR>

<MAP NAME="nav">
<!-- client side map for www.apple.com nav.gif -->
<!-- Main -->
<AREA SHAPE="RECT" COORDS="9,6,70,25" HREF="../../../devworld.shtml">
<!-- Page One -->
<AREA SHAPE="RECT" COORDS="80,6,142,25" HREF="../../technotes.shtml">
<!-- What's New -->
<AREA SHAPE="RECT" COORDS="150,5,211,25" HREF="../../../devworld.shtml">
<!-- Apple Logo -->
<AREA SHAPE="RECT" COORDS="220,6,280,25" HREF="http://www.apple.com/">
<!-- Find It -->
<AREA SHAPE="RECT" COORDS="290,5,350,26" HREF="../../../find.html">
<!-- Contact Us -->
<AREA SHAPE="RECT" COORDS="361,5,422,25" HREF="../../../feedback.html">
<!-- Help -->
<AREA SHAPE="RECT" COORDS="430,5,492,25" HREF="../../../help.html">
<!-- DEFAULT AREA NOT SUPPORTED BY CLIENT SIDE IMAGEMAPS! -->
</MAP>

</BODY>
</HTML>
<CENTER>This page was last modified on Wednesday, January 15 1997 10:59</CENTER>
--------------51F63A81ED5--