[comp.sys.apple] screen memory question

mdavis@seismo.css.gov@pro-sol.UCSD.EDU (Morgan Davis) (12/10/86)

Steve Hawley:

You're basically correct in your description of the 80-column memory scheme,
however the second 40-column bank doesn't reside at $800-$bff as stated.
This would have been nice, but would have made the Apple IIe incompatible with
Applesoft BASIC from the Apple II+ since Applesoft starts your programs at
$800.  A lot of other non-BASIC software would also be incompatible.

Your reference to the "extra bank" from the extended RAM card is more on the
money -- however, the card need not be the "extended RAM" type.  The original
Apple IIe AUX slot card was only for providing the extra 40-column bank -- no
other memory was provided.

Lastly, your comments about screen holes are perfect.  And a floppy drive will
indeed make some raspy sounds if you screw with just the right screen holes.

(Didn't want to pick your message apart, but just wanted to make sure nobody
got confused with the $800-$bff part).

mdavis@seismo.css.gov@pro-sol.UCSD.EDU (Morgan Davis) (12/10/86)

WHOA!  STOP!

Someone suggested using BSAVE's and BLOAD's to save and restore video memory.
That works fine for graphics images, but you CANNOT do such a thing with text
video RAM.  (well, you can, but it might really fry your system).

In an earlier message, I talked about "screen holes" in the video display
memory between $400 - $7ff in the Apple's main 40-column video bank.  Those
screen holes are reserved for peripheral card usage, and the disk operating
system will also make use of some of them.

By disturbing this RAM in any way, unpredictable results might occur.  The
only way you can safely save and load a screen image using a disk for storage
is to move only the display characters from video RAM into a safe buffer, and
then write it to disk (or ramdisk).  To read the image from disk, you must
load the file into a a safe buffer, and use a memory move to copy those bytes
back into the display memory (leaving the screen holes unscathed).

A word to the wise.

--Morgan Davis

UUCP: [ akgua, hplabs!hp-sdd, sdcsvax, nosc ] !crash!pnet01!pro-sol!mdavis
ARPA: crash!pnet01!pro-sol!mdavis@nosc

friedman@topaz.RUTGERS.EDU (Gadi ) (12/15/86)

>mdavis@seismo.css.gov@pro-sol.UCSD.EDU (Morgan Davis) writes
>
>however the second 40-column bank doesn't reside at $800-$bff as stated.
>This would have been nice, but would have made the Apple IIe incompatible with
>Applesoft BASIC from the Apple II+ since Applesoft starts your programs at
>$800.  A lot of other non-BASIC software would also be incompatible.

The second 40 column bank DOES reside at $800-$bff, Just try turning
the second page on when still in Text mode, (Or low res graphics).
Sure this is incompatible with Applesoft, thats why its not used much
anymore.  Integer Basic programs were able to use both pages, also, if
you moved your Applesoft program to $4000, you could load in 2 low res
pictures and flip betweem them.  (Animation...).  I doubt that the 
80 column hardware supports the second low-res page.

                                     -Gadi
-- 
ARPA:                        friedman@topaz.rutgers.edu
UUCP:  {harvard, seismo, ut-sally, sri-iu, ihnp4!packard}!rutgers!topaz!friedman
CMS:                    RUTGERS!SYSOP (CMS is DOWN. Long live CMS)
KGB:	nsa, nuclear, bomb, sdi, assassinate, cia, starwars, irangate, e=mc^2

mw22#@ANDREW.CMU.EDU (Michael Alan Wertheim) (12/15/86)

   There seems to be a lot of confusion regarding 40 and 80 column text.

   The original Apple II had three display modes -- 40 column text, lo res
graphics, and hi res graphics.  Each of these modes has two pages.  Text and
lo res page 1 occupy the memory from $400 to $7ff, and text and lo res page 2
occupy $800 to $bff.  Applesoft programs normally reside in the page 2
memory.  If you load a program that has some strings, rem statements, or data
statements near the beginning, and flip the page 2 softswitch ($C055 I
think), you will see the strings and rem/data statements along with a lot of
other garbage, which is the tokenized form of your program.  Also note that
you can BSAVE a screen from page 1 or page 2, but you can BLOAD the image
only back to page 2.

   An 80-column card in effect doubles each of the display modes by using
page 1 from main memory and the corresponding page 1 from auxiliary memory.
The 80-column text screen uses $400 to $7ff of main memory and $400 to $7ff
of auxiliary memory.  Page 2 is not used.  Likewise, there is also an
80-column double lo res that uses the same memory and that can easily be
accessed from Applesoft.  This was covered in a past issue of Open Apple.  If
anyone's interested, I'll post a short summary of how to do this.

   Double hi res uses the memory from $2000 to $3fff in both main and
auxiliary memory.  I've heard that there is a double hi res page two that
uses the memory from $4000 to $6fff in both main and auxiliary memory.


Mike Wertheim
(Carnegie Mellon University)

rhr@osupyr.UUCP (12/15/86)

In article <MS.V3.18.mw22.80021110.clarion.ibm032.214.0@andrew.cmu.edu> mw22#@ANDREW.CMU.EDU (Michael Alan Wertheim) writes:

>  Also note that
>you can BSAVE a screen from page 1 or page 2, but you can BLOAD the image
>only back to page 2.
 
Actually, Ive never had any problem bloading text screens back into page I.
All I ever do is specify the loading location. (i.e. BLOAD $$$$, a$400)
I have used this command w/ DOS 3.3 on an Apple IIe, II+, and IIc.




-- 
****************************************************************************
*  "Those who cant write, write manuals."                                  *
*  "Diplomacy is the art of saying 'nice doggy' until you can find a rock."*
****************************************************************************
*  Gaelan the Slightly Confused, King of the Undefined.                    *
*  Contact at  (insert path here)!cbogsd!osupyr!rhr                        *
*  "Peectures, we don need no steenking peectures!"                        *
*                                                                          *
*  System Operator (believe it or not) @                                   *
*  OSUPYR @ Ohio State University                                          *
*  Any letters will be duly read, and quickly dismissed as frivolous.      *
****************************************************************************

schumann@puff.WISC.EDU (Christopher Schumann) (12/16/86)

In article <MS.V3.18.mw22.80021110.clarion.ibm032.214.0@andrew.cmu.edu>, mw22#@ANDREW.CMU.EDU (Michael Alan Wertheim) writes:
>    There seems to be a lot of confusion regarding 40 and 80 column text.

Sure does.

< Some good stuff... >
> ...  Also note that
> you can BSAVE a screen from page 1 or page 2, but you can BLOAD the image
> only back to page 2.

In ProDOS, OK. But in 3.3 (yes it is still used), you can load both back,
sometimes the screen hole stuff gets mucked and the drive complains.

> .........................................  Likewise, there is also an
> 80-column double lo res that uses the same memory and that can easily be
> accessed from Applesoft.  This was covered in a past issue of Open Apple.  If
> anyone's interested, I'll post a short summary of how to do this.
 
From my article in _Nibble_, Feb '86: (pardon my swelling head)
10 ?chr$(4)"PR#3"
20 ?:REM Needed to initialize firmware
30 x=peek(49246):gr:rem Now in 80 x 40 mode
40 color=2:hlin0,79at20:REM it works now

>    Double hi res uses the memory from $2000 to $3fff in both main and
> auxiliary memory.  I've heard that there is a double hi res page two that
> uses the memory from $4000 to $6fff in both main and auxiliary memory.
                                 5FFF
Only trouble is, firmware switches to page 1 on almost all I/O calls.
  
> Mike Wertheim
> (Carnegie Mellon University)

Chris Schumann	schumann@puff.wisc.edu
"I before E, and
 there's five E's in aiieeeee"