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

Re: AUX memory question



Matthew Russotto wrote:
> 
> In article <XN1l6.3027$7e6.1254088@homer.alpha.net>,
> Dennis Jenkins  <dennis@usb.com> wrote:
> >Hello,
> >       I know that I can use the soft switches $c002 through $c005 to
> >control if an I going to read or write to the 48K main/aux memory, but how
> >do I gain access to the upper 16K of AUX memory (and then re-gain access
> >to the upper 16K of normal memory)?  I think the answer in the the address
> >range of $c080 through $c08f, but I don't understand what each of those
> >soft switches _really_ does.  I know that ProDOS lives in one of those
> >upper banks, and I have to be careful not to trash it.
> 
> Any reason you have to use PRODOS?  DOS 3.3 has a smaller footprint.
> I don't think 8-bit Prodos uses any of the auxiliary memory, including
> the language card space, but I'm not certain.

Yes, I must use prodos, I'm writing some ProDOS system software.  When
it runs,
it detaches /RAM from s3,d2 and then uses $200 through $bfff for it's
own purposes.
I'd like to use $c000 through $ffff as well.

> 
> >       (I know about the AUXMOVE API found at $c311.  That isn't exactly
> >what I want.  I need faster access to AUX memory, as I am using it to
> >store hash tables.  AUXMOVE is way to slow.  I am writing my own custom
> >AUX memory access functions.  I store them in the upper part of zero page.
> >My code has nothing to do with BASIC.SYSTEM, so I'm not worried about
> >basic trashing my work areas.)
> 
> >       I currently have working code that lets me read/write single bytes
> >(at a time, exactly what I want) to AUX range $0200 through $bfff.  I want
> >to be able to handle $c000 through $fffc.  Can I safely write random data
> >to AUX $fffe,$ffff?  I am not bothering to write to AUX $0000 through
> >$01ff.
> 
> I think you may have a problem because your auxiliary memory routines
> are in the zero page, and IIRC the same switch (ALTZP) switches the zero
> page and the language card.  Maybe you could use AUXMOVE to copy your
> routines (or parts thereof) over to the alternate zero page.  Then
> when you hit ALTZP you'd continue executing instead of crashing and burning.

No problems.  I never swap pages 0,1.  I always leave those set to MAIN.

Keep in mind that I don't plan to execute any code sitting in AUX
memory, I'm
just using it to store data.

> I don't see why you couldn't write to AUX FFFE, FFFF -- the reset hardware
> automatically switches to the main page, so it won't use the auxiliary
> reset vector.  But it's been a long time since I worked with this
> stuff and I don't have my manual at hand.

Ok.  Thanks for the hardware details.


ps- I tried to write my routines to use a 61K file in /RAM, and
implemented my own
"byte array assessor" functions to use the prodos MLI.  Way to slow.  So
I re-wrote to
do prodos block read/writes from s3,d2.  Still way to slow.

I now just hit the memory from my little page zero routine.  Very fast. 
I just want
to use as much of it as I possibly can (and still be compatible with an
Apple IIe w/ 128K ram).

-- 
dennis@usb.com                           Universal Savings Bank.

The three most dangerous things are a programmer with a soldering
iron, a manager who codes, and a user who gets ideas.