## Super Serial Card

### Super Serial Card:

AppleWin emulates a Super Serial Card (aka SSC) in slot-2, with the jumper block in the MODEM position.

The SSC can be configured to communicate externally either via the host PC's COM serial port or TCP port 1977.

See the Configuration tab's 'Serial Port' menu to select a COM serial port or the TCP port.

The SSC currently has these hardcoded DIP switch settings:

- DIP SW1:
  - Baud rate = 9600
  - Mode = CIC (ie. SSC's Communication Mode)
- DIP SW2:
  - 1 stop-bit
  - 8-bit byte size
  - No parity
  - Linefeed off
  - Interrupts enabled

Notes:

- The SSC emulation supports both Rx and Tx interrupts (for both COM and TCP modes), RTS/CTS, DSR/DTR, and the undocumented 115200 baud rate.
- For the TCP mode it doesn't matter what baud rate, stop-bit, byte size and parity are set to.
  - It always uses an unthrottled data-rate of 8-bit bytes (no stop-bit, no parity).
  - When there's an active TCP connection, then the 6551's Status register has DCD,DSR bits clear (active low), and DIPSW2 has CTS bit clear (active low). When there's no TCP connection, then all these bits are set (inactive).
- The TCP mode can expose buggy Rx interrupt handling code where the 6551's Status register is read more than once in the Interrupt Service Routine (ISR).
  - Details: TCP mode doesn't throttle the serial data-rate, so after reading the Status register (to clear the Rx interrupt) the Rx interrupt may get asserted immediately if there is more data in the TCP receive buffer, resulting in a missed interrupt (and therefore missed Rx data).
- The 6551's Command register's DSR (bit0) must be set, to enable interrupts (Rx, Tx) along with the respective Rx and/or Tx bits (bit3:1). This is part of the 6551 specification, but (DSR bit) has only been enforced by AppleWin since 1.27.4.

Unsupported features are:

- Can't configure the DIP switches (not a problem, since most functions can be set in software).
- 6551 ACIA Command register: Echo mode(bit4=1) and Transmit BRK (bit3:2=3).
- 6551 ACIA Control register: external clock (bit4=0).
- 6551 ACIA baud rates: 50, 75, 109.92, 134.58, 150 all map to 110 baud.
- 6551 ACIA baud rate: 1800 maps to 2400 baud.
- 6551 ACIA baud rate: 3600 maps to 4800 baud.
- 6551 ACIA baud rate: 7200 maps to 9600 baud.
- 6551 ACIA Status register's error bits: overrun, framing and parity (these are all hardcoded to 0).
- 6551 ACIA Status register's DCD bit (Data Carrier Detect). This is just set the same as DSR.
  - NB. For COM mode, use command line -dcd to force AppleWin to use the state of the MS_RLSD_ON bit from GetCommModemStatus().
- NMOS 6551 ACIA CTS bug: transmission of an already-started frame will stop immediately when CTS is taken false, the byte will be lost, and the TxD line will go to marking.
  - NB. The CMOS 6551's will finish the frame, so assume that AppleWin emulates a CMOS 6551.
- AppleWin's 6502/65C02 emulation doesn't emulate the false read for STA $C088,X (where X=$20).
  - Don't do this to write to the 6551's Transmit register.
  - On AppleWin this is fine, but on real hardware (in full duplex mode) you may falsely read (and clear) the 6551's Receive register.
  - Instead (like the SSC's firmware) do this: STA $BFFF,Y (where Y=$A9).

#### Using TCP mode with the Apple // Game Server:

The TCP interface to the SSC can be used by the Apple // Game Server (AGS).
For details see the notes that comes with AGS, but in summary:

- Boot the Apple II to AppleSoft (ie. power on and hit Ctrl-Reset) and type IN#2.
- From a Windows DOS box, start AGS with "localhost 1977 apple2e". This will boot the emulated Apple II from AGS.
- Nb. Only Enhanced Apple //e is working at the moment.