Normal quotes
This commit is contained in:
parent
5e10794a24
commit
18011c595a
352 changed files with 6040 additions and 6040 deletions
18
26-01.md
18
26-01.md
|
|
@ -8,8 +8,8 @@ Chapter 26\
|
|||
|
||||
### The Write Mode That Grows on You {#Heading2}
|
||||
|
||||
Over the last three chapters, we’ve covered the VGA’s write path from
|
||||
stem to stern—with one exception. Thus far, we’ve only looked at how
|
||||
Over the last three chapters, we've covered the VGA's write path from
|
||||
stem to stern—with one exception. Thus far, we've only looked at how
|
||||
writes work in write mode 0, the straightforward, workhorse mode in
|
||||
which each byte that the CPU writes to display memory fans out across
|
||||
the four planes. (Actually, we also took a quick look at write mode 1,
|
||||
|
|
@ -17,9 +17,9 @@ in which the latches are always copied unmodified, but since exactly the
|
|||
same result can be achieved by setting the Bit Mask register to 0 in
|
||||
write mode 0, write mode 1 is of little real significance.)
|
||||
|
||||
Write mode 0 is a very useful mode, but some of VGA’s most interesting
|
||||
Write mode 0 is a very useful mode, but some of VGA's most interesting
|
||||
capabilities involve the two write modes that we have yet to examine:
|
||||
write mode 1, and, especially, write mode 3. We’ll get to write mode 1
|
||||
write mode 1, and, especially, write mode 3. We'll get to write mode 1
|
||||
in the next chapter, but right now I want to focus on write mode 3,
|
||||
which can be confusing at first, but turns out to be quite a bit more
|
||||
powerful than one might initially think.
|
||||
|
|
@ -36,25 +36,25 @@ estimation. In fact, my esteem for this mode ultimately reached the
|
|||
point where in the last major chunk of 16-color graphics code I wrote,
|
||||
write mode 3 was used more than write mode 0 overall, excluding simple
|
||||
pixel copying. So write mode 3 is well worth using, but to use it you
|
||||
must first understand it. Here’s how it works.
|
||||
must first understand it. Here's how it works.
|
||||
|
||||
In write mode 3, set/reset is automatically enabled for all four planes
|
||||
(the Enable Set/Reset register is ignored). The CPU data byte is rotated
|
||||
and then ANDed with the contents of the Bit Mask register, and the
|
||||
result of this operation is used as the contents of the Bit Mask
|
||||
register alone would normally be used. (If this is Greek to you, have a
|
||||
look back at Chapters 23 through 25. There’s no way to understand write
|
||||
mode 3 without understanding the rest of the VGA’s write data path
|
||||
look back at Chapters 23 through 25. There's no way to understand write
|
||||
mode 3 without understanding the rest of the VGA's write data path
|
||||
first.)
|
||||
|
||||
That’s what write mode 3 does—but what is it *for?* It turns out that
|
||||
That's what write mode 3 does—but what is it *for?* It turns out that
|
||||
write mode 3 is excellent for a surprisingly large number of purposes,
|
||||
because it makes it possible to avoid the bane of VGA performance,
|
||||
**OUT**s. Some uses for write mode 3 include lines, circles, and solid
|
||||
and two-color pattern fills. Most importantly, write mode 3 is ideal for
|
||||
transparent text; that is, it makes it possible to draw text in 16-color
|
||||
graphics mode quickly without wiping out the background in the process.
|
||||
(As we’ll see at the end of this chapter, write mode 3 is potentially
|
||||
(As we'll see at the end of this chapter, write mode 3 is potentially
|
||||
terrific for opaque text—text drawn with the character box filled in
|
||||
with a solid color—as well.)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue