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,28 +4,28 @@
#### Knowing When to Flip {#Heading8 align="center"}
There’s a hitch, though, and that hitch is knowing exactly when it is
that the page has flipped. The page doesn’t flip the instant that you
There's a hitch, though, and that hitch is knowing exactly when it is
that the page has flipped. The page doesn't flip the instant that you
set the Start Address registers. The VGA loads the starting offset from
the Start Address registers once before starting each frame, then pays
those registers no nevermind until the next frame comes around. This
means that you can set the Start Address registers whenever you want—but
the page actually being displayed doesn’t change until after the VGA
the page actually being displayed doesn't change until after the VGA
loads that new offset in preparation for the next frame.
The potential problem should be obvious. Suppose that page 1 is being
displayed, and you’re updating page 0. You finish drawing to page 0, set
displayed, and you're updating page 0. You finish drawing to page 0, set
the Start Address registers to 0 to switch to displaying page 0, and
start updating page 1, which is no longer displayed. Or is it? If the
VGA was in the middle of the current frame, displaying page 1, when you
set the Start Address registers, then page 1 is going to be displayed
for the rest of the frame, no matter what you do with the Start Address
registers. If you start updating page 1 right away, any changes you make
may well show up on the screen, because page 0 hasn’t yet flipped to
may well show up on the screen, because page 0 hasn't yet flipped to
being displayed in place of page 1—and that defeats the whole purpose of
page flipping.
To avoid this problem, it is mandatory that you wait until you’re sure
To avoid this problem, it is mandatory that you wait until you're sure
the page has flipped. The Start Address registers are, according to my
tests, loaded at the start of the Vertical Sync signal, although that
may not be the case with all VGA clones. The Vertical Sync status is
@ -42,14 +42,14 @@ Start Address High value for one page would be mixed with the Start
Address Low value for the other page, and, depending on the start
address values, the whole screen could appear to shift any number of
pixels for a single, horrible frame. *This must never happen!* The
solution is to set the Start Address registers when you’re certain
solution is to set the Start Address registers when you're certain
Vertical Sync is not about to start. The easiest way to know that is to
check for the Display Enable status (bit 0 of the Input Status 1
register) being active; that means that bitmap-controlled pixels are
being scanned onto the screen, and, since Vertical Sync happens in the
middle of the vertical non-display portion of the frame, Vertical Sync
can never be anywhere nearby if Display Enable is active. (Note that one
good alternative is to set up both pages with a start address that’s a
good alternative is to set up both pages with a start address that's a
multiple of 256, and just change the Start Address High register and
wait for Vertical Sync, with no Display Enable wait required.)
@ -69,20 +69,20 @@ farther each time and the like) if updates are happening too slowly.
#### Enter the Split Screen {#Heading9}
So far, I’ve discussed page flipping in 640x350 mode. There’s a reason
So far, I've discussed page flipping in 640x350 mode. There's a reason
for that: 640x350 is the highest-resolution standard mode in which
there’s enough display memory for two full pages on a standard VGA. It’s
there's enough display memory for two full pages on a standard VGA. It's
possible to program the VGA to a non-standard 640x400 mode and still
have two full pages, but that’s pretty much the limit. One 640x480 page
takes 38,400 bytes of display memory, and clearly there isn’t enough
have two full pages, but that's pretty much the limit. One 640x480 page
takes 38,400 bytes of display memory, and clearly there isn't enough
room in 64 K of display memory for two of *those* monster pages.
And yet, 640x480 is a wonderful mode in many ways. It offers a 1:1
aspect ratio (square pixels), and it provides by far the best resolution
of any 16-color mode. Surely there’s *some* way to bring the visual
of any 16-color mode. Surely there's *some* way to bring the visual
appeal of page flipping to this mode?
Surely there is—but it’s an odd solution indeed. The VGA has a feature,
Surely there is—but it's an odd solution indeed. The VGA has a feature,
known as the *split screen,* that allows you to force the offset from
which the VGA fetches video data back to 0 after any desired scan line.
For example, you can program the VGA to scan through display memory as
@ -119,12 +119,12 @@ flipping gives you the best combination of square pixels and high
resolution possible on a standard VGA.
So. Is VGA animation worth all the fuss? *Mais oui.* Run the sample
program; if you’ve never seen aggressive VGA animation before, you’ll be
program; if you've never seen aggressive VGA animation before, you'll be
amazed at how smooth it can be. Not every square millimeter of every
animated screen must be in constant motion. Most graphics screens need a
little quiet space to display scores, coordinates, file names, or (if
all else fails) company logos. If you don’t tell the user he’s/she’s
only getting 339 scan lines of animation, he’ll/she’ll probably never
all else fails) company logos. If you don't tell the user he's/she's
only getting 339 scan lines of animation, he'll/she'll probably never
know.
------------------------ --------------------------------- --------------------