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

Re: Does anyone understand this...



In article <1992Nov24.172459.41341@slate.mines.colorado.edu> gdesroch@slate.mines.colorado.edu (DESROCHERS GARY FREDERIC) writes:
> 
>      I need to know what a 
> 
> BIT $CFFF
> 
> does.  I don't need breif answers like 'It clears all I/O ROMS'
> or 'It switches out C8 ROMS.".  I can get these out of the IIc rom listing
> and II plus listing that I have.  What does it do?!?  The best answer would
> be as technical as you can give me or where I can get the answers.

Full documentation is available in the IIgs Hardware Reference manual
or IIe Technical Reference manual, in the chapter on the slots.

In short, it is part of the mechanism used to allow each I/O card to
have an extra 2k of RAM/ROM/whatever in the $C800-$CFFF space.  This
area is shared by all slots.  When you access this space, the IOSTROBE
signal on each slot indicates the access and is used with the lower
order address bus to decode the address.

Now, ALL cards are allowed to have expansion memory in this area, but
there has to be some way for the cards to determine which one has
control of it - if all the cards responded to a read, you would get a
bus clash.

The convention is as follows:

If software accesses memory in the $Cn00-$CnFF space (where n is the
slot in question), the card sets a flip-flop that allows access to its
$C800-$CFFF space.

The card must also recognise an access to location $CFFF as a
'deactivate' command, so it turns off the flip-flop.

For example, an I/O card with expansion ROM at $C800 might include the
following code in its $Cn00 space:

       BIT $CFFF            ; Tell all cards to disable expansion ROM
       JMP $C800            ; and go to my expansion ROM

Since the opcode fetch for the JMP instruction caused a read from page $Cn,
slot n's expansion ROM is switched in.

The other part of the convention requires that the slot firmware
stores the slot number in $Cn form into location $7F8, while it is
using its $C800 expansion space.  This allows an interrupt handler to
restore the correct slot's expansion ROM (e.g. the interrupt handler
might use the slot 3 80-column firmware, which switches in slot 3's
expansion ROM).


I hope that made sense.  E-Mail me if you need more information.

-- 
David Empson

Internet: David.Empson@bbs.actrix.gen.nz    EMPSON_D@kosmos.wcc.govt.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand