[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Double-Width HiRes
Jon Bettencourt writes ...
>
> I need a way to turn on Double-Width Hi-Res graphics and BLOAD a 16K file
> onto the screen. The first 8K of the file goes in page 1 of hi-res
> graphics in the main memory, the other 8K of the file goes in page 1 of
> hi-res graphics in the auxilary memory. Regular BLOADing results in the
> first 8K in page 1, and the remaining 8K in page 2. Or maybe a program to
> transfer page 2 of main memory hi-res to page 1 of auxilary memory hi-res
> would be easier.
>
> I'm thinking maybe a temp file:
>
> <make sure we are writing to main memory>
> BLOAD "sixteen.k.file",A8192
> BSAVE "TEMP.HIRES",A16384,L8192
> <switch writing to auxilary memory>
> BLOAD "TEMP.HIRES",A8192
> DELETE "TEMP.HIRES"
> <switch back to main memory>
>
> The only problems with that are, I can't remember the PEEK/POKEs to switch
> between memory, and it won't work on a locked or full disk. I'll look in
> my files to see if I can find the PEEK/POKEs.
>
....
There is a listing of PEEKs and POKEs at
http://home.swbell.net/rubywand/Csa2APPLICS.html#005 .
The standard format for a DHR (double-hires) pic separates the parts that go
into each bank. When a regular unpacked DHR pic file is loaded at, say, $2000:
the Aux bank part is in $2000-$3FFF
the Main bank part is in $4000-$5FFF.
All of this is, naturally, in Main bank memory.
To display the above pic in 'DHR page 1', you move $2000-$3FFF from Main bank
to $2000-$3FFF in Aux bank. Then, you move $4000-$5FFF in Main bank to $2000-$3FFF
in Main bank and turn ON the display with softswitches.
There is a simple display program named "DO.GRP" which you can look at on the
PDUTIL.DSK disk image (also on PDUTIL.SDK a ShrinkIt whole-disk file) on Ground at
ftp://ground.ecn.uiowa.edu/apple2/useful.stuff/Disks/ .
The BASIC program includes a binary part (DO.DHR.BIN) which includes the move
routines. You can BLOAD the binary file and get a disassm listing in the monitor
to see how the routines work.
Rubywand