Normal quotes

This commit is contained in:
James Gregory 2013-12-30 18:34:31 +11:00
commit 18011c595a
352 changed files with 6040 additions and 6040 deletions

View file

@ -4,25 +4,25 @@
Yet another and somewhat odder workaround is that of using only 128 DAC
locations and page flipping. (Page flipping in 256-color modes involves
using the VGA’s undocumented 256-color modes; see Chapters 31, 43, and
47 for details.) In this mode of operation, you’d first display page 0,
which is drawn entirely with colors 0-127. Then you’d draw page 1 to
using the VGA's undocumented 256-color modes; see Chapters 31, 43, and
47 for details.) In this mode of operation, you'd first display page 0,
which is drawn entirely with colors 0-127. Then you'd draw page 1 to
look just like page 0, except that colors 128-255 are used instead.
You’d load DAC locations 128-255 with the next cycle settings for the
128 colors you’re using, then you’d switch to display the second page
You'd load DAC locations 128-255 with the next cycle settings for the
128 colors you're using, then you'd switch to display the second page
with the new colors. Then you could modify page 0 as needed, drawing in
colors 0-127, load DAC locations 0-127 with the next color cycle
settings, and flip back to page 0.
The idea is that you modify only those DAC locations that are not used
to display any pixels on the current screen. The advantage of this is
*not*, as you might think, that you don’t generate garbage on the screen
*not*, as you might think, that you don't generate garbage on the screen
when modifying undisplayed DAC locations; in fact, you do, for a spot of
interference will show up if you set a DAC location, displayed or not,
during display time. No, you still have to wait for vertical sync and
load only during vertical blanking before loading the DAC when page
flipping with 128 colors; the advantage is that since none of the DAC
locations you’re modifying is currently displayed, you can spread the
locations you're modifying is currently displayed, you can spread the
loading out over two or more vertical blanking periods—however long it
takes. If you did this without the 128-color page flipping, you might
get odd on-screen effects as some of the colors changed after one frame,
@ -36,16 +36,16 @@ on-screen colors by cycling colors *as a frame is displayed*, so that
the color set changes from scan line to scan line down the screen.
The possibilities are endless. However, were I to be writing 256-color
software that used color cycling, I’d find out how many colors could be
software that used color cycling, I'd find out how many colors could be
cycled after the start of vertical sync on the slowest computer I
expected the software to run on, I’d lop off at least 10 percent for a
safety margin, and I’d structure my program so that no color cycling set
expected the software to run on, I'd lop off at least 10 percent for a
safety margin, and I'd structure my program so that no color cycling set
exceeded that size, interleaving several color cycling sets if
necessary.
That’s what *I’d* do. Don’t let yourself be held back by my limited
That's what *I'd* do. Don't let yourself be held back by my limited
imagination, though! Color cycling may be the most complicated of all
the color control techniques, but it’s also the most powerful.
the color control techniques, but it's also the most powerful.
### Odds and Ends {#Heading9}
@ -54,7 +54,7 @@ loading the DAC, the Write Index register wraps back from 255 to 0, and
likewise when you load a block of registers through the BIOS. So far as
I know, this is a characteristic of the hardware, and should be
consistent; also, Richard Wilton documents this behavior for the BIOS in
the VGA bible, *Programmer’s Guide to PC Video Systems, Second Edition*
the VGA bible, *Programmer's Guide to PC Video Systems, Second Edition*
(Microsoft Press), so you should be able to count on it. Not that I see
that DAC index wrapping is especially useful, but it never hurts to
understand exactly how your resources behave, and I never know when one
@ -63,7 +63,7 @@ quirk.
#### The DAC Mask {#Heading10}
There’s one register in the DAC that I haven’t mentioned yet, the DAC
There's one register in the DAC that I haven't mentioned yet, the DAC
Mask register at 03C6H. The operation of this register is simple but
powerful; it can mask off any or all of the 8 bits of pixel information
coming into the DAC from the VGA. Whenever a bit of the DAC Mask
@ -83,7 +83,7 @@ The DAC can be read directly, via the DAC Read Index register at 3C7H
and the DAC Data register at 3C9H, in much the same way as it can be
written directly by way of the DAC Write Index register—complete with
autoincrementing the DAC Read Index register after every three reads.
Everything I’ve said about writing to the DAC applies to reading from
Everything I've said about writing to the DAC applies to reading from
the DAC. In fact, reading from the DAC can even cause snow, just as
loading the DAC does, so it should ideally be performed during vertical
blanking.
@ -113,12 +113,12 @@ very much symmetric with setting the DAC.
And so, at long last, we come to the end of our discussion of color
control on the VGA. If it has been more complex than anyone might have
imagined, it has also been most rewarding. There’s as much obscure but
imagined, it has also been most rewarding. There's as much obscure but
very real potential in color control as there is anywhere on the VGA,
which is to say that there’s a very great deal of potential indeed. Put
which is to say that there's a very great deal of potential indeed. Put
color cycling or color paging together with the page flipping and image
drawing techniques explored elsewhere in this book, and you’ll leave the
audience gasping and wondering “How the heck did they *do* that?”
drawing techniques explored elsewhere in this book, and you'll leave the
audience gasping and wondering "How the heck did they *do* that?"
------------------------ --------------------------------- --------------------
[Previous](34-04.html) [Table of Contents](index.html) [Next](35-01.html)