Remove colour attributes from body and strip most of the font tags out
This commit is contained in:
parent
7e957c0bb4
commit
c1f88ddb41
362 changed files with 1632 additions and 1706 deletions
13
48-01.html
13
48-01.html
|
|
@ -24,7 +24,7 @@
|
|||
<!--CHAPTER=48//-->
|
||||
<!--PAGES=895-900//-->
|
||||
<!--UNASSIGNED1//-->
|
||||
<!--UNASSIGNED2//--></HEAD><BODY LINK=#0000FF ALINK=#000099 VLINK=#0000FF BGCOLOR=#FFFFFF>
|
||||
<!--UNASSIGNED2//--></HEAD><body>
|
||||
|
||||
<CENTER>
|
||||
<TABLE BORDER>
|
||||
|
|
@ -36,17 +36,16 @@
|
|||
</TABLE>
|
||||
</CENTER>
|
||||
<P><BR></P>
|
||||
<H2><A NAME="Heading1"></A><FONT COLOR="#000077">Chapter 48<BR>Mode X Marks the Latch
|
||||
</FONT></H2>
|
||||
<H3><A NAME="Heading2"></A><FONT COLOR="#000077">The Internals of Animation’s Best Video Display Mode</FONT></H3>
|
||||
<H2><A NAME="Heading1"></A>Chapter 48<BR>Mode X Marks the Latch</H2>
|
||||
<H3><A NAME="Heading2"></A>The Internals of Animation’s Best Video Display Mode</H3>
|
||||
<P>In the previous chapter, I introduced you to what I call Mode X, an undocumented 320x240 256-color mode of the VGA. Mode X is distinguished from mode 13H, the documented 320x200 256-color VGA mode, in that it supports page flipping, makes off-screen memory available, has square pixels, and, above all, lets you use the VGA’s hardware to increase performance by as much as four times. (Of course, those four times come at the cost of more complex and demanding programming, to be sure—but end users care about results, not how hard the code was to write, and Mode X delivers results in a big way.) In the previous chapter we saw how the VGA’s plane-oriented hardware can be used to speed solid fills. That’s a nice technique, but now we’re going to move up to the big guns—the VGA latches.
|
||||
</P>
|
||||
<P>The VGA has four latches, one for each plane of display memory. Each latch stores exactly one byte, and that byte is always the last byte read from the corresponding plane of display memory, as shown in Figure 48.1. Furthermore, whenever a given address in display memory is read, all four planes’ bytes at that address are read and stored in the corresponding latches, regardless of which plane supplied the byte returned to the CPU (as determined by the Read Map register). As with so much else about the VGA, the above will make little sense to VGA neophytes, but the important point is this: By reading one display memory byte, 4 bytes—one from each plane—can be loaded into the latches at once. Any or all of those 4 bytes can then be written anywhere in display memory with a single byte-sized write, as shown in Figure 48.2.</P>
|
||||
<P><A NAME="Fig1"><!-- </A><A HREF="javascript:displayWindow('images/48-01.jpg',411,234 )"> --><IMG SRC="images/48-01.jpg"><BR><!-- </A>
|
||||
<BR><A HREF="javascript:displayWindow('images/48-01.jpg',411,234)"> --><FONT COLOR="#000077"><B>Figure 48.1</B></FONT></A> <I>How the VGA latches are loaded.</I>
|
||||
<BR><A HREF="javascript:displayWindow('images/48-01.jpg',411,234)"> --><B>Figure 48.1</B></A> <I>How the VGA latches are loaded.</I>
|
||||
</P>
|
||||
<P><A NAME="Fig2"><!-- </A><A HREF="javascript:displayWindow('images/48-02.jpg',408,245 )"> --><IMG SRC="images/48-02.jpg"><BR><!-- </A>
|
||||
<BR><A HREF="javascript:displayWindow('images/48-02.jpg',408,245)"> --><FONT COLOR="#000077"><B>Figure 48.2</B></FONT></A> <I>Writing 4 bytes to display memory in a single operation.</I>
|
||||
<BR><A HREF="javascript:displayWindow('images/48-02.jpg',408,245)"> --><B>Figure 48.2</B></A> <I>Writing 4 bytes to display memory in a single operation.</I>
|
||||
</P>
|
||||
<P>The upshot is that the latches make it possible to copy data around from one part of display memory to another, 32 bits (four pixels) at a time—four times as fast as normal. (Recall from the previous chapter that in Mode X, pixels are stored one per byte, with four pixels in a row stored in successive planes at the same address, one pixel per plane.) However, any one latch can only be loaded from and written to the corresponding plane, so an individual latch can only work with every fourth pixel on the screen; the latch for plane 0 can work with pixels 0, 4, 8..., the latch for plane 1 with pixels 1, 5, 9..., and so on.
|
||||
</P>
|
||||
|
|
@ -114,7 +113,7 @@ void main() {
|
|||
|
||||
<hr width="90%" size="1" noshade>
|
||||
<div align="center">
|
||||
<font face="Verdana,sans-serif" size="1">Graphics Programming Black Book © 2001 Michael Abrash</font>
|
||||
Graphics Programming Black Book © 2001 Michael Abrash
|
||||
</div>
|
||||
<!-- all of the reference materials (books) have the footer and subfoot reveresed -->
|
||||
<!-- reference_subfoot = footer -->
|
||||
|
|
|
|||
Loading…
Reference in a new issue