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

Re: A Question About Apple II Language Card



Hilary Cheng <hilarycheng@yahoo.com> wrote:

>   I am currently writing a Apple IIe Emulator for Palm. When I boot
> the ProDos, it needs a 16K Language Card. I start to implement it. But
> I am confusing about the SoftSwitch about the SLOTCXROM & SLOTC3ROM.

The SLOTCXROM and SLOTC3ROM soft switches have nothing to do with the
language card (bank switched RAM in $D000-$FFFF).  They affect the
contents of memory in the $C100-$CFFF area.

SLOTC3ROM determines whether slot 3 ($C300-$C3FF) accesses the internal
ROM or the physical card in slot 3.  It also affects the handling of
$C800-$CFFF, allowing the expansion for the internal slot 3 firmware to
be accessible in this area, using the normal IOSEL protocol (access
$C3xx to enable, access $CFFF to disable).

SLOTCXROM determines whether slots 1, 2 and 4-7 ($C100-$C2FF and
$C400-$C7FF) accesses the internal ROM or the physical cards in each
slot.


The language card contains 16KB of RAM, organised as one bank of 8KB and
two banks of 4KB each.  The two 4KB banks are mapped to $D000-$DFFF, and
the 8KB bank is mapped to $E000-$FFFF.

The language card is controlled by eight soft switches in the
$C080-$C083 and $C088-$C08F areas (with mirror copies at $C084-$C087 and
$C08C-$C08F).

$C080-$C083 are used to control the first 4KB bank, and $C088-$C08B are
used to control the second 4KB bank.  The 8KB bank is controlled by both
sets of switches.

$C080 and $C088 select ROM for read and write-protect the RAM.

$C081 and $C089 select ROM for read and RAM for write (see below).

$C082 and $C08A select RAM for read-only operation. 

$C083 and $C08B select RAM for read/write (see below).

The "write enable" mechanism requires two accesses to $C081/3/9/B in
order to enable writing to RAM.  Accessing $C080/2/8/A will reset the
"counter".

If you are implementing a 128 KB IIe (with auxiliary memory), there is a
second identical language card in the auxiliary bank, which is
controlled in parallel with the one in main memory.  (The AUXZP/MAINZP
switch determines whether you are accessing the main or auxiliary
language card.)

-- 
David Empson
dempson@actrix.gen.nz