[comp.sys.amiga.tech] A Rad: using only 16 bit memory...

dylan@cs.washington.edu (Dylan McNamee) (09/21/90)

I am about to bring the 32 bit memory in my system up to 4 megabytes.
This makes me think of creative ways of using the 2 megs of 16
bit memory on my 2091 card.  I'd prefer not to run code from the
16 bit memory, so the idea of a 16 bit RAD: seems natural.  The static
nature of RAD: makes it more handy for this than ram:.  Here's a
first cut at a scheme for doing this:

1)  Allocate all of the 32 bit memory in the system.  (Using the
routines in MTest seems the easiest, although slow.)  I guess this
would be doable by checking the address returned for range in 32 bit
memory space, and freeing it if it weren't.

2)  Create a Rad: disk, which would allocate the 16 bit memory, since
that is all that is around.

3)  Free the 32 bit memory.

This process would only need to be done at system turn on time, since
after that, the memory is fixed in rad:

Comments?  Easier methods?  Mistakes (will this indeed work?)

dylan
dylan@cs.washington.edu

nix@stekt.oulu.fi (Tero Manninen) (09/21/90)

In article <13089@june.cs.washington.edu> dylan@cs.washington.edu (Dylan McNamee) writes:

> I am about to bring the 32 bit memory in my system up to 4 megabytes.
> This makes me think of creative ways of using the 2 megs of 16
> bit memory on my 2091 card.  I'd prefer not to run code from the
> 16 bit memory, so the idea of a 16 bit RAD: seems natural.  The static
> nature of RAD: makes it more handy for this than ram:.  Here's a
> first cut at a scheme for doing this:
>
> 1)  Allocate all of the 32 bit memory in the system.  (Using the
> routines in MTest seems the easiest, although slow.)  I guess this
> would be doable by checking the address returned for range in 32 bit
> memory space, and freeing it if it weren't.

I don't know how legal this is to do but..
(We are now dealing with private system lists)
If you know where this 32 bit memory starts you can lower the priority
of that memory block (for a moment).
Look the right MemHeader node from exec MemList structure.
Then just change the node priority so low that it is below the 16 bit
memory (maybe -1 ?).
Now make your RAD: and change the 32 bit memory priority back.

> Comments?  Easier methods?  Mistakes (will this indeed work?)

I hope this works :-)  I have used this method some times to
load old buggy programs into chip memory.

> dylan
> dylan@cs.washington.edu

++Tero

billsey@agora.uucp (Bill Seymour) (09/21/90)

In article <13089@june.cs.washington.edu> dylan@june.cs.washington.edu (Dylan McNamee) writes:
:
:I am about to bring the 32 bit memory in my system up to 4 megabytes.
:This makes me think of creative ways of using the 2 megs of 16
:bit memory on my 2091 card.  I'd prefer not to run code from the
:16 bit memory, so the idea of a 16 bit RAD: seems natural.  The static
:nature of RAD: makes it more handy for this than ram:.  Here's a
:first cut at a scheme for doing this:
:
:1)  Allocate all of the 32 bit memory in the system.  (Using the
:routines in MTest seems the easiest, although slow.)  I guess this
:would be doable by checking the address returned for range in 32 bit
:memory space, and freeing it if it weren't.
:
:2)  Create a Rad: disk, which would allocate the 16 bit memory, since
:that is all that is around.
:
:3)  Free the 32 bit memory.
:
:This process would only need to be done at system turn on time, since
:after that, the memory is fixed in rad:
:
:Comments?  Easier methods?  Mistakes (will this indeed work?)

	Since RAD is designed to allocate memory from the end of the list
instead of the beginning, you don't have to go through all that. Just
mount RAD the size you want and it'll come from the 16 bit memory.
Remember that you don't really need to use all the 16 bit memory to 
make sure you're programs will all be running from 32 bit memory...
Instead, just don't use all the 32 bit memory up. The start of auto-
congi space has a higher priority that then end, therefor programs
won't use the 16 bit memory until all the 32 bit is allocated.

:dylan
:dylan@cs.washington.edu


-- 
     -Bill Seymour             ...tektronix!reed!percival!agora!billsey
=============================================================================
Bejed, Inc.       NES, Inc.        Northwest Amiga Group    At Home Sometimes
(503) 281-8153    (503) 246-9311   (503) 656-7393 BBS       (503) 640-0842