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

Re: Sound-makes only one click?



David Wilson <david@uow.edu.au> wrote:

> dempson@actrix.gen.nz (David Empson) writes:
> 
> >This is true to a lesser extent for the keyboard buffer ($C00x) and
> >strobe ($C01x).  They behave this way on the II+, but the IIe redefines
> >all the nonzero locations in each range for mode control and detection.
> >The IIe $C001-F locations are write-only, and reading them will still
> >access the keyboard buffer.
> 
> Actually, the 0 location gets a new use as well.

I was simplifying the description somewhat.  Reading $C000 is well
defined, but $C001-F were not.

> What happens is that reading C000..C00F remains as on the ][+ while writing
> to any location in the same range clears or sets one of 8 flags. Bits 3,2,1
> select the flag while bit 0 is the data written to the flag.

Note that these are the address bits, not the data bits.  For example,
writing to location $C00E will select the primary character set (switch
7 off), while writing to $C00F will select the alternate character set
(switch 7 on).  You can write any data you like - it is ignored.

These eight softswitches are among those that can be read back via
$C011-$C01F (bit 7 of the location set if the appropriate switch is ON).

The full list, courtesy of my handwritten notes from about 1983:

$C00x  Switch            Even      Odd          Read via

0/1    80-column store   Off       On           $C018
2/3    Read Bank         Main      Aux          $C013
4/5    Write Bank        Main      Aux          $C014
6/7    Slot CX ROM       Slots     Internal *   $C015
8/9    ZP/Stack/LC Bank  Main      Aux          $C016
A/B    Slot C3 ROM       Internal  Slots    *   $C017
C/D    80-column video   Off       On           $C01F
E/F    Character set     Primary   Alternate    $C01E

* Yes, the SLOTCX and SLOTC3 switches really are arranged in opposite
directions.

80-column store is used to access the auxiliary memory text and hi-res
graphics buffers via the PAGE2 soft switch.

The read and write bank switches determine which bank is accessed for
the appropriate operation in the $0200-$BFFF area (possibly excluding
text and hires page 1).

The SlotCX switch selects between internal and slot ROM for $C100-$C2FF
and $C400-$C7FF.

The SlotC3 switch selects between internal and slot ROM for $C300-$C3FF
(and indirectly for $C800-$CFFF).

80-column video enables 80-column display.

The character set is self-explanatory.


The other switches that can be read are:

$C011  Language card bank 2 ($C080-7 for bank 2, $C088-F for bank 1)
$C012  Language card read enable ($C08x odd=RAM read, even=ROM read)
$C019  Vertical blanking detect
$C01A  Text mode ($C050/1)
$C01B  Full screen graphics ($C052/3)
$C01C  Page 2 ($C054/5)
$C01D  Hi-res graphics ($C056/7)

Note that language card write enable (controlled via $C083/7/B/F) cannot
be detected directly, and neither can the Annunciator 3 switch
($C05E/F), which is used to control double hi-res graphics.

-- 
David Empson
dempson@actrix.gen.nz
Snail mail: P.O. Box 27-103, Wellington, New Zealand