[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Create Text & High Resolution into Screen
- Subject: Re: Create Text & High Resolution into Screen
- From: mjmahon@aol.com (Michael J. Mahon)
- Date: 13 Sep 2003 08:33:23 GMT
- Newsgroups: comp.sys.apple2
- Organization: AOL http://www.aol.com
- References: <vcw8b.5568$z32.4671@twister.austin.rr.com>
- Xref: archiver1.google.com comp.sys.apple2:34876
Bryan Parkoff wrote:
> I understand that every 6502's half cycle reads $400-$7FF for Text Mode
>and $2000-$3FFF for HGR Mode before second half cycle paints 14 pixels to
>the screen. I think that Text Mode has to paint 56 pixels (7x8) to the
>screen each Text character during every second half cycle, but only 14
>pixels will be painted for HGR Mode. Do you see the difference between 56
>pixels and 14 pixels?
> Read $400-$7FF and $2000-$3FFF will do to paint 56 pixels and 14 pixels
>(every time until 64 times) or (64 times) (64 cycles out of 65 cycles) What
>happen if it reaches to 65 out of 65 cycles)? Will it reset back to 0 out
>of 65 cycles to start over to repeat from the beginning?
Actually, one byte (two bytes for 80 columns or DHR) is read each cycle,
during the half-cycle that the processor does not access memory.
During the _entire_ cycle, that byte (two bytes) is shifted out to form
7 (or 14) pixels in the current horizontal line. (BTW, Apple II
characters are 5x7 pixels in a 7x8 matrix--that's 5 character pixels
per scan line plus 2 background pixels, for character spacing, and
seven lines with font data followed by a black line for line spacing.)
Since the characters are painted line-by-line, only 7 pixels per
character need to be painted in each cycle (for 40 columns) or
14 pixels (for 80 columns)--thus, 280 or 560 pixels per line.
Since the active scan line is only 40 cycles per line (the rest of the
line is blanked), it doesn't matter to the display what data is read
during the 15 cycles of horizontal blanking. (Some clever code
can determine what data is read during these "invisible" refresh
cycles, and use it to synchronize processor execution with the
video generator.)
It is important that the video generator continue to cycle through
a range of memory addresses that ensures that the DRAM refresh
period is met. One of the clever things about the Apple II is that
"video refresh" is organized so that it also accomplishes "DRAM
refresh". This is what accounts for the "unusual" mapping of
text page addressed to screen positions and hi-res addresses
to screen positions.
-michael
Check out amazing quality sound for 8-bit Apples on my
Home page: http://members.aol.com/MJMahon/