[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AUX memory question
- Subject: Re: AUX memory question
- From: dempson@actrix.gen.nz (David Empson)
- Date: Sat, 24 Feb 2001 17:46:30 +1300
- Newsgroups: comp.sys.apple2
- Organization: Empsoft
- References: <XN1l6.3027$7e6.1254088@homer.alpha.net> <%Gdl6.3696$fk5.110867@e3500-chi1.usenetserver.com> <3A9583B6.2715D885@usb.com>
- User-agent: MacSOUP/2.4.2
- Xref: supernews.google.com comp.sys.apple2:6526
Dennis Jenkins <dennis@usb.com> wrote:
> 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.
You cannot use $0200-$03FF or $0080-$00FF, or you will destroy the code
which supports /RAM, requiring a reboot when your application
terminates. You also can't use auxiliary $0400-$07FF for arbitrary
purposes, since it is the auxiliary half of the text screen, and the
screen holes are used by the IIc firmware (and possibly other systems).
> I'd like to use $c000 through $ffff as well.
There isn't any RAM in $C000-$CFFF, so I'm not sure what you are trying
to achieve. The remaining 16KB address space of the RAM is within the
"language card", which is sandwiched into the 12KB space $D000-$FFFF,
overlaying the ROM.
The name comes from the card originally supplied by Apple with the Apple
II Language Systems (Apple II Pascal), which was installed in slot 0 of
an Apple ][ or ][+. The functionality of the language card was built
into the motherboard for the Apple IIe and later machines.
The following description applies to the traditional language card, and
its corresponding implementation in main memory of the Apple IIe. For
auxiliary memory, there is an identical language card in the same
address space. The soft switches described here affect the memory map
in exactly the same way for both language cards.
The ALTZP switch determines whether main or auxiliary RAM is being
accessed for the relevant RAM read/write operations. ALTZP also selects
main or auxiliary memory in the $0000-$01FF area.
So, the language card:
There are two 4K banks in $D000-$DFFF, and a common bank in $E000-$FFFF.
The soft-switches which control the bank switching within this area are
as follows. All are accessed via read operations.
$C080 Read RAM bank 2, write protected
$C081 Read ROM, write RAM bank 2
$C082 Read ROM, write protected
$C083 Read/write RAM bank 2
$C088 Read RAM bank 1, write protected
$C089 Read ROM, write RAM bank 1
$C08A Read ROM, write protected
$C08B Read/write RAM bank 1
"Bank 1" and "Bank 2" refer to the two alternate 4K banks in
$D000-$DFFF. There is no distinction between the banks as far as
$E000-$FFFF are concerned.
Locations $C081/3/9/B require two accesses to enable language card
write.
e.g.
LDA $C082 ; Select the ROM, write protect RAM
...
LDA $C080 ; Select RAM, bank 2 enabled, write protected
...
LDA $C081 ; Read from ROM
LDA $C081 ; Second access write-enables RAM bank 2
...
LDA $C083 ; Read from RAM bank 2
LDA $C083 ; Second access write-enables RAM bank 2
The Read ROM/Write RAM combination ($C081 or $C089) is typically used to
copy data from the ROM to the language card.