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

@ -13,20 +13,20 @@ clocks on board, and one of those clocks is just sufficiently faster
than the other clock so that an extra 80 (or 40) pixels can be displayed
on each scan line.
In other words, there’s a slow clock (about 25 MHz) that’s usually used
In other words, there's a slow clock (about 25 MHz) that's usually used
in graphics modes to get 640 (or 320) pixels on the screen during each
scan line, and a second, fast clock (about 28 MHz) that’s usually used
scan line, and a second, fast clock (about 28 MHz) that's usually used
in text modes to crank out 720 (or 360) pixels per scan line. In
particular, 320x400 256-color mode uses the 25 MHz clock.
I’ll bet that you can see where I’m headed: We can switch from the 25
I'll bet that you can see where I'm headed: We can switch from the 25
MHz clock to the 28 MHz clock in 320x480 256mode in order to get more
pixels. It takes two clocks to produce one 256-color pixel, so we’ll get
pixels. It takes two clocks to produce one 256-color pixel, so we'll get
40 rather than 80 extra pixels by doing this, bringing our horizontal
resolution to the desired 360 pixels.
Switching horizontal resolutions sounds easy, doesn’t it? Alas, it’s
not. There’s no standard VGA mode that uses the 28 MHz clock to draw 8
Switching horizontal resolutions sounds easy, doesn't it? Alas, it's
not. There's no standard VGA mode that uses the 28 MHz clock to draw 8
rather than 9 dots per character, so the timing parameters have to be
calculated from scratch. John Bridges has already done that for us, but
I want you to appreciate that producing this mode took some work. The
@ -38,7 +38,7 @@ next, and the clock speed all have to be altered in order to set up
does all that, and sets up the registers that control vertical
resolution, as well.
Once all that’s done, the VGA is in 360x480 mode, awaiting our every
Once all that's done, the VGA is in 360x480 mode, awaiting our every
high-resolution 256-color graphics whim.
#### Accessing Display Memory in 360x480 256-Color Mode {#Heading8}
@ -80,25 +80,25 @@ The other programming difference between the two modes is that the area
of display memory mapped to the screen is longer in 360x480 256-color
mode, which is only common sense given that there are more pixels in
that mode. The exact amount of memory required in 360x480 256-color mode
is 360 times 480 = 172,800 bytes. That’s more than half of the VGA’s 256
Kb memory complement, so page-flipping is out; however, there’s no
reason you couldn’t use that extra memory to create a virtual screen
is 360 times 480 = 172,800 bytes. That's more than half of the VGA's 256
Kb memory complement, so page-flipping is out; however, there's no
reason you couldn't use that extra memory to create a virtual screen
larger than 360x480, around which you could then scroll, if you wish.
That’s really all there is to drawing in 360x480 256-color mode. From a
That's really all there is to drawing in 360x480 256-color mode. From a
programming perspective, this mode is no more complicated than 320x400
256-color mode once the mode set is completed, and should be capable of
good performance given some clever coding. It’s not particular
good performance given some clever coding. It's not particular
straightforward to implement bitblt, block move, or fast line-drawing
code for any of the extended 256-color modes, but it can be done—and
it’s worth the trouble. Even the small taste we’ve gotten of the
it's worth the trouble. Even the small taste we've gotten of the
capabilities of these modes shows that they put the traditional CGA,
EGA, and generally even VGA modes to shame.
![](images/32-01.jpg)\
**Figure 32.1**  *Pixel organization in 360x480 256-color mode.*
There’s more and better to come, though; in later chapters, we’ll return
There's more and better to come, though; in later chapters, we'll return
to high-resolution 256-color programming in a big way, by exploring the
tremendous potential of these modes for real time 2-D and 3-D animation.