<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 12 Jun 1992 02:46:20 +1200
From   : julian <julian@...>
Subject: Screen memory

"Mik Davis" <davism@...> writes:

> I think I must have been asleep at the time not to realise that MODE 3
> grabs nearly 20K of RAM.

Which reminds me... how many of you out there realised that there is some
hidden memory *after* the screen memory and *before* the ROM starts, in
modes 3, 6 and 7? I haven't seen this in a magazine before, and I don't
believe it is documented as such in the Advanced User Guide.

Mode 7 is allocated exactly 1024 bytes for display but needs only 1000
at a time (ie. 40*25 characters), so there are 24 bytes free from
&7FE8-&7FFF.

Mode 6 is allocated exactly 8192 (8k) bytes but needs only 8000 at a time
(40*8*25) resulting in 192 free bytes from &7F40-&7FFF.

Similarly, mode 3 gets 16384 bytes but needs only 16000... 384 bytes are
unused between &7E80-&7FFF.

It is important to remember that all this changes as soon as you scroll
the screen in hardware, or clear it. If you want to keep the memory safe
for use by a program, the easiest thing to do is to make the screen
software-scrolled, by defining a text window with the screen's dimensions.
eg. for Mode 7,
  VDU 28,0,24,39,0
would protect the memory. Unfortunately this makes scrolling a lot slower,
especially in mode 3. But then again you may be writing a program that
doesn't need to scroll the screen, such as an arcade game...

Anyone else found any other pockets of unused RAM hidden away on their
machine?

    Cheers, Julian.
--
wright_j@...                |---------------------| "I'm sig of sicknatures!"
--
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>