[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

10.0. "Screen Memory and Programming (The 512k?)" by PENNSY::MELLITZ () Mon May 05 1986 12:52

    I've read that if you write a program that's greater than
    512k bytes or have runs in a section of memory above
    the 512k address, that screen functions must use only 
    the first 512k bytes of address. My question is about writing
    Amiga BASIC programs. How do you insure that your screen operations
    stay in the lower 512k? Do the Graphic libraries take care of
    this for you. What the interelation between that and the free
    space left from other programs.  Do you monitor this by 
    creating a 512k segment and use the FRE statement on it
    before graphic library calls?
     Does the Stack and Heap have to be in this area too? 
T.RTitleUserPersonal
Name
DateLines
10.1The "Chip Memory"LATOUR::RMEYERSRandy MeyersWed Aug 20 1986 23:5535
I don't own an Amiga, but I have done a little reading, and will hazard
to put forth my understanding of the 512k limitation.

The display processing of the Amiga is handled by custom chips which
make up a graphics co-processor and free the 68000 to do more useful
things.  The 68000 and the graphics co-processor communicate via shared
memory.  Typically, the 68000 will construct a data structure (like
sprite info) and signal the co-processor where to find the data structure
and what to do with it.

The custom chips that make up the graphics co-processor can only address
512k of memory, the first 512k of memory.  Because of this, the first
512k of Amiga memory is sometimes called the "chip memory," since the
68000 shares it with the custom chips.

Amiga DOS does support programs that allocate memory for bitplanes
and other display data structures.  The standard system memory allocation
routine takes an argument that can be used to force memory to be allocated
from the chip memory, instead of just anywhere in the Amiga's 8meg address
space.  There is also a tool called ATOM which, I think, can restrict the
data segments of a program to be loaded into chip memory whenever the
program is run.

Well, what does this mean to you as a BASIC programmer?  I would guess,
not much.  As long as you use the built-in BASIC commands to manipulate
the screen, I would hope that BASIC would take care of everything for
you.  You should only have to worry if you plan on using the low level
display libraries to take direct control over the display.

For more information, try looking in the new technical manuals on sale
at a bookstore near you.  I found out most of what I know by looking up
"chip memory" in the index of the Intuition Reference Manual.

Since the 512k limitation is on graphics data, I don't believe that the
stack or the heap need to be in the first 512k.