ð Developer Note 12” and 7” PC Compatibility Cards ð Developer Note 4/17/96 Developer Press © Apple Computer, Inc.
ð Apple Computer, Inc. © 1996, Apple Computer, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written permission of Apple Computer, Inc. Printed in the United States of America. The Apple logo is a registered trademark of Apple Computer, Inc.
Contents Figures and Tables vii About This Note Preface ix What This Note Contains ix Conventions and Abbreviations Typographical Conventions Standard Abbreviations x Other Reference Material xii For More Information xii Introduction Chapter 1 x x 1 Physical Size 3 Overview of Functional Capabilities Processor Capabilities 5 Memory Capabilities 5 Video Support 5 Audio Support 6 I/O Support 6 Floppy Disk Drive 7 Hard Disk 7 Serial Ports 7 Parallel Printer Port 7 Keyboard and Mouse 7 Joystick and MI
System Reset 21 Video System 22 Connecting the Monitor 22 Monitors Supported 22 Video Timing 24 Video ICs 24 Audio System 24 Audio IC 25 Sound Synthesizer Chip Set 25 I/O System 26 Serial Port Support 26 Printer Port Support 27 Keyboard and Mouse Controller 27 Message Mailbox 27 Autoconfiguration 28 Audio and Video I/O Support 28 GIMO Support for Video Output 28 Loop-Back Video Support 30 Audio I/O Support 32 Chapter 3 I/O Specifications 33 PCI Connector 35 DB26 Connector 45 DB15 Connector (Game Port) G
rsDisableVideo 65 rsMountDisks 66 rsDontMountDisks 67 rsActivateKB 67 rsDeactivateKB 68 rsBeginMouseTracking 68 rsEndMouseTracking 69 rsEndPrintJob 69 Detecting Errors 70 rsSetNotificationProc 70 rsLastError 71 Passing Messages 72 Message Conventions 72 Macintosh Interface 72 PC System Interface 72 Registering Messages 72 Registering Messages From the Mac OS 73 Registering Messages From the PC System 73 Sending a Message 73 Sending a Message From the Mac OS 74 Sending a Message From the PC system 75 Install
Figures and Tables Chapter 1 Chapter 2 Chapter 3 Introduction 1 Figure 1-1 Figure 1-2 Figure 1-3 Simplified block diagram of PC and Macintosh functions 12" card dimensions 4 7" card dimensions 4 Hardware Design 9 Figure 2-1 Figure 2-2 Figure 2-3 Figure 2-4 Figure 2-5 Figure 2-6 Figure 2-7 Figure 2-8 Figure 2-9 Figure 2-10 Figure 2-11 12” card with featured ICs 11 7" card with featured ICs 12 Detailed block diagram—12” card 13 Detailed block diagram—7" 14 Example of big-endian and little-endian da
Chapter 4 Software Support Table 4-1 Table 4-2 Table 4-3 Table 4-4 viii 55 PC status word 64 Return codes for PC printing or serial communication errors Special events 71 Summary of constants 80 70
P R E F A C E About This Note The 12” and 7” PC Compatibility Cards are x86-based microprocessor cards that you can plug into any Macintosh computer that has a PCI slot. This developer note describes the features and capabilities of the cards and is intended for use by software and hardware developers. The 12” and 7” PC Compatibility Cards are referred to in this developer note as the 12” card and 7” card, respectively, as the cards, or as the PCI cards.
P R E F A C E Conventions and Abbreviations 0 This developer note uses the following typographical conventions and abbreviations. Typographical Conventions 0 Computer-language text—any text that is literally the same as it appears in computer input or output—appears in Courier font. Note A note like this contains information that is interesting but not essential for an understanding of the text. ◆ IMPORTANT A note like this contains important information that you should read before proceeding.
P R E F A C E FM frequency modulation GIMO Graphics Internal Monitor Out Hz hertz IC integrated circuit I/O input/output IRQ interrupt request ISA Industry Standard Architecture (in PC environment) K 1024 KB kilobyte kHz kilohertz L1 level 1 (cache)—internal to microprocessor L2 level 2 (cache)—external MB megabyte MFM modified frequency modulation MHz megahertz MIDI Musical Instrument Digital Interface ns nanosecond PC Personal Computer (usually refers to an x86-based co
P R E F A C E Other Reference Material 0 This developer note assumes that you are familiar with Apple Macintosh computers and PC-compatible computers and know how to operate and program them. Additional information is available in the following publications: ■ The developer notes provided for developers working with Macintosh computers. ■ The user’s guides shipped with Macintosh computers. These publications explain how to set up the computer and install the 12"or 7" card.
P R E F A C E Apple Developer Catalog Apple Computer, Inc. P.O. Box 319 Buffalo, NY 14207-0319 Telephone 1-800-282-2732 (United States) 1-800-637-0029 (Canada) 716-871-6555 (International) Fax 716-871-6511 AppleLink ORDER.ADC Internet order.adc@applelink.apple.
C H A P T E R Figure 1-0 Listing 1-0 Table 1-0 1 Introduction 1
C H A P T E R 1 Introduction The 12” and 7” PC Compatibility Cards are x86-based cards. You can plug the 7" card into any Macintosh computer that has a PCI (Peripheral Component Interconnect) slot. You can plug the 12" card into any Macintosh computer that supports a full-size PCI slot. The cards provide the computer with full PC compatibility and the ability to run DOS, Windows 3.1, and Windows 95.
C H A P T E R 1 Introduction Figure 1-1 Simplified block diagram of PC and Macintosh functions PC system Macintosh system PowerPC 60x processor Microprocessor Cache CPU bus Chip set PC PCI bus Custom IC (Mustard) PCI bridge PCI connector Onboard DRAM and DIMM VGA accelerator PowerPC/Apple chip set memory control PCI bridge DRAM/VRAM Keyboard/ mouse controller SIO integral peripheral controller 1 10 19 Cache 9 18 26 CPU bus Sound controller I/O controller Audio in Keyboard/ mouse GI
C H A P T E R 1 Introduction Figure 1-2 12" card dimensions 12.74 inches 12.5 inches 12.283 inches 3.62 inches 4.2 inches PCI connector edge Figure 1-3 5.0 inches 7" card dimensions 7.125 inches 6.875 inches 3.62 inches 4.2 inches PCI connector edge 5.0 inches Overview of Functional Capabilities This section gives an overview of the functional capabilities of the 12" and 7" cards.
C H A P T E R 1 Introduction Processor Capabilities 1 The 12" card has a Pentium-class microprocessor that operates at a clock speed of 100 MHz and supports a 64-bit data bus. The 7" card has a 5x86-class microprocessor that operates at a clock speed of 100 MHz and supports a 32-bit data bus. Both microprocessors have internal L1 caches. Since the microprocessors are different, the PC/PCI chip sets are also different. The 12" card uses an Opti chip set, made up of the 82C556, 82C557, and 82C558 ICs.
C H A P T E R 1 Introduction ▲ WA R N I N G Do not connect a monitor or other video device to the DB15 connector on the 12” and 7” cards. ▲ Audio Support 1 The 12" and 7" cards provide enhanced sound capabilities that are compatible with 16-bit stereo Sound Blaster Pro capabilities.
C H A P T E R 1 Introduction Floppy Disk Drive 1 The Mac OS provides support that allows the cards to access the Macintosh computer’s 3.5-inch internal floppy disk drive. The drive can read and write floppy disks that are DOS MFM (modified frequency modulation) formatted. If you insert a disk that is not DOS formatted when you are using the DOS side of the system, the disk will be promptly ejected from the drive.
C H A P T E R 1 Introduction Joystick and MIDI Devices 1 You can connect a PC-compatible joystick to the DB15 (15-pin) connector on the edge of the cards. This connector is accessible on the rear panel of the Macintosh host computer. However, you need a standard joystick/media adapter to make the connection. The joystick can only be used with programs running on the PC side of the system. You can also connect MIDI devices through the same connector.
C H A P T E R Figure 2-0 Listing 2-0 Table 2-0 2 Hardware Design 2
C H A P T E R 2 Hardware Design As described in Chapter 1, there are two versions of the PC Compatibiity Card: the 12” version and the 7” version. They perform the same functions; however, there are the following differences between the cards: ■ The smaller 7” card is used in Macintosh systems where space is a critical factor. ■ The two cards have different microprocessors and chip sets. ■ The two cards implement onboard DRAM in different ways.
C H A P T E R 2 Hardware Design ■ The PC chip set, which provides a controller for memory, for the PCI bus, and for the ISA bus. the 12” card uses the Opti chip set composed of the 82C556, 82C557, and 82C558 ICs. the 7" card uses the Sis 486-SIS chip set composed of the 85C496 and 85C497 ICs. n n ■ The ATI 264CT integrated VGA (video graphics adapter) graphics accelerator IC with a built in color lookup table (CLUT) for video output.
C H A P T E R 2 Hardware Design Figure 2-2 7" card with featured ICs Side A Slot for DIMM Video DRAM Part of PC chip set ATI 264CT 85C496 5x86 Microprocessor VGA controller PCI edge connector Side B PCI edge connector PCI bridge ASIC Vibra 16S Audio IC 85C497 Part of PC chip set Yamaha OPL3 FM synthesizer Note: PCI edge connector is shown to define orientation.
C H A P T E R 2 Hardware Design Address[31:0] Cache tags Latch Memory controller & PCI bridge PCI muxed address/data bus [31:0] XA[23:9] Tag data (8) Memory data Memory address (12) Memory address Video DRAM 1 MB Memory data[63:0] Data cache DRAM 8 MB Data path IC XA[23:0] 8242 keyboard control 168-pin DRAM DIMM SIO ISA bus & PCI data bridge [31:0] Buffer PCI muxed address/ data bus XD[8:0] External loopback 9 18 26 Data [63:0] VGA accelerator (built-in RAMDAC) Video mux Macintosh
C H A P T E R 2 Hardware Design Address[31:0] A[4:16] Cache tags Buffer Memory controller & PCI bridge PCI muxed address/data bus [31:0] 8 Tag data Memory data Memory address (12) Memory address Video DRAM 1 MB Memory data[63:0] Data cache XA[23:0] 8242 keyboard control 168-pin DRAM DIMM SIO ISA bus [31:0] PCI muxed address/ data bus XD[7:0] External loopback 9 18 26 Data 32 VGA accelerator (built-in RAMDAC) Video mux Video buffer PCI bus bridge I/F Message mailbox Reset block Inter
C H A P T E R 2 Hardware Design Hardware Features 2 This section describes the microprocessors on each card, PCI bus and bus devices, cache operation, byte order, interrupts, bus arbitration, memory controller, BIOS control, system clocks, and system reset. Microprocessors 2 The microprocessor on the 12” card is a Pentium-class microprocessor that runs at 100 MHz. It supports a 64-bit data path and a 32-bit address bus. The 7" card has a 100 MHz 5x86-class processor.
C H A P T E R 2 Hardware Design Byte Order 2 There are two ways of defining the order in which bytes of data are addressed. Big endian is a type of data formatting in which each field is addressed by referring to its most significant byte. The most significant byte is the one with the highest number. For example, if you are accessing a 4-byte, 32-bit data word, the most significant byte is byte 03, and the most significant bit is bit 31.
C H A P T E R 2 Hardware Design a mechanism that allows each device (keyboard, serial port, and so forth) to interrupt the CPU asynchronously. Table 2-1 defines the interrupts used in both cards. Table 2-1 Definition of interrupts Interrupt number Description 1 Keyboard data ready 3 COM2 port 4 COM1 port 5 Sound Blaster 6 Message interface 7 Parallel port 1 (printer) 12 Mouse All transfers between the PC system and the Macintosh host computer are interrupt driven.
C H A P T E R 2 Hardware Design keyboard is still responding, you can restart the PC system using the Ctl-Alt-Del key sequence on the PC keyboard. The Macintosh system bus supports three bus masters: the Macintosh memory controller, the Mustard ASIC on the 12” or 7” card, and any other PCI card in the Macintosh. IMPORTANT Any other PCI card in the Macintosh must be of a different type from the 12” or 7” card. ▲ Table 2-2 summarizes the fixed arbitration device assignments and priorities.
C H A P T E R 2 Hardware Design 12” Card Memory Control—DRAM and External Cache 2 Basic memory for the 12” card is provided by four 2 MB DRAMs that provide 8 MB of memory. The DRAMs are organized as a 1-by-64-megabit memory bank (bank 0), as shown in Figure 2-6. The 12” card has a 168-pin DIMM slot that can accommodate DIMMs with parity-checking capability. (The parity bits are not currently enabled.
C H A P T E R 2 Hardware Design 7” Card Memory Control—DRAM and External Cache 2 DRAM for the 7” card is provided by a 168-pin DIMM that accommodates an 8 MB, 16 MB, 32 MB, or 64 MB DIMM. The 7” card comes with an 8 MB DIMM installed. You can replace this DIMM with one of higher capacity, to provide a maximum DRAM capacity of 64 MB. As shown in Figure 2-7, the DIMM has a 32-bit data bus and is addressed as banks 1 through 4. The 7” card has four static RAMs that make up the 128 KB cache memory.
C H A P T E R 2 Hardware Design Note The 12” and 7” cards have different BIOS because they have different microprocessors and chip sets. ◆ At reset, the microprocessor on the card issues the starting reset-vector address from within the range of addressable memory. The Mustard ASIC remaps this address range down to the lower 1 MB region where the BIOS actually resides.
C H A P T E R 2 Hardware Design Video System 2 The 12” and 7” cards in conjunction with video cards provide a complete video system to support PC video. This system consists of a VGA controller (ATI 264CT) with an integrated CLUT, a digital-to-analog converter (DAC), and a clock generator. PC video out is supported not only on VGA monitors but also on Macintosh fixed-frequency monitors that emulate VGA modes.
C H A P T E R 2 Hardware Design Note The modes listed in Table 2-4 apply to the PC display connected to the system, or to the second Macintosh display, if you have elected to use the 12” or 7” card as a secondary Macintosh display card. ◆ Table 2-4 Monitors and display modes supported Resolution (pixels) Monitor Horizontal scan (kHz) Vertical refresh (Hz) Maximum color depth (bits per pixel) 1 MB video DRAM 2 MB video DRAM 21” color 1152 × 870 68.681 75.
C H A P T E R 2 Hardware Design Video Timing 2 To accommodate the various VGA and SVGA modes on the Macintosh monitors, the video controller must have its timing parameters changed by the BIOS. To do that, the Macintosh software reads the video sense lines and loads the appropriate values for the video BIOS before starting up the PC. The system and video BIOS reside in Macintosh system memory and can be modified by the software.
C H A P T E R 2 Hardware Design Audio IC 2 The Creative Vibra 16S IC provides 16-bit audio support. It is compatible with Sound Blaster 16 and with Roland MPU401 UART (universal asynchronous receiver/ transmitter) mode. It also complies with Multimedia PC Level 2 specifications. The device also has an integrated 16-bit SigmaDelta codec that handles ADP (audio digital processor) inputs, ADP digital outputs, and DAC outputs.
C H A P T E R 2 Hardware Design I/O System 2 The interface between the Macintosh computer and the 12” and 7” cards is provided by the PCI connector, which connects the PCI bus on the PC system with the PCI bus on the Macintosh side. I/O control on the cards is provided by the Mustard ASIC and the 8242 controller, which controls the mouse and keyboard. The Mustard ASIC acts as a bridge between the two PCI buses.
C H A P T E R 2 Hardware Design pins that carry these signals on PC-style DB9 and DB25 connectors, and the signal names on the RS-232 connector.
C H A P T E R 2 Hardware Design “Passing Messages” beginning on page 72 for a description of the software API used for passing messages. Autoconfiguration 2 The Mustard ASIC automatically configures the PC system each time the PC is reset.
C H A P T E R 2 Hardware Design Figure 2-8 GIMO connectors and Berlin adapter card Berlin adapter card Red line Edge connector plugs into GIMO connector socket on main circuit board of CPU GIMO connector on Berlin adapter card GIMO connector socket on Berlin adapter card Ribbon cable GIMO connector plugs into GIMO connector socket on PC compatibility card To make the connection, you plug the GIMO connector on the ribbon cable into the GIMO connector socket on the PCI card, as shown in Figure 2-9.
C H A P T E R 2 Hardware Design Figure 2-9 I/O connections to Power Macintosh 7200 CD-ROM drive or other sound source Audio-in cable Audio-out cable Main circuit board DB15 connector (on CPU board) shared video-out for PC and Macintosh PCI card, full sized or half sized PCI connector Ribbon cable Berlin adapter card 16-pin GIMO connector (on CPU board) Loop-Back Video Support 2 The Power Macintosh 7500, 8500, and 9500 CPUs do not have a GIMO connector socket to support the Berlin adapter card.
C H A P T E R 2 Hardware Design Figure 2-10 I/O connections to Power Macintosh 7500 and 8500 CD-ROM drive or other sound source Audio-in cable Audio-out cable Main circuit board (no GIMO connector) DB15 connector (built-in) for Macintosh video-out To Macintosh video-out connector PC card Loop-back cable PCI connector DB26 connector for PC card’s video output PC card’s DB26 video connector Monitor cable Monitor Audio and Video I/O Support 31
C H A P T E R 2 Hardware Design Figure 2-11 I/O connections for Power Macintosh 9500 CD-ROM drive or other sound source Audio-in cable Audio-out cable Main circuit board (no GIMO connector and no built-in video) To Macintosh video out connector PC card PCI connector Loop-back cable DB26 connector DB15 connector (on PCI video card) Mac video out PC card’s DB26 video connector Monitor cable Monitor Audio I/O Support 2 The 12” and 7” cards have connectors for audio I/O located on the edge of the c
C H A P T E R Figure 3-0 Listing 3-0 Table 3-0 3 I/O Specifications 3
C H A P T E R 3 I/O Specifications The 12” and 7” PC Compatibility Cards interface with other elements in the system, such as the main CPU, the monitor, sound devices, and video devices, through a variety of connectors located on the cards. Figure 3-1 shows the physical locations of the I/O connectors on the 12” card. Figure 3-2 shows the locations of the connectors on the 7" card. The way the interface is implemented depends on the CPU in which the card is installed.
C H A P T E R 3 I/O Specifications Figure 3-2 Locations of I/O connectors for the 7” card CD sound in Game I/O (DB15) Sound out 168-pin DIMM connector GIMO connector Video connector (DB26) Ribbon cable PCI edge connector XD connector Mounting bracket for DB connectors PCI Connector Berlin adapter card This edge plugs into the Macintosh CPU main circuit board 3 The PCI local bus is a bus architecture that allows you to connect cards such as the 12” and 7” cards to the computer’s main circuit b
C H A P T E R 3 I/O Specifications Figure 3-3 PCI bus signals used in the 12” and 7” cards AD[31:0] Address and data ADCBE[3:0] L ADPAR ADPCICLK System ADRESET L ADFRAME L ADTRDY L ADIRDY L Interface control ADSTOP L PCI bus ADDEVSEL L ADIDSEL L ADLOCK L ADREQ L Arbitration ADGNT L ADPERR Error reporting ADSERR Table 3-1 36 PCI bus specifications Feature Description Bus clock rate 33 MHz Addressing Dynamic Signal loading One load per signal Transaction length determination Deter
C H A P T E R 3 I/O Specifications Table 3-1 PCI bus specifications (continued) Feature Description Timeout 5 bus clocks Burst capability Any number of bytes Power allocation 25 W per card for 12” card 15 W per card for 7” card With respect to the pin assignments and signal descriptions listed in Table 3-2, you should note the following: ■ An “L” used as a suffix to the signal name, for example, FRAME L, indicates a signal that is active when driven low.
C H A P T E R 3 I/O Specifications Table 3-2 38 PCI connector pin assignments Pin number Signal Description A6 IRQ L This is a maskable interrupt request resulting from various IRQ sources. Use of interrupts is optional on the PCI bus. A15 RESET L This is the reset signal. When it is driven low, all PCI registers, sequences, and signals are reset to a consistent state. If the signals are tristate, this means that they are returned to the tristate (off) condition.
C H A P T E R 3 I/O Specifications Table 3-2 PCI connector pin assignments (continued) Pin number Signal Description A36 TRDY L This is the target-ready signal. When it is asserted, it indicates that the selected device, in this context the 12” or 7” card, is able to complete the current data phase of the bus transaction. If a write cycle is in progress, TRDY L going active (low) indicates that valid data is present on the AD(31:0) lines.
C H A P T E R 3 I/O Specifications Table 3-2 40 PCI connector pin assignments (continued) Pin number Signal Description A54 AD(6) Address/data bit 6. A55 AD(4) Address/data bit 4. A57 AD(2) Address/data bit 2. A58 AD(0) Address/data bit 0. B16 PCI CLK This PCI clock input supplies timing for all transactions on the PCI bus. All other PCI signals, with the exception of RESET L and IRQ L, are sampled on the rising edge of PCI CLK.
C H A P T E R 3 I/O Specifications Table 3-2 PCI connector pin assignments (continued) Pin number Signal Description B37 DEVSEL L This is the device select signal. When a device has decoded the device address and recognizes itself as the target of the current access, it outputs this signal. The signal is input to the host, indicating that a device on the bus has been selected.
C H A P T E R 3 I/O Specifications Table 3-2 42 PCI connector pin assignments (continued) Pin number Signal Description A1 GND (TRST L) On the 12” and 7” cards, this pin is connected to ground. On the PCI bus, it may be used for Test Reset, which asynchronously initializes the TAP (Test Access Port) controller. B2 GND (TCK) On the 12” and 7” cards, this pin is connected to ground.
C H A P T E R 3 I/O Specifications Table 3-2 PCI connector pin assignments (continued) Pin number Signal Description A21, A27, A33, A39, A45, A53, B25, B31, B36, B41, B43, B54 Not connected (+3.3 V) On the 12" and 7" cards, these pins are not connected. On the PCI bus, they are connected to the +3.3 V power supply. A40 Not connected (SDONE) On the 12" and 7" cards, this pin is not connected.
C H A P T E R 3 I/O Specifications Table 3-2 PCI connector pin assignments (continued) Pin number Signal Description B40 Not connected (PERR L) On the 12" and 7" cards, this pin is not connected. On the PCI bus, it is used for Parity Error, which reports data parity errors during all PCI transactions except special cycles. B42 Not connected (SERR L) On the 12" and 7" cards, this pin is not connected.
C H A P T E R 3 I/O Specifications DB26 Connector 3 The DB26 connector allows you to connect a monitor to the PC system. It is used with CPUs that do not have a GIMO connector and therefore do not support the Berlin adapter card. The DB26 connector provides a loop-back connection to the video output connector on the CPU main logic board. The loop back is implemented by a split video cable that also provides a connector for an external monitor.
C H A P T E R 3 I/O Specifications DB15 Connector (Game Port) 3 The DB15 connector allows you to connect MIDI devices to the card. It also allows you to connect a PC-compatible joystick, which can be used as a game controller. See Figure 3-1 on page 34 for the location of the connector on the 12" card, and Figure 3-2 on page 35 for the location of the connector on the 7” card.The joystick can be used only with programs running on the PC side of the system.
C H A P T E R 3 I/O Specifications Figure 3-1 on page 34 and Figure 3-2 on page 35 show the location of this connector on the 12" and 7" cards, respectively. “GIMO Support for Video Output” on page 28 provides more information about this type of interface. Table 3-6 shows the pin assignments for the GIMO 16-pin connector, Molex part number 87256-1641, or AMP part number 104338-3. The connector is at location J11 on the 12" card and J4 on the 7” card. The pin assignments are the same for each card.
C H A P T E R 3 I/O Specifications lists the pin assignments and signal descriptions for the four-pin audio connectors, JST part number B-4B-PH-K. The connector at location J5 is for audio input, and the connector at J6 for audio output. Table 3-7 Audio connector pin assignments Pin number Signal Connector location Description 1 n.c. J5 Not connected 2 CD INR J5 CD input right channel 3 CD GND J5 Ground 4 CD INL J5 CD input left channel 1 n.c.
C H A P T E R 3 I/O Specifications Table 3-8 DIMM connector pin assignments (continued) Pin number 12” card 7” card Signal Description Signal Description 8 MD(5) Data bit 5 D(5) Data bit 5 9 MD(6) Data bit 6 D(6) Data bit 6 10 MD(7) Data bit 7 D(7) Data bit 7 13 MD(8) Data bit 8 D(8) Data bit 8 14 MD(9) Data bit 9 D(9) Data bit 9 15 MD(10) Data bit 10 D(10) Data bit 10 16 MD(11) Data bit 11 D(11) Data bit 11 17 MD(12) Data bit 12 D(12) Data bit 12 19 MD(1
C H A P T E R 3 I/O Specifications Table 3-8 DIMM connector pin assignments (continued) Pin number 50 12” card 7” card Signal Description Signal Description 55 MD(18) Data bit 18 D(18) Data bit 18 56 MD(19) Data bit 19 D(19) Data bit 19 57 MD(20) Data bit 20 D(20) Data bit 20 58 MD(21) Data bit 21 D(21) Data bit 21 60 MD(22) Data bit 22 D(22) Data bit 22 65 MD(23) Data bit 23 D(23) Data bit 23 67 MD(24) Data bit 24 D(24) Data bit 24 69 MD(25) Data bit 25 D(
C H A P T E R 3 I/O Specifications Table 3-8 DIMM connector pin assignments (continued) Pin number 12” card 7” card Signal Description Signal Description 112 CAS(1) Column address strobe byte 1 BCAS(1) Column address strobe byte 1 113 CAS(3) Column address strobe byte 3 BCAS(3) Column address strobe byte 3 114 RAS(3) Row address strobe byte 3 DRAS(3) Row address strobe byte 3 117 MA(1) Address bit 1 BMA(10) Address bit 10 118 MA(3) Address bit 3 BMA(8) Address bit 8 119
C H A P T E R 3 I/O Specifications Table 3-8 Pin number DIMM connector pin assignments (continued) 12” card 7” card Signal Description Signal Description 156 MD(60) Data bit 60 D(28) Data bit 28 158 MD(61) Data bit 61 D(29) Data bit 29 159 MD(62) Data bit 62 D(30) Data bit 30 160 MD(63) Data bit 63 D(31) Data bit 31 1, 12, 23, 31, 32, 43, 44, 54, 68, 78, 85, 96, 107, 116, 127, 138, 152, 162 GND Ground GND Ground 6, 18, 26, 40, 49, 59, 73, 84, 90, 102, 110, 133, 143, 157, 1
C H A P T E R 3 I/O Specifications then connecting a hardware key to the expansion card. The XD connector may also be used for a sound expansion card. The XD connector is a 50-pin connector, JAE part number KX15-50K3E9. Table 3-9 shows the pin assignments for this connector.
C H A P T E R 3 I/O Specifications Table 3-9 54 XD connector pin assignments (continued) Pin number Signal Description 28 SA(1) S address bit 1 30 SA(0) S address bit 0 31 DACK(3) DMA acknowledge 3 32 TC Terminate count 33 BALE Bus address latch enable 34 SA(2) S address bit 2 35 IOCHRDY I/O check ready 36 SA(8) S address bit 8 37 SA(5) S address bit 5 38 IRQ(10) Interrupt request 10 39 ATCLK AT clock 40 XD(0) Buffered data bit 0 41 SA(3) S address bit 3 42 +
C H A P T E R Figure 4-0 Listing 4-0 Table 4-0 4 Software Support 4
C H A P T E R 4 Software Support The interface driver for the 12” and 7” PC Compatibility Cards controls communication between them and the Mac OS (Macintosh Operating System). Applications running on the Mac OS can use the driver to configure and control the cards. Applications running in both environments can use the driver to exchange messages.
C H A P T E R 4 Software Support Configuring the PC System 4 An application running on the Mac OS can use the interface driver to configure the PC system.
C H A P T E R 4 Software Support The RSFixedDriveConfig data structure pointed to by csParam is shown below. typedef struct{ short type; // Type of device this drive is short vRefNum; // Volume refNum or SCSI ID long dirID; // Directory ID or starting sector number on SCSI drive long fileNamePtr; // Filename or number of sectors on SCSI drive } RSFixedDriveConfig[4], *RSFixedDriveConfigPtr; Field descriptions RSFixedDriveConfig[0] Contains the configuration for drive A:.
C H A P T E R 4 Software Support rsGetNetDriveConfig 4 You can use the rsGetNetDriveConfig control routine to obtain configuration data about the drives. This routine returns a pointer to an array of 22 RSNetDriveConfig data structures, one for each drive letter from E through Z. The status code for this routine is rsGetNetDriveConfig = 650. Parameter block —> indicates input to the driver <— indicates output from the driver —> ioCompletion long Pointer to the completion routine.
C H A P T E R 4 Software Support rsSetNetDriveConfig 4 You can use the rsSetNetDriveConfig control routine to establish links between Macintosh directories and PC system drive letters. The call simply notifies the interface driver that an entry in the RSNetDriveConfig data structure has been modified. The control code for this routine is rsSetNetDriveConfig = 600.
C H A P T E R 4 Software Support —> ioRefNum word Device driver’s reference number. —> csCode word Equals rsSetComPortConfig. —> csParam+0 long Pointer to RSComConfig. A pointer to an RSComConfig data structure is passed in the csParam field. typedef struct{ short type; // Port type (rsModemComPort, rsPrinterComPort, etc.
C H A P T E R 4 Software Support rsSetParallelPortConfig 4 You can use the rsSetParallelPortConfig control routine to set the configuration of the parallel port emulation. The parallel port is used for a printer. A pointer to an RSParallelConfig data structure is passed in csParam. When a print job has been completed, the driver notifies the application by means of the rsSetNotificationProc procedure, defined in “rsSetNotificationProc” on page 70.
C H A P T E R 4 Software Support keyboard, the driver monitors the keyboard input data for the deactivate key combination and calls the user-defined task when that key combination occurs. The status code for this routine is rsDeactivateKey = 104. The user-defined task is called during NeedTime, which is the period after the deactivate key and modifiers are pressed. (If a driver has the dNeedTime flag set, it gets called in round-robin fashion at System Task time.
C H A P T E R 4 Software Support ■ terminate print spooling from the PC system In some instances, for example, in the case of bits 0, 1, and 7, it is better to use the Gestalt function. Refer to “Gestalt Selector” on page 78 for further information. Note Applications can call Gestalt to get information about the operating environment. The Gestalt function then calls other selector functions.
C H A P T E R 4 Software Support Table 4-1 PC status word (continued) Bit Meaning 4 1 = disk mounting enabled (rsDiskMountEnabled) 5 1 = shared memory enabled (rsSharedEnabled) 6 1 = DMA enabled (rsDMAEnabled) 7 1 = video cable enabled (rsCableInstalled) 8 1 = modem port is used by COM1 9 1 = printer port is used by COM1 10 1 = modem port is used by COM2 11 1 = printer port is used by COM2 24–31 Reserved rsEnableVideo 4 You can use the rsEnableVideo control routine to enable the V
C H A P T E R 4 Software Support Parameter block —> indicates input to the driver <— indicates output from the driver —> ioCompletion long Pointer to the completion routine. <— ioResult word Device driver’s result code. —> ioRefNum word Device driver’s reference number. —> csCode word Equals rsDisableVideo. rsMountDisks 4 You can use the rsMountDisks control routine to enable PC disks to be mounted and unmounted.
C H A P T E R 4 Software Support rsDontMountDisks 4 You can use the rsDontMountDisks control routine to stop the interface driver from monitoring disk-insertion events. If the interface driver has already mounted a PC disk before you make this call, the PC disk remains in the drive and available to the PC system. The status code for this routine is rsDontMountDisks = 502.
C H A P T E R 4 Software Support rsDeactivateKB 4 You can use the rsDeactivateKB control routine to stop transmission of keyboard data to the PC system and direct the keyboard data to the Mac OS. The status code for this routine is rsDeactivateKB = 103. Parameter block —> indicates input to the driver <— indicates output from the driver —> ioCompletion long Pointer to the completion routine. <— ioResult word Device driver’s result code. —> ioRefNum word Device driver’s reference number.
C H A P T E R 4 Software Support rsEndMouseTracking 4 You can use the rsEndMouseTracking control routine to direct the mouse movements and button presses to the Mac OS. This routine also causes the driver to show the Macintosh cursor. The status code for this routine is rsEndMouseTracking = 202. Parameter block —> indicates input to the driver <— indicates output from the driver —> ioCompletion long Pointer to the completion routine. <— ioResult word Device driver’s result code.
C H A P T E R 4 Software Support Detecting Errors 4 Applications running on the Mac OS can use the routines described in this section to detect error conditions or other special events on the PC system. Table 4-2 summarizes the return codes used to indicate PC system printing or serial communication errors.
C H A P T E R 4 Software Support Upon return, the parameters are set as follows: <— csParam+0 long Pointer to the previous notification procedure. <— csParam+4 long Previous A1Param value. The caller passes a pointer to the user-defined procedure and to a parameter that is passed to that procedure in the A1Param value. The control routine returns the previous values. Calling rsSetNotificationProc with a NULL pointer disables the notification procedure.
C H A P T E R 4 Software Support Passing Messages 4 Applications running on the Mac OS and the PC system can send messages to each other by calling the interface driver. Applications can also install a receive procedure for receiving messages. When the interface driver receives a message that is intended for your application, the driver calls your receive procedure. Your procedure then decides whether or not to accept the data in the message and, if it accepts the data, where to store it.
C H A P T E R 4 Software Support calling the driver with a 32-bit selector that is defined in both applications and with a count of the number of messages to be used by the applications. The interface driver allocates a range of messages for that selector and returns the base command number to the caller. The interface driver makes sure that both the PC application and the Macintosh application registering messages under the same selector will receive the same base command number.
C H A P T E R 4 Software Support After the message has been sent, the msgResult field is set to 0 (no error) or -3 (MsgTimeout). The msgActCount field contains the number of bytes actually sent. If you have specified a completion routine, it is then called. Sending a Message From the Mac OS 4 To send a message on the Mac OS, build a MsgPBlk data structure and then pass the pointer to the interface driver in an rsSendMessage control call.
C H A P T E R 4 Software Support Note Deferred time refers to deferred task time. Hardware and software interrupts occur all the time. The system processes these interrupts. After doing so, but before returning control to the interrupt process, the system looks for any registered deferred tasks and executes them. Refer to Inside Macintosh: Processes for further information on this subject.
C H A P T E R 4 Software Support structure. The driver passes the message’s 16-bit command and the two 32-bit parameters to your message handler. Refer to “Installing a Message Handler on the Mac OS” on page 76 and “Installing a Message Handler on the PC System” on page 77 for information about about the format of the MsgRecElem data structure. The message handler examines the command and parameters and determines whether there is any data to be received.
C H A P T E R 4 Software Support Parameter block —> indicates input to the driver <— indicates output from the driver —> ioCompletion long Pointer to the completion routine. <— ioResult word Device driver’s result code. —> ioRefNum word Device driver’s reference number. —> csCode word Equals rsInstallMesHandler. —> csParam+0 long Pointer to MsgRecElem. When your message handler procedure is called, register D0.w contains the message command, register D1.
C H A P T E R 4 Software Support called at interrupt time with interrupts turned off. It can use registers AX, BX, CX, DX, DI, SI, ES, and DS. The completion routine for the MsgPBlk structure returned by the receive procedure is called at interrupt time and can use registers AX, BX, CX, DX, DI, SI, ES, and DS. You must save all other registers. ES:BX must also contain a pointer to the MsgPBlk structure. Removing a Message Handler 4 Message handlers can be called until they are removed.
C H A P T E R 4 Software Support pc (pc followed by two spaces). Only 4 bits of the word are currently in use, as shown below. The remaining 28 bits are undefined. gestaltDOSCompatibleState = pc enum { gestaltPCInstalled, gestaltPCRunning, gestaltPCHasTakenOver, gestaltPCSharingMonitor }; Field descriptions gestaltPCInstalled This is bit 0. If it is high, the PC Setup Init has been run and is installed. gestaltPCRunning This is bit 1. It tells the caller whether or not the PC system is running.
C H A P T E R 4 Software Support Summary of Constants 4 Table 4-4 provides a summary of the constants associated with the routines described in this chapter.
C H A P T E R 4 Software Support Table 4-4 Summary of constants (continued) Call and constant Code/ call type Description PC event detection—notification procedure or event notification Notification Sets address of the notification procedure rsRegisterMessage = 803 Control Registers message type rsInstallMsgHandler = 801 Control Installs message handler rsSendMessage = 800 Control Sends a message rsRemoveMsgHandler = 802 Control Removes message handler msgNoError = 0 Result No errors
C H A P T E R 4 Software Support Supplementary Information 4 The value cmdCount is needed to register a message. It contains the number of different types of messages an application would like to support. For example, if an application wants to send two types of messages (“send DOS command” and “receive error code”) between the Macintosh computer and the PC system, it would set this value to 2.
C H A P T E R 4 Software Support pbp.csCode = rsSendMessage; = 800 // The message you wish to pass pbp.csPtr = pMsg; err = PBControl((ParmBlkPtr)&pbp); Remove message = 802 Supplementary Information 4 The WrComp procedure is used by the message system to inform the application that the message is complete. This allows the application to do whatever other processing is needed based on the completion of the message being passed.
Index Numerals 8242 keyboard/mouse controller 27 A abbreviations x address translation 21 ADP (audio digital processor) 25 APDA addresses xii arbitration priorities 18 audio chip 25 connectors 6, 47 IC 11, 24 support 6 system 24 autoconfiguration 28 B Berlin adapter card 6, 28, 30, 45 big-endian format 16 BIOS (basic input/output system control 20 BIOS (basic input/output system) 8 and memory sizing 20 bus arbitration 17 bus masters 17, 18 bus snooping 15 byte order 16 C cache 10, 19, 20 capabilities 5 c
I N D E X rsSetNotificationProc 81 rsSetParallelPortConfig 80 rsSpoolComPort 80 control calls 63 conventions x D DAC (digital-to-analog converter) 22, 24 DAP (digital audio processor) 25 DB15 connector 46 DB26 connector 45 detecting errors 70 differentiators 10 DIMM connector 48 DIMMs 10, 19, 20 capabilities 5 sensing 20 display modes supported 23 dongles 52 DRAMs 10, 19, 20 capabilities 5 control 18, 19, 20 E error detection 70 expansion card for sound 52 external cache 19 external monitor 29 hard disk
I N D E X M, N, O Macintosh-PC interface 2 Mac MsgBlk ≠ PC MsgBlk 81 memory capabilities 5 memory controller 18 message handler installing 75 removing 78 message mailbox 27 messages passing 72 registering 72 sending 73 messaging code samples 81 constants 81 microprocessors 15 MIDI devices 8, 46 connecting 25 monitors built-in 29 connecting 22 connection 45 external 29 second 30 sensing 22 shared configurations 22 supported 22, 23 mouse controller 27 support 7 msgNoError 81 msgTimeout 81 msgUnderrun 81 Must
I N D E X rsGetNetDriveConfig 59, 80 rsInstallMsgHandler 81 rsLastError 71 rsModemComPort 80 rsMountDisks 66 rsMsgOverrun 81 rsPCStatus 64 rsPrinterComPort 80 rsPrintSpoolErr 80 rsPSFileReady 80 rsRegisterMessage 81 rsRemoveMsgHandler 81 rsSendMessage 81 rsSetComPortConfig 60, 80 rsSetDeactivateKey 62 rsSetDriveConfig 57 rsSetNetDriveConfig 60, 80 rsSetNotificationProc 70, 81 rsSetParallelPortConfig 62, 80 rsSpoolComPort 80 S second monitor 30 sending messages 73, 82 sensing DIMMs 28 serial port support 7
T H E A P P L E P U B L I S H I N G This Apple manual was written, edited, and composed on a desktop publishing system using Apple Macintosh computers and FrameMaker software. Proof pages and final pages were created on an Apple LaserWriter Pro printer. Line art was created using Adobe Illustrator™ and Adobe Photoshop™. PostScript™, the page-description language for the LaserWriter, was developed by Adobe Systems Incorporated. Text type is Palatino® and display type is Helvetica®.