>From memory, it all starts at 16384 (directly after the Spectrum ROM); it's
all the pixels first, then all the attributes (so, attributes start at
16384+6144). Attributes and individual scan lines are linear, but the scan
lines are stored in a peculiar order - it's the first, then the ninth, then
the seventeenth, etc, until you get to the 56th, then you hop back up to do
the 2nd, the 10th, etc. The 64th comes after the 63rd, then the relative
offsets repeat.

So, putting it another way: cut the screen into three portions, each of 8
character rows. Each of those is stored so that it's all the first lines of
the character rows, then all the second, etc. When you've filled in all the
pixels, move to the next set of character lines.

Which, thinking extemporaneously, I guess means that the lowest three bits
and the three bits next to them are exchanged.

Watch a Spectrum game loading for a live demonstration of byte order. The
lines will fill in, in the order I've tried poorly to describe three times,
then finally the colours. The data is just being pushed into memory in
linear order.

On 24 Apr 2011, at 20:44, Andrew Park <alp...@ntlworld.com> wrote:

I can’t remember for the life of me how mode 1 is mapped out where is the
start address of the screen and where is the attribute data stored



Andy

Reply via email to