Normal quotes
This commit is contained in:
parent
5e10794a24
commit
18011c595a
352 changed files with 6040 additions and 6040 deletions
20
28-01.md
20
28-01.md
|
|
@ -6,24 +6,24 @@ Chapter 28\
|
|||
Reading VGA Memory {#Heading1}
|
||||
-------------------
|
||||
|
||||
### Read Modes 0 and 1, and the Color Don’t Care Register {#Heading2}
|
||||
### Read Modes 0 and 1, and the Color Don't Care Register {#Heading2}
|
||||
|
||||
Well, it’s taken five chapters, but we’ve finally covered the data write
|
||||
path and all four write modes of the VGA. Now it’s time to tackle the
|
||||
VGA’s two read modes. While the read modes aren’t as complex as the
|
||||
write modes, they’re nothing to sneeze at. In particular, read mode 1
|
||||
Well, it's taken five chapters, but we've finally covered the data write
|
||||
path and all four write modes of the VGA. Now it's time to tackle the
|
||||
VGA's two read modes. While the read modes aren't as complex as the
|
||||
write modes, they're nothing to sneeze at. In particular, read mode 1
|
||||
(also known as color compare mode) is rather unusual and not at all
|
||||
intuitive.
|
||||
|
||||
You may well ask, isn’t *anything* about programming the VGA
|
||||
You may well ask, isn't *anything* about programming the VGA
|
||||
straightforward? Well...no. But then, clearing up the mysteries of VGA
|
||||
programming is what this part of the book is all about, so let’s get
|
||||
programming is what this part of the book is all about, so let's get
|
||||
started.
|
||||
|
||||
### Read Mode 0 {#Heading3}
|
||||
|
||||
Read mode 0 is actually relatively uncomplicated, given that you
|
||||
understand the four-plane nature of the VGA. (If you don’t understand
|
||||
understand the four-plane nature of the VGA. (If you don't understand
|
||||
the four-plane nature of the VGA, I strongly urge you to read Chapters
|
||||
23-27 before continuing with this chapter.) Read mode 0, the read mode
|
||||
counterpart of write mode 0, lets you read from one (and only one) plane
|
||||
|
|
@ -52,14 +52,14 @@ a time, so there are only four possible settings of the Read Map
|
|||
register: 0, 1, 2, or 3, to select reads from plane 0, 1, 2, or 3. In
|
||||
write mode 0, by contrast (in fact, in any write mode), any or all
|
||||
planes may be written to at once, since the byte written by the CPU can
|
||||
“fan out” to multiple planes. Consequently, there are not four but
|
||||
"fan out" to multiple planes. Consequently, there are not four but
|
||||
sixteen possible settings of the Map Mask register. The setting of the
|
||||
Map Mask register to write only to plane 0 is 1; to write only to plane
|
||||
1 is 2; to write only to plane 2 is 4; and to write only to plane 3 is
|
||||
8.
|
||||
|
||||
As you can see, the settings of the Read Map and Map Mask registers for
|
||||
accessing a given plane don’t match. The code in Listing 28.1
|
||||
accessing a given plane don't match. The code in Listing 28.1
|
||||
illustrates this. Listing 28.1 simply copies a sixteen-color image from
|
||||
system memory to VGA memory, one plane at a time, then animates by
|
||||
repeatedly copying the image back to system memory, again one plane at a
|
||||
|
|
|
|||
Loading…
Reference in a new issue