Stereo addressing scheme of the MixSID stereo SID board for the C64
===================================================================

There are four address control lines in this scheme, although only
one line is strictly required for basic operation of SID2 at the most
commonly used addresses for stereo sid tunes.

The MODE SELECT (MS) line controls the addressing mode, the PRIORITY
SELECT line (PS) controls which SID is kept at address $d400 and which
SID is in turn adressed at a stereo address in stereo mode, and
finally the IO ENABLE (IO1EN/IO2EN) lines control whether or not the
second SID appears at $DE00 or $DF00 when in stereo addressing mode
(given that the corresponding signals IO1 and IO2 are connected at
all).

MODE SELECT
===========

The available addressing modes controled by MODE SELECT are:

Parallel Addressing Mode
========================

If MODE SELECT is HIGH, SID2 will be addressed in parallel with SID1
each 32 bytes in $D400-D800 (as usual).

In addition, SID2 will *only* be selected if RW is low, so the second
sid will always be write-only when it appears in parallel with
SID1. This way read accesses (for paddles and music effects) will only
ever read from SID1, while SID2 completely ignores read accesses.

Orthogonal (Stereo) Addressing Mode
==========================

If MODE SELECT is LOW, SID1 and SID2 will be addressed as shown in the
table below.

In this addressing scheme, the second SID will always appear at *all*
of the common stereo addresses *at once* (so that a SID tune will find
the second sid regardless of whether it expects it at d420, d500, de00
or df00). Most importantly, the first SID is guaranteed *not* to appear
at any of the addresses that SID2 appears at.

In addition, SID2 will always become fully read-write again when
addressed orthogonal to SID1, as opposed to parallel addressing where
it is usually forced write-only.

-----------------------
|ADDR  | SID1 | SID2  |
|---------------------|
| $D400 |  X   |      |  
| $D420 |      |  X   | <- $D420
| $D440 |  X   |      |  
| $D460 |      |  X   |  
| $D480 |  X   |      |  
| $D4A0 |      |  X   |  
| $D4C0 |  X   |      |  
| $D4E0 |      |  X   |  
| $D500 |      |  X   | <- $D500
| $D520 |      |  X   |  
| $D540 |      |  X   |  
| $D560 |      |  X   |  
| $D580 |      |  X   |  
| $D5A0 |      |  X   |  
| $D5C0 |      |  X   |  
| $D5E0 |      |  X   |  
| $D600 |  X   |      |  
| $D620 |      |  X   |  
| $D640 |  X   |      |  
| $D660 |      |  X   |  
| $D680 |  X   |      |  
| $D6A0 |      |  X   |  
| $D6C0 |  X   |      |  
| $D6E0 |      |  X   |  
| $D700 |      |  X   |  
| $D720 |      |  X   |  
| $D740 |      |  X   |  
| $D760 |      |  X   |  
| $D780 |      |  X   |  
| $D7A0 |      |  X   |  
| $D7C0 |      |  X   |  
| $D7E0 |      |  X   |
|---------------------|
| $DE00 |      |  X   | optional (connect /IO1, use IO1EN=low to enable)
| $DF00 |      |  X   | optional (connect /IO2, use IO2EN=low to enable)
-----------------------

PRIORITY SELECT
===============

This line control which SID appears at the stereo addresses in
orthogonal addressing mode.

When the line is HIGH, the SID in the socket labeled SID1 appears at
$d400 while the SID in socket SID2 appears at the common stereo addresses.
When the line is low the SIDs are swapped in terms of addressing.

IO ENABLE
=========

Since using the common IO areas IO1 and IO2 ($DE00 and $DF00) for SID2
may cause conflicts with other hardware using these areas (such as
freezer cartridges), the IO ENABLE signals (IO1EN, IO2EN) can be used
to enable/disable these addresses when in orthogonal mode.

This allows the user to keep the option of using solutions like
PROPHET/MSSIAH that use the io areas for SID2. If these addresses are
required temporarily, the user may permanently connect IO1 and IO2 and
simply control their application via the IO ENABLE signals. If these
addresses are not needed at all, the user can opt to simply not
connect the IO ENABLE and IO1/IO2 lines.

Paddle Support
==============

Paddles simply work regardless of the current MODE and PRIORITY
settings, since the secondary SID is forced write-only in parallel
addressing mode. The paddle lines are always routed to the SID
currently addressed at $d400.

Rationale
=========

This solution removes the need for multiple jumper configurations to
select the address of SID2, which would have to be changed manually
(via jumpers or (rotary) switches), or controlled with additional
custom hardware which multiplexes the lines accordingly
(e.g. virtualizing the jumper settings).

Instead, all lines are digital control lines. If they are not
connected, they are driven high by the internal pullups of the
16V8. The logic has been designed to use the most common setting as
the default when the signal is high. Leaving all three control lines
high implies parallell adressing, stereo mixing and disabling of
$de00/$df00.

This allows the user to use a simple SPST switch to ground if he
wishes to control one of these lines. On the PCB, a GND pin is
provided next to each control signal pin to allow the use of jumper
bridges as well.

Using digital control signals also means that switching between modes
may happen at runtime because the CS signals of both sids are
guaranteed to be driven to proper logic levels at all times. (If
naively using jumpers or a rotary switch, the CS lines of the SIDs are
likely to float during switching and the SIDs will feel compelled to
put data on the bus at random, causing the C64 to crash).

