[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Super Hi Res Stuff



adri0001@student.tc.umn.edu (Wouldn't you like to know) writes:

>This continued until someone told me that I needed to flip the SHR screen on
>first...then clear it.  I am doing that now and it's working.  The only problem
>is that you can see what was on the SHR screen before and that makes for a
>rough transition.  Just a split-second before the SHR screen comes up, it's

When you turn on SHR via setting the hi bit of $C029, the correlation of
memory addresses to physical RAM storage cells in banks $E0-E1 changes. This
is why clearing first didn't work right, and clearing afterward did. This
changed memory map is called the "linear" memory map because it must be used
when storing pixels according to the linear memory layout of SHR.

What it _actually_ does is skew things so that the video hardware can read 16
bits in one shot out of all four DRAMs and have the two bytes be adjacent to
each other in linear memory rather than be main/auxiliary bytes at the same
address. (This is done for bandwidth reasons -- ever wonder how SHR manages to
read FOUR bytes every microsecond? Two 16 bit accesses using DRAM page mode.)

To get the SHR memory map without displaying SHR, set the next highest bit
in $C029 (i.e. LDA #$40; TSB $C029). DO NOT use DHR with this bit set because
the memory map change affects DHR as well, and Apple says DON'T DO IT in the
tech manuals.

Setting the high bit of $C029 overrides the setting of the next highest bit,
so feel free to leave the #$40 bit on while your program runs (especially if
you need to switch in and out of SHR a lot!). Just make sure you clear it
when you are all done using SHR mode. This may not be strictly required, but
it is good programming practice to act as if it were.

Todd Whitesel
toddpw @ cco.caltech.edu