[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Apple II graphics
In article <35ae4949.812472@news.bconnex.net>,
Jeff Blakeney <CUTjefbla@bconnex.net> wrote:
>On 16 Jul 1998 04:55:55 GMT, supertimer@aol.com (Supertimer) wrote:
>>[program that loads hires graphics from /RAM snipped to save space]
>However, I believe there was a suggestion to use Double Hi-Res
>graphics which makes things a little more difficult because DHR
>graphics use twice as much drive space. This means it will take twice
>as long to load the image from disk and it will also take longer to
>display because you need to load one hi-res page, move it into Aux
>memory then load the second hi-res page and display the DHR screen.
If you want to do this, there is one very important point that you
need to consider first. Using /RAM and DHR at the same time is a little
tricky, since the second half of the DHR screen sits right smack in the middle
of the memory used by /RAM. If you don't take this fact into account,
loading an image from /RAM into the DHR screen will clobber part of /RAM,
perhaps even the file you're trying to load from.
Fortunately it's not too hard to protect against this disaster. Starting
with a virgin (empty) /RAM, use the following command:
BSAVE /RAM/RESERVED,A8192,L8192
This guarantees that no other file on /RAM will occupy the second half of
the DHR buffer. The drawback, of course, is that you loose 17 blocks
of /RAM space...there's no good way to avoid that.
>Also, there is no page 2 for DHR graphics so you can't load the second
>image into page two, display it, then load the next image into page 1,
>display and so on.
Actually, there *is* a DHR page 2 (and also an 80-column text page 2, and
a double-lores page 2). But using it is a pain in the butt--it doesn't
bank-switch with $C054/$C055 like page 1 does, so drawing into the auxiliary
half of DHR page 2 is a lot harder than it is on page 1. Additionally,
displaying DHR page 2 requires setting the soft switches to a state that
the ROMs *hate*, and will disable whenever they get a chance--if you're
showing DHR page 2, and try to PRINT or INPUT or GET anything, page 2 will
be disabled, and page 1 will be displayed.
If you want to use DHR page 2 and /RAM at the same time, you'll need to
reserve space for it, just like you did with page 1. Immediately after
executing the above BSAVE command, do it again:
BSAVE /RAM/RESERVED2,A8192,L8192
This protects DHR page 2, at the cost of another 17 blocks of /RAM.
- Neil Parker
(P.S. Ahh, it's good to be back...sort of. I see we're still fighting
the same useless flame wars as when I left a couple of months ago...)
--
Neil Parker, nparker@inferno.uoregon.edu, nparker@axis.llx.com,
http://axis.llx.com/~nparker/ (Note new addresses and home page!)
Unsolicited commercial e-mail is not welcome, and will be discarded unread.