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

Re: Saving Double-hires screens



Apologies:  I cannot post to comp.sys.apple2.programmer from my newsreader 8-(

58black@cua.edu wrote:
:   Does anyone know how to save a double-hires graphic screen using the
: BSAVE command??

First of all, this is from memory, and my 128k ][e is not handy at the moment.

Second, let's make sure we've got the terminology
straight..."DOUBLE-HIRES" refers to the 560x192 hi-res mode which was
introduced with the second group of ][e's...the "Rev. B" motherboards.

In that case, the following tactic works from BASIC:
---TO SAVE A DOUBLE HI-RES IMAGE---
]BSAVE IMAGE.MAIN,A$2000,L$1FFB
]POKE -16299,0:REM *READ* from auxiliary memory
]BSAVE IMAGE.AUX,A$2000,L$1FFB

It MAY be necessary to do the POKE and the second BSAVE on the same line
to keep the input routine from unsetting the page2 switch, in which case
you can change the last two lines to...

]POKE -16299,0:PRINT CHR$(4);"BSAVE IMAGE.AUX,A$2000,L$1FFB"

---TO RECOVER A SAVED DOUBLE HI-RES IMAGE---
]PR#3:REM if you aren't already looking at the 80-column screen
]HGR:REM if you aren't already looking at the hi-res screen
]POKE -16290,0:REM in case you aren't already looking at DOUBLE hires
]BLOAD IMAGE.MAIN
  {at this point, the image will appear in columns on the screen}
]POKE -16299,0:POKE -16299,0:REM To WRITE to aux memory, you must hit the
switch twice!
]BLOAD IMAGE.AUX
  {at this point, the rest of the image should fill in the screen}
If the second half of the image writes itself over the first half, then
you need to turn the last instructions into a single line...

]POKE -16299,0:POKE -16299,0:PRINT CHR$(4);"BLOAD IMAGE.AUX"


A cleaner method is to write yourself an ASM program which will move all
of the auxiliary memory data from the DHR page onto HGR page 2.  Then you
can save it all with...

BSAVE ENCODED DHR IMAGE,A$2000,L$4000

Of course, in reloading you'll need to do a memory move from HGR page 2 to
DHR aux memory.  To be really suave about it, you write the memory mover
and store it just below the hi-res page, then BRUN the image to make it
automagically reconfigure itself.  I have some code around here to do just
that, but I don't know where I hid it 8-)  I might be convinced to dig it
out though...

--Dave Althoff, Jr.
-- 
    /-\        _       _               __ ***  .SIG NOW OPEN!!!!  ***
   /XXX\      /X\     /X\_      _     /XX\_      _     _        _____  
  /XXXXX\    /XXX\  _/XXXX\_   /X\   /XXXXX\    /X\   /X\      /XXXXX
_/XXXXXXX\__/XXXXX\/XXXXXXXX\_/XXX\_/XXXXXXX\__/XXX\_/XXX\_/\_/XXXXXX