•  Back 
  •  XBIOS 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-File<invalid destination page 1581>

                               The Serial Port


Application writers who develop communication programs will need to use
some of the special functions the XBIOS provides for control of the serial
port(s). Older Atari computers support only one serial port connected by
the Multi-Function Peripheral (MFP) chip.

The Atari TT030 contains two MFP chips to provide two serial ports and
one Serial Communications Chip (SCC) which controls two more serial ports.
One of the SCC ports, however, can be switched over to control a Localtalk
compatible network port as follows:

Switch to Serial 2 Connector:

    Ongibit(0x80);

Switch to LANLocal Area Network
 connector:

    Offgibit(0x7F);

The Mega STe is similar to the TT030, however, it has only one MFP chip
to provide one less serial device.

The Atari Falcon030 uses a SCC chip to drive its single serial port and
networking port. The Falcon030 does contain a MFP chip but it does not
control any of the serial device hardware. The MFP's ring indicator has,
however, been wired across the SCC to provide compatibility with older
applications.

Serial Port Mapping

BIOS input and output calls to device #1 and XBIOS calls which configure
the serial port always refer to the currently 'mapped' device as set with
Bconmap(). The Modem CPX allows a user to map any installed device as the
default. A program which is aware of the extra ports on newer machines can
access them through their own BIOS device number as follows:

Dev  Mega STe                 TT030                    Falcon030
no.

 1   Currently mapped         Currently mapped         Currently mapped
     device.                  device.                  device.
     DEV_AUX                  DEV_AUX                  DEV_AUX

 6   Modem 1 (ST MFP)         Modem 1 (ST MFP)         -
     DEV_MEGAMODEM1           DEV_TTMODEM1

 7   Modem 2 (SCC B)          Modem 2 (SCC B)          Modem (SCC B)
     DEV_MEGAMODEM2           DEV_TTMODEM2             DEV_FALCONMODEM

 8   Serial/LANLocal Area Network
 (SCC A)       Serial 1 (TT MFP)        LANLocal Area Network
 (SCC A)
     DEV_MEGALAN              DEV_TTSERIAL1            DEV_FALCONLAN

 9   -                        Serial 2/LANLocal Area Network
 (SCC A)     -
                              DEV_TTLAN

Configuring the Serial Port

Rsconf() and Iorec() set the communication mode and input/output buffers of
the currently mapped serial port. You should note that while some ports
support transfer rates of greater than 19200 baud, this is the limit of the
Rsconf() call. Other rates must currently be set in hardware (or with the
Fcntl() when MiNT is present).

MFP Interrupts

Each MFP chip supports a number of interrupts used by the serial port and
other system needs. The function Mfpint() should be used to set define a
function in your application that handles one of these interrupts.

Jenabint() and Jdisint() are used to enable/disable these interrupts
respectively.

All MFP interrupt calls only work on ST compatible MFP serial ports. The
RS-232 ring indicator is the only interrupt that has been wired through
the MFP on a Falcon. Because of this, the ring indicator interrupt is the
only RS-232 interrupt that may be changed with Mfpint() on a Falcon.

SCC Interrupts

The XBIOS functions used for setting MFP interrupts do not affect the SCC
interrupts regardless of the Bconmap() mapping. Refer to the memory map for
the location of SCC interrupt registers.