[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Crosspost: Did the cpu influence the display?
Mike Wynne wrote:
> I believe the Spectrum display memory is arranged as it is to simplify the
> hardware design and save silicon space inside the ULA. This has nothing at
> all to do with taking advantage of register pairs and such like (That is
> probably just a side effect of the design). Spectrum display memory is
> arranged so that only one counter is needed to fetch both bitmap and
> attribute with a simple 2-to-1 line decoder selecting which.
Nope, have to agree with Darren -- the display organization
looks like it was organized to speed up character printing
to me.
Here's the 13 bit counter used to iterate through the
32x192 pixel bytes (8 pixels per byte):
A BCDE FGHI JKLM
The Spectrum generates 16-bit pixel data address
from this:
010A BFGH CDEI JKLM
and attribute address from this:
0101 10AB CDEI JKLM
As Darren mentiones, this allows for fast
character printing.
But I do not believe this is a coincidence because
there are 12! possible display arrangements using
a 13 bit counter and 32x192 pixel resolution without
causing any holes in the memory organization.
Here's a possibly useful alternative that seems much
more straightforward than the one chosen by
Mr. Altwasser:
pixel address from:
010A BCDE FGHI JKLM
attributes from:
0101 10AB CDEI JKLM
If this arrangement were used, pixel
bytes 0..31 would be at offesets 0..31,
pixel bytes 32..63 would be at offsets
32..63, etc. IE the pixel display is
stored left to right, top to bottom with
incrementing downward one pixel achieved
by adding 32 to the display address,
and moving right 8 pixels (one pixel byte)
achieved by adding one to the display address.
No screwy organization as seen on the
Spectrum.
Attributes would map as expected, left to
right, top to bottom one attribute for each
8x8 pixel group.
I think fast character printing was pretty much
essential for the Spectrum, given its built in
editor liked to erase the screen and redisplay
listings frequently.
Alvin