,_ ® ForMacintoshPlus, Guideto the Macintosh® FamilyHardware MacintoshSE, MacintoshSF/30, by AppleComputer,Inc. MacintoshPortable, MacintoshII, Macintosh!Ix, Macintoshflex, MacintoshIlci, and MacintoshJlfx SecondEdition Ji,. TT Addison Wesley 52405 .® ForMacintoshPlus, Guideto the MacintoshSE, MacintoshSFJ30, Macintosh®FamilyHardware MacintoshPortable, MacintoshII, SecondEdition MacintoshIlx, MacintoshIlcx, Macintosh!lei, and MacintoshIlfx ... ...... Addison-Wesley PublishingCompany,Inc. Reading,MassachusettsMenloPark,CaliforniaNewYork DonMills,Ontario Wokingham,England AmsterdamBonn Sydney SingaporeTokyo Madrid Sanjuan 9 APPLE COMPUTER, INC. Simultaneouslypublishedin the All rightsreserved.Nopartof this IN NOEVENT Will APPLEBE publicationmay be reproduced, UnitedStatesand Canada. UABLEFORDIRECT, INDIRECT, storedin a retrievalsystem,or ISBN0-201-;2405-8 SPECIAL, INCIDENTAL, OR transmitted,in any formor by any 3 4 5 6 7 8 9 J0-MU-95 94 93 92 91 CONSEQUENTIAL DAMAGES means,mechanical,electronic, Third printing, December 1990 RESULTING FROMANYDEFECT photocopying,recording,or OR INACCURACY IN rms otherwise,withoutpriorwritten Libraryof Congress MANUAL, evenif advisedof the permissionof AppleComputer,Inc. Cataloging-in-Publication Data possibilityof such damages. Printedin the UnitedStatesof Guideto the Macintosh America. FamilyHardware.-- 2nd ed. TIIEWARRANTY ANDREMEDIES p. cm. SETFORfflABOVE ARE © AppleComputer,Inc., 1990 EXCLUSIVE ANDIN LIEUOFAll 20525MarianiAvenue "ForMacintoshPlus,MacintoshSE, OTIIERS, ORAL ORWRITTEN, Cupertino,CA 95014-6299 MacintoshSE/30,MacintoshPortable, EXPRF.sS ORIMPLIED. No Apple (408)996-1010 MacintoshII, MacintoshIlx, dealer,agent,or employeeis Apple,the Applelogo,AppleIIGS, MacintoshHex,MacintoshIlci, authorizedto make any AppleLink, A/UX, AppleTalk, and MacintoshIlfx." modification,extension,or addition LaserWriter,Macintosh,and SANEare Preparedby AppleComputer,Inc. to thiswarranty. registeredtrademarksof Apple ISBN0-201-52405-8 Computer,Inc. Somestatesdo not allowthe 1. Macintosh(Computer) exclusionor limitationof implied APDA,AppleColor, AppleDesktop I. AppleComputer,Inc. warrantiesor liabilityfor incidental Bus,FDHD,MPW,QuickDraw,and QA76.8.M3G85 1990 621.39'16--dc20 or consequentialdamages,so the SuperDriveare trademarksof Apple 90-34142 above limitationor exclusionmay Computer,Inc. not applyto you.Thiswarrantygives WARRANTY INFORMATION you specificlegalrights,and you POSTSCRIPT is a registeredtrademark, mayalso have other rightswhich and Illustratoris a trademark,of All IMPLIED WARRANTIES ON varyfromstateto state. AdobeSystemsIncorporated. TIDS MANUAL, INCLUDING UNIXis a registeredtrademarkof IMPLIED WARRANTIES OF AT&TInformationSystems. MERCHANTABILITY AND FITNESS FORA PARTICULAR PALis a registeredtrademark PURPOSE, AREllMITEDIN of InternationalBusiness DURATION TONINETY(90) DAYS MachinesCorp. FROM TIIEDATEOFTIIE ITCZapfDingbatsis a registered ORIGINAL RETAIL PURCHASE OF trademarkof InternationalTypeface nusPRODUCT. Corporation. EventhoughApplehas reviewed Microsoftis a registeredtrademarkof this manual,APPLEMAKES NO MicrosoftCorporation. WARRANTY OR REPRF.sENTATION, EITHER Motorolais a registeredtrademarkof EXPRESS OR IMPLIED, Wffll Motorola,Inc. RF.sPECT TOnusMANUAL, ITS Sonyis a trademarkof Sony QUALITY, ACCURACY, Corporation. MERCHANTABILITY, OR FITNESS FORA PARTICULAR PURPOSE. AS NuBusis a trademarkof Texas · Instruments. A RF.sULT,nus MANUAL IS SOLD "ASIS," ANDYOU,TIIE Zilogis a registeredtrademarkof PURCHASER, AREASSUMING Zilog,Inc. TIIEENTIRE RISKASTO rrs QUALITY ANDACCURACY. Contents Figuresand tables / xv Preface AboutThis Book / xxix Whatthis book containsI xxx Organization/ xxx Approach/ xxxi Visualcuesand conventions/ xxxii Assembly-languagevariablenames/ xxxiii Additionalreading/ xxxiii Aboutthe Macintoshtechnicaldocumentation/ xxxiv Howto get moreinformation/ xxxvi APDAI xxxvi UsergroupsI xxxvi AppleDeveloperServices/ xxxvii 1 Introductionto the MacintoshHardware/ 1 Exteriorfeaturesof the Macintoshcomputers/ 6 Macintosh 128K,512K,and 512Kenhancedcomputers/ 6 Macintosh Pluscomputer/ 8 Macintosh SEand Macintosh SE/30computers/ 8 MacintoshPortablecomputer/ 12 MacintoshII-familycomputers/ 13 Insidethe Macintoshcomputers/ 18 ClassicMacintoshcomputers/ 18 Macintosh SEand Macintosh SE/30computers/ 20 _Macintosh SEcomputer/ 20 Macintosh_SE/30computer/ 22 MacintoshPortablecomputer/ 23 MacintoshII-familycomputers/ 26 Macintosh II and MacintoshIIx computers/ 26 iii MacintoshHex and Macintoshllci computers/ 29 The MacintoshIlfx computer/ 32 Memory-mapped deviceselection/ 34 Addressmapsfor 24-bitaddresses/ 35 Using32-bitaddressesI 40 Addressmapsfor 32-bitaddresses/ 40 Translating24-bitaddressesto 32-bitaddresses/ 45 2 Architectureof the MacintoshComputers/ 47 Blockdiagrams/ 49 Compactand portableMacintoshmodelsI 49 MacintoshII family/ 55 Databuses / 60 RAMdata-busbuffersI 60 Centralprocessingunits(CPUs)I 61 Interrupts/ 62 Unimplemented instructions/ 63 Mathematics coprocessors(FPUs)I 63 Macintosh II memorymanagementunit / 64 PowerManagermicroprocessor / 64 GeneralogiccircuitsI 65 RAMI 65 Readingdata fromRAM/ 66 VideoRAMI 66 CacheRAMI 67 CacheRAMin the Macintosh Ilfxcomputer/ 67 CacheRAMin the Macintosh Ilci computer/ 68 ROM/ 68 Built-invideo / 69 VideocircuitsI 69 Screen-buff er sizes I 70 SoundcircuitsI 71 Macintosh SEand classicMacintoshsound circuits/ 71 AppleSoundChip/ 72 Disk-speedcontrolI 72 VIAs I 73 Non-ADB keyboardinterface/ 74 Non-ADB mouseinterfaceI 75 AppleDesktopBus / 75 iv Guideto the MacintoshFamilyHardware Real-timeclock I 77 SCSII 78 IWMand SWIMI 80 secI 82 1/0 ProcessorsI 83 MacintoshexpansioninterfacesI 83 expansioninterfacesI 84 Processor-direct NuBusexpansioninterfacesI 84 3 Processorsand GeneralLogic / 87 Mainprocessor/ 89 MC68000 and MC68HC000 microprocessors / 90 Featuresof the MC68000 / 90 MC68000 interrupts/ 91 Interruptson classicMacintoshcomputers/ 92 Interruptson the MacintoshSEcomputerI 93 Interruptson the MacintoshPortablecomputerI 95 MC68020 microprocessorI 96 Featuresof the MC68020/ 96 MC68020 interrupts/ 97 MC68030 microprocessorI 100 MC68030 enhancements/ 100 MC68030 interrupts/ 101 Traps/ 103 processorsI 104 Auxiliary Memorymanagementunitsin the MacintoshII computer/ 105 AddressManagement Unit(AMU)/ 105 PagedMemoryManagement Unit(PMMU)/ 105 MC68881 and MC68882 mathematicscoprocessors/ 107 PowerManagerIC in the MacintoshPortablecompu_ter / 108 IOPsin the MacintoshIlfx computer/ 109 IOP interfaceI 109 IOPfor the sec/ 110 IOPfor the SWIMand ADB/ 110 GeneralogiccircuitsI 111 PALsin the classicMacintoshcomputers/ 111 Generalogiccircuitsin the MacintoshSEcomputer/ 112 BBUcustomIC / 112 GLUcustomIC / 113 Contents v GLUEin the Macintosh SE/30,MacintoshII, and MacintoshIIx computers/ 113 VideoPALsin the Macintosh SE/30computer/ 114 Generallogiccircuitsin the MacintoshIIcicomputer/ 115 MemoryDecodeUnit(MDU)/ 115 MDUfunctionsspecificto the MacintoshIIci / 115 MDUfunctionsimilarto the GLUE/ 115 RAM-Based Videocontroller(RBV)/ 116 RBVfunctionsimilarto the GLUE/ 116 VIAregistersin the RBV/ 116 Videofunctionsof the RBV/ 117 Generallogiccircuitsin the MacintoshPortablecomputer/ 117 CPUGLUcustomIC / 118 Miscellaneous GLUcustomIC / 118 VOicustomIC / 118 Generalogiccircuitsin the Macintosh IIfxcomputer/ 119 OperatingSystemSupport(OSS)/ 119 FastMemoryController(FMC)I 120 Addressmaps / 120 Addressmap for the classicMacintoshcomputers/ 122 Addressmap for the Macintosh SEcomputer/ 125 Addressmap for the MacintoshPortablecomputer/ 128 Addressmap for the Macintosh SE/30computer/ 130 Addressmap for the MacintoshII, MacintoshIIx, and MacintoshIIcx computers/ 135 Addressmap for the Macintosh IIcicomputer/ 141 Addressmap for the MacintoshIIfxcomputer/ 141 Real-timeclock(RTC)/ 144 Sendingcommandsto the RTC/ 145 The one-secondinterrupt/ 145 4 VersatileInterfaceAdapter(VIA)ICs / 147 Functionsperformedby the VIAs / 150 VIAfunctionsin the classicMacintoshcomputers/ 151 VIAfunctionsin the Macintosh SEcomputer/ 151 VIAfunctionsin the MacintoshPortablecomputer/ 152 VIAfunctionsin the MacintoshSE/30and MacintoshII-family computers/ 153 Functionsof VIAl / 153 vi Guideto the MacintoshFamilyHardware Functionsof VIAlin the MacintoshII, MacintoshIIx, and MacintoshIIcx computers/ 153 Functionsof VIAlin the MacintoshSE/30computer/ 154 Functionsof VIAlin the MacintoshIIcicomputer/ 154 Functionsof VIAlin the MacintoshIIfxcomputer/ 154 VIAlfunctionshandledby IOPsin the MacintoshIIfx computer/ 155 VIAlfunctionshandledby the OSSin the MacintoshIlfx / 155 Functionsof VIA2I 155 Functionsof VIA2in the MacintoshSE/30,MacintoshII, MacintoshIIx, and MacintoshIIcx computers/ 156 VIA2functionsin the MacintoshIIcicomputer/ 157 VIA2functionsin the MacintoshIlfx computer/ 157 VIAregistersI 158 DataregisterA / 159 DataregisterA in machineswithonlyoneVIA/ 160 VIADataregisterA in the classicMacintoshcomputers/ 160 VIADataregisterA in the MacintoshSEcomputer/ 161 VIADataregisterA in the MacintoshPortablecomputer/ 161 DataregisterA in VIAl/ 162 VIAlDataregisterA in the MacintoshSE/30,MacintoshII, MacintoshIIx, and MacintoshIIcx computers/ 162 VIAlDataregisterA in the MacintoshIIcicomputer/ 164 VIAlDataregisterA in the MacintoshIIfxcomputer/ 164 DataregisterA in VIA2/ 165 DataregisterB / 167 DataregisterB in machineswithonlyone VIA/ 167 DataregisterB in VIAl / 171 DataregisterB in VIA2I 173 PeripheralControlregister/ 176 PeripheralControlregisterin VIAlor VIA/ 176 · PeripheralControlregisterin VIA2/ 178 Auxiliary Controlregister/ 179 Shiftregister/ 182 Eventtimers/ 182 registersI 183 Processor-interrupt InterruptFlagregister/ 184 InterruptEnableregister/ 186 Contents vii 5 Memory / 189 RAM/ 191 RAMaddressesin MC68000-based models/ 191 RAMaddressesin MC68020-based and MC68030-based modelsI 192 RAMaccesscycles/ 194 RAMaccessrate in the MacintoshPluscomputer/ 194 RAMaccessrate in the Macintosh SEcomputer/ 195 RAMaccessrate in the MacintoshPortablecomputer/ 195 RAMaccessrate in the Macintosh SE/30,MacintoshII, MacintoshIIx, and MacintoshIIcx computers/ 195 RAMaccessrate in the MacintoshIIcicomputer/ 195 RAMaccessrate in the Macintosh Ilfx computer/ 196 RAMconfiguration in the Macintosh128K,512K,and 512KenhancedcomputersI 196 RAMconfiguration in the MacintoshPlusand MacintoshSEcomputers/ 197 RAMconfiguration in the MacintoshPortablecomputer/ 205 PermanentRAM/ 205 InternalexpansionRAM/ 206 RAMconfiguration in the MacintoshSE/30and MacintoshII-familycomputers/ 209 VideoRAMin the Macintosh Ucicomputer/ 221 ParityRAMin the Macintosh IIcicomputer/ 222 ParityRAMin the MacintoshIIfxcomputer/ 222 RAMcachecardin the Macintosh IIcicomputer/ 223 Operationof a cachecard / 223 Readingwitha cachehit / 224 Readingwitha cachemiss / 224 Writing/ 224 Controlling the cachecard / 225 CachecardconnectorI 225 RAMcachein the Macintosh IIfxcomputer/ 228 Operationof the RAMcache / 229 Readingwitha cachehit / 229 Readingwitha cachemiss / 229 Fillingthe cache / 230 Writing/ 230 Bufferedwriteoperationsin the MacintoshIIfxcomputer/ 230 viii Guideto the MacintoshFamilyHardware ROMI 231 ROMconfigurations/ 232 ROMexpansionin the MacintoshPortablecomputer/ 233 ROMSIMMs/ 235 6 Power Supplies / 239 Powerup, systemstartup,and powerdown / 241 ClassicMacintoshcomputers/ 242 MacintoshSEcomputer/ 242 MacintoshPortablecomputer/ 243 MacintoshSE/30and MacintoshII-familycomputers/ 243 Powerup / 244 Systemstartup / 244 Macintosh II-familypowerdown / 245 PowerconnectorsI 246 PowerinputrequirementsI 252 MacintoshPluscomputer/ 252 MacintoshSEand MacintoshSE/30computers/ 253 MacintoshPortablecomputerI 254 MacintoshIIcx and MacintoshIIci computersI 255 MacintoshII, MacintoshIIx, and MacintoshIlfx computers/ 256 DCoutput specifications/ 257 MacintoshPluscomputer/ 257 MacintoshSEand MacintoshSE/30computers/ 259 MacintoshPortablecomputerI 260 MacintoshIIcx and MacintoshIIci computersI 261 MacintoshII, MacintoshIIx, and MacintoshIlfx computersI 263 Monitorpowerreceptaclein the Macintosh II-familycomputers/ 264 Responsesto abnormalconditions/ 265 Powercircuitin the MacintoshPortablecomputer/ 266 Batterychargerand voltagecontrolcircuitsI 266 · Batterymonitorand batterychargingcircuit/ 267 Sleepstate in the MacintoshPortablecomputer/ 268 Power-controlcircuitin the MacintoshII-familycomputersI 269 Contents ix 7 Macintosh Plus Mouse and Keyboard / 273 MacintoshPlusmouse / 275 MacintoshPlusmousemechanism/ 275 MacintoshPlusmouseinterfaceI 278 MacintoshPluskeyboard/ 280 The MacintoshPluskeyboardinterfaceI 280 MacintoshPluskeyboardcommunication/ 282 MacintoshPluskeyboardand keypadprotocol/ 283 Earlierkeyboardand separatekeypad / 284 Communication protocolfor the separatekeypad / 286 8 Apple Desktop Bus / 287 OverviewI 289 ADBinterface/ 291 ADBinterfacecircuitsI 292 ADBinterfacecircuitson the MacintoshPortableI 296 MacintoshPortablePowerManagerICas ADBcontroller/ 296 MacintoshPortablekeyboardprocessor/ 296 MacintoshPortablekeyboardand trackballconnectors/ 297 ADBkeyboardsand mouse / 300 AppleStandardMouse/ 300 MacintoshPortablelow-powertrackball/ 303 AppleStandardKeyboard/ 305 AppleExtendedKeyboard/ 308 MacintoshPortablelow-powerkeyboard/ 310 ADBcommunications I 312 ADBtransactions/ 313 ADBcommands/ 315 Talkcommand/ 316 Listencommand/ 316 SendResetcommand/ 316 Flushcommand/ 316 ADBsignalsI 317 Attentionand Syncsignals/ 317 GlobalResetsignal/ 317 ServiceRequestsignal/ 318 ADBtimingI 319 ADBerrorconditionsI 320 x Guideto the MacintoshFamilyHardware ADBperipheraldevices/ 320 ADBdeviceregisters/ 320 Register0 I 321 Register1 / 321 Register2 I 321 Register3 / 321 ADBdeviceaddresses/ 3L2 ADBDeviceHandlerID / 323 ADBcollisiondetection/ 324 ADBpollingprotocol/ 325 Controlling the ADBServiceRequest/ 326 9 FloppyDisk Interfaces/ 327 The two typesof diskdrives/ 329 Basicfeaturesof the disk drives I 330 Dataencodingmethods/ 330 Group-coderecording(GCR)/ 331 Modifiedfrequencymodulation(MFM)/ 331 800KBdriveinterface/ 332 800KBdriveconnectors/ 334 Internal800KBdriveconnectors/ 334 External800KBdriveconnectors/ 337 Circuitdiagramsfor the 800KBdriveinterface/ 338 Compatibilitywith single-sideddisk drives I 342 Compatibilitywiththe HardDisk20 / 342 FDHDdriveinterface/ 343 FDHDdriveconnectors/ 345 InternalFDHDdriveconnectors/ 345 ExternalFDHDdriveconnectors/ 348 FDHDinterfacecircuitdiagrams/ 350 Incompatibility with the single-sideddisk drive / 356 Compatibilitywiththe HardDisk20 / 356 Contents xi 10 Serial1/0 Ports / 357 Serialport connectors/ 359 Signalson the serialports / 361 secaddressesI 363 Serial1/0 interfacecircuitdiagrams/ 365 Modemslot in the MacintoshPortable/ 371 Modempowercontrol/ 374 11 SCSIPorts / 375 Usingthe SmallComputerSystemInterface(SCSI)/ 377 SCSIconnectors/ 379 ExternalSCSIconnector/ 379 InternalSCSIconnector/ 380 InternalSCSIconnectorin the MacintoshPortable/ 383 Circuitdiagramsof the SCSIinterfaceI 385 SCSIdata transfers/ 392 Handshakingfor SCSIdata transfersI 393 SCSIDMAin the Macintosh IlfxcomputerI 394 Operationof-theSCSIDMAIC / 395 Slavemode / 395 Mastermode / 395 12 Displays / 397 Built-invideodisplay/ 399 Videodisplayscanning/ 399 Videodisplaycircuits/ 401 Videodisplaybuffers/ 402 Expansioncardvideo / 404 Videocardfeatures/ 404 Videocardcomponents/ 405 TiminggenerationI 405 FrameBufferController(FBC)I 405 VideoRAM/ 406 CLUT DACon the videocard / 406 DeclarationROM/ 407 Externalconnector/ 407 Detectingmonitortype / 409 SE/30computerI 409 Videodisplayin the Macintosh xii Guideto the MacintoshFamilyHardware Videocircuitsin the MacintoshIlci computer/ 410 Featuresof the built-invideocircuits/ 410 Detectionof monitortype / 411 Pixelsand colors/ 411 Sizesof monitorsand screenbuffers/ 411 Pseudo-slotvideo in the MacintoshIlci / 412 Built-invideo componentsI 412 Screenbufferin the MacintoshIlci / 413 Videoportionof the RBV/ 414 CLUTDACin the MacintoshIlci / 418 Videoconnectoron the MacintoshIlci / 418 Displayson the MacintoshPortable/ 421 Flat-paneldisplay/ 421 Contrastcontrol / 422 MacintoshPortableexternalvideo I 423 13 Sound / 427 PWMsoundsystemI 429 Soundbuffers/ 429 Generatingsounds I 430 Scanningthe soundbuffers/ 431 Circuitdiagrams/ 433 ASCsoundsystem/ 436 ASCsoundmodes I 436 Generatingsounds I 437 Circuitdiagrams/ 439 14 Expansion Interfaces / 443 The 68000processor-direct slot (PDS)/ 445 68000PDSon the MacintoshSEcomputerI 448 68000PDSon the MacintoshPortable/ 451 slot (PDS)I 454 The 68030processor-direct The NuBusexpansioninterface/ 461 Contents xiii A MacintoshFamilyHardwareSpecifications/ 467 Macintosh Plus / 468 Environment/ 469 MacintoshSE / 470 Environment/ 471 MacintoshSE/30I 472 Environment/ 473 MacintoshPortable/ 474 Environment/ 475 MacintoshII / 476 Environment/ 478 MacintoshIlx / 479 Environment/ 480 MacintoshHex / 481 Environment/ 482 MacintoshIlci / 483 Environment/ 485 MacintoshIlfx / 486 Environment/ 488 GlobalVariables/ 489 B Hardware-Related Glossary/ 491 Index/ 503 xiv Guideto the MacintoshFamilyHardware Figuresand tables Preface About this book / xxix TableP-1 Macintoshtechnicaldocumentation/ xxxv 1 Introductionto the MacintoshHardware/ 1 Figure1-1 Frontviewof the Macintosh128K,512K,and 512Kenhancedcomputers/ 7 Figure1~2 Backviewof the Macintosh128K,512K,and 512Kenhancedcomputers/ 7 Figure1-3 Backviewof the Macintosh Pluscomputer/ 8 Figure1-4 Frontviewof the Macintosh SEcomputer/ 9 Figure1-5 Frontviewof the MacintoshSE/30computer/ 10 Figure1-6 Backviewof the MacintoshSEcomputer/ 11 Figure1-7 Frontviewof the MacintoshPortablecomputer/ 12 Figure1-8 Backviewof the MacintoshPortablecomputer / 13 Figure1-9 Frontviewof the MacintoshII, MacintoshIlx, and MacintoshIlfx computers/ 14 Figure1-10 Backview of the MacintoshII, MacintoshIlx, and MacintoshIlfx computers/ 15 Figure1-11 Frontviewof the MacintoshHexand MacintoshIlci computers/ 16 Figure1-12 Backviewof the MacintoshIlcx computer / 17 Figure1-13 Backviewof the MacintoshIlci computer / 17 Figure1-14 Interiorviewof the MacintoshPluscomputer/ 18 Figure1-15 Interiorviewof the MacintoshSEcomputer/ 20 Figure1-16 Interiorviewof the MacintoshSE/30computer/ 22 Figure1-17 Interiorviewof the MacintoshPortablecomputer/ 24 Figure1-18 Interiorviewof the MacintoshII computer/ 27 Figure1-19 Interiorviewof the MacintoshIlcx computer/ 30 Figure1-20 Interiorview of the MacintoshIlci computer/ 31 Figure1-21 Interiorviewof the MacintoshIlfx computer/ 32 Figure1-22 Simplifiedaddressmap for the Macintosh128K,512K,and 512Kenhancedcomputers/ 36 Figure1-23 Simplifiedaddressmap for the MacintoshPluscomputer / 37 Figuresand tables xv Figure1-24 Simplifiedaddressmap for the MacintoshSEcomputer I 38 Figure1-25 Simplifiedaddressmap for the MacintoshPortablecomputer I 39 Figure1-26 Simplifiedaddressmap for the MacintoshSE/30computer I 41 Figure1-27 Simplifiedaddressmap for the MacintoshII, MacintoshIlx, and MacintoshHexcomputers / 42 Figure1-28 Simplifiedaddressmap for the MacintoshIlci computer I 43 Figure1-29 Simplifiedaddressmap for the MacintoshIlfx computer I 44 Figure1-30 24-bitto 32-bitaddresstranslation/ 46 Table1-1 Summaryof featuresof the Macintoshcomputers / 2 2 Architectureof the MacintoshComputers/ 47 Figure2-1 Blockdiagramof the Macintosh128K,512K,and 512Kenhancedcomputers/ 50 Figure2-2 Blockdiagramof the MacintoshPluscomputerI 51 Figure2-3 Blockdiagramof the MacintoshSEcomputerI 52 Figure2-4 Blockdiagramof the MacintoshSE/30computerI 53 Figure2-5 Blockdiagramof the MacintoshPortablecomputerI 54 Figure2-6 Blockdiagramof the MacintoshII computerI 56 Figure2-7 Blockdiagramof the MacintoshIlx and MacintoshHexcomputers/ 57 Figure2-8 Blockdiagramof the MacintoshIlci computer I 58 Figure2-9 Blockdiagramof the MacintoshIlfx computer/ 59 Table2-1 Non-SCSI diskdrivesused by Macintoshcomputers/ 81 3 Processorsand GeneralLogic / 87 Figure3-1 Addressmap for the Macintosh512KcomputerI 123 Figure3-2 . Addressmap forthe MacintoshPluscomputerI 124 Figure3-3 Addressmap for the MacintoshSEcomputerI 127 Figure3-4 Addressmap for the MacintoshPortablecomputer/ 129 Figure3-5 Translationfrom24-bitaddressmap to 32-bit addressmap / 132 Figure3-6 Addressmap for the MacintoshSE/30computerI 133 Figure3-7 Addressmap for the MacintoshII, MacintoshIlx, and MacintoshHexcomputers/ 137 xvi Guideto the MacintoshFamilyHardware Figure3-8 Addressmap for the MacintoshIki computerI 142 Figure3-9 Addressmap for the MacintoshIIfxcomputerI 143 Table3-1 Interruptlevelsin the classicMacintoshcomputers/ 92 Table3-2 Interruptlevelsin the MacintoshSEcomputerI 93 Table3-3 Interruptlevelsin the MacintoshPortablecomputerI 95 Table3-4 Interruptlevelsin the MacintoshII computerI 99 Table3-5 Interruptlevelsin Macintoshmodelswiththe MC68030 microprocessorI 101 Table3-6 Auxiliaryprocessorsused in Macintoshcomputers/ 104 Table3-7 Generalogiccircuitsused in Macintoshcomputers/ 111 Table3-8 Macintosh24-bitto 32-bitaddresstranslation/ 131 Table3-9 MacintoshSE/30expansioncardaddressranges/ 134 Table3-10 TranslationsfromNuBusaddressesto mainlogicboard addressesI 140 Table3-11 RTCbitsin MacintoshVIA!DataregisterB I 144 4 VersatileInterfaceAdapter(VIA) ICs / 147 Table4-1 Offsetsof the VIAregisterlocations / 159 Table4-2 Bitsin VIADataregisterA in the classicMacintosh computersI 160 Table4-3 Bitsin VIADataregisterA in the MacintoshSE computerI 161 Table4-4 Bitsin VIADataregisterA in the MacintoshPortable/ 162 Table4-5 Bitsin VIA!DataregisterA in the MacintoshSE/30, MacintoshII, MacintoshIIx, and MacintoshIIcx computersI 163 Table4-6 Bitsin VIA!DataregisterA in the MacintoshIIci computerI 164 Table4-7 Bitsin VIA!DataregisterA in the MacintoshIIfx computerI 165 Table4-8 Identitycodes in the MacintoshIIci and MacintoshIlfx / 165 Table4-9 Bitsin VIA2DataregisterA / 166 Table4-10 VIA2RAMsizebits I 167 Table4-11 Bitsin VIADataregisterB in the classicMacintosh computersI 168 Table4-12- Bitsin VIADataregisterB in the MacintoshSE computerI 168 Table4-13 Bitsin VIADataregisterB in the MacintoshPortable computerI 169 Figuresand tables xvii Table4-14 Bitsin VIAlDataregisterB in the MacintoshSE/30and the MacintoshII familyI 171 Table4-15 Bitsin VIA2DataregisterB / 174 Table4-16 NuBustransferacknowledgebits in VIA2Data RegisterB / 175 Table4-17 Signalscontrolledby the VIAPeripheralControlregisterin the classicMacintoshcomputers/ 176 Table4-18 Signalscontrolledby the PeripheralControlregisterin VIAin the MacintoshSE/30and in VIAlin the MacintoshII-family computers/ 177 Table4-19 Signalscontrolledby the VIAPeripheralControlregisterin the MacintoshPortablecomputer/ 178 Table4-20 Signalscontrolledby the VIA2PeripheralControl register/ 178 Table4-21 Bitsin the AuxiliaryControlregister/ 180 Table4-22 Bits6 and 7 in the VIAAuxiliaryControlregister/ 181 Table4-23 Offsetsof MacintoshVIAtimerlatches / 182 Table4-24 Bitsin the InterruptFlagregisterin the VIAin the classic Macintoshcomputers/ 185 Table4-25 Bitsin the InterruptFlagregisterin the VIAin MacintoshSE and in VIAlin the MacintoshSE/30and MacintoshII-family computers/ 185 Table4-26 Bitsin the InterruptFlagregisterin the VIAin the Macintosh Portablecomputer / 186 Table4-27 Bitsin the VIA2InterruptFlagregisterin the MacintoshSE/30and MacintoshII-familycomputers/ 186 5 Memory / 189 Figure5-1 Pinoutof the RAMSIMMsocketin the MacintoshPlusand MacintoshSEcomputers/ 199 Figure5-2 SIMMconfigurationsin the MacintoshPluscomputer/ 202 Figure5-3 SIMMconfigurationsin earlierMacintoshSEcomputers/ 203 Figure5-4 SIMMconfigurationsin laterMacintoshSEcomputers/ 204 Figure5-5 Pinoutof the RAMexpansionconnectorin the Macintosh Portablecomputer/ 207 Figure5-6 RAMSIMMlocationsin the MacintoshSE/30 computer/ 216 Figure5-7 RAMSIMMlocationsin the MacintoshII and MacintoshIIx computers/ 217 Figure5-8 RAMSIMMlocationsin the MacintoshIIcxcomputer/ 218 Figure5-9 RAMSIMMlocationsin the Macintoshllci computer/ 218 xviii Guideto the MacintoshFamilyHardware Figure5-10 RAMSIMMlocationsin the MacintoshIlfxcomputer/ 219 Figure5-11 RAMSIMMconfigurations in the MacintoshSE/30and MacintoshII-familycomputersI 220 Figure5-12 Cachecard connectorin the MacintoshIIcicomputer/ 226 Figure5-13 Pinoutof the ROMSIMMsocket / 236 Table5-1 RAMaddressesin Macintoshcomputerswithan MC68000 processorI 191 Table5-2 RAMaddressesin the MacintoshSE/30and MacintoshII- familycomputers I 193 Table5-3 RAMaccessratesin the MacintoshfamilycomputersI 194 Table5-4 Signalassignmentsfor the RAMSIMMsocketin the MacintoshPlusand MacintoshSEcomputers/ 200 Table5-5 Signalassignmentsfor the RAMexpansionconnectorin the MacintoshPortablecomputer/ 208 Table5-6 Signalassignmentsfor RAMSIMMsocketsin the Macintosh SE/30and MacintoshII-familycomputers(exceptthe MacintoshIlfx) / 212 Table5-7 Signalassignmentsfor RAMSIMMsocketsin the MacintoshIlfx computer/ 214 Table5-8 Signalassignmentsfor the cachecardconnector/ 227 Table5-9 ROMaccessrates / 231 Table5-10 Signalassignmentsfor the ROMexpansionconnectorin the MacintoshPortablecomputer/ 234 Table5-11 Signalassignmentsfor the ROMSIMMsocket / 237 6 PowerSupplies/ 239 Figure6-1 Pinoutof the powersupplyconnectoron the MacintoshPlus computerI 246 Figure6-2 Pinoutof the powersupplyconnectoron the MacintoshSE and MacintoshSE/30computersI 247 Figure6-3 Pinoutof the powerand videoconnectorfromthe analog boardto the logicboardin the MacintoshSEand MacintoshSE/30computersI 248 Figure6-4 Pinoutof the powerconnectoron the MacintoshPortable computer/ 249 Figure6-5 Pinoutof the powersupplyconnectoron the MacintoshIIcx and MacintoshIIci computersI 250 Figure6-6 Pinoutof the powersupplyconnectorin the MacintoshII, MacintoshIIx, and MacintoshIlfx computersI 251 Figure6-7 Power-controlcircuitin the MacintoshII-family computersI 272 Figuresand tables xix Table6-1 Signalassignmentsfor the powersupplyconnectoron the MacintoshPluscomputer/ 246 Table6-2 Signalassignmentsfor the powersupplyconnectoron the MacintoshSEand MacintoshSE/30computers/ 247 Table6-3 Signalassignmentsfor the powerand videoconnectorfrom the analogboardto the logicboardin the MacintoshSEand MacintoshSE/30computers/ 248 Table6-4 Signalassignmentsfor the powerconnectoron the MacintoshPortablecomputer/ 249 Table6-5 Signalassignmentsfor the powersupplyconnectoron the MacintoshHexand MacintoshIlci computers/ 250 Table6-6 Signalassignmentsfor the powersupplyconnectorin the MacintoshII, MacintoshIlx, and MacintoshIlfx computersI 251 Table6-7 ACinputrequirementsfor the MacintoshPlus computerI 253 Table6-8 ACinputrequirementsfor the MacintoshSEand MacintoshSE/30computers/ 254 Table6-9 ACinputrequirementsfor the batterychargerin the MacintoshPortablecomputer/ 255 Table6-10 ACinputrequirementsfor the MacintoshHexand MacintoshIlci / 256 Table6-11 ACinput requirementsfor the MacintoshII, MacintoshIlx, and MacintoshIlfx computers/ 257 Table6-12 Powersupplyoutputlimitsin the MacintoshPlus computerI 258 Table6-13 Totalpowerat DCoutputloadsfor the MacintoshPlus computerI 258 Table6-14 DCoutputrippleand switchingnoisefor the MacintoshPlus computerI 258 Table6-15 Powersupplyoutputlimitsfor the MacintoshSEand MacintoshSE/30computers/ 259 Table6-16 Totalpowerat DCoutputloadsfor the MacintoshSEand MacintoshSE/30computers/ 259 Table6-17 DCoutputrippleand switchingnoisefor the MacintoshSE and MacintoshSE/30computers/ 260 Table6-18 Outputlimitsfor the voltage-control circuitsin the MacintoshPortablecomputer/ 261 Table6-19 Totalpowerat DCoutputloadsfor the MacintoshPortable computerI 261 Table6-20 Powersupplyoutputlimits~nthe MacintoshHexand MacintoshIlci computers/ 261 xx Guideto the MacintoshFamilyHardware Table6-21 Totalpowerat DCoutputloadsfor the Macintosh Hexand MacintoshIlci computers/ 262 Table6-22 DCoutputrippleand switchingnoisefor the Macintosh Hex and Macintosh Ilci com11ters/ 262 Table6-23 Powersupplyoutputlimitsfor the Macintosh II, MacintoshIlx, and MacintoshIlfx computers/ 263 Table6-24 Totalpowerat DCoutputloadsfor the Macintosh II, MacintoshIlx, and MacintoshIlfx computers/ 263 Table6-25 DCoutputrippleand switchingnoisefor the Macintosh II, MacintoshIlx, and MacintoshIlfx computers/ 264 Table6-26 Specifications for the monitorpower outputreceptacleon the MacintoshII-familycomputers/ 265 7 MacintoshPlusMouseand Keyboard/ 273 Figure7-1 Mousemechanismin the Macintosh PluscomputerI 275 Figure7-2 Pinoutof the DB-9mouseconnectorin the MacintoshPlus computerI 278 Figure7-3 Circuitdiagramof the mouseport in the MacintoshPlus computer I 279 Figure7-4 Pinoutof the RJ-11keyboardconnectorin the Macintosh PluscomputerI 280 Figure7-5 Circuitdiagramof the keyboardinterfacein the Macintosh PluscomputerI 281 Figure7-6 Key-downtransitioncodesin the MacintoshPluscomputer (hexadecimal)/ 284 Figure7-7 Keyboardtransitioncodesin the Macintosh128K, Macintosh512K,and Macintosh512Kenhancedcomputers (hexadecimal)/ 285 Figure7-8 Key-downtransitioncodesfor the separatekeypad (hexadecimal)/ 286 Table7-1 Mouse-motion signalsin the Macintosh Pluscqmputer/ 276 Table7-2 Signalassignmentsfor the DB-9mouseconnectorin the Macintosh Pluscomputer / 278 Table7-3 Signalassignmentsfor the keyboardconnectorin the Macintosh Pluscomputer / 281 Table7-4 Keyboardcommandsin the MacintoshPluscomputer/ 283 Figuresand tables xxi 8 Apple Desktop Bus / 287 Figure8-1 Pinoutof the ADBconnector/ 291 Figure8-2 Circuitdiagramfor the ADBinterfaceon Macintosh SEand MacintoshSE/30computers/ 293 Figure8-3 Circuitdiagramfor the ADBinterfaceon MacintoshII, MacintoshIlx, MacintoshHex, and MacintoshIIci computersI 294 Figure8-4 Circuitdiagramfor the ADBinterfaceon the MacintoshIIfx computerI 295 Figure8-5 Pinoutof the keyboardand trackballconnectorson the MacintoshPortablecomputer / 297 Figure8-6 Circuitdiagramof the ADBinterfaceon the Macintosh Portablecomputer/ 299 Figure8-7 Mechanism of the AppleStandardMouse/ 302 Figure8-8 Trackballdirectionconventions/ 305 Figure8-9 Key-downtransitioncodesgeneratedby the AppleStandard KeyboardI 306 Figure8-10 Key-downtransitioncodesgeneratedby the Apple ExtendedKeyboardI 308 Figure8-11 Keyboardlayouton the MacintoshPortablecomputer/ 311 Figure8-12 Keypadlayouton the MacintoshPortablecomputer/ 311 Figure8-13 A typicalADBtransaction/ 313 Figure8-14 Attentionand Syncsignals/ 317 Figure8-15 ADBServiceRequestsignal/ 318 Table8-1 Signalassignments forthe ADBconnector I 291 Table8-2 Electricalcharacteristicsof the ADBtransceiverI 292 Table8-3 Signalassignmentsfor the keyboardand trackball connectorson the MacintoshPortablecomputer / 298 Table8-4 ADBtransceiveregister0 in the AppleStandard MouseI 301 Table8-5 Signalassignments for the connectoron the trackball/ 303 Table8-6 Keycode reassignments for the AppleStandard KeyboardI 306 Table8-7 Register0 in the AppleStandardKeyboard/ 307 Table8-8 Register2 in the AppleStandardKeyboard/ 307 Table8-9 Keycodereassignments in the AppleExtended KeyboardI 309 Table8-10 Register0 in the AppleExtendedKeyboard/ 309 Table8-11 Register2 in the AppleExtendedKeyboard/ 310 Table8-12 ADBtransactionstates I 314 Table8-13 Commandbytesyntax/ 315 xxii Guideto the MacintoshFamilyHardware Table8-14 ADBtimingspecifications/ 319 Table8-15 Bitsin deviceregister3 / 322 Table8-16 DeviceaddressesI 322 Table8-17 DeviceHandlerIDsreservedfor specialfunctions/ 324 9 FloppyDisk Interfaces/ 327 Figure9-1 NRZIencoding(usedwith GCRformatting)/ 331 Figure9-2 MFMencoding/ 332 Figure9-3 Pinoutof the connectorfor the internal800KBfloppy diskdrive / 334 Figure9-4 Pinoutof the connectorfor the externalfloppydisk drive on the MacintoshPlusand MacintoshSEcomputers/ 337 Figure9-5 Circuitdiagramof the floppydisk driveinterfaceon the MacintoshPluscomputer/ 339 Figure9-6 Circuitdiagramof the floppydisk driveinterfaceon the originalMacintoshSEcomputer/ 340 Figure9-7 Circuitdiagramof the floppydisk driveinterfaceon the MacintoshII computer/ 341 Figure9-8 Pinoutof the connectorfor the internalFDHDdrive / 345 Figure9-9 Pinoutfor the connectorfor the externalFDHDdrive / 348 Figure9-10 Circuitdiagramof the FDHDdriveinterfaceon the MacintoshSEFDHDand MacintoshSE/30computers/ 351 Figure9-11 Circuitdiagramof the FDHDdriveinterfaceon the MacintoshPortablecomputer/ 352 Figure9-12 Circuitdiagramof the FDHDdriveinterfaceon the MacintoshIIx computerI 353 Figure9-13 Circuitdiagramof the FDHDdriveinterfaceon the MacintoshIIcx and MacintoshIIci computers/ 354 Figure9-14 Circuitdiagramof the FDHDdriveinterfaceon the MacintoshIlfx computerI 355 Table9-1 Basicfeaturesof Macintoshfloppydisk drive!?/ 330 Table9-2 Macintoshmodelsthat use the 800KBfloppy diskdrive / 333 Table9-3 Signalassignmentsfor the internalfloppydiskdrive connectoron the MacintoshPluscomputerI 335 Table9-4 Signalassignmentsfor the connectorfor the internalfloppy disk driveon the MacintoshSEand MacintoshII computers/ 336 Table9-5 Signalassignmentsfor the connectorfor the externalfloppy diskdriveon the MacintoshPlusand MacintoshSE computersI 338 Figuresand tables xxiii Table9-6 Macintoshmodelsthat use the AppleFDHDdrive / 344 Table9-7 Signalassignments for the internalFDHDdriveconnectors on the MacintoshIlx, MacintoshHex,MacintoshIlci, and MacintoshIlfx computers/ 346 Table9-8 Signalassignments for the internalFDHDdriveconnectoron the MacintoshSEFDHD,MacintoshSE/30,and Macintosh Portablecomputers/ 347 Table9-9 Signalassignments for the externalFDHDdriveconnectoron the MacintoshHexand MacintoshIlci computers/ 349 Table9-10 Signalassignmentsfor the externalFDHDdriveconnectoron the MacintoshSEFDHD,MacintoshSE/30,and Macintosh Portablecomputers/ 350 10 Serial1/0 Ports / 357 Figure10-1 Pinoutof the mini8-pinserialport connectors/ 360 Figure10-2 Circuitdiagramof the serial1/0 interfacein the Macintosh Pluscomputer/ 366 Figure10-3 Circuitdiagramof the serial1/0 interfacein the MacintoshSEcomputer/ 367 Figure10-4 Circuitdiagramof the serial1/0 interfacein the Macintosh Portablecomputer/ 368 Figure10-5 Circuitdiagramof the serial1/0 interfacein the MacintoshSE/30,MacintoshII, MacintoshIlx, MacintoshIlcx, and MacintoshIlci computers/ 369 Figure10-6 Circuitdiagramof the serial1/0 interfacein the MacintoshIlfx computer/ 370 Figure10-7 Pinoutof the modemconnectoron the MacintoshPortable computerI 371 Figure10-8 Circuitdiagramof the modeminterfaceon the Macintosh Portablecomputer / 372 Table10-1 Signalassignments for the mini8-pinserialport connectors/ 360 Table10-2 Addressesof secregisters/ 364 Table10-3 Signalassignmentsfor the modemconnectorin the MacintoshPortablecomputer / 373 xxiv Guideto the MacintoshFamilyHardware 11 SCSIPorts / 375 Figure11-1 Pinoutof the externalSCSIconnectoron the Macintosh computersI 379 Figure11-2 Pinoutof the internalSCSIconnectoron the Macintosh computersI 381 Figure11-3 Pinoutof the internalSCSIconnectorin the Macintosh PortablecomputerI 383 Figure11-4 Circuitdiagramof the SCSIinterfaceon the MacintoshPlus computerI 386 Figure11-5 Circuitdiagramof the SCSIinterfaceon the MacintoshSE computerI 387 Figure11-6 Circuitdiagramof the SCSIinterfaceon the Macintosh Portablecomputer/ 388 Figure11-7 Circuitdiagramof the SCSIinterfaceon the MacintoshII computerI 389 Figure11-8 Circuitdiagramof the SCSIinterfaceon the MacintoshSE/30,MacintoshIIx, MacintoshIIcx, and MacintoshIIci computers/ 390 Figure11-9 Circuitdiagramof the SCSIinterfaceon the MacintoshIIfx computerI 391 Table11-1 Signalassignments for the externalSCSIconnectoron the Macintoshcomputers/ 380 Table11-2 Signalassignments for the internalSCSIconnectoron the Macintoshcomputers/ 381 Table11-3 Signalassignments for the internalSCSIconnectorin the MacintoshPortablecomputer/ 384 12 Displays/ 397 Figure12-1 Videoscanningpatternin the Macintoshcomputerswith built-invideodisplays/ 400 Figure12-2 Pinoutof the externalconnectoron the Macintosh II VideoCard / 408 Figure12-3 Videotimingparameters/ 417 Figure12-4 Videointerfacecircuitin the MacintoshIIci / 419 Figure12-5 Displaypixelmap / 422 Figure12-6. Pinoutof the externalvideoconnectoron the Macintosh Portablecomputer I 423 Figure12-7 Timingdiagramfor externalvideoin the MacintoshPortable computer I 425 Figuresand tables xxv Table12-1 Signalassignmentsfor the externalconnectorof the Macintosh II VideoCard / 408 Table12-2 Senselinevaluesfor differentypesof monitorsI 409 Table12-3 Screensizesand buffersizessupportedby the MacintoshIIci computer/ 411 Table12-4 TimespentmakingvideoRAMaccessesin bankA / 414 Table12-5 Horizontalvideo timingin the MacintoshIIci computerI 416 Table12-6 Verticalvideotimingin the Macintosh IIcicomputer/ 416 Table12-7 Signalson the videoconnectorin the Macintosh IIci / 420 Table12-8 Senselinevaluesfor videomonitorson the Macintosh IIci computerI 420 Table12-9 Signalassignments for the externalvideoconnectoron the MacintoshPortablecomputer I 424 Table12-10Externalvideotiminglimits/ 425 13 Sound / 427 Figure13-1 A soundwaveformwitha frequencyof 2 times the scanrate / 432 Figure13-2 A soundwaveformwitha frequencythat is not a multipleof the scanrate / 432 Figure13-3 Blockdiagramof the PWMsoundcircuitin the MacintoshPluscomputer/ 434 Figure13-4 Blockdiagramof the PWMsoundcircuitin the MacintoshSEcomputer/ 435 Figure13-5 Blockdiagramof the ASCsoundcircuitin the MacintoshPortable,MacintoshII, MacintoshIIx, MacintoshIIcx,MacintoshIIci, and MacintoshIlfx computers/ 440 Figure13-6 Blockdiagramof the ASCsoundcircuitin the MacintoshSE/30computer/ 441 14 ExpansionInterfaces/ 443 Figure14-1 Pinoutof the Euro-DIN96-pinconnectorused for the 68000PDS/ 447 Figure14-2 Pinoutof the Euro-DIN120-pinconnectorused forthe 68030PDS/ 456 Figure14-3 Pinoutof the Euro-DIN96-pinconnectorused forthe NuBus / 463 Figure14-4 NuBusblockdiagram / 466 xxvi Guideto the MacintoshFamilyHardware Table14-1 Signalassignments for the 68000PDSon the MacintoshSEcomputer/ 448 Table14-2 Signaldescriptionsfor the 68000PDSin the MacintoshSEcomputer/ 449 Table14-3 Signalassignments forthe 68000PDSon the MacintoshPortablecomputerI 452 Table14-4 Signaldescriptionsfor the 68000PDSin the MacintoshPortablecomputerI 453 Table14-5 Signalassignments on the 68030PDSI 457 Table14-6 Signaldescriptionsfor the 68030PDS: commonsignals/ 459 Table14-7 Signaldescriptionsfor the 68030PDS: machine-specificsignals/ 460 Table14-8 Signalassignments for the NuBusexpansion connectorI 464 Table14-9 Signaldescriptionsfor the NuBusexpansion connectorI 465 A MacintoshFamilyHardwareSpecifications/ 467 TableA-1 Sizeand weightof the Macintosh Pluscomputer / 469 TableA-2 Sizeand weightof the Macintosh SEcomputer / 471 TableA-3 Sizeand weightof the Macintosh SE/30computer / 473 Portablecomputer I 475 TableA-4 Sizeand weightof the Macintosh TableA-5 Sizeand weightof the Macintosh II computer / 477 TableA-6 Sizeand weightof the Macintosh Ilx computer / 480 TableA-7 Sizeand weightof the Macintosh Ilcxcomputer / 482 TableA-8 Sizeand weightof the MacintoshIlci computer / 484 TableA-9 Sizeand weightof the Macintosh Ilfxcomputer / 487 B Hardware-Related GlobalVariables/ 489 TableB-1 Hardware-related globalvariables/ 490 Figuresand tables xxvii PrefaceAboutThis Book Welcometo the Apple®Guideto theMacintoshFamilyHardware, secondedition.Thisbook providesoverviewsof the architecturesof Macintosh® computersand descriptionsof the hardwarecomponents that makeup those computers. Thisbook providesbackgroundand referenceinformationfor developers:hardwareengineersdesigningperipheraldevicesfor Macintoshcomputersand systemprogrammers who need an understandingof the hardwarein orderto optimizetheircode. Seethe sections"AdditionalReading"and "Abouthe MacintoshTechnical Documentation," laterin this preface,for otherbooksyou mayneed. Thisbook is not intendedto be an introductionto the basicconceptsof computerhardware-youshouldbe familiarwiththe terminologyused in the electronicsindustryand withthe generalprinciplesof microcomputer designand operation.Workingknowledgeof the Macintoshsystemwill alsobe helpful. A Warning Thisbook is not intendedto provideinformationor instructionsfor repairingor servicingyourMacintosh computer.Attemptingto serviceor repairthe computeryourselfcoulddamagethe computerand will invalidatethe warranty.... Thisprefacedescribesthe contentsof this manualand the-conventions used throughouthe book. It also listssomeother booksthat you might finduseful,and tellsyouwhereto writeor callfor moreinformation about Appleproducts. xxix Whatthis book contains The followingis a briefoutlineof the contentsof this manual.Seethe tableof contents for a completelistof the subjectscoveredin each chapter;see the indexto finda specifictopic discussedin this book. Organization Guideto theMacintoshFamilyHardwaredescribesthe nineMacintoshmodelsavailableat the timethe book was published.It also containsinformationabout earlierMacintosh models:the Macintosh128K,the Macintosh512K,and the Macintosh512Kenhanced. TheninecurrentMacintoshmodelsare • MacintoshPlus • MacintoshSE • MacintoshSE/30 • MacintoshPortable • MacintoshII • Macintoshllx • Macintoshllcx • Macintoshllci • MacintoshIlfx Insteadof describingeach modelseparately,this book describeseach majorfeaturefor all modelsthat have the feature.Thisapproachhas two benefits:first,it avoids unnecessaryrepetitionof descriptionsof featuresthat are the sameon differentmodels; and second,it clarifiesthe differencesbetweendifferentmodels. Eachmajorfeaturein the Macintoshfamilyis the subjectof its own chapter.The major featuresare as follows: • processorsand controllogic • VersatileInterfaceAdapters(VIAs:interfaceICs) • memoryorganizationand expansion • powersuppliesand control • keyboardand mouseon the MacintoshPlusand earlier~odels • AppleDesktopBus™(on all modelssincethe MacintoshPlus) xxx Guideto the MacintoshFamilyHardware • floppydiskinterfaces,two types:Apple800KBdriveand MacintoshFDHD™ (SuperDrive ™) • serial1/0 ports:similaron all models • SCSIports:similaron all models • displays,threetypes:built-invideo,expansioncardvideo,and flatpanel • sound:two typesof hardwareforgeneratingsampledsound • expansioninterfaces,two types:NuBus™ and processordirect Thisbook has two appendixes;AppendixA liststhe specificationsfor each modeland so servesas a quickreferencefor readerslookingfor informationabouta particularmodel. AppendixB listshardware-related globalvariables. Thisbookalsocontainsa glossaryof technicaltermsused in the bookand an index. Approach Thisbook containsinformationof severaldifferentkinds,including • specificationsof internalhardwarefeatures • explanationsof importantsubsystems,such as the differentexpansioninterfaces,the AppleDesktopBus,and the differentypesof displays • detailedinformationeededby third-partyhardwaredevelopers • guidelinesfor hardwareand softwaredevelopers Thisbook providesin-depthinformationfor certainfeaturesthat are not documented elsewhere.Forexample,the chapteraboutthe AppleDesktopBus(ADB)includes moredetailand moreguidelinesthanthe otherchaptersbecausethismaterialis not availablelsewhere. Somefeaturesare not fullydescribedin this book.Of thosefeatures,someare described in detailin otherbooks:for example,the NuBusexpansionbus is morefullydescribedin DesigningCardsand Drivers for theMacintoshFamily,secondedition.Otherfeaturesare not describedin detailbecausedevelopersneverneed to dealwiththem:for example,the ApplecustomICsused for controllingthe disk1/0 port. Preface xxxi Visualcues and conventions The followingvisualcuesare used throughouthe manualto identifydifferentypes of information: • Note:Noteslike this containinterestingsidelights. 6 Important Textset off like this containsimportantinformationthat you should read beforeproceeding. ~ ~ Developer tip Boxeslikethis containhintsand recommendations aboutthe best wayto usethe hardware.~ A Warning Warningslikethis directyour attentionto somethingthat couldcause injuryto the user,damageeithersoftwareor hardware,or resultin loss of data. • Whennewtermsare defined,theyappearin boldface.Thosetermsare alsodefined in the glossary. Hexadecimal numbersare precededby a dollarsign($).Forexample,the hexadecimal equivalentof decimalnumber16is writtenas $10. Addressrangesare givenas loweraddressthroughhigheraddressor loweraddres~higher address;in eitherformthe rangeis inclusiveof the givenendpoints.Namesof signalson a bus,on the otherhand,are givenas highest-numbered signal-lowest-numbered signal. A precedingslash(/) is usedto indicatean active-lowsignal;for example,/ ACK. The followingabbreviations are used: Kbit kilobit:1,024bits KB kilobyte:1,024bytes Mbit megabit:1,024kilobits,or 1,048,576bits MB megabyte:1,024kilobytes,or 1,048,576bytes GB gigabyte:1024megabytes,or 1,073,741,824bytes xxxii Guideto the MacintoshFamilyHardware Thisbookdistinguishesbetweenboardsand cardsas follows:a boardis a permanentpart of the computer(forexample,the mainlogicboard),whereasa cardcan be addedor exchangedby the userto expandor reconfigurethe system. Assembly-language variablenames The addressesof varioushardwarecomponentsare listedin thisbookas assembly- languagevariablenames.Thesenames-and systemglobalvariables-areincludedas equate(EQU)statementsin the MacintoshProgrammer's Workshop(MPW™) Assembly Language·mesnamedHardwareEqu.a and SysEqu.a.Thosefilesare locatedin a folder namedAlncludes. TheMPWdevelopmentsystem,whichincludesthe MPWAssemblerand the Alncludes folder,is availablefromthe AppleProgrammers and DevelopersAssociation (APDA ™). TheAlncludesfolderis alsoavailableas a separateproductfromAPDA.Theaddressof APDAis givenin the section"Howto Get MoreInformation," laterin this preface. Additionalreading Foran introductionto the hardwareand systemsoftwareof the Macintoshfamilyof computers,see the TechnicalIntroductionto theMacintoshFamily. If you are interestedin developinga cardor a driverfor any membersof the Macintosh familyof computers,referto DesigningCardsand Drivers for theMacintoshFamily, second edition. Fora referencefor the MacintoshSystemand Toolboxplusa discussionof user interface guidelinesand somebasichardwareinformation,see InstdeMacintosh. Preface xxxiii Thisbook does not containcompletespecifications for hardwarecomponentsbuilt by othermanufacturers. Youmayneed someor all of the manufacturers' technical specificationsfor the followingintegratedcircuits: • 6522and 65C23VersatileInterfaceAdapters;Rockwellor VTI • MC68000, MC68020, and MC68030 microprocessors; Motorola • MC68851 MemoryManagementUnit;Motorola • MC68881 and MC68882 Floating-Point Coprocessors; Motorola • 5380SCSIController; NCR • 28530SerialCommunications Controller;Zilog • Sonysoundchip;Sony Aboutthe Macintoshtechnicaldocumentation AppleComputer,Inc.,providesa suiteof technicalbooksthat explainthe hardwareand softwareof the Macintoshfamilyof computers. The originalMacintoshdocumentation consistedof the firstthreevolumesof Inside Macintosh.Shortlyafterthe introductionof the MacintoshPlus(withthe 128KBROM), VolumeIVof InsideMacintosh wasreleasedas a deltaguide.Thatis,VolumeIVcovered onlythoseaspectsof the MacintoshPlusthat were differentfromearlierMacintosh computers.Later,a fifthvolumewasadded,calledInsideMacintosh, VolumeV.It is alsoa deltaguide,coveringthe new and differentfeaturesof the MacintoshSEand the MacintoshII computers. As the varietyand the sophistication of Macintoshcomputersevolve,so does the documentation.In order to provideinformationthat is comprehensive-andthat providesanswersto specificquestions-Appleis now providinga wholefamilyof books. Eachof these booksgivescompleteinformationabouta singlesubject,and mayinclude someinformation that alsoappearsin InsideMacintosh.Thisbookand DesigningCards and Drivers for theMacintosh Family,secondedition,are two of the booksin thissuite. Forprogrammers and engineerswhoare newto the Macintosh world,Applehas created two introductorybooks: Technical Introductionto theMacintoshFamilyand Programmer's Introductionto theMacintosh Family. In additionto the booksabout the Macintoshitself,there are bookson relatedsubjects. Examplesare booksaboutthe user interfaceand Apple'sfloating-pointnumerics,and the referencebooks for the MacintoshProgrammer's Workshop. xxxiv Guideto the MacintoshFamilyHardware TableP-1givesa briefdescriptionof each of the books in the Macintoshtechnicaldocumentation. • TableP-1 Macintoshtechnicaldocumentation Book Description Introductorybooks Technical Introduction to the Introductionto the Macintoshsoftwareand hardwarefor the MacintoshFamily classicMacintosh,MacintoshSE,and MacintoshII Programmer'sIntroductionto Introductionto programmingthe Macintoshcomputers theMacintoshFamily Inside Macintosh InsideMacintosh, Volumes1-V Referencefor the MacintoshSystemand Toolboxfor the originalMacintosh,MacintoshPlus,MacintoshSE,and MacintoshII Single-subjectbooks Guideto theMacintoshFamily Thisbook:referenceand developer'sguidefor the MacintoshPlus, Hardware,secondedition MacintoshSEand SE/30;MacintoshII, IIx, IIcx,IIci,and IIfx; and MacintoshPortable DesigningCardsandDriversfor Hardwareand device-driver referenceto the expansion theMacintosh Family, capabilitiesof the MacintoshII family,MacintoshSEand second edition SE/30,and MacintoshPortable Relatedbooks HumanInterfaceGuidelines: Detailedguidelinesfor developersimplementingthe Macintosh TheAppleDesktopInterface user interface AppleNumerics Manual, Descriptionof the StandardAppleNumericsEnvironment second edition (SANE®), includingSANEsoftwarefor the MC68881 floating- point coprocessor MacintoshProgrammer's Descriptionof the MacintoshProgrammer'sWorkshop(MPW), Workshop 3.0 Reference Apple'ssoftwaredevelopmentenvironmentfor all Macintosh computers Youmayalsofindusefulinformationin the followingearlierbooks,nowsuperseded: Designing CardsandDrivers for Earlierhardwareand device-driver referenceto the expansion Macintosh II andMacintosh SE capabilitiesof the MacintoshII and MacintoshSE Macintosh FamilyHardware Earliereferenceto the Macintoshardwarefor the classic Reference Macintosh,MacintoshSE,and MacintoshII computers Preface XXXV How to get more information Thereare severalsourcesof technicalsupportfor Macintoshprogrammersand users.This sectiontellsyou how to contactAPDA,Appleuser groups,and AppleDeveloperServices. APDA APDAprovidesa wide range of technicalproductsand documentation,fromAppleand other suppliers,for programmersand developerswho work on Appleequipment.For informationabout APDA,contact APDA Apple Computer,Inc. 20525MarianiAvenue,Mailstop49-A Cupertino,CA95014-6299 800-282-APDA(800-282-2732) Fax:408-562-3971 Telex:171-576 AppleLink®:APDA User groups Appleuser groupsare associationsof individualswho share informationabout Apple computersand relatedproducts.For informationabout Appleuser groups in your area, callthis toll-freenumber: 800-538-9696 Askfor extension500. xxxvi Guide to the MacintoshFamilyHardware Apple DeveloperServices Apple'sgoalis to providedeveloperswiththe resourcestheyneedto createnewApple- compatibleproducts.Appleofferstwo programs:the PartnersProgram,for developers who intendto resellApple-compatible products,and the AssociatesProgram,for developerswho don't intendto resellproductsand for otherpeopleinvolvedin the developmentof Apple-compatible products. As an ApplePartneror Associate,youwillreceivemonthlymailingsincludinga newsletter, AppleII and MacintoshTechnicalNotes,pertinentDeveloperPrograminformation,and allthe latestnewsrelatingto Appleproducts.YouwillalsoreceiveApple'sTechnicalGuide Bookand automaticmembershipin APDA.You'llhaveaccessto developerAppleLink and to Apple'sDeveloperHotlinefor generaldeveloperinformation. As an ApplePartner,you'llbe eligiblefordiscountson equipmentand you'llreceive technicalassistancefromthe staffof Apple'sDeveloperTechnicalSupportdepartment. For moreinformationaboutApple'sdevelopersupportprograms,contactApple DeveloperProgramsat the followingaddress. AppleDeveloperPrograms AppleComputer,Inc. 20525MarianiAvenue,Mailstop51-W Cupertino,CA95014 Preface xxxvii 1 Introductionto the Chapter MacintoshHardware Thischapterprovidesan introductionto the computersthat makeup the Apple®Macintosh® family.The chapterliststhe featuresof each computerand brieflydescribesthe similaritiesand differencesamong the computers.Chapter2 introducesthe individualhardware componentsof the Macintoshcomputers;the remainingchapters describethose componentsand other hardwarefeaturesin detail. Table1-1on the nexttwopagesis a matrixshowingthe current Macintoshmodelsand theirmainfeatures.It summarizesthe informationpresentedin this chapter.Portionsof the matrixalso appear in laterchapters,whereindividualfeaturesare describedmorefully. 1 • Table1-1 Summary of features of theMacintosh computers Other Memory General ControlICs Memory Configuration CPU Processors mgt.lC's LogicICs expansion ~ MacintoshPlus Compact MC68000 (none) PAI.<; PAI.<; I VIA RAMSIMM ~ MacintoshSE Compact MC68000 (none) BBU BBU I VIA RAMSIMM A_ - Compact MC68030 MC68882 Partof MC68030 GLUE I V!As RAMMSIMM, ROMSIMM MacintoshSE/30 g . Portable MC68000 PowerMgr. PAI.<; VD!, CPUGLU I VIA RAMexp. slot, ROMexp. slot MacintoshPortable &Misc.GLU g__,, . Open (6 slots) MC68020 MC68881 AMUor PMMU GLUE 2 V!As RAMSIMM MacintoshII g__,, . Open (6 slots) MC68030 MC68882 Partof MC68030 GLUE I V!As RAMSIMM, ROMSIMM MacintoshIlx L . MacintoshIlcx Open (3 slots) MC68882 MC68882 Partof MC68030 GLUE 2 V!As RAMSIMM, ROMSIMM L - Macintosh!lei Open (3 slots) MC68030 MC68882 Partof MC68030 MDU &RBV 2 V!As RAMSIMM, ROMSIMM g__,, . Open (6 slots) MC68030 MC68882 & 2 IOPs Partof MC68030 OSS&FMC I VIA &OSS RAMSIMM, ROMSIMM MacintoshIlfx 2 Guideto the MacintoshFamilyHardware Mouse& Floppy Serial SCSI Expansion Power keyboard drive ports ports Display Sound method Hdw.on/off Macintosh 800KB sec SCSI Built-in PWM {none) switch B&Wvideo Hdw.on/off ADB FDHD sec SCSI Built-inB&W PWM 68000PDS switch or exp. card Hdw.on/off ADB FDHD sec SCSI Built-inB&W ASC 68030PDS switch or exp. card Noon/off SpecialADB, FDHD sec SCSI Flatpanel ASC 68000PDS sw. (sleep) trackball or ext.video Kbd.on, ADB 800KB sec SCSI B&Wor color ASC NuBus softw.off on exp. card (6 slots) Kbd.on, ADB FDHD sec SCSI B&Wor color ASC NuBus softw.off on exp. card (6 slots) Kbd.on, ADB FDHD sec SCSI B&Wor color ASC NuBus softw.off on exp. card (3 slots) Kbd.on, ADB FDHD sec SCSI Built-inB&W ASC NuBus softw.off or color, (3 slots) or exp. card Kbd.on, ADB FDHD sec SCSIDMA B&Worcolor ASC NuBus(6 slots softw.off on exp. card &68030PDS Chapter1 Introduction to the Macintosh Hardware 3 6 Important Memorysizes,addresses,and other data are specificto each type of Macintoshcomputerand are providedonly for informationalpurposes.To maintainsoftwarecompatibility acrossthe Macintoshline,and to allowfor futurechangesto the hardware,you are stronglyadvisedto use the MacintoshToolbox and OperatingSystemroutineswhereverprovided.In particular, neveruse absoluteaddressesto accesshardware,becausethose addressesare differenton differentmodels.t::,. The followingMacintoshcomputersare describedin this book: • The Macintosh128Kcomputer,with an MC68000 microprocessorrunningat 8 MHz, 128KBof RAM,64KBof ROM,and a 400KBinternaldiskdrive. • The Macintosh512Kcomputer,with an MC68000 microprocessor,512KBof RAM, 64KBof ROM,and a 400KBinternaldisk drive.Exceptfor the additionalmemory,the Macintosh512Kis identicalto the Macintosh128K. • The Macintosh512Kenhancedcomputer,withan MC68000 microprocessor,512KBof RAM,128KBof ROM,and an 800KBinternaldiskdrive.TheROMand diskdrivein the Macintosh512Kenhancedcomputerare the sameas thoseused in the MacintoshPlus. In all otherrespects,the Macintosh512Kenhancedis identicalto the Macintosh512K. • The MacintoshPluscomputer,with an MC68000 microprocessorrunningat 8 MHz, 1 MBof RAM(minimum),128KBof ROM,and an 800KBinternaldiskdrive.The RAM in the MacintoshPluscan be expandedto 4 MB.Otherenhancementsin the MacintoshPlus includea SmallComputerSystemInterface(SCSI)port for high-speed communications with disk drivesand otherperipheraldevices,new connectorsfor the serialports,and a keyboardwithbuilt-incursorkeysand numerickeypad.The MacintoshPlus,Macintosh512Kenhanced,Macintosh512K,and Macintosh128Kare sometimesreferredto collectivelyas the classicMacintoshcomputers. • The MacintoshSEcomputer,whichis similarto the MacintoshPlusexceptthat the MacintoshSEprovidesfor an expansioncard and has the new, higher-capacity floppy diskdrives(calledFHDH™, forfloppydisk,highdensity).The expansionconnector providesdirectaccessto the processorbus includingall the MC68000 address,data, and controllineson the logicboard.Otherfeaturesintroducedin the MacintoshSE includeprovisionfor a secondinternalfloppydiskdriveor an internalhatd disk drive, fasteraccessto RAMand to a SCSIhard disk,and the AppleDesktopBus™(ADB) interfacefor communicating with input devices. • Note:MacintoshSEcomputersmanufacturedprior to 1989have the same800KB floppydisk driveused in the MacintoshPlus. 4 Guideto the MacintoshFamilyHardware • The Macintosh SE/30computer,whichcombinesthe compactsize and internalvideo displayof the Macintosh SEwiththe greaterspeedand improvedsoundof the MacintoshII-familycomputers.Likethe MacintoshIlx, the MacintoshSE/30has an MC68030 microprocessor runningat 16MHzand an MC68882 mathematics coprocessor.The Macintosh SE/30has the sameApplesoundICas the Macintosh Ilx. Likethe Macintosh SE,the Macintosh SE/30has the new high-capacity floppydisk drive(FDHD)and an expansionconnectorthat providesdirectaccessto the processorbus. The videocircuitsin the MacintoshSE/30emulatea NuBus™ video card,so that the sameROMand operatingsystemcan be used in the Macintosh SE/30 as in MacintoshII-familycomputers. • The MacintoshPortablecomputeris basedon the Macintosh SE.It differsfromthe Macintosh SEin that it uses speciallow-power-consumption componentsthroughout, includingan MC68HC000 microprocessor. The processorin the MacintoshPortable runsat 16MHz,twicethe speed of the processorin the Macintosh SE.The Macintosh Portablealsohas a built-inflat-paneldisplay,a built-intrackball,a rechargeable battery,and specialpower-controlcircuitryto conservepowerand retainthe contents of RAMwhenthe machineis not in use.TheMacintosh Portableusesthe high-capacity FDHDfloppydiskdriveand the customsoundICused in the Macintosh SE/30. • The Macintosh II computer,whichdiffersfromall earlierMacintoshcomputersin that it has a separatevideomonitorand allowsusersto insertand removeexpansioncards. Theexpansionbus (calledNuBus)providesaccessto the processorbus and all the deviceson the logicboardfor up to six expansioncards.Otherfeaturesof the Macintosh II includean MC68020 microprocessorrunningat 16MHz,an MC68881 mathematics coprocessor(alsocalledthefloating-pointunit,or FPU),memory expandableto 8 MB,provisionfor both a second800KBinternalfloppydiskdriveand an internalhard diskdrive,fasteraccessto RAMand to a SCSIharddisk,and an Apple customsound IC.Likethe MacintoshSE,the Macintosh II uses the ADBinterfacefor communicating with inputdevices.The MacintoshII has no externalconnectorfor floppydisk drives. • The MacintoshIlx computer,whichis similarto the Macintosh II exceptthat it has a moreadvancedmicroprocessor (the MC68030, runningat 16MHz),the MC68882 mathematicscoprocessor,a new floppydisk interface,and FDHDdrives. • The Macintosh Hex computer,whichis similarto the MacintoshIlx exceptthat it providesthreeNuBusslotsratherthan six,has a smallerfootprint,accommodates only one internalFDHDdrive,and providesa connectorfor an externalfloppydiskdrive. • The Macintosh lid computer,whichis similarto the MacintoshHex exceptthat it has built-invideocircuitsand a fasterprocessorclock(25MHz).The Macintoshlid has an interalconnectorfor an optionalRAMcachecardthat providesevenfaster processing.A special-ordermodelof the Macintosh lid comesequippedwith a customparityIC and 9-bitRAMSIMMs that provideparitygenerationand detection. Chapter1 Introductionto the MacintoshHardware S • The Macintosh Ilfxcomputer,whichis similarto the Macintosh Ilx exceptthat it has a fasterprocessorclock(40MHz),built-inRAMcache,and intelligent1/0 processors (IOPs)for improvedperformance. The IOPsrelievethe mainprocessorof routine taskson the portsfor the floppy-disk, ADB,and serialI/0. Similarly, the SCSIchannel has true hardwareOMA(direct-memory access)that providesfasterdata transfersand freesthe mainprocessorfor othertasks. ~ Developer tip To learnhowyourprogramcandetermineon whichMacintosh computerit is running,use the Environsprocedureand the SysEnvirons functiondescribedin InsideMacintosh.Someadditionalinformation aboutwhichhardwarecomponentsare connectedis availablein the globalvariableHWCfgFlags. The meaningsof the bitsstoredin this variableare listedin the MacintoshProgrammer'sWorkshopfile HardwareEqu.a, whichis in an MPW™ foldernamedAlncludes.4 Exteriorfeaturesof the Macintoshcomputers Thissectiondescribesand illustratesthe externalappearanceof the membersof the Macintoshfamily. Macintosh128K,512K,and 512Kenhancedcomputers TheMacintosh128K,512K,and 512Kenhancedcomputersare identicalin appearance, withbuilt-invideoand sound,a separatekeyboard,and a mouse.Theyincludean internal floppydiskdriveand externalconnectorsfor peripheraldevicessuchas diskdrives, digitizingpads, modems,and printers. Figure1-1showsa frontviewof the Macintosh128K,512K,and 512Kenhancedcomputers. Noticethe videoscreen,diskdriveaccessopening,keyboard,keyboardconnector, and mouse. 6 Guideto the MacintoshFamilyHardware • Figure1-1 Frontviewof the Macintosh128K,512K,and 512Kenhancedcomputers Figure1-2showsa backviewof the Macintosh128K,Macintosh512K,and Macintosh512K enhancedcomputers.Noticethe connectorsfor the two serialports,the floppydisk drive port,the connectorfor the mouse,and the soundjack. • Figure1-2 Backviewof the MacintoMJ. 128K,512K,and 512Kenhancedcomputers Chapter1 Introductionto the MacintoshHardware 7 MacintoshPlus computer TheMacintosh Pluscomputerha~the sameexteriorappearanceas the earlierMacintosh computers,but has differentexternalconnectors.The frontviewof the Macintosh Plusis identicalto that of the Macintoshcomputersthat precededit. Figure1-3showsa back viewof the Macintosh Plus.Noticethat a connectorfor the SCSI(parallel)port has been addedand thatthe connectorsfor the two serialportshavebeen changedfromDB-9 connectorsto mini8-pinconnectors. • Figure1-3 Backviewof the Macintosh Pluscomputer i I I • MacintoshSE and MacintoshSE/30 computers The Macintosh SEand Macintosh SE/30computersare compactmachines,withbuilt-in videoand sound,a separatekeyboard,and a mouse.Eachincludesan internalfloppydisk drive(FDHD).TheMacintosh SEcan haveeithera secondinternalfloppydiskdriveor an internalharddiskdrive.TheMacintosh SE/30has an internalharddiskdrive;a second internalfloppydiskdriveis not availableas an optionin the Macintosh SE/30.External connectorsare providedfor peripheraldevicessuchas diskdrives,graphicstablets, modems,and printers.TheMacintosh SEand Macintosh SE/30havea similarcaseand havethe sameexternalconnectors. 8 Guideto the MacintoshFamilyHardware • Note:TheoriginalMacintosh SEusedthe same800KBfloppydiskdriveas the MacintoshPlus.The currentMacintosh SE,manufactured September1989and later, usesthe FDHDdrive;it is identifiedby the lettersFDHDon the front. Figure1-4showsa frontviewof the Macintosh SEcomputer.Noticethe videoscreen, diskdriveaccessopenings,keyboard,and mouse. • Figure1-4 Frontviewof the Macintosh SEcomputer Chapter1 Introductionto the MacintoshHardware 9 Figure1-5showsa frontviewof the MacintoshSE/30computer.Noticethe videoscreen, disk driveaccessopening,keyboard,and mouse. • Figure1-5 Frontview of the MacintoshSE/30computer 10 Guideto the MacintoshFamilyHardware Figure1-6showsa backviewof the Macintosh SEcomputer.Exceptfor the label,the back of the MacintoshSE/30is identicalto that of the Macintosh SE.The connectorsare identicalto thoseused by the MacintoshPlus,exceptthat the mouseconnectorhas been replacedby two connectorsfor the AppleDesktopBusand the soundjackhas been moved.Noticealsothe locationof the punch-outpanelfor a connectorto an optional expansioncard. • Figure1-6 Backviewof the Macintosh SEcomputer;the MacintoshSE/30looks the same Chapter1 Introductionto the MacintoshHardware 11 :MacintoshPortablecomputer The MacintoshPortablecomputeris similarto the MacintoshSE.The MacintoshPortable has severalbuilt-infeaturesthat enhanceits portability:batterypower,flat-paneldisplay, built-inkeyboard,and trackballpointingdevice.EachMacintoshPortableincludesan internalFDHDdriveand eithera secondinternalfloppydiskdriveor an internalharddisk drive.The MacintoshPortablehas the sameset of externalconnectorsas the Macintosh SEwithtwo exceptions:it has onlyone externalADBconnector,and a telephonejackhas been addedfor use withan internalmodem. • Warning The MacintoshPortablecomputercannotprovidethe powerrequired by mostADBdevices;onlylow-power-consumption devicesshouldbe connectedto the ADBconnectoron the MacintoshPortable. Connectingany otherADBdeviceto the ADBconnectorcan resultin improperoperationof the MacintoshPortablecomputer.• Figure1-7showsa frontviewof the MacintoshPortablecomputer.Noticethe flat-panel display,the keyboard,and the trackball.The accessopeningsfor the floppydisk drives are on the rightside of the unit. • Figure1-7 Frontviewof the MacintoshPortablecomputer 12 Guideto the MacintoshFamilyHardware Figure1-8showsa backviewof the MacintoshPortablecomputer.Noticethe telephone jackfor use withan internalmodem,the videoconnectorfor an externalmonitor,and the powerinputconnectorfor DCpowerfroman externalbatterycharger. • Figure1-8 Backviewof the MacintoshPortablecomputer Macintoshll-family computers The designof the Macintosh II-familycomputersis modular:each Macintosh II-family computeris madeup of severalunits,including • mainsystemunitcontainingthe mainlogicboard,the powersupply,and the expansionslots • externalvideomonitor • videodisplayadaptercard,installedin one of the expansionslots • AppleStandardKeyboardor AppleExtendedKeyboard • AppleStandardMouse The mainsystemunit of the Macintosh II, MacintoshIIx, and MacintoshIIfxcomputers can containeitherone or two internalfloppydiskdrivesand can containa 5.25-inchor 3.5-inchhard diskdrive.The mainsystemunit of the Macintosh IIcxand MacintoshIIci has one floppydiskdriveand can containa 3.5-inchharddiskdrive.Externalconnectors are providedfor peripheraldevicessuchas harddiskdrives,digitizingpads,modems, and printers.The MacintoshIlcxand Macintosh Ilci computershavean external connectorfor a floppydisk drive. Chapter1 Introductionto the MacintoshHardware 13 • Note:The MacintoshII, Macintoshllx, and Macintoshllfx computersdo not have externalconnectorsfor floppydiskdrives.Althoughyou can connecta HardDisk20 to the externalfloppydisk driveof the MacintoshHexand Macintoshllci, the MacintoshHexdoes not havea driverfor the HardDisk20 in ROM. Figure1-9showsa frontviewof the MacintoshII, Macintoshllx, and MacintoshIlfx computers.Noticethe videodisplaymonitor,disk driveaccessopenings,keyboard, and mouse. • Figure1-9 Frontview of the MacintoshII, MacintoshIlx, and MacintoshIlfx computers 14 Guideto the MacintoshFamilyHardware Figure1-10showsa backviewof the Macintosh II, MacintoshIlx, and MacintoshIIfx computers.Noticethe connectorsfor the two serialports,the SCSIport, the external soundjack,and the two connectorsfor the AppleDesktopBus.Noticealso the locations of the punch-outpanelsfor connectorsto optionalexpansioncards. • Figure1-10 Backview of the MacintoshII, MacintoshIIx, and MacintoshIlfx computers Chapter1 Introductionto the MacintoshHardware 15 Figure1-11showsa frontviewof the MacintoshHexand Macintosh llci computers. Noticethe reducedsize comparedto the MacintoshII and Macintosh!Ix. • Figure1-11 Frontview of the MacintoshHex and Macintoshllci computers 16 Guideto the MacintoshFamilyHardware Figure1-12showsa back viewof the MacintoshHexcomputer.Noticethe additionof a connectorfor an externalfloppydiskdriveand the new powerswitch. • Figure1-12 Backview of the MacintoshHexcomputer Figure1-13showsa back viewof the MacintoshHcicomputer.Noticethe additionof a connectorfor a video monitor. • Figure1-13 Backview of the MacintoshHcicomputer Chapter1 Introductionto the MacintoshHardware 17 Inside the Macintoshcomputers Thissectionlistsand brieflydescribesthe internalcomponentsof each memberof the Macintoshfamily.Thesecomponentsare describedin moredetailin the followingchapters. ClassicMacintoshcomputers Figure1-14showsthe interiorof the Macintosh Pluscomputer.The microprocessor, RAM, ROM,and the variousinput/outputICsare locatedon the mainlogicboard(alsocalled the digitalboard).Theverticalanalogboardcontainsthe powersupplyand video circuitryfor the built-inmonitor.The interiorsof otherclassicMacintoshcomputersare similarin appearanceto the interiorof the Macintosh Plus. • Figure1-14 Interiorviewof the Macintosh Pluscomputer 18 Guideto the Macintosh FamilyHardware Eachof the Macintosh128K,512K,and 512Kenhancedcomputerscontainsthe followingcomponents: • A MotorolaMC68000 microprocessor,runningat a systemclockfrequencyof 7.8336megahertz. • Severalprogrammable logicarrays,referredto as PALs,that provideaddressdecoding and controlsignals. • Random-access memory(RAM),permanentlysolderedonto the mainlogicboard.The Macintosh128Khas 128KBof RAM,and the 512Kand 512KenhancedMacintosh computerseach have 512KBof RAM. • Read-onlymemory(ROM).The ROMcontainsMacintoshToolboxand Operating Systemroutines. • Thevideomonitor. • A soundsystemconsistingof a SonyanalogsoundIC,built-inspeaker,and external sound port. • A 6522VersatileInterfaceAdapter(VIA)IC, used to communicatewith the keyboard, the mouse,and the real-timeclock(RTC). • An 8530SerialCommunications Controller(SCC)IC,providingtwo independentports for serial communication. • The IWM(IntegratedWozMachine),an ApplecustomIC used to controlthe floppy disk interface. • A floppydiskdrive.TheMacintosh128Kand 512Kcomputerseach havea single-sided 400KBdisk drive;the Macintosh512Kenhancedand MacintoshPluscomputerseach have a double-sided800KBdisk drive. In additionto the componentsof the Macintosh128K,512K,and 512Kenhanced computers,the MacintoshPlus computercontainsthe following: • A 5380SmallComputerSystemInterface(SCSI)IC,for high-speedparallel communication withdevicesuchas harddisks. • Connectorsfor RAMexpansionon the mainlogicboard. • Up to 4 MBof random-access memory(RAM), providedon two or foursmall;plug-in printedcircuitcardscalledSIMMs(SingleIn-lineMemoryModules). Chapter1 Introductionto the MacintoshHardware 19 MacintoshSE and MacintoshSE/30 computers The Macintosh SEand Macintosh SE/30computersare compactmodelswith advanced features,notablya singleinternalexpansionslot,the FDHDdrive(alsocalledthe SuperDrive),and provisionfor a built-inharddisk. MadntoshSEcomputer Figure1-15showsthe interiorof the MacintoshSEcomputer.The microprocessor, RAM, ROM,and the variousinput/outputICsare locatedon the mainlogicboard.Thevertical analogboardcontainsvideocircuitryfor the built-inmonitorand a coolingfan.The powersupplyis enclosedin a metalboxand mountedon the analogboard;a cablefrom the powersupplyplugsintothe analogboard.An optionalexpansioncardattachesto a connectoron the mainlogicboard. • Figure1-15 Interiorviewof the Macintosh SEcomputer 20 Guideto the MacintoshFamilyHardware EachMacintoshSEcomputercontainsthe followingcomponents: • A MotorolaMC68000 microprocessor,runningat a systemclockfrequencyof 7.8336megahertz. • AnApplecustomintegratedcircuit,the BBU(BobBaileyUnit),whichprovides addressdecodingand controlsignals. • A programmable logicarray,the GLU(GeneralLogicUnit),whichsupplementsthe BBU with some additionalcontrollogic. • Up to 4 MBof random-access memory(RAM),providedon two or four SIMMs. • Read-onlymemory(ROM).The ROMcontainsMacintoshToolboxand Operating Systemroutines. • TheAppleDesktopBus(ADB) usedto communicate withthe keyboard, the mouse, and other input devices. • A 96-pinexpansionconnector,providinginternalexpansioncapabilityplus accessto the MC68000 bus. In this book, this connectoris referredto as the MacintoshSE 68000 processor-directslot (PDS);in earlierbooks,this connectorwas referredto as the SEBus connector. • The video monitor. • A sound systemconsistingof a Sonyanalogsound IC,built-inspeaker,and external sound port. • An Applecustomversionof the VersatileInterfaceAdapter(VIA)IC,to supportthe ADBand the real-timeclock(RTC). • An 8530SerialCommunications Controller(SCC)IC,providingtwo independentports for serial communication. • The SWIM(SuperWozIntegratedMachine),an ApplecustomIC used to controlthe interfaceto the FDHDdrive.The SWIMis an enhancedversionof the IWM. • OneFDHDdrive(double-sided 1.4MBfloppydiskdrive)andprovision fora hard disk.The FDHDdrivecan read,write,and formatsingle-sided400KBdisks,double- sided 800KBdisks,and high-density1.4MBdisks. • A 5380SmallComputerSystemInterface(SCSI)IC,for high-speedparallel communication with devicessuch as hard disks. • Note: MacintoshSEcomputersmanufacturedbeforeSeptember1989used the IWM customIC to controlthe floppydisk interface.Thosemachinescamewith one double-sided800KBfloppydisk driveand provisionfor eithera second800KB floppydisk driveor a hard disk. Chapter1 Introductionto the MacintoshHardware 21 MacintoshSE/30computer The interiorof the MacintoshSE/30computeris similarin appearanceto that of the MacintoshSE,althoughthe componentson the logicboard in the MacintoshSE/30are more closelyrelatedto those in a MacintoshIlx. Figure1-16showsthe interiorof the MacintoshSE/30. • Figure1-16 Interiorviewof the Macintosh SE/30computer Each MacintoshSE/30computercontainsthe followingcomponents: • A MotorolaMC68030 microprocessor,runningat a systemclockfrequencyof 15.6672 megahertz.In additionto a higherclockrate than the MC68000, the MC68030 provides 32-bitdata and addressbuses, data and instructioncaches,a built-inmemory managementunit, and other enhancements. • mathematicscoprocessor(also calledthe floating-pointunit, • A MotorolaMC68882 or FPU). • An Applecustomintegratedcircuit,the GLUE,that providesaddressdecodingand controlsignals.(Thename GLUEis a playon words,basedon the acronymGLUfor generallogicunit and the factthat the GLUEIC "gluestogether"the other ICs by providinghandshakingbetweenthe 1/0 devicesand the processor.) 22 Guideto the MacintoshFamilyHardware • Up to 128MBof random-accessmemory(RAM),providedin four or eightSIMMs. • Read-onlymemory(ROM),providedin one SIMM.The ROMcontainsMacintosh Toolboxand OperatingSystemroutines. • VideoRAM,providedin two 256KbitRAMICs,for a total of 64KBof RAM. • Videologic,implementedby severalPALs.The MacintoshSE/30video logicemulatesa NuBusvideocard installedin NuBusslot $E. • VideoROM,providedin one 8 KBROMIC. • The AppleDesktopBus (ADB),used to communicatewith the keyboard,the mouse, and other input devices. • A 120-pinexpansionconnectorcalledthe MacintoshSF/3068030processor-direct slot (PDS). • A sound systemconsistingof an Applecustomdigitalsound-synthesizer IC,the Apple SoundChip(ASC);two SonyanalogsoundIC;a built-inspeaker;and an externalstereo sound jack. • TwoApplecustomVersatileInterfaceAdapter(VIA)ICs,to supportthe ADBand other I/O devices. • An 8530SerialCommunications Controller(SCC)IC,providingtwo independentports for serial communication. • The SWIM(SuperWozIntegratedMachine),an ApplecustomIC used to controlthe interfaceto the FDHDdrive.The SWIMis an enhancedversionof the IWM. • One FDHDdrive(double-sided1.4MBfloppydisk drive),and provisionfor a hard disk.The FDHDdrivecan read, write,and formatsingle-sided400KBdisks,double- sided 800KBdisks,and high-density1.4MBdisks. • A 5380SmallComputerSystemInterface(SCSI)IC,for high-speedparallel communicationwith devicessuch as hard disks. MacintoshPortablecomputer Figure1-17showsthe interiorof the MacintoshPortablecomputer.The Macintosh Portableis unique in the Macintoshfamilyin that it containsa batterylargeenoughto power the entireunit.The interiorspace is dividedamongthe battery,the powersupply, and the mainlogicboard. In additionto the RAM,ROM,microprocessor,and I/O ICs,the mainlogicboard includescircuitryand logicto conservepower and monitorthe battery, plus controlcircuitsfor the flat-panelvideo display. Chapter1 Introductionto the MacintoshHardware 23 • Figure1-17 Interior . viewof the MacintoshPortable computer 24 Fam.11y Hardware Guidetot he Macintosh EachMacintoshPortablecomputercontainsthe followingcomponents: • A MotorolaMC68HC000microprocessor, runningat a systemclockfrequencyof 15.6672megahertz. • TwoApplecustomintegratedcircuitsthat providecontrolsignalsand address decoding. • An Applecustomintegratedcircuitthat providesdata and controlsignalsfor the flat-paneldisplay. • Random-accessmemory(RAM),permanentlysolderedon the mainlogicboard.The MacintoshPortablehas 1 MBof permanentRAM. • A 50-pininternalRAMexpansionconnector. • Read-onlymemory(ROM),permanentlysolderedon the mainlogicboard.The MacintoshPortablehas 256KBof permanentROM,containingMacintoshToolbox and OperatingSystemroutines. • A 50-pininternalROMexpansionconnector. • A 32KBvideoRAM. • An active-matrixflat-paneldisplay. • A keyboardmicroprocessorthat interpretskeyswitchtransitionsand functionsas the ADBtransceiverfor the keyboard. • Two identical34-pinconnectors,on eitherside of the machine,that can be used for the keyboard,trackball,or optionalnumerickeypad. • A soundsystemconsistingof an AppleSoundChip(ASC),two Sonyanalogsound ICs,a built-inspeaker,and an externalstereosound jack. • The PowerManagerIC,a Mitsubishi50753single-chipmicroprocessor. The Power ManagerIC directsthe power controlcircuitsand servesas the real-timeclock(RTC) and ADBtransceiverin the MacintoshPortable. • An ApplecustomVersatileInterfaceAdapter(VIA)IC,to supportthe PowerManagerIC. • A CMOSversionof the 8530SerialCommunications Controller(SCC)IC,providingtwo independentports for serial communication. · • An 18-pininternalconnectorfor an optionalmodemcard that can communicatewith the processorthroughone of the secIC'sserialports. • The SWIM(SuperWozIntegratedMachine),an ApplecustomIC used to controlthe interfaceto the FDHDdrive. .TheSWIMis an enhancedversionof the IWM. • One FDHDdrive(double-sided,1.4MBfloppydisk drive),and provisionfor either a secondfloppydisk driveor a hard disk.The FDHDdrivecan read,write,and format single-sided400KBdisks,double-sided800KBdisks,and high-density1.4MBdisks. Chapter1 Introductionto the MacintoshHardware 25 • A 53C80SmallComputerSystemInterface(SCSI)IC,for high-speedparallel communication with devicessuch as hard disks. • A sealedlead-acidbattery.The batterycan be rechargedwiththe separatebattery chargerprovidedwith the computer. • A 96-pinexpansionconnector.In this book, that connectoris referredto as the MacintoshPot1able68000processor-direct slot(PDS). MacintoshIT-family computers Allthe computersin the Macintosh II familysharethe samemodulardesignwithmultiple expansionslots and externalvideo monitors.The MacintoshII, MacintoshIIx, and MacintoshIIfxcomputershavesix expansionslotsand are similarin appearance,with mainunits 18.66incheswide.The MacintoshIIcxand MacintoshIIcicomputershave threeexpansionslotsand mainunitsthat are 11.9incheswide. MacintoshII and MacintoshIIx computers Figure1-18showsthe interiorof the mainsystemunit in the Macintosh II computer.The interiorof the MacintoshIIx computeris nearlyidenticalin appearanceto that of the MacintoshII. The microprocessor,RAM,ROM,and the variousinput/outputICsare locatedon the computer'smainlogicboard(alsocalledthe motherboard). 'fhe main systemunit alsocontainsthe powersupplyand a coolingfan.Youcan installoptional expansioncardsby pluggingthemintoNuBusexpansionslots;note the presenceof a videoexpansioncard for the externalvideomonitor. The MacintoshII computercpntainsthe followingcomponents: • A MotorolaMC68020 microprocessor,runningat a systemclockfrequencyof 15.6672megahertz. • A MotorolaMC68881 mathematicscoprocessor(alsocalledthefloating-point unit,or FPU). • An Applecustomintegratedcircuit,the GLUE, that providesaddressdecodingand controlsignals. Guideto the MacintoshFamilyHardware • Figure1-18 Interiorview of the MacintoshII computer • A memorymanagementunit (MMU)IC,whichtranslatesbetweenthe logicaladdresses used by softwareand the physicaladdressesof the hardwaredeviceson the MacintoshII main logic board. The standardconfigurationfor the MacintoshII uses the AppleproprietaryAddressManagementUnit(AMU,also knownas the Hochsprung Memory Management Unit, or HMM[}). If you want to run a virtual memory operating systemsuch as A/UX®(Apple'simplementationof the AT&TUNIX® operating system),or use virtualmemorywith systemsoftwareversion7.0,you mustreplacethe AMUwith a MotorolaMC68851 PagedMemoryManagementUnit(PMMU). (Youcan also continueto run earlierversionsof the MacintoshOperatingSystemafterthe PMMUis installed.) • Up to 128MBof random-accessmemory(RAM),providedin four or eight SIMMs. Chapter1 Introductionto the MacintoshHardware • Read-onlymemory(ROM),providedin four 512KbitROM!Cs.The ROMcontains MacintoshToolboxand OperatingSystemroutines. • The AppleDesktopBus (ADB),used to communicatewith the keyboard,the mouse, and other input devices. • Apple'simplementation of the NuBus,providingsix internalexpansionslots.AnApple customIC, the NuChip,controlsthe bus interface. • A sound systemconsistingof an Applecustomdigital-soundsynthesizerIC,the Apple SoundChip(ASC);two Sonyanalogsound!Cs;a built-inspeaker;and an external stereo sound jack. • TwoApplecustomVersatileInterfaceAdapter(VIA)!Cs,to supportthe ADBand other I/0 devices. • An 8530SerialCommunications Controller(SCC)IC,providingtwo independentports for serial communication. • The IWM(IntegratedWozMachine),an ApplecustomIC used to controlthe floppy disk interface. • A double-sided800KBfloppydisk drive,and provisionfor both a second800KB floppydisk driveand a hard disk. • A 5380SmallComputerSystemInterface(SCSI)IC,for high-speedparallel communication with devicessuch as hard disks. The MacintoshIlx computercontainscomponentsidenticalto those in the MacintoshII except for the followingdifferences: • The MacintoshIlx computercontainsa MotorolaMC68030 microprocessor,rather than the MC68020 used in the MacintoshII. The MC68030 offersa data cachein additionto the instructioncachepresentin the MC68020, and providesa built-in memorymanagementunit.Becausethe MC68030 has its own memorymanagement capability,the MacintoshIlx does not have the separateMMUIC presentin the MacintoshII. • The MacintoshIlx has the SWIM(SuperWozIntegratedMachine),an ApplecustomIC used to controlthe interfaceto the FDHDdrive.The SWIMis an enhancedversionof the IWM. • The MacintoshIlx has one FDHD drive,and provisionfor both an internalhard disk and eithera secondFDHDdriveor an 800KBfloppydiskdrive.The FDHDdrivecan read, write,and formatsingle-sided400KBdisks,double-sided800KBdisks,and high-density1.4MBdisks. • The MacintoshIlx has an MC68882 FPUratherthan the MC68881 used in the MacintoshII. • AllROMin the MacintoshIlx computeris providedon a ROMSIMM. 28 Guideto the MacintoshFamilyHardware MacintoshIla and MacintoshIlci computers The MacintoshHexand MacintoshIlci computersare smallerversionsof the modular designof the MacintoshII family.Bothmachineshave onlythree NuBusslotsand roomfor a singleinternalfloppydisk drive.Figure1-19showsthe interiorof the MacintoshHex computer;note the presenceof an expansionvideo card for the videomonitor.Figure1-20 showsthe interiorof the MacintoshIlci computer;it can drivea video monitorwithoutan expansioncard. The MacintoshHexcomputercontainsmanyof the same componentsas the MacintoshIlx, as shownin the followinglist. • A MotorolaMC68030microprocessor,with data and instructioncachesand a built-in memorymanagementunit.Becausethe MC68030 has its own memorymanagement capability,the MacintoshHexdoes not have the separateMMUIC present in the MacintoshII. • A MotorolaMC68882 mathematicscoprocessor(alsocalledthefloating-pointunit, or FPU). • An Applecustomintegratedcircuit,the GLUE,that providesaddressdecodingand controlsignals. • Up to 128MBof random-accessmemory(RAM),providedin four or eightSIMMs. • The ROMis providedin four 512KbitROMICs.The ROMcontainsMacintoshToolbox and OperatingSystemroutines.A connectorfor a ROMSIMMis also provided. • The AppleDesktopBus (ADB),used to communicatewith the keyboard,the mouse, and other input devices. • ThreeinternalexpansionslotsusingApple'simplementation of the NuBus.AnApple customIC,the NuChip30,controlsthe bus interface. • A sound systemconsistingof an Applecustomdigital-soundsynthesizerIC,the Apple SoundChip(ASC);two SonyanalogsoundICs;a built-inspeaker;and an external stereo sound jack. • TwoApplecustomVersatileInterfaceAdapter(VIA)ICs,to supportthe ADBand other I/0 devices. • An 8530SerialCommunications Controller(SCC)IC,providingtwo independentports for serial communication. • The SWIM(SuperWozIntegratedMachine),an ApplecustomIC used to controlthe interfaceto the FDHDdrive.The SWIMis an enhancedversionof the IWM. Chapter1 Introductionto the MacintoshHardware • Figure1-19 Interiorview of the MacintoshHexcomputer • The MacintoshHexhas one internalFDHDdriveand provisionfor a built-inhard disk. The MacintoshHexalso has a connectorfor attachingan externalfloppy-diskdrive. The FDHDdrivecan read, write,and formatsingle-sided400KBdisks,double-sided 800KBdisks,and high-density1.4MBdisks. • A 5380SmallComputerSystemInterface(SCSI)IC,for high-speedparallel communicationwith devicessuch as hard disks. 30 Guideto the MacintoshFamilyHardware • Figure1-20 Interiorview of the MacintoshIlci computer The MacintoshIlci computercontainscomponentsidenticalto those in the MacintoshIlcx except for the followingdifferences: • The MacintoshIlci computerhas built-invideocircuitryand an externalconnectorfor a videomonitor.(Youcan alsouse a videocardin a NuBusslot,as on other MacintoshII models.) • The MacintoshIlci has two Applecustomintegratedcircuits,the MDU(Memory DecodeUnit)and RBV(RAM-Based Videocontroller),that controlmemoryaddressing and providethe specialmemoryfeaturesfor the built-invideocircuits. • The MacintoshIlci has an additionalconnectoron the mainlogicboardfor a fastRAM cache card. • A special-ordermodelof the Macintosh Ilci comesequippedwith a customparityIC and 9-bitRAMSIMMsthat provideparitygenerationand detection. Chapter1 Introductionto the MacintoshHardware 31 The MacintoshIIfx computer Figure1-21showsthe interiorof the mainsystemunit in the Macintoshllfx computer.The interiorof the Macintoshllfx is similarin appearanceto that of the MacintoshII. • Figure1-21 Interiorview of the Macintoshllfx computer The MacintoshIlfx computercombinesmanyof the featuresof the MacintoshIlx with advancedfeaturesof its own, as shownin the followinglist. • A MotorolaMC68030 microprocessor,runningat a systemclockfrequencyof 40 megahertz.The MC68030 has data and instructioncachesand providesa built-in memorymanagementunit. 32 Guideto the MacintoshFamilyHardware mathematicscoprocessor(alsocalledthe.floating-point • A MotorolaMC68882 unit, or FPO). • An Applecustomintegratedcircuit,the FastMemoryController(FMC),that controls mainRAMas wellas 32KBof high-speedcacheRAMon the mainlogicboard. • A special-ordermodelof the MacintoshIlfx comesequippedwith a customPLD (programmablelogicdevice)IC and 9-bitRAMSIMMsthat provideparitygeneration and detection. • Up to 128MBof random-access memory(RAM),providedin four or eightSIMMs. • Read-onlymemory(ROM),providedon a ROMSIMM. The ROMcontainsMacintosh Toolboxand OperatingSystemroutines. • An Applecustomintegratedcircuit,the OperatingSystemSupport(OSS)IC, that providesaddressdecodingand controlsignals. • SixinternalexpansionslotsusingApple'simplementationof the NuBus.Threenew Applecustomintegratedcircuits,the BIU30,BIU2,and CGTO,providethe interface betweenthe NuBusand the mainprocessorbus. • A 120-pinexpansionconnectorcalledthe MacintoshIlfx 68030processor-direct slot(PDS). • A sound system consisting of an Apple custom digital-sound synthesizer IC, the Apple SoundChip(ASC);two Sonyanalogsound!Cs;a built-inspeaker;and an external stereo sound jack. • One ApplecustomVersatileInterfaceAdapter(VIA)IC to supportI/O devices. • TwoApplecustomintegratedcircuitswith built-inprocessors,the I/O Processors (IOPs).One IOPcontrolsserialI/O and AppleTalk® I/O throughthe 8530SCC.The other IOP controlsthe SWIMand containsthe ADBinterfacethat communicateswith the keyboard,the mouse,and other input devices. • An 8530SerialCommunications Controller(SCC)IC,providingtwo independentports for serial communication. • The SWIM(SuperWozIntegratedMachine),an ApplecustomIC used to controlthe interfaceto the FDHDdrive.The SWIMis an enhancedversionof the IWM. • One internalFDHDdrive,and provisionfor both an internalhard diskand eithera secondFDHDdriveor an 800KBfloppydiskdrive.The FDHDdrivecan read,write, and formatsingle-sided400KBdisks,double-sided800KBdisks,and high-density 1.4MBdisks. • An Apple custom integrat~d circuit, the SCSI DMA, that provides true direct-memory accesscapabilityfor high-speedparalleldevicessuch as hard disks. Chapter1 Introductionto the MacintoshHardware 33 Memory-mappedevice selection The MC68000 processor's24-bitaddressbus provides224 (16,777,216) uniqueaddresses. If allof theseaddresses werededicated to memory, theprocessor couldaddress16MBof RAMand ROM.Similarly, the MC68020 and MC68030 processors'32-bitaddressbuses can each address4 GBof memory.However,all Macintoshcomputersuse certainaddress rangesto selectdevicesin additionto memory.Besidesthe addressrangesused for RAM and ROM,other addressrangesare used for the VIAs,the SCSIC,the IWMor SWIM,the SCC, expansioncards,and so forth.Becausethis device-selectionschemeuses the memory-address lines,it is referredto as memory-mappedeviceselection. Eachtimethe processorreadsor writesto a device,it placesan addresson the address bus and assertsthe addressstrobe.In the Macintoshcomputerswith MC68020 or MC68030 processors,a memorymanagementunit (MMU)translatesthe logicaladdressfromthe processorinto a physicaladdressto be used on the mainlogicboard.The MC68030 processor-which is used in the MacintoshSEl30,MacintoshIlx, MacintoshIlcx, MacintoshIlci, and MacintoshIlfx computers-has a built-inMMU.In the MacintoshII, whichusesthe MC68020, the MMUis a separateIC(the AMUor the PMMU). A special- purposelogiccircuitin the computer(suchas a PAL,the BBU,or the GLUE)decodesthe addressto determinewhichdeviceis beingselected,and assertsthe device-selectsignal. The area of addressspace used for selectingdevicesis calleddeviceaddressspace. Withinthe addressrange of a givendevice,differentaddressesmay have different effects.In the MacintoshSE,for example,$580000selectsa SCSIread, whereas$580001 selectsa SCSIwrite.If the BBUreceivesan addressin the range$400000through$4FFFFF, it selectsthe ROM;addressbits 1 through17 selectspecificlocationsin the ROM.If it receivesan addressin the range$000000through$3FFFFF,the BBUselectsthe RAM,and the RAMmultiplexers(MUXs)presentthe addressto the RAMICsto selectspecific locationsin memory. The MC68000 does not actuallyhavean externaladdresslineAO;instead,it uses two data strobesto providethe low addressbit. Whendata strobeILDS(LowerDataStrobe)is asserted,AOis consideredto be true (1), indicatingthat data linesD7 throughDOhave validdata; and when data strobeIUDS(UpperDataStrobe)is asserted,AOis considered to be false(0), indicatingthat data linesD15throughD8 have validdata.Whenboth ILDS and IUDSare asserted,the operationis word-wideand data linesD15throughDOall have valid data. Guideto the MacintoshFamilyHardware Addressmaps for 24-bitaddresses Figure1-22showsin a generalwayhowthe addressspaceis allocatedin the Macintosh 128K,512K,and 512Kenhancedcomputers.Figure1-23showshowthe addressspaceis allocatedin the MacintoshPlus.A moredetailedaddressmap is givenin the section "AddressMapfor the ClassicMacintoshComputers"in Chapter3. Figure1-24showshow the addressspaceis allocatedin the MacintoshSEcomputer.A moredetailedaddressmap is givenin the section"AddressMapfor the MacintoshSE Computer"in Chapter3. Figure1-25showshow the addressspaceis allocatedin the MacintoshPortablecomputer. A moredetailedaddressmap is givenin the section"AddressMapfor the Macintosh PortableComputer"in Chapter3. • Addressmaps:Theaddressmapsin thischapterincludedarkshading,lightshading, and unshadedareas.Dark-shadedareasindicateaddressesthat are assignedto devicesin the basicconfigurationof that computer.Light-shadedareas indicate addressesthat are decodedbut mightnot be used,such as expansionRAMspace; someof thoseareas(as noted)are reservedfor use by AppleComputer,Inc. Unshaded areasare not decoded. Notethat the addressmapsare not to scale;you mustlookat the actualaddressesto determinethe relativesizesof addressrangesin the addressmaps. Chapter1 Introductionto the MacintoshHardware 35 • Figure1-22 Simplified addressmapfor the Macintosh128K,512K,and 512K enhancedcomputers .------------$01()() 0000 •• $PO0000 •• $E80000 •• $EOOOOO •• $D00000 •• $CO()()()() •• $000000 •• $AOOOOO •• $900000 •• $420000 ROM { •• $410000 •• $400000 •• $080000 •• $020000 •• $000000 Guideto the Macintosh FamilyHardware • Figure1-23 Simplifiedaddressmap for the MacintoshPluscomputer __$FOOOOO __$ES0000 __$EO0000 __$DO0000 __$COOOOO __$800000 __$AOOOOO __$900000 __$600000 •• $580000 -- $420000 -- $400000 __$000000 Chapter1 Introductionto the MacintoshHardware • Figure1-24 Simplifiedaddressmap for the Macintosh SEcomputer ..----------,--- $01()0000 •• $FOOOOO __$E80000 •• $EOOOOO __$D00000 •• $COOOOO __$B00000 __$AOOOOO __$9()0000 __$600000 •• $580000 __$440000 __$400000 __$000000 Guideto the MacintoshFamilyHardware • Figure 1-25 Simplifiedaddress map for the MacintoshPortable computer -~----------,--- $1000000 _,,,,,,---- ,, 1------------1--- $FF0000 ,,,,,,,,/ $1000000-- ___SFE0000 $FOOOOO __ ___$FD0000 '' '' '' ___SFC0000 '' '' ' $D00000-- \ '\ ___SFB0000 ___$FA0000 \ ___$F90000 $AO0000 __ $900000 -- \ ___$F80000 --- $F70000 $800000-- ___$F60000 $700000-- ___SF50000 $600000-- ___$F40000 $500000-- ___$F30000 $400000-- ___$F20000 ___$Fl 0000 \ $300000-- $200000-- ~-------~--- SFO0000 $100000-- $000000-- Chapter 1 Introductionto the MacintoshHardware 39 Using 32-bit addresses Becausethe classicMacintosh,MacintoshSE,and MacintoshPortablecomputersuse an MC68000 processor,whichhas a 24-bitaddressbus, versionsof the MacintoshOperating Systempriorto systemsoftwareversion7.0normallyuse onlybits 23 throughOfor addresses.TheAMU(or PMMU) ICin the MacintoshII and the built-inMMUin the MC68030 microprocessormake it possiblefor these versionsof the MacintoshOperating Systemto work with the 32-bitMacintoshcomputers.To allowthe operatingsystemto operatein 24-bitmode on a 32-bitcomputer,these MMUstake the lower24 bits of the addresscomingfromthe processorand translatethem into a 32-bitaddress. Whenthe MacintoshII computeris operatingin 24-bitmode and the processoraddresses memoryor anotherdeviceon the mainprocessorbus, the MMUtranslatesbits LA23 throughLA20fromthe MC68020 intobitsA31throughA20.Thesesignallinesare shownin the blockdiagramof the MacintoshII in Chapter2 (Figure2-6).The MMUignoresthe top 8 bits (LA31through24) in performingthe translation.In the Macintoshmodelsthat have an MC68030, this addresstranslationis performedwithinthe MC68030.Address translationis describedin more detailin the section"AddressMaps,"in Chapter3. Addressmaps for 32-bitaddresses The next fourpagesshowmemoryaddressmapsfor the Macintoshmodelsthat have 32-bitaddressing.Moredetailedversionsof the addressmapsare shownin Chapter3. Figure1-26showshow addressspace is allocatedin the MacintoshSE/30computer.Figure 1-27showshow addressspace is allocatedin the MacintoshII, MacintoshIlx, and MacintoshIlcx computers. Figure1-28showshow the 32-bitaddressspace is allocatedin the MacintoshIIcicomputer. Figure1-29showshow the 32-bitaddressspace is allocatedin the MacintoshIIfxcomputer. Moredetailedaddressmapsare givenin the section"AddressMaps"in Chapter3. 40 Guideto the MacintoshFamilyHardware • Figure1-26 Simplifiedaddressmap for the MacintoshSE/30computer __SFFOO 0000 . __SFE00000 $FFFFFFFF--- .·.·__SFCOO 0000 $F1000000 1/0space ,,,, S5FFFFFF ,l' / / ,,,,,, __S51000000 ,,,,,, I ,,,,, I /// I -- $50018000 ,ll ,ll $60000000--- / -- $50016000 -- $50014000 $50000000--- $40000000--- -- $50010000 -- $50008000 -- $50006000 __S50004000 -- $50002000 $00000000--- -- $50000000 Chapter1 Introductionto the MacintoshHardware 41 • Figure1-27 Simplifiedaddressmap for the Macintosh II, Macintosh llx, and MacintoshHex computers 1/0space $FFFFFFF--- I -- $5FFFFFFF $F1000000___ I $FOOO 0000___ I I -- $51000000 I I I -- $50018000 $60000000___ -- $50016000 $50000000___ -- $50014000 $40000000--- \ '\ -- $50010000 -- $50008000 -- $50006000 -- $50004000 -- $50002000 $00000000 ___ -- $50000000 42 Guideto the MacintoshFamilyHardware • Figure1-28 Simplifiedaddressmap for the MacintoshIlci computer $FFFFFFF••• $Fl000000••• $FOOO 0000___ 1/0space -- S5FFFFFF ,,,' ,,I -- $53000000 -- $52000000 $60000000--- I __ S50028000 -- $50026000 __ S50024000 -- $50018000 $50000000--- -- $.5001 6000 \ -- $50014000 $40000000--- ', \ ,, \.,,,_ -- $50006000 -- $50004000 -- $50002000 -- $50000000 $00000000--- Chapter1 Introductionto the MacintoshHardware • Figure1-29 Simplifiedaddressmap for the MacintoshIlfx computer -- S;FFFFFFF ,,l SFlOOOOOO ••• ,,,,, ,,l SFOOO 0000___ __ S;4oo0000 I / __ s;oo4 0000 ,l' ,.. ,,l -- S;002 8000 I I ,l' __ S50026000 -- $50024000 -- $50022000 __ S50020000 I __ S5001E0OO -- $5001cooo __ $5001A0OO $60000000--- $50000000--- $40000000--- -- $50010000 __ S5000EOOO -- $5000cooo -- $50002000 -- $50000000 $00000000--- 44 Guideto the MacintoshFamilyHardware Translating24-bitaddressesto 32-bitaddresses Figure1-30illustratesthe 24-to-32bit addresstranslationusedby the Macintosh SE/30 computerand by the Macintosh II-familycomputers.Noticethat,whereasthereare only 8 MBof addressspaceavailableforRAMin the 24-bitaddressmap,thatis onlya small portionof the 1 GBof addressspaceavailablefor RAMin the 32-bitaddressmap.The ROM,1/0 devices,and NuBusslotsalsohaveproportionately moreaddressspace assignedto themin the 32-bitaddressmap.A moredetailedaddress-translation map is givenin the section"AddressMapforthe Macintosh SEComputer"in Chapter3. Whenyourapplicationis runningthe Macintosh OperatingSystemin 24-bitmode,it can use a specialsystemcallto switchthe MMUto 32-bitmode.Whenyourapplicationis runningunderan earlierversionof the MacintoshOperatingSystemthanversion7.0,the onlyreasonto switchto 32-bitmodewouldbe to addressa NuBuscardthat needsmore than 1 MBof addressspace.Someoperatingsystems,suchas A/UX,operatein 32-bit modeat all times.Seethe chapteron the operatingsystemutilitiesin InsideMacintoshfor informationaboutswitchingbetween24-bitand 32-bitmodes. Chapter1 Introductionto the MacintoshHardware • Figure1-30 24-bitto 32-bitaddresstranslation 32-bitaddressmap -- $FFFFFFF __$F1000000 __ $FOOO 0000 24-bitaddressmap $FFFFFF-- $FOOOOO __ $900000-- -- $60000000 $800000-- -- $50000000 -- $40000000 $000000-- -- $00000000 46 Guideto the MacintoshFamilyHardware Chapter2 Architectureof the MacintoshComputers Thischapterprovidesan overviewof the architectureof the Macintosh computersand givesbriefdescriptions of the hardware componentsof eachcomputer.Thesecomponentsare described in greaterdetailin laterchapters. Other Memory General ControlICs Configuration CPU Processors mgt IC's LogicICs ~ 8L = Macintosh Plus Compact MC68000 (none) PALs PALs I VIA Ji_ Compact MC68000 (none) BBU BBU I VIA Macintosh SE Ji_ Compact MC68030 MC68882 Partof MC68030 GLUE I VIAs Macintosh SE/30 g Portable MC68000 PowerMgr. PALs VD!, CPUGLU I VIA Macintosh Portable & Misc.GLU ~ . Macintosh II Open (6 slots) MC68020 MC68881 AMUor PMMU GLUE 2 VIAs ~ . Macintosh Ilx Open (6 slots) MC68030 MC68882 Partof MC68030 GLUE I VIAs L . Macintosh Ilcx Open (3 slots) MC68882 MC68882 Partof MC68030 GLUE 2 VIAs L . Macintosh Ilci Open (3 slots) MC68030 MC68882 Partof MC68030 MDU &RBV 2 VIAs ~ . Macintosh Ilfx Open (6 slots) MC68030 MC68882 & 2 IOPs Partof MC68030 OSS&FMC I VIA &OSS 48 Guideto the Macintosh FamilyHardware Block diagrams Thissectioncontainsblockdiagramsfor all the Macintoshcomputers.The functionsof the partsshownin the diagramsare describedin the remainingsectionsof the chapter. Compactand portableMacintoshmodels The nextfivepagesshowblockdiagramsof the compactMacintoshmodelsand of the MacintoshPortablecomputer. TheMacintosh128K,512K,and 512Kenhancedcomputersare designedarounda Motorola MC68000 processor,whichhas internal32-bitdataand addressregisters,an external24-bit addressbus, and an external16-bitdatabus.The majorcomponentsplusthe dataand addressbusesof thesecomputersare shownin Figure2-1. TheMacintoshPlusand Macintosh SEcomputersalsouse an MC68000 processor.The majorcomponentsplusthe dataand addressbusesof the MacintoshPluscomputerare shownin Figure2-2.Noticethe additionof the SCSIcontrollerand the SCSIconnectorto the componentsof the earlierMacintoshcomputers. The majorcomponentsof the Macintosh SEcomputerplus the data and addressbusesare shownin Figure2-3.Noticethe additionof the AppleDesktopBus(ADB),the expansion connector,and an interrupt-request line for the SCSIcontroller.Noticealsothat the BBU handlesmanyfunctions-suchas directmemoryaccessfor videoand sound-handled by discretelogiccomponentsin earlierMacintoshcomputers. The Macintosh SE/30,like the MacintoshII-familycomputers,uses a MotorolaMC68030 processor.The MC68030, likethe MC68020, has 32-bitregistersand buses.Becausethe 68030has a built-inmemorymanagementunit,the Macintoshcomputersthat use that processordo not havea separateAMU/PMMU device. The MacintoshSE/30computercombinesmanyof the featuresof the MacintoshII-family computerswith the compactsize and processor-direct expansionslot of the MacintoshSE. The majorcomponentsplusthe dataand addressbusesof the Macintosh SE/30are shown in Figure2-4. The MacintoshPortablecomputeruses the MC68HC000, a low-power-consumption, high-speedversionof the MC68000 processorused in the Macintosh SE.The architecture of the MacintoshPortableis similarto that of the MacintoshSE,with the additionof an AppleSoundChippluscircuitryto supportthe flat-paneldisplayand the battery.The majorcomponentsplusthe dataand addressbusesof the MacintoshPortableare shown in Figure2-5. Chapter2 Architecture of the MacintoshComputers 49 • Figure2-1 Blockdiagramof the Macintosh128K,512K,and 512K enhancedcomputers Built-in monitor •.................. . RQ15-0 Video Shift -0 Internal register speaker : E External soundjack lRg 15-8 Sound Sony ... E-- ·····1PWMPAL soundICI A23-19 PAI8 Select RQ5-0 IPWM Disk 1-(To floppy devices .. •: PAL diskports) .:. D15-0 Data-bus E RAM readdata Address D15-0 buffers ~-····················· RQ15-0 RAMwritedata RAM CPU bus 128KBor Mc68000 A23--1 512KB AlS-1 Address RAM • addre~~---· Data MUXs RA8--0 bus Interrupts 015-0 ~~1 ' D15-0 ROM /IPLl 64KBor switch A17-1 128KB /IPLO Keyboard port /VIAIRQ ~ D15-8 - Mouse VIA RTC A12-9 ..... port /SCCIRQ _J Serial D15-8 sec ChannelA PortA Drivers (modem) ..... ports .... A21 ChannelB and receivers PortB (printer) ..... Internalfloppy External D7--0 diskconnector floppy I::::::::::I diskport A12-9 IWM •::::::::: I Guideto the MacintoshFamilyHardware • Figure2-2 Blockdiagramof the MacintoshPluscomputer Built-in monitor • RDQl5--0•• Video Internal : Shift 5 register speaker : External : soundjack 5RQ15-8 Sound Sony PAis r·······,pwM PAL soundICI A23-19 :• Select RQ5--0 ----~ devices I (Tofloppy • • PWMPAL diskports) : :• D15--0 Data-bus Address buffers ............................. 5 RAMdata RDQ15--0 CPU bus RAM A23-1 1MBto4MB Mc68ooo A20-1 Address RAMaddres.5eS ...........................18». Data MUXs RA9-0 bus Interrupts D15--0 D15-0 ROM /IPLl '~Inte?'llptl A17-1 64KBor switch 128KB Keyboard port /!PLO /VIAIRQ ~ D15-8 VIA - - Mouse RTC A12-9 ..... port /SCCIRQ I Serial ports D15-8 sec ChannelA Drivers PortA ... .. (modem) A2,1 ChannelB and receivers PortB (printer) ... D7--0 Internalfloppy External diskconnector floppy I\VM diskport A12-9 I::::::::::I •::::::::: I D15-8 SCSI SCSI A6-4 port •:::::::::::: I Chapter2 Architecture of the MacintoshComputers 51 • Figure2-3 Blockdiagramof the MacintoshSEcomputer 96-pin processor- directslot Built-in ~ monitor 11: D15--0 I Ii iii Video ~--1 ~!- 1:1 !I! !ii 1/ Ill A23-1 L.l:i::::::: speaker External (Allthe MC68000 soundjack linespluspower Sony I 0 andclocks) A23-19, 17,9 BBU ---- soundICI DiskPWM - (Toexternal ~-·····, floppydiskport) Address AlS,16- 10,8--1 Address I i. RAMaddresses CPU bus A23-1 MUXs . = RA9-0 1MBto4MB RAM MC68000 Data D15-0 Data-bus ..........•................ RAM:data RDQ15-0 bus buffers D15-0 " /IPLl D15-0 ~lnte~ptl ROM switch A17-1 /IPLO 256KB AppleDesktop Busports ~u /VIAIRQ - ADB .. D15-8 VIA L@ -. 1SCSIinterruptI mask I A12-9 SCSURQ -0 Internalharddisk D15-8 External SCSI connector A6-4 1························· ··•··•··•·•••·········•·· SCSIport •.•::::::::::: I D7--0 Internalfloppy Internalfloppy External diskconnector diskconnector floppy SWIM I:::::::::: I diskport A12-9 I :::::::::: I , ................... Serial /SCCIRQ ports D15-8 ChannelA Drivers PortA (modem) ... .. sec A2,1 ChannelB and receivers PortB (printer) ... .. 52 Guideto the MacintoshFamilyHardware • Figure2-4 Blockdiagramof the Macintosh SE/30computer 120-pin processor- directslot =======: ---·-·--:~I (Allh 680 0 te 3 linespluspower andclocks) Video A31-24,16 logic ~BWt-m monitor VID0-7 ~ ~ VideoRAM Video VideoRAM addressbus eo A16-0 databus rd FPU A4-1 address ....... ..~ !½!!::? MUXs '/ MC68882 D31--0 D31-24 Video ROM A25-3 Address Addressbus MUXs CPU A31--0 RAM 1 to8MB MC68030 D31--0 Databus D31--0 D31--0 A18-2 ROM AppleDesktop Busports ' 256KB .. - '·•·•b t /VPA •. @.i.·•···· .··.·•.···t······~····· :.•••.i.•···[· :.·•.····•·t·•········-_-_ -- /VPA •·:•·-:-;-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:❖:·:<·:•:<.:<-:-:-:.;-:-:-:-:-:-:-;-:-:-:-:-;-;-:-;-:-:-:-;-:-:·:-:·:·:·:-:-:-:-:,:,;,:,:-:-:,:-:,:,:,:-:-:,:,:-: Nodeviceas.si ed __SFO0000 , .; .. $ES0000 .. $EOOOOO .. $D00000 .• $COOOOO __$B00000 __$AO0000 -- $900000 -- $800000 Nodeviceas.signed __S700000 -- 5680000 /DTACK __S600000 /DTACK -- $580000 -- $520000 -- $500000 .. -- $440000 -- $400000 $280000 Nodeviceas.signed $200000 -- $100000 ................. 5080000 -- $040000 -- $000000 Note:AllunusedRAMspaceis occupiedbyrepeatedRAMimages. Chapter3 Processorsand GeneralLogic 127 Addressmap for the MacintoshPortablecomputer The MC68HC000 processorused by the MacintoshPortablecomputercan directlyaccess 16MBof addressspace,whichis dividedinto severalblocksallocatedto RAM,ROM,and the various1/0 devices. 6. Important The addressesof deviceselectsshownin thissectionapplyonlyto the MacintoshPortable,and onlyfor the versionof ROMcurrentat the time of publicationof this book. Mostof these addressesare differentfor other Macintoshcomputers.Therefore,it is highly recommendedthat you use the MacintoshToolboxcalls,systemtraps, and globalvariablesdescribedand listedin InsideMacintosh to access all hardwarein the MacintoshPortablecomputer.t:,. TheROMoverlayaddressmap,usedwhenthe Macintosh Portableis turnedon or reset, mapsaddressesfrom$000000to $OF0000to locationsin ROMratherthanto RAM.The CPUGLUswitchesfromthe ROMoverlayaddressmapto the normaladdressmapthe first timean accessis madein the range$900000through$9FFFFF. Figure3-4showsthe addressmapfor the MacintoshPortablecomputer. Theaddressspacefrom$E00000through$EFFFFFis not decodedby the generallogic circuitsin the MacintoshPortable.Thisaddressspaceis reservedfor internaluse by processor-directslot expansioncards. TheCPUGLUICrespondsto anyaddressin the range$FF0000through$FFFFFFwitha NPAsignaland to anyotheraddresswitha /DTACK signal.The/DTACK signalis usedto acknowledgea transactionwitha devicethat uses asynchronouscommunication, and the NPA signalis used to acknowledgea transactionwitha devicethat requiressynchronous communication with the mainprocessor. Noticethat, unlikethe classicMacintoshand Macintosh SE,the MacintoshPortable computerusesthe /DTACK signalfor communicationwiththe VIA.Althoughthe VIAis a synchronousdevice,the mainprocessorin the MacintoshPortablecan communicate asynchronously withthe VIA.TheCPUGLUICmakesthispossibleby providinga VIA clocksignalin placeof the E clockgeneratedby the mainprocessor,and by synchronizing the VIAclockwiththe VIAdevice-select signal,whichis alsogeneratedby the CPUGLU. 11.8 Guideto the MacintoshFamilyHardware • Figure3-4 Addressmap for the MacintoshPortablecomputer • NPA _t __ SFF0000_____ S01000000__ __ SFE0000 SFO0000__ ____SEO0000__ __ $FD0000 __ SFC0000 __ SFB0000 SAOOOOO __ __ SFA0000 S940000__ S900000__ __ SF90000 /DTACK /DTACK __ SFS0000 __ SF70000 __ SF60000 $100000-- ---- $000000-- __ $FO0000_____ _ Chapter3 Processorsand GeneralLogic 129 Whenthe mainprocessoreceivesan interrupt,it performsa readoperationwithall address·linesset to 1 exceptA3throughAl; linesA3throughAl reflecthe levelof the interrupt.Whenthe CPUGLUreceivesan addressin the range$FF0000to $FFFFFF,it assertsNPA,whichcausesthe mainprocessorto jumpto the locationin memory containingthe appropriateinterrupthandler.Interruptsare discussedin the section "MC68000 Interrupts,"earlierin this chapter. Withthreeexceptions-notedin the nextparagraph-theCPUGLUalwaysgeneratesthe /DTACK signalin responseto a memoryaccess,evena memoryaccessto an addressspace withno device.Of course,writingto an unoccupiedaddressdoesn'tchangeanything,and readingfetchesmeaningless datafroman undrivenbus. Therearethreecasesin whichthe CPUGLUdoesnotimmediately issuea /DTACK signalin responseto an address: • If the addressis in the range$FF0000through$FFFFFF,the CPUGLUassertsthe NPA signalratherthanthe/DTACK signal. • Duringa pseudo-OMA-mode SCSIaccess,the CPUGLUdoesnot assert/DTACK untilit receivesa SCSIDRQsignal,indicatingthat the SCSItransactionis complete. • TheCPUGLUtri-statesits/DTACK outputif the /EXT.DTACK pin on the processor- directslotis pulledlow.Thisprocedureallowsexpansioncardsto delaythe CADGLU's /DTACK or to generatetheirown. Addressmap for the MacintoshSE/30computer TheMC68030 processorusedby the MacintoshSE/30can directlyaccess4 GBof address space,whichis dividedintoseveralblocksallocatedto RAM,ROM,expansioncards,and the various1/0 devices. 6. Important Theaddresseshownin thissectionfor deviceselectsapplyonlyto the Macintosh SE/30,and onlyfor the versionof ROMcurrentat the timeof publicationof this book. Mostof these addressesare differentfor otherMacintoshcomputers,and addresseswillalmost certainlychangefor futureversionsof the Macintosh SE/30. Therefore,it is highlyrecommended thatyou use the Macintosh Toolboxcalls,systemtraps,and globalvariablesdescribedand listed in InsideMacintoshto accessallhardwarein the MacintoshSE/30.6. 130 Guideto the MacintoshFamilyHardware Alladdresseson the mainlogicboardof the Macintosh SE/30are 32bitslong.When operatingin 24-bitmode,the Macintosh OperatingSystemusesonlythe lower24 bitsof eachaddress.In thiscase,the memorymanagement unitin the MC68030is programmed to ignorethe high-order8 bitsfromeachaddresscomingfromthe mainprocessorand to translatethe resulting24-bitaddressintoa 32-bitaddressfor decodingby the GLUE.The firmwarecan switchthe MMUto 32-bitmode,in whichthe full32-bitaddressfromthe mainprocessoris passedon to the GLUE. The32-bitmodeis usedunderversionsof the Macintosh OperatingSystempriorto version7.0onlywhennecessaryto accessmorethan a megabyteof addressspaceon an expansioncard. Otheroperatingsystems,suchas systemsoftwareversion7.0andA/UX,can use disksand otherstoragedevicesas virtualmemory.Theseoperatingsystemsprogramthe MMUto translatebetweenlogicaland physicaladdressesto supportvirtualmemory. TheROMoverlayaddressmap,usedwhenthe Macintosh SE/30is turnedon or reset,maps addressesfrom$00000000to $3FFFFFFFto locationsin ROMratherthanto RAM.The RAMcannotbe addressedat allwhenthe ROMoverlayaddressmapis beingused.The startupor Resethandlersoftwareswitchesfromthe ROMoverlayaddressmapto the normaladdressmapby settinglowthe OverlaysignalfromVIAL Figure3-5showsthe translationfromthe 24-bitaddressmapto the normal32-bitaddress map.Figure3-6showsthe Macintosh SE/3032-bitaddressmap.Noticethat the 24-bit addressspacesmap intoa smallportionof the 32-bitaddressspace. Foryourconvenience, the 24-to-32-bit addresstranslationis alsoshownin Table3-8. • Table3-8 Macintosh24-bitto 32-bitaddresstranslation 24-bltaddressrange 32-bltaddressrange $000000 $7FFFFF $00000000 $007FFFFF $800000 $8FFFFF $40000000 $400FFFFF $900000 $9FFFFF $F9000000 $F90FFFFF $AO0000 $AFFFFF $FA00000 $FA0FFFFF $BO0000 $BFFFFF $FB000000 $FB0FFFF $CO0000 $CFFFFF $FC00000 $FC0FFFFF $DO0000 $DFFFFF $FD000000 $FD0FFFFF $E00000 $EFFFFF $FE000000 $FE0FFFF $PO0000 $FFFFFF $50000000 $SOOP FFFF Chapter3 Processorsand GeneralLogic 131 • Figure3-S Translationfrom24-bitaddressmap to 32-bitaddressmap 32-bitphysical address space -- SFFFFFFF Expansion card -- $FEOF 0000 regularslotspace 16MB/slot ......__SF900000 , x -- $F1000000 24-bitlogical address space $FFFFFF-- __ SFOOO 0000 $FOOOOO •• $900000-- -- $6000 0000 $800000-- -- $50000000 -- 40100000 ROM -- $40000000 $000000-- RAM -- $00800000 -- $00000000 132 Guideto the MacintoshFamilyHardware • Figure3-6 Addressmap for the Macintosh SE/30computer Standard slotspace ,, / __ $FFOOOOOO ,,/ ,,,' -- $FEFF0000 / __ $FEOO0000 / $FFFFFFFF-- __ SFCOO 0000 -- $FBOO 0000 __ $FAOO 0000 $F1000000-- ·-'· __ $F9000000 ·-·-·, $FOOO 0000•• ·-·-·•----------~-- SFIOOOOOO 1/0space -- S5FFFFFFF I Undecoded addresspace (NoDSACKx) -- $51000000 i $6000 0000 -- I ! -- $50020000-------- __ $50018000 -- $50016000-------- Onewaitstate /DSACKO $50000000 -- • Twowaitstate \ Y /DSACKO -- $50014000-------- \ $40000000 -- \ -- $50012000 \ Onewaitstate \ /DSACKO \ -- $50010000 \ \ __S50008000_______ _ \ \ \ -- $50006000 $00000000 -- \ \ -- $50004000 __S50002000 -- 550000000-------- Special /DSACKO Chapter3 Processorsand GeneralLogic 133 TheGLUErespondsto any1/0 deviceaddresswitha /DSACK0 signal.The/DSACK0 and /DSACKlsignalsare used to acknowledgea transactionwitha deviceand to indicateto the MC68030 the sizeof a device'sdatabus.As shownin Figure3-6,the GLUEinsertsone waitstatefor SWIMaccessesand for SCSIaccessesthat do not involvehardware handshaking. TheGLUEinsertstwowaitstatesfor readsfromthe ASCand one forwrites to the ASC.Accessesto the secand VIAs,and SCSIaccessesthat involvehandshaking, requirespecialcontrolof the /DSACK0 signal,as follows: • Thesecrequires2.2µs betweenaccessesfor its internalinesto stabilize;in the case of back-to-backaccessesto the SCC,the GLUEholdsoff the secondaccessfor that amountof time. • TheVIAsare MC6800-compatible peripheraldevicesthat requiresynchronous communication with the MC68030. • SCSIhandshaking requiresthatthe /DSACK0 signalbe heldoffuntila transaction is complete. Hardwarehandshakingfor SCSItransactionsis describedin the section"SCSIData in Chapter11.Formoreinformation Transfers" on the requirements of the SCCand VIA, see the manufacturers' specifications for thosechips.For moreinformationon the /DSACKx signals,see Motorola'sdocumentationfor the MC68030. • Note:In the Macintosh SE/30,eachaccessof RAMor ROMinvolvesone waitstate. Thisis in contrasto the Macintosh II, in whichthereare two waitstates:one imposed by the AMUor the PMMUmemoryaddresstranslation,and the otherimposedby the RAMor ROMaccess. In the MacintoshSE/30,accessesto 32-bitaddressesin the range$60000000through $FFFFFFF(exceptfor $F0xxxxxx) canbe usedto communicate withan expansioncard. Theprocessor-direct linesthat go to VIA2and are slotprovidesthreeinterrupt-request interpretedby the firmwareas comingfromthe firstthreeNuBusslots.In orderfor an expansioncardto appearto the firmwareas if it occupiedone of theseNuBusslots,it mustrespondto one of the addressrangesshownin Table3-9. • Table3-9 Macintosh SE/30expansioncardaddressranges 32-bltaddras EquivalentNuBusslot $900000-$9FFFF $F900000O-$F9FFFF $9 $AOOOOO-$AF FFFF $FA00OOOO-$F AFFFFFF $A $BOOOOO-$BFFFFF $FB0000OO-$FBFF FFFF $B 134 Guideto the MacintoshFamilyHardware Thetranslationfrom24-bitaddressesusedby earlyversionsof the Macintoshoperating systemto the 32-bitaddresseshownin Table3-9is shownin Table3-8.Noticethatonly the first1 MBof eachaddressrangeis availablewhenthe operatingsystemis in 24-bit mode;you mustswitchto 32-bitmodeto accessthe full16MBrangeof addresses reservedfor eachpseudo-slot. An accessto anyaddressrangeto whichno deviceis assignedresultsin a buserror. .._ The declarationROMfor a pseudo-slotexpansioncardmustbe locatedat the upperaddresslimitof the 1 MB24-bitaddressspacein orderforthe SlotManager firmwareto recognizethe cardas a NuBuscard.Formoreinformation about designingpseudo-slotexpansioncards,see Designing CardsandDrivers for the MacintoshFamily,secondedition. ~ Developer tip Thereis no requirement thatan expansioncardin the Macintosh SE/30 computeremulatea NuBuscard.Allthe control,address,and data linesnecessaryfor a cardto performdirectmemoryaddressingor to act as a coprocessorto the MC68030are availableat the processor- directslot. ~ Addressmap for the Macintoshn, Macintoshnx,and Macintoshncxcomputers TheMC68020 and MC68030 processorsused by MacintoshII-familycomputerscan directlyaccess4 GBof addressspace,whichis dividedintoseveralblocksallocatedto RAM,ROM,NuBusslots,and the various1/0 devices. The Macintosh II, Macintosh Ilx, and MacintoshIIcxhavethe sameaddressmap,whichis descibedin this section.Latersectionsdescribethe addressmapsfor the Macintosh IIci and the Macintosh IIfx,whichare different. Chapter3 Processorsand GeneralLogic 13S 6. Important The addresseshownin thissectionfor deviceselectsapplyonlyto the MacintoshII, MacintoshIlx, and MacintoshHexcomputers, and onlyfor the versionof ROMcurrentat the timeof publication of this book.Mostof these addressesare differentfor other Macintoshcomputers,includingother membersof the MacintoshII family.Therefore,it is highlyrecommended that you use the MacintoshToolboxcalls,systemtraps,and globalvariablesdescribed and listedin InsideMacintoshto accessall hardwarein Macintosh II- familycomputers.6- Alladdresseson the-mainlogicboardof Macintosh II-familycomputersare 32 bits long. Whenoperatingin 24-bitmode,the MacintoshOperatingSystemusesonlythe lower24 bitsof eachaddress.In thiscase,the MMUignoresthe high-order8 bitsfromeachaddress comingfromthe mainprocessorand translatesthe resulting24-bitaddressinto a 32-bit addressfor decodingby the GLUE.Thefirmwarecan switchthe MMUto 32-bitmode,in whichthe full32-bitaddressfromthe mainprocessoris passedon to the GLUE. The 32-bit modeis used underversionsof the MacintoshOperatingSystempriorto systemsoftware version7.0onlywhennecessaryto accessmorethana megabyteof addressspaceon a NuBuscard. Otheroperatingsystems,suchas systemsoftwareversion7.0and A/UX,can use disksand otherstoragedevicesas virtualmemory.Systemsoftwareversion7.0and the A/UX operatingsystemuse the PMMU in the Macintosh II or the MC68030's on-chipMMUto translatebetweenlogicaland physicaladdressesto supportvirtualmemory.ThePMMU and on-chipMMUcan alsobe programmedto performthe same24-to-32bit address translationas done by the AMUin the MacintoshII. TheROMoverlayaddressmap,usedwhenthe machineis turnedon or reset,maps addressesfrom$00000000to $3FFFFFFFto locationsin ROMratherthanto RAM.RAM cannotbe addressedat allwhenthe ROMoverlayaddressmapis beingused.Thestartup or Resethandlersoftwareswitchesfromthe ROMoverlayaddressmapto the normal addressmapby settinglowthe OverlaysignalfromVIAl. Figure3-5and Table3-8showthe translationfromthe 24-bitaddressmapto the normal 32-bitaddressmap.Figure3-7showsthe 32-bitaddressmap for the Macintosh II, MacintoshIlx, and MacintoshHex.Noticethat the 24-bitaddressspacesmap into a small portionof the 32-bitaddressspace.Notice,too, that whereasthe 24-bitaddressmap providesonly1 MBof addressspacefor each NuBusslot,the 32-bitaddressmapprovides a 16MBaddressspaceplusa 256MBaddressspacefor eachslot. 136 Guideto the MacintoshFamilyHardware • Figure3-7 Addressmap for the MacintoshII, MacintoshIlx, and MacintoshIlcx computers 1/0space $FFFFFFFF-- -- S5FFFFFFF I' ' '' i' Undecodedaddressspace I $FIOOOOOO __ i (NoDSACKx) i I i -- $51000000 $FOOO 0000-- I I I i I I __ S50020000_______ _ I I i __ S50018000 One wait state I /DSACKO I -- $50016000-------- • Two waitstate I $60000000-- T /DSACKO -- $50014000-------- $50000000-- .. -- SSOOl 2000 One waitstate .. /DSACKO \ $40000000-- \ -- $50010000-------- \ \ \\ -- $50008000-------- \\ -- $50006000 \ Special \ -- $50004000 /DSACKO \ \ -- $50002000 $00000000-- \ -- $50000000_______ _ Chapter 3 Processors and General Logic 137 TheGLUErespondsto anyI/O deviceaddresswitha /DSACK0 signal.The/DSACK0 and /DSACKlsignalsare used to acknowledgea transactionwitha deviceand to indicateto the MC68020 or MC68030 the sizeof a device'sdatabus.As shownin Figure3-7,the GLUE insertsone waitstate for IWMaccessesand for SCSIaccessesthat do not involve hardwarehandshaking.The GLUEinsertstwo waitstatesfor readsfromthe ASCand one for writesto the ASC.Accessesto the SCCand VIAs,and SCSIaccessesthat involve handshaking,requirespecialcontrolof the /DSACK0 signal,as follows: • The SCCrequires2.2µs betweenaccessesfor its internalinesto stabilize;in the case of back-to-backaccessesto the SCC,the GLUEholds off the secondaccessfor that amountof time. • The VIAsare MC6800-compatible peripheraldevicesthat requiresynchronous communication with the MC68020 or MC68030. • SCSIhandshakingrequiresthat the /DSACK0 signalbe held offuntila transaction is complete. Hardwarehandshakingfor SCSItransactionsis describedin the section"SCSIData Transfers"in Chapter11.Formoreinformationon the requirementsof the SCCand VIA, see the manufacturers' specifications for those chips.For moreinformationon the /DSACKx signals,see Motorola'sdocumentationfor the MC68020 and MC68030. • Note:Eachaccessof RAMor ROMin the MacintoshII involvestwo waitstates.One waitstateis imposedby the AMUor the PMMUmemoryaddresstranslation,and the otheris imposedby the RAMor ROMaccess.Becausethe MMUin the MC68030 requiresno waitstates,onlyone waitstateis requiredfor eachROMor RAMaccessin the MacintoshIlx and MacintoshHex. Accessesto 32-bitaddressesin the range$60000000through$FFFFFFFF(exceptfor $F0xxxxxx)initiatea NuBustransaction.EachNuBusslot is allocatedtwo slot spaces: 16MBwithinthe range$F1000000through$FFFFFFF(calledthe standardslot space), and 256MBwithinthe range$60000000through$EFFFFFF(calledthe superslot space). A 32-bitaddressof the form$Fsxxxxxxaccessesthe standardslotspacefor NuBusslot s. A 32-bitaddressof the form$sxxxxxxxaccessesthe superslotspacefor NuBusslot s. Noticethat the MacintoshII and MacintoshIlx have connectorsfor slots $9 through$E only,and the MacintoshHexhas connectorsfor slots$9 through$Bonly. 138 Guideto the MacintoshFamilyHardware An attempto reador writeto an addressin the range$POOO 0000 through$POFFFFFFfromthemainprocessorresultsin a buserror;this addressrangeis usedby NuBuscardsto addressthe 1/0 devicesand ROMon the mainlogicboard.• A 24-bitaddressoftheform$sxxxxx,wheresis a numberin therange$9through$E,is xxxxand accessesthe cardin the slots. translatedto a 32-bitaddressof the form$Ps0x. Noticethatonlythe lower1 MBof eachcard'sstandardslotspacecanbe addressedin 24-bitmode. Acardin a NuBuslotcanaddressanyotherNuBuscard,or it canaddressthe mainlogic board.If an addressfrom$POOO 0000to $P07PFFFFis placedon NuBusby a NuBuscard, the NuBuscontroller(NuChip, NuChip30,or BIU30) translatesit to an addressin the range $50000000to $507FFFFFandmakesan accessto one of the mainlogicboard1/0 devices.An addressfrom$F080000through$POFF FFFFon NuBuscausesthe NuBus controllerto accessROMin the range$40800000to $40FFFFF.An addressfrom$0000 0000to $3FFFFFFon NuBusresultsin a mainlogicboardRAM accessto the same address.Thesetranslations fromNuBusaddressesto mainlogicboardaddressesare summarized in Table3-10. Chapter3 Processors andGeneralLogic 139 • Table3-10- TranslationsfromNuBusaddressesto mainlogicboardaddresses NuBusaddn:ss Logicboardaddn:ss Usedto access $00000000to $00000000to RAM $3FFFFFFF $3FFFFFFF $60000000to $60000000to Presentlyunusedsuperslotspace $8FFFFFFF $8FFFFFFF $90000000to $90000000to Superslotspace,slots$9 to $E $EFFFFFFF $EFFFFFFF $F0000000to $50000000to Mainlogicboard1/0 devices $F070FFFP $507FFFFF $F0800000to $40800000to ROM $F0FFFFFP $40FFFFFF $F1000000to $F1000000to Presentlyunusedstandardslot space $F8FFFFFF $F8FFFFFF $F9000000to $Fs000000to Standardslot space,slots$9 to $E $FEFFFFFF $FsFFFFFF $FF000000to $FF000000to Presentlyunusedstandardslot space $FFFFFFFF $FFFFFFFF Note:s is a numberin the range$9-SE. *ANuBuscardcan use an addressin thisrangeto accessthe mainlogicboard.If the mainprocessor attemptsto accessaddressesin thisrange,it immediately generatesa bus error(IBERR) exceptionand no NuBustransactiontakesplace. SeeDesigningCardsand Drivers for theMacintoshFamily,secondedition,for more informationaboutNuBuscardsand the use of NuBusaddressspace. 140 Guideto the MacintoshFamilyHardware Addressmap for the MacintoshIlci computer TheMC68030 processorused by the Macintosh IIcicomputercan directlyaccess4 GBof addressspace,whichis dividedintoseveralblocksallocatedto RAM,ROM,NuBusslots, and the variousI/0 devices. In mostrespects,the addressmap for the Macintosh IIci,shownin Figure3-8,is identical to that for the Macintosh II, as describedin the previoussection. 6. Important The addresseshownin thissectionapplyonlyto the Macintosh IIci computer,and onlyfor the versionof ROMcurrentat the timeof publicationof thisbook.It is highlyrecommendedthat you use the MacintoshToolboxcalls,systemtraps,and globalvariableslistedin Inside Macintoshto accessall hardwarein MacintoshII-familycomputers.1;,. Addressmap for the MacintoshIIfx computer TheMC68030 processorused by the Macintosh Ilfxcomputercan directlyaccess4 GBof addressspace,whichis dividedintoseveralblocksallocatedto RAM,ROM,NuBusslots, and the various1/0 devices. In mostrespects,the addressmap for the Macintosh IInccomputer,shownin Figure3-9,is identicalto that for the Macintosh II, as decribedin the earliersection"AddressMapfor the MacintoshII, MacintoshIlx, and MacintoshHexComputers." 6. Important Theaddresseshownin thissectionfordevice-select signalsapply onlyto the Macintosh Ilnccomputer,and onlyfor the versionof ROM currentat the timeof publicationof this book.Mostof these addressesare differentfor otherMacintoshcomputers,including othermembersof the Macintosh II family.Therefore,it is h·ighly recommended that you use the MacintoshToolboxcalls,systemtraps, and globalvariableslistedin InsideMacintoshto accessallhardwarein MacintoshII-familycomputers.1;,. Chapter3 Processorsand GeneralLogic 141 • Figure3-8 Addressmap for the MacintoshIlci computer $FFFFFFFF--- I . -- $5FFFFFFF ' $F1000000___ '' '' ' '' -- $53000000 $FOOO 0000___ F±,±;;;;,±#,±±,±,±, -- $52800000 -- $52000000------ ) • MDUprovides • chipselectonly -- $51000000------ I' '' -- $50040000 I I -- $50028000------ I -- $50026000 t MDUprovides /DSACKO $60000000--- I -- $50024000------ $50000000--- $40000000 .. \.. -- $50018000------ -- $50016000 -- $50014000 I MDU provides \ -- $50012000 /DSACKO -- $50010000------ l I \I \ -- $50008000------ \ \ -- $50006000 -- $50004000 MDU provides \\ -- $50002000 /DSACKO -- $5000 0000 ------ $00000000--- 142 Guideto the Macintosh FamilyHardware • Figure3-9 Addressmap for the Macintosh Ilfx computer 32-bitphyskal addres.,space $FFFFFFF--- .. -- $5FFFFFFF $Fl000000___ I Expansion space $FOOO 0000___ I -- $54000000 I -- $50040000 I I -- $50028000 I -- $5002(i()()() I -- $50024000 $80000000--- i I -- $50022000-------- $70000000--- i I -- $50020000 -- $5001EOOO -- $5001cooo DSACK i __ $5001AOOO _______ _ 0000--- $(iOOO -- $50018000-------- $50000000--- -- $500l(i()()() t DSACK I -- $50014000-------- -- $50012000-------- $40000000--- -- $50010000 -- $5000EOOO DSACK . __ $5000COOO __ $5000AOOO _______ _ -- $50008000-------- DSACK -- $5000(i()()()-------- -- $50004000-------- -- $50002000 t DSACK -- $50000000-------- $00000000--- Chapter3 Processorsand GeneralLogic 143 Real-timeclock (RTC) TheMacintoshreal-timeclock(RTC)is a customICthat is interfacedto the mainlogic boardby a VIA.Thereal-timeclockused in the Macintosh SE,Macintosh SE/30,and MacintoshII-familycomputersis an upgradedversionof the customICused in the MacintoshPlusand earlierMacintoshcomputers.In the MacintoshPortablecomputer,the PowerManagerIC performsthe functionsof the real-timeclock. TheRTCcontainsa 4-bytecounterincrementedonceeachsecond.Eachtimethe counter is incremented,the RTCsendsan interruptrequestsignalto the VIAand (if thisinterruptis enabled),the VIAsendsan interrupto the mainprocessor.TheRTCalsocontains 256bytesof RAM(20bytesin the Macintosh 512Kand Macintosh 128K,128bytesin the MacintoshPortable),calledparameterRAM,thatis poweredby a batterywhenthe Macintoshis turnedoff(becausesystemRAMin the MacintoshPortableis neverswitched off,a separatebatteryis not neededfor the RTCin the MacintoshPortable).Parameter RAMcontainsimportantdatathat needsto be preservedevenwhenthe systempoweris not available.TheMacintoshOperatingSystemmaintainsin lowmemorya copyof parameterRAMthat you can access. ~ Developer tip Althoughyoucan readfromand writeto the RTCas describedin this section,it is mucheasierto use the copyof parameterRAMand the date and timekept in memoryby the MacintoshOperatingSystem. Seethe OperatingSystemUtilitieschapterin InsideMacintosh for informationon these memorylocations.In addition,note that the user can set or readthe date,time,and mostof the parametersin parameterRAMby usingthe ControlPaneldeskaccessory.4. TheRTCin all Macintoshcomputersexceptthe MacintoshPortableis accessedby using bitsOthrough2 of DataregisterB of VIAl(the onlyVIAin the Macintosh SEand classic Macintoshcomputers),as shownin Table3-11. • Table3-11 RTCbits in MacintoshVIAl DataregisterB Bit Direction Softwarename Description 2 Output rtcEnb 0 = RTCis enabled 1 Output rtcClk RTC'sdata-clockline 0 In or out rtcData RTC'serialdataline 144 Guideto the MacintoshFamilyHardware These3 bits constitutea simpleserialinterface.The rtcDatabit is used as a bidirectional serialdata line to send commandand databytesbackand forth.The rtcClkbit is a data- clockline,drivenby the processor,that regulatesthe transmission of the data and commandbits.Softwaresets the rtcClkbit highor low by writingto registerB of the VIA. The rtcEnbbit is the serialenableline,whichsignalsthe RTCthatthe processoris aboutto send it serialcommandsand data. In the MacintoshPortable,the PowerManagerICperformsthe functionsof the RTC. Communication withthe PowerManagerICin the MacintoshPortableis throughData registerA of the VIA;all8 bitsare usedas a paralleldatabus to the PowerManagerIC. Sendingcommandsto the RTC Programscan reador changethe information in parameterRAMand reador set the date and time.Seethe OperatingSystemUtilitieschapterin InsideMacintoshfor information about these functions. The one-secondinterrupt The RTCgeneratesa VIAinterruptonceeachsecond(if this interruptis enabled).This interruptcan be enabledor disabledby writingto bit Oof the VIA'sInterruptEnable register(vBase+vlER). Whenyou'rereadingthe InterruptEnableregister,a 1 bit indicates that the interruptis enabled,and a Omeansit's disabled.Writing$01to the Interrupt Enableregisterdisablesthe RTC'sone-secondinterrupt(withoutaffectingany other interrupts),whereaswriting$81enablesit. See the section"Processor-Interrupt Registers,"in Chapter4, for more informationabout enablingand disablingVIAinterrupts. Chapter3 Processorsand GeneralLogic 145 ~ Developer tip Theone-second interruptis usedbythe Macintosh operatingsystem to updatethe date and timeand to blinkthe Appleiconon the menu bar whenthe alarmof the AlarmClockdeskaccessorygoesoff. Becausethe timingof this interruptis constantand does not depend on the typeof processoror systemclockspeed,yourprogramcan use it to timeany eventthat shouldbe independentof the type of Macintosh on whichyourprogramis running.SeeInsideMacintoshfor moreinformationaboutwritingyourown interrupthandlers. An evenbetterwayfor applicationsto be independentof the differentMacintoshmodelsis to use the TimeManagerin the system software.Seethe chapteron the TimeManagerin InsideMacintosh.~ • Warnhlg Whenyou writeto bit Oof the VIA'sInterruptEnableregister,be sure that you don't changeany of the-otherbits.... 146 Guideto the MacintoshFamilyHardware 4 VersatileInterfaceAdapter(VIA)ICs Chapter Macintoshcomputersuse VersatileInterfaceAdapter(VIA)integrated circuitsto providea varietyof controland interfacefunctions.The MacintoshPlus,Macintosh SE,MacintoshPortable,and earlierMacintosh computerseach haveone VIA;the Macintosh SE/30,Macintosh II, Macintosh Ilx, and Macintosh Ilcx each havetwo. In the Macintosh Ilciand the Macintosh Ilfx,eachof whichhas one VIA, manyfunctionshandledby the VIAsin othermodelsare incorporated into customICs:the RBVin the Macintosh Ilciand the OSS,BIU30,and IOPsin the Macintosh Ilfx.The customICsincluderegistersthat emulate the operationof the dataand controlregistersof a VIA.The customICs are describedin Chapter3, but theirVIA-emulation registersare describedin this chapter. 147 Control!Cs 1 VIA MacintoshPlus 1 VIA MacintoshSE 2 VIAs MacintoshSE/30 1 VIA MacintoshPortable 2VIAs MacintoshII 2 VIAs Macintosh!Ix 2 VIAs Macintoshllcx 1 VIA &RBV Macintoshllci 1 VIA &OSS Macintoshllfx 148 Guideto theMacintosh FamilyHardware The classicMacintoshcomputersuse a Rockwellor VTI6522VersatileInterfaceAdapter integratedcircuit.OtherMacintoshcomputersuse an Applecustomversionof that IC. The ApplecustomVIAis fullysoftwarecompatiblewiththe standardRockwellor VTI 6522VIA.The MacintoshSE/30and MacintoshII familyuse two ApplecustomVIAscalled VIAJand VIA2.VIAlperformsfunctionsimilarto those handledby the VIAin the MacintoshSEor classicMacintosh.VIA2handlesthe functionsthat are new in the MacintoshSE/30or MacintoshII-familycomputers. In the MacintoshIIci,an ApplecustomIC,the RBV,includesregistersthat emulatethe registersin the secondVIAon othermembersof the MacintoshII family.Thischapter describesthe VIA-emulation registersof the RBValongwith the functionsof VIA2;for informationabout the other functionsof the RBV,pleaserefer to the sections"RAM- BasedVideoController(RBV)"in Chapter3 and "Featuresof the Built-inVideoCircuits" in Chapter12. In the MacintoshIlfx,ApplecustomICs-the OSS,the BIU30,and the IOPs-perform manyfunctionsthat are performedby the VIAson other membersof the MacintoshII family.Thischapterdescribesthose functionsalongwith the functionsof the correspondingVIAs;for informationabout the other functionsof the customICs,please refer to the sections"OperatingSystemSupport(OSS)"and "IOPsin the MacintoshIlfx Computer"in Chapter3. The VIAintegratedcircuitis designedto communicatesynchronously with the main processor.In the MacintoshSEand classicMacintoshcomputers,communications betweenthe mainprocessorand the VIAsare timedby the E clock,a 783.36kHz clockgeneratedby the mainprocessor.In the MacintoshSE/30,MacintoshPortable, and MacintoshII-familycomputers,communications with the VIAsare synchronized by the generallogiccircuits,whichgenerateboth the clocksignalto the VIAsand the VIAdevice-enablesignals. In the classicMacintoshand MacintoshSEcomputers,the MC68000 has to wait for the phaseof the relativelyslowE clocksignalto coincidewith a normalprocessor-access cyclebeforeit can accessthe VIA.In the MacintoshSE/30,MacintoshPortable,and MacintoshII-familycomputers,on the other hand, the generallogiccircuitssynchronize the VIAclocksignalwiththe accessesof the mainprocessorso that the mainprocessor can makeVIAaccesseswithoutany delay.Asa result,a VIAaccessfor these computers takesan averageof 0.5 µs as comparedto 1.0µs for the MacintoshSEand classic Macintosh.The generallogiccircuitsmaintainan averagefrequencyfor the E clockof 783.36kHz,whichis the samefrequencyas that used in the classicMacintoshand MacintoshSE computers. Chapter4 VersatileInterfaceAdapter(VIA)ICs 149 ~ Developer tip Thischapterdescribesall the functionsof each VIAused in a Macintosh computer.Manyof these functionsare of interestto programmers;for example,the VIAscan be used to enableor disablecertaininterrupts. The informationin thischapterwillhelp you understandhow the MacintoshToolboxcallswork,whysomefeaturesare not availableon everymemberof the Macintoshfamily,and why some functionsdiffer betweenMacintoshfamilymembers. Sometimesa functioncontrolledby a VIAin one Macintoshcomputeris controlledby a differentIC in other Macintoshfamilymembers;for example,soundvolumeis controlledby the VIAin the MacintoshPlus, but by the ASCin the MacintoshII. For this reason,it is neveradvisable to addressthe VIAdirectly;rather,you shoulduse the Macintosh Toolboxcallsdescribedin InsideMacintoshwheneveryou wantto controlhardware.In any case,neveruse absoluteaddressesin your code;use insteadthe globalvariablesand offsetsprovidedhere. 4 Functionsperformedby the VIAs As impliedby its name,the VIAis a versatileIC, capableof performinga varietyof functions.Someof the functionsperformedby the VIAsare consistentfor the entire Macintoshfamily;other functionsdifferfrom computerto computer.This section summarizesthe functionsperformedby the VIAs(or by VIAemulationin customICs) in each Macintoshcomputer.The sectionsthat followdescribethose functionsin more detail. 150 Guideto the MacintoshFamilyHardware VIAfunctionsin the classicMacintoshcomputers TheVIAin a cl~ic Macintosh computerperformsthe followingfunctions: • It providesthe interfacebetweenthe keyboardand the mainlogicboard. • It providespart of the interfacebetweenthe mouseand the mainlogicboard. • It providesthe interfacebetweenthe RTC(real-timeclock)ICand the main logicboard. • It monitorsthe verticalblankinginterruptrequest(NSYNC)fromthe generallogic circuits,and interruptsthe mainprocessoras appropriate.Thissignalprovidesa 60.15Hz interrupt,usedby a varietyof firmwareand software. • It monitorsthe one-secondinterruptrequestfromthe RTC,and interruptsthe main processoras appropriate. • It controlssoundvolume. • It togglessoundon and off. • It selectswhichof the two sound/disk-speed buffersis used. • It selectswhichof the two screenbuffersis used. • It monitorsthe screen'shorizontalretracesignal(H4). • It controlswhetherthe PALsdecodeaddressesaccordingto the ROMoverlayaddress mapor the normaladdressmap.(ROMoverlayis describedin the section"PowerUp, SystemStartup,and PowerDown,"in Chapter6.) • It enablessoftwareto monitorthe secIC'sWait/Request output(/W/REQ)so that the softwarecan detectactivityon the serialport when interruptsare disabled. • It providesthe state-controllineSELto the floppydiskdrives.Amongother functions,in the Macintosh Plusthislineselectswhichof the twoheadsis to be usedin a double-sidedfloppydisk drive. VIAfunctionsin the MacintoshSEcomputer TheVIAin the Macintosh SEcomputerperformsthe followingfunctions: • It providesthe interfacebetweenthe AppleDesktopBustransceiverand the main logicboard. • It providesthe interfacebetweenthe RTC(real-timeclock)ICand the main logicboard. • It monitorsthe verticalblankinginterruptrequest(NSYNC)fromthe generallogic circuits,and interruptsthe mainprocessoras appropriate.Thissignalprovidesa 60.15Hz interrupt,usedby a varietyof firmwareand software. Chapter4 VersatileInterfaceAdapter(VIA)ICs 151 • It monitorsthe one-secondinterruptrequestfromthe RTC,and interruptsthe main processoras appropriate. • It controlssoundvolume. • It togglessoundon and off. • It controlswhetherSCCportA is usedforsynchronous or asynchronousVO. • It selectswhichof the two internalfloppydiskdrivesis used. • It providesthe state-control line SELto the floppydiskdrives.Amongother functions,thislineselectswhichof the two headsis to be usedin a double-sided floppydisk drive. • It selectswhichof the twoscreenbuffersis used. • It enablessoftwareto monitorthe SCC'sWait/Request output(/W/REQ)so that the softwarecan detectactivityon the serialport when interruptsare disabled. • It controlswhetherthe interruptsignalfromthe SCSIcontroller(SCSI.IRQ) is masked or is passedon to the mainprocessor. VIAfunctionsin the MacintoshPortablecomputer TheVIAin the MacintoshPortablecomputerperformsthe followingfunctions: • It providesthe interfacebetweenthe PowerManagerICand the restof the system. Amongotherthings,the PowerManagerICperformsthe functionsof the Apple DesktopBustransceiverand the real-timeclockin the MacintoshPortable. • It monitorsthe 60.15Hz interruptrequestfromthe PowerManagerIC(C.60HZ), and interruptsthe mainprocessoras appropriate. • It monitorsthe one-secondinterruptrequestfromthe PowerManagerIC,and interruptsthe mainprocessoras appropriate. • It controlswhetherSCCportA is usedforsynchronous or asynchronous VO. • It selectswhichof the two internalfloppydiskdrivesis used. • It monitorswhetherthe externalsoundjackhas a pluginsertedin it. TheSound Managercan reada bit in the VIAto determinewhetherthe monointernalspeakeror the stereoexternalsoundjackis beingused. • It providesthe state-control lineSELto the floppydiskdrives.Amongother functions,thislineselectswhichof the two headsis to be used in a double-sided floppydisk drive. • It providesa test signal(VIA.TEST)that forcesthe PowerManagerICto tum on all powersupplies. 152 Guideto the MacintoshFamilyHardware • It enables softwareto monitorthe SCC'sWait/Requestoutput (/W/REQ)so that the softwarecan detect activityon the serialport when interruptsare disabled. • It monitorsinterruptrequestsfromthe PowerManagerIC UPMINT) and the SCSI controller(SCSI.IRQ) and interruptsthe main processoras appropriate. VIAfunctionsin the MacintoshSE/30and MacintoshII-familycomputers In Macintoshmodelsthat have two VIAs,VIAlperformsmanyof the functionsof the VIAin one-VIAmachines,whileVIA2performsfunctionsthat are not foundon one-VIAmachines. • Note:In the MacintoshIIci and the MacintoshIIfx,customICs containregistersthat emulateVIAregisters.The functionsof the VIA-emulationregistersare listedbelow, by model. Functionsof VIAl Manyof the functionsof VIAlare the same for differentMacintoshmodels.The following sectionsstart by listingthe VIAlfunctionsin the MacintoshII, MacintoshIIx, and MacintoshIlcx computersbecausethose functionsare sharedby all the modelsin the group. Subsequentsectionslist additionalfunctionsfound on individualmachines. Functionsof WAI in theMacintoshII,Macintosh /Ix, and Macintosh /lex computers In the MacintoshII, MacintoshIlx, and MacintoshIlcx computers,VIAl performsthe followingfunctions: • It controlswhetherthe GLUEdecodesaddressesaccordingto the ROMoverlay addressmap or the normaladdressmap. (In the MacintoshIIci,the MDUperforms ROMoverlayautomatically.ROMoverlayis describedin the section"PowerUp, SystemStartup,and PowerDown,"in Chapter6.) • It providesthe interfacebetweenthe AppleDesktopBus transceiverand the rest of the system. • It providesthe interfacebetweenthe RTC(real-timeclock)IC and the rest of the system. • It monitorsthe 60.15Hz interruptrequest(NBLK)fromVIA2and interruptsthe main processoras appropriate.This 60.15Hz interruptis used by a varietyof firmwareand software. Chapter4 -VersatileInterfaceAdapter(VIA)ICs 1S3 • It monitorsthe one-secondinterruptrequestfromthe RTC(RTC. lHZ) and interrupts the mainprocessoras appropriate. • It controlswhetherSCCportA is usedforsynchronous or asynchronousVO. • It providesthe state-control line SELto the floppydiskdrives.Amongother functions,thislineselectswhichof the two headsis to be usedin a double-sided floppydisk drive. • It enablessoftwareto monitorthe SCC'sWait/Request output(1W/REQ)so that the softwarecan detectactivityon the serialport when interruptsare disabled. Functionsof WAI in theMacintosh SF/30computer In the MacintoshSE/30,VIAlperformsall the functionslistedabove;in addition,VIAl alsoperformsthe followingfunctions: • It enablesor disablesan interruptrequestfromthe videologiccircuitsto VIA2. • It selectswhichof the twoscreenbuffersis used. Functionsof WAIin theMacintosh /lei computer In the Macintosh Ilci,VIAlperformsall the functionslistedabovefor the MacintoshII, MacintoshIlx, and MacintoshIlcx;in addition,VIAlalso performsthe followingfunctions: • It controlsthe parity-enable signaland monitorsthe parity-errorinterrupt. • Fourof the inputsto VIAlare permanently wiredhighor lowto definea value, CPU.ID,that the ROMreadsto determinewhichmodelMacintoshcomputer the systemis runningon. Functionsof WAI in theMacintosh Ilfx computer In the Macintosh Ilfx,mostof the functionslistedaboveare performedby otherICs.The onlyfunctionstillperformedby VIAlare these: • It providesthe interfacebetweenthe RTC(real-timeclock)IC and the rest of the systern. • It monitorsthe one-secondinterruptrequestfromthe RTC(RTC. lHZ) and interrupts the mainprocessoras appropriate. • Fourof the VIAlinputsare permanently wiredhighor lowto definea value, CPU.ID,that the ROMreadsto determinewhichmodelMacintoshcomputer the systemis runningon. 154 Guideto the MacintoshFamilyHardware VL41 JunctionshandledbyJOPsin theMacintosh Ilfx computer In the MacintoshIIfx,the followingfunctionsof VIAlon othermodelsare performedby one of the IOPs. • An IOP providesthe interfacebetweenthe AppleDesktopBustransceiverand the rest of the system. • An IOPprovidesthe state-controlline SELto the floppydisk drives.Amongother functions,this lineselectswhichof the two headsis to be used in a double-sided floppydisk drive. • An IOPcontrolswhetherSCCportA is usedforsynchronousor asynchronous 1/0. • An IOP enablessoftwareto monitorthe SCC'sWait/Requestoutput(/W/REQ)so that the softwarecan detectactivityon the serialport when interruptsare disabled. VL41 JunctionshandledbytheOSSin theMacintosh Ilfx In the MacintoshIlfx,one of the functionsof VIAlon othermodelsis performedby the OSS. • The OSSmonitorsthe 60.15Hz interruptrequest(/VBLK) and interruptsthe main processoras appropriate.This60.15Hz interruptis used by a varietyof firmware and software. Functionsof VIA2 Manyof the functionsof VIA2are the samefor differentMacintoshmodels.The followingsectionsstartby listingthe VIA2functionsin the MacintoshSE/30, MacintoshII, MacintoshIIx, and MacintoshIIcx computersbecausethose functions are sharedby all the modelsin the group.Subsequentsectionslistadditionalfunctions foundon individualmachines. In the MacintoshII only,VIA2providesa signal(FC3)that can be used to switchthe AMU to 32-bitmodeso that the entire32-bitlongwordaddressfromthe mainprocessoris passedon to the GLUEIC for decoding.Thissignalis not neededin Macintoshcomputers that have the MC68030 processor. · Chapter4 VersatileInterfaceAdapter(VIA)ICs 155 Functior,s of VlA2in theMacintosh SF/30,Macintosh II, Macintosh /Ix, and Macintosh/lex computers The functionsof VIA2that are commonto the Macintosh SE/30,Macintosh II, Macintosh Ilx, and MacintoshHexcomputersare as follows: • It monitorsthe slot interruptsignalfromthe GLUEIC (ISLOTIRQ). The GLUEIC performsan ORoperationon the threeor sixinterruptlinesfromthe expansion slotsto generatethissignal.WhenVIA2receivesthissignal,it assertsthe interrupt lineto the processor. • It monitorsthe interruptlinesfromthe expansionslotsC/IRQlthrough/IRQ6)in a registerwheresoftwarecan readthe stateof the interruptlines.Whenthe main processoreceivesa /SLOTIRQ interruptfromVIA2,softwarereadsthis registerto findout whichslot is generatingthe interrupt. • It monitorsinterruptlinesfromthe ASC(/SNDINT) and the SCSIcontroller(SCSIIRQ), and interruptsthe processoras appropriate. • It monitorsthe DataRequestline fromthe SCSIcontroller(SCSIDRQ) and can interrupthe mainprocessorwhenthe SCSIhas receivedor senta byteof data. • It providesa signal(/BUSLOCK) that blocksNuBuscardsfromdirectlyaccessingthe mainlogicboard.Thissignalis used to protecttime-critical operationsfrom interruptionby NuBustransactions. Thissignalis alsoavailableat the processor-direct slot in the Macintosh SE/30. • It providesa signal(/POWEROFF) that shutsoffthe powersupply.(In the Macintosh SE/30,thissignalgoesto the processor-direct slot only.An expansioncard can use thissignalto determinethat it is aboutto losepower.) • It recordstwostatuslinesfromthe NuBus(/TM0A and /TMlA).If an erroroccurs duringa NuBusaccess,a BusErrorsignalis sentto the mainprocessorby the NuBus controller(NuChip,NuChip30, or BIU30)and the errortype is sentto VIA2overthese twolines.Themainprocessorcanreada registerin VIA2to findout the valuesof these twosignals.Thesesignalsare availablein the Macintosh SE/30foruse by an expansion card in the processor-directslot. • It monitorsa signal(ISNDEXT) that indicateswhetherthe externalsoundjackhas a pluginsertedin it.TheSoundManagercanreada bit in VIA2to determinewhetherthe monointernalspeakeror the stereoexternalsoundjackis beingused.Thislineis not availablein the Macintosh SE/30becausethe Macintosh SE/30soundcircuitincludesa mixerto convertstereoto monofor the internalspeaker;thus in the Macintosh SE/30, the SoundManageralwaysoperatesin stereomode. 156 Guideto the MacintoshFamilyHardware • It storesa valuecorrespondingto the size of the RAM ICsinstalledin the SIMMson the mainlogicboard.Thatvaluedrivestwo linesto the GLUEthat determinehow the GLUEaddressesRAM. • It providesa signal(/CDIS)that can be used to disablethe data and instructioncaches of the mainprocessor.Thisfeatureis usefulwhen debuggingprograms. VL42functionsin theMacintosh/lei computer In the MacintoshIlci, there is no VIA2;the VIA2-emulation portionof the RBVperforms all the functionslistedabovefor the VIA2in other machines;in addition,VIA2emulation in the RBValso performsthe followingfunctions: • It providestwo signalsused to enable and to flushthe optionalRAMcache. • It providesa signalusedfortestingtheparitycircuits. VL42 Junctionsin theMacintoshIlfx computer In the MacintoshIlfx,there is no VIA2;its functionsare handledby the OSSand BIU30customICs.The OSSperformsthe followingfunctionsperformedby VIA2 in other machines: • It performsan ORoperationon the six interruptlinesfromthe expansionslotsto generatethe /SLOTIRQ signal.Whenthe OSSreceivesone of the slot interrupts,it assertsthe interruptline to the processor. • It monitorsthe interruptlines fromthe expansionslots (/IRQl through/IRQ6)and storesin a registerthe numberof the slotgeneratingthe interrupt.Whenthe main processorreceivesa /SLOTIRQ interruptfromthe OSS,it reads this registerto find out where the interruptoriginated. • It monitorsinterruptlines fromthe ASC(/SNDINT)and the SCSIcontroller(SCSIIRQ), and interruptsthe processoras appropriate. • It monitorsthe DataRequestline fromthe SCSIDMA(SCSIDRQ) and can interruptthe mainprocessor whentheSCSIDMA is readyto transferdata. • It providesa signal(/POWEROFF) that shuts off the power supply. • It monitorsa signal(/SNDEXT) that indicateswhetherthe externalsound jack has a plug insertedin it. The SoundManagercan read a bit in the OSSto determinewhether the mono internalspeakeror the stereoexternalsoundjack is beingused. • In machinesfittedwith the optionalparityfeature,the OSScontrolsthe parity-enable signaland the parity-errorinterrupt. Chapter4 VersatileInterfaceAdapter(VIA)ICs 157 The BIU30in the Macintosh Ilfxperfonnsthe followingfunctionsof the VIA2on other machines: • It providesa signal(IBUSLOCK) that blocksNuBuscardsfromdirectlyaccessingthe mainlogicboard.Thissignalis used to protecttime-criticaloperationsfrom interruptionby NuBustransactions. • It recordsstatussignalsfromthe NuBus(/TM0Aand /fMlA).If an erroroccursduringa NuBusaccess,the errortypeis sentto the BIU30overthesetwo linesand the BIU30 sendsa BusErrorsignalto the mainprocessor.Themainprocessorcanreada registerin the BIU30to findout the valuesof thosetwo signals. EachVIAor customICcarriesout the functionslistedin thissectionby wayof severalinternal controland data registers.Thoseregistersare describedin the sectionsthat follow. VIA registers Therearetwodataregistersin eachVIA,calledDataregister A andDataregister B, each withits own data directionregister.A bit set as 1 in a data directionregistercausesthe correspondingbit of the data registerto be used for output,whereasa 0 causesit to be used for input.The MacintoshOperatingSystemsets up the data directionregistersat systemstartupor reset. OtherVIAregistersincludethe Shiftregister,whichholdskeyboarddata;two registersfor controlof VIAfunctions(calledthe AuxiliaryControlregisterand the PeripheralControl register); a registerthatshowsthe sourceof an interrupt,calledthe InterruptFlagregister; and a registerthatenablesor disablesinterrupts,calledthe InterruptEnableregister.Each VIAalsohas two eventtimersthat are used by the operatingsystem. • Note:Applications shouldnot writedirectlyto the VIAtimersbut shoulduse the TimeManager. The base addressof the VIAin the classicMacintoshcomputers,Macintosh SE,and MacintoshPortable,and of the VIAlin otherMacintoshcomputers,is availableto assembly-languageprogramsas the constantvBaseand is alsostoredin the global variableVIA. In the MC68000-based Macintoshcomputers,the VIAis on the upperbyteof the 16-bit-widedata bus. In those computers,therefore,you mustuse even-addressed byte accessesonly. 158 Guideto the MacintoshFamilyHardware In thoseMacintoshcomputersthat havetwo VIAs,the base addressfor the VIA2registers is availableas the constantvBase2. Fromassemblylanguage,low-levelsoftwarecanaccessthe VIAregistersby expressing addressesas offsetsfromthe base address.A summaryof these offsetsis providedin Table4-1.EachVIAregisterlistedin thistableis describedin this chapter. If you need moreinformation aboutVIAregistersand controlstructure,consultthe technicalspecifications for the 6522VersatileInterfaceAdapter,availablefrom Rockwellor Vil • Table4-1 Offsetsof the VIAregisterlocations VIA register vBufA DataregisterA vBuffi DataregisterB vDirA DataDirectionregisterA vDirB DataDirectionregisterB vPCR PeripheralControlregister vACR AuxiliaryControlregister vT~ Eventtimers vIFR InterruptFlagregister vIER InterruptEnableregister vSR Shiftregister •SeeTable4-23fora summary of theVIAevent-timer offsets. Data register A VIADataregisterA in Macintoshcomputersthathaveonlyone VIA,and VIAlData registerA in Macintoshcomputerswithtwo VIAs,havesimilarfunctions.In two-VIA Macintoshcomputers,VIA2is used to implementfeaturesnot presentin the one-VIA computers.Thissectionfirstdescribesthe usesof the bits in VIADataregisterA in one-VIAMacintoshcomputers,then the usesof the bits in VIAlDataregisterA, and finallythe bits in VIA2DataregisterA. • Note:Becausethe hardwareand ROMof the MacintoshPortablecomputerare unique amongMacintoshcomputers,the uses of the bits in the MacintoshPortableVIAare somewhatdifferentfromthose of the MacintoshSEor any other Macintoshmodel. Chapter4 VersatileInterfaceAdapter(VIA)ICs 159 DataregisterA in machineswithonly one VIA The addressof VIADataregisterA is vBase+vBufA. The addressof the corresponding DataDirectionregisterA is vBase+vDirA. VL4Dataregister A in theclassicMacintosh computers Table4-2showsthe functionof eachbit in DataregisterA and the associated assembly-languagenamefor controllingthat bit in the MacintoshPlusand other classicMacintoshcomputers. • Table4-2 Bitsin VIADataregisterA in the classicMacintoshcomputers Bit Direction Bitname Dcscrlptlon 7 Input vSCCWrReq 0 = secWait/Request, channelA or B 6 Output vPage2 0 = alternatescreenbuffer,1 = mainscreenbuffer 5 Output vHeadSel Floppydiskstate-controlline SEL 4 Output vOverlay 1 = ROMoverlayaddressmapis used 3 Output vSndPg2 0 = alternatesoundbuffer,1 = mainsoundbuffer 2 Output vSound(2) {Soundvolume 1 Output vSound(l) (111= maximum,000= minimum; 0 Output vSound(0) bit 2 = mostsignificantbit ) ThevSCCWrReq bit monitorsthe /W/REQA and /W/REQBlinesfromthe SCC,whichare wiredtogetheron the mainlogicboard.(Wiringtogetherthe two lineseffectively performsan ORoperationon the signals;that is, if eithersignalis asserted,the combined signalis asserted.Twolinesconnectedin thiswayare saidto be "wireORed.")The MacintoshOperatingSystemusesthe vSCCWrReq bit to determinewhenthe SCChas receiveda character{byte),thus enablingthe operatingsystemto maintainserial communications duringfloppydiskaccesses,whenthe CPU'sinterruptsfromthe SCCare disabled.Serialcommunications is discussedin Chapter10. ThevPage2bit determineswhichof the two screenbuffersis readby the videocircuitry. ThevHeadSelbit is used to controlthe SELline.Thisis one of the fourdiskstate-control linesusedby the diskinterface.Amongotherthings,thislineis usedto enablethe upper or lowerread/writehead on a double-sidedfloppydiskdrive. ThevOverlaybit (usedonlyduringsystemstartupor reset)is usedto switchthe PALsto the ROMoverlayaddressmap. ThevSndPg2bit determineswhichof the two soundbuffersis readby the soundcircuitry. ThevSoundbitscontrolthe soundvolume. 1<,o Guideto the MacintoshFamilyHardware l-24.Dataregister A in theMacintosh SEcomputer Table4-3showsthe functionof eachbit in DataregisterA and the associatedassembly- languagenamefor controllingthat bit in the Macintosh SE. • Table4-3 Bitsin VIADataregisterA in the Macintosh SEcomputer Bit Direction Bit name Description 7 Input vSCCWrReq 0 = secWait/Request, channelA or B 6 Output vPage2 0 = alternatescreenbuffer,1 = mainscreenbuffer 5 Output vHeadSel Floppydisk state-controlline SEL 4 Output vDriveSel 0 = upperinternalfloppydiskdrive,1 = lower 3 Output vSync 1 = synchronous modemsupport,channelA 2 Output vSound(2) {Soundvolume 1 Output vSound(l) (111= maximum, 000= minimum; 0 Output vSound(0) bit 2 = mostsignificantbit ) ThevDriveSel bit determineswhichof the two internalfloppydiskdriveswillbe usedfor the nextfloppydiskaccess.Thissignalgoesto the BBU,whichgeneratesdriveenable signalsforthe two internalfloppydiskdrives.WhenvDriveSel is set high,the /ENBLline of the IWMselectsthe lowerinternalfloppydiskdrive.WhenvDriveSel is set low,the /ENBLlineselectsthe (optional)upper internalfloppydiskdrive. ThevSyncbitsupportsa synchronous modemon channelA of the SCC.WhenvSyncis set low,the SCCemulatesthe classicMacintoshconfiguration: the ReceiveClock(RTxC) signalfrequencyforbothchannelsis 3.672MHz.WhenvSyncis set high,the RTxCsignal forSCCchannelA is providedby the GPipin fromthe modemserialport connector.The RTxCsignalfrequencyforsecchannelB is always3.672MHz. Allthe otherbitsin the MacintoshSEVIADataregisterA havethe samefunctionsas the correspondingbits in the classicMacintoshcomputers. l-24.Dataregister A in theMacintosh Portable computer Table4-4showsthe functionof eachbit in DataregisterA and the associatedassembly- languagenamefor controllingthat bit in the MacintoshPortable. Chapter4 VersatileInterfaceAdapter(VIA)ICs 161 • Table4-4 Bitsin VIADataregisterA in the MacintoshPortable Bit Direction Bitname Description 7 In or out PMD7 PowerManagerdata 6 In or out PMD6 PowerManagerdata 5 In or out PMD5 PowerManagerdata 4 In or out PMD4 PowerManagerdata 3 In or out PMD3 PowerManagerdata 2 In or out PMD2 PowerManagerdata 1 In or out PMDl PowerManagerdata 0 In or out PMDO PowerManagerdata In the MacintoshPortable,all the bits in DataregisterA of the VIAare usedas an 8-bit bidirectionaldata bus used for communcation betweenthe mainprocessorand the Power Managermicroprocessor. DataregisterA in VIAl VIAlin two-VIA Macintoshcomputersperformsmostof the samefunctionsas the VIAin the classicMacintoshcomputersand the MacintoshSE.The addressof VIAlDataregister A is vBase+vBufA.The addressof the corresponding DataDirectionregisterA is vBase+vDirA. VL41DataregisterA in theMacintosh SF/30,Macintosh II, Macintosh /Ix, and Macintosh/lex computers Table4-5showsthe functionof eachbit in VIAlDataregisterA and the associated assembly-languagenamefor controllingthat bit in the MacintoshSE/30,Macintosh II, Macintoshllx, and Macintoshllcx computers. 162 Guideto the MacintoshFamilyHardware • Table4-S Bitsin VIA!DataregisterA in the Macintosh SE/30,Macintosh II, MacintoshIIx, and MacintoshIIcx computers Bit Direction Bitname Description 7 Input vSCCWrReq 0 = SCCWait/Request, channelA or B 6 Output vPage2 0 = alternatescreenbuffer,1 = mainscreenbuffer(on MacintoshSE/30) Input CPU.IOI Identifiesdifferentmodels(excepton MacintoshSE/30) 5 Output vHeadSel Floppydisk state-controlline SEL 4 Output vOverlay 1 = ROMoverlayaddressmapis used 3 Output vSync 1 = synchronous modemsupporton secchannelA 2 Reserved 1 Reserved 0 Reserved ThevSCCWrReq bit monitorsthe /W/REQA and /W/REQBlinesfromthe sec,which are wiredtogetheron the mainlogicboard("wireORed").TheMacintoshOperating Systemusesthe vSCCWrReq bit to determinewhenthe SCChas receiveda character (byte),thus enablingthe operatingsystemto maintainserialcommunicationsduring floppydiskaccesses,whenthe CPU'sinterruptsfromthe secare disabled.Thesecis discussedin Chapter10. In the MacintoshSE/30,bit 6 is namedvPage2and determineswhichof the two screen buffersis read by the videocircuitry. TheCPU.IOIlineis usedby the ROMcodeto identifywhichmodelit is runningon. That line is tied low in the Macintosh II and Macintosh IIx computers. ThevHeadSelbit is usedto set the levelof the SELline.Thisis one of the fourdiskstate- controlinesusedby the diskinterface.Amongotherthings,thislineis usedto enablethe upperor lowerread/writeheadon a double-sided floppydiskdrive. ThevOverlaybit (usedonlyduringsystemstartupor reset)is usedto switchthe GLUE to the ROMoverlayaddressmap.NotethatRAMis inaccessible untilthe Overlaysignal is deasserted. ThevSyncbitsupportsa synchronous modemon channelA of the SCC.WhenvSyncis set low,the SCCemulatesthe classicMacintoshconfiguration: the ReceiveClock(RTxC) signalfrequencyforbothchannelsis 3.672MHz.WhenvSyncis set high,the RTxCsignal forSCCchannelA is providedby the GPipin fromthe modemserialportconnector.The RTxCsignalfrequencyforsecchannelB is always3.672MHz. Chapter4 VersatileInterfaceAdapter(VIA)ICs 163 On the classicMacintoshand Macintosh SEcomputers,bits0, 1, and 2 are usedto set the volumeof the soundoutput.To maintainsoftwarecompatibility on the two-VIA machines,thosebitsare eitherunusedor areusedonlyas machine-ID signals. 1'241 Dataregister A in theMacintosh !lei computer In the Macintosh Ilci,manyof the functionsthat are controlledby VIAregistersin other modelsare controlledby registersin the RBV.Collectively, thoseregistersare namedthe 1'24emulationregisters; individually, theyare namedforthe equivalentregistersin an actualVIA. Table4-6showsthe functionsof VIAlDataregisterA in the Macintosh Ilcicomputer. ·• Table4-6 Bitsin VIAlDataregisterA in the MacintoshIlcicomputer Bit Directlon Bitname Description 7 Input vSCCWrReq 0 = SCCWait/Request,channelA or B 6 Input CPU.ID3 Bit 3 of 4-bitmodel-identitycode 5 Output vHeadSel Floppydisk state-controlline SEL 4 Input CPU.ID2 Bit 2 of 4-bitmodel-identitycode 3 Output vSync 1 =synchronous modemsupport,channelA 2 Input CPU.ID! Bit 1 of 4-bitmodel-identitycode 1 Input CPU.ID0 Bit 0 of 4-bitmodel-identitycode 0 Reserved ThevSCCWrReg, vHeadSel,and vSyncbits in the Macintosh Ilci are as describedfor the Macintosh SE/30and earlierMacintoshcomputers.The ROMcodeuses bits CPU.IDO- CPU.ID3to identifywhichmodelit is runningon. Theidentitycodevaluesfor the Macintosh Ilci are shownin Table4-8. 1'241 Dataregister A in theMacintosh 11/xcomputer In the Macintosh Ilfx,manyof the functionsthat are controlledby VIAregistersin other modelsare controlledby registersin the OSS,IOP,and BIU30.Collectively, thoseregisters are namedthe 1'24emulationregisters; individually, theyare namedforthe equivalent registersin an actualVIA.Table4-7showsthe functionsof VIAlDataregisterA in the MacintoshIlfx computer. 164 Guideto the MacintoshFamilyHardware • Table4-7 Bitsin VIAlData registerA in the MacintoshIlfx computer Bit Direction Bit name Description 7 Reserved 6 Input CPU.ID3 Bit 3 of 4-bit model-identitycode 5 Reserved 4 Input CPU.ID2 Bit 2 of 4-bit model-identitycode 3 Reserved 2 Input CPU.IDl Bit 1 of 4-bit model-identitycode 1 Input CPU.ID0 Bit 0 of 4-bit model-identitycode 0 Reserved The only bits used in VIAl Data register A in the Macintoshllfx are the model-identitybits CPU.IDO-CPU.ID3. The ROMcode uses those bits to identifywhichmodelit is running on. The identitycode valuesfor the MacintoshIlfx are shown in Table4-8. • Table4-8 Identitycodes in the MacintoshIlci and MacintoshIlfx Bit Bit name Value in MacintoshDci Value in MacintoshDfx 6 CPU.ID3 1 1 4 CPU.ID2 o· 1 2 CPU.IDl 1 0 1 CPU.ID0 1 1 *Thisvalueis a 1 in a Macintosh Ilciwiththe optionalparityfeatureinstalled. DataregisterA in VIA2 In Macintoshcomputers with two VIAs,VIA2is used to implement features not present in the MacintoshSEand classicMacintoshcomputers.The addressof VIA2Data_register A is vBase2+vBufA. The addressof DataDirectionregisterA is vBase2+vDirA.Table4-9 shows the functionof each bit in VIA2DataregisterA and the associatedassembly-language name for controllingthat bit in the MacintoshSE/30and MacintoshII-familycomputers. Chapter4 VersatileInterfaceAdapter(VIA)ICs 165 The Macintosh Ilci and Macintosh Ilfx have no VIA2;for the functionsof VIA2,those machinesuse registersin theircustomICs(RBVin the Macintosh Ilci;OSS,IOPs,and BIU30in the Macintosh thoseregistersare namedthe VlA emulation Ilfx).Collectively, registers;individually, theyare namedfor the equivalentregistersin an actualVIA.Some bits in the emulationregistersare differentfromthose in VIA2;the differencesare indicatedin the tables. • Table4-9 Bitsin VIA2DataregisterA Bit Direction Bitname Description 7 Output v2RAM1* RAM-size bit 1 (exceptin the MacintoshIlci) 6 Output v2RAM0• RAM-size bit 0 (exceptin the MacintoshIlci) 5 Input v2IRQ6 Interruptrequestfromexpansionslot $E 4 Input v2IRQ5 Interruptrequestfromexpansionslot $D 3 Input v2IRQ4 Interruptrequestfromexpansionslot $C 2 Input v2IRQ3 Interruptrequestfromexpansionslot $B 1 Input v2IRQ2 Interruptrequestfromexpansionslot $A 0 Input v2IRQ1 Interruptrequestfromexpansionslot $9 •1nthe Macintosh Ilci,memorymappingis takencareof by the MC68o30, so RAM-size bitsare not needed; instead,bit6 is namedv2IRQO and is usedfor the interruptfromthe internalvideocircuits;bit 7 is reserved. The two RAM-size bits are set at systemstartupby the firmwareto indicatethe size of the RAMICsbeingusedin the RAMSIMMs in bankA.Table4-10showshowthe bitsreflecthe sizeof the bank-ARAMICs.The RAM-size bitsdeterminethe physicaladdressat which the GLUEICstopsselectingbankA and startsselectingbankB. In the Macintosh Ilci,RAMbankB alwaysstartsat physicaladdress$04000000,so the RAM-size bits are not needed.Instead,the startupfirmwarein the MacintoshIlci determinesthe amountof RAMin bankA by writingand reading,thensetsup the MMUin the MC68030 to mapbank B into the logicaladdressspaceimmediately afterthe last logicaladdressin bankA. 166 Guideto the MacintoshFamilyHardware • Table4-10 VIA2RAMsize bits Bit Bit Size of RAM ICs v2RAM1 v2RAMO inbaokA 0 0 256 Kbit 0 1 1 Mbit 1 0 4 Mbit 1 1 16 Mbit Interruptlinesfromthe expansionslotsappear as bits OthroughS in VIA2DataregisterA. In addition,the GLUEIC performsan OR operationon the six interruptrequests,and the resultis receivedas an interruptrequestby VIA2.If this interruptis enabled,VIA2sends an interruptto the mainprocessor.The mainprocessorpollsthe VIA2InterruptFlagregister to determinethe sourceof the interruptand, upon determiningthat it is a NuBus interrupt,the mainprocessorpollsVIA2DataregisterA to determinewhichslot or slots initiated the interrupt. The MacintoshII and MacintoshIlx computerseach have six NuBusslots,numbered$9, $A,$B,$C,$D, and $E.The MacintoshIlcx and MacintoshIlci have three NuBusslots:in the MacintoshIlcx, the slots are numbered$9, $A,and $B;in the Macintoshllci, the slots are $C,$D,and $E.In the MacintoshSE/30computer,an expansioncard in the processor- directslot can be addressedlikea NuBuscard in slot $9, $A,or $B,and can generatethe correspondinginterrupt.Alsoin the MacintoshSE/30,the interruptfor slot $Ecan be generatedby the video logiccircuitson the logicboard. DataregisterB VIADataregisterB in Macintoshcomputersthat have only one VIAand VIAlData registerBin Macintoshcomputerswith two VIAs have similarfunctions.In two-VIA Macintoshcomputers,VIA2is used to implementfeaturesnot presentin the one-VIA computers.Thissectionfirstdescribesthe uses of the bits in VIAData registerB in one- VIAMacintoshcomputers,then the uses of the bits in VIAlDataregisterB, and·finallythe bits in VIA2Data registerB. DataregisterB in machineswith only one VIA VIAData registerB is at vBase+vButB.Data DirectionregisterB is at vBase+vDirB. Table4-11shows the functionof each bit in DataregisterB and the associated assembly-languagename for controllingthat bit for the MacintoshPlusand other classicMacintoshcomputers. Chapter4 VersatileInterfaceAdapter(VIA)!Cs 167 • Table4-11 Bitsin VIADataregisterB in the classicMacintoshcomputers Bit Direction Bit name Description 7 Output vSndEnb 0 = soundenabled 6 Input vH4 0 = videobeamin displayportionof line 5 Input vY2 MouseY2 4 Input vX2 MouseX2 3 Input vSW 0 = mouseswitchdown 2 Output rTCEnb 0 = real-timeclockenabled 1 Output rTCCLK Real-timeclock'sdata-clockline 0 In or Out rTCData Real-timeclock'sserialdata line The vSndEnbbit turnsthe soundgeneratoron or off.Thisbit can be toggledbetween 0 and 1 by VIAtimerTl, as discussedin the section"Auxiliary ControlRegister,"laterin this chapter. The vH4bit is set to a valueof 1 whenthe videobeamis in its horizontalblankingperiod. Thisbit can be used by softwareto counthorizontalinesto keep trackof the video beam'shorizontalpositionon the screen. ThevY2and vX2bitsreadthe mouseY (vertical)and X (horizontal)quadraturesignals. The vSWbit readsthe state of the mouseswitch. The rTCEnb,rTCClk,and rTCDatabits are used for communication withthe real-timeclock. Table4-12showsthe functionof each bit in DataregisterB and the associatedassembly- languagenamefor controllingthat bit in the MacintoshSE. • Table4-12 Bitsin VIADataregisterB in the MacintoshSEcomputer Bit Direction Bit name Description 7 Output vSndEnb 0 = soundenabled 6 Output vH4 0 = SCSIRQinterruptenabled 5 Output vFDesk2 ADBstate input 1 (STl) 4 Output vFDeskl ADBstate input O(STO) 3 Input vFDBint 0 = ADBinterrupt 2 Output rTCEnb 0 = real-timeclockenabled 1 Output rtcCLK Real-timeclock'sdata-clockline 0 In or Out rtcData Real-timeclock'sserialdata line 168 Guideto the MacintoshFamilyHardware ThevH4bit implementsan interruptmaskfor the SCSIinterruptlinefromthe NCR5380. Whenthisbit is set high,interruptson the SCSIcontroller'sIRQlineare disabled.Whenbit vH4is set low,a SCSIRQlinegeneratesa level-1interrupt,whichhas the samepriorityas a VIA-generated interrupt.Interrupt-handling softwarethen pollsthe VIAand SCSIto determinewhichdeviceis generatingthe interrupt. The vFDesk2bit is ADBstate input1 (STl),one of two statebits used to controla transferbetweenthe ADBtransceiverand the VIA. The vFDesklbit is ADBstate input0 (ST0),one of two statebits used to controla transferbetweenthe ADBtransceiverand the VIA. The vFDBintbit is the ADBinterrupt,whichindicatesthat an ADBtransactionis pending. Bits7 and 0 through2 in VIADataregisterB of the Macintosh SEhavethe samefunctions as the correspondingbits in the classicMacintosh. Table4-13showsthe functionof each bit in DataregisterB and the associatedassembly- languagenamefor controllingthat bit in the MacintoshPortable. • Table4-13Bitsin VIADataregisterB in the MacintoshPortablecomputer Bit Direction Bitname Description 7 Input vSCCWrReq 0 = secWait/Request, channelA or B Output vSndEnb 0 = soundenabled 6 Input vSndExt 0 = plugis insertedin externalsoundjack 5 Output vHeadSel Floppydiskstate-controlline SEL 4 Output vDriveSel 0 = upperinternalfloppydiskdrive,1 = lower 3 Output vSync 1 = synchronousmodemsupport,channelA 2 Output vTest Testsignal 1 Input vPMAck Handshakesignalfor PowerManagerIC 0 Output vPMReq Handshakesignalfor PowerManagerIC Bit7 of DataregisterB in the MacintoshPortableservestwo functions.Whenthe CPU's interruptsfromthe SCCare disabled,this bit monitorsthe /W/REQA and /W/REQBlines fromthe SCC,whichare wiredtogetheron the mainlogicboard("wireORed").The MacintoshOperatingSystemusesthe vSCCWrReq bit to determinewhen the SCChas receiveda character(byte),thus enablingthe operatingsystemto maintainserial communications duringfloppy·diskaccesses,when secinterruptsare disabled.The sec is discussedin Chapter10. Chapter4 VersatileInterfaceAdapter(VIA)ICs 169 WhenSCCinterruptsare not disabled,bit 7 can be monitoredby softwareas an aid in controllingthe soundcircuit.Onceevery60thof a second(VBLinterval),the operating systemchecksto see if thisbit has been cleared.If it has, the SoundManagersets up the ASCand sendsa pulseto clickthe speaker.Whenused in thisfashion,bit 7 emulatesthe functionof the samebit in the VIAof the MacintoshSEand classicMacintoshcomputers and therebyhelps to maintaincompatibility with softwarewrittenfor those machines. • Note:Whenwritingnew soundapplications,you can ensurecompatibility withthe differentmodelsin the Macintoshfamilyby usingthe SoundManager. The vSndExtbit indicateswhethera plughas been insertedin the externalsoundjack.The internalspeakerprovidesonlymonauralsound,so stereooutputis possibleonlywhenthe soundjackis beingused. The vHeadSelbit is used to controlthe SELline,one of the fourdiskstate-controllines used by the diskinterface.Amongotherthings,that line is used to enablethe upperor lowerread/writehead on a double-sidedfloppydiskdrive. The vDriveSel bit determineswhichof the two internalfloppydiskdriveswillbe used for the nextfloppydiskaccess.Thissignalgoesto the Miscellaneous GLUcustomIC,which generatesdriveenablesignalsfor the two internalfloppydiskdrives.WhenvDriveSel is set high,the /ENBLlineof the SWIMselectsthe lowerinternalfloppydiskdrive.When vDriveSelis set low,the /ENBLlineselectsthe (optional)upper internalfloppydiskdrive. ThevSyncbit supportsa synchronousmodemon channelA of the SCC.WhenvSyncis set low,the SCCemulatesthe classicMacintoshconfiguration: the ReceiveClock(RTxC) signalfrequencyforbothchannelsis 3.672MHz.WhenvSyncis set high,the RTxCsignal for SCCchannelA is providedby the GPipin fromthe modemserialport connector.The RTxCsignalfrequencyforSCCchannelBis always3.672 MHz. The VTestbit sendsa test signalto the PowerManagerICthat forcesit to turn on all powersupplies;thissignalis used onlyfor testingby Appleservicepersonnel. The PMAckbit indicatesthe levelof the acknowledgesignalfromthe PowerManagerIC. Thissignalis sent by the PowerManagerIC to the mainprocessorto acknowledgethe receiptof a commandor data. The PMReqbit is used to set the levelof the PowerManagerICrequestsignalto the Power ManagerIC.Thissignalis sent by the mainprocessorto the PowerManagerICto indicate that there is validdata on the PowerManagerIC data bus. 170 Guideto the MacintoshFamilyHardware DataregisterB in VIAl Table4-14showsthe functionof eachbit in DataregisterB and the associatedassembly- languagenamefor controllingthat bit in the MacintoshSE/30and Macintosh II-family computers.Notall the bitsin DataregisterB are usedin all the models;differencesare notedin the descriptioncolumnof the table. In the Macintosh IIci,manyof the functionsthat are controlledby VIAregistersin other modelsare controlledby registersin the RBV.Similarly, the MacintoshIlfxusesregistersin the OSS,IOP,and BIU30for someof thosefunctions.Collectively, those registersare namedthe VIAemulationregisters; individually, theyare namedforthe equivalentregisters in an actualVIA.Somebitsin the emulationregistersare differentfromthosein VIAl;the differericesare indicatedin the tables. • Table4-14Bitsin VIAlDataregisterB in the Macintosh SE/30and the MacintoshII family Bit Direction Bitname Description 7 Input /Par.Err 0 = parityerror(Macintosh IIcionly) Output vSndEnb 0 = soundenable(for softwarecompatibility) 6 Output /Par.En 0 = parity-checkingenabled(Macintosh IIcionly) vSyncEnA 0 = verticalsynchronizationinterruptenabled (Macintosh SE/30only)(unusedin othermodels) 5 Output vFDesk2 ADBstate input 1 (ADB.STl) (Unusedin Macintosh IIfx) 4 Output vFDeskl ADBstate input0 (ADB.ST0) (Unusedin Macintosh IIfx) 3 Input vFDBint 0 = ADBinterrupt(/ADB.INT) (Unusedin Macintosh IIfx) 2 Output rTCEnb 0 = real-timeclockenabled 1 Output rtcCLK Real-timeclock'sdata-clockline 0 In or Out rtcData Real-timeclock'sserialdata line On the Macintosh IIci,bit 7 is an inputsignalfromthe ParityGeneratorand Checker (PGC).Whena nonmaskableinterrupt(NMI)occurs,the interruptserviceroutine can read thisbit to determinewhetherthe causeof the interruptwas detectionof a parityerror. Chapter4 VersatileInterfaceAdapter(VIA)ICs 171 • Note:In the MacintoshII family,bit 7 is used as an outputonlyto maintain compatibility with the classicMacintoshand MacintoshSEcomputers,in whichthat bit is used as an outputto enableor disablesoundoutput. In the Macintosh SE/30,bit 6 (vSyncEnA) enablesor disablesa slot $Einterruptrequest fromthe videologiccircuitsto VIA2.Whenenabled,this interruptrequestis asserted eachtimethe verticalblankingsignalis assertedby the videologiccircuits.If expansion slot interruptsare enabled,VIA2then assertsan interruptrequestto the GLUE,which interruptsthe mainprocessor.The verticalsynchronization interruptgeneratedin this fashionis distinctfromthe 60.15Hz interrupt(VBL)request,whichis sent by VIA2to VIALThe 60.15Hz interruptin the Macintosh SE/30and in the Macintosh II family emulatesthe VBLinterruptgeneratedby the videocircuitsin the Macintosh SEand classicMacintoshcomputers. ~ Developer tip The 60.15Hz interruptis providedin the MacintoshSE/30and MacintoshII-familycomputersto maintaincompatibilitywith softwarethat dependson thissignalto timeevents.If you wantyour softwareto be synchronizedwiththe actualverticalblankingof the screen,you mustuse the slot interruptgeneratedby a NuBusvideo card in the MacintoshII-familycomputersor by the videologic circuitsin the MacintoshSE/30and the Macintosh IIci.To learnmore aboutusingslot interrupts,read the chapteron the DeferredTask Managerin InsideMacintosh.~ In the parity-equipped versionof the MacintoshIIci,bit 6 enablesor disablesparity generationand checkingby the PGC.Eachtimea byteof RAMis written,the PGC generatesa paritybit and storesit in the ninthbit of the parityRAMSIMMfor that byte. Eachtimea byteof RAMis read,the PGCgeneratesan internalparitybit and comparesit with the bit read fromthe RAM'sparitybit for the byte.If the two paritybits are not the sameand paritycheckingis enabled(bit 6 is 0), the PGCassertstwo outputs:/NMI,which interruptsthe mainprocessor,and /PAR.ERR, whichindicatesa parityerror.The interrupt serviceroutinecan turn offthe /PAR.ERR and /NMIsignalsby settingthe /Par.Enbit to 1. • Note:The parityfeatureis availablein the MacintoshIIcionlyby specialorder;it is not availableas as upgrade. 172 Guideto the MacintoshFamilyHardware Bit6 is not used in the otherMacintosh II-familycomputers. The vFDesk2bit is ADBStateinput 1 (STl),one of two statebitsused to controla transferbetweenthe ADBtransceiverand VIAl. ThevFDesklbit is ADBStateinput0 (ST0),one of two statebits used to controla transferbetweenthe ADBtransceiverand VIAL ThevFDBintbit is the ADBinterrupt,whichindicatesthat an ADBtransactionis pending. The rTCEnb,rTCClk,and rTCDatabitsare usedfor communication withthe real-timeclock. DataregisterB in VIA2 VIA2DataregisterB is at vBase2+vBuffi. DataDirectionregisterB is at address vBase2+vDirB. Table4-15showsthe functionof eachbit in DataregisterBand the associatedassembly-languagenamefor controllingthat bit in the Macintosh SE/30and MacintoshII-familycomputers. In the Macintosh IIci,manyof the functionsthat are controlledby VIAregistersin other modelsare controlledby registersin the RBV.Similarly,the MacintoshIlfxusesregistersin the OSS,IOP,and BIU30for someof thosefunctions.Collectively, thoseregistersare namedthe 'WAemulationregisters; individually, theyare namedforthe equivalentregisters in an actualVIA.Somebitsin the emulationregistersare differentfromthosein VIA2;the differencesare indicatedin the tables. Chapter4 VersatileInterfaceAdapter(VIA)ICs 173 • Table4-1SBitsin VIA2DataregisterB Bit Direction Bitoame Description 7 Output v2VBL 60.15Hz interruptrequestto VIAl /Par.Test 0 = paritytest mode (Macintosh lid only) 6 Input v2SNDEXT 0 = plugis insertedin externalsoundjack(MacintoshII family) Tied low (Macintosh SE/30) 5 Input v2TM0A Transfermodebit 0 acknowledgefromNuBus 4 Input v2TM1A Transfermodebit 1 acknowledgefromNuBus 3 In or out vFC3 AMU/PMMU control(Macintosh II) Tied low (Macintosh SE/30) 0 = flushthe cachecard (Macintosh lid) Not used (MacintoshIlx, MacintoshIlcx, MacintoshIlfx) 2 Output v2PowerOff 0 = shutoffpower 1 Output v2BusLk 0 = NuBustransactionsare lockedout 0 Output /CEnable 1 = disablecachecard (Macintosh lid) v2CDis 0 = disablemainprocessor'sinstructionand data caches (MacintoshSE/30and MacintoshII-familymachines) Thev2VBL bit is drivenby timerTl to send the 60.15Hz interruptrequestto VIAlonce every16.63ms.If enabledby the appropriatebit in the VIAlInterruptEnableregister, thissignalcan be used by VIAlto generatean interrupto the mainprocessor. Thev2SNDEXT bit indicateswhethera plughas been insertedin the externalsoundjack. Theinternalspeakerprovidesonlymonauralsound,so stereooutputis possibleonlywhen the soundjackis beingused.Thisbit is tied low in the Macintosh SE/30so that the Sound Manageralwaysoperatesin stereomodein the Macintosh SE/30;the Macintosh SE/30 soundcircuitincludesa mixerto converthe stereosignalto monofor the internalspeaker. v2TM1A and v2TM0A are statusbitsreturnedfroma NuBusaccess.If an erroroccursduring a NuBusaccess,a bus erroris sent to the mainprocessorand thesebitsare set to indicate whatthe errorwas,as shownin Table4-16.Thesignalsthatcontrolthesebitsare available to an expansioncard in the processor-direct slot in the Macintosh SE/30computer. 174 Guideto the MacintoshFamilyHardware • Table4-16 NuBustransferacknowledgebits in VIA2DataregisterB Bits v2TM1A v2TMOA 0 0 Noerror 0 1 Reador writeerror,handledby bus master 1 0 Bus timeout 1 1 Tryagainlater The!TMO and /TMlsignalscontrolledby thesebitsare alsoused,alongwithothersignals, to indicatethe transactiontype and size duringthe NuBusstartcycle.For more informationon the /TM0and /TMl signals,see Chapter3, "NuBusDataTransfer,"of DesigningCardsand Drivers for theMacintoshFamily,secondedition. Whenthe MacintoshII has the AMUinstalled,the vFC3bit is used for outputand controls whether24-bitmodeor 32-bitmodeis used.WhenvFC3is set to 0, the AMUperformsa 24-bitto 32-bitaddresstranslation.Whenthe PMMUis installed,this bit is used for input. Whenthe PMMUis accessingthe page table,it setsthisbit to 1. Thisbit'is tied low in the MacintoshSE/30and is not used in the MacintoshIlx and MacintoshHex.In the Macintoshlid, the vFC3bit is an outputthat controlsthe /CFLUSH signalto the optional cache card. Whenthe v2Power0ffbit is set to 0, the powersupplyis shut off in the MacintoshII- familycomputers.The signalcontrolledby this bit is availableat the processor-direct slot in the MacintoshSE/30so that an expansioncardcan use it to shut downoperations beforelosingpowerfromthe computer. Whenthe v2BusLkbit is set to 0 in a MacintoshII-familycomputer,NuBustransactions froma slot to the mainlogicboardare blockedand a try-again-laterresponseis sent to the NuBuscontroller(NuChip,NuChip30,or BIU30).Thatbit can be used to protecttime- criticalprocessoractivityfromNuBusdirect-memory accesstransactions.Thissignalis availableat the processor-direct slot in the MacintoshSE/30for use by expansioncards that emulateNuBuscards. In the Macintoshlid, when the /CEnablebit is set to 0, the RBVassertsa signalthat enablesthe optionalcachecard.Whenthat bit is set to 1, the RBVdisablesthe cache card.Applicationshouldnot set that bit directly,but shoulduse the appropriateROM trapsto enable,disable,and flushthe cachecard.The traps,namedEnableExtCache, DisableExtCache, and FlushExtCache,are availableusingselectors4, 5, and 6 throughthe hardwarepriviledgetrap HWPriv(A098). Chapter4 VersatileInterfaceAdapter(VIA)!Cs 175 On otherMacintosh II-familymachinesand on the Macintosh SE/30,settingthe v2VDis bit to Ocausesthe VIA2to asserta signalthat disablesthe instructionand data cachesin the mainprocessor. PeripheralControlregister TheVIAPeripheralControlregisterallowssoftwareto set someverylow-level parameters-suchas positive-edge or negative-edge triggering-forcertainVIAsignals. Thefunctionof eachof the bitsin the PeripheralControlregisteris describedfullyin the manufacturers' documentation for the 6522VIAIC. .A.Warning Do not changeanyof the bitsin the PeripheralControlregister. Changingthesebitswillinterferewiththe operationof the keyboard or withothercomputerfunctions.._ PeripheralControlregisterin VIAlor VIA Thefunctionsof the bits in the VIAPeripheralControlregisterin the classicMacintosh, at addressvBase+cPCR, are shownin Table4-17. • Table4-17 Signalscontrolledby the VIAPeripheralControlregisterin the classic Macintoshcomputers Bit Signal controlled 7-5 Keyboarddata 4 Keyboardclock 3-1 One-secondinterrupt 0 Verticalblankinginterrupt Thekeyboarddata line is a bidirectional serialdata lineusedto transferdatabetweenthe VIAShiftregisterand the keyboard. The keyboardclocksignalis the signalused to timecommunications overthe keyboard dataline.Thekeyboardclocksignalis drivenby the keyboard. Theone-secondinterruptis a signalgeneratedonceeverysecondby the RTC.If enabled by the appropriatebit in the VIAInterruptEnableregister,thissignalcan be usedby the VIAto generatean interrupto the mainprocessor. 176 Guideto the MacintoshFamilyHardware The60.15Hzinterrupt(VBL)is a signalgeneratedby a PALonceevery16.63ms,at the startof the verticalblankingintervalfor the built-invideomonitor.If enabledby the appropriatebit in the VIAInterruptEnableregister,thissignalcan be used by the VIAto generatean interrupto the mainprocessor. Thefunctionsof the bitsin the VIAPeripheralControlregisterin the VIAin the Macintosh SEand in VIAl in the Macintosh SE/30and Macintosh II family,at address vBase+cPCR,are shownin Table4-18. • Table4-18 Signalscontrolledby the PeripheralControlregisterin VIAin the MacintoshSE/30and in VIAl in the Macintosh II-familycomputers Bit Signalcontrolled 7-5 AppleDesktopBusdata 4 AppleDesktopBusclock 3-1 One-secondinterrupt 0 Verticalblankinginterrupt TheADBdatalineis a bidirectionalserialdatalineusedto transferdata betweenthe VIA Shiftregisterand the ADBtransceiver. TheADBclocksignalis the signalusedto timecommunications overthe ADBdataline. TheADBclocklineis drivenby the ADBtransceiver. As in the classicMacintosh, the one-secondinterruptis a signalgeneratedonceevery secondby the RTCthat can be usedto generatean interrupto the mainprocessor. The60.15Hz interrupt(VBL)is a signalgeneratedby the BBUin the Macintosh SEand by VIA2in the Macintosh SE/30and Macintosh II familyonceevery16.63ms.It servesmany of the samesoftwarefunctionsas the VBLinterruptin the classicMacintoshcomputers, althoughit is not sychronizedto actualvideosignalsgeneratedon a videocardin an expansionslot. The functionsof the bits in the VIAPeripheralControlregisterin the MacintoshPortable, at vBase+cPCR,are shownin Table4-19. Chapter4 VersatileInterfaceAdapter(VIA)ICs 177 • Table4-19 Signalscontrolledby the VIAPeripheralControlregisterin the MacintoshPortablecomputer Bit Signal controlled 7-5 SCSIRQinterrupt 4 PowerManagerinterrupt 3-1 One-secondinterrupt 0 60.15Hz interrupt TheSCSIRQinterruptis generatedby the SCSIcontrollerto indicatean errorcondition. ThePowerManagerinterruptis requestedby the PowerManagerICmicroprocessor when it needsto communicate withthe mainprocessor. Theone-secondinterruptis a signalgeneratedonceeverysecondby the PowerManagerIC that can be usedto generatean interrupto the mainprocessor.It servesthe same functionas the one-secondinterruptgeneratedby the RTCin otherMacintoshcomputers. The60.15Hzinterruptis a signalgeneratedby the PowerManagerIConceevery16.63ms that can be usedto generatean interrupto the mainprocessor.It servesthe same functionas the 60.15Hz interruptin the MacintoshSE/30and Macintosh II-family computersand the VBLinterruptin the classicMacintoshcomputers. Peripheral C.Ontrol registerin VIA2 TheVIA2PeripheralControlregisterin the MacintoshSE/30and Macintosh II family,at addressvBase2+vPCR, controlsparametersfor SCSI,ASC,and slot interrupts.Table4-20 showsthe signalscontrolledby the VIA2PeripheralControlregister. .A. Warning Do not changeanyof the bitsin the VIA2PeripheralControlregister. Changingthesebitswillinterferewiththe operationof the SCSI controller,soundIC,or NuBus.• • Table4-20 Signalscontrolledby the VIA2PeripheralControlregister Bit Sigoal controlled 7-5 SCSIRQinterrupt 4 ASCinterrupt 3-1 SCSIDRQinterrupt 0 Slot interrupt 178 Guideto the MacintoshFamilyHardware Allfourof the signalscontrolledby the VIA2PeripheralControlregisterare inputsto VIA2. If enabledby the appropriatebit in the VIA2InterruptEnableregister,any of these signals can be used by VIA2to generatean interruptto the mainprocessor. The SCSIRQinterruptis generatedby the SCSIcontrollerto indicatean error condition. The ASCinterruptcan be used to controlan interrupt-driven sound driver.It indicates when the bufferin the ASCis readyto be reloaded. The SCSIDRQinterruptindicatesthat the SCSIcontrolleris ready to transferdata. This signalcan be used to initiatea SCSItransactionfor interrupt-drivenSCSI communications. The slot interruptis the resultof performingan ORoperationon the interruptoutputsof all the NuBusslots.If the main processorreceivesthis interrupt,it readsVIA2Data registerA to determinewhich slot initiatedthe interruptrequest.The MacintoshIlcx and MacintoshIIci have only the firstthree NuBusslots;the MacintoshIIci can also generatea slot interrupt($0)for its built-invideo circuits.An expansioncard in the processor-directslot in the MacintoshSE/30can generateany of the firstthree slot interrupts,and the video circuitson the logicboard in the MacintoshSE/30can generate an interruptfor slot $E. AuxiliaryControlregister The AuxiliaryControlregistercontrolsvariousparameterspertainingto the VIAtimersand the VIAShiftregister.The VIAAuxiliaryControlregisterin the classicMacintoshand MacintoshSEcomputersis at addressvBase+v ACR;the VIAlAuxiliaryControlregisterin the MacintoshSE/30and MacintoshII familyis also at addressvBase+vACR. The VIA2 AuxiliaryControlregisterin the MacintoshSE/30and MacintoshII familyis at address vBase2+vACR. In the MacintoshIIci,parametersfor the VIA2portionof the RBVare fixedby the hardwareso there is no AuxiliaryControlregisterfor VIA2in that machine. Chapter4 VersatileInterfaceAdapter(VIA)res 179 Table4-21showsthe functionof eachbit in the Auxiliary Controlregister. • Table4-21 Bitsin the Auxiliary Controlregister Bit Functioncontrolled 7,6 TimerTl interrupts 5 TimerT2 interrupts 4-2 Keyboarddata bit-shiftoperation(classicMacintosh) ADBdata bit-shiftoperation(Macintosh SE,MacintoshSE/30VIAl,and MacintoshII-familyVIAl) Not used (MacintoshPortable,Macintosh SE/30VIA2,and MacintoshII-familyVIA2) 1 Enable/disable for inputdata latchfor DataregisterB signallines (1 = enable,0 = disable) 0 Enable/disablefor inputdatalatchfor DataregisterA signallines (1 =enable,0 =disable) TimerTl can operateeitheras a one-shotintervaltimeror as an automatically repeating pulsegenerator.In one-shotmode,timerTl decrementsone countevery1.2766µs, generatingan interrupton the VIAinterruptline(if that interruptis enabledby the appropriatebit in the InterruptEnableregister)when the countreaches0. In automatic repeat(or free-running) mode,softwarecan loadthe timerTl latcheswitha valuethat Tl willreloadautomatically eachtimeit countsdownto 0. Thismodecan generatean interrupteachtimethe countreaches0 and can alsoinvertbit 7 in VIADataregisterB eachtime.In the Macintosh II VIA2,thisbit controlsthe 60.15Hz interrupt,whichis used as an interrupt-requestinputto VIAL ~ Developer tip In the past,someprogrammers workingon the classicMacintosh computershaveused timerTl to togglesoundon and off,generating a square-wave soundsignal.Thistechniquedoesnot workwithrecent Macintoshcomputers,however,becausethe soundenable/disable signalprovidedby the classicMacintoshand Macintosh SEcomputers is not availablein Macintoshcomputersthat havethe AppleSound Chip.Instead,you shoulduse the SoundManageroutinesdescribedin InsideMacintoshto controlsoundoutput. ~ 180 Guideto the MacintoshFamilyHardware Bits6 and 7 in the Auxiliary Controlregistercontrolthe modeof operationof timerTl, as shownin Table4-22. • Table4-22 Bits6 arid7 in theVIAAuxiliary Controlregister Bit Bit Effect on 7 6 Operation soundcontrol 0 0 TimedinterrupteachtimeTl is loaded No effect 0 1 Automaticloadingof Tl fromlatches No effect 1 0 TimedinterrupteachtimeTl is loaded Negativepulse 1 1 Automaticloadingof Tl fromlatches Toggleson or off TimerT2can operateeitheras an intervaltimer(in the samefashionas the one-shotmode of timerTl) or can countnegativepulseson VIApin PB6.BecauseVIAlpin PB6is not used in the Macintosh II, Macintosh Ilx, and Macintosh Hex,this secondfunctionof VIAl timerT2 is not availablein thosemembersof the Macintosh II family.In the Macintosh SE/30,VIAlpin PB6is usedan an output,so the countingfunctionof timerT2 is unavailableon thatmachineas well.VIA2pin PB6in the Macintosh II-familycomputers is usedto detectwhena plugis insertedin the externalsoundjack. Bits2, 3, and 4 of the Auxiliary Controlregistercontrolthe waythe ADBdatabits(or the keyboarddata bits in the classicMacintosh) are shiftedin and out of the VIAShift register.The MacintoshPortableShiftregisterand the VIA2Shiftregisterare not used. TheMacintoshPortabletransfersADBdata overthe PowerManagerICdata linesto the VIA. BitsOand 1 controlwhetherbitsin DataregistersA and B thatare usedfor inputare latchedor alwaysreflecthe voltagelevelson the inputpins. .A.Warning Do not changebitsOthrough5 in the Auxiliary Controlregister. Changingthesebitswillinterferewiththe operationof the keyboard, the ADB,or withothercomputerfunctions.• Chapter4 VersatileInterfaceAdapter(VIA)ICs 181 Shift register The Shiftregister,at vBase+vSR, containsthe 8 bits of data that have been shiftedin or that willbe shiftedout over the keyboarddata line in the classicMacintoshcomputers,or over the ADBdata line in the MacintoshSE,MacintoshSE/30,and MacintoshII family. The VIAShiftregisteris not used in the MacintoshPortable.In machinesthat have two VIAs,the VIA2Shiftregisteris not used. Event timers As discussedin the section"Auxiliary ControlRegister,"earlierin this chapter,eitherVIA timercan be used to time a singleevent.In addition,softwarecan causetimerTl to repeatcontinuouslyby loadinga value into the timerTl latchesand settingbits 6 and 7 of the AuxiliaryControlregisteras shownin Table4-22. The VIAeventtimersuse the Enablesignal(E clock)as a reference;therefore,the timer counteris decrementedonce every1.2766µs.TimerT2 can be programmedto count down once each time the VIAreceivesan input for bit 6 of DataregisterB. If the proper interrupt-enablebit has been set, an interruptis generatedwhen a VIAtimer countsdown to 0. To startone of the timers,store the appropriatevaluesin the high-orderand low-order bytes of the timercounter(or, for a periodicinterrupt,the timerTl latches).Becausethe high-orderand low-orderbytes of a counterdo not have adjacentaddresses,software must explicitlydo two stores,firstfor the low-orderbyte and then for the high-orderbyte. A programcannotsimplystore a fullword to the high-orderaddressto set a timer;it must write to the high-orderbyte last,becausewritingto the high-orderbyte startsthe timer. Table4-23showsthe offsetsfromthe VIAbase value (vBaseor vBase2)of the counters and latchesused to start the timers. • Table4-23 Offsetsof MacintoshVIAtimer latches Offset Contents vTlC TimerTl counter(low-orderbyte) vTlCH TimerTl counter(high-orderbyte) vTlL TimerTl latch(low-orderbyte) vTlLH TimerTl latch(high-orderbyte) vT2C TimerT2 counter(low-orderbyte) vT2CH TimerT2 counter(high-orderbyte) 182 Guideto the MacintoshFamilyHardware TimerTl of the classicMacintosh,Macintosh SE,and MacintoshPortableVIA,and of the Macintosh SE/30and Macintosh II-familyVIAl,is used by the SoundDriverand SoundManager.TimerT2 is usedby the DiskDriverto timedisk1/0 events.TimerTl of the MacintoshSE/30and MacintoshII-familyVIA2is used to generatethe Vertical Blankingsignalthat goesto VIALVIA2timerT2 is not currentlyusedby the Macintosh OperatingSystem. ~ Developer tip To avoidinterferingwith criticaloperatingsystemroutines,it is stronglyrecommendedthat you do not writeto the VIAtimers directly.Instead,use the SoundDriverand SoundManageroutinesto controlsoundoutput,and use the routinesprovidedby the Time Managerto timeevents.TheSoundDriver,SoundManager,and Time Managerare describedin InsideMacintosh.4. Processor-interruptregisters Low-level softwarecan enableor disableeachof the sourcesof VIAinterruptsby setting or clearinga bit in the InterruptEnableregister.Themainprocessorcan then readthe contentsof the InterruptFlagregisterto learnthe causeof the interrupt. TheVIAin the classicMacintoshand Macintosh SEcomputers,or VIAlin the Macintosh SE/30and Macintosh II-familycomputers,can causea level-1processor interruptwheneverone of the followingeventsoccurs: • TimerTl or timerT2 countsdownto 0. • The keyboardclocksignalis received(classicMacintosh); or the ADBclocksignalis received(Macintosh SEor MacintoshII family). • A bit is transferredoverthe keyboarddata line(classicMacintosh)or overthe ADB data line (MacintoshSEor MacintoshII family). • The shiftregisterfor the keyboardserialinterface(classicMacintosh)or for the ADB serialinterface(MacintoshSEor Macintosh II family)finishesshifting8 bits in or out. • The verticalblankingintervalis beginning(classicMacintosh, MacintoshSE)or the 60.15Hz interruptoccurs(Macintosh II family). • The one-secondinterruptrequestis received. Chapter4 VersatileInterfaceAdapter(VIA)ICs 183 TheVIAin the MacintoshPortablecan causea level-1processorinterruptwheneverone of the followingeventsoccurs: • TimerTl or timerT2countsdownto 0. • A SCSIRQinterruptrequestis received. • A PowerManagerICinterruptrequestis received. • Theone-secondinterruptrequestis received. • The60.15Hz interruptrequestis received. VIA2in the Macintosh II-familymachinescan causea level-2processorinterruptwhenever one of the followingeventsoccurs: • TimerTl or timerT2countsdownto 0. • A slot interruptrequestis received. • An ASCinterruptrequestis received. • A SCSIRQinterruptrequestis received. • A SCSIDRQinterruptrequestis received. Seethe sections"MC68000 Interrupts,"MC68020 Interrupts,"and "MC68030Interrupts" in Chapter3 for moreinformation on howMacintosh computershandleinterrupts.For moreinformation on howto use interruptsin yourprograms,see InsideMacintosh. Intermpt Flagregister Eachbit in the InterruptFlagregisters(at addressesvBase+vIFR and vBase2+vIFR) is set highwhenevera specificinterrupthas occurred,as shownin Tables4-24through4-27.The MacintoshOperatingSystemuses theseflagsto determinethe causeof the interrupt. Bit7 of the InterruptFlagregisteremainset high(andthe /IRQlineto the generalogic circuitsis heldlow)as longas anyVIAinterruptflagis set. 184 Guideto the MacintoshFamilyHardware • Table4-24 Bitsin the InterruptFlagregisterin the VIAin the classic Macintoshcomputers Bit cause of interrupt 7 IRQ(anyenabledVIAinterrupts) 6 TimerTl 5 TimerT2 4 Keyboardclock 3 Keyboarddata 2 Keyboarddata ready 1 Verticalblankinginterrupt 0 One-secondinterrupt • Table4-25 Bitsin the InterruptFlagregisterin the VIAin Macintosh SEand in VIAl in the MacintoshSE/30and MacintoshII-familycomputers Bit Causeof interrupt 7 IRQ(anyenabledVIAinterrupts) 6 TimerTl 5 TimerT2 4 ADBclock 3 ADBdata 2 ADBdata ready 1 Verticalblankinginterrupt 0 One-secondinterrupt Note:TheMacintosh Ilciusesregistersin the RBVto controlthe interruptfunctions.TheMacintosh Ilfxuses registersin the OSSto controlthe interruptfunctions. Chapter4 VersatileInterfaceAdapter(VIA)ICs 185 • Table4-26 Bitsin the InterruptFlagregisterin the VIAin the MacintoshPortablecomputer Bit cause of interrupt 7 IRQ(anyenabledVIAinterrupts) 6 TimerTl 5 TimerT2 4 Powermanagerinterrupt 3 SCSIRQinterrupt 2 Not used 1 60.15Hz interrupt 0 One-secondinterrupt • Table4-27 Bitsin the VIA2InterruptFlagregisterin the Macintosh SE/30and MacintoshII-familycomputers Bit cause of interrupt 7 IRQ(allenabledVIAinterrupts) 6 TimerTl (not used on the Macintosh Ilci) 5 TimerT2 (not used on the Macintosh Ilci) 4 ASCinterrupt 3 SCSIIRQ 2 /EXP.IRQ(MacintoshIlci only) 1 Slot interrupt 0 SCSIDRQ Note:TheMacintosh Ilciusesregistersin the RBVto coQtrolthe interruptfunctions.TheMacintosh Ilfxuses registersin the OSSto controlthe interruptfunctions. InterruptEnableregister TheInterruptEnableregisterletssoftwareenableor disablethe interruptshownin Table4-24throughTable4-27.If an interruptis disabled,its corresponding bit in the InterruptFlagregistercontinuesto be set wheneverthe causefor that interruptoccurs, but the IRQflag(bit 7 in the InterruptFlagregister)is not affectedand the VIAdoes not assertthe /IRQlineto the generallogiccircuits.Softwarecan addressthe InterruptEnable registerat addressvBase+vlER for VIAlor vBase2+vlER for the VIA2. 186 Guideto the MacintoshFamilyHardware Thelower7 bitsin the InterruptEnableregisterare arrangedin the samesequenceas the bits in the InterruptFlagregister(Table4-24throughTable4-27).Forexample,bit 6 in the InterruptEnableregisterenablesor disablesinterruptscausedby timerTl. Whena programwritesan 8-bitvalueto the InterruptEnableregister,if bit 7 is a 1, each 1 in bitsOthrough6 enablesthe corresponding interrupt;if bit 7 is a 0, each 1 in bits0 through6 disablesthe correspondinginterrupt.In eithercase,O'sin bitsOthrough6 of the InterruptEnableregisterhaveno effecton the statusof the interrupts.Forexample,to enableinterruptscausedby the classicMacintoshkeyboardclockwithoutaffectingany otherinterrupt,softwarewouldwritel's to bits7 and 4 of the InterruptEnableregister. To disableinterruptscausedby the keyboardclocksignal,it wouldwritea Oto bit 7 and a 1 to bit 4. Whensoftwarereadsthe InterruptEnableregister,bit 7 is alwaysread as a 1. Chapter4 VersatileInterfaceAdapter(VIA)ICs 187 Chapter5 Memory Macintoshcomputerscontainboth random-access memory(RAM)and read-onlymemory(ROM).Thischapterdescribesthe RAMand ROM hardwareand connectorsusedin Macintosh computers.Thewayin which the addressspaceis assignedto variousdevicesin the different Macintoshfamilymembersis describedin Chapter3. 189 Memory expansion ~ MacintoshPlus RAMSIMM RAMSIMM MacintoshSE RAMMSIMM, ROMSIMM MacintoshSE/30 RAMexp. slot, ROMexp. slot MacintoshPortable ~ • RAMSIMM MacintoshII ~ • RAMSIMM, ROMSIMM MacintoshIlx ~ • RAMSIMM, ROMSIMM MacintoshIlcx RAMSIMM, ROMSIMM MacintoshIlci Dl ~ RAMSIMM, ROMSIMM MacintoshIlfx 190 Guideto the MacintoshFamilyHardware RAM SystemRAMis the workingmemoryof the system.Theamountof RAMavailableand the memoryaddressesit occupiesare differenton the differentmodelsin the Macintosh family.The mainreasonfor the differencesis the use of differentmicroprocessors and their different-sized addressbuses:the MC68000, with 24-bitaddresses,and the MC68020 and MC68030, with 32-bitaddresses. RAM addressesin MC68000-based models In the Macintoshcomputersthat use the MC68000 processor,the addressspacefrom address$000000through$3FFFFF($000000through$8FFFFFin the MacintoshPortable) is reservedfor RAM,althoughthe amountof thatspaceactuallyuseddependson the RAM availablein the system,as shownin Table5-1.Thefirst1024bytesof RAM($000000 through$0003FF)are used by the MC68000 to storeexceptionvectors.Of these locations,the first256bytesare reservedfor use by the operatingsystemand the remainderare availablefor use by applications.The first256bytescontaintrap vectors, interruptvectorsfor the 1/0 devices,and the Resetvector. • Table5-1 RAMaddressesin Macintoshcomputerswithan MC68000 processor Computer Amountof RAM HighestRAMaddress Macintosh128K 128KB $01FFFF Macintosh512K 512KB $07FFFF Macintosh512Kenhanced 512KB $07FFFF MacintoshPlus 1MB $0FFFFF 2MB $1FFFFF 2.5MB $27FFFF 4MB $3FFFFF MacintoshSE 1MB $0FFFFF 2MB $1FFFFF 2.5MB $27FFFF 4MB $3FFFFF MacintoshPortable 1MB $0FFFFF 2MB $1FFFFF 5MB $4FFFFF 9MB $8FFFFF Chapter5 Memory 191 SystemRAMcontainsthe systemheap,a copyof parameterRAM,variousglobalvariables, applicationheaps,the stack,and other informationused by applications.In addition,in the Macintosh SEand classicMacintoshcomputers,the followinghardwaredevicesshare the use of systemRAMwiththe MC68000: • the videodisplay,whichreadsthe information for the displayfromone of two screen buffersin RAM • the soundgenerator,whichreadsits information fromone of two soundbuffersin the classicMacintoshcomputers,or fromone soundbufferin the Macintosh SE • the disk-speedcontroller,whichsharesits data spacewiththe soundbuffers The MacintoshPortablehas RAMbuffersfor soundand videothat are separatefrom systemRAM,and does not providea disk-speedsignal.Therefore,the MC68HC000 in the MacintoshPortabledoes not sharethe use of systemRAMwithany otherdevice. RAM addresses in MC68020-based and MC68030-based models In the Macintosh SE/30and Macintosh II family,the 32-bitaddressspace fromaddress $00000000through$3FFFFFFFis reservedforRAM.As in the MC68000-based Macintosh computers,the amountof addressspaceactuallyused for memorydependson the RAM availablein the system,as shownin Table5-2.Youmustuse a 32-bitoperatingsystemto makeuse of systemmemorybeyond8 MB. Exceptionvectorsare storedby the MC68020 and MC68030 in a 1024-byte-longtable startingat the addressin the VectorBaseregister.The VectorBaseregisteris initialized to $00000000whenthe systemis startedup or reset.The first256bytesof the exception vectortableare reservedfor use by the operatingsystem;the remainderare availablefor use by applications.The first256bytescontaintrap vectors,interruptvectorsfor the 1/0 devices,and the Resetvector. 192 Guideto the MacintoshFamilyHardware • .Table5-2 RAMaddressesin the Macintosh SE/30and Macintosh II-familycomputers Amountof BAM HighestBAMaddress 1MB $000FFFFF 2MB $001FFFFF 4MB $003FFFFF 5MB $004FFFFF 8MB $007FFFFF 16MB $00FFFFFF 32MB $01FFFFFF 64MB $03FFFFFF 128MB $07FFFFFF SystemRAMin the Macintosh SE/30and Macintosh II-familycomputerscontainsthe systemheap,a copyof parameterRAM,variousglobalvariablesand trap handlers, applicationheaps,the stack,and other informationused by applications.The video displayand soundgeneratorin the Macintosh SE/30and Macintosh II familyhavetheir own dedicatedmemorybuffersand do not use systemRAM.In the Macintosh IIci,the built-invideogeneratorusessystemRAMfor its screenbuffer. • Note:Thesecondscreenbufferand secondsoundbufferare not availablein all versionsof the Macintosh. ~ Developertip To ensurethatyoursoftwarewillrun on allMacintosh computers- thosewithdifferentmemoryconfigurations,as wellas future models-use the addressestoredin the globalvariableslistedin InsideMacintosh.~ Thecontentsof RAMand ROMare repeatedthroughoutunusedaddressspaceassignedto memory,as describedin the section"AddressMaps"in Chapter3. Chapter5 Memory 193 RAMaccesscycles In the Macintosh SEand classicMacintoshcomputers,the mainprocessor'sRAM-access cyclesare interleavedwiththe videodisplay'saccesscycles.Thevideodisplayaccess cyclesoccuronlyduringthe activeportionof a screenscanline.Thevideologicscansthe videoscreenbufferin RAM60timeseachsecondand sendsthe datato the screen.This processbothrefreshesthe dynamicRAMand refreshesthe imageon the videoscreen. In the MacintoshPortable,Macintosh SE/30,and Macintosh II family,the main processor'sRAMaccesscyclesare not interleavedwiththe videodisplay'saccesscycles. Thevideocircuitryhas separatememorythat is usedexclusively by the videodisplay. Memorydedicatedto soundgenerationin the MacintoshPortable,Macintosh SE/30,and Macintosh II familyis locatedon the AppleSoundChipin the formof FIFO (first-in-first-out) memories. • TableS-3 RAMaccessratesin the Macintoshfamilycomputers Macintoshmodel CPUclockfrequency AverageRAMaccessrate MacintoshPlus 7.83MHz 2.56MB/sec. MacintoshSE 7.83MHz 3.2~MB/sec. MacintoshSE/30 15.67MHz 15.67MB/sec. MacintoshPortable 15.67MHz 6.27MB/sec MacintoshII 15.67MHz 12.53MB/sec. MacintoshIlx 15.67MHz 15.67MB/sec. MacintoshHex 15.67MHz 15.67MB/sec. MacintoshIlci 25MHz 36.36MB/sec.maximum• MacintoshIlfx 40MHz 60.69MB/sec. 'Maximumrateon a MacintoshIlciwithno cachecard,usinga_NuBus videocard.Fordetails,see the section"RAMAccessRatein the MacintoshIlci Computer." RAMaccessratein the MacintoshPluscomputer In the MacintoshPlusand otherclassicMacintosh computers,one out of everytwo RAM accesscyclesis devotedto videodataduringa scanline.ThelastRAMaccessbeforethe beginningof a scanlineis usedforsoundand disk-speedcontroldata.TheMacintoshPlus has an averageRAMaccessrateforthe mainprocessorof about2.56MBper second. 194 Guideto the MacintoshFamilyHardware RAMaccessratein the MacintoshSEcomputer In the Macintosh SE,one longwordvideoaccessis madeforeachfourRAMaccesscycles duringa scanline.ThelastRAMaccessbeforethe beginningof a scanlineis usedforsound and disk-speedcontroldata.TheMacintosh SEhas an averageRAMaccessrate for the mainprocessorof about3.22MBper second. RAMaccessratein the MacintoshPortablecomputer Becausethe MacintoshPortableuses a fastersystemclockthan the Macintosh SE,does not haveto shareprocessorRAMaccesscycleswithvideoor soundcircuitry,and doesnot haveto refreshmemory,it has a fasterRAMaccessratethanthe Macintosh SE.The MacintoshPortablehas an averageRAMaccessrate of 6.27MBper second. RAMaccess ratein the MacintoshSE/30,MacintoshII, MacintoshIlx, and MacintoshIla computers As in the MacintoshPortable,the mainprocessorin the Macintosh SE/30,Macintosh II, MacintoshIlx, and Macintosh Hexcomputersdoes not shareRAMaccesseswithvideoor soundcircuitry.Exceptfor memoryrefresh,whichtakesone accesscycleevery15.6µs, the mainprocessorsin thosecomputershaveuninterruptedaccessto RAM.The MacintoshII has an averageRAMaccessrateof 12.53MBper second;the MacintoshSE/30,Macintosh Ilx, and Macintosh Hexhavean averageRAMaccessrate of 15.67MBper second. RAMaccessratein the Macintoshllci computer In the Macintosh Ilci,the use of burstmodeand fastpagemodegivesthe processora maximumRAMaccessrateof 36.36MBper second.Thataccessrate is alwaystrue for bankB;forbankA,it is achievedonlywhenusinga NuBusvideocardand not usingthe built-invideo circuits. Thebuilt-invideocircuitsuse a screenbufferin RAMbankA.Theeffectof the videoRAM cyclescan decreasethe processor'saccessto bankA by as littleas 6%or as muchas 65%, dependingon the typeof videodisplayin use:largerdisplaysand displaymodeswith morebits per pixelhavea greatereffect.Pleasereferto the section"Built-inVideo Display"in Chapter12 for infqrmationaboutthe effectof differentdisplaytypesand monitorsizeson CPUaccessto bankA. Chapter5 Memory 195 TheaverageRAMaccessrate actuallyachieveddependsnot onlyon the typeof displayin use but alsoon the amountof RAMin bankB. Rememberthat the processoralwayshas immediateaccessto bankB, whichis unaffectedby the built-invideocircuits.If mostof the system'sRAMis installedin bankB, then the majorityof CPUaccessesare in that bank and at the maximumrate,36.36MBper second.Thatis the reasonfor installingthe larger RAMdevicesin bankB. • Note:In a Macintosh Ilciwitha cachecardinstalled,the maximumRAMaccessrate is 50 MBper secondand is largelyunaffectedby the built-invideocircuits. RAMaccessratein the MacintoshIlfx computer In the Macintosh Ilfx,the high-speedcacheRAMgivesthe processora maximumRAM accessrate of 64.00MBper second.Anytimethereis a cachehit-which occursfor over 90%of processorread operations-the effectiverate is equalto the maximumrate.The additionaltimerequiredfor handlingthe occasionalcachemissbringsthe overallaverage rate downto 60.95MBper second.Formoreinformationaboutthe operationof RAMin the Macintosh Ilfx,pleasereferto the section"RAM Cachein the MacintoshIlfx Computer,"later in this chapter. RAMconfigurationin the Macintosh128K,512K,and 512Kenhancedcomputers RAMin the earlyMacintoshcomputersis providedin dynamicRAM(DRAM) !Cs,whichare arrangedin two rowsof 8 in the Macintosh128Kcomputer,Macintosh512Kcomputer, and Macintosh512Kenhancedcomputer.TheMacintosh128KRAMconsistsof 16 individual64KbitDRAMs, and the Macintosh512Kand 512Kenhanceduse 16individual 256KbitDRAMs. The DRAM !Csare mountedon the mainlogicboardof the computer. Whenthe MC68000 writesdatato RAM,it puts an addressin the range$000000to $07FFFFon the addressbus.ThePALsin the Macintosh128K,512K,and 512Kenhanced computersdecodean addressin thisrangeas a requestto addressRAMand enablethe data-busbuffers.The mainprocessorplacesthe data on the databus. The addressis furtherdecodedby the RAMaddressMUXs,whichdividethe addressinto two 9-bitparts: the row addressand the columnaddress.Firstthe rowaddressis fed intothe RAMsby the RowAddressStrobesignal(RAS)generatedby the PALs.Thenthe columnaddressis fed intothe appropriateRAMby a columnaddressstrobesignalgeneratedby a PAL.Thereare two columnaddressstrobes:CASland CAS2-onefor eachrowof eightRAM!Cs.In this way,up to 512KBof RAMcanbe addressedthroughthe nineRAMaddresslines. 196 Guideto the MacintoshFamilyHardware Eachtimeyou tum on the Macintosh128K,512K,or 512Kenhanced,systemsoftwaredoes a memorytest,then determineshowmuchRAMis installedin the machine.Software storesthis informationin the globalvariableMemTop,whichcontainsthe address(plus1) of the lastbytein RAM. RAMconfigurationin the MacintoshPlus and MacintoshSEcomputers TheRAMin the Macintosh Plusand Macintosh SEis providedin eithertwo or four packagesknownas SingleIn-lineMemoryModules(SIMMs). A SIMMconsistsof a smallprintedcircuitboardthat containsseveralsurface-mounted DRAM ICs.Alongone edge of the SIMMare,electricalfingercontacts,whichplug into the SIMMsocketsthat are mountedon the mainlogicboard. A Warning Becausethe videomonitoris builtin, thereare dangerousvoltages insidethe casesof the MacintoshPlusand Macintosh SEcomputers. Thevideotube and videocircuitrymayholddangerouschargeslong afterthe computer'spoweris turnedoff.Openingthe caseof the MacintoshPlusand Macintosh SEcomputersrequiresspecialtoolsand mayinvalidateyourwarranty.Installationof RAMSIMMs in these computershouldbe doneby qualifiedservicepersonnelonly. _... EachSIMMin the MacintoshPlusor Macintosh SEcontainseightDRAM ICs.EachSIMM has ten addresspinsand eightdatapins,and eachdatapin is connectedto one of the eightDRAMs. TheSIMMs are arrangedin pairs;eachpairis referredto as a row.Two SIMMs combinedin a rowprovidea 16-bit-wide paralleldatabus that is used by the MC68000. Row1 comprisesSIMM 1 and SIMM 2, whereasrow 2 comprisesSIMMs 3 and 4. • Note:Otherconfigurations of SIMMs canbe used,suchas two DRAM ICswithfour datapinseach.Nine-bitSIMMs can alsobe used in thesemachines;the ninthbit is simplyignored. Chapter5 Memory 1'17 Whenthe MC68000 writesdatato RAM,it putsan addressin the range$000000to $3FFFFFon the addressbus.Thegeneralogiccircuitsin the Macintosh Plusand Macintosh SEdecodethisaddressas a requestto addressRAMand enablethe data-bus buffers.Themainprocessorplacesthe dataon the databus.Theaddressis further decodedby the RAMaddressMUXs, whichdividethe addressintotwo 10-bitparts:the rowaddressand the columnaddress.Firstthe rowaddressis fed intothe RAMsby the Row AddressStrobesignal(RAS)generatedby the generalogiccircuits.Thenthe column addressis fed intothe appropriateRAMby a columnaddressstrobesignalgeneratedby the logiccircuits.Thereare fourcolumnaddressstrobes:CASl,CAS2,CAS3,and CAS4- one foreachSIMM. In thisway,4 MBof RAMcanbe addressedthroughthe ten RAM addresslines. SeveralRAMconfigurations are possible,dependingon whethertwoor fourSIMMs are used,and on the sizeof the RAMICsmountedon the SIMMs. Thesizeof a DRAMICis sometimesreferredto as its density. In the MacintoshPlusand earlierMacintosh SEcomputers,thereare two resistorson the mainlogicboard(in the arealabeledRAMSIZE)thattellthe generalogiccircuitsthe numberof SIMMs and sizeof the RAMICsinstalled.In laterMacintoshSEcomputers, thereis a jumperon the mainlogicboardthatcan be installedin eitherof two positions Oabeled2/4Mand lM) that providethis information to the generallogiccircuits. Youmustfollowtheseguidelineswheninstalling RAMS~MMs in the Macintosh Plusand MacintoshSE: • TheRAMICsin eachSIMM musthave150ns RASaccesstimeor faster. • Allthe RAMICsin a rowmusthavethe sameaccesstime. • EachSIMM mustbe filledwitheightRAMICs.(Anine-RAM SIMM willworkin the MacintoshPlusor Macintosh SE,but the ninthRAMIC is not connectedelectrically to the mainlogicboard.) , • Allthe RAM ICsin a rowmustbe the samesize. • A rowcannotcontainonlyone SIMM. A rowmusteitherbe emptyor containtwoSIMMs. • In the Macintosh Plusand anyMacintosh SEthathas RAM sizeresistors,if the SIMMs in one rowcontainlargerRAMICsthanthe SIMMs in the otherrow,thenthe SIMMs with the largerRAMICsmustbe installedin row1. In the Macintosh SEthathasa RAMsize jumper,the SIMMs withlargerRAMICsmustbe installedin row2. 198 Guideto the MacintoshFamilyHardware Theresistorsin Macintosh Plusand earlierMacintosh SEcomputersmustbe arrangedin the followingmanner: • If onlytwo SIMMs are installed,the resistorlabeledONEROW(resistorR9in the MacintoshPlusor R36in the Macintosh SE)mustbe installed. • If fourSIMMs are installed,the resistorlabeledONEROWmustbe removed. • If all of the SIMMs contain256KbitDRAMs, the resistorlabeled256KBIT(resistorRB in the MacintoshPlusor R35in the Macintosh SE)mustbe installed. • If eithertwo or fourof the SIMMs contain1 MbitDRAMs, the resistorlabeled256KBIT mustbe removed. Thejumperin laterMacintosh SEcomputersmustbe installedin the followingmanner: • If onlytwo SIMMs are installed,the jumpermustbe installedon the positionlabeled2/4M. • If fourSIMMs containing256KbitDRAMs are installed,the jumpermustbe installedon the positionlabeledlM. • If fourSIMMs are installedand eithertwo or fourof themcontain1 MbitDRAMs, the jumpermustbe left off. TheRAMSIMM socketpinoutis shownin Figure5-1.TheRAMSIMM socketsignal assignments for the Macintosh Plusand MacintoshSEare shownin Table5-4. • FigureS-1 Pinoutof the RAMSIMMsocketin the MacintoshPlusand MacintoshSE computers Chapter5 Memory 199 • Table;-4 Signalassignmentsfor the RAMSIMMsocketin the MacintoshPlusand MacintoshSE computers Pia.number Sigoalname Signaldescription 1 +5V +5 volts 2 /CASI ColumnAddressStrobefor SIMMl;or /CAS2 ColumnAddressStrobefor SIMM2; or /CAS3 ColumnAddressStrobefor SIMM3; or /CAS4 ColumnAddressStrobefor SIMM4 3 RDQO RAMdatabus, bit 0, SIMM1 and SIMM3; or RDQ8 RAMdata bus, bit 8, SIMM2 and SIMM4 4 RAO RAMaddressbus, bit 0 5 RAl RAMaddressbus, bit 1 6 RDQl RAMdata bus, bit 1, SIMM1 and SIMM3; or RDQ9 RAMdata bus, bit 9, SIMM2 and SIMM4 7 RA2 RAMaddressbus, bit 2 8 RA3 RAMaddressbus, bit 3 9 GND Ground 10 RDQ2 RAMdata bus, bit 2, SIMM1 and SIMM3; or RDQlO RAMdata bus, bit 10,SIMM2 and SIMM4 11 RA4 RAMaddressbus, bit 4 12 RAS RAMaddressbus, bit 5 13 RDQ3 RAMdatabus, bit 3, SIMM1 and SIMM3; or RDQll RAMdata bus, bit 11,SIMM2 and SIMM4 14 RA6 RAMaddressbus, bit 6 15 RA7 RAMaddressbus, bit 7 16 RDQ4 RAMdatabus, bit 4, SIMM1 and SIMM3; or RDQ12 RAMdata bus, bit 12,SI~ 2 and SIMM4 17 RAB RAMaddressbus, bit 8 18 RA9 RAMaddressbus, bit 9 19 n.c. Not connected 20 RDQ5 RAMdata bus, bit 5, SIMM1 and SIMM3; or RDQ13 RAMdata bus, bit 13,SIMM2 and SIMM4 21 READ RAMread 22 GND Ground (continued) 200 Guideto the MacintoshFamilyHardware • Table5-4 Signalassignmentsfor the RAMSIMMsocketin the MacintoshPlusand MacintoshSEcomputers(continued) Plnoumber Sigoalname Signaldescription 23 RDQ6 RAMdatabus, bit 6, SIMM1 and SIMM 3; or RDQ14 RAMdatabus, bit 14,SIMM2 and SIMM4 24 n.c. Not connected 25 RDQ7 RAMdatabus, bit 7, SIMM1 and SIMM 3; or RDQ15 RAMdatabus, bit 15,SIMM2 and SIMM4 26 n.c. Not connected 27 /RAS RowAddressStrobe 28 n.C'. Not connected 29 n.c. Not connected 30 +5V +5 volts The variouscombinations of SIMMs that can be installedin the MacintoshPluscomputer areshownin Figure5-2. TwodifferentSIMMconfigurations havebeen used in Macintosh SEcomputers.Earlier Macintosh SEcomputershavethe SIMMconfigurations shownin Figure5-3;later Macintosh SEcomputershavethe SIMM configurationsshownin Figure5-4. Eachtimeyou switchon the MacintoshPlusor Macintosh SE,systemsoftwaredoes a memorytest and detemineshow muchRAMis installedin the machine.Softwarestores this informationin the globalvariableMemTop,whichcontainsthe address(plusone) of the lastbytein RAM.Becausethe rangeof addressesin eachSIMM row dependson the sizeof the DRAMs in the SIMM,the generallogiccircuitsuse the SIMM resistorsor jumper to determinewhichrow to accessfor eachaddressrange. Chapter5 Memory 201 Figure5-2 SIMMconfigurationsin the MacintoshPlus computer Systemmemorysize: 1 MB SIMMconfiguration DOOO~ :~~ Row1 (SIMMs1 & 2): 256KB Row2 (SIMMs 3 & 4): 256KB RAMSIZEresistors oooo~~ · 256KBIT(RS): 150ohms ONEROW(R9): Notinstalled Systemmemorysize: 2MB SIMMconfiguration Row1 (SIMMs1 & 2): 1MB Row2 (SIMMs3& 4): Notinstalled RAMSIZEresistors 256KBIT(RS): Notinstalled ONEROW(R9): 150ohms Systemmemorysize: 2.5MB SIMMconfiguration Row1 (SIMMs1 & 2): 1MB Row2 (SIMMs 3 & 4): 256KB RAMSIZEresistors 256KBIT(RS): Notinstalled ONEROW(R9): Notinstalled Systemmemorysize: 4MB •• SIMMconfiguration m:• J]ODO~ 3 mr:,;:t Row1 (SIMMs1 & 2): Row2 (SIMMs RAMSIZEresistors 256KBIT(RS): ONEROW(R9): 3 & 4): 1MB 1MB Notinstalled Notinstalled 4 Guideto the MacintoshFamilyHardware • Figure5-3 SIMMconfigurations in earlierMacintosh SEcomputers Systemmemorysize: 1MB SIMM configuration Row1 (SIMMs 1 & 2): 256KB Row2 (SIMMs 3 & 4): 256KB RAMSIZEresistors 256KBIT(R35): 150ohms ONEROW(R36): Notinstalled Systemmemorysize: 2MB SIMM configuration Row1 (SIMMs 1 & 2): 1MB Row2 (SIMMs 3 & 4): Notinstalled RAMSIZEresistors 256KBIT(R35): Notinstalled ONEROW(R36): 150ohms Systemmemorysize: 2.5MB SIMM configuration Row1 (SIMMs 1& 2): 1MB Row2 (SIMMs 3 & 4): 256KB RAMSIZEresistors 256KBIT(R35): Notinstalled ONEROW(R36): Notinstalled Systemmemorysize: 4 MB SIMM configuration Row1 (SIMMs 1 & 2): 1 MB Row2 (SIMMs 3 & 4): 1 MB RAMSIZEresistors 256KBIT(R35): Notinstalled ONEROW(R36): Notinstalled Chapter5 Memory 203 • Figure5-4 SIMMconfigurations in laterMacintoshSEcomputers System memorysize: 1MB SIMMconfiguration Row1 (SIMMs1 & 2): 256 KB Row2 (SIMMs3 & 4): 256 KB Jumperon lM System memorysize: 2 MB 68000 00 SIMMconfiguration Row1 (SIMMs1 & 2): NotInstalled Row2 (SIMMs3 & 4): 1 MB SIMM! Jumperon 2/4M Systemmemorysize: 2.5MB SIMMconfiguration Row1 (SIMMs1 & 2): 256 KB Row2 (SIMMs3 & 4): 1MB Jumperoff System memorysize: 4 MB SIMMconfiguration Row1 (SIMMs1& 2): 1 MB Row2 (SIMMs3 & 4): 1 MB Jumperoff 204 Guideto the MacintoshFamilyHardware RAMconfigurationin the MacintoshPortablecomputer RAMin the MacintoshPortablecomputeris providedin staticRAM(SRAM) ICs,which do not haveto be periodically refreshedand thereforeconsumelesspowerthan dynamic RAMICs.TheMacintosh Portablehas 1 MBof SRAM on the logicboardand has an internal connectorfor a memoryexpansioncard. • Note:TheMacintoshPortablehardwareand addressmapprovidefor up to 8 MBof expansionRAM,for a totalof 9 MBof systemRAM. Eachtimeyou tum on the MacintoshPortable(thatis, whenthe batteryis rechargedafter beingcompletelydischarged,or a new batteryis installed),systemsoftwaredoes a memorytest,then determineshowmuchRAMis installedin the machine.Softwarestores this informationin the globalvariableMemTop,whichcontainsthe address(plusone) of the lastbytein RAM. In additionto the systemRAM,the MacintoshPortablecontains32KBof RAMfor use by the videocircuitsthat is separatefromsystemRAM. PermanentRAM The permanentmemoryof the MacintoshPortableconsistsof thirty-two256Kbitstatic RAM(SRAM) ICsmountedon the mainlogicboardof the computer.TheseSRAM ICshave a 100ns accesstime. Whenthe MC68HCOOO writesdatato permanentsystemRAM,it puts an addressin the range$000000to $OFFFFFon the addressbus.TheCPUGLUdecodesthisaddressas a requestto addressRAM,and assertsone of a pair of RAMRead/Writesignalsto selectthe upperhalfor lowerhalfof permanentRAM. Theaddressis furtherdecodedby the MiscellaneousGLU,whichusesone of 16chip-selectsignalsto enablea pairof RAMICs. TheRAMICsin permanentRAMare arrangedin pairsthatare connectedin parallel,usinga 15-bit-wideRAMaddressbus (16bits includingthe chip-selectsignal).In thisway,1 MB of RAMcanbe addressedthrough15RAMaddresslines. An accessto permanentRAMin the Macintosh Portablerequiresone MC68HCOOO processorwaitstate.Becauseall the RAMused in the MacintoshPortableis staticRAM, no refreshcyclesare necessary.AllpermanentRAMis poweredby the batterywhenthe MacintoshPortableis in the sleep state. Chapter5 Memory 205 InternalexpansionRAM Theinternalmemoryexpansioncardplugsintoa 50-pinconnectorthatprovidesfor 23 addresslines,16datalines,pluscontrolsignalsand power.Whenthe MC68HC000 writes datato the internalmemoryexpansioncard,it puts an addressin the range$100000to $BFFFFFon the addressbus.TheCPUGLUcustomICdecodesthisaddressas a requestto addressexpansionRAM.Logicon the RAMexpansioncardfurtherdecodesthe address and enablesthe appropriateRAMICs.Becausethe Macintosh Portablehardwarecan addressa maximumof 8 MBof expansionRAM, the 23addresslinesare allthatis needed to addressall the RAMon the RAMexpansioncard. Thememoryon a 1 MBRAMexpansioncardconsistsof eitherthirty-two256Kbitstatic RAMICsor eight1 MbitstaticRAMICs.Thememoryon a 4 MBRAMexpansioncard consistsof thirty-two1 MbitstaticRAMICsor eight4 MbitstaticRAMICs.AllSRAM ICs on RAMexpansioncardsmusthavean accesstimeof 100ns or fas~er. Figure5-5showsthe internalRAMconnectorpinout.Thesignalassignments forthis connectorareshownin Table5-5. 206 Guideto the MacintoshFamilyHardware • Figure5-5 Pinoutof the RAMexpansionconnectorin the MacintoshPortablecomputer ®@ @@ ®@ @® ®® @® @® @® @@ @® ®@ @® @@ ®@ @® ®® @@ @@ @@ @@ @) ® ® (j) © 0) ©® 00 Chapter5 Memory '1IJ7 • TableS-S Signalassignmentsfor the RAMexpansionconnectorin the MacintoshPortablecomputer Plooumber Sfgoalname Sigoaldescription 1 +SV +5volts 2 Al AddresslineAl 3 A2 AddresslineA2 4 A3 AddresslineA3 5 A4 AddresslineA4 6 AS AddresslineAS 7 A6 AddresslineA6 8 A7 AddresslineA7 9 AB AddresslineAB 10 A9 AddresslineA9 11 AlO AddresslineAlO 12 All AddresslineAl1 13 A12 AddresslineA12 14 Al3 AddresslineA13 15 A14 AddresslineAl4 16 AlS AddresslineAlS 17 A16 AddresslineA16 18 A17 AddresslineAl7 19 A18 AddresslineAl8 20 A19 AddresslineA19 21 A20 AddresslineA20 22 A21 AddresslineA21 23 A22 AddresslineA22 24 A23 AddresslineA23 25 GND Ground 26 GND Ground 27 /SYS.PWR Indicateswhethersystemis in sleep state 28 /AS Addressstrobe fromMC68HCOOO 29 R/W Read/Writeline fromMC68HCOOO 30 IUDS Upperdata strobe fromMC68HCOOO 31 /LDS Lowerdata strobe fromMC68HCOOO 32 /DELAY.CS Chip-select signalfromCPUGLU 33 DO DatalineDO 34 Dl DatalineDl (continued) 208 Guideto the MacintoshFamilyHardware • TableS-5 Signalassignments forthe RAMexpansionconnectorin the MacintoshPortablecomputer(continued) Plnnumber Signalname Signaldescription 35 D2 DatalineD2 36 D3 DatalineD3 37 D4 DatalineD4 38 D5 DatalineD5 39 D6 DatalineD6 40 D7 DatalineD7 41 D8 DatalineD8 42 D9 DatalineD9 43 Dto DatalineDlO 44 Dll DatalineD11 45 D12 DatalineD12 46 D13 DatalineD13 47 D14 DatalineD14 48 D15 DatalineD15 49 +5V +5 volts 50 +5V +5 volts As for permanentRAM, an accessto RAMon a Macintosh Portableinternalmemory expansioncardrequiresone MC68HC000 processorwaitstate.Becauseall the RAMused Portableis staticRAM,no refreshcyclesare necessary.Allpermanentand in the Macintosh internalexpansionRAMis poweredby the batterywhenthe Macintosh Portableis in the sleep state. RAMconfigurationin the MacintoshSE/30and MacintoshIl-familycomputers TheRAMin the MacintoshSE/30and in the Macintosh II familyis providedin fouror eight SIMMs. Allthosemachinesuse the same30-pinSIMMexceptthe Macintosh Ilfx,whichhas a differentSIMMwith64pins. .A Warning Becausethe videomonitoris builtin, thereare dangerousvoltages insidethe caseof the Macintosh SE/30computer.The videotube and videocircuitrymayholddangerouschargeslongafterthe computer's poweris turnedoff.Openingthe caseof the Macintosh SE/30requires specialtoolsand mayinvalidateyourwarranty.Installationof RAMin the SIMM socketsin this computershouldbe done by qualified servicepersonnelonly. .._ Chapter5 Memory 20'J EachSIMM in thesecomputerscontainseightDRAM ICs.EachSIMM has 12addresspins and 8 datapins,and eachdatapin is connectedto one of the eightDRAMs. TheSIMMs arearrangedin groupsof four;eachgroupis referredto as a bank.FourSIMMs combined in a bankprovidea 32-bit-wideparalleldatabus that is usedby the MC68020 or MC68030. • Note:Otherconfigurations of SIMMs can be used,suchas two DRAM ICswithfour data pins each. In a MacintoshIlci or Macintosh Ilfxequippedwiththe optionalparityfeature,each RAMSIMM containsnine bits.The ninthbit providesstoragefor the paritybits.Seethe sections"ParityRAMin the Macintosh Ilci Computer"and "ParityRAMin the MacintoshIlfx Computer"later in this chapter. Whenthe mainprocessorwritesdatato RAMin 24-bitmode,it puts an addressin the range$:xxO00000to $xx7FFFFFon the addressbus.Thememorymanagement unitstrips offthe highbyteand translatesthe addressto one in the range$00000000through $3FFFFFF.TheGLUEdecodesthisaddressas a requestto addressRAM,and the main processorplacesthe dataon the databus.TheRAMaddressMUXsdividethe addressinto two 12-bitparts:the rowaddressand the columnaddress.Firstthe row addressis fed into the appropriatebankof RAMsby one of two RowAddressStrobe(RAS)signalsgenerated by the GLUE.Thenthe columnaddressis fed intothe appropriateSIMM by one of four ColumnAddressStrobe(CAS)signalsgeneratedby the GLUE. In thisway,up to 128MBof RAMcan be addressedthroughthe 12RAMaddresslines. SeveralRAMconfigurationsare possible,dependingon whetherone or two banksof SIMMsare used,and on the sizeof the RAMICsmountedon the SIMMs. 210 Guideto the MacintoshFamilyHardware Youmustfollowtheseguidelineswhen installingRAMSIMMs in the MacintoshSE/30or MacintoshII-familycomputers: • TheRAMICsin eachSIMMmusthave 120ns RASaccesstimeor faster(80ns or fasterin the MacintoshIlci and the MacintoshIlfx). • Allthe RAMICsin a bank musthavethe sameaccesstime. • EachSIMM mustbe filledwitheightRAMICs.A nine-RAM SIMM willworkin any MacintoshII-familycomputer,but the ninth RAMIC is not connectedelectricallyto the mainlogicboard exceptin the MacintoshIIci and the MacintoshIlfx.Those machineshave an optionalparityfeaturethat uses the ninthRAMIC for the paritybit. • Allthe RAMICsin a bank mustbe the samesize. • The smallestSIMMthat can be used in an MacintoshIIfxis 1 MB. • • A bank musteitherbe emptyor containfour SIMMs; a bank cannotcontainone, two, or three SIMMs. • If the SIMMs in one bank containlargerRAMICsthan do the SIMMsin the otherbank, the SIMMs withthe largerRAMICsmustbe installedin bankA,exceptin the MacintoshIIci.In the MacintoshIIci,you may installthe largerSIMMsin eitherbank; you obtainbetterperformancewhen usingthe built-invideodisplaycircuitryby installingthe largerRAMICsin bankB. Formoreinformation,pleasereferto the section"VideoRAMin the MacintoshIIciComputer"in this chapterand "Video Circuitsin the MacintoshIlci Computer"in Chapter12. Exceptin the MacintoshIIfx,the RAMSIMMsocket in the MacintoshII-family computersis identicalto the one used in the MacintoshPlusand MacintoshSEand shown in Figure5-1.The RAMSIMMsocketsignalassignmentsfor the MacintoshSE/30and MacintoshII familyare shownin Table5-6.The MacintoshIIfxuses a differentSIMM socketwith 64 pins;see Table5-7for the signalassignments. Chapter5 Memory 211 • TableS-6 Signalassignmentsfor RAMSIMMsocketsin the MacintoshSE/30and MacintoshII-familycomputers(except the MacintoshIlfx) Plnnumber Signalname Signaldescription 1 +5V +5 volts 2 /CASLL ColumnAddressStrobefor data bits D7-0;or /CASLM ColumnAddressStrobefor data bits D15-8;or /CASUM ColumnAddressStrobefor data bits D23--16; or /CASUU ColumnAddressStrobefor data bits D31-24 3 DO Databus, bit O;or DB Databus, bit 8; or D16 Databus, bit 16;or D24 Databus, bit 24 4 RAAFO RAMaddressbus,bankA bit O;or RABFO RAMaddressbus, bankB bit O; 5 RAAFl RAMaddressbus, bankA bit 1; or RABFl RAMaddressbus, bankB bit 1 6 Dl Databus, bit 1; or D9 Databus, bit 9; or D17 Databus, bit 17;or D25 Databus, bit 25 7 RAAF2 RAMaddressbus, bankA bit 2; or RABF2 RAMaddressbus, bankB bit 2 8 RAAF3 RAMaddressbus, bankA bit 3; or RABF3 RAMaddressbus, bankB bit 3 9 GND Ground 10 D2 Databus, bit 2; or DlO Databus, bit 10;o( D18 Databus, bit 18;or D26 Databus, bit 26 11 RAAF4 RAMaddressbus, bankA bit 4; or RABF4 RAMaddressbus, bank;Bbit 4 12 RAAF5 RAMaddressbus, bankA bit 5; or RABF5 RAMaddressbus, bankB bit 5 13 D3 Databus, bit 3; or Dll Databus, bit 11;or D19 Databus, bit 19;or D27 Databus, bit 27 (continued) 212 Guideto the MacintoshFamilyHardware • Table5-6 Signalassignmentsfor RAMSIMMsocketsin the MacintoshSE/30and MacintoshII-familycomputers(except the MacintoshIlfx)(continued) Pinnumber Signalname Signaldescrlpdon 14 RAAF6 RAMaddressbus, bankA bit 6; or RABF6 RAMaddressbus, bankB bit 6 15 RAAF7 RAMaddressbus, bankA bit 7; or RABF7 RAMaddressbus, bankB bit 7 16 D4 Databus, bit 4; or D12 Databus, bit 12;or D20 Databus, bit 20;or D28 Databus, bit 28 17 RAAF8 RAMaddressbus, bankA bit 8; or RABF8 RAMaddressbus, bankB bit 8 18 RAAF9 RAMaddressbus, bankA bit 9; or RABF9 RAMaddressbus, bankB bit 9 19 RAAFlO RAMaddressbus, bankA bit 10; or RABFlO RAMaddressbus, bankB bit 10 20 D5 Databus, bit 5; or D13 Databus, bit 13;or D21 Databus, bit 21;or D29 Databus, bit 29 21 RAMRWA RAMRead/Write,bankA; or RAMRWB RAMRead/Write,bankB 22 GND Ground 23 D6 Databus, bit 6; or D14 Databus, bit 14;or D22 Databus, bit 22;or D30 Databus, bit 30 24 RAAFll RAMaddressbus, bankA bit 11;or RABFll RAMaddressbus, bankB bit 11 25 D7 Databus, bit 7; or D15 Databus, bit 15;or D23 Databus, bit 23;or D31 Databus, bit 31 26 n.c. Not connected 27 /RASA RowAddressStrobe,bankA; or /RASB RowAddressStrobe,bankB 28 PU Pullup 29 n.c. Not connected 30 +5V +5 volts Chapter5 Memory 213 • TableS-7 Signalassignmentsfor RAMSIMMsocketsin the MacintoshIlfxcomputer Plnllllllm' Signalname Sigoaldescription 1 GND Ground 2 n.c. Not connected 3 +SV +5 volts 4 +SV +5 volts 5 /CAS Columnaddressstrobe 6 DO Datainputbus, bit 0 7 QO Dataoutputbus, bit 0 8 /WO Write-enableinputfor RAMIC0 9 AO Addressbus, bit 0 10 n.c. Not connected 11 Al Addressbus, bit 1 12 Dl Datainputbus, bit 1 13 Ql Dataoutputbus, bit 1 14 /Wl Write-enableinputfor RAMIC 1 15 A2 Addressbus, bit 2 16 n.c. Not connected 17 A3 Addressbus, bit 3 18 GND Ground 19 GND Ground 20 D2 Datainputbus, bit 2 21 Q2 Dataoutputbus, bit 2 22 /W2 Write-enableinputfor RAMIC2 23 A4 Addressbus, bit 4 24 n.c. Not connected 25 AS Addressbus, bit 5 . 26 D3 Datainputbus, bit 3 27 Q3 Dataoutputbus, bit 3 28 /W3 Write-enableinputfor RAMIC3 29 A6 Addressbus, bit 6 30 n.c. Not connected 31 A7 Addressbus, bit 7 32 D4 Datainputbus, bit 4 (continued) 214 Guideto the MacintoshFamilyHardware • Table5-7 Signalassignmentsfor RAMSIMMsocketsin the MacintoshIlfx computer(continued) Pinnumber Signalname Signaldescription 33 Q4 Dataoutputbus, bit 4 34 /W4 Write-enableinputfor RAMIC4 35 AB Addressbus, bit 8 36 n.c. Not connected 37 A9 Addressbus, bit 9 38 Al0 Addressbus, bit 10 39 All Addressbus, bit 11 40 D5 Datainputbus, bit 5 41 Q5 Dataoutputbus, bit 5 42 /W5 Write-enableinputfor RAMIC5 43 n.c. Not connected 44 n.c. Not connected 45 GND Ground 46 D6 Datainputbus, bit 6 47 Q6 Dataoutputbus, bit 6 48 /W6 Write-enableinputfor RAMIC6 49 n.c. Not connected 50 D7 Datainputbus, bit 7 51 Q7 Dataoutputbus, bit 7 52 /W7 Write-enableinputfor RAMIC7 53 /QB Reserved(parity) 54 n.c. Not connected 55 IRAS Rowaddressstrobe 56 n.c. Not connected 57 n.c. Not connected 58 Q Parity-checkoutput 59 /WWP Writewrongparity 60 PDCI Paritydaisy-chaininput 61 +5V +5 volts 62 +5V +5 volts 63 PDCO Paritydaisy-chainoytput 64 GND Ground Chapter5 Memory 215 The locationsof the RAMSIMMs on the mainlogicboardsof the Macintosh SE/30, MacintoshII, MacintoshIIx, MacintoshIIcx, MacintoshIIci, and MacintoshIlfx are · shownin Figures5-6,5-7,5-8,5-9,and 5-10.Thenumberingschemeusedforthe SIMMs in thesecomputersis shownin Figure5-11.Noticethateachpairof SIMMs has a single number.Forexample,bankA comprisesfourSIMMs, labeledSIMM 3 (one pair)and SIMM4 (one pair). The differentcombinationsof SIMMs that can be installedin the Macintosh SE/30and in the Macintosh II-familycomputersare shownin Figure5-11.The restrictionspecifiedin Figure5-11do not applyto the Macintosh Ilfx.On that machine,you mayleaveeither bankemptyand,whenSIMMs largerthan 1 MBbecomeavailable,you mayinstallthemin either bank. The RAMSIMMs used in all membersof the MacintoshII familyexceptthe Macintosh Ilfx havethe samepinouts,but the DRAM ICsused in the SIMMs for differentmodelshave differentspeed requirements.The MacintoshSE/30,MacintoshII, MacintoshIIx, and Macintosh IlcxrequireDRAM withRASaccesstimeof 120ns or less;the Macintosh Ilci and the MacintoshIIfxrequirea RASaccesstimeof 80ns or less.In addition,DRAM for the MacintoshIIcimusthave fast page mode. • FigureS-6 RAMSIMMlocationsin the Macintosh SE/30computer -·\ RAMSIMMs Giifi ~ BankA • II MC68882 VideoROM BankB c:::::::r c:::::::r c:::::I c:::::::r ROMSIMM 216 Guideto the MacintoshFamilyHardware • Figure5-7 RAMSIMMlocationsin the MacintoshII and MacintoshIlx computers Powerswitch ll,.Clcc:ici:::::ic::icc:i.jl}-• SIMMAIE B~e 1 D23-Dli B eU 1531-D~ SIMM~ll- Bie3 D7-DO B i D15'.=D8 ~, ~, BankA =='}-Ba - Bvte1 D23-Dlb - ~, SIMM2 - BvteO D31-D24 - RAMSIMMs BankB a MC68030 B~e3 D7-DO SIMMl IE B ei D15=D8 MC68882 1§1::::::::::::1§1 :1§1 1o1------------1o1 §I -lol :1§1 NuBusslots Chapter5 Memoiy 217 • Figure5-8 RAMSIMMlocationsin the MacintoshHex computer ROMSIMM NuBusslots • Mc68882 BankB I II IICII IICII Diskdrives IICII IICII ROMs RAMSIMMs • Figure5-9 RAMSIMMlocationsin the MacintoshIlci computer ROMSIMM NuBusslots • MC68882 BankB I II Diskdrives r,r,r,r, •r,1 •r,1 •r,1 •r,1 :u:LJ::LJ::LJ: L_.J L-.J L_.J L_.J ROMs RAMSIMMs 218 Guideto the MacintoshFamilyHardware • Figure5-10 RAMSIMMlocationsin the MacintoshIlfx computer BankA BankB Powerswitch BankA BankB jAMSIMMs a SIMM 4 SIMM3 SIMM2 SIMM1 a MC68030 MC68882 1§1::::::::::::@ 1§1::::::::::::@ 1§1::::::::::::@ loJ::::::::::::1§1 1§1::::::::::::@ loJ::::::::::::1§1 NuBusslots Chapter5 Memory 219 • Figure5-11 RAMSIMMconfigurationsin the MacintoshSE/30and MacintoshII-family computers BankB BankA • •••IL••• •••IL·•• m_ ••• L. Systemmemorysize:1 MB Systemmemorysize: 2 MB IJ BankA:four256KBSIMMs BankA:four256KBSIMMs BankB:empty BankB:four256KBSIMMs BankB BankA ~B BankA "'2l"'2l '"21"'2l Il_t - ~ _111 IL·•• - .... ,_ '- _lll L- lll _lll L Jjl '- '- L. ._111 .... ,_ ~iii ._ ._ lil~lll IA. LL. -.51 1...:i.-.51 la=!a···w , ···w h ···~ Systemmemorysize:4 MB Systemmemorysize:5 MB BankA:four1 MBSIMMs BankA:four1 MBSIMMs • BankB:empty BankB:four256KBSIMMs • BankB BankA :;~ • Note:Foroptimumperfonnanceon a Macintosh Ilciusingbuilt-in -! video,put the larger-sized L~!~ SIMMs intobankB.BankA fi ._ill needsonly1 MBforvideo. IJ ~Jc ii =-= Systemmemorysize: 8 MB BankA:four1 MBSIMMs Bank8: four1MBSIMMs 220 Guideto the MacintoshFamilyHardware VideoRAMin the MacintoshIlci computer Thescreenbufferfor the built-invideodisplayin the Macintosh Ilci occupiesphysical addressestartingat $00000000(bankA).TheMMUin the MC68030 remapsthe screen bufferintothe logicaladdressspaceallocatedfor NuBusslot $Bso that the operating systemcan treatit the sameas a videoexpansioncard.At startuptime,the operating systemdeterminesthe sizeof the screenbufferdependingon the maximumselectedpixel size(bit depth)and on the type of monitorthat is connectedto the computer.The MMU mapsthe restof bankA to the normalRAMaddressspace. • Note:TheMacintosh Ilcimapsthe portionof bankA used for mainmemory immediatelyabovethe memoryin bankB. Eventhoughthe physicaladdressesof RAM • bankB startat $04000000,the logicaladdressesstartat $00000000,as requiredfor software compatibility. TheRBVrequestsvideodatain burstsand the MDUgeneratesthe videoaddresses, automatically incrementing a pointerto the currentlocationin the screenbuffer.When the displayscanreachesthe end of a screen,the RBVsendsa signalto the MDUcausingit to set its pointerbackto physicaladdress$00000000. • Note:Alladdressesfromthe MDUarephysicaladdresses;logicalmemorymappingis performedby the MC68030'sinternalmemorymanagement unit. RAMin bankA is connecteddirectlyto the RBVand is connectedto the mainprocessor's databus by wayof a bus buffer.Whenthe RBVis readingvideodata,the bus buffer disconnectsbankA fromthe mainprocessor'sdatabus.TheMDUcan generateRAM addressesand controlsignalsfora main-processor accessto bankB and an RBVreadfrom bankA at the sametime,thusenablingthe mainprocessorto readand writeto bankB withno waitingor interruptions. Formoreinformation aboutthe operationof the RBVand the rest of the built-invideo circuitry,pleasereferto the section"VideoCircuitsin the Macintosh Ilci computer"in Chapter12. Chapter5 Memory 221 Parity RAMin the MacintoshIld computer A special-order modelof the Macintosh lid comesequippedwithan ApplecustomIC, the ParityGeneratorand Checker(PGC),that enablesit to use 9-bitRAMSIMMs and operatewith paritychecking. Atstartuptime,the systemsoftwarefirstdetermineswhetherthe systemhas the parityIC installed;it then testsfor the presenceof 9-bitRAMSIMMs and determineswhetherto enableparitychecking.Bit6 in VIAl DataregisterB enablesor disablesparitygeneration and checkingby the PGC.BeforereadingRAMwithparityenabled,the systemsoftware mustset the paritybitsproperlyby writingusingnormalparityto all availableRAM. Eachtimea byteof RAMis read,the PGCgeneratesan internalparitybit and comparesit withthe bit read fromthe RAM'sparitybit for the byte.If the two paritybitsare not the sameand if parityis enabled(bit 6 of VIAlDataregisterB set to O),the PGCassertstwo outputs:/NMI,whichinterruptsthe mainprocessor,and /PARERR, ·whichindicatesa parityerror.The interruptserviceroutinecan tum offthe /PARERR and/NMIsignalsby setting/PARENto 1. Parity RAMin the MacintoshIIfx computer A special-ordermodelof the MacintoshIIfx comesequippedwithan ApplecustomIC, the RAMParityUnit(RPU),and special9-bitRAMSIMMs that enablethe machineto operatewithparitychecking.The paritySIMMS includecircuitsthat generatethe parity bit and detecta hardwaredaisy-chain that enablesthe RPUto recordwhetherparity SIMMs are installed. At startuptime,the systemsoftwarefirstdetermineswhetherthe systemhas the parityIC installed;it then readsthe RPUand determineswhetherto enableparitychecking.Bit6 in VIAlDataregisterB enablesor disablesparitygenerationand checkingby the RPU. BeforereadingRAMwithparityenabled,the systemsoftwaremustset the paritybits properlyby writingusingnormalparityto all availableRAM. Eachtimea byteof RAMis read,the circuitson the paritySIMMs generatean internal paritybit and compareit withthe bit read fromthe paritybit in the RAM.If the two paritybitsare not the sameand if parityis enabled,the RPUrecordsthe errorcondition and the SIMM thatcausedthe error.TheRPUthen sendsinterruptIRQ14to the OSS. Systemsoftwarewritesthe value7 intothe InterruptMaskregisterin the OSSto enable parityinterruptsas an NMI.Whena parityinterruptoccurs,the interrupthandlerclearsthe interruptby writingOto the InterruptMaskregisterin the OSS. m Guideto the MacintoshFamilyHardware RAMcache card in the MacintoshIlci computer The MacintoshIlci has a connectorfor an optionalRAMcachecard.High-speedRAM on the cachecard can improvethe performanceof the MacintoshIlci by as muchas 50percent,dependingon the applicationand on the pixelsize used by the built-in video display. A cachecardcan be designedto achievea largeincreasein the computer'sperformanceat a smallincreasein cost.One wayto increaseperformanceis to use fasterICsfor the entire RAM,but thatwouldentaila largeincreasein cost.A cachecardenablesa smallamountof fastRAMto providea largeperformanceincrease. The memoryin the cachecardduplicatesmallportionsof the mainmemory.Eachtime the mainprocessorstartsto read data storedin the mainmemory,the cachecard checksto determinewhetherit has the data.If it does,the cachecard sendsthe data to the processorand the processordoesn'thaveto waitfor the slowermain memoryto providethe data. If the data the processoris readingis not storedin the cachecard,the processormustget it fromthe mainmemory.Whenthe mainmemoryputs the data on the bus for the processorto read,the cachecardalsoreadsit; that is how the cachecardbringsnew data into its RAM. The timeit takesto read datafrommainmemoryis longerthan it wouldbe withoutthe cachebecausethereis not onlythe timerequiredfor readingmainmemorybut alsothe timeit takesfor the cachecardto determinewhetheror not it has the data.The use of the cacheprovidesan increasein overallperformancebecausethe datathe processorneedsis usuallyalreadyin the cache. Operatlonofacachecard The cachecard is an optionalcardthat maynot be installed.The informationin this sectiondescribesthe operationof a typicalcachecard. The RAMon the cachecardis dividedintotwo partscalledtag RAMand dataBAM.To determinewhetherthe requesteddata is alreadystoredin the data RAM,the cachecard uses the tag RAMto storea listof addresses.The addressesstoredin the tag RAMare the main-memory addressesof the data that is storedin the data RAM. If the cachecontainsthe data the processoris requestingfrommainmemory,the read operationis calleda hit. If the cachedoes not containthe data,the operationis calleda miss. Hereare descriptionsof three operationsthat can occurin a systemwitha typicalcache card:a read operationwitha hit, a read operationwitha miss,and a writeoperation. Chapter5 Memory 223 Readingwitha cachehit Fora readoperation,the mainprocessorputsan addresson the addressbus and then assertsthe AddressStrobesignal(/AS).If the cachecardis enabled,the cardhas the CACHE signalasserted;thatsignalinhibitsthe computer'sMemoryDecodeUnit(MDU) fromperformingthe memoryaccess.Thecachecardcomparesthe high-orderaddressbits withthe corresponding tag RAMto determinewhetherthe datais heldin the cacheand checksthe validitybits to determinewhetherthe data is valid.The checkfor validdata is necessarybecauseit is possiblefor the processorto writenew datato mainmemory withoutthe cachecardbeingupdated;that processis describedin the next section. If the addressesmatchand the data is valid,the read operationis a hit and the cachecard puts its data onto the data bus. Readingwitha cachemiss If the addressesdon't matchor if the datais not valid,the operationis a missand the cachecardtellsthe processorto retrythe read operationby assertingthe /BERRand /HALTlines.Thecachecardalsodeassertsthe CACHE signalso thatthe MDUcan performthe accessto mainmemorywhenthe processoretriesthe read.Afterthe main memoryputs the dataon the databus,both the mainprocessorand the cachecard haveaccessto the data.The cachecardusesthe data to updateits dataRAMand sets the appropriatevaliditybit in its tag RAM.Thatis the waylocationsin cachememoryare filledor updated. To fillthe cache,read operationsfrommainRAMuse burstmode,whichtakesfiveclock cyclesfor the firstread and two clockcycleseachfor threesubsequentread operations. The five-clockread operationdeterminesthe addressof a chunkof memoryfour longwordsin sizeand alignedon a 4-longword boundary.Eachsubsequentreadoperation in the same4-longword chunktakesonlytwoclock'cycles. Writing Whenthe mainprocessorperformsa writeoperation,it can provideeither8, 16,or 32 bits of data.Dependingon the designof the cachecard,it maynot be appropriateto update the cacheeachtimethe processorwritesto mainmemory.If the cachecarddoes not updateits data RAMon a writeoperation,it musttum offthe validitybit in its tag RAM to indicatethat the data it holdsis no longervalid. To performa writeoperation,the mainprocessorputs an addresson the addressbus and deassertsthe R/Wsignal.Theprocessorthen assertsthe AddressStrobesignal(/AS);after that,it puts the data on the databus and the MDUwritesto mainmemory.If the cachecard doesupdateits dataRAMon a writeoperatioQ, it doesso in parallelwiththe mainmemory. 224 Guideto the MacintoshFamilyHardware Controllingthe cache card Spacehas been allocatedin the 32-bitaddressspace of the MacintoshIlci for readingand writingto registersand testingmemoryin the cachecard.Thisspaceincludesaddressesin the range$52000000through$52FFFFFF.The cachecard'saddressspaceis not accessible throughthe 24-bitaddressmap. Bitsin VIA2DataregisterB in the RBVcontrolenablingand disablingthe cachecardand flushingthe cache.Applicationsshouldnot set thosebits directly,but shoulduse the appropriateROMtrapsto enable,disable,and flushthe cache.The traps,named EnableExtCache, DisableExtCache,and FlushExtCache, are availableusingselectors 4, 5, and 6 throughthe hardwareprivilegetrap HWPriv(A098). ~ Developertip Normaloperationof a cachecard is transparento applications runningon the MacintoshIlci.Systemsoftwaremakesno assumptions aboutthe organizationof the RAMon a cachecard;applications shoulddo likewise.Onlytest softwarefor the cardshouldaddressthe cachecard'sdata RAMand tag RAMdirectly.~ Cachecardconnector The connectorfor the cachecardis a 120-pinEuro-DIN connector,as shownin Figure5-12. Thesignalassignments are shownin Table5-8. .& Warning Do not pluga PDSexpansioncardintothe cachecardconnectorin the Macintoshlid. Eventhoughthe connectorfor the cachecardwill accepta PDSexpansioncard,the pinoutsare different.A PDScard willnot work in the cacheconnector;attemptingto operatethe computerwitha PDScardin the cacheconnectormaydamageboth the computerand the card. _. ~ Developertip For information about designinga cachecard for the MacintoshIlci, for the pleasereferto the manualDesigningCardsand Drivers MacintoshFamily,secondedition.~ Chapter5 Memory 225 • Figure5-12 Cachecard connectorin the Macintoshllci computer 0 1 D D D 1 D D D 2 D D D 3 D D D 4 D D D 5 D D D 6 D D D 7 D D D 8 D D D 9 D D D 10 D D D 11 D D D 12 D D D 13 D D D 14 D D D 15 D D D 16 D D D 17 D D D 18 D D D 19 D D D 20 D D D 21 D D D 22 D D D 23 D D D 24 D D D 25 D D D 26 D D D 27 D D D 28 D D D 29 D D D 30 D D D 31 D D D 32 D D D 33 D D D 34 D D D 35 D D D 36 D D D 37 D D D 38 D D D 39 D D D 40 I 0 A 8 C 226 Guideto the MacintoshFamilyHardware • Table5-8 Signalassignmentsfor the cachecard connector Rn RowA RowB RowC 1 A30 /RESET /R/W 2 /HALT A29 /STERM 3 A31 A25 A28 4 A26 A27 +5V 5 /RMC A24 /CFLUSH 6 D31 GND +5V 7 D30 D29 n.c. 8 D,28 D27 GND 9 D26 D25 +5V 10 D24 D23 GND 11 D22 D21 GND 12 D20 D19 /IPL2 13 D18 D17 /CENABLE 14 D16 +5V +5V 15 A22 A21 +5V 16 A20 A19 GND 17 A18 A17 n.c. 18 A16 A15 GND 19 A14 A13 +5V 20 A12 All n.c. 21 AlO GND GND 22 FCl A9 +5V 23 AB n.c. GND 24 FC2 FC0 /CIOUT 25 D15 D14 /IPLl 26 D13 D12 /IPL0 27 Dll DlO /CBREQ 28 D9 DB D7 29 D6 /BGACK D5 30 D4 D3 D2 31 Dl DO +5V 32 /ROMOE A7 A6 (continued) Chapter5 Memory m • Table5-8 Signalassignmentsfor the cachecard connector(continued) Pin Row A RowB Rowe 33 A5 A4 A3 34 A2 Al AO 35 /BG +5V /CBACK 36 A23 CPUDIS /BR 37 /DSACK0 /AS IDS 38 CPUCLOCK /DSACKl /BERR 39 GND +SV SIZl 40 GND CACHE SIZ0 RAMcache in the MacintoshIIfx computer The MacintoshIIfxhas an on-boardRAMcache for 32 KBof data. The operationof the cache is controlledby the FastMemoryController(FMC).The cacheuses high-speedstatic RAM:its accesstime is only 20ns. The mainprocessorcan read fromthe cachewith no wait states. A cacheis designedto achievea largeincreasein the computer'sperformanceat a small increasein cost. One way to increaseperformancewouldbe to use fasterICsfor the entire RAM,but that wouldentaila largeincreasein cost.A cacheenablesa smallamountof high- speed RAMto providea largeperformanceincrease. The memoryin the cacheduplicatessmallportionsof the mainmemory(eitherRAMor ROM).Eachtime the main processorstartsa read operation,the FMCchecksto determinewhetherthe data is in the cachememory.If it is, the cachesends the data to the processorand the processordoesn'thave to wait for the slowermainmemoryto provide the data. If the data the processoris readingis not stored in the cachememory,the processormust get it fromthe mainmemory.Whenthe mainmemoryputs the data on the bus for the processorto read, the cachealso reads it; that is how the computerbringsnew data into the cache memory. To determinewhetherthe requesteddata is alreadystoredin the cache memory,the cacheuses a separatepart of the cachecalledthe tag RAMto store a list of addresses.The addressesstored in the tag RAMare the main-memoryaddressesof the data that is stored in the cache'sdata RAM. 228 Guideto the MacintoshFamilyHardware Operationof the RAMcache If the cachecontainsthe data the processoris requestingfrommainmemory,the read operationis calleda hit. If the cachedoes not containthe data,the operationis calleda miss.Here are descriptionsof four operationsthat can occurin the MacintoshIlfx:a read operationwitha hit, a read operationwitha miss,fillingthe cacheon burstreads,and a write operation. Readingwitha cachehit For a read operation,the mainprocessorputs an addresson the addressbus and then assertsthe AddressStrobesignal(/AS).The cachelogiccomparesthe high-orderaddress bits withthe correspondingtag RAMto determinewhetherthe requesteddata is held in the cacheand checksthe validitybit to determinewhetherthe data is valid.The check for validdata is necessarybecausewhen poweris firstturnedon, the data in each cache locationis invaliduntilloadedby a read operation. If the addressesmatchand the data is valid,the read operationis a hit. Normally,the cacheRAMis alreadyenabledonto the data bus and the processorproceedsto read the data.The processorreadsa longwordof data in justtwo clockcycles.The FMCdoes not assertthe BurstAcknowledge signalto the MC68030on a cachehit, so onlya single longwordis read. Readingwitha cachemiss If the addressesdon't matchor if the data is not valid,the operationis a miss,as indicatedby the negationof the MATCH signalfromthe tag RAM.The negatedMATCH signalpropagatesto the /BERRand /HALTlinesso that the processorignoresthe invalid data and restartsthe bus cyclein an operationcalleda retry. The FMCrespondsto the missby latchingthe addressand initiatinga read operationfrom mainmemoryin parallelwiththe retryoperationof the MC68030. It negatesthe CACHEN signalto removethe outputof the cacheRAMfromthe data bus. Bythe timethe processorretriesthe read operation,the FMCwillalreadyhavethe data availablefrom mainmemory.The overlappingof the mainmemoryaccesswiththe retryoperation eliminatesmuchof the timepenaltynormallyassoeiatedwith a cachemiss.The retry operationtakes an additionalfour clock cycles. If the mainprocessorhas requesteda burst,the FMCloadsthe new data into the cache's data RAM.If no burstwas req1,1ested, the FMCperformsa singleread frommainmemory and the cache is unaffected. Chapter5 Memory 129 Fillingthe cache To readvaliddata intothe cache'sdataRAM,the FMCinitiatesa burstreadconsistingof fourlongwordsfrommainmemory.TheFMCstoresthe addressof the groupof four longwordsintothe tag RAM. Afterthe mainmemoryputsthe dataon the databus,both the mainprocessorand the cache'sdataRAMreadthe data.Uponsuccessfulcompletion of the burst,the FMCsetsthe corresponding validitybit in the cache'stag RAM. Thereis onlyone tag locationforeachblockof fourlongwordso the tag onlyallocatespaceon a burst read. • Note:TheFMCcanperformburstreadsfromeitherRAMor ROM. Writing To performa writeoperation,the mainprocessorputsan addresson the addressbus and deassertsthe R/Wsignal.Theprocessorthenassertsthe AddressStrobesignal(/AS);after that,it putsthe dataon the databus and the FMCperformsthe writeto mainmemory. Whilethisis happening,the FMCusesthe MATCH signalfromthe tagRAMto determine whetherthe databeingwrittento mainmemoryis alsoin the cache.If it is, the updated datais alsowrittenintothe cache'sdataRAM.Writeoperationsto cachedmemoryalways updatethe cache,regardlessof bus mastershipor the state.of the CacheControlregister, thus ensuringthatthe cachecontainsvaliddata. ~ Developer dp Normaloperationof the RAMcacheis transparentto applications runningon the Macintosh Ilfx.Systemsoftwaremakesno assumptionsaboutthe organizationof the RAMcache;applications shoulddo likewise.~ Buffetedwrite operationsJnthe MacintoshDfx computer Writeoperationsin the Macintosh Ilfxare alwaysbufferedwrites.TheFMClatchesthe datafromthe processorand terminatesthe processor'swritecyclebeforethe datahas actuallybeen writtento memory.Thistechniqueallowsthe processorto continuewith otheroperations:a writethatwouldnormallytakesix clockcyclesoccupiesthe processor for onlytwo clockcycles.If the succeedingoperationis anythingotherthananother write,it can proceedwhilethe FMCcompletesthe writeoperation. 2') Guideto the Macintosh FamilyHardware Thereis onlyone levelof bufferingon writeoperations,so thatif thereare twosuccessive writeoperations,the secondoperationwouldnonnallyhaveto waituntilthe firstone was completed.The FMChandlesthissituationby comparingthe latchedaddressfromthe firstwriteoperationwiththe addressof the secondwrite.If the secondaddressis in the samepageof RAM,the FMCperformsthe secondwriteoperationas a page-modewrite withoutinsertingwaitstates,thusmaintaining a highlevelof perfonnance. ROM ROMis the Macintoshcomputer'spennanentread-onlymemory.Its base addressis availableas the constantromStartand is alsostoredin the globalvariableROMBase. ROMcontainsthe routinesfor the MacintoshToolboxand OperatingSystem,plus the varioussystemtraps.BecauseROMaccesscyclesare not interleavedwithvideoor sound, the processorin a Macintosh computercan alwaysaccessROMat the samerate.Table5-9 showsthe ROMaccessratesfor the differentMacintoshmodels. • Table5-9 ROMaccessrates model .Madotosb CPU type ROM access rate Macintosh Plus MC68000 3.92MB/sec MacintoshSE MC68000 3.92MB/sec MacintoshSE/30 MC68030 15.67MB/sec MacintoshPortable MC68HC000 7.86MB/sec MacintoshII MC68020 12.53MB/sec MacintoshIlx MC68030 15.67MB/sec MacintoshHex MC68030 15.67MB/sec MacintoshIlci MC68030 20.0MB/sec MacintoshIlfx MC68030 64.0MB/sec Chapter5 Memory 231 ROMconfigurations The Macintosh128Kand 512Kcomputerseach containtwo 256KbitROMICs,fonninga 16-bit-wide data bus and providing64KBof ROM. The Macintosh512Kenhancedand the MacintoshPluscomputerseach containtwo 512KbitROMICs,fonninga 16-bit-widedata bus and providing128KBof ROM. The 512KbitIC is the largestROMICthat can be installedin the classicMacintoshcomputers. The MacintoshPlusROMsocketscan handle1 MbitROMICs.A configuration of two 1 MbitROMICsprovides256KBof ROM. MacintoshSEcomputerscontaintwo 1 MbitROMICs.Theseare the largestROMICs that can be installedin the MacintoshSEROMsockets.Thisconfigurationprovides 256KBof ROM. The MacintoshPortablecomputercontainstwo 1 MbitROMICson the logicboardplus a connectorfor a ROMexpansioncard.The pennanentROMICsprovide256KBof ROM.A ROMexpansioncardcan containup to 4 MBof ROM,whichcan be used to supplement the systemROM(up to a totalof 5 MBof ROM)or to replaceit entirely. The MacintoshII and MacintoshHexcontainfour 512KbitROMICs,fonninga 32-bit- wide data bus, and providing256KBof ROM.The MacintoshII ROMsocketscan accept ROMICsup to 1 Mbitin size.A configuration of four·1 MbitROMICswouldprovide 512KBof ROM.In additionto the IC sockets,MacintoshHexcomputeralso has SIMM socketsfor upgradingor expandingROM. In the MacintoshSE/30and MacintoshIlx computers,ROMis installedas a 64-pin ROMSIMMin a socketon the mainlogicboard.The ROMSIMMmakesit easyto upgradeROM. The MacintoshIlci containsfour 1 MbitROMICson the mainlogicboard,fonninga 32-bit-widedata bus and providing512KBof ROM.The MacintoshIlci also has a 64-pinSIMMsocketfor upgradingor expandingROM.; The MacintoshIlfxhas one ROMSIMMthat containsfour 1 MbitROMICsfor 512KBof ROM.Pleasereferto the section"ROMSIMMs" later in this chapterfor more information. 232 Guideto the MacintoshFamilyHardware ROMexpansion in the MacintoshPortablecomputer TheROMexpansionconnectorin the Macintosh Portableis mechanically the sameas the RAMexpansionconnectorshownin Figure5-5.Thesignalassignments forthe ROM expansionconnectorare shownin Table5-10. ThepermanentROMin the Macintosh Portablehas an accesstimeof 150ns and requires twowaitstates.TheROMexpansioncardusesthe /EXT.DTACK handshakesignalto controlthe numberof waitstatesfor accessesto the ROMon the card. A ROMexpansioncardcandrawa maximumof 2 milliamps of powerat +5voltsand must provideits own buffering,decodingcircuits,and internalcontrolsignals. 4, Developer tip TheROMaddressspacefrom$900000through$9FFFFFin the MacintoshPortableis reservedforuse by AppleComputer.Youmay use anyportionof the remainingROMaddressspaceforone or more read-onlyelectronicdisks(calledROMEDisksor ROMdisks).Each ROMdiskmuststarton a 64KBboundary.Becauseyou cannottell intowhichROMsocketsthe userwillplugyourROMICs,yourcode shouldbe relocatable.Youshoulduse as littleof the addressspaceand as fewROMICsocketsas possibleforyourROMdisk,so that the user doesnot haveto choosebetweenyourproductand anotherthat uses fewerresources.4 Chapter5 Memory 233 • Table5-10 signalassignments for the ROMexpansionconnectorin the MacintoshPortablecomputer Slpllaame Sfgoaldescripdon 1 +5V +5 volts 2 Al AddresslineAl 3 A2 AddressiineA2 4 A3 AddresslineA3 5 A4 AddresslineA4 6 AS AddresslineAS 7 A6 AddresslineA6 8 A7 AddresslineA7 9 AB AddresslineAB 10 A9 AddresslineA9 11 AlO AddresslineAlO 12 All AddresslineAl1 13 A12 AddresslineA12 14 A13 AddresslineA13 15 A14 AddresslineAl4 16 Al5 AddresslineA15 17 A16 AddresslineA16 18 A17 AddresslineAl7 19 A18 AddresslineA18 20 A19 AddresslineA19 21 A20 AddresslineA20 22 A21 AddresslineA21 23 A22 AddresslineA22 24 A23 AddresslineA23 25 GND Ground 26 GND Ground 27 /DTACK SystemROMacknowledge signalto CPUGLU 28 /AS AddressStrobefromMC68HC000 29 /ROM.CS Chip-select signalfromCPUGLU(alsousedto selectpermanentROM) 30 16M 15.6672MHzsystemclock 31 /EXT.DTACKExpansionROMacknowledge signalto CPUGLU (continued) 234 Guideto the MacintoshFamilyHardware • TableS-10 signalassignments for the ROMexpansionconnectorin the MacintoshPortablecomputer(continued) Plnnumber SJgualoame Signaldescription 32 /DELAY.CS Chip-select signalfromCPUGLU 33 DO DatalineDO 34 Dl DatalineDl 35 D2 DatalineD2 36 D3 DatalineD3 37 D4 DatalineD4 38 D5 DatalineD5 39 DG DatalineD6 40 D7 DatalineD7 43 DlO DatalineDlO 44 Dll DatalineDll 45 D12 DatalineD12 46 D13 DatalineD13 47 D14 DatalineD14 48 D15 DatalineD15 49 +5V +5 volts 50 +5V +5 volts ROMSIMMs ROMis installedin SIMMs in the MacintoshSE/30and Macintosh Ilx computers.ROM SIMMsare also presentin the MacintoshII, Macintosh Hex,MacintoshIlci,and Macintosh Ilfxfor ROMupgradingor expansion. 6. Important OnlyqualifiedservicepersonnelshouldinstallROMSIMMs in Macintoshcomputers.t:,. TheROMSIMM socketpinoutsare shownin Figure5-13,and the signalassignments are shownin Table5-11. Chapter5 Memory 235 • Figure5-13 Pinoutof the ROMSIMMsocket 236 Guideto the MacintoshFamilyHardware • Table5-11 Signalassignmentsfor the ROMSIMMsocket Sfgoalname Signaldescription 1 +SV +5 volts 2 AO• Addressbus, bit 0 3 Al• Addressbus, bit 1 4 A2 Addressbus, bit 2 5 A3 Addressbus, bit 3 6 A4 Addressbus, bit 4 7 AS Addressbus, bit 5 8 A6 Addressbus, bit 6 9 A7 Addressbus, bit 7 10 GND Ground 11 /ROMor /CSO ROMchip select 12 /ROMOE ROMoutputenable 13 +SV +5 volts 14 DO Databus, bit 0 15 Dl Databus, bit 1 16 D2 Databus, bit 2 17 D3 Databus, bit 3 18 D4 Databus, bit 4 19 DS Databus, bit 5 20 D6 Databus, bit 6 21 D7 Databus, bit 7 22 DB Databus, bit 8 23 D9 Databus, bit 9 24 DlO Data bus, bit 10 25 Dll Data bus, bit 11 26 D12 Databus, bit 12 27 D13 Databus, bit 13 28 D14 Databus, bit 14 29 DlS Databus, bit 15 30 GND Ground 31 AB Addressbus, bit 8 'AOand Al are used onlyon ROMSIMMs for the Macintosh Hexand Macintosh Ilci. (continued) Chapter5 Memory 237 • TableS-11 Signalassignmentsfor the ROM SIMMsocket (continued) Plnmm>er Sfgoaloamc Signaldescription 32 A9 Addressbus, bit 9 33 AlO Addressbus, bit 10 34 All Addressbus, bit 11 35 A12 Addressbus, bit 12 36 A13 Addressbus, bit 13 37 A14 Addressbus, bit 14 38 A15 Addressbus, bit 15 39 A16 Addressbus, bit 16 40 A17 Addressbus, bit 17 41 A18 Addressbus, bit 18 42 A19 Addressbus, bit 19 43 A20 Addressbus, bit 20 44 A21 Addressbus, bit 21 45 A22 Addressbus, bit 22 46 +5V +5 volts 47 D16 Databus, bit 16 48 D17 Databus, bit 17 49 D18 Databus, bit 18 50 D19 Databus, bit 19 51 D20 Databus, bit 20 52 D21 Databus, bit 21 53 D22 Databus, bit 22 54 D23 Databus, bit 23 55 D24 Databus, bit 24 56 D25 Databus, bit 25 57 D26 Databus, bit 26 58 D27 Databus, bit 27 59 D28 Databus, bit 28 60 D29 Databus, bit 29 61 D30 Databus, bit 30 62 D31 Databus, bit 31 63 +5V(CSl) +5 volts(alternatechip select) 64 GND Ground 238 Guideto the MacintoshFamilyHardware Chapter6 PowerSupplies Allpowerfor componentswithinthe caseof a Macintosh-family computeris providedby the powersupplywhilethe computeris switchedon. Thischapterfirstbrieflydescribesthe sequencesof events thatoccurduringsystemstartupand powerdown.It then liststhe specificationsfor the powersuppliesof the MacintoshPlusand all later Macintoshcomputers,discussesthe power-onand power-offcontrol circuitsin the Macintosh II-familycomputers,and describesthe battery chargerand powercircuitfor the MacintoshPortablecomputer.The PowerManagerICin the Macintosh Portableis describedin Chapter3. Power Hdw.on/off switch MacintoshPlus IPL-u MacintoshSE Hdw.on/off switch .PL ___ MacintoshSE/30 Hdw.on/off switch w• B} No on/off sw. (sleep) MacintoshPortable &_ - Kbd.on, softw.off MacintoshII &_ - Kbd.on, softw.off MacintoshIlx Ji_ MacintoshIlcx - Kbd.on, softw.off g_ MacintoshIlci - Kbd.on, softw.off &_ - Kbd.on, softw.off MacintoshIlfx 240 Guideto theMacintosh FamilyHardware In the Macintosh Plusand earlierMacintoshcomputers,the powersupplyprovides sufficientcurrentto run the mainlogicboard,the videodisplay,the internaldiskdrive, and an externaldiskdrive.TheMacintosh SEand Macintosh SE/30computersprovide additionalpowerfor a fan,a secondinternalfloppydiskdriveor an internalharddisk, and anyexpansioncarddesignedfor the computer.Thepowersupplyin the Macintosh II, MacintoshIIx, MacintoshIIcx, MacintoshIlci, and MacintoshIIfx computersprovides enoughpowerto supplytwofloppydiskdrives,one harddiskdrive,andseveralNuBus expansioncards.Thepowersuppliesin all thesecomputersprovidepowerforthe keyboardand the mouse. Powerfor the MacintoshPortablecomputeris providedby a built-inbattery,whichis chargedby an externalbatterycharger.TheMacintosh Portableuses componentswithlow powerrequirements and employspecialhardwareand firmwareto furtherreducepower consumption whenthe machineis not in use.Thebatteryin the Macintosh Portable providespowerfor the mainlogicboard,two internaldiskdrives,a flat-panelvideo display,the keyboard,and a trackballor otherpointingdevice. In the classicMacintoshcomputers,the powersupply,videoelectronics,and internal speakerare all locatedon the analogboard.In the Macintosh SEand MacintoshSE/30,the videoelectronicsare on the analogboardand the powersupplyis in a separatemetalbox, boltedonto the analogboard.In the Macintosh II family,the powersupplyis in a separatemetalbox insidethe mainsystemunit.The MacintoshPortablehas a battery chargerand powertransformer in a separateunitconnectedto the mainsystemunitby a cable.The batteryis in a compartmentinsidethe mainsystemunit. The Macintosh SE/30,Macintosh SE,and classicMacintoshcomputershavea mechanical on/offswitchlocatedat the rearof the computer.The powersupplyin the MacintoshII- familycomputersis switchedon by a signallineon the ADBconnectorand is switchedoff by a signalgeneratedby software.The MacintoshPortablecomputerhas no on/off switch;in the MacintoshPortable,the PowerManagerICputsthe computerin a low- power-consumption state(the sleepstate)whenthe computeris not beingused. Powerup, systemstartup,and powerdown The systemstartupsequencevariesfromone memberof the Macintoshfamilyto another. In addition,someMacintoshcomputershavefirmware-controlled power-down sequences.Thissectiondescribesthe systemstartupsequencefor all Macintosh computers,and the power-downsequences,whereappropriate. Chapter6 PowerSupplies 241 ClassicMacintoshcomputers Whenpoweris firstappliedto a classicMacintoshcomputer,the followingsequenceof eventstakes place: 1. TheSonysoundICmonitorsthe voltagelevelson the boardand assertsthe /RESET signaluntil0.25secondafterthe voltagehas stabilized. 2. The/RESET signalcausesthe CPUand all of the internaldevicesto cometo a known initial state. 3. TheSonysoundICdeassertsthe /RESET signaland the CPUlooksat the firstfour wordsin memory(startingat location$000000)to get the Resetvector.Because nothinghas been loadedintoRAMyet, it wouldnot do forthe CPUto try to get the ResetvectorfromRAM. Therefore,whenthe VIAis reset,it pullsthe Overlaysignal high,whichcausesthe PAI.5to use an addressdecodingschemethatputs ROMat location$000000.Thisdecodingschemeis referredto as the ROMoverlay.In the ROM overlayaddressmap,an addressto a locationin the range$400000through$43FFFFis alsodecodedby the PAI.5as an addressto ROM. 4. TheCPUgoesto the memoryaddressin ROMpointedto by the Resetvectorand beginsto executethe codeit findsthere(the Resethandler). 5. Oneof the firstinstructionsin the Resethandlercausesthe Overlaysignalto go low, whichswitchesthe PAI.5to the normaladdressmap.Jothisaddressmap,RAMis locatedat $000000through$3FFFFF(for4 MBof RAM)and ROMis locatedat $400000through$43FFFF(for256KBof ROM) . .6. TheResethandlercarriesout the startupproceduredescribedin InsideMacintosh. MacintoshSE computer Whenpoweris firstappliedto the Macintosh SEcomputer,the followingsequenceof eventstakes place: 1. TheSonysoundICmonitorsthe voltagelevelson the boardand assertsthe /RESET signaluntil0.25secondafterthe voltagehas stabilized. 2. The/RESET signalcausesthe CPU,the BBU,and all of the internaldevicesto cometo a knowninitialstate. 3. TheSonysoundICdeassertsthe /RESET signaland the CPUlooksat the firstfour wordsin memory(startingat location$000000)to get the Resetvector.Whenthe BBUis reset,it startsup withthe ROMoverlayaddressmap,whichputsROMat location$000000.In the ROMoverlayaddressmap,an addressto a locationin the range$400000through$43FFFFis alsodecodedby the BBUas an addressto ROM. 242 Guideto the MacintoshFamilyHardware 4. TheCPUgoesto the memoryaddresspointedto by the Resetvectorand beginsto executethe code it findsthere(the Resethandler). in the Resethandleris a jumpto a locationin the range 5. One of the firstinstructions normallyassignedto ROM($400000through$43E800).Thefirsttimethe BBU receivesan addressin thisrange,it switchesto the normaladdressmap.In thisaddress map,RAMis locatedat $000000through$3FFFFFand ROMis locatedat $400000 through$43FFFF. 6. TheResethandlercarriesout the startupproceduredescribedin InsideMacintosh. MacintoshPortablecomputer TheMacintoshPortableis the onlyMacintoshcomputerthat is designedto be powered by a battery.In normaloperation,the MacintoshPortableis neverswitchedoff;rather,it goesintoa low-power-consumption state,the sleep state,whenit is not in use. Wheneverthe MacintoshPortablereturnsto an activestateaftera periodwhena desktop machinewouldhavebeen turnedoff,it automatically restoresits presleepenvironment and resumesoperationwithoutgoingthroughthe startupsequence.Ideally,the Macintosh Portableis switchedon onlywhenthe batteryis firstinstalledby the dealeror afterthe batterieshavebeen removedin orderto installan expansioncardin the machine. Whenpoweris firstappliedto the Macintosh Portable,the PowerManagerIC immediately puts the systemintothe sleepstate.The firsttimea key is pressed,the PowerManagerIC initiatesa systemresetand the Macintosh Portablegoesthroughthe samesequenceof startupeventsas the Macintosh SE.In the MacintoshPortable,the ROM-overlay mappingis controlledby the CPUGLU,and is terminatedby the firstaddress in the range$900000through$9FFFFF. MacintoshSE/30and MacintoshII-familycomputers The Macintosh SE/30,Macintosh Ilx, and MacintoshIlcxcomputersall use the same ROM,whichhas a startuproutinealmostidenticalto·thatused in the Macintosh II. These computers,likeall otherMacintosh computers,go throughan elaborateseriesof hardware and softwareproceduresto initializethe systemwhenyou tum themon or resetthem.The power-downfunctionin Macintosh II-familycomputersis normallyundersoftware control,unlikethe otherMacintosh computers,whichhaveonlya hardwarepowerswitch. Thissectiondescribesthe initializationsequencethat takesplacewhenyou supplypower to the MacintoshSE/30or Macintosh II-familycomputers.The followingsection discussesthe mechanismby whichthe Macintosh II-familyfirmwareturnsthe poweroff. Chapter6 PowerSupplies 243 Powerup WhenyoupressthepowerswitchontheADBkeyboard ofa Macintosh II-family computer,a capacitordischarges,generatinga signalthat causesthe powersupplyto switchon within2 seconds(assumingthat ACcurrentis present).The capacitorin the MacintoshII and Macintosh!Ix is kept chargedby two 3-voltlithiumbatteries;in the MacintoshHex and MacintoshIlci, it is kept chargedby a tricklecurrentfromthe power supply.The MacintoshII-familypower-controlcircuitis shownand discussedin the section"Power-ControlCircuitin the MacintoshII-FamilyComputers,"at the end of this chapter.The MacintoshSE/30has a hard-wiredpowerswitch,identicalto the one used in the MacintoshSE. Systemstartup Whenpower is firstappliedto a MacintoshSE/30or MacintoshJI-familycomputer,the followingsequenceof eventstakesplace: 1. One of the SonysoundICsmonitorsthe voltagelevelson the boardand assertsthe /RESETsignaluntil 0.25secondafterthe voltagehas stabilized. 2. The/RESET signalcausesthe CPU,the generallogicICs,and all of the internaldevices to cometo a knowninitialstate.The /RESETsignalis alsoavailableto each expansion card slot so that expansioncardscan be reset to a knowninitialstate. 3. The SonysoundICdeassertsthe /RESETsignaland the CPUlooksat the firstfour wordsin memory(startingat location$00000000)to get the Resetvector.WhenVIAl is reset,it pullsthe Overlaysignalhigh,whichcausesthe memory-control IC (GLUEor MDU)to use the ROMoverlayaddressmap.In the ROMoverlayaddressmap,an addressto a locationin eitherthe range$00000000through $0FFFFFFor $40000000 through$4FFFFFFFis decodedas an addressto ROM. 4. The CPUgoes to the memoryaddresspointedto by the Resetvectorand beginsto executethe code it findsthere (the Resethandler). 5. One of the firstinstructionsin the Resethandlercausesthe Overlaysignalto go low, whichswitchesthe memory-control IC(GLUEor MDU)to the normaladdressmap.In this addressmap,RAMis locatedat $00000000through$3FFFFFFFand ROMis locatedat $40000000through$4FFFFFFF. . 6. TheResethandlercarriesout the startupproceduredescribedin InsideMacintosh. 244 Guideto the MacintoshFamilyHardware MacintoshII-familypower down In the MacintoshII-familycomputers,whenyou switchoffpowerby choosingShutDown fromthe Specialmenu,the computerfirstclosesall filesand finishesall pendingactivity. Whenthe softwareis readyto turnoffpowerto the computer,it causesa controlIC(VIA2 or OSS)to assertthe /POWEROFF signal.Thissignalcausesthe powersupplyto switch off after 2 ms. • Note:Thereis a powerswitchon the backof the originalMacintosh II that generatesa level-6interrupto the CPU.Theusercan use thisswitchto shutdownthe computer, but it does not initiatethe softwareshut-downproceduresperformedby the Shut Downmenucommand.If the computerhangsand ignoresthe interruptgeneratedby the powerswitch,you mustpressthe nonmaskableinterruptswitch(the "programmer's switch")to haltthe CPU,and thenpressthe powerswitch.If you do not havea programmer's switchinstalledon yourMacintosh II and the powerswitch failsto tum offthe machine,you mustunplugthe computer. LaterMacintoshII computers,the Macintosh IIx, and the Macintosh IIcxhave hard- wiredpower-offswitcheson the backof the case.Noneof theseswitchesinitiates the softwareshut-downproceduresperformedby the ShutDownmenucommand. In the MacintoshIIcxand Macintosh IIci,the powerswitchon the backcan be lockedin the "on"positionwitha screwdriveror a coin.If the switchis in the "on"position,the machinewillturn itselfbackon aftera powerinterruption. Thisfeatureis usefulfor machinesoperatingas fileservers,whereautomaticrecoveryaftera powerfailureis desirable.Whenthe switchis lockedin the "on"position,choosingthe ShutDown commandfromthe Specialmenuwhilein the Findercausesthe computerto restart. .A. Warning Neverpressthe powerswitch,pullthe plug,or otherwiseremove powerfromyourMacintosh computerwhileit is writingto disk.Doing so can causelossof dataon the disk,and coulddamagethe disk directory,requiringyou to reformathe disk. .., The power-control circuitis discussedin the section"Power-Control Circuitin the MacintoshII-FamilyComputers," at the end of this chapter. Chapter6 PowerSupplies 245 Powerconnectors Figure~ 1 showsthe pinoutsforthe connectorfromthe powersupplyto the mainlogic boardin the MacintoshPlusand otherclassicMacintoshcomputers. • Figure6-1 Pinoutof the powersupplyconnectoron the Macintosh Pluscomputer 000®0®®®® I Table~ 1 showsthe signalassignments forthe connectorfromthe powersupplyto the mainlogicboardin the classicMacintoshcomputers. • Table6-1 Macintosh Signalassignments forthe powersupplyconnectoron the Pluscomputer Plnoum:r Sfgaalname Sfgoaldescription 1 /VIDEO Videooutput 2 Nopin 3 /HSYNC Horizontalsynchronization 4 SPKR Audiooutput 5 /VSYNC Verticalsynchronization 6 +SV +5 volts 7 GND Ground 8 -12V -12 volts 9 GND Ground 10 +12V +12volts 11 BAT Batteryfor RTC 246 Guideto the MacintoshFamilyHardware Figure6-2showsthe pinoutsfor the connectorfromthe powersupplyto the analogboard in the Macintosh SEand Macintosh SE/30. • Figure6-2 Pinoutof the powersupplyconnectoron the Macintosh SEand MacintoshSE/30computers m m m m [!Q] [I] [TI [I] [I] [I] • Table6-2showsthe signalassignments for the connectorfromthe powersupplyto the analogboardin the MacintoshSEand Macintosh SE/30. • Table6-2 Signalassignments for the powersupplyconnectoron the Macintosh SE and MacintoshSE/30computers Plollllllm' SJgaaloame Sigaaldescription 1 GND Ground 2 GND Ground 3 GND Ground 4 +5V +5 volts 5 +12Vdisk +12voltsfor disk drives 6 -12V -12 volts 7 GND Ground 8 GND Ground 9 +5V +5 volts 10 +12Vsweep +12 voltsfor videocircuits Chapter6 PowerSupplies '111:7 Figure6-3showsthe pinoutsfor the connectorfromthe analogboardto the mainlogic board in the MacintoshSEand MacintoshSE/30computers. • Figure6-3 Pinoutof the powerand videoconnectorfromthe analogboardto the logicboardin the Macintosh SEand MacintoshSE/30computers 0 m [m [ill im illJ [TI] m m m m m rn m Table6-3showsthe signalassignments for the connectorfromthe analogboardto the logicboard in the Macintosh SEand MacintoshSE/30computers. • Table6-3 Signalassignmentsfor the powerand videoconnectorfromthe analogboard to the logicboardin the Macintosh S~and Macintosh SE/30computers Signal Signaldescription 1 GND Ground 2 GND Ground 3 GND Ground 4 GND Ground 5 GND Ground 6 -5V -5 volts 7 -12V -12 volts 8 GND Ground 9 VIDOUT Video output 10 /HSYNC Horizontalsynchronization 11 NSYNC Verticalsynchronization 12 +5V +5 volts 13 +5V +5 volts 14 +12V +12 volts 248 Guideto the MacintoshFamilyHardware Figure6-4showsthe pinoutfor the powerconnectoron the backof the MacintoshPortablecomputer. • Figure6-4 Pinoutof the powerconnectoron the MacintoshPortablecomputer 0 Table6-4showsthe signalassignments forthe powerconnectoron the backof the MacintoshPortablecomputer. • Table6-4 Signalassignmentsfor the powerconnectoron the MacintoshPortablecomputer Plonumber Signal 1 +7.5V nominal 2 Ground 3 Not connected Chapter6 PowerSupplies 249 Figure6-5showsthe pinoutsfor the connectorfromthe powersupplyto the logicboardin the MacintoshIlcx and Macintoshllci computers. • Figure6-; Pinoutof the powersupplyconnectoron the MacintoshIlcx and Macintoshllci computers , ______ ___,/ rn m m m lliJ [I] II] [I] [I] IT] / Table6-5showsthe signalassignmentsfor the connectorfromthe powersupplyto the logicboard in the MacintoshHexand Macintoshllci computers. • Table6-S Signalassignmentsfor the powersupplyconnectoron the MacintoshHex and Macintoshllci computers Sigoaldescription 1 +12V +12volts 2 +5V +5 volts 3 +5V +5 volts 4 +5V +5 volts 5 GND Ground 6 GND Ground 7 GND Ground 8 -12V -12 volts 9 /PFW Powerfailwarning 10 +5V.TRKL Supplyvoltagefor power-oncircuit 2,o Guideto the MacintoshFamilyHardware Figure6-6showsthe pinoutsforthe connectorfromthepowersupplyto the mainlogic board in the Macintosh II, Macintoshllx, and MacintoshIIfxcomputers. • Figure6-6 Pinoutof the powersupplyconnectorin the Macintosh II, Macintosh IIx, and MacintoshIlfx computers 00000®0®®®®@ @® Table6-6showsthe signalassignmentsforthe connectorfromthe powersupplyto the logicboard in the Macintosh II, Macintosh IIx, and Macintosh Ilfx computers. • Table6-6 Signalassignmentsforthe powersupplyconnectorin the Macintosh II, MacintoshIIx, and MacintoshIIfx computers Plnmm,er Sigoal Sigoaldescription 1 +12V +12volts 2 +5V +5 volts 3 +5V +5 volts 4 +5V +5 volts 5 +5V +5 volts 6 +5V +5 volts 7 GND Ground 8 GND Ground 9 GND Ground 10 GND Ground 11 GND Ground 12 GND Ground 13 n.c. Not connected 14 -12V -12 volts 15 /PFW Powerfailwarning Chapter6 PowerSupplies 251 Power input requirements Thissectionliststhe powerinputrequirementsfor the powersuppliesin Macintosh computers.In all Macintoshcomputersexceptthe MacintoshPortable,the powersupply convertsAClinecurrentintoDCat the voltagesrequiredby the logicboardand peripheral devices.In the MacintoshPortable,the batterychargerconvertsthe ACline currentinto DC,and the powersupplyconvertsthe DCfromeitherthe batterychargeror the battery intothe voltagesrequiredby the logicboardand peripherals. MacintoshPlus computer TheMacintoshPluspowersupplycan acceptany inputAClinevoltagefrom85 to 135V (rms),or from170to 270V,at anysingle-phaseinputlinefrequencyfrom47 to 63Hz.The inputvoltagerangeis configuredby closingswitchSWlon the analogboardfor 120V operation.AllclassicMacintoshpowersuppliesgenerateoutputDCvoltagesof -12 V, +12V,and +5V.A three-terminal regulatorICon the mainlogicboardconvertsfrom-12 V to -5 V for use by the serial port drivers. 6 Important Thissectiondescribesthe powersupplyused in the MacintoshPlus computer.Thispowersupplycan be switchedbetweenconfigurations for 120V and 240V inputlinevoltages.SomeMacintosh128K,512K, and 512Kenhancedcomputersmayhavepowersuppliesthatcan use only 120V nominalinputvoltage;some(configuredfor international use) can acceptonly240V nominalinputvoltage.6 252 Guideto the MacintoshFamilyHardware Table6-7showsthe ACinputrequirements forthe Macintosh Pluscomputer. • Table6-7 ACinputrequirementsfor the MacintoshPluscomputer Parameter Specification Inputvoltagerange 85-135V(rms)and 170-270V(rms) Inputsurgevoltage 150V (rms)for 100ms (120V configuration) 300V (rms)for 100ms (240V configuration) Inputlinefrequency 47-63Hz,singlephase Linedropoutimmunity 16ms minimum,for95V (rms,120V configuration) or for 190V (rms,240V configuration), and maximumload Startingvoltage 70V (rms,120V configuration), 140V (rms,240V configuration), and maximumload Inputpowerunderpeakload 80W (rms)maximumforall lineconditions Input/outputpower efficiency 65%minimumforall lineconditionsand maximumload MacintoshSE and MacintoshSE/30 computers Thepowersupplyin the Macintosh SEand Macintosh SE/30can acceptanyinputACline voltagefrom85 to 135V (rms)and 170to 270V at anysingle-phaseinputlinefrequency from47 to 63 Hz.Thispowersupplydoesnot haveto be reconfigured whenchanging fromone inputvoltagerangeto the other.ThepowersupplygeneratesoutputDCvoltages of -12 V,+12V,and +5V.Thereis alsoa volt1.ge regulatoron the analogboardthat providesa -5 V output. Chapter6 PowerSupplies 253 Table~ showsthe ACinputrequirements for the Macintosh SEand Macintosh SE/30computers. • Table6-8 ACinputrequirementsfor the Macintosh SEand Macintosh SE/30computers Specification Inputvoltagerange 8S-270V (rms) Inputsurgevoltage 300V (rms)for100ms Inputlinetransientimmunity 0-5 kVwithno componentfailures Peakinrushcurrent 40A forall loadand lineconditions Inputlinefrequency 47-o3Hz,singlephase Linedropoutimmunity 20msminimum,for85V(rms) 50 Hz inputand maximumload Inputpowerunderpeakload 142W (rms)maximumforall lineconditions Input/outputpower efficiency 70%minimumforall lineconditionsand maximumload MacintoshPortablecomputer TheMacintoshPortablebatterychargercan acceptany inputAClinevoltagefrom85 to 270V (rms)at anysingle-phase inputlinefrequencyfrom48 to 62Hz.Thebatterycharger provides5 ma to 1500ma of DCcurrentat 7.1to 7.6V to the battery.Thevoltage-control circuitson the mainlogicboardcan acceptany inputDCvoltagefrom5.12V to 7.68V fromthe battery.Thevoltage-controlcircuitsupplyDCvoltagesof +12V, +5V,and -5 V. 254 Guideto the MacintoshFamilyHardware Table6-9showsthe ACinput requirementsfor the batterychargerin the Macintosh Portable computer. • Table6-9 ACinput requirementsfor the batterychargerin the Macintosh Portable computer Parameter Specification Input voltagerange 85-270V (rms) Input surge voltage 300V (rms)for 10sec Inputlinetransient immunity 0-5kVwithno component failures Peak inrushcurrent 40A for all load and line conditions Input line frequency 48-62Hz, singlephase Linedropout immunity 20 ms minimum,for 120V (rms) 50 Hz input and maximumload Input/output power efficiency 700/4 minimumfor all line conditionsand maximumload MacintoshIlcx and MacintoshIlci computers The power supply of the MacintoshHexand MacintoshIlci computerscan accept any inputACline voltagefrom85 to 135V (rms)and 170to 270V at any single-phaseinput line frequencyfrom47 to 63 Hz. The powersupplygeneratesoutput DCvoltagesof -12 V, +12V, and +5V.Thereis also a voltageregulatoron the logicboard that provides a -5 V output. Chapter6 PowerSupplies 255 TheACinputrequirementsfor the Macintosh Hexand Macintosh Ilci computersare shownin Table6-10. • Table6-10 ACinput requirementsfor the Macintosh Hexand Macintosh Ilci Parameter Specification Inputvoltagerange BS-135V(rms)and 170-270V(rms) Inputsurgevoltage 300V (rms)for 100ms Inputlinetransientimmunity 0-6kVwithno componentfailures Peakinrushcurrent 40A forallloadand lineconditions Inputlinefrequency 47-63Hz,singlephase Linedropoutimmunity 20msminimum, for85V (rms)SOHzinputand maximumload Input/outputpower efficiency 70%>minimumforall lineconditionsand maximumload MacintoshII, MacintoshIlx, and MacintoshIlfx computers The powersupplyof the MacintoshII, MacintoshIlx, and MacintoshIlfxcomputerscan acceptanyinputAClinevoltagefrom90 to 140V (rms)and 170to 270V at anysingle- phaseinputlinefrequencyfrom47 to 63 Hz.ThepowersupplygeneratesoutputDC voltagesof -12 V,+12V,and +5V.Thereis alsoa voltageregulatoron the logicboardthat providesa -5 V output. 256 Guideto the MacintoshFamilyHardware Table6-11showsthe ACinputrequirementsfor the Macintosh II, Macintosh IIx,and MacintoshIlfx computers. • Table6-11 ACinput requirementsfor the MacintoshII, MacintoshIlx, and MacintoshIlfx computers Parameter Specification Inputvoltagerange 90-140V (rms)and 170-270V(rms) Inputsurgevoltage 300V (rms)for 100ms Input line transientimmunity 0-5 kVwithno componentfailures Peakinrushcurrent 60A for allloadand lineconditions Inputline frequency 47-63Hz,singlephase Linedropoutimmunity 20ms minimum,for90V (rms)50Hz inputand maximumload 20ms minimum,for 180V (rms)50Hz inputand maximumload Inputpowerunderpeak load 230W (rms)maximumforall lineconditions Input/outputpower efficiency 700/4 minimumforall lineconditionsand maximumload DC output specifications Thissectionliststhe poweroutputspecifications for the powersuppliesin Macintosh computers.It also describesthe DCoutputof the MacintoshPortablebatterycharger, whichis the inputto the MacintoshPortablepowersupply. MacintoshPlus computer TheMacintosh Pluspowersupplyoutputsremainwithinthe limitsshownin Table6-12 underall inputlinevoltagelimitsspecifiedin the section"PowerInputRequirements," earlierin thischapter,and underthe loadconditionshownin Table6-13. Chapter6 PowerSupplies 257 • Table6-12 Powersupplyoutputlimitsin the MacintoshPluscomputer Parameter Specification +5voltsupply 4.850V to 5.150V +12voltsupply 11.90V to 12.80V - 5 voltsupply -5.250V to -4.750V -12 voltsupply -13.00V to-11.30V • Table6-13 Totalpowerat DCoutputloadsfor the MacintoshPluscomputer load condition +5V +12V ~v -12V Total power Minimumload 3.0A 0.50A 5mA 75mA 21.9W Maximum load 4.5A 1.5A 50mA 500mA 46.8W Peak load• 4.5A 2.2A 50mA 500mA 55.2W *Fora periodof 15seconds,maximum, 10%dutycycle. Table6-14showsthe maximumrippleand switchingnoiseon the powersupplyoutputs underall specifiedloadconditionsand for inputvoltagesof 90 to 130V (rms)or 180to 260V(rms). • Table6-14 DCoutputrippleand switchingnoiseforthe Macintosh Pluscomputer +5V +12V -12V Linefrequencyripple 20mV 30mV 20mV 30mV Switchingnoise 40mV 40mV 40mV 40mV Note:Allrippleandnoisevoltagemeasurements are peak-to-peak. If the loadon the +5V supplyis steppedfrom3.5A to 4.5A or from4.5A to 3.5A,the peaktransientamplitudeis 125mVand the voltagerecoversto +5V± 15mVwithin10ms. Allotheroutputsare assumedto be undermaximumload,withan inputvoltageof 120V (rms)or 240V(rms). 258 Guideto the MacintoshFamilyHardware If the loadon the +12V supplyis steppedfrom0.50A to 1.50A or from1.50A to 0.50A, supplyvoltagesdo not varyfromthe voltagerangesspecifiedat the beginningof this section.Allotheroutputsare assumedto be undermaximumloadwithan inputvoltageof 120V(rms)or 240V(rms). Theadjustmentpotentiometer, R22,can varythe +5V supplyto be between4.6V and 5.4V underall loadconditionsforan inputvoltageof 120V (rms)or 240V(rms). MacintoshSE and MacintoshSE/30computers The outputsof the powersuppliesin the Macintosh SEand Macintosh SE/30computers remainwithinthe limitsshownin Table6-15underall inputlinevoltagelimitsspecifiedin the section"PowerInputRequirements,"earlierin thischapter,and underthe load conditionshownin Table6-16. • Table6-15 Powersupplyoutputlimitsfor the Macintosh SEand MacintoshSE/30computers Parameter Specification +5voltsupply 4.85Vto 5.20V +12voltsweepsupply 11.50V to 12.50V +12voltdisksupply 11.50V to 12.80V ..:.12 voltsupply -13.20V to -10.80V • Table6-16 Totalpowerat DCoutputloadsfor the Macintosh SEand MacintoshSE/30computers Loadcondition +5V +12V sweep +12Vdisk -12V Totalpower Minimumload 1.0A 0.9A 0.120A 20mA 17.0W Maximum load 6.0A 1.25A 2.1A 0.SA 76W Peakload• 6.0A 1.25A 4.0A• 0.SA 99W *Fora periodof 15seconds,maximum, 10%dutycycle.The+12Vdisksupplymaydropto 11.0Vduring thepeakload;the +5Vand-12Vsuppliesconformto thelimitslistedpreviously in thissection. Themaximumrippleandswitchingnoiseon the powersupplyoutputsunderallspecified loadand input-voltage conditionsare shownin Table6-17.Rippleand noisemeasurements assumeresistiveloadsare bypassedonlyby a 0.1µF ceramiccapacitorfor eachoutput. Chapter6 PowerSupplies 259 • Table6-17 DCoutputrippleand switchingnoisefor the Macintosh SEand MacintoshSE/30computers +5V +12V sweep +12Vdlsk -12V Linefrequencyripple 20mV 30mV 30mV 30mV Switchingnoise 40mV 50mV 50mV 50mV Note:Allrippleand noisevoltagemeasurements are peak-to-peak. If the loadon the +5V supplyis steppedfrom2.0A to 6.0A or from6.0A to 2.0A, the peaktransientamplitudeis 125mVand the voltagerecoversto +5V± 15mVwithin5 ms. Allotheroutputsare assumedto be undermaximumloadwithan inputvoltagefrom85V to 135V (rms)or 170Vto 270V(rms). If the loadon the +12V disksupplyis steppedfrom0.50A to 2.1A or from2.1A to 0.50A, supplyvoltagesdo not varyfromthe voltagerangesspecifiedin Table6-15.Allother outputsare assumedto be undermaximumloadwithan inputvoltagefrom85V to 135V (rms)or 170V to 270V(rms). If the loadon the -12 V supplyis steppedfrom0.02A to 0.15A or from0.15A to 0.02A, supplyvoltagesdo not varyfromthe voltagerangesspecifiedin Table6-15.Allother outputsare assumedto be undermaximumloadwithan inputvoltagefrom85V to 135V (rms)or 170V to 270V(rms). If the loadon any of the DCoutputsuppliesis steppedas specifiedin the preceding paragraphs,the +12Vsweepsupplymaintainsa voltageof+12V± 10mV. Witha ±100/4instantaneousvariationin the averageinputlinevoltageappliedfor 100ms, and withthe outputsloadedwithinthe limitsspecifiedin Table6-16,the +5V supplyvoltagedoesnot varyby morethan25mV,and the voltagerecoversto +5V± 15mVwithin5 ms. MacintoshPortablecomputer The outputsof the voltagecontrolcircuitson the mainlogicboardin the Macintosh Portableremainwithinthe limitsshownin Table6-18for inputof 5 mA to 1500mA of DC currentat 7.1to 7.6V,and underthe loadconditionshownin Table6-19. 2(,() Guideto the MacintoshFamilyHardware • Table6-18 Outputlimitsfor the voltage-control circuitsin the MacintoshPortablecomputer Parameter Specification +5voltsupply 4.95Vto 5.05V +12voltsupply 11.40V to 12.60V -5 voltsupply -4.95V to -5.5 V • Table6-19 Tot:,ilpowerat DCoutputloadsfor the MacintoshPortablecomputer loadcondidon +SV +12V Total power Minimumload 0.0A 0.0A 0.0A o.ow Maximum load 1.5A 0.SA 0.2A 14.5W Peak load 3.0A 0.0A* 0.0A* 15.0W °The+12Vand-5 Vpowersuppliesareswitchedoffduringthe power-onsequence. MacintoshIlcx and MacintoshIlci computers The outputof the powersupplyused in the Macintosh Ilcxand MacintoshIlci computers remainswithinthe limitsshownin Table6-20underall inputlinevoltagelimitsspecifiedin the section"PowerInputRequirements,"earlierin thischapter,and underthe load conditionshownin Table6-21. • Table6-20 Powersupplyoutputlimitsin the Macintosh Hexand MacintoshIlci computers Parameter Speciflcat1on +5voltsupply 4.9V to 5.2V +12voltsupply 11.5Vtol2.8V -12 voltsupply -13.2V to -10.8V Chapter6 PowerSupplies 261 • Table6-21 Totalpowerat DCoutputloadsfor the Macintosh Hexand MacintoshIlci computers I.oalcoocDdoo +SV +12V -12V Totalpower Minimumload 2A 20mA 20mA 10.5W Maximum load 12A I.SA IA 90W Peak load• 12A 3A• IA 108W -Fora periodof 15seconds,maximum,10%dutycycle.The +12V supplymaydrop to 11V duringthe peakload;the +5V and-12 V suppliesconfonnto the limitslistedpreviouslyin thissection. Themaximumrippleand switchingnoiseon the powersupplyoutputsunderallspecified loadand input-voltage conditionsare shownin Table6-22.Rippleand noisemeasurements assumeresistiveloadsare bypassedonlyby a 0.1µF ceramiccapacitorfor eachoutput. • Table6-22 DCoutputrippleand switchingnoisefor the Macintosh Ilcx and MacintoshIlci computers +SV +12V -12V Linefrequencyripple 20mV 30mV 30mV Switchingnoise 40mV S0mV S0mV Note:Allrippleand noisevoltagemeasurements are peak-to-peak. If the loadon the +5V supplyis steppedfrom3.0A to 6.0A or from6.0A to 3.0A,the peaktransientamplitudeis 125mVand the voltagerecoversto +5V± 15mVwithin5 ms. Allotheroutputsare assumedto be undermaximumloadwithan inputvoltagefrom 85V to 270V(rms). If the loadon the +12Vsupplyis steppedfrom0.5A to 1.0A or from1.0A to 0.5A, supply voltagesdo not varyfromthe voltagerangesspecifiedin Table6-20.Allotheroutputsare assumedto be undermaximumloadwithan inputvoltage_ from85V to 270V(rms). If the loadon the -12 V supplyis steppedfrom0.5A to 1.0A or from1.0A to 0.5A, supply voltagesdo not varyfromthe voltagerangesspecifiedin Table6-20.Allotheroutputsare assumedto be undermaximumloadwithan inputvoltagefrom85V to 270V(rms). Witha ±10%instantaneous variationin the averageinputlinevoltageappliedfor 100ms, and withthe outputsloadedwithinthe limitsspecifiedin Table6-21,the +5V supply voltagedoesnot varyby morethan25mV,and the voltagerecoversto +5V within5 ms. 262 Guideto the MacintoshFamilyHardware MacintoshII, MacintoshIIx, and MacintoshIIfx computers The outputsof the powersuppliesof MacintoshII, Macintosh IIx,and MacintoshIIfx computersremainwithinthe limitsshownin Table6-23underallinputvoltagelimits specifiedin the section"PowerInputRequirements," earlierin thischapter,and underthe loadconditionshownin Table6-24. • Table6-23 Powersupplyoutputlimitsfor the Macintosh II, Macintosh Ilx, and MacintoshIIfx computers Parameter Specification +5voltsupply 4.90V to 5.20V +12voltsupply 1L50V to 12.80V -12 voltsupply -13.40Vto-10.80V • Table6-24 Totalpowerat DCoutputloadsfor the MacintoshII, MacintoshIlx, and MacintoshIIfx computers loadcondition +SV +12V -12V Totalpower Minimum load 3.0A 20mA 20mA 15.5W Maximum load 18A 2.5A LOA 132W Peak load• 18A 4.SA• LOA 156W Maximumcapacitiveload 10,000µF 4700µF 4700µF "Fora periodof 15 seconds,maximum,10%dutycycle.The +12V supplymaydrop to 11V duringthe peakload;the +5V and-12 V suppliesconformto the limitslistedpreviouslyin thissection. Themaximumrippleand switchingnoiseon the powersupplyoutputsunderallspecified loadand input-voltage conditionsare shownin Table6-25.Rippleand noisemeasurements assumeresistiveloadsare bypassedonlyby a 0.1µF ceramiccapacitorfor eac~output. Chapter6 PowerSupplies 263 • Table6-25 DCoutputrippleand switchingnoisefor the Macintosh II, MacintoshIIx, and MacintoshIIfx computers +5V +12V -12V Linefrequencyripple 20mV 30mV 30mV Switchingnoise 40mV 50mV 50mV Note:Allrippleand noisevoltagemeasurements are peak-to-peak. If the loadon the +5Vsupplyis steppedfrom3.5A to 7.0A or from7.0A to 3.5A,the peaktransientamplitudeis 125mVandthe voltagerecoversto +5V± 15mVwithin 5 ms.Allotheroutputsare assumedto be undermaximumloadwithan inputvoltage from90V to 270V(rms). If the loadon the +12V supplyis steppedfrom0.50Ato 1.50A or from1.50A to 0.50A, supplyvoltagesdo not varyfromthe voltagerangesspecifiedin Table6-23.Allother outputsare assumedto be undermaximumloadwithan inputvoltagefrom90V to 270V(rms). If the loadon the -12 V supplyis steppedfrom0.50A to 1.00A or from1.00A to 0.50A, supplyvoltagesdo not varyfromthe voltagerangesspecifiedin Table6-23.Allother outputsare assumedto be undermaximumloadwithan inputvoltagefrom90V to 270V(rms). Witha ±100/4instantaneous variationin the averageinputlinevoltageappliedfor 100ms,and withthe outputsloadedwithinthe limitsspecifiedin Table6-24, the +5V supplyvoltagedoesnot varyby morethan25mV,and the voltagerecovers to +5V± 15mVwithin5 ms. Monitorpower receptaclein the M~cintoshII-familycomputers TheMacintosh II-familycomputershavea powerreceptacleon the backof the main systemunit,identifiedas the monitor poweroutputreceptacle in the owner'smanual. Table6-26showsthe poweravailableat thisreceptacle. 264 Guideto the MacintoshFamilyHardware • Table6-26 Specifications for the monitorpower outputreceptacleon the MacintoshII-familycomputers Parameter Specification Output voltage Sameas power-supplyinputvoltage Outputcurrent 3 A, maximumsteady-state Outputpower 300VA,maximum Peak output current 40A Fuse _6A,250V Responsesto abnormalconditions A crowbarcircuitin the MacintoshPlusshortsout the powersupplyand stopsthe flyback oscillatorwhenthe +5V outputis between5.35V and 6.25V. If any output of the MacintoshSE,MacintoshSE/30,or MacintoshII-familtycomputeris shortcircuitedto ground(that is, connectedto groundthroughapproximately100 milliohmor less),the powersupplyshutsdownwithin25ms.TheMacintosh SE, Macintosh SE/30,and Macintosh Hexpowersuppliesshutdownwithin25ms if for any reasonthe +5V outputexceeds+6.5V,or either+12V outputexceeds+16V,or the -12 V outputexceeds-16 V. If the heat sink of the primaryswitchingdevicesin a Macintosh II-familypowersupply exceedsa temperatureof 125°C,the powersupplyshutsdown.Beforeshuttingdown,the powersupplypullsthe /PFWsignalowforat least2.2ms. TheMacintosh II-familypowersupplyalsopullsthe /PFWsignalbelow+0.6Vwhenit detectsan inputvoltagefailure.The powersupplykeepsall outputvoltageswithinthe limitsspecifiedin the previoussectionfor at least2.2ms afterit has pulledthe /PFW signalow. Chapter6 PowerSupplies 265 Power circuit in the MacintoshPortablecomputer The Macintosh Portablepowercircuitincludesthe followingcomponents: • an externaltransformer and voltageconverter,referredto as the batterycharger, that providesDCpowerto·the mainsystemunit • voltagecontrolcircuitson the logicboardthatprovide+5V,+12V,and -5 V to the rest of the system • a batterymonitorand batterychargingcircuiton the logicboard • a microprocessor, calledthe PowerManager IC,on the logicboard Whenthe batteryis initiallyconnectedto the powercircuit,the MacintoshPortable computerstartsup, and the PowerManagerICand batterymonitorbeginmonitoringthe stateof the system.As longas the batterymaintainsa voltageof-5.74voltsor above,the systemremainswitchedon. ThePowerManagerICmonitorsbatteryvoltageand shuts the systemdownwhenthe voltagedropsbelow5.74volts,maintaining powerto system RAMand to itself.If the userplugsin the batterychargerbeforethe voltagedropsbelow 5.65volts,the PowerManagerICbringsthe systembackup withno lossof datawhenthe batteryvoltagereaches5.74volts.However,if the voltagecontinuesto drop and reaches 5.65volts,the batterymonitorhardwareremovespowerfromall components,including RAMandthe PowerManagerIC,and alldata(includingparameterRAM)is lost. Anytimethatthe userchoosesSleepfromthe Specialmenuor froma deskaccessory,or wheneverthe operatingsystemdeterminesthatthe systemhas been idlefortoo long,the PowerManagerfirmwareputsthe Macintosh Portablecomputerintoa low-power- consumptionstateknownas the sleep state. Batterychargerandvoltagecontrolcircuits TheMacintosh PortablebatterychargerrectifiesAClinepowerto DCand transformsit to 7.5± 0.1V,whichis inputto the mainsystemunitthroughthe connectordescribedin the section"PowerConnectors,"earlierin thischapter.The batterychargercan acceptinput powerof 85V to 270V,and limitsoutputcurrento 1.5A. TheMacintoshPortablevoltage-controlcircuitson the logicboardgeneratethree voltages:+5V, +12V, and -5 V.The outputspecificationsfor the voltagecontrolcircuits are givenin the section"DCOutputSpecifications," earlierin thischapter. 2---~ Y2 270. 270. PB5 - SCC(8530) Xl /DCDA Yl 270. 270. Yl /DCD8 - Note: Rl R2 ~=~ .:c,C - (Rl + R2= 40 to 60ohms,C = 150to 300pF) Chapter7 MacintoshPlus Mouseand Keyboard '1:19 Macintosh Plus keyboard Theswitchesin the keyboardare wiredin a two-dimensional arraycalleda keyswitch matrix.The keyboardfor the MacintoshPluscontainsa microprocessor that scans the matrixto detectswitchtransitionsas keysare pressedand releasedand reports those transitionsas key-downand key-upevents.The microprocessor containsits own ROMand RAM,and is programmedto conformto the interfaceprotocoldescribed later in this chapter. The keyboardfor the MacintoshPluscomputerhas a built-innumerickeypadand arrow keys not includedon the keyboardsof earlierMacintoshmodels(Macintosh128K, Macintosh512K,Macintosh512Kenhanced).In all other respects,the operationof the MacintoshPlus keyboardis identicalto that of the earlierMacintoshkeyboards. The MacintoshPlus keyboardinterface The keyboardis connectedto the Macintoshthrougha four-wire~-11 telephone-style connector,locatedon the frontof the computer.Figure7-4showsthe pinoutfor the keyboardconnectorused on the computerand the keyboard.Table7-3showsthe keyboardconnectorsignalassignments. • Figure7-4 Pinoutof the RJ-11keyboardconnectorin the MacintoshPluscomputer 280 Guideto the MacintoshFamilyHardware • Table7-3 Signalassignmentsfor the keyboardconnectorin the MacintoshPluscomputer SJgoalname Signaldescription 1 GND Ground 2 CLOCK KeyboardClock(inputto VIA) 3 DATA KeyboardData(senal) 4 +5V +5 volts • Warning Alldevicesconnectedto the Macintosh Plusmustnot drawa combinedcurrentof morethan 200milliampsat +5voltsfromall connectors.._ Figure7-5showsthe circuitdiagramfor the keyboardinterfacein the MacintoshPlus computer. • Figure7-S Circuitdiagramof the keyboardinterfacein the MacintoshPluscomputer CCCCCCCCC CCC CCCCCCCCC CCC = CCCCCCCCC CCC CCC 6S22(VIA) CB2 750 Keyboardclock +5V Keyboard syncbronl7a data PAL 47kn CBl 68oo 270 Q Keyboard C clock E2 E E Chapter7 Macintosh PlusMouseand Keyboard 281 MacintoshPlus keyboardcommunication On·theMacintosh Plusand earlierMacintosh computers,the KeyboardDatalineis bidirectional, drivenat sometimesby the computer,and at othertimesby the keyboard, but the KeyboardClocklineis drivenonlyby the keyboard.Alldatatransfersare synchronous withthe signalson the KeyboardClockline,and eachtransmissionconsists of 8 bits,with the highest-orderbit first. Whensendingdata to the computer,the keyboardtransmitseightcyclesof 330µs each (160µslow, 170µs high)on the normallyhighKeyboardClockline.It placesa databiton the dataline40 µs beforethe fallingedgeof eachclockcycleand maintainsit for 330µs. TheVIAin the computerlatchesthe data bit intoits Shiftregisteron the risingedgeof the KeyboardClocksignal. Whenthe computeris sendingdata to the keyboard,the keyboardtransmitseightcycles of 400µs each(180µslow, 220µs high)on the KeyboardClocklirie.Onthe fallingedgeof eachkeyboardclockcycle,the MacintoshPlusplacesa databit on the data lineand holds it therefor 400µs. Thekeyboardreadsthe databit 80 µs afterthe risingedgeof the KeyboardClocksignal. Onlythe computercan initiatecommunication overthe keyboardlines.Whenthe computerand keyboardare turnedon, the computeris in chargeof the keyboard interfaceand the keyboardis passive.Thecomputersignalsthat it is readyto begin communication by pullingthe KeyboardDatalinelow.·upon detectingthissignal,the keyboardstartssendinga KeyboardClocksignal,and the computerespondsby sending an 8-bitcommandoverthe KeyboardDataline.Thelastbit of the commandleavesthe KeyboardDatalinelow;the computerthen indicatesthat it is readyto receivethe keyboard'sresponseby settingthe KeyboardDatalinehigh. Thefirstcommandthe computertransmitsis the ModelNumbercommand.The keyboard'sresponseto thiscommandis to resetitselfand send backits modelnumberto the computer.If the computerdoes not receivea responsewithin0.5second,it transmits the ModelNumbercommandagain. Oncethe computerhas successfullyreceiveda modelnumberfromthe keyboard,normal operationbegins.Thecomputersendsthe Inquirycommand;if a keyhas been pressedor released,the keyboardsendsbacka key transitionresponse.If no key transitionhas occurredafter0.25second,the keyboardsendsbacka Nullresponseto let the computer knowit'sstillthere.Thecomputerthensendsthe Inquirycommandagain.In normal operation,the computersendsan Inquirycommandevery0.25second.If it receivesno responsewithin0.5second,it assumesthe keyboardis missingor needsresetting,so it beginsagainwiththe ModelNumbercommand. 1.82 Guideto the MacintoshFamilyHardware Thereare two othercommandsthat the MacintoshPluscomputercan send:the Instant command,whichgets an instantkeyboardstatuswithoutthe 0.25secondtimeout,and the Testcommand,to performa keyboardself-test.Table7-4summarizesthe commands that can be sent fromthe MacintoshPluscomputerto the keyboard. • Table7-4 Keyboardcommandsin the MacintoshPluscomputer Coonnaocl IJalDe Value Keyboard response Inquiry $10 Keytransitioncodeor Null($7B) Instant $14 Keytransitioncode or Null($7B) ModelNumber $16 Bit0: 1 Bits1-3: keyboardmodelnumber,1-8 Bits4-6:next devicenumber,1-8 Bit7: 1 if anotherdeviceconnected Test $36 ACK($7D) or NAK($77) The key transitionresponsesare sent out by the keyboardas a singlebyte:bit 7 high meansa key-uptransition,and bit 7 lowmeansa key-downtransition.Bit0 is alwayshigh. The key transitionresponsesfor key-downtransitionsfromthe U.S.and international keyboardsare shown(in hexadecimal) in Figure7-6. MacintoshPlus keyboardand keypadprotocol The MacintoshPluskeyboardproducesall the key-downtransitionsproducedby the keyboardand optionalkeypadused by earliermodelsof the Macintoshcomputer;the MacintoshPluskeyboardis completelycompatiblewith those computers.(For descriptions,pleasereferto the next section,"EarlierKeyboardand SeparateKeypad.") Somekeyson the MacintoshPluskeyboardreproducethe protocolof the separate keypadused withthe earliermodels,describedin the latersection"Communication Protocolfor the SeparateKeypad."If a key transitionoccursfor one of the arrowkeys-- whichare lowercasekeyson the separatekeypad-the MacintoshPluskeyboardresponds to an Inquirycommandby sendingbackthe Keypadresponse($79)followedby the code shownin Figure7-6.If a keytransitionoccurson the Macintosh Plusnumerickeypadfor the plussign(+), asterisk(•), orslash(/) keys-which are uppercasekeyson the separate keypad-the MacintoshPluskeyboardrespondsto an Inquirycommandby sendingback the Shiftkey-downtransitionresponse($71),followedby the Keypadresponse($79), followedby the codeshownin Figure7-6. Chapter7 Macintosh PlusMouseand Keyboard 1.83 • Figure7-6 Key-downtransitioncodesin the Macintosh Pluscomputer(hexadecimal) 65 Clear = OF 11 I 1B • 05 7 8 9 - 33 37 39 1D Return 4 5 6 + 4 2D 2F 31 OD i 1 2 3 Enter 1B 27 29 2B Option • J. 0 75 25 0~ 19 Theseresponsecodesare not the sameas the keycodesreturnedby the KeyboardDriver software.Forthe mainkeyboard,exceptfor the arrowkeys,the KeyboardDriverstrips offbit 7 of the responsecodeand shiftsthe result1 bit to the right,removingbit 0. For example,a keytransitionresponsecodeof $33fromthe keyboardis returnedas $19by the KeyboardDriver,and $2Bis returnedas $15. Forthe numerickeypadand the arrowkeys,the KeyboardDriverstripsoffbit 7 of the responsecode,shiftsthe result1 bit to the right,removingbit 0, and adds$40to the result.Forexample,a keytransitionresponsecodeof $33fromthe numerickeypadis returnedas $59by the KeyboardDriver,and $2Bis returnedas $55. Earlierkeyboardand separatekeypad Theearliermodelsof the Macintosh computer-theMacintosh128K,512K,and 512Kenhanced- useda smallerkeyboardwithan optionalseparatekeypad.Figure7-7showsthe responsecodesfor key-downtransitionson that earlierkeyboard(in hexadecimal). The next sectiondescribesthe operationof the separatekeyboardand keypad. 284 Guideto the MacintoshFamilyHardware • Figure7-7 Keyboardtransitioncodesin the Macintosh128K,Macintosh512K,and Macintosh512Kenhancedcomputers(hexadecimal) Return 49 Shift Shift 71 (Space) 63 U.S.keyboard § - • 65 61 7 • 71 keyboard(U.K.keycapsshown) International Notethat,as for the MacintoshPluskeyboard,these responsecodesare differentfrom the key codesreturnedby the KeyboardDriversoftware.TheKeyboardDriverstripsoff bit 7 of the responsecodeand shiftsthe result1 bit to the right,removingbit 0. For example,a key transitionresponsecodeof $33fromthe keyboardis returnedas $19by the KeyboardDriversoftware,and $2Bis returnedas $15. Chapter7 Macintosh PlusMouseand Keyboard 28S Communicationprotocol for the separatekeypad Earliermodelsof the Macintoshcomputer(Macintosh128K,512K,and 512Kenhanced) use an optionalseparatekeypad.To installthe keypad,the user insertsit betweenthe keyboardand the computer;that is, the user plugsthe keypadcableinto the connector on the frontof the computerand plugsthe keyboardcableintoa connectoron the numerickeypad.In this configuration, the timingsand protocolfor the clockand data linesworka littledifferentlyfromthose for the keyboardalone:the keypadacts likea keyboardwhen communicating withthe computer,and actslikea computerwhen communicating overtheseparateclockanddatalinesgoingto thekeyboard. All commandsfromthe computerare receivedby the keypadinsteadof the keyboard,and onlythe keypadcan communicatedirectlywith the keyboard. Whenthe computersendsan Inquirycommand,one of two thingsmayhappen, depending on the state of the keypad. If no key transitions have occurred on the keypad sincethe last Inquirycommand,the keypadsendsan Inquirycommandto the keyboard and, later,retransmitsthe keyboard'sresponseback to the computer.But if a key transitionhas occurredon the keypad,the keypadrespondsto an Inquiryby sending back the Keypadresponse($79)to the computer.In that case,the computerimmediately sends an Instantcommand,and this timethe keypadsendsback its own key transition response.& withthe keyboard,bit 7 highmeanskey-upand bit 7 lowmeanskey-down. The responsesfor key-downtransitionsforthe keypadare shownin Figure7-8. • Figure7-8 Key-downtransitioncodesfor the separatekeypad(hexadecimal) aear - SJ CE OF 1D OD 05 7 8 9 ~ 33 37 39 lB 4 5 6 Iii 2D 2F 31 11 1 2 3 Enter 27 29 2B 0 25 03 19 Notethat these key-downtransitionresponsecodes are differentfromthe key codes returnedby the KeyboardDriversoftware.The KeyboardDriverstripsoff bit 7 of the responsecode,shiftsthe result1 bit to the right,removingbit 0, and adds $40to the result.For example,a key transitionresponsecode of $33fromthe optionalkeypadis returnedas $59by the KeyboardDriversoftware,and $2Bis returnedas $55. 286 Guideto the MacintoshFamilyHardware Chapter8 AppleDesktopBus TheAppleDesktopBus(ADB)is a serialbus usedfor inputdevicessuch as keyboards,mousedevices,and graphicstablets.TheADBis Apple's standardinterfacefor inputdevices;it is used on the AppleIIGSas well as the followingMacintoshmodels: • MacintoshSE • MacintoshSE/30 • MacintoshPortable • MacintoshII • MacintoshIlx • MacintoshHex • Macintoshlid • MacintoshIlfx In additionto the ADBinterface,this chapterdescribesthe Apple StandardMouse,the MacintoshPortabletrackball,the AppleStandard Keyboard,and the AppleExtendedKeyboard.Thischapteralso describesthe protocolsand signalsused on the ADBfor communications betweenthe computerand ADBdevices,and the internalregistersused by ADBdevices. 6. Important AppleComputer,Inc.ownspatentson the Apple DesktopBus(ADB).If you wishto makea devicethat workswiththe AppleDesktopBussoftware,you must obtaina licenseand DeviceHandlerIDfromApple Computer,Inc. Writeto this address: AppleSoftwareLicensing AppleComputer,Inc. 20525MarianiAvenue,MailStop28-B Cupertino,California95014c,. Mouse& keyboard Macintosh MacintoshPlus ADB MacintoshSE ADB MacintoshSE/30 SpecialADB, trackball MacintoshPortable ADB MacintoshII ADB MacintoshIlx ADB MacintoshIlcx ADB MacintoshIlci ADB MacintoshIlfx 288 FamilyHardware Guideto the Macintosh Overview TheAppleDesktopBusis a single-master,multislave serialbus usedto communicatewith up to 16 low-speedinputdevicessuchas keyboards,mousedevices,and graphicstablets. On all Macintoshmodelsexceptthe MacintoshPortableand the Macintosh Ilfx,the Apple DesktopBushardwareconsistsof the followingcomponents: • ADBtransceiver IC,a 4-bitmicrocontroller that drivesthe bus and readsthe statusof the ADBdevices • VIAICthat providesthe interfacebetweenthe ADBtransceiver ICand the computer's CPU(an MC68000, MC68020,or MC68030, dependingon the model) • twoADB4-1>in connectors,hookedup in parallel;the ADBconnectorsare locatedon the rearpanelof the computerand are usedforattachingADBinputdevices In the Macintosh Portable,the PowerManagerICservesas the ADBtransceiver. ADB deviceson the Macintosh Portablemusthavelowpowerconsumption. In the MacintoshIlfx,the functionsof the ADBtransceiverare incorporatedinto an ApplecustomIC,the IOP.TheIOPworkswithanothercustomIC,the OSS,and supports the ADBconnectorsin the samewaythatthe ADBtransceiverdoeson othermembersof the MacintoshII family.For informationaboutthe IOP,pleasereferto the section"IOPs in the MacintoshIlfxComputer"in Chapter3. TheADBhardwareprovidedby peripheraldeviceson the ADBnetworkconsistsof the followingcomponents: • ADBtransceiver ICin eachADBperipheraldevice • four-conductor shieldedcableusedto connectthe ADBdeviceto the ADB 6. Important Althoughthe ADBtransceiveris capableof addressingup to 16 morethan 3 devicesis not differentperipheraldevices,daisy-chaining recommended becauseof connectoresistanceand signal degradation.t::,. TheADBtransceiverICin the computerconvertsthe computer's111 signalsto the variable-pulse-width open-collector signalusedon the bus.Whenthe bus is idle,the transceiverperformsautomaticpollingof the ADBdevicethat lastsent data. Chapter8 AppleDesktopBus 28'J Thecomputertransfersdatato and fromthe ADBtransceiverICby usingthe Shiftregister in the VIAto sendand receivethe TI1 signals.TheShiftregistercontainsthe 8 databits thathavebeen shiftedin fromthe ADBtransceiver, or the 8 bitsthatare to be shifted out.In additionto the ADBdataline,thereare severalcontrolinesbetweenthe VIAand the ADBtransceiver. Thesecontrolinesare usedto timeand sequencetransactions betweenthe VIAand the ADBtransceiver. • Note:On Macintosh modelsthathavetwoVIAICs,VIAl is the interfaceto the ADB. Whenthe computeris startedup or reset,eachADBperipheraldevicedefaultsto an ADB deviceaddressfrom$00through$OF.Certaindefaultaddressesare usedby specific devicetypes;for example,relative-position devices(suchas a mousedevice)alwayshave a defaultADBaddressof $03.In the caseof twoor moredeviceswiththe samedefault address,the StartManagerassignsa new(unique)addressto one deviceat a timeuntilall conflictsare eliminated. .& Warning Do not unplugand reattachan ADBdevicewhilethe computeris running-if you do, the devicerevertsto its defaultaddresswhilethe computercontinuestryingto reachit at the addressassignedat startuptime. • EachADBdevicehas a defaultidentification codeknownas a DeviceHandlerID,stored in an internalregister.TheADBManagerkeepstrackof the DeviceHandlerIDand the defaultaddressof eachdeviceon the bus,and callsthe appropriatedevicedriverwhen that devicehas data to send to the computer. An ADBdevicecannotinitiatea data transaction.Instead,each deviceassertsa Service Requestsignalwhenit has datato sendto the computer.TheADBManagerthen attempts to readeachdeviceon the bus untilone respondsby sendingdata.Whena device responds,the ADBManagerpassescontrolto the appropriatedevicedriver,which communicates withthe devicethroughthe VIAand the ADBtransceiver. TheADBcommunication protocoland the functionsof an ADBdevice'sinternalregisters are describedin detailin the sections"ADBCommunications" and "ADBPeripheral Devices,"laterin thischapter.Formoreinformation on the VIA,see Chapter4. 290 Guideto the Macintosh FamilyHardware ADB interface TheADBconnectorpinoutsareshownin Figure8-1.TheADBconnectorsignal assignmentsare listedin Table8-1.The electricalcharacteristics of the ADBdata lineand of ADBdevicesare listedin Table8-2. • Figure8-1 Pinoutof the ADBconnector • Table8-1 Signalassignmentsfor the ADBconnector PinNumber Sigoalname Signaldescription 1 ADB Bidirectional data bus used for input and output. It is an open-collectorsignalpulledup to +5V througha 470Q resistoron the computer'smain logicboard. 2 POWER.ON On the Macintosh II family,a key on the ADB keyboardmomentarily groundsthis pin to pin 4 to switchon the powersupply.On othermodels,this pin is not connected. 3 +5V +5 volts 4 GND Ground Chapter8 AppleDesktopBus 291 • Table8-2 Electricalcharacteristics of the ADBtransceiver Parameter Lowinputsignalvoltage -0.2V 0.8V Highinputsignalvoltage 2.4V 5.0V Lowoutputsignalvoltage 0.45V (at 12mA) Highoutputsignalvoltage 2.4V Deviceoutputcurrentwhenoff -20 µA (at 0.4V) Deviceinput capacitance 150pF ADBinterfacecircuits TheADBinterfaceis functionally the sameon all Macintoshmodelsexceptthe Macintosh Plusand earliermodels,whichdon'tuse it, and the Macintosh Portable,which has its own uniqueADBimplementation. Fora descriptionof the ADBinterfaceon the MacintoshPortable,see the sections"MacintoshPortablePowerManagerICAs ADB Controller"and "MacintoshPortableKeyboardProcessor,"laterin this chapter. Figure8-2showsa circuitdiagramfor the ADBinterfaceon the Macintoshmodelsthat do not havethe keyboardpower-onfeature(Macintosh SEand MacintoshSE/30computers). Figure8-3showsa circuitdiagramfor the ADBinterfaceon the MacintoshII, Macintosh Ilx, Macintosh Ilcx,and Macintosh Ilci computers,whichdo havethe keyboardpower-on feature.Figure8-4showsa circuitdiagramfor the ADBinterfaceon the Macintosh Ilfx computer,whichalsohas the keyboardpower-onfeature.Figure8-6showsa circuitdiagram for the ADBinterfaceon the MacintoshPortablecomputer.Becausethe Macintosh Portableis alwayson, it doesn'thavethe keyboardpower-onfeature. 292 Guideto the MacintoshFamilyHardware • Figure8-2 Circuitdiagramfor the ADBinterfaceon Macintosh SEand MacintoshSE/30computers AppleVIA AppleDesktop Bus n.c. (6522) traoscdver ADB.DATA +SV +SV CB2 DIO ADB.CLOCK CBl SCLK ADBI +SV ADB ADBO ADB /ADBO GND ADB.STl PBS STl PB4 ADB.STO STO /ADB.INT PB3 /INT osc 3.672MHz +SV n.c. ADB Chapter8 AppleDesktopBus 293 • Figure8-3 Circuitdiagramfor the ADBinterfaceon MacintoshII, MacintoshIlx, MacintoshHex,and MacintoshIlci computers ~ POWER.ON AppleDesktopBus VIA1 +5V transceiver CB2 ADB.DATA DIO CBI ADB.CLOCK SCLK ADBI +5V ;IDB ADBO /ADBO GND PB5 ADB.STl STl PB4 ADB.STO STO GND PB3 /ADB.INT /INT osc 3.672MHz +5V POWERON .01µFJ; Topower- .OlµF~ controlcircuit 294 Guideto the MacintoshFamilyHardware • Figure8-4 Circuitdiagramfor the ADBinterfaceon the Macintosh Ilfxcomputer +5V POWER.ON SWIM-ADB IOP +5V FDQI ADB GPIN0 /FDBO GPOUTO GND IOCLK 15Ji672 MHz POWER.ON +5V .01µFJ; Topower- .01µFT controlcircuit rh ~ Important ADBdevicesmayuse the +5voltssuppliedby the bus,but allthe ADB devicescombinedmustnot drawmorethana totalof 500mA. t:,,. Cableshouldbe no longerthan5 meters,and cablecapacitance shouldnot exceed100 picofaradspermeter.Althoughthe ADBis capableof addressingup to 16different peripheraldevices,daisy-chaining morethan3 deviceson oneADBport is not recommendedbecauseof connectoresistanceand signaldegradation. Chapter8 AppleDesktopBus 295 ADBinterfacecircuitson the MacintoshPortable In a departurefromthe usualMacintoshimplementation, the ADBtransceiverfunctionon the MacintoshPortableis performedby the PowerManagerICand the keyswitch encodingis done by a separatekeyboardprocessorIC.Boththe PowerManagerICand the keyboardprocessorare locatedon the mainlogicboard. ~ Developertip TheADBdeviceprotocoland the devicecontrolcommandsare the same on all ADB-equipped Macintoshcomputers.However,different modelsmayuse differenthardwareto implementthe ADB,as in the case of the MacintoshPortable.To ensurecompatibilitywith all Macintoshcomputers,it is importanthat you use the routinesand toolsprovidedat the systemlevelfor controllingthe ADB,as discussedin InsideMacintosh.4 · MacintoshPortablePowerManagerICas ADBcontroller The PowerManagerICperformsthe functionsthat are performedby the ADBbuffer, transceiver,and driverhardwarein othermembersof the Macintoshfamily.ThePower ManagerICtransmitsthe ADBdatathroughthe VIAto the MC68HC000 CPU. As in otherMacintoshcomputers,the MacintoshPortableoperatingsystemimplementsa keyboardmappingresourceto map key codesto Apple-extended ASCIIcodes(Return= $0D= 00001101binary).Changesto thisresourceallowlocalization usingvarious charactersets.Referto Chapter3 in TechnicalIntroductionto theMacintoshFamilyfor a software-orienteddiscussionof the mappingoperation. MacintoshPortablekeyboardprocessor The keyboardprocessoris a Mitsubishi M50740single-chipmicrocomputer. TheM50740is an 8-bitmicrocomputer in a 50-pinquad flatpackage(QFP).Its distinguishing featuresare • 3072bytesof ROM • 96 bytesof RAM • 15 mWpowerdissipation • 8-bit timer • 32 programmable 1/0 ports 296 Guideto the MacintoshFamilyHardware The functionsof the keyboardprocessorin the MacintoshPortableare the sameas those performedby the microprocessors foundinsideotherApplekeyboards.In the Macintosh Portable,however,the keyboardprocessorphysicallyresideson the mainlogicboard insteadof on the circuitboard in the keyboard. Theswitchesin the keyboardare wiredin a two-dimensional arraycalleda keyswitch matrix.The keyboardprocessorscansthe matrixin the keyboardand numerickeypadto senseswitchtransitionsas keysare pressedand released.The keyboardprocessor communicates withthe CPUthroughthe ADB,sendingan 8-bitbinarycode characterizing the key transition.(Forexample,the Returnkey has the 8-bittransitioncode $24.) MacintoshPortablekeyboardandtrackballconnectors The MacintoshPortablehas two connectorsin the keyboardarea on the frontpart of the case.The connectorsare positionedto permitthe installationof the trackballon either sideof the keyboard.Figure8-5showsthe pinoutof the 34-pinconnectorsused for the keyboardand trackball.Table8-3showsthe signalassignments on thoseconnectors. • Figure8-S Pinoutof the keyboardand trackballconnectorson the Macintosh Portablecomputer @©©©@@@@@@@@@@@@® 0000®@@@®@®@@@@@® Chapter8 AppleDesktopBus '}}J'1 • Table8-3 Signalassignmentsfor the keyboardand trackballconnectorson the MacintoshPortablecomputer Plnnumbcr Sigoalname Sigaaldescription 1 GND3 Chassisground 2 XO SwitchmatrixlineXO 3 Xl SwitchmatrixlineXl 4 X2 SwitchmatrixlineX2 5 X3 SwitchmatrixlineX3 6 X4 SwitchmatrixlineX4 7 X5 SwitchmatrixlineX5 8 X6 SwitchmatrixlineX6 9 X7 SwitchmatrixlineX7 10 XS SwitchmatrixlineXS 11 X9 SwitchmatrixlineX9 12 XlO SwitchmatrixlineXl0 13 YO SwitchmatrixlineYO 14 Yl SwitchmatrixlineYl 15 Y2 SwitchmatrixlineY2 16 Y3 SwitchmatrixlineY3 17 Y4 SwitchmatrixlineY4 18 Y5 SwitchmatrixlineY5 19 Y6 SwitchmatrixlineY6 20 Y7 SwitchmatrixlineY7 21 CAPS.LOCK CapsLockkey switch 22 SHIFT Shiftkey switch 23 CONTROL Controlkey switch 24 OPTION Optionkey switch 25 COMMAND Commandkey switch 26 GNDl Key-switchground 27 GND2 ADBsignalground 28 (spare) 29 ADB.DATA Bi-directional serialdata 30 BUTTON Buttonswitch(on trackball) 31 n. c.• Not connected 32 n. c.• Not connected 33 (spare) 34 GND3 Chassisground °ToidentifyISO(European)keyboards,pins31 and 32 are connectedto eachotheron thosekeyboards. Figure8-6showsthe ADBinterfacethroughthe PowerManagerIC.Thefigurealsoshowshow the keyboardprocessorreadsthe switchmatrixand sendssignalsto the ADBinterface. 298 Guideto the MacintoshFamilyHardware • Figure8-6 Circuitdiagramof the ADBinterfaceon the MacintoshPortablecomputer Power VIA IC PAO.___VIA=O_.,.. P20 +5V PAI VIAi P21 PA2 VIA2 P22 PA3 VIA3 P23 PA4 VIA4 P24 PA5 VIA5 P25 10kn 470n ADB 6 FDBt-+---+-_.,._ ___ =-::,__--~ PA6 VIA P26 VIA7 PMGCLK Keyboard rocessor lOkO 470n FDBt-~-....,_---------~ NETOlt------4.,__----4 Chapter8 AppleDesktopBus 29':J ADD keyboardsand mouse Thereare twoADBkeyboardoptionsavailablefromAppleComputer,Inc.:the Apple StandardKeyboardand the AppleExtendedKeyboard.Applealsoprovidesan Apple StandardMousedevicewitheachADB-equipped Macintoshcomputer.The mouseand keyboardscommunicate withthe mainlogicboardby way of the ADBinterface. ~ Developer tip Yourapplications shouldreadall keyboardand mousedataby using the EventManagerandWindowManagerso thatyourprogramwillbe compatiblewithearlierMacintoshcomputers,whichdo not use the ADB,and withthe MacintoshPortable,whichuses differentADB hardware.TheEventManagerand the WindowManagerare described in InsideMacintosh.~ AppleStandard Mouse TheAppleStandardMouseis usedby allApplecomputersthathavethe AppleDesktop Busexceptthe Macintosh Portable,whichusesa low-powermodelof the Applemouse and alsohas a low-powertrackball(see the section"Macintosh PortableLow-Power Trackball," laterin this chapter. A microprocessor in the AppleStandardMouseprovidespositionand statusinformation to the computer.ThemousemechanismreportsrelativeX 0eftand right)and Y (up and down)motionand indicateswhenthe mousebuttonis pressed.Thismicroprocessor also functionsas an ADBtransceiverchip,whichcommunicates withthe ADBtransceiverchip in the computer.The computer'sADBtransceiverchipreceivesthe mouseinformation and sendsit to the VIA.Routinesin the ROMconverthis information intothe corresponding motionof the pointeron the screen. Themouseoperatesby sendingsquare-wave signalsto the mousemicroprocessor as the mousemoves.A rubber-coated steelballin the mouseturnsas the mouseis movedand contactstwo capstans,eachconnectedto a slottedwheelcalledan interrupterwheel. Motionin the mouse'sX-axisdirectionrotatesone of the wheelsand motionin the Y-axis directionrotatesthe otherwheel. 300 Guideto the MacintoshFamilyHardware Beamsof lightare alternatelytransmittedand blockedby the slotsin the interrupter wheel,and photodetectors~ the resultingsquare-wave signalto the mouse microprocessor. The microprocessorinterpretsthesesignalsto determinethe distance travelledin the X andY directionsand passesthe informationto the MouseDriver softwareby wayof the ADBtransceiverand the VIA. Themousemechanism usesa schemeknownas quadrature to determinethe directionthe mouseis movingalongeachaxis.Twobeamsof infraredlightshinethroughthe slotsin the interrupterwheeland strikeone of two lightdetectors.The detectorsare offsetjust enoughso that,as the wheelturns,theyproducetwosquare-wave signalsthatare 90°out of phase.Thesesignalsarecalledthe interruptsignalandthe quadraturesignal.The quadraturesignalprecedesthe interruptsignalby90°whenthewheelturnsoneway,and trailsit whenthe wheelturnsthe otherway. • Note:Themouseusedin the Macintosh Plusand earlierMacintosh computersendsthe square-wave signalsgeneratedby the interrupterwheelsdirectlyto the computer, wheretheyare interpretedby the MouseDriversoftware.TheMacintosh Plusmouseis describedin Chapter7, "MacintoshPlusMouseand Keyboard." Figure8-7showsthe AppleStandardMousemechanism.Thesquare-wave signalsin this figurearethosegeneratedwhenthe mouseis moveddownward. Themousemotioninformation is storedin registerOin the ADBtransceiver ICin the mouse.(Theregistersin peripheraldevicesare describedin the section"ADBDevice Registers," laterin thischapter.)Thecontentsof ADBregisterOin the AppleStandard Mouseareshownin Table8-4. • Table8-4 ADBtransceiverregisterOin the AppleStandardMouse Bit 15 Buttonstatus;0 = down 14-8 Y movecounts• 7 Notused(always1) 6-0 X movecountst fonn.Negative=up, positive=down. 'Two's-complement 1Two's-complement fonn.Negative•left,positive=right. Chapter8 AppleDesktopBus 301 • Figure8-7 Mechanismof the AppleStandardMouse 11.Wl ,, JmJl ADB tramceiver Yl Y2 X1 X2 L ________________________________ _J ADB Computerr------------------------------ --7 I I I I I I I I I I I I I .__..__..__. I : CPU VIA ADB : L ______________________________ wer J transce' • Note:Fora DeviceHandlerID of $0001,the mouseaccumulates l0o±lOcountson each axis for each inchof travelin thataxis. Fora DeviceHandlerID of $0002,the mouse accumulates20o±10countson each axis for each inchof travelin that axis. On startup or reset,the mousehas a DeviceHandlerID of $0001. ~ Developer tip The transferof mousedata is handledautomatically by the ADB Managerand the MouseDriver.To ensurecompatibility withall Macintoshcomputers,yoursoftwareshouldalwaysuse EventManager and WindowManagercallsto determinemousemotionand the state of the mousebutton. 4 302 Guideto the MacintoshFamilyHardware The ADBtransceiverin the mousetransmitsthe data to the ADBtransceiverin the computer,whichtransmitsit to the Shiftregisterin the VIA.The MouseDriverreadsthe informationin the VIA'sShiftregister,interpretsthe data, and translatesit into cursor motionon the screenas appropriate.Usingthe mouse-tracking optionon the Control Paneldesk accessory,the user can changethe amountof screen-pointermotionthat correspondsto a givenmousemotion.For moreinformationabout the rate of mouse motion,see the discussionof parameterRAMin the chapteron OperatingSystemUtilities in InsideMacintosh. MacintoshPortablelow-power trackball • Insteadof a mouse,the MacintoshPortableuses a low-powertrackballthat works somethinglike an upside-downmouse.The trackballis electricallycompatiblewith the ADB,althoughit uses a fewpins in a largesharedconnectorinsteadof the dedicatedmini- circulartype. The connectoron the trackballis mechanically the sameas the one on the keyboard, shownin Figure8-5.The connectorsare the sameso that the trackballcan be installedon eitherside of the MacintoshPortablecomputer.Table8-5showsthe signalassignments for the trackballconnector. • Table8-5 Signalassignmentsfor the connectoron the trackball PinDllllm' Signalname Signalfunction 1 GND3 Chassisground 2-26 n.c. Not connected 27 GND2 ADBsignalground 28 +5V 5-voltpowersupply 29 ADB.DATA Bi-directionalserial data 30-33 n.c. Not connected 34 GND Ground Note:Allpinsexcept1, 27,28,29,and 34are not connected. Chapter8 AppleDesktopBus 303 Anyinputdevicesconnectedto the MacintoshPortableADBmustbe low-powerversions.Thatmeanskeyboardsand mousedevicesfrom othermodelsin the Macintosh familyare not usablewiththe MacintoshPortable.Connectingsuch inputdevicesto the Macintosh PortableADBcouldcausean unacceptabledecreasein the +5volt supplyvoltageand resultin improperoperation.• The PowerManagerICin the MacintoshPortablecontrolsthe powerto the trackball, removingthe powerwhenit putsthe computerintothe sleepstateand restoringit when the computeresumesnormaloperation.The trackballis designedto be operational within80 ms of the applicationof power.Seethe section"SleepStatein the Macintosh PortableComputer"in Chapter6. Thetrackball'sdefaulthandlerID is $0001and its addressis $0011,the sameas a mouse. Movementof the top of the ball'ssurfaceto the rightis in the positiveX direction,and movementdownwardsis in the positiveY direction,as shownin Figure8-8.Movementof the top surfaceof the ballto the rightcausesthe displaycursorto moveto the right,and movementdownwardcausesthe cursorto movedownon the display. The trackballhas one button,whichis functionally equivalento the mousebutton. 3M Guideto the MacintoshFamilyHardware • Figure8-8 Trackballdirectionconventions t-Y ••••••••••••••••• ••••••••••••••••• ...__ -X ____. +X AppleStandard Keyboard Theswitchesin the keyboardarewiredin a two-dimensional arraycalleda keyswitch matrix.Likethe keyboardon the MacintoshPlus,the AppleStandardKeyboardcontains a microprocessorthat scansthe matrixto detectswitchtransitionsas keysare pressed and released.The keyboard'smicroprocessor transmitsthe corresponding key-downand key-upeventsto the CPUby way-ofthe AppleDesktopBus(ADB),usingthe bus protocolsdescribedlaterin this chapter. Chapter8 AppleDesktopBus 305 In additionto allthe keysfoundon the Macintosh Pluskeyboard(or theirfunctional equivalents),the AppleStandardKeyboardhas two additionalkeys:the Escape(Esc)key and the Controlkey. Thekeyboardlayoutandthe key-downtransitioncodesareshownin Figure8-9.The key-uptransitioncodesare the sameas the key-downtransitioncodes,exceptthat bit 7 is set to 1. • Figure8-9 Key-downtransitioncodesgeneratedby the AppleStandardKeyboard l1 RFIfilter 4>2 RFIfilter 4>3 RFIfilter -12V /WRREQ SENSE RDDATA WRDATA /ENBL.INT /ENBLl ENBU RFIfilter>---'/EN_B_L_.EXT _______ __, FCLK 7.8336MHz Note: Rl R2 ~=~ ;;,C (Rt +R2=-40to 60ohms,C = 150to 300pF) Chapter9 FloppyDiskInterfaces 339 • Figure9-6 Circuitdiagramof the floppydisk driveinterfaceon the original MacintoshSE computer ~ External 20-pinribbonheaders floppydisk Shielded Lowerinternal Upperinternal DB-19 floppydisk floppydisk IWM RFIfilter l RFIfilter <1>2 RFIfilter <1>3 RFIfilter /WRRE /WRREQ SENSE RDDATA WRDATA /ENBL.LO RFIfilter /ENBL.HI ENBLl RFIfilter /ENBL.EXT ENBL2 RFIfilter BBU PWM PWM RFIfilter FCLK 15.6672MHz Note: Rl R2 ~=~ ;:F,c (Rl + R2=40to 60ohms,C =150to 300pF) 340 Guideto the MacintoshFamilyHardware The MacintoshII has no externalfloppydiskdriveconnectorand no disk-speedcontrol linefor use withsingle-sided400KBfloppydiskdrives. Figure9-7showsa circuitdiagramfor the floppydiskdriveinterfaceon the MacintoshII computer. • Figure9-7 Circuitdiagramof the floppydisk driveinterfaceon the MacintoshII computer 20-pinribbonheaders Internal Internal floppydisk1 floppydisk2 /ENBL.1 /ENBLli-----------' /ENBL.2 /ENBL2i-----------------------' FCLK 15.6672MHz Chapter9 FloppyDiskInterfaces 341 Compatlbillty with single-sideddisk drives Theexternaldiskconnectoron the MacintoshPlusand Macintosh SEcomputersupports the single-sided 400KBexternalfloppydiskdrive.Thatdriverequiresa pulse-width- modulated(PWM)signalto controlthe speed of its drivemotor. A generalogicIC(PALin the Macintosh Plus,BBUin the Macintosh SE)usesvaluesit readsfromthe disk-speedbufferin RAMto generatethisPWMspeed-control signal.By runningthe diskmotorat slowerspeeds,the computeris ableto storemoresectorsof informationin the trackscloserto the edgeof the disk. On the Macintosh SE,the speed-control signalis requiredonlyforthe 400KBexternal floppydiskdriveand is not availablefor internaldiskdrives.The800KBdrivecontrolsits ownmotorspeedand ignoresthe speed-control signal. ~ Developertip IJecausesomediskdrivesignorethe speed-control signal, applications shouldneverdependon thatsignal(forinstance,in their copy-protectionschemes).~ TheMacintosh II has no externalfloppydiskconnectorand no disk-speedcontrolinefor use withsingle-sided400KBfloppydiskdrives. Compatlbillty with the HardDisk 20 On the MacintoshPlusand the Macintosh SEcomputers,the externaldiskdriveconnector can alsobe usedfor an AppleHardDisk20.(TheMacintoshII has no externalfloppydisk drive connector.) To use boththe HardDisk20and an externalfloppydiskdrive,plugthe HardDisk20into the connectoron the backof the computerand plugthe externalfloppydiskdriveinto the DB-19connectoron the backof the HardDisk20.Thepinoutof the DB-19connector on the HardDisk20 is identicalto that of the DB-19- diskdriveconnectoron the backof the computer. 342 Guideto the MacintoshFamilyHardware ~ Developer tip Forcompatibility with earlierMacintoshmodels,the HardDisk20 startupsoftwarecontainsa devicedriverfor the HardDisk20 disk drivealongwiththe hierarchical(128KBROM)versionof the File Manager.The HardDisk20startupsoftwareis part of the ROMin the MacintoshPlus,MadntoshSE,MacintoshPortable,and Macintosh Ilci.The machinesthat do not havethe HardDisk20 startupsoftwarein ROM-thatis, the rest of the MacintoshII family and the Macintosh SE/30-can use the devicedriverfromthe Hard Disk20startupdiskas an Initfile,enablingthemto read and writeto the HardDisk20.Thatarrangementdoes not enablethosemachines to startup (boot)fromthe HardDisk20. 4. FDIIDdrive interface Table9-6liststhe Macintoshmodelsthatuse the AppleFDHDdrive,alsocalledthe SuperDrive. The MacintoshSEFDHD,MacintoshSE/30,MacintoshHex,MacintoshIlci, and MacintoshPortablecomputersare equippedwithan internalFDHDdriveand an externaldiskdriveconnectorto whichyou can connecta secondFDHDdrive.The Macintosh Ilx and Macintosh Ilfxare equippedwithan internalFDHDdriveand maybe equippedwitha secondinternalFDHDdrive. • Note:MacintoshSEcomputersmanufacturedbeforeSeptember1989use the Apple800KBdrive. Chapter9 FloppyDiskInterfaces 343 • Table9-6 Macintoshmodelsthat use the AppleFDHDdrive Numberof internal Numberof external Macintoshmodel floppydiskdrives floppydiskdrives MacintoshSEFDHD 1 1 MacintoshSE/30 1 1 MacintoshPortable 1 or 2 1 MacintoshIlx 1 or2 0 MacintoshIlcx 1 1 MacintoshIlci 1 1 MacintoshIlfx 1 or2 0 · "Macintosh SEcomputersmanufactured beforeSeptember1989use the Apple800KBdrive. • Note:On all Macintoshmodelsthatsupportan externalFDHDdrive,you can connect an external800KBdriveinstead. The interfacebetweenthe floppydiskdriveconnectorand the Macintoshcomputer's mainlogicboardis an Applecustomintegratedcircuitcalledthe SWIM(SuperWoz IntegratedMachine).The SWIMcontrolsfour of the disk state-controllines,generates signalsto selecteitherthe internalor externaldrive,and generatesthe read-dataand write- data signalsfor the disk drives.In addition,the VIAprovidesa diskstate-controlline to helpselectdiskdriveinternalregisters. • Note:On Macintoshmodelsthat havetwo VIAICs,VIAl is the interfaceto the SWIM. In the MacintoshIlfx,the SWIMis controlledby an ApplecustomIC,the IOP(1/0 Processor).The IOPtransfersdiskdata betweenthe mainmemoryand its own dedicated RAMusingOMAtransfers.The IOPcontrolsthe SWIMto performthe actualdisktransfers. For informationaboutthe operationof the IOP,pleasereferto the section"IOPsin the MacintoshIlfx Computer"in Chapter3. The SWIMconvertsbetweenthe NRZIserialdata used to communicate with diskdrives and the 8-bitparalleldataused to communicate withthe computer.The DiskDriver softwareconvertsbetweenthe dataformats(GCRand MFM)used by diskdrivesand the normal8-bitbytesused by the application. 344 Guideto the MacintoshFamilyHardware The SWIMusesa clockfrequencyof 15.6672MHz.(Thatfrequencyis twicethat used for the IWMinterfaceICthat supportsthe 800KBdrive.)Duringthe startupsequence, softwaresets a bit in the SWIMto dividethe clockby two when readingand writingto the 800KBdriveor the HardDisk20.(TheSWIMdoesnot supportthe single-sided floppydisk drive.) The SWIMcan send data to the diskdriveat a maximumrate of approximately 500Kbits per second.Because4 bytesof GCR-encoded data correspondto 3 bytesof data in systemRAM,the effectivemaximumdata transmissionrate in GCRmodeis approximately375Kbitsper second.Notice,however,that the throughputof data to the diskdependson the amountof timespent seekingthe correctlocationon the disk, readingRAM,and takingcareof othersystemtasksin additionto the timespent actually transmittingdata. FDHDdrive connectors The figuresand tablesin thissectionspecifythe signalson the FDHDdriveconnectors. Thesignalson the internaland externalconnectorsare functionallythe same,but on some machinestheyare electricallydifferent,as shownin the circuitdiagramsin the section "FDHDInterfaceCircuitDiagrams," later in this chapter. InternalFDHDdriveconnectors Figure9-8showsthe pinoutforthe 20-pinconnectorusedfor internalFDHDdriveson all Macintoshmodelsthat use that drive.Thereare slightdifferencesin the signalassignments on differentMacintoshmodels:pleasereferto Tables9-7and 9-8for details. • Figure9-8 Pinoutof the connectorfor the internalFDHDdrive 00®©®®®®®® 0000®®®®®® Chapter9 FloppyDiskInterfaces 345 / Table9-7showsthe signalassignments forthe 20-pininternalconnectorforthe FDHD driveon the MacintoshIlx, MacintoshHex,Macintosh lid, and MacintoshIlfx.Table9-8 showsthe signalassignmentsforthe 20-pininternalconnectorforthe FDHDdriveon the MacintoshSEFDHD,MacintoshSE/30,and MacintoshPortable. • Table9-7 Signalassignments forthe internalFDHDdriveconnectorson the MacintoshIlx, MacintoshIlcx, Macintoshllci, and MacintoshIlfx computers PlnDDllm' Sfpalname Sipal description 1 GND Ground 2 PHO State-controlline 3 GND Ground 4 PHI State-controlline 5 GND Ground 6 PH2 State-controlline 7 GND Ground 8 PH3 RegisterWriteStrobe 9 -12V -12 volts 10 /WRREQ WriteDataRequest 11 +5V +5volts 12 SEL State-control signal(fromVIAi) 13 +12V +12volts 14 /ENBLl DriveEnable• 15 +12V +12volts 16 RD ReadData 17 +12V +12volts 18 WR WriteData 19 +12V +12volts 20 PWMPU Pull-upresistorto +5V •on the Macintosh Ilfx,whichcanhavetwointernaldrives,therearetwo20-pin Ilxand Macintosh connectors.Pin14of eachconnectorcarriesits respectivenablesignal;the signalsarenamed /ENABLl and /ENABU. 346 Guideto the MacintoshFamilyHardware • Table9-8 Signalassignments on the Macintosh for the internalFDHDdriveconnector SEFDHD,MacintoshSE/30,and MacintoshPortablecomputers Plnnumber Signalname Signaldescription 1 GND Ground 2 PHO State-controlline 3 GND Ground 4 PH! State-controline 5 GND Ground 6 PH2 State-controline 7 GND Ground 8 PH3 RegisterWriteStrobe 9 -12~ -12 volts• 10 /WRREQ WriteData Request 11 +5V +5 volts 12 SEL State-control signal(fromVIA!) 13 +12V +12volts 14 /ENBUt Internal-drive Enablet 15 +12V +12volts 16 RD Read Data 17 +12V +12volts 18 WR WriteData 19 +12V +12volts 20 n.c. Not connected •on the MacintoshPortable,pin 9 is not connected. ton the MacintoshPortable,whichhas provisionsfor two internaldrives,thereare two 20-pinconnectors. Pin 14of eachconnectorcarriesits respectivenablesignal;the signalsare named/INDISKland /INDISK2. ThesignalsPH2throughPHO,fromthe SWIM,togetherwiththe signalSEL,fromthe VIA, makeup the state-controllinesused by the diskinterfaceto selectregistersin the floppy diskdrives.The signalPH3,fromthe SWIM,is used for writingdatato the registersin the floppydisk drives. TheSWIMsupportstwo drives,eachwithits ownenablesignal;the signalsare named /ENABLl and /ENABL2.On machineswithonlyone internaldrive,the enablesignalfor the internaldriveis /ENBLland_thenablesignalfor the externaldriveis /ENBL2. In the MacintoshPortable,whichcan havethreedrives,the /ENBL2linefromthe SWIM selectsthe externalfloppydiskdrive.Additionallogicin the Miscellaneous GLUICuses signals/ENBLlfromthe SWIMand DRIVE.SEL fromthe VIAto generateseparateselect lines/INDISKland /INDISK2 for the two internaldrives. Chapter9 FloppyDiskInterfaces 347 Thesignal/WRREQis a programmable outputof the SWIMthat can be used for handshaking. TheRDand WRlinesare the datalinesusedto transferdatabetweenthe diskdrive and the SWIM. ExternalFDIIDdriveconnectors Figure9-9showsthe pinoutfor the DB-19externalFDHDdriveconnector.Table9-9 showsthe signalassignments for the externalFDHDdriveconnectoron the Macintosh Ilcx and Macintosh Ilci computers.Table9-10showsthe signalassignments for the externalFDHDdriveconnectoron the Macintosh SEFDHD,Macintosh SE/30, and MacintoshPortablecomputers. • Figure9-9 Pinoutfor the connectorfor the externalFDHDdrive \, 348 Guideto the MacintoshFamilyHardware • Table9-9 Signalassignments forthe externalFDHDdriveconnectoron the MacintoshHex and MacintoshHcicomputers Plnmimber SJgnalname Sigoaldescripdon 1 GND Ground 2 GND Ground 3 GND Ground 4 GND Ground 5 -12V -12 volts 6 +5V +5volts 7 +12V +12volts 8 +12V +12volts 9 n.c. Not connected 10 PWMPU Pull-upresistorto +5V 11 PHO State-controlline 12 PHl State-controlline 13 PH2 State-controlline 14 PH3 RegisterWriteStrobe 15 /WRREQ WriteDataRequest 16 SEL State-controlline 17 /ENBL2 ExternalDriveEnable 18 RD Read Data 19 WR WriteData Thefunctionsof the signalson the externalfloppydiskconnectorare the sameas those on the internalfloppydiskconnector,and are describedjustafterTable9-8in the section "InternalFDHDDriveConnectors." • Note:On the Macintosh Hexand Macintosh Hci,pin 10 of the externalconnectoris tiedto +5V througha pull-upresistor.On the Macintosh SEFDHDand Macintosh SE/30,pin 10 is tied directlyto a +5V supply.On the MacintoshPortable, pin 10is not connected.Pleasereferto Figures9-10,9-11,9-12,and 9-13. Chapter9 FloppyDiskInterfaces 349 • Table9-10 Signal~ignments for the externalFDIIDdriveconnector on the Macintosh SEFDIID,Macintosh SF130,and MacintoshPortablecomputers Plllmmcr Slgaalmme SJgoaldacrlptlon 1 GND Ground 2 GND Ground 3 GND Ground 4 GND Ground 5 n.c. Not connected 6 +5V +5volts 7 +12V +12volts 8 +12V +12volts 9 n.c. Not connected 10 +5-V- +5volts• 11 PHO State-controlline 12 PHI State-controlline 13 PH2 State-controlline 14 PH3 RegisterWriteStrobe 15 /WRREQ WriteData Request 16 SEL State-controlline 17 /ENBL2 ExternalDriveEnable 18 RD Read Data 19 WR WriteData •on the Macintosh Portable,pin 10is not connected. FDHDinterfacecircuitdiagrams Figure9-10showsa circuitdiagramfor the diskdriveinterfaceon the Macintosh SEFDHD and Macintosh SF130computers.Figure9-11showsa circuitdiagramfor the diskdrive interfaceon the MacintoshPortable.Figure9-12showsa circuitdiagramfor the diskdrive interfaceon the Macintosh Ilx. Figure9-13showsa circuitdiagramfor the diskdrive interfaceon the Macintosh Ilcxand Macintosh llci. Figure9-14showsa circuitdiagram for the disk driveinterfaceon the MacintoshIlfx. 350 Guideto the MacintoshFamilyHardware • Figure9-10 Circuitdiagramof the FDHDdriveinterfaceon the MacintoshSE FDHDand MacintoshSE/30computers Shielded SWIM 20-pin DB-19 ribbonheader PCLK 15.6672MHz RFIfilter PHO 4>0 RFIfilter PHI I Cl> RFIfilter PH2 4>2 RFIfilter PH3 3 Cl> RFIfilter /WRREQ +12V RFIfilter SENSE ,__ __ __.__, RFIfilterl--+---!::::..._4-1----l RDDATAl-+--__;;RD=---1---.___J ,--_ .. /WR /ENBLI /ENBLii-------' /ENBU1-------'-'/E~NB=U;__ _____ --1------' Note: HDSELn.c. RI R2 ~=~ ;:F,c VIA1 (RI + R2= 40to 60ohms, SEL PAS 1---------------' C = 150to 300pF) Chapter9 FloppyDiskInterfaces 3Sl • Figure9-11 Circuitdiagramof the FDHDdriveinterfaceon the MacintoshPortablecomputer DB-19 external SWIM 20-pin 20-pin connector ISM.CLOCK internal +12V internal +12V FLOPPY.+5 connector connector FLOPPY.+5 PHO «110 PHI «111 PH2 «112 PH3 «113 /WRREQ /WRREQ HDSELn.c. /ENBUt----1------~m=NB=U=-11--------+---____. /INDISK2 Mlsc.GW r------, /INDISKl /ENBLl DRIVE.SEL 352 Guideto the MacintoshFamilyHardware • Figure9-12 Circuitdiagramof the FDHDdriveinterfaceon the MacintoshIlx computer 20-pinribbonheaders Internal Internal floppydisk 1 floppydisk2 SWIM /WRREQt------------ .......... =---+-- r--llh~-f-...-J,------' VIAi nc. /ENBLI /ENBLI---------' /ENBU /ENBUt----------------------' FCLK 15.6672MHz Chapter9 FloppyDiskInterfaces 353 • Figure9-13 Circuitdiagramof the FDHDdriveinterfaceon the MacintoshHexand MacintoshIlci computers Shielded SWIM 20-pin DB-19 ribbonheader PCLIC 15.6672MHz PHO RFIfilter 41>0 RFIfilter PHI 41>1 RFIfilter PH2 41>2 RFIfilter PH3 41>3 RFIfilter /WRREQ /WRREQ +12V RFIfilter SENSE ___ -------+--( RFIfilter1-+-....;;.;;;;...._-1-1----' +5V RDDATA...,.. RD ___ --J __ _. /WR /ENBLl /ENBLI-------' /ENBU ____ .....;.;/E~NB=U'--------1-------' HDSELn.c. VIA1 PA5_----'s=EL=--------' Note: Rl ~ = ..JW'v- ( Rl = 40 to 60ohms) 354 Guideto the MacintoshFamilyHardware • Figure9-14 Circuitdiagramof the FDHDdriveinterfaceon the MacintoshIlfx computer SWIM 20-pin 20-pin inteinal internal FCLIC 15.6672MHz coMector coMector PHO Cl>O PHl Cl>l PH2 «1>2 PH3 «1>3 /WRGATE /WRREQ RDDATA HDSELt--_S_EL_ _. /ENl /ENBLlP------- .... /ENBUD-----'-/E=N~2 __________ ___. .Chapter9 FloppyDiskInterfaces 355 Incompatibility with the single-sideddisk drive Eventhoughsomeof the Macintoshmodelswiththe SWIMinterfacehaveexternaldisk- driveconnectors,noneof themsupportthe 400KBsingle-sidediskdrive,whichrequires computercontrolof motorspeedthrougha signalnamedPWM.On the SWIM-equipped machines,thatsignalis permanently high;a single-sidedrivewillnotwork. with the HardDisk20 Compatibility On the MacintoshSE/30,MacintoshIlcx,MacintoshIlci, and MacintoshPortable computers,the externaldiskconnectorcan be usedfor an external800KBdrive,an externalFDHDdrive,or an AppleHardDisk20.(Theexternaldiskconnectordoes not supportthe older,single-sided 400KBexternalfloppydiskdrive.) · To use both the HardDisk20and an externalfloppydiskdriveon thosemachines,plug the HardDisk20 intothe connectoron the backof the computer,and plugthe external floppydiskdriveintothe DB-19connectoron the backof the HardDisk20.The pinout of the DB-19connectoron the HardDisk20 is identicalto that of the DB-19diskdrive connectoron the back of the computer. ~ Developertip Forcompatibility withearlierMacintoshmodels,the HardDisk20 startupsoftwarecontainsa devicedriverfor the HardDisk20 disk drivealongwiththe hierarchical(128KBROM)versionof the File Manager.TheHardDisk20startupsoftwareis partof the ROMin the MacintoshPlus,Macintosh SE,MacintoshPortable,and Macintosh Ilci.The machinesthat do not havethe HardDisk20 startupsoftwarein ROM-thatis, the rest of the Macintosh II family and the Macintosh SE/30---can use the devicedriverfromthe Hard Disk20startupdiskas an Initfile,enablingthemto read and writeto the HardDisk20.Thatarrangementdoesnot enablethosemachines to startup (boot)fromthe HardDisk20. ~ 356 Guideto the MacintoshFamilyHardware Chapter10 Serial1/0 Ports Allmodelsof the Macintoshcomputercontainhardwareinterfacesfor two RS-422serialports.In addition,the MacintoshPortablecomputer containsan internalslot for the installationof a modemcard.This chapterdescribesthe hardwareused in each of theseinterfaces,gives pinoutsfortheconnectors, andprovides someinformation abouthow softwarecommunicates with the SCCdevicesthat controlthe ports. 357 Serial ports sec MacintoshPlus sec MacintoshSE sec MacintoshSE/30 sec MacintoshPortable sec MacintoshII sec Macintosh!Ix sec MacintoshIlcx sec MacintoshIlci sec MacintoshIlfx 358 Guideto the Macintosh FamilyHardware The Macintoshserialinterfaceis controlledby a Zilog28530SerialCommunications Controller(SCC)integratedcircuit.The SCCprovidestwo serialports:SCCportA-the modemport-and secportB-the printerport. Eachsecport has a connector,located on the backpanel,for connectingserialperipheraldevicesand for connectingthe computerto the AppleTalknetwork. 4i..Developertip Eventhoughthis chapterdescribesthe operationof the hardwarethat controlsthe serialports,yourprogramshouldnot communicate directlywiththat hardware.It is mucheasierand saferto use the tools providedby the Macintoshsystemsoftwarefor this purpose.To ensurecompatibility with otherMacintoshcomputers,Applestrongly recommendsthat you followthe interfaceguidelinesand philosophies describedin InsideMacintosh.4- • Note:In the Macintosh Ilfx,the SCCis controlledby an ApplecustomIC,an IOP(1/0 Processor).ThatIOPtransfersdiskdata betweenthe mainmemoryand its own dedicatedRAMusingDMAtransfers.The IOPcontrolsthe SCCto performthe serial 1/0 transfers.For informationaboutthe operationof the IOP,pleasereferto the section"IOPsin the MacintoshIlfx Computer"in Chapter3. Serial port connectors AllcurrentMacintoshmodelsuse miniature8-pinconnectorsfor theirserialports.Those mini8-pinconnectorsprovidean outputhandshakesignalnot availableon the DB-9 connectorsfor the serialportsof the earlierMacintoshcomputers(Macintosh128K,512K, and 512Kenhanced);on the otherhand,the mini8-pinconnectorsdo not providethe +5 voltsand +12voltsprovidedby the serialportsof the earlierMacintoshcomputers. Figure10-1showsthe pinoutfor the mini8-pinconnectorsusedfor the Macintosh serial ports;Table10-1showsthe signalassignments.Thesesignalsare describedin the next section,"Signalson the SerialPorts." Chapter10 Serial1/0 Ports 3S9 • Figure10-1 Pinoutof the mini8-pinserialport connectors • Table10-1 Signalassignmentsfor the mini8-pinserialporrconnectors SJgnalname Signalclescrlptlon 1 HSKo Handshakeoutput.DriveninvertedfromSCC's/DTR. Voh= 3.6V;Vol= -3.6V;RI= 4500 2 HSKi Handshakeinput or externalclock.Receiveduninverted at SCC's/CTSand /TRxC. Vih= 0.2V;Vil= -0.2V;Ri = 12W 3 TxD- Transmitdata (inverted).DriveninvertedfromSCC'sTxD; tri-statedwhen SCC's/RTSis not asserted. Voh= 3.6V;Vol= -3.6V;RI= 4500 4 GND Signalground.Connectedto logicand chassisground. 5 RxD- Receivedata (inverted);receivedinvertedat SCC'sRxD. Vih= 0.2V;Vil= -0.2V;Ri = 12W 6 TxD+ Transmitdata.DrivenuninvertedfromSCC'sTxD; tri-statedwhen SCC's/RTSis not asserted. Voh= 3.6V;Vol= -3.6V;RI=4500 7 GPi* General-purpose input.•Receivedinvertedat SCC'sDCD. Vih= 0.2V;Vil= -0.2V;Ri = 12W 8 RxD+ Receivedata. Receiveduninvertedat SCC'sRxD. Vih= 0.2V;Vil= -0.2V;Ri = 12KO Note:Absolutevaluesof specifiedvoltagesare minimums; Ri is a minimum, RIis a maximum. Plus,pin7 is notconnected. • Onthe serialportof the Macintosh 360 Guideto the MacintoshFamilyHardware Signals on the serial ports The transmit-datand receive-datalinesof the Macintoshserialinterfaceconformto the EIAstandardRS-422, whichdiffersfromthe morecommonlyused RS-232-C standardin that, whereasan RS-232-C transmittermodulatesa signalwithrespectto a common ground,an RS-422transmittermodulatesthe signalagainstan invertedcopyof the same signal(to generatea differential signal).The RS-232-Creceiversenseswhetherthe received signalis sufficiently negativewithrespectto groundto be a logical1, whereasthe RS-422 receiversimplysenseswhichlineis morenegativethanthe other.An RS-422 signalis thereforemoreimmuneto noiseand interference,and degradeslessoverdistance,than an RS-232signal. The serialdata inputsand outputsof the SCCare connectedto the externalconnectors throughdifferentialline driversand receivers.On the MacintoshPlus,MacintoshSE,and MacintoshPortable,the driversare 26LS30 and 9636AICsand the receiversare 26LS32ICs; on the MacintoshII, MacintoshIIx, MacintoshIIcx,and MacintoshSE/30,the line drivers are all 26LS30 ICsand the receiversare75175ICs.Thelinedriverscanbe put in the high- impedancemode betweentransmissions to allowotherAppleTalkdevicesto transmit overthoselines.A linedriveris enabledby loweringthe SCC'sRequestTo Send(RTS) output for that port. Insidethe SCCIC,port A (the modemport)has a higherinterruptprioritythan port B, makingport A moresuitablefor high-speedcommunication. Wheneverinterruptsare turnedoff for longerthan 100microseconds, the serialdriverstoresany data received throughport A for laterhandoffto the port-Ainputdriver.The higherinterruptpriorityof port A affectsonlythe internaloperationsof the SCC,and has no effecton the interrupt priorityof the SCCin the Macintoshdevice-interrupt scheme. On the MacintoshSE,MacintoshII, and morerecentmodels,serialport A supports synchronoustransmission,but port B does not; see the discussionof the GPisignal,later in thissection.TheMacintoshPlusand earliermodelsdo not supportsynchronous transmissionon eitherport. Otherthan the two differencesjust described,port A and port B are identical. The OutputHandshakesignal(HSKo)for each MacintoshPlusserialport originates at the SCC'sDataTerminalReady(DTR)outputfor that port and is drivenby an RS-422linedriver.On the MacintoshPlusand the MacintoshSE,it's a 3488Aor 9636A; on the MacintoshSE/30and.the MacintoshII-familycomputers,it's a differentialine driver(26LS30). Chapter10 SerialI/O Ports 361 Eachport'sInputHandshakesignal(HSKi)is connectedto the SCC'sClearTo Send(CTS) inputfor that port, and is designedto acceptan externaldevice'sDataTerminalReady (DTR)handshakesignal.Thislineis alsoconnectedto the SCC'sTransmit/Receive Clock (TRxC)inputfor that port,so that an externaldevicecan performhigh-speedsynchronous dataexchange.Notethat you can'tuse the HSKilinefor receivingDTRif you'reusingit to receivea high-speeddata clock. Excepton the Macintosh Plusand earliermodels,eachserialportalsohas a general- purposeinput(GPi,pin 7), connectedto the SCC'sDataCarrierDetect(DCD)inputfor that port.Thisinputcan be usedto providea handshakesignalfroman externaldeviceto the computer.TheDCDinputto the SCCcanbe polledby softwareor can be usedto generatea CPUinterrupt. • Note:On the MacintoshPlusand earlierMacintoshcomputers,the GPisignalis not connected.On thosecomputers,the DCDinputsto the SCCare used to generate mouseinterrupts,as describedin the section"Macintosh PlusMouse"in Chapter7. In the otherMacintoshmodels,eachDCDinputto the SCCis broughtout to a pin on a serialport connector. On portA only,the GPilinecan be connectedto the SCC'sReceive/Transmit Clock (RTxCA). Thisfeaturesupportsdevicesthat provideseparatetransmitand receivedata clocks,suchas synchronousmodems.Bit3 (vSync)of DataregisterA in the VIA(VIAlin machineswithtwoVIAs),whenset low,connectsGPiAto RTxCA. Whenthe VIAvSyncbit is set high,RTxCA is connectedto a 3.672MHzclock.PortB's Receive/Transmit clock (RTxCB) is alwaysconnectedto the 3.672MHzclock,as in the classicMacintosh configuration. Notethatyou can'tuse the GPilineto receivea DCDinputwhenyou are usingit to receivea high-speedclock.Thisinputis noninvertingfor compatibility with the classicMacintoshconfiguration. The general-purposeinput(GPi)is receivedby means of the negative(inverting)inputof one of the samedifferentialreceivers,withthe positiveinput grounded. ~ Developer tip Becausethe 26LS32 is a differentialreceiver,any handshakeor clock signaldrivingit mustbe bipolar,alternatingbetweena positive voltageand a negativevoltagewithrespectto the internallygrounded input.If a deviceusesground(0 volts)as one of its handshakelogic levels,the receiverinterpretsthat levelas an indeterminate state,with unpredictableresults.~ 362 Guideto the MacintoshFamilyHardware TheSCCchipgenerateslevel-2processorinterrupts(/IPLl)during1/0 overthe seriallines. Duringdiskaccesses,the diskcontrollerdisablesall interruptsof level3 and lowerto preventany lossof datathat mightoccurwhenthe CPUpausesto servicean interrupt. Becausethe SCCchipcannotstoremorethan 3 bytesof incomingdata,however,and becauseserialdata(suchas an AppleTalkmessage)mightcomein at any time,it maybe necessaryto servicethe SCCbeforea floppydisktransactionis complete.To allow softwareto determinewhetherthereis a byteof serialdatawaitingto be read,the VIA monitorsthe SCC'sWait/Request line.Wheneverthereis a pausein a floppydisk transaction,the diskdrivercan checkbit 7 in DataregisterA in the VIA(VIAlin machines with two VIAs)to determinethe stateof the Wait/Request line.If there is data waitingin the SCC,the driverreadsit duringthe nextpausein the disktransaction. The maximumnominaldatatransmission rate that you can selectthroughthe Macintosh Toolboxis 57,600baud.Thisis the maximumrate that the classicMacintoshcomputers can maintainfor transmission of serialdatawhenthe SCCport is operatingin an asynchronous,interrupt-drivenfashion,timedby the 3.672MHzclock. AppleTalkoperatesat a nominaldata transmissionrate of 230.4Kbaud.Thishigherrate is possiblebecauseAppleTalkcommunications are not interruptdriven;duringAppleTalk communications, the AppleTalkDriverhas completecontrolof the computer.Although AppleTalkusesa synchronouscommunication protocol,the AppleTalkDriverrunsthe SCC chip in asynchronousmode,timedby the 3.672MHzclock. The maximumpossibletransmission rate for serialdata rangesfromapproximately 500Kbaudon the MacintoshPlusand Macintosh SEto 900Kbaudon the MacintoshII family.To achievesuch datatransmission rates,the SCCwouldhaveto be operatedin synchronousmodetimedby an externalclock,and the serialdriverwouldhaveto have complete,uninterruptedcontrolof the computer. sec addresses Thissectiondescribesthe waylow-levelprograms-serialdrivers-controlthe serial interface.It is providedfor the sakeof completenessonly.Unlessyou are writingyour own driversoftware,you shouldneverneed to use the information is thissection.For more informationaboutthe SCCchip,see the productspecificationfor the Zilog28530 SerialCommunications Controller. Chapter10 Serial1/0 Ports 363 ~ Developer tip Unlessyouneedto writeyourowndriversoftware,it is mucheasier and saferto use the driverroutinesand ROMtoolsprovidedby the MacintoshOperatingSystemto accessthe hardwaredevicesin the Macintosh.If you do need to writedrivers,you shouldcommunicate directlywithAppleto obtaintechnicalassistance.See the section "AppleDeveloperServices," at the end of the Preface.4 A Warning In the Macintosh Ilfxcomputer,an IOPcontrolsthe SCCand handles all communicationbetweenthe SCCand the mainprocessor.An access by the MC68030directlyto the SCCregisterspacecausesa bus error. • Theaddressesof the SCCcontroland dataregistersare givenin Table10-2as offsetsfrom the constantsccWBasefor writes,or sccRBasefor reads.Thesebase·addressesare also availablein the globalvariablesSCCWrand SCCRd. • Table10-2 Addressesof secregisters Location Register sccWBase+aData WriteDataregisterA sccRBasetaData ReadDataregisterA sccWBase+bData WriteDataregisterB sccRBase+bData ReadDataregisterB sccWBase+aCtl WriteControlregisterA sccRBase+aCtl ReadControlregisterA sccWBase+bCtl WriteControlregisterB sccRBase+bCtl ReadControlregisterB Note:On the Macintosh modelswithMC68000 microprocessors,usingthe addressoffsetsshownin thistable automatically suppliesthe correctevenor odd addressfor eachaccess. ~ Developer tip On the MacintoshPlusand earlierMacintoshmodels,it is necessaryto let the SCClinesstabilizefor 2.2µs betweenaccesses.On latermodels, it is not necessaryto do so becausethe generalogicIC(GLUor BBU) delaysthe acknowledge signal(/DTACK or /DSACK0)untilthe sec lineshavestabilized.4 364 Guideto the MacintoshFamilyHardware On MacintoshmodelswithMC68000 microprocessors, you mustuse even-addressed byte- wideaccessesto read data fromthe SCCand odd-addressedbyte-wideaccessesto write datato the sec.Althoughthe secis on onlythe upperbyteof the databus,thisscheme worksbecausethe MC68000 CPUreadsfromthe upperbyteof the databus whenreading froman evenaddress,and putsthe samedataon both bytesof the databus whenwriting to an odd address.A byte-widereadfroman odd addressresetsthe sec. ~ Developer tip In Macintosh modelswithMC68000 microprocessors, be carefulnever to makea word-wideaccessto the SCC.A word-wideaccessto any SCCaddresscausesa phaseshiftin the processorclockin those models(a featureusedby the operatingsystemduringsystemstartup to ensurecorrectRAM-accesstiming).An incorrectphaseshiftcauses an unstablevideodisplay,RAMerrors,andVIAerrors.~ Serial1/0 interfacecircuit diagrams Althoughall currentMacintosh modelsuse the sameSCCICand externalconnectorsfor serial1/0, the serial1/0 interfaceis not implemented in the samewayin all of them. Thissectionshowsthe circuitdiagramsfor the differentimplementations. Figures10-2 through10-6are circuitdiagramsforthe serial1/0 interfaceon the followingmodelsof Macintoshcomputers: • Macintosh Plus:Figure10-2 • Macintosh SE:Figure10-3 • Macintosh SE/30:Figure10-5 • MacintoshPortable:Figure10-4 • Macintosh II: Figure10-5 • Macintosh llx: Figure10-5 • Macintosh llcx: Figure10-5 • Macintosh llci: Figure10-5 • Macintosh llfx: Figure10-6 Chapter10 Serial1/0 Ports 36S Circuitdiagramof the serial1/0 interfacein the • Figure10-2 Macintosh Pluscomputer SCC(8S30) 1/2of 261530 0- TXDA- TxDA I RFIfilter /OE O+ TXDA+ /RTSA RFIfilter /RTxCA 3.672MHz 1/2 of 26IS32 0 I+ RFIfilter RxDA I- RFIfilter 0 I+ RFIfilter /CTSA I- /fRxCA - 1/2of9636A(or3488A) 0- HSK.oA /DTRA RFIfilter /W/REQA VIA(6S22) /W/REQB PA7 1/2 of 26IS30 0- TXDB- TxDB I RFIfilter /OE O+ TXDB+ /RI'SB RFIfilter +5V Vee -5V VEE PCLI{ /RTxCB 3.672MHz - 1/2of 26IS32 0 I+ RFIfilter RxDB I- RFIfilter 0 I+ RFIfilter /CTSB I- /fRxCB - 1/2 of 9636A(or 3488A) HSKoB /DTRB RFIfilter +12V Vee Wave -12V VEE shape lOkQ Note: - Rl R2 ~=~ ;:F,e (Rl + R2= 40to 60ohms,e = 150to 300pF) 366 Guideto the MacintoshFamilyHardware • Figure10-3 Circuitdiagramof the serial1/0 interfacein the MacintoshSE computer SCC(8S30) 1/2 of 26IS30 0- TxDA 1---..Jll -N--:'-t-7 RFIfilter 1--------------TXDA- /RTSA /OE O+ RFIfilter 1------......;TXD=A .... +____ __, 3.672MHz /MODEMVIA(6522) GPiA ,..,..:..:::::::1.t-t-"=='-lP_A3 ____ _, RXDA+ RXDA- 3/4 of26J.S32 /DCDA'--.__µO"--~•r ........-+---1 RFIfilter \-------' RxDAl--...µ.OL-<4-=-,-7 RFIfilter \-------' .....__-+---1 RFIfilter ,______ _. HSKiA /CTSA1-.-_....µ.0L-<,t.-_-=_..;..._..,t"_~_RFI_fil_te_r..,, ....----------' /fRxCA 1/2 of 9636A (or 3488A) /DTRAi---+I'--~ 0- RFIfilter ,_______ H_SK_o_A __ __, /W/REQA VIA(6S22) /W/REQB--~P_A_7__ __, 1/2 of26J.S30 0- TxDB 1---..Jll _N--::-'t7 /0E O+ RFIfilter 1--------------TXDB- TXDB+ /RTSB1----iL~~filew--'-ra"-te'"t-"'\.. __ .., +5V Vee contro~ -5V VEE Mode PCI.K GPiB /RTxCB 3.672MHz 3/4 of26IS32 RXDB+ /DCDBt---~O:,__< RXDB- ......___.,_--1 RFIfilter 1-------' RxDB1----...µ.0L-~~"-t---< RFIfilter ,_____ __, .....__-+---1 RFIfilter 1--------' /CTSB1--.-_....µ.0L-<,t.-_-=_..;.. _..,t" _:--,_RFl_filte..;..r_, HSKiB /I'RxCB +12V Vee -l2V _VEE ______ __,10kn Note: Rl R2 ~-~ ;;,e (Rl + R2.. 40to 60ohms,e = 150to 300pF) Chapter10 Serial1/0 Ports 367 • Figure10-4 Circuitdiagramof the serial1/0 interfacein the MacintoshPortablecomputer Misc.Gill SCC(8530) gatearray 1/2 of 261530 TXDA- TxDA TXDA TXDA0 I /OE TXDA+ /DEFUFA /RTSA /DCDA RSfA DCDA 3/4 of 261532 GPiA ~ RxDA RXDA 0 RXDA+ /GPIA /CTSA CTSA RXDA- /fRxCA RXDA0 0 0 470 HSKIA.R HSKiA HSKoA 1/2 of 261530 0- 470 TXDB- I TXDBO 470 TXDB+ /OE /DEFUFB TxDB /RTSB TXDB RTSB - GPiB ~ /DCDB DCDB 3/4 of 261532 RXDB+ RxDB RXDB /GPIB 0 470 RXDB- /CTSB CTSB 0 470 /fRxB RXDBO 40 0 470 HSKiB HSKIB.R /RTxCA RTCA VIA(6522) /MODEM PB3 3488 470 HSKoA IDTRA 470 HSKoB /DTRB +12V /W/REQA VIA(6522) -12V Vee Wave lOkO VEE sha /W/REQB PB7 - PLCK /RTxCB sec.CLOCK 368 Guideto the MacintoshFamilyHardware • Figure10-5 Circuitdiagramof the serial1/0 interfacein the MacintoshSE/30, MacintoshII, MacintoshIlx, MacintoshIlcx, and MacintoshIlci computers SCC(8530) 1/2of26IS30 0- TXDA- TxDAl---!JIL_---f'-0--:-"1"""1. RFIfilter TXDA+ /RTSA /OE O+ RFIfilter 1---------------, VIA1(6522) PA3 GPiA RXDA+ RXDA- I+ 1/2 of 26IS30 HSKoA /DTRA1----+----1·-.0--- 0=-_-+---1 RFI filter >---+--+--------~ /W/REQA VIAi(6522) /W/REQB.---....._P_A_7__ __. 1/2 of 26IS30 0- TXDB- TxDBl----!IL.___,..-o--:-"i"""\RFI filter 1---1------TXD- 8-+-------, /RTSB /OE RFIfilter 1----t-i------------, +SV Vee -SV LVE.i..1E....____i;:=~ PCLI( RXDA+ RXDA- /RTxCB1---,.,.__ I+ /CTSB1------1-~-<'"'r-------r-"1...,__ _, /I'RxCB I- O /OCDB1-----J..!:L-<"'_l- I+ --_"1""__ _ 1 GPiB 1/2 of 26IS30 Note: - Rl R2 ~=~ ;F,c (Rl + R2= 40to 60ohms,C = 150to 300pF) • 7.38336MHzon Macintosh Ilci,3.672MHzon othermodels Chapter10 SerialVOPorts 36CJ • Figure10-6 Circuitdiagramof the serial1/0 interfacein the MacintoshIlfx computer SCCIOP 8530(SCC) 26IS30 0- PAO A/B O+ HSKoA PAl DIC /DTRA RFIfilter 0- TXDA- I RFIfilter TXDA /OE O+ TXDA+ /RTSA RFIfilter PDO DO PDl PD2 Dl D2 /DCDA 0 ~ PD3 D3 0 PD4 D4 PD5 D5 0 /CTSA PD6 D6 PD7 D7 HSKiA HSKoA 26IS30 PCS /CS 0- PRD /RD O+ HSKoB /DTRB RFIfilter 0- TXDB- PWR /WR I RFIfilter TXDB /OE O+ TXDB+ /RTSB RFIfilter 75175 PINT /IRQ /DCDB 0 0 RXDAO RXDA RXDBO RXDB /CTSB 0 REQA /W/REQA REQB /W/REQB HSKiB HSKoB RTXCA /RTXCA RTXCB /RTXCB RXDA 1----------' RXDB 1--------___.J 370 Guideto the MacintoshFamilyHardware Modemslot in the MacintoshPortable TheMacintosh Portablecan assignits internalmodemslotto serial1/0 channelA,the modemport.Figure10-8(on the nextpage)showsthe hardwareinterfacebetweenserial channelA and the modemexpansionslotin the Macintosh Portable. Themodemslotin the Macintosh Portableis an 18-pindualin-linesocketconnectoron the maincircuitboard.Thedata is at CMOSlevels(thatis, V11= 0 to 0.8V; Vrn = 3.5V to V+;Im= 1.6mA;Iott= -25 µA). Figure10-7showsthe pinoutsof the modemconnector. Table10-3givesthe signalnamesand functionaldescriptions. • Figure10-7 Pinoutof the modemconnectoron the MacintoshPortablecomputer 00©©®®®®® 00000®®®® Chapter10 Serial1/0 Ports 371 • Figure10-8 Circuitdiagramof the modeminterfaceon the MacintoshPortablecomputer sec Misc.GLU (Z85C30) gatearray r Modemport TxDA ~ TxDAo Drivers - 1!][2]~ -- -- m mm TxD.MODEM and - receivers RxDAo (channel [I][JJ - RxDA - RxD.MODEM A) - CTSA r- CTS.MODEM RTSA r- /RTS.MODEM DTRA r /DTR.MODEM - DCDA r - /DCD.MODEM \.... Internalmodem connector /MODEM.PWR /MODEM.PWR 1 ©-- Power /RI -5VDC /DCD.MODEM /RTS.MODEM CTS.MODEM RxD.MODEM 3 4 '1 Manager 5 6 /MODEM.INS TxD.MODEM circuitry MODEM.SOUND 7 8 _ /MODEM.BUSY -5VDC /RI 9 10 /DTR.MODEM +5V 11 12 V3 MODEM.SOUND VI -@ 14 - /MODEM.INS MS.ENABLE V2 15 1 I MS.ENABLE Sound VI /MODEM.BUSY 17 18 circuitry V2 V3 372 Guideto the MacintoshFamilyHardware • Table10-3 Signalassignments forthe modemconnectorin the MacintoshPortablecomputer Pin Sigoal Signal numbername dJrection Sigoaldescription 1 /MODEM.PWROutput Active-low signalfromthe PowerManagerIC;see the next section"ModemPowerControl." 2 GND Ground 3 /RTS Output Requesto Sendsignalfromthe computerto the modem 4 /DCD Input DataCarrierDetect;the behaviorof the DataCarrierDetect signaldependson the stateof the &Ccommand. 5 RxD Input DataReceived;data receivedby the computerfromthe modem. 6 CTS Input Clearto Send;assertedby the modemwheneverit has power. 7 MODEM.SOUNDInput Analogsound;outputfromthe modem 8 TxD Output TransmitData;data and commandstransmittedfromthe computerto the modem. 9 /RI Input RingDetectInterrupt;the signalto the computerthat a ringis present.If the computeris in the sleepstate,assertionof this signalcausesthe computerto returnto the operatingstateand power-upthe modem. 10 -5VDC• -5 voltpower;the -5 voltsupplyis guaranteedto be present wheneverthe /MODEM.PWR signalis asserted.Thissignalmay floator go to groundany timefollowingthe negationof /MODEM.PWR. 11 +5VDC VCCpower;wheneverthe hosthaspoweravailable,thispin supplies+5.2VDC± 5%. 12 /DTR Output DataTerminalReady;the behaviorof the DataTerminalReady signaldependson the stateof the &Dcommand. 13 Vl Output Leastsignificantvolume-control bit.Thissignalmayremainhigh followingthe negationof /MODEM.PWR. 14 V3 Output Mostsignificant volume-control bit.Thissignalmayremainhigh followingthe negationof /MODEM.PWR. 15 V2 Output Secondvolume-control bit.Thissignalmayremainhighfollowing the negationof /MODEM.PWR. 16 /MODEM.INS Input ModemInstalled;alwaysassertedby the modemwhilethe modemis installedin the computer. 17 /MODEM.BUSYInput ModemBusy;assertedby the modemwhenthe modemis busy. 18 MS.ENABLE Input ModemSoundEnable;assertedby the modemto enablethe computer'sspeaker. "Poweron pin 10is controlledby the PowerManagerIC. Chapter10 Serial1/0 Ports 373 Modempower control Controlof the powerto the modemslotis signaledby the lines/MODEM.PWR and /MODEM.BUSY. A modemcardcan use the /MODEM.BUSY signalto indicateto the CPU that any of the followingis true: • Themodemis executingits power-upsequence. • The modemis off-hook(for any reason). • The modemis executinga command,wherecommandexecutionbeginswiththe carriagereturnat the end of an ATcommandsequenceor the repeat-last-command sequence( a/ or A/). If the modemis executingany of its self-tests,it is consideredto be executinga commandand thereforebusy. The PowerManagerICcontrolsthe /MODEM.PWR signal.If iMODEM.PWR is negated (high),the modemmustimmediately initiateits power-offsequenceregardlessof what it is doing.The modemmustenterits sleepstatewithin500ms followingthe negationof /MODEM.PWR; by that timethe modemmustreduceits powerconsumptionto meetthe maximumpowerlimitationfor sleepstate.The modemcan alsouse that 500ms to set its outputsto a defaultstate and store its operatingparametersand registervaluesso that it can restorethemwhenoperationresumes.Twoof the linesto the modem,/DTRand TxD, go to groundpotentialwithin50 ns of the negationof /MODEM.PWR. Whilethe computeris in the sleepstate,the volume-control bits,Vl, V2, and V3,are floating. • Note:On Apple'smodemcardfor the Macintosh Portable,the CTSline is always asserted(pulledhigh)becauseflowcontrolis not provided.The/RIsignalalways reflectsthe statusof the incomingringsignal.The/RTSsignal,whichis meaninglessin full-duplexoperation,is not connected.When/MODEM.PWR is negatedand the modemcardpreparesitselffor the sleepstate,the cardforcestwo of its outputshigh (IDCDand RxD)and one of its outputslow (MS.ENABLE). Usually,the PowerManagerICdoesnot negate/MODEM.PWR if the modemhas /MODEM.BUSY asserted.However,thereare timeswhenthe PowerManagerICmusttum the modemoffeventhoughit is busy;for example,whenthe batteryreserveis too low.If this occurs,the modemmuststop its activity(for example,go on-hook)and performthe necessaryactivitiesto preparefor switchingto its sleep state.If the modemis executing a commandwhen/MODEM.PWR is negated,the modemcan do one of two thingsbefore switchingto its sleepstate:eitherfinishexecutingthe command,or abortexecutionand restorethe state priorto the command,whichevertakesthe leastamountof time. 374 Guideto the MacintoshFamilyHardware Chapter11 SCSIPorts Allcurrentmodelsof the Macintoshavethe SmallComputerSystem Interface(SCSI).The MacintoshPluscomputerhas an externalSCSI parallelport.AllothercurrentMacintoshmodelshaveboth internaland externalSCSIports.On modelswithinternalSCSIports,an internalhard disk,if present,is connectedto the SCSIport. • externalSCSIport only:Macintosh Pluscomputer • internaland externalSCSIports:Macintosh SE,MacintoshSE/30, MacintoshPortable,MacintoshII, MacintoshIlx, MacintoshHex, MacintoshIlci, and MacintoshIlfx computers Thischapterdescribesthe hardwareused in the SCSIinterfaces,gives pinoutsfor the internaland externalconnectors,and providessome informationabout how softwarecommunicates with the SCSIdevices. The chapterconcludeswitha briefdescriptionof SCSIdata transfers. SCSI ports SCSI MacintoshPlus SCSI MacintoshSE SCSI MacintoshSE/30 SCSI MacintoshPortable SCSI MacintoshII SCSI Macintosh!Ix SCSI MacintoshIlcx SCSI MacintoshIlci SCSIDMA MacintoshIlfx 376 FamilyHardware Guideto the Macintosh Using the SmallComputerSystemInterface(SCSI) AllcurrentMacintoshmodelsprovidea high-speedparallelcommunication port controlled by an NCR5380SmallComputerSystemInterface(SCSI)IC.TheNCR5380is capableof communicatingwithup to sevenSCSIperipheraldevicessuchas the AppleHardDiskSC, otherSCSIhard diskdrives,streamingtape drives,and high-speedprinters. ~ Developer tip Thischapterdoes not containinformationaboutthe internal operationof the SCSIcontrollerICs(5380and SCSIDMA)used in the Macintoshcomputers.Applerecommendsthat applicationsuse the routinesand ROMtoolsprovidedby the Macintoshsystemsoftware and describedin InsideMacintoshto communicate withhardware devices.If you are developinga devicethat requiresits own SCSI driver,you shouldcommunicate directlywithAppleto obtain technicalassistance.Seethe section"AppleDeveloperServices,"at the end of the Preface.~ AllcurrentMacintosh modelshavean externalSCSIport:a DB-25connectorlocatedon the backpanelfor attachingSCSIperipheraldevices.In addition,all Macintoshmodels exceptthe Macintosh Plusand earliermodelshavean internalconnector,connectedin parallelwiththe externalone,forattachingan internalSCSIharddiskdrive.Theinternal SCSIconnectoris a 50-pinflat-ribbonconnector(excepton the MacintoshPortable, whichusesa 34-pininternalSCSIconnector). TheMacintoshSCSIport interfacecan be used to implementall of the protocols, arbitration,interconnection, and other featuresof the IEEESCSIstandard,definedby the ANSIX3T9.2committee.For moreinformationon the SCSIstandard,consultthe IEEE specification:SectionD, ANSIX3T9.2(Version17B). Eachdeviceon the SCSIbus has a uniquedeviceIDfromOthrough7; the IDof the Macintoshcomputeris always7 and the IDof the internalSCSIdevice-if one is installed-isalways0. If the SCSInetworkhas any peripheraldevicesconnected,at leastone set of termination resistorsmustalsobe connected.TheSCSInetworkusesopen-collector logic,and the terminationresistorsare requiredto bringthe SCSIbus linesup to theircorrectinactive levelsof approximately 3 volts. If an internalSCSIdeviceis installedin the computer,a set of terminationresistorsis also installed,eitherin or nearthe internalSCSIdevice.An externalSCSIdevicemaycontain built-interminationresistors,or-more commonly-itmayrequirean externalset of terminationresistorscalleda terminationblock. Chapter11 SCSIPorts rT7 If an internalor externaldevicedoes not provideterminationresistors,at leastone terminationblockmustbe installedat the appropriatelocationin the SCSInetwork.A SCSInetworkwithmultipleperipheraldevices,or morethan approximately 3 feet of total cablelength,mayrequiretwo sets of terminationresistors:one set at eitherend of the SCSInetwork. .A. Warning Neverconnectmorethan two sets of terminationresistorsto a MacintoshSCSInetwork.Connectingmorethan two sets of terminationresistorswilloverloadthe NCR5380linedrivers.Keepin mindthat any Macintoshcomputerthat has an internalSCSIhard disk alreadyhas one set of terminationresistorsinstalled.• The terminationblockreceivesits powerfromthe TerminatorPower(TPWR) pin on the SCSIconnector. • Note:Becauseof powersupplylimitations,the MacintoshPlusand the Macintosh Portabledo not providepowerfor terminationresistorsat the SCSIconnector.If you wantyourSCSIdeviceto be usablewiththosemachines,the devicemustprovide powerfor the terminationresistors. The DB-25externalSCSIconnectorson the Macintoshcomputersdo not matchthe ANSI X3T9.2standard,whichcallsfor a 50-pinflat-ribbonconnector.Eventhoughthe external connectorsuse only25pins,allthe ANSIX3T9.2-clefinedsignalsand controlinesare available;onlythe extragroundlineshavebeen removed(excepton the Macintosh Plus and Macintosh Portablemodels,wherethe terminationpowerlinewas alsoremoved). Thestandard50-pinconnectoris used for internalSCSIdevicesin all Macintoshmodels that supportSCSIexceptthe MacintoshPortable,whichuses a 34-pininternalconnector. Thesignalson the DB-25externalconnectorare identicalto the corresponding signalson the internalconnector.Theinternaland externalconnectorsare wiredin parallel,both controlledby the sameNCR5380IC;thereis no differencein datatransferrate or device performancebetweenthe two connectors. • Note:If a SCSIperipheraldevicerequiresa standard50-pinconnector,the usercan attachan Appleadaptercableto connectthe externalDB-25connectorto a standard 50-pinconnector. 378 Guideto the MacintoshFamilyHardware SCSIconnectors Macintoshcomputersuse differentconnectorsfor internaland externalSCSIdevices. ExternalSCSIconnector Figure11-1showsthe pinoutforthe DB-25externalSCSIconnector,locatedon the back panel of the computer. .6. Warning Do not connectan RS-232deviceto the DB-25SCSIport connector. TheSCSIinterfaceusesstandardrn logiclevelsof Oand +5volts, whereasRS-232devicescan imposelevelsof-25 and +25voltson somelines.Thesevoltagelevelswilldamagethe NCR5380ICon the computer'smainlogicboard. _... • Figure11-1 Pinoutof the externalSCSIconnectoron the Macintoshcomputers Table11-1showsthe signalassignments forthe SCSIDB-25externalconnector.These signalsare describedin detailin the NCR5380SCSInterfaceChipDesignManualand the IEEEspecification:SectionD, ANSIX3T9.2 (Version17B). Chapter11 SCSIPorts '579 • Table11-1 Signalassignmentsfor the externalSCSIconnectoron the Macintoshcomputers Plnnudler Signalname Signaldescription 1 /REQ Requestfor a REQ/ACKdata transferhandshake 2 /MSG Indicatesthe messagephase 3 /1/0 Controlsthe directionof data movement 4 /RST SCSIdata bus reset 5 !ACK Acknowledge for a REQ/ACKdata transferhandshake 6 /BSY IndicateswhetherSCSIdata bus is busy 7 GND Ground 8 /DB0 Bit0 of SCSIdata bus 9 GND Ground 10 /DB3 Bit3 of SCSIdata bus 11 /DBS Bit 5 of SCSIdata bus 12 /DB6 Bit 6 of SCSIdata bus 13 /DB7 Bit7 of SCSIdata bus 14 GND Ground 15 !CID Indicateswhethercontrolor data is on the SCSIbus 16 GND Ground 17 IATN Indicatesan attentioncondition 18 GND Ground 19 /SEL Selectsa targetor ·an initiator 20 /DBP Paritybit for SCSIdata bus 21 /DBI Bit 1 of SCSIdata bus 22 /DB2 Bit 2 of SCSIdata bus 23 /DB4 Bit4 of SCSIdata bus 24 GND Ground 25 TPWR +5 voltstenninatorpower• •on the MacintoshPlus,thispin is not connected.On otherMacintosh models,thislineis providedfor poweringterminationresistorsonly,not for poweringSCSId~vices. InternalSCSIconnector Figure11-2showsthe pinoutfor the 50-pinflat-ribboninternalSCSIconnectorused in all modelsexceptthe MacintoshPortable. Table11-2showsthe signalassignmentsfor the SCSI50-pinflat-ribboninternalconnector. Thesesignalsare describedin detailin the NCR5380 SCSInterfaceChipDesignManual and the IEEEspecification:SectionD, ANSIX3T9.2 (Version17B). 311» Guideto the MacintoshFamilyHardware • Figure11-2 Pinoutof the internalSCSIconnectoron the Macintoshcomputers ®®®®®®®®®®®®@@®®®®®®00000 ®®®®@®®®®®®@@®@®@®®®®©©00 • Table11-2 Signalassignmentsfor the internalSCSIconnectoron the Macintoshcomputers Plnnumber Signalname Signaldescription 1 GND Ground 2 /DBO Bit Oof SCSIdata bus 3 GND Ground 4 /DBl Bit 1 of SCSIdata bus 5 GND Ground 6 /DB2 Bit 2 of SCSIdata bus 7 GND Ground 8 /DB3 Bit 3 of SCSIdata bus 9 GND Ground 10 /DB4 Bit 4 of SCSIdata bus 11 GND Ground 12 /DBS Bit5 of SCSIdatabus 13 GND Ground 14 /DB6 Bit 6 of SCSIdata bus 15 GND Ground 16 /DB7 Bit 7 of SCSIdata bus 17 GND Ground 18 /DBP Paritybit for SCSIdata bus (continued) Chapter11 SCSIPorts 381 • Table11-2 Signalassignments for the internalSCSIconnectorin the Macintoshcomputers(continued) Signalname Signaldesaiptioo 19 GND Ground 20 n.c.• Not connected• 21 GND Ground 22 n.c.• Not connected• 23 GND Ground 24 n.c.• Not connected• 25 GND Ground 26 TPWR +5 voltsterminationpower 27 GND Ground 28 n.c.• Not connected• 29 GND Ground 30 n.c.• Not connected• 31 GND Ground 32 !ATN Indicatesan attentioncondition 33 GND Ground 34 n.c.• Not connected• 35 GND Ground 36 /BSY IndicateswhetherSCSIdata bus is busy 37 GND Ground 38 /ACK Acknowledge for a REQ/ACKdatatransferhandshake 39 GND Ground 40 /RST SCSIdata bus reset 41 GND Ground 42 /MSG Indicatesthe messagephase 43 GND Ground 44 /SEL Selectsa targetor an initiator 45 GND Ground 46 !CID Indicateswhethercontrolor data is on the SCSIbus 47 GND Ground 48 /REQ Requestfor a REQ/ACKdata transferhandshake 49 GND Ground 50 /1/0 Controlsthe directionof data movement "Pins20,22,24,28,30,and 34 are connectedto groundon the Macintosh SEand Macintosh II. 382 Guideto the MacintoshFamilyHardware InternalSCSIconnectorin the MacintoshPortable Figure11-3showsthe pinoutforthe 34-pinflat-ribboninternalSCSIconnectorusedin the MacintoshPortablecomputer. • Figure11-3 Pinoutof the internalSCSIconnectorin the MacintoshPortablecomputer ®®®®®@@®®®®®®0000 ®®®@@®@®®®®®®®®00 Table11-3showsthe signalassignments forthe SCSI34-pininternalconnectorin the MacintoshPortablecomputer.Thesesignalsare describedin detailin the NCR5380 SCSI InterfaceChipDesignManualand the IEEEspecification:SectionD, ANSIX3T9.2 (Version17B). Chapter11 SCSIPorts 383 • Table11-3 Signalassignments for the internalSCSIconnectorin the MacintoshPortablecomputer Slgoalclescripdon 1 /REQ Requestfor a REQ/ACKdata transferhandshake 2 GND Ground 3 /MSG Indicatesthe messagephase 4 /CID Indicateswhethercontrolor datais on the SCSIbus 5 /1/0 Controlsthe directionof data movement 6 GND Ground 7 !ACK Acknowledge for a REQ/ACKdatatransferhandshake 8 /ATN Indicatesan attentioncondition 9 /BSY IndicateswhetherSCSIdata bus is busy 10 /RST SCSIdata bus reset 11 GND Ground 12 /SEL Selectsa targetor an initiator 13 /DBP Paritybit for SCSIdata bus 14 /DB0 BitOof SCSIdata bus 15 /DBI Bit 1 of SCSIdata bus 16 GND Ground 17 /DB2 Bit 2 of SCSIdata bus 18 /DB3 Bit3 of SCSIdata bus 19 /DB4 Bit4 of SCSIdata bus 20 /DBS Bit 5 of SCSIdata bus 21 /DB6 Bit6 of SCSIdata bus 22 /DB7 Bit7 of SCSIdata bus 23 +5V + 5Vpower 24 +5V + 5Vpower 25 +12V +12Vpower 26 +12V +12Vpower 27 GND Ground 28 GND Ground 29 GND Ground 30 GND Ground 31 +12V +12Vpower 32 +12V +12Vpower 33 +5V + 5Vpower 34 +5V + 5Vpower 384 Guideto the MacintoshFamilyHardware Circuitdiagramsof the SCSIinterface Whilethe SCSIinterfaceis functionally the sameon all Macintoshmodels,thereare differencesin details,as shownin the circuitdiagramson the followingpages.Figures11-4 through11-9are circuitdiagramsfor the followingmodelsof Macintoshcomputers: • Macintosh Plus:Figure11-4 • Macintosh SE:Figure11-5 • Macintosh SE/30:Figure11-8 • MacintoshPortable:Figure11-6 • Macintosh II: Figure11-7 • Macintosh Ilx: Figure11-8 • Macintosh Hex:Figure11-8 • Macintosh Ilci:Figure11-8 • Macintosh Ilfx:Figure11-9 Chapter11 SCSIPorts 38S • Figure11-4 Circuitdiagramof the SCSIinterfaceon the MacintoshPlus computer +5V §) NCR5380 External~! lOkQ ~I controller connector /REQ Shielded /REQ DB-25 /MSG /MSG /CID /CID /VO /VO /RST /RST n.c. DRQ /ATN /ATN /ACK /ACK n.c. IRQ /BSY /BSY /SEL /SEL n.c. RDY /DBP /DBP /DB0 /DBO /DBl /DBl /DB2 /DB2 +5V /DB3 /DB3 /DB4 lkn /DB4 /DB5 /EOP /DB5 /DB6 /DB6 /DB7 /DB7 386 Guideto the MacintoshFamilyHardware • Figure11-5 Circuitdiagramof the SCSIinterfaceon the MacintoshSEcomputer +5V Internal SCSIconnector NCR5380 50-pin ExternalSCSI ToMC68000 SCSIcontroller 10k.Q ribbonheader connector Shielded /DTACK /I/O 1--1--_;,_/I/=-0.:,___----IH DB-25 BBU /REQ 1--11--/RE __ Q___ ~ Holdsoff !CID /CID1--11------Ms /DACKand /DACK /DTACKin /SEL1--1--..;../S;,;:EL.:,___----N-4 DMAmode untilDRQ_ DRQ /MSGt---Jf--'-/M_S_G_----1~ /RST /RSTt-----4-----lfi ToMC68000's IACK t---- 1A_C_K_----IH-1 /IPLOinterrupt /BSYi--------tM /BSY VIA /IRQ +5V IRQ n.c. RDY /DBP +5V /DBP /DB7 /DB7 1 k.Q /DB6 /DB6 /EOP /DB5 /DB5 /DB4 /DB4 /DB3 /DB3 /DB2 /DB2 /DBl /DBl /DB0 /DB0 Chapter11 SCSIPorts ~ Circuitdiagramof the SCSIinterfaceon the • Figure11-6 Macintosh Portablecomputer ~ ExternalSCSI IntemalSCSIconnector connector NCR.5380 34-pin Shielded To68HCOOO SCSIcontroller ribbonheader DB-25 /DTACK /REQ /MSG /MSG /CID /CID /1/0 CPUGLU /DACK /1/0 /ACK /ACK DRQ /ATN /ATN /BSY /BSY /RSf /RSf /SEL /SEL /DBP /DBP VIA /DB0 /DBO /DBl /DBl CA2 /DB2 /DB2 /DB3 /DB /DB4 /DB4 CB2 ffiQ /DB5 /DB5 /DB6 /DB6 n.c. ROY /DB7 /DB7 +5V +12V lOOkQ /EOP 388 Guideto the MacintoshFamilyHardware • Figure11-7 Circuitdiagramof the SCSIinterfaceon the Macintosh II computer Intemal SC'3I connector (t) NCRS3C80 50-pin ExtemalSC'3I ToM~20 SCSIcontroller ribbonheader connector Shielded /DSACKO /1/0 DB-25 /1/0 /REQ GWE /REQ Holdsoff /CID /CID /DACKand /DACK /SEL /DSACKOin /SEL DMAmode /MSG untilDRQ DRQ /MSG /RST /RSI' /ACK /ACK /BSY /BSY VIA2 /ATN CA2 /ATN +5V CB2 IRQ nc. RDY /DBP /DBP /DB7 /DB7 /D86 /0B6 /E0P /DB5 /DB5 /DB4 /DB4 /DB3 /DB3 /DB2 /DB2 /DBI /DBI /DBO /DBO Chapter11 SCSIPorts 38'J • Figure11-8 Circuitdiagramof the SCSIinterfaceon the MacintoshSE/30, MacintoshIlx, MacintoshIlcx, and MacintoshIlci computers Internal ~I connector NCR53C80 50-pin External~! ToMC68030 sc.g controller ribbonheader connector Shielded /DSACK0 /1/0 DB-2S GUJE /REQ orRBV Holdsoff CID /DACKand /DACK /SEL /SEL /DSACK0in DMAmode /MSG DRQ /MSG untilDRQ /RSf /RSf /ACK /ACK /BSY VIA2 /BSY orRBV CA2 /A1N /A1N CB2 IRQ n.c. ROY /DBP /DBP /DB7 /DB7 /DB6 /DB6 /EOP /DBS /DBS /DB4 /DB4 /DB3 /DB3 /DB2 /DB2 /DBl /DBl /DBO /DB0 390 Guideto the MacintoshFamilyHardware • Figure11-9 Circuitdiagramof the SCSIinterfaceon the MacintoshIlfx computer Internal SCSIconnector 50-pin ExternalSCSI ToMC68030 SCSI-DMA ribbonheader connector Shielded /DSACK(0,1) SVO 1---..:..:IV::..;O:;..__--N{ DB-25 PAL SREQ1---.:.:.=~--A-1 Merge SC/D1---"-/Ca:.c/D;;;___-II{ with /DSACK SSEL1---..:..:IS;::EL=----A-1 lines from SMSG1---:.:;IM.:;;S.;;.G_--1if.{ other devices SRSf1---.;..;/RSf~---1iH SACK1---"-'/A.;..;CK __ -N-l SBSYi---..:..:IB:;.;;SY-=----A-1 /DSACKSCSI(0) .___----1 /DSACKSCSI(l) /DBP SDP /D87 SD7 /D86 SD6 /D85 SD5 /DB4 SD4 /D83 SD3 /OB2 SD2 /DBI SDI /OB0 SDO Chapter11 SCSIPorts 391 SCSIdatatransfers SCSIdatatransfersare controlledby the CPUand performedby the NCR5380SCSI controllerIC.TheSCSIcontrollercan operatein threemodes:normalmode,pseudo-OMA mode,and trueOMAmode.In normalmode,the SCSIdriversoftwarehas to manageall the handshakingnecessaryto communicate witha peripheralSCSIdevice.In pseudo-OMA mode,the SCSIcontroller'sinternalogicautomatically handlesall the SCSIhandshake signals.(Allthreemodesare describedin detailin NCR'sdocumentation forthe 5380.) TheSCSIcontroller'snormalmodeis alwaysusedforcommands; also,a SCSIdrivercanuse normalmodeto performSCSIbus datatransfersif the peripheraldevicerequires nonstandardhandshakingor nonstandardtimingof handshaking signals.Becausepseudo- OMAmodetransfersare fasterand easierto implement,however,mostSCSIdrivers performSCSIbus data transfersin pseudo-OMAmode. • Note:OMAstandsfor direct-memory access. Macintosh modelsotherthanthe MacintoshIlfx do not supporttrue direct-memory accessby the SCSIcontroller,but theydo supportthe SCSIcontroller'spseudo-OMA mode.Fora descriptionof true OMAoperationof the SCSIinterfacein the Macintosh Ilfx,pleasereferto the section "SCSIOMAin the Macintosh IlfxComputer"laterin this chapter. In a typicalSCSIdatatransfer,the CPUfirstusesthe SCSIcontroller'snormalmodeto set up a blocktransferof information, and then usespseudo-OMA modeto carryout the actualtransferof data.Oncethe datatransferhas begun,the SCSIcontrollerusesthe ORQ bit in its Busand Statusregisterto indicatewhenit has receiveda bytefrom,or writtena byte to, the peripheraldevice. TheCPUcan use eitherof twomethodsto respond:pollingor blindtransfer.In the polling method,the SCSIdriverpollsthe ORQbit in normalmodeto determinewheneachbyteis readyto be reador written;thenthe actualreador writeis performedin pseudo-OMA mode.In the blindtransfermethod,the Busand Statusregisteris checkedin normalmode onlyto determinewhenthe firstbyteof a blockis readyto be transferred;the remaining bytesin the blockare reador writtenin pseudo-OMA modeat the maximumratepossible for the interface. 392 Guideto the Macintosh FamilyHardware Handshakingfor SCSIdatatransfers AllMacintoshmodelssincethe MacintoshPlus-that is, the Macintosh SE, MacintoshSE/30,MacintoshPortable,MacintoshII, MacintoshIIx, MacintoshIIcx, Macintosh llci, and Macintosh IIfx-includehardwarehandshakingin pseudo-OMA mode to preventthe CPUfromreadinginvaliddataor writingdatafasterthan the peripheralcan acceptit. Thehandshakingis handledby the computer'sgenerallogicIC,whichdoesnot completeeachbytetransferuntilthe SCSIcontroller'sDRQlinegoeshigh.This handshakingmakesreadand writeoperationsafein pseudo-OMA mode,evenwhenusing the blindtransfermethod. • Note:The differentMacintoshmodelsuse a differentgenerallogicICto controlthe SCSI:the BBUin the MacintoshSEcomputer;the CPUGLUin the MacintoshPortable; the GLUEin the Macintosh SE/30,Macintosh II, MacintoshIIx, and MacintoshIIcx; and the MDUin the Macintoshllci. In the Macintosh IIfx,the SCSIDMAICcontrolsall SCSIfunctionsexceptinterrupts,whichare handledby the OSS.The nextsection describesthe SCSIDMAin the Macintosh IIfx. On all modelsmorerecentthanthe Macintosh Plus,if the reador writeoperationoverthe SCSIbus is not completedwithincertaintime (differentfor differentmachines),the generalogicICassertsa bus error(IBERR) to the CPU.Thistimeoutdoesnot occurin the MacintoshPlus,whoseSCSIoperationsneverwaitfor DRQ. On MacintoshmodelswithtwoVIAs,the IRQlinefromthe NCR5380goesto VIA2.If enabledby the appropriatebit in the VIA2InterruptEnableregister,the IRQlinecausesa VIA2interrupto the CPU.Thisinterruptcan be usedfor bus disconnectand reconnect operationsand to indicatebus errors. On Macintosh modelswithtwoVIAs,the DRQlinealsogoesto VIA2(aswellas to the GLUEIC).If enabledby the appropriatebit in the VIA2InterruptEnableregister,the DRQ linecausesa VIA2interrupto the CPU.Thisinterruptcan be used to initiatea data transferfor an interrupt-driven operatingsystemlikeA/UX. On the Macintosh Ilci,boththe IRQand DRQsignalsfromthe 5380are storedin the InterruptFlagsregisterin the VIA2portionof the RBV.As on Macintoshmodelswithtwo VIAs,the SCSIcontroller'sIRQand DRQsignalscan be usedto generateappropriate interruptsto the mainprocessor. On the Macintosh IIfx,the IRQand DRQsignalsfromthe SCSIDMAare storedin the InterruptFlagsregisterin the OSS.Underthe controlof the systemsoftware,the OSSuses the IRQand DRQsignalsto generateappropriateinterruptsto the mainprocessor. Chapter11 SCSIPorts 393 On Macintosh modelsthathavean MC68020 or MC68030,the CPUuseslongword instructionsfor readingand writingto the SCSIcontroller,thus takingadvantageof the dynamicbus sizingfeatureto achievea fasterdata transferate.Becausethe CPUcan tell by the /OSACKO and /OSACKl signalsthatthe SCSIcontrollerhas an 8-bitdatabus, it makesfour back-to-back8-bitdata transfersfor each longword.Transmission of each bytecan be delayeduntilpermittedby the hardwarehandshaking. On thoseMacintosh models,the approximatemaximumSCSItransferatewithina blockis 1.4MBper second for blindtransfers. .4 Devdoperdp In the MacintoshPluscomputer,neitherof the NCR5380interrupt signals(IRQand ORQ)is connectedto the CPU:thereis no hardware handshakingon the SCSIport.Instead,softwaremustpollthe Bus and Statusregisterin the NCR5380to detectinterruptrequests. Approximate maximumSCSItransferrateswithina blockare 170KBper secondforpolledtransfersand 263KBper secondfor blindtransfers.~ SCSIDMAin the MacintoshIIfx computer In the MacintoshIlfx,an Applecustomintegratedcircuit,the SCSIOMA,providesthe functionsof the SCSIcontroller.In additionto providingall the featuresand functionsof the 53C80IC,the SCSIOMAICcanhandledatatransfersto and fromthe mainmemoryby direct-memory access(OMA). Somefeaturesof the SCSIOMAICinclude • built-in53C80SCSIadapter • OMAbypassmodefor compatibility withsoftwarewrittenfor the 53C80 • hardwarehandshakemode(software-controlled cJatatransferwithno pollingfor availablebytes) • OMAtransfersof 32-bitlongwords • directaddressingof the entirememory(32addresslines) • blocktransfersof up to 4 GB • supportfor misalignedata bufferaddresses(nonzeromodulo4) • asynchronous data transferate of 3 MBper second • automaticSCSIbus arbitrationas wellas program-controlled arbitration 391 Guideto the MacintoshFamilyHardware Onlydatatransfersare handledby the DMAchannel;SCSIbus protocolis underthe control of softwarerunningon the mainprocessor.Themainprocessorsendscontroland commandbytesto the SCSIOMAICa byteat a time.UsingDMA,datatransfersusually consistof four bytes(32bits) at a time. Operationof the S~I DMAIC Usingthe SCSIDMAIC,onlydatatransfersare handledby the DMAchannel;SCSIbus protocolis underthe controlof softwarerunningon the mainprocessor,justas it is on otherMacintoshmodels.In addition,the SCSIDMAIC on the Macintosh Ilfxcan also functionas a conventionalSCSIinterfaceand transferdata underthe controlof the mainprocessor. TheSCSIOMAIChas fourmodesof operation:slavemode,mastermode,test mode,and resetmode.Slaveand mastermodesare the modesused in normaloperationof the MacintoshIlfx computer. Slavemode Themainprocessorusesslavemodeto set up the registerson the SCSIDMAICand to transferdatato and fromthe IC.Themainprocessoreadsand writesto the IC'sregisters by readingor writingto the addressspaceassignedto the SCSIDMAIC.In slavemode, the mainprocessorcommunicates withthe SCSIDMAICin the samewaythat it doeswith anyotherasynchronous memorycontroller. tip Existingdriversthatdon'tuse hardwarehandshaking 4,. Developer willrun on the Macintosh Ilfxas is. Driversthat do use hardwarehandshakingmust be modifiedto set up the SCSIDMAfor hardwarehandshakingin orderto run on the MacintoshIlfx. 4 Mastermode TheSCSIDMAICusesmastermodeto performDMAdatatransfers.In mastermode,the SCSIOMAIC usesthe normalbus-arbitation proceduresof the MC68030 to transferdata to and frommainmemorywithoutassistancefromthe MC68030. To initiatea DMAtransfer,the SCSIdriverwritescontrolinformation to the DMAaddress counterand DMAByteCountregisteron the SCSIDMAICand thenwritesto one of the IC'sstart registers. Chapter11 SCSIPorts 395 TheSCSIOMAIChandlesaddressesthatare nonzeromodulo4 by adjustingforthemon the firstand lastMC68030 bus transfer.Similarly, the SCSIOMAIChandlesbytecounts thatare nonzeromodulo4 by adjustingforthemon the firstand lastMC68030 bus transfer.TheSCSIOMAIC keepstrackof the numberof bytestransferredand placesthe data in the correctbytelanesas it is transferredto or frommemory. 396 Guideto the MacintoshFamilyHardware Chapter12 Displays DifferentMacintoshmodelsprovidedifferentdisplays.Somemachines haveboth the displaydeviceand the displaycircuitsbuiltin, as in the originalMacintosh. Othermodelsrequirean expansioncardfor the video circuitsand an externalvideomonitor.The Macintosh IIci,whichhas built-indisplaycircuitsfor an externalmonitor,can alsouse a video expansioncard. The typesof displaysused on the differentmodelsare as follows: • built-indisplaycircuitsand CRTdisplay:Macintosh Plus, MacintoshSE,and MacintoshSE/30computers • built-indisplaycircuitsand flat-paneldisplay:MacintoshPortable computer • videoexpansioncard and externalmonitor:Macintosh II, MacintoshIIx, MacintoshIIcx, and MacintoshIlfx computers • built-indisplaycircuitsfor an externalmonitor,or videoexpansion card: MacintoshIIci computer Forthe Macintoshmodelsthat havebuilt-invideodisplaydevicesand circuits,this chapterdescribesthe videosignalsgeneratedon the main logicboardand the use of the videobuffersin RAM.Forthe Macintosh SE/30,this chapteralso describesthe waythe displayis functionally similarto a videocardin an expansionslot. Forthe Macintoshmodelsthat requirea videocardin an expansionslot, this chapterdescribesthe Macintosh II VideoCardas a typicalexample. For the MacintoshPortable,this chapterdescribesthe flat-paneldisplay and providesinformationabout its interfaceto an optionalexternal video display. Display Built-in B&Wvideo MacintoshPlus ,PL__ Built-inB&W or exp. card MacintoshSE ,PLO? MacintoshSE/30 Built-inB&W or exp. card ,~•Bl Flatpanel or ext.video MacintoshPortable BL MacintoshII - B&Worcolor on exp.card a_ Macintosh!Ix - B&Worcolor on exp. card J9__ MacintoshIlcx Ii&Wor color on exp. card ~ MacintoshIlci - Built-inB&W or color, or exp. card BL MacintoshIlfx - B&Worcolor on exp. card 398 Guideto theMacintosh FamilyHardware Built-invideo display The MacintoshPlus,Macintosh SE,and Macintosh SE/30(and earlierMacintoshmodels) havebuilt-invideocircuitsand a built-inmonitor.Thevideodisplayon thosemachinesis an arrayof blackand whitepixelsapproximately 4.6by 7 inches.Thissectiondescribes that displayand the hardwarethat generatesit. • Note:The built-indisplayon the Macintosh SE/30computerhas the sameappearance as that on the MacintoshPlusand MacintoshSEcomputers-blackand white,512by 342pixels-but the hardwarethat generatesit has someof the featuresof a video expansioncard.Fora descriptionof a videoexpansioncard,pleasereferto the next majorsection,"ExpansionCardVideo";for informationaboutthe way the Macintosh SE/30emulatesan expansioncard,refer to the next majorsectionafter that, "VideoDisplayin the MacintoshSE/30Computer." ~ Developer tip Macintoshmodelsthat accepta processor-direct expansioncard can supporta videodisplaycardand an externalmonitorin additionto their built-indisplay(Macintosh SEand MacintoshSE/30models).The MacintoshPortablecomputercan alsosupportan externalmonitor. The systemsoftwaresupportsmultipledisplaysas partsof an extendeddesktop. ~ Videodisplayscanning Thevideodisplayis createdby a movingelectronbeamthat scansacrossthe screen, turningon and offas it scansin orderto createblackand whitepixels.Eachpixelis a square,approximately 1/72inchon a side. To createa screenimage,the electronbeamstartsat the upper-leftcomerof the screen (see Figure12-1).Thebeamscanshorizontally acrossthe screenfromleftto right,creating the top lineof graphics.Whenit reachesthe lastpixelon the rightend of the top line,it turnsoff and continuespast the lastpixelto the physicalrightedge of the screen.Thenit flicksinvisiblybackto the leftedge,movingdownone scan line.Aftertracingacrossthe blackborder,it beginsdisplayingthe data in the secondscanline.Thetimebetweenthe displayof the rightmostpixelon one lineand the leftmostpixelon the nextis calledthe horizontalblankinginterval. Chapter12· Displays 399 • Figure12-1 Videoscanningpatternin the Macintosh computerswithbuilt-in video displays Horizontal I blankingends • hereforeachline i Horizontal blankingstarts hereforeachline Scan --- ----------------------- lineO; ------------------ vertical --------------------------- blanking endshere ----------------------- ------------------------ Black ------------------- ---------- border ------------------------- ---------------------- ---------------------- ------------------ -- ------------------- ---------------------- ·----------------------- --------------------- ----------- ----------- -------------------- ·----------------------- -------------------------- ----- --------- -------------- ·--------------------:------- ---------------------- -----= Scan --- ----------------------- .... vertical line341 blanking startshere 512pixelswide Whenthe electronbeamreachesthe lastpixelof the last(342nd)lineon the screen,it tracesout to the rightedgeand then movesbackup to the upper-leftcorner(continuing to scanhorizontally severaltimesas it doesso). Thereit tracesthe leftborderand then beginsonceagainto displaythe top line.Thetimebetweenthe lastpixelon the bottom lineandthe firstone on the top lineis calledthe verticalblankinginteroal. Atthe beginningof the verticalblankinginterval,the VIAgeneratesa verticalblanking interrupt(VBL). • Note:On the Macintosh SE/30(as wellas all modelsthatdo not havea built-indisplay) the VBLinterruptis drivenby a 60.15Hzclockand is not synchronous withthe blankingof the screen.Seethe next majorsection,"Expansion CardVideo,"for informationaboutsynchronizing softwarewithverticalblankingon thosemodels. Thepixelclockrate(thefrequencyat whichpixelsare displayed)is 15.6672MHz,or about0.064µs per pixel.Foreachscanline,512pixelsare drawnon the screen,requiring 32.68µs.Thehorizontalblankingintervaltakesthe timeof an additional192pixels,or 12.25µs.Thus,eachfullscanlinetakes44.93µs, makingthe horizontalscanrate 22.25kHz. 400 Guideto the MacintoshFamilyHardware Thevisibleportionof a full-screendisplayconsistsof 342horizontalscanlinesand requires15367.65 µs,or about15.37ms,to scan.Duringthe verticalblankinginterval,the turned-offbeam-while movingfromthe bottomof the screenback to the top-- invisiblytracesout an additional28scan lines,taking1258.17µs or about1.26ms to do so. Thismeansthe fullframeis redisplayedevery370scanlines,or onceevery16625.8µs. That'sabout 16.6ms per frameand makesthe verticalscanrate (the full-screendisplay frequency)equal to 60.15Hz. Videodisplaycircuits The videogeneratoruses 21,888bytesof RAMto composea bit-mappedvideoimage512 pixelswideby 342pixelstall.Eachbit in thisrangecontrolsa singlepixelin the image:a 0 bit is white,and a 1 bit is black. • Note:The displayon the Macintosh SE/30modelhas the sameappearanceas that on the MacintoshPlusand Macintosh SEcomputers,but the hardwarethat generatesit is quite different.For a descriptionof the displayhardwareon the MacintoshSE/30, pleasereferto the nexttwo majorsections,"ExpansionCardVideo"and "Video Displayin the Macintosh SE/30Computer." Twoareasof memoryare reservedfor use by the videocircuitry:the mainscreenbuffer and the alternatescreenbuffer.A bit in VIADataregisterA determineswhichscreenbuffer is read by the videocircuitry. To makea videoaccessto RAM,the generallogiccircuits(PALin the MacintoshPlus,BBU in the Macintosh SE)firstdisablethe RAMdata bus buffersso that the mainprocessor cannotreaddatafromthe RAM,and then generatea RAMaddressin the video-screen- bufferrange.Next,the generallogiccircuitsswitchthe RAMaddressMUXsto put the videoaddresstheygenerateonto the addressbus, ratherthan the addressgeneratedby the processor.Whenthe RAMsrespondby puttingthe videodataon the RAMdatabus, the generallogiccircuitssignalthe VideoShiftregisteron the mainlogicboardto takethe data and send it in a serialstreamto the videodisplaycircuits. Duringa video-dataccess,the generallogiccircuitsin the Macintosh Plusand earlier modelsreadone wordfromRAMand storethe data in the VideoShiftregister.The circuitsin the Macintosh SEreadtwo consecutivewordsduringa videoaccess.The main processorthen has fullaccessto the RAMduringthe timeit takesthe videocircuitsto send the 16bitsor 32bitsof datato the screen.Themainprocessoralsohas fullaccessto RAMduringhorizontaland verticalblanking. Chapter12 Displays 401 • Note:On the MacintoshSE,MacintoshPlus,and earlierMacintoshmodels,the general logiccircuitsuse one accessto RAMduringeachhorizontalscanlineto readsoundand disk-speeddata. For moreinformation,pleasereferto Chapter13, "Sound." Videodisplaybuffers The startingaddressesof the screenbuffersdependon the amountof memoryinstalledin the system.The base addressof the mainscreenbufferis storedin the globalvariable ScrnBaseand the base addressof the alternatescreenbufferis ScmBase- $8000.The base addressof the bit mapcurrentlybeingdisplayedon the screenis availablein the QuickDraw™ globalvariableScreenBits. ~ Developer tip To ensurethatyoursoftwarewillrun on Macintoshcomputers that use differentdisplayhardware,you shouldneverwrite directlyto the screenbuffer,but alwaysuse QuickDrawcallsto send data to the screen. 4 Eachscanline of the screendisplaysthe contentsof 32 consecutivewordsof memory, eachwordcontrolling16 horizontallyadjacentpixels.In eachword,the high-orderbit (bit 15)controlsthe leftmostpixeland the low-orderbit (bit 0) controlsthe rightmostpixel. The firstwordof datafor eachscanlinefollowsthe lastwordfor the lineaboveit. The startingaddressof the screenis thus in the upper-leftcomer,and the addressesprogress fromthereto the lastbytein the extremelower-rightcomer. The screenis refreshedfrequentlyenoughthat the videodisplaynormallydoesn'tflicker. However,the displaymayappearto flickerif the electronbeamdisplaysthe imagewhen yourprogramhasn'tfinishedupdatingit, showingsomeof the new imageand someof the old in the sameframe.Thiseffectcan becomenoticeablewhenyou'recreatingan animatedimageby repeatedlydrawingthe graphicsin quicksuccession. Onewayto preventflickeringwhenyou'reupdatingthe screenrepeatedlyis to use the verticalblankinginterrupt(VBL)to synchronizeyour updatesto the scanning of videomemory.Smallchangesto yourscreencan be completedentirelyduringthe intervalbetweenframes(the first1.26ms followinga verticalblankinginterrupt), whennothingis beingdisplayedon the screen.To findout how to specifytasks to be performedduringa verticalblankinginterval,see the chapteron the Vertical RetraceManagerin InsideMacintosh. 402 Guideto the MacintoshFamilyHardware Whenmakinglargerchanges.the trickis to keep your changeshappeningaheadof the spot beingdisplayedby the electronbeam.If you startchangingyour imagewhen the verticalblankinginterruptoccurs,you have 1.26ms of unrestrictedaccessto the image. Afterthat,you can changeprogressively lessand less of yourimageas it's scannedonto the screen,startingfromthe upper-leftcorner(the lowestvideomemoryaddress).From the verticalblankinginterrupt,you haveonly 1.26ms in whichto changethe first(lowest address)screenlocation,but you have almost16.6ms to changethe last (highestaddress) screen location. Noticethat changesyou makein the memoryalreadypassedoverby the scan spot won't appear untilthe next frame. Anotherway to createsmooth,flicker-freegraphics,especiallyusefulwith changes that maytake morethan 16.6ms, is to use the two screenbuffersas alternatedisplays. If you draw into the one that'scurrentlynot beingdisplayed,and then switchthe buffers duringthe next verticalblankinginterval,yourgraphicswillchangeall at once,producing a clean animation. To use the alternatescreenbuffer,you have to specifythat choiceto the Segment Loaderas describedin InsideMacintosh.To switchto the alternatescreenbuffer, clearbit 6 of VIADataregisterA to 0. To switchback to the mainbuffer,set the samebit to 1. The VIAis describedin Chapter4. The alternatescreenbufferis not availablein all Macintoshmodels. ~ Developertip The VBLinterruptis guaranteedto be synchronized withthe screen's verticalblankingintervalonly in Macintoshmodelsthat use the built-in video displaydescribedabove.On Macintoshmodelswith other types of displays,the VBLinterruptis replacedby the 60.15Hz interruptthat is used for generaltimingfunctions.In those machines, the VerticalRetraceManagermaintainsa separateVBLqueue for each slot and executesthe tasksin each queue when the correspondingslot interruptoccurs.Pleasereferto InsideMacintoshfor information about the VerticalRetraceManager.~ Chapter12 Displays 403 Expansioncardvideo The MacintoshII familyof computers-exceptfor the Macintosh IIci-do not contain any built-invideoelectronics.Instead,thosemachinesuse a videoexpansioncardin a NuBusslotto producea displayon an externalvideomonitor.TheMacintosh llci,which has built-invideocircuits,can alsouse a videoexpansioncard. ThestandardvideoexpansioncardavailablefromAppleComputer,Inc.,is calledthe Macintosh II VideoCardand is fullydescribedin DesigningCardsand Drivers for the MacintoshFamily,secondedition.To showhowsuchcardsoperate,thissectionprovides a briefoverviewof the Macintosh II VideoCard.Othervideoexpansioncardsare differentin detail,but operatein a similarfashion. .4 Developertip Macintoshmodelsthat use videoexpansioncardscan support multiplecardsand multiplemonitors.Thesystemsoftwaresupports multipledisplaysas partsof an extendeddesktop.4. Videocardfeatures TheMacintosh II VideoCardis a high-performancecolorvideocardthat providesthe followingfeatures: • supportfor severaldifferentscreensizes • up to 256colorsout of 16millionpossible • supportfor 1-bit,2-bit,4-bit,and 8-bitper pixeldisplaymodes • framebuffersizesof 256KBand 512KB,upgradableby the user • fullsupportfor RS-170 videomonitors • abilityto recognizedifferentmonitorsat startuptime and automaticallyconfigure itself appropriately • videodriverwithsoftwaresupportfor compatibility withgenlockand overlaydevices • fullsupportforA/UXsystemsoftwarein the card'sROM • Note:An earlyversionof the Macintosh II VideoCarddid not havethe lastfive featuresin this list. 404 Guideto the MacintoshFamilyHardware Video card components The MacintoshII VideoCardcontainsthe followingcomponents: • timinggenerationcircuitry • FrameBufferController(FBC,alsocalledTFB) • videoRAM • colorlook-uptableand digital-to-analog converter(CLUT DAC) • declarationROM The followingsectionsdescribethese components. ~ Developer tip To ensurethatyoursoftwarewillrun on Macintosh computerswith differentscreensizesand differentvideocards,you shouldalwaysuse QuickDraw callsto addressthe screen.~ Timinggeneration Thetiminggenerationcircuitryon the videocardgeneratesthesesignals: • the FrameBufferController interfacesignals,includingthe videocardclock • the NuBushandshakeand controlsignals • othervideocardcontrolsignals TheMacintosh II VideoCardgeneratesa NuBusslot interruptcorresponding to the verticalblankingsignalusedon the videocard.TheVerticalRetraceManagerusesthis signalto maintaina separateVBLqueuefor eachslot,executingthe tasksin eachqueue whenthe corresponding slotinterruptoccurs.Bymakinguse of thisfeatureof the Vertical RetraceManager,applicationscan makechangesto the displayduringthe vertical blankinginterval,therebyavoidingflicker.Formoreinformation, pleasereferto the chapteron the VerticalRetraceManagerin InsideMacintosh. FrameBufferController(FBC) TheFrameBufferController(FBC)is an ApplecustomICthatcontrolsthe operation of the videocard.TheFBCcontainsseveralcontrolregistersthat are mappedinto Macintosh II mainmemoryin the slotspaceassignedto the videocard.Thecontrol addressspaceis separatefromthe framebufferaddressspaceoccupiedby the videoRAM. Chapter12 Displays 405 TheFBCusesthe parameterstoredin the controlregistersto generateand controlvideo dataand timingsignaloutput.Thevariousinputson the FBCare usedto executeRAM read,write,and refreshoperations. VideoRAM TheMacintosh II VideoCardhas its own RAMso that the videocircuitrydoes not haveto shareRAMaccesstimewiththe mainprocessor.Boththe mainprocessorand the video displaymusthaveaccessto thisRAM-thatis howthe processorputs displaydata into the videomemory.To makethat possible,the videocarduses a specialdual-portedRAM that allowsthe videodata to be sent to the displayat the sametimethatthe processoris writingnew datato memory.Themainprocessorhas accessto videoRAMmorethan95 percentof the time.The baseaddressof the bitmapcurrentlybeingdisplayedon the screenis availablein the QuickDraw globalvariableScreenBits; ThevideoRAMconsistsof eightor sixteen256Kbit,150ns RAMICsfor a memory configuration of 256KBor 512KB. O.UTDACon the videocard OneICcontainsthe colorlook-uptable(CLUT) and the digital-to-analog converter (DAC).Workingtogether,the CLUTand DACmakeup the electricalinterfacebetweenthe videoRAMand the videomonitor.Digitalvideodata is passedto the CLUTthroughthe FBC.The CLUTexpandsthe digitaldata (1-bit,2-bits,4-bits,or 8-bitsper pixel)to 24-bit- per-pixelRGBcolorvaluesby meansof a tablein itsownRAM(hencethe namecolorlook- up table).The24-bitRGBcolorvaluescomprisethree8-bitvaluesthatcorrespondto the intensitiesof the red, green,and blueprimarycolorsforeachpixel. Thedigital-to-analog converter(DAC)portionof the CLUTDACICcomprisesthree8-bit DACsthatconverthe digitalRGBcolorvaluesto analogcolorsignals.TheDACsprovideRS- 343-A-compatibleRGBvideosignalsto the videoconnectorat the rear of the videocard. ColorQuickDrawsoftwareinitializesthe color-tableRAMwithinthe CLUTwithdefault colorvalues,usingthe videodriverloadedfromthe declarationROM(seethe next section).ColorQuickDrawalsousesthe videodriverto provideutilitiesfor readingand modifyingthe colortable. 406 Guideto the Macintosh FamilyHardware Declaration ROM EveryNuBuscardincludesROM,calleddeclarationROM,thatcontainsall the informationrequiredfor the MacintoshII systemsoftwareto identifyand make use of the capabilitiesof that card. SomeApplepublicationsreferto the declarationROMas the configurationROM The informationin the declarationROMfor the MacintoshII Video Cardincludes • devicetype (videocard),manufacturer (Apple),and modelnumber • specificationsof the predefinedvideo modes • video drivercode • initializationcode The declarationROMin the MacintoshII VideoCardidentifiesthe card as a videodevice manufacturedby Appleand specifiesits modelnumber.The declarationROMalso provides a list of predefinedvideomodesand the specifications of the displaysfor each mode. Manyof the operatingparametersof the videocardare programmable; as a result,the numberof possiblevideomodesis enormous.A usefulsubset,optimizedfor the Apple displays,is includedin the declarationROM.The listcharacterizingeach videomodealso specifiesa softwaredriver,specificto the card hardwareand also storedin the declarationROM,that is loadedinto mainmemoryby the SlotManagerat startuptime. The declarationROMalso includesspecialcode,calledinitializationcode,thatis executedat startuptimeto initializeboth the hardwareon the card and the system softwarethat willbe usingthe card.The initialization code performssuch tasksas selectingthe appropriatepixelclockrate for the displaymonitorconnectedto the video card,checkingthe amountof videoRAMon the card,and providingthe SlotManagerand ColorQuickdrawwith informationaboutthe size of the displayand the amountof memoryavailable. Externalconnector The MacintoshII VideoCardhas a DB-15connectorat the rear of the cardthat provides the videooutputsignalsfor the videomonitor.The pinoutof this connectoris shownin Figure12-2. Chapter12 Displays 407 • Figure12-2 Pinoutof the externalconnectoron the Macintosh II VideoCard Thesignalassignments for the videocard'sexternalconnectorare listedin Table12-1. • Table12-1 Signalassignmentsfor the externalconnectorof the MacintoshII VideoCard Sfgnaloamc Signaldescription 1 RED.GND Redground 2 RED.YID Redvideosignal 3 /CSYNC Compositesynchronization signal 4 SENSEO Monitorsensesignal0 5 GRN.VID Greenvideosignal. 6 GRN.GND Greenground 7 SENSE! Monitorsensesignal1 8 n.c. Not connected 9 BLU.VID Bluevideosignal 10 SENSE2 Monitorsensesignal2 11 C&VSYNC.GNDGroundforCSYNC andVSYNC 12 /VSYNC Verticalsynchronization signal 13 BLU.GND Blueground 14 HSYNC.GND HSYNC ground 15 /HSYNC Horizontalsynchronizationsignal • Note:The externalvideoconnectoron the earlyversionof the Macintosh II VideoCard did not havethe signalsSENSEO, SENSE!, and SENSE2. 408 Guideto the ¥:icintoshFamilyHardware Detectingmonitortype The initialization code in the declarationROMreadsthe stateof the threesenselinesto determinethe type of monitorthat is connectedto the card.Table12-2showsthe values of the senselinesand the differentmonitortypes. • Table12-2 Senselinevaluesfor differentypesof monitors Sease Uncvalues Monitortype 000 (Reservedby Apple) 001 Portraitmonitor(monochrome) 010 (Reservedby Apple) 011 Two-pagemonitor(monochrome) 100 (Reservedby Apple) 101 (Reservedby Apple) 110 640x 480-pixelmonitor(monochrome or RGB) 111 (No monitorconnected) Videodisplayin the MacintoshSE/30computer Althoughthe Macintosh SE/30computerhas a built-inblack-and-white videodisplay identicalin appearanceto the built-indisplayon a Macintosh Plusor Macintosh SE,its videointerfacehardwaresimulatesomefeaturesof a Macintosh II VideoCardin a NuBus expansionslot,makingit considerably differentfromthe built-invideohardwarein other Macintoshmodels. The mainlogicboardof the Macintosh SE/30containsa separate64KBvideodisplay RAMand a separate8192-byte videodeclarationROM.The videodisplayRAMoccupies physicaladdressspace$FE00000to $FEFFFFF.Thisaddressspacewaschosenbecause it is the sameas the addressspaceusedby expansionslot $Ein the Macintosh II family. Theuse of expansion-slot addressspaceand otherfeaturesof a NuBusvideoexpansion cardis calledpseudo-slot video.Bysimulatingthe featuresof an expansioncardin a NuBus slot,the Macintosh SE/30can sharecommonsystemROMwiththe otherMacintosh modelsthatuse the MC68030 processorand NuBusvideocards. Chapter12 Displays 40') Thepseudo-slotvideoon the MacintosnSE/30has the followingfeatures: • 512x 342blackand whitepixels,likeotherMacintosh built-invideodisplays • 60.15Hz videoframerate,likeotherMacintosh built-invideodisplays • independentRAM: 64KBof RAMcontainingtwo screenbuffers ThevideobufferoccupiesRAMthat is separatefromthe mainmemory.Thevideobuffer usesthe addressmultiplexing methoddescribedin the section"Built-inVideoDisplay," earlierin thischapter. Likethe Macintosh II VideoCard,the pseudo-slotvideohas a declarationROM containinga videodriverand initialization routines.Becausepseudo-slotvideoin the MacintoshSE/30supportsonlythe built-inblack-and-white monitor,it does not need a programmable videotimingcontrolleror a colorlook-uptable. Video circuitsin the MacintoshIlci computer In additionto the NuBusslotsthat can accepta videoexpansioncard,the Macintosh IIci computeralsohas built-invideocircuitsto drivean externalvideomonitor.Thebuilt-in videocircuitssupportthe standard-sizeMacintosh II monitors,eithermonochromeor color,and the MacintoshPortraitDisplay. Featuresof the built-invideo circuits The featuresof the built-invideocircuitsinclude • screensizesof 640x 480and 640x 870pixels • 1, 2, 4, and 8 bit-per-pixel displayswith640x 480monitors • 1, 2, and 4 bit-per-pixel displayswith640x 870monitors • detectionof type of monitorconnectedand settingof appropriatedisplayparameters • memoryaddressesin slot $Bof NuBusaddressspace • accessibility as pseudo-slotvideoin slot $0 410 Guideto the MacintoshFamilyHardware Detectionof monitortype The Macintosh Ilci can detectmonitorswith differentdisplaysizes,such as the AppleColorHigh-Resolution RGBMonitor(640x 480pixels)and the MacintoshPortrait Display(640x 870).Applemonitorsfor the Macintoshincludethreesenselinesthat enable the computerto determinethe monitortype.At startuptime,logicin the RBVreadsthe senselinesand sets the displayparametersto the appropriatevaluesfor the monitorthat is connected.Seethe section"VideoConnectoron the MacintoshIlci,"laterin this chapter,for informationabout the sense lines. Pixels and colors The numberof bitsper pixeldeterminesthe numberof differentcolors(witha color monitor)or the numberof differentshadesof gray(witha monochromemonitor)in the videodisplay.With1 bit per pixel,the displayis blackand white.With2 bitsper pixel, the displayhas 4 colorsor black,white,and 2 shadesof gray.With4 bitsper pixel,the displayhas 16colorsor shadesof gray(againincludingblackand white).With8 bitsper pixel,a monochromedisplaycanhave256shadesof gray;a colordisplaycan have256 colorson the screenat a time.Nomatterhowmanybitsper pixelare beingused,the displayedcolorsor shadesof grayare selectedfroma paletteof over 16millionpossible colorsor shadesthat can be specifiedby 24-bitcolorvalues. Sizesof monitorsandscreenbuffers The amountof memoryrequiredfor the screenbufferdependson the sizeof the monitor screenand the numberof bitsper pixelusedfor the display.Table12-3showsthe differentscreensizesand screen-buffer sizesfor the Applemonitorsthat the MacintoshIlci supports. • Table12-3 Screensizesand buffersizessupportedby the Macintoshlid computer Screensize Buffersize for given pixel size Nameof monitor (in pixels) 1 bpp 2bpp 4bpp 8bpp High-Resolution MonochromeMonitor 640x480 38KB 75KB 150KB 300KB AppleColorHigh-ResolutionRGBMonitor 640x480 38KB 75KB 150KB 300KB MacintoshPortraitDisplay 640x870 68KB 136KB 272KB -· 'The built-invideocircuitson the Macintosh Ilcido not support8 bpp on the portraitdisplay. Chapter12 Displays 411 • Note:TheMDUin the Macintosh IIciallocatesmemoryforthe screenbufferin incrementsof 32KB,so it takes64KBfor 1 bit per pixelon a monochromemonitor, 320KBfor a colormonitorwith8 bitsper pixel. Pseudo-slotvideo in the MacintoshIlcl Likethe built-invideoin the Macintosh SE/30,the videointerfacehardwarein the MacintoshIIcisimulatesomefeaturesof a Macintosh II VideoCardin a NuBus expansionslot.Bysimulatingthe featuresof an expansioncardin a slot,the MacintoshIIcican sharecommonsystemROMwiththe otherMacintoshmodelsthat use the MC68030 processor.Thissimulationof a videocardin a NuBusslotis called pseudo-slot video. The videoscreenbufferin the Macintosh IIcioccupiesmemory·starting at $00000000in physicaladdressspace.Usingthe memorymanagement unitin the MC68030,the Macintoshlid mapsthe screenbufferto logicaladdressspacestartingat $FB000000. Thataddressspacewaschosenbecauseit is the sameas the addressspaceusedby expansionslot $Bin the six-slotmodelsof the Macintosh II family. Built-invideo components The maincomponentsof the built-invideocircuitsin the Macintosh IIciare • screenbufferin bankA • the MDU,whichgeneratesvideoaddresses • data bus buffers,whichseparatebankA fromthe processor'sdata bus • the RBV,whichformatsvideodata and providessynchronization signals • the CLUT DAC,colorlook-uptableand digital-to-analogconverter • a videoconnectorfor an externalmonitor Becausethe operationof RAMbankA, the MDU,and the data-busbuffersis so interdependent,thosethree componentsare describedtogetherin the next section. Subsequentsectionsdescribeeach of the other components. 412 Guideto the Macintosh FamilyHardware Screenbufferin the MacintoshIlcl Threecomponentsworktogetherto providethe videoscreenbufferin the Macintosh lid: bankA of RAM,the MDU,and the data-busbuffers.In principle,the operationof the screen bufferis somewhatlikethatof the screenbuffersin the Macintosh Plusand othermodelswith built-indisplays:Thescreenbufferoccupiesmainmemoryandthereis a busbufferto disconnecthat portionof memoryfromthe mainprocessor. Thescreenbufferin the Macintoshlid occupies300KBat the bottomof RAMbankA. Thesystemsoftwareprogramsthe memorymanagement unitin the MC68030to mapthe remainderof bankA as partof mainmemory. • Note:TheMacintosh lid mapsthe portionof bankA usedfor mainmemoryso that its logicaladdressspaceappearsabovethe memoryin bankB. Eventhoughthe physicaladdressesof RAMbankB startat $04000000,the logicaladdressestartat $00000000,as requiredfor softwarecompatibility. TheMDUdealswithaddressesbothforthe mainprocessorandfor the videodisplay circuits.Anytimean addressfromthe processoris in someportionof the addressmap otherthanbankA, the MDUcangeneratethe multiplexed addresssignalsforthe processor'smemoryaccessand generatea videoaddressin bankA at the sametime. Wheneverthe MDUis aboutto makea videoaccessto RAM,it sendsa signalto the bus bufferscausingthemto disconnectthe databus for bankA fromthe processorso that both accessescan take placewithoutinterference. If the mainprocessorstartsa memoryaccessto RAMbankA whilethe MDUis makinga videoaccess,the mainprocessormustwait.The probabilityof thishappeningdepends on two components: the probabilitythat a main-processor memoryaccessis in bankA, and the probabilitythatan accessto the screenbufferis occurringat the sametime. Thefirstprobability-whethera main-processor memoryaccessis in bankA-depends on the relativeamountsof mainmemoryin bankA andbankB.ThemoreRAMthereis in bankB, the greaterthe probabilitythatthe processorwillbe usingbankB. The percentageof the timethatthe processorneedsto accessbankA is, on average,the same as the percentageof totalmainRAMthatresidesin bankA.Theportionof bankA used forthe videobufferdoesnot countas mainRAM; thus,in a machinewith1 MBin each bank,accessesto mainRAMin bankA wouldbe about41 percentof the total. Chapter12 Displays 413 Thesecondprobability-whetheran ace~ to the screenbufferis occurring-dependson the sizeof the monitorand on the numberof bitsper pixelselectedfor the display.The probabilityis largerfor largermonitorsand greaterpixeldepths,whichrequiremorevideo dataperunit of time.Table12-4showsthe percentageof the timerequiredfor video accessesin bankA for differentmonitorsizesand pixeldepths. • Table12-4TimespentmakingvideoRAMaccessesin bankA Pmlclepth 6(0 X 480display 6(0 X 870 display 1 bpp 6% 13% 2bpp 13% 26% 4 bpp 26% 65% 8bpp 64% -· -ToeMacintoshIlcidoesnot support8 bpp on the 640x 870display. • Note:Onlyaccessesto RAMbankA are affectedby video.Theprocessorhas full ace~ to RAMbankB at all times,as it has to ROMand VOdevices. Videoportionof the RBV The videoportionof the RBVcontainsthe circuitsthat formatthe videodata fromRAM into pixel-sizedpiecesand the circuitsthat generatethe horizontaland verticalvideo timing.The data-formatting circuitsare describedfirst. The RBV'sdata-formatting circuitscomprisea 16x 32-bitFIFObuffer,logicto keep the FIFOfilledwithdatafromthe RAM,and logicto arrangethat dataand shiftit out in the appropriateformat.The FIFOoperatesas two halves,·eachcontainingeight32-bit longwords.Whilevideodatafromone halfof the FIFOis beingarrangedand shiftedout, the otherhalfof the FIFOis beingloadedwithdatafromthe screenbuffer. 414 Guideto the MacintoshFamilyHardware Wheneverdata in one halfof the FIFOis used up, the RBVassertsits data-requestlineto the MDU.Thatsignaltellsthe MDUto disconnecthe bankA databus fromthe main processor andto begina page-mode burstreadofRAM dataassoonaspossible. Aseach longwordof videodata is read ontothe bankA portionof the databus, the MDUsendsa data-loadsignalto the RBV.The data-loadsignalcausesthe RBVto read one 32-bit longwordof data fromthe bus into the FIFOand to advancethe inputpointerto the next locationin the FIFO.Whenthe RBVhas read sevenlongwords,it deassertsits data- requestline,whichcausesthe MDU to end the databurstafterit has readthe eighth longwordand sent it to the RBV.Thatsequenceof eventsfillsthe emptyhalfof the FIFO. Meanwhile,in the otherhalfof the FIFO,eightlongwordsof dataare beingloaded, sixteenbits at a time,into a shiftregister.A dot clockcausesthe data to advancethrough the shiftregisterone bit at a time.The shiftregisterhas outputtaps everytwo bits along its length.Byusingone, two,four,or all eightof thesetaps,the logiccircuitsin the RBV can makethe data appearat the outputsin the requiredpixelsize:one, two, four,or eight bits at a time.Whenall sixteenbits havebeen shiftedout, the logicciruitsload the next sixteenbits fromthe FIFOinto the shiftregisterand advancethe FIFO'soutputpointer. Thisprocesseventuallyemptiesthe FIFOhalf,whichmustthen be filledby anotherburst of eightlongwordsfromthe videoRAM. The RBV'svideotimingcircuitsgeneratethe dot clockthat advancesthe video data throughthe shiftregisterand countout the appropriatenumberof dots per line.The videotimingcircuitsalsocontrolthe numberof linesin the displayand the timingof the synchronizationpulses.The videotimingcircuitsdo all that basedon the type of monitor connectedto the computer,whichthe RBVdeterminesby readingthe senselinesfromthe video connector. Tables12-5and 12-6givethe horizontaland verticaltimingspecifications for the video signalsproducedby the RBVin the Macintosh Ilci.Figure12-3showsthe horizontaland verticalvideowaveformsand identifiesthe parameterswhosespecificationsare givenin the tables. Chapter12 Displays 415 • Table12-S Horizontalvideotimingin the MacintoshIlci computer Parameter 640X 480display 64oX 870display Dot clock 30.24MHz 57.28MHz Dot time 33.07ns 17.46ns Linerate 35.0kHz 68.85kHz Linetime 2857µs 14.52µs Fulline 864 dots 832 dots Visibleline 640 dots 640 dots Horizontalblanking 224 dots 192dots Frontporch 64 dots 32 dots Horizontalsynchronization pulse 64 dots 80 dots Backporch 96 dots 80 dots • Table12-6 Verticalvideotimingin the Macintosh Ilci computer Parameter 64oX 480display 640 X 870 display Linerate 35.0kHz 68.85kHz Linetime 28.57µs 14.52µs Framerate 66.67Hz 75.0Hz Frametime 15.00ms 13.33ms Fullframe 525lines 918lines Visibleframe 480lines 870lines Verticalblanking 45lines 48lines Frontporch 3 lines 3 lines Verticalsynchronization pulse 3 lines 3 lines Backporch 39lines 42lines 416 Guideto the MacintoshFamilyHardware • Figure12-3 Videotimingparameters Video Horizontal blanking Horizontal sweeptime= linetime Horizontal sweeptime /Hsync Verticalblanking Vertical scantime= frametime Vertical scantime Nsync p t Backporeh(- Syncpulsewidth(vertical) Frontporch(vertical) Nsync t---r------,,, ~-•--, Chapter12 Displays 417 CLUTDACin the MacintoshIlci The CLUT(colorlook-uptable)and the videoDAC(digital-to-analog converter)are two partsof a singleintegratedcircuit,the BrooktreeBt478.The CLUTconvertseach pixel valueto three8-bitcolorvalues;the DACconvertsthosedigitalvaluesintovoltagelevels that are sent to the video monitor. The CLUTDACis the interfacebetweenthe screenbufferand the videomonitor.Digital videodata is sent to the CLUTfromthe screenbufferin RAMbankA.ThevideoRAM addressesare generatedby the MDUunderthe controlof the RBV. The CLUTtranslatesthe digitaldata fromthe screenbufferto 24-bitcolorvaluesby means of a tablein its ownRAM(hencethe namecolorlook-uptable).Eachcolorvaluecomprises three8-bitvalues,one each for red, green,and blue.The built-indigital-to-analog converters(DACs)convertthe three8-bitdigitalcolorvaluesto threeanalogcolorsignals. Eachof the threeDACstakesan 8-bitcolorvalueand producesthe analogvideosignalfor one of the threeprimarycolors:red, green,or blue.The outputsof the DACsprovide RS-343-A-compatible RGBvideosignalsto the videoconnectorat the rear of the computer. As shownin Figure12-4,the threecolorsignalsforthe videomonitorare producedby the Bt478,whilethe horizontaland verticalsynchronization signalscomedirectlyfromthe RBV. Videoconnectoron the MacintoshIlci The videoconnectoron the Macintosh Ilci is a 15-pinD-typeconnectorlikethe one on the MacintoshII VideoCard.It providesthe red, blue, and greenvideooutputsignalsand the compositesyncsignalalongwiththe threesenselinesthat the computerusesto determinethe type of monitorthat is connected.Table12-7showsthe signalson the videoconnector.Table12-8showsthe valuesof the senselinescorresponding to the differenttypes of monitorssupportedby the MacintoshIlci. • Note:The videoconnectoron the MacintoshIlci is the·sameas the one on the MacintoshII VideoCardand has the samesignalassignments. 418 Guideto the MacintoshFamilyHardware • Figure12-4 Videointerfacecircuitin the MacintoshIlci Bt478 BBV CLUf-DAC DB-lS VIDOl.TI'OVID.Ol.TI'O47'1 .. .. VOF0 PO video connector VIDOlITl VID.OlITl . ... . VOFl ~ Pl VID.OlIT2 . . VOF2 P2 RED.GND-Q) .......,_ VIDOlIT2 VIDOlIT3 VID.OlIT3 . .. VOF3 P3 BLU.VID BLU.VID 9 VID.OlIT4 VOF4 IOB RED.VI) VIDOlIT4 VIDOlITS . VID.OlIT'i .. .. VOFS P4 PS IOR ..•• 75'1 RED.VID 2 SENSE2 VIDOlIT6 VID.OlIT6 .. VOF6 P6 75n: ~ ..._. /CSYNCFF ® VIDOUI7 VID.OUT7 •. VOF7 P7 7 C&VSYNC.GND 3 ® SENSE0 4 ICBLANK CBLANK BLANK NSYNCFF GRN.llD GRN.VID @ ICSYNC SYNC IOG 5 CSYNC BLU.GND :: 75'1 GRN.GND 6 :® ~7 HSYNC.GND ·@ ~ RFIfilter; SENSEi-0. L/HSYNC ~7 /HSYNCFF @ HSYNC ~ RFIfilter; n.c. -@ ~ NSYNC VSYNC ~ RFIfilter; MONIDl SENSE0 2.2'1 •• SENSEi 2.2'1 : .. MONID2 SENSE2 2.2'1 . MONID3 Note: Rl ~=~ ;;:,C (R = 180'1, C • 33 pF) Chapter12 Displays 419 • Table12-7 Signalson the videoconnectorin the Macintosh Ilci Plnomnber Signalname Sigoaldescription 1 RED.GND Redground 2 RED.VID Redvideosignal 3 /CSYNC Compositesynchronizationsignal 4 SENSE0 Monitorsensesignal0 5 GRN.VID Greenvideosignal 6 GRN.GND Greenground 7 SENSE! Monitorsensesignal1 8 n.c. Not connected 9 BLU.VID Bluevideosignal 10 SENSE2 Monitorsensesignal2 11 C&VSYNC.GND GroundforCSYNC andVSYNC 12 NSYNC Vertical· synchronization signal 13 BLU.GND Blueground 14 HSYNC.GND HSYNC ground 15 /HSYNC Horizontalsynchronization signal • Table12-8 Senseline valuesfor videomonitorson the Macintosh Ilci computer Sense linewlues Monitortype 000 (not supported) 001 Portrait-sizemonitor(monochrome) 010 (reserved) 011 (not supported) 100 (not supported) 101 (reserved) 110 Standard-sizemonitor(monochromeor RGB) 111 (reserved) If a type of monitoris connectedthat the built-invideocircuitsdo not support,or if no externalmonitoris connected,the systemsoftwareswitchesthe built-invideocircuits off.Thatis whathappensin a Macintosh Ilci usinga monitorconnectedto a videocardin a NuBusslot. 420 Guideto the MacintoshFamilyHardware Displayson the MacintoshPortable Theprimarydisplayon the MacintoshPortablecomputeris a built-inflat-paneldisplay.The Macintosh Portablecan alsodrivean externalvideomonitorwiththe appropriateadapter. Flat-paneldisplay Theflat-paneldisplayon the MacintoshPortablegivesa high-quality presentationof the screen of the AppleHigh-ResolutionMonochrome Monitor.Displayintensity,contrastratio,and pixel tum-onand tum-offtimeare similarto the correspondingparametersof a videodisplayusinga CRTwithP4phosphor.Theflat-paneldisplayhas the followingfeatures: • displayresolutionof 640x 400pixels • displayareaof 217mmx 140mm(8.5inchesx 5.5inches) • activematrix,reflectivedisplay • drivingmethod:8-bitparallel • 0.45wattsmaximumpowerdissipation • CMOSlogicinterface Thedisplaybufferis a RAMarrayof 32,000bytes(768bytesare reservedby Appleforfuture use).Thestartingaddressof the bufferis in globalvariableScmBase; the lastbytein the buffer is at address(ScmBase)+ 31,999.The interfacefromthe MC68HC000 to the videocontrollerIC is nominally16bitswide,but likemainmemory,the bufferis alsobyteaddressable. 4 Developer tip Forthe sakeof compatibility, youshouldneveraddressthe display bufferdirectly,but alwaysuse QuickDraw callsor othertoolboxcalls providedby the systemsoftware.~ Thecontentsof the screenbufferare mappedontothe displayas a lineararrayof pixels. Thepixeldisplayedin the upper-leftcomerof the screencorrespondsto the most significantbit of the firstbytein the buffer;the pixeldisplayedin the lower-right comer of the screenis the leastsignificant bit of the lastbyte.SeeFigure12-5. Chapter12 Displays 421 The displaypixelmap,Figure12-5,showsthe arrangementof the pixelson the flat-panel display,as viewedfacingthe display.Pixelsare numberedfrom1 to 640in eachrow.The figurealsoshowsthe bit locationsin the firstand lastbytesof the screenbuffer;the other bytes in the buffer map to the display in the same fashion. • Figure12-5 Displaypixelmap B}'.!e 1 1D7 I D6 I D5 I D4 D3 D2 I I I D1 I ool I I I I I I I I I I I I Rowl 1 2 3 4 5 6 7 8 9 ... ... 638 639 640 Row2 1 2 3 ... ... 638 639 640 Row3 1 2 3 ... ... 638 639 640 Row400 1 2 3 ... ... 632 633 634 635 636 637 638 639 640 I I I I I I I I I I I I I I I I ID7 D6 D5 D4 D3 D2 D1 DOI - Byte31,999 Contrastcontrol The contrastcontroloutputof the MacintoshPortablesystemis derivedfromthe PWM (pulse-width-modulated) outputpin of the PowerManagerIC.The modulationhas 256 steps,representingthe rangeof screencontrastfromlow to highas displayedin the ControlPaneland set by the user. The PWMoutputis filteredto a DClevelby an RCnetworkbeforebeingsent to the display. The outputof the filterhas a voltagerangefrom0.5to 5 V and lessthan 100mV ripple. 422 Guideto the MacintoshFamilyHardware MacintoshPortableexternalvideo The MacintoshPortablecomputerproducessignalsfor an externalvideodisplaythrough an 8-bitinterfacethat is similarto the internalinterfacefor the flat-paneldisplay.A video adapter(poweredfromthe externalvideoport) is requiredin orderto convertthe 8-bit datastreamintoa signalthatwilldrivea conventional videomonitor.Figure12-6shows the externalvideoconnector;Table12-9liststhe signals. Figure12-7showsthe timingcharacteristics of the synchronization signals(M,FLM,CLI, CL2)and datasignals(D0-D7)generatedby the videocontrollerin the Macintosh Portable.Table12-10liststhe timinglimitsindicatedin the figure. ThesignalnamedFLMis the verticalsynchronization signal;it marksthe beginningof a new frameof video.A newframestartsevery16.32ms,makingthe framerateequalto 61.3Hz.The signalnamedCL2is the databyteclock;the videoadapterusesthe falling edgeof CL2to latchthe datasignals(D0-D7)intoits shiftregister.The signalsnamedM and CLIare internalto the videocontroller;Mis generatedin the generalogicICby dividingthe FLMfrequencyby two.CLIis the horizontalsynchronization signal;it marks the end of a 640-pixelline. • Figure12-6 Pinoutof the externalvideoconnectoron the MacintoshPortablecomputer 00000 @ @0©0©@ ®®@@® Chapter12 Displays 423 • Table12-9 Signalassignments for the externalvideoconnectoron the MacintoshPortablecomputer Sfgoaloame Description 1 DO Videodata bit o• 2 D1 Videodata bit 1• 3 +5/0V Positivesupply,0 V in sleepstate 4 D2 Videodata bit 2• 5 D3 Videodata bit 3• 6 D4 Videodata bit 4• 7 GND Ground 8 BATTERY VOLTAGE Positivebatterysupply 9 GND Ground 10 D5 Videodata bit 5• 11 D6 Videodata bit 6• 12 D7 Videodata bit 7• 13 +5/0V Positivesupply,0 V in sleepstate 14 FLM Newframe 15 CL2 Videodata clock •SeeFigure12-Sforthe displaypixelmap. • Note:TheCLlandMsignalshownin Figure12-7areinternalsignalsandnot on the externalvideoconnector. 424 Guideto the MacintoshFamilyHardware • Figure12-7 Timingdiagramfor externalvideoin the MacintoshPortablecomputer tCWH Cll cu D0-D7 tCYC tCM M FIM tFS • Table12-10 Externalvideotiminglimits Symbol Description Min Max tCYC CL2cycletime 190ns tCWH CL2pulsewidth(high) 95ns tCWL CL2pulsewidth(low) 95ns tR, tF CL2riseand falltimes 30ns tDSU Data setup time 60ns tDH Datahold time 60ns tFS FLMsetup time lO0ns tFH FLMhold time 100ns Chapter12 Displays 42; Chapter 13 Sound DifferentMacintosh modelshavedifferenthardwarefor generating sound.Allmodelssupportthe basicsoundfeaturesproducedby the PWM(pulse-width-modulation)soundsystemon the originalMacintosh computer.Recentmodelsuse an Applecustomintegratedcircuitcalled the AppleSoundChip(ASC)to provideadditionalfeatures. Thetwotypesof soundhardwareusedon the differentmodelsare • MacintoshPWMsoundsystem:MacintoshPlus,Macintosh SE • MacintoshASCsoundsystem:Macintosh SE/30,MacintoshPortable, MacintoshII, Macintosh Ilx, Macintosh Ilcx, MacintoshIlci, and MacintoshIlfx AllMacintosh computersproducesoundfromsamplesstoredin RAM buffers.Thischapterdescribesthe soundsystemsand the use of the soundbuffers.It alsodescribesthe soundcircuitsin the differentmodels and discussesthe functionsof the ASC. Sound PWM MacintoshPlus .PL... MacintoshSE PWM .PL MacintoshSE/30 ASC @.D~l ASC MacintoshPortable g_ MacintoshII - ASC BL MacintoshIlx - ASC J~L MacintoshIlcx ASC ,19_ ASC g_ MacintoshIlci - ASC MacintoshIlfx 428 Guideto theMacintosh FamilyHardware PWM sound system TheMacintoshmodelsthatuse the PWM(pulse-width-modulation) soundsystemare • Macintosh Plus • MacintoshSE ThePWMsoundstystemis alsousedon the earlierMacintosh models:Macintosh 128K, Macintosh512K,and Macintosh 512Kenhanced. The MacintoshPWMsoundsystemconsistsof thesehardwarecomponents: • soundbuffersin systemRAM • soundcircuitryin the generalogicIC(PALor BBU) • an analogsoundprocessing IC(theSonysoundchip) • an internalspeaker • an externalmini-phonejack ThePWMsoundsystemtakesa seriesof datavaluesfromthe soundbufferin RAManduses themto createa changingwaveformin the outputsignal.Thatsignaldrivesa smallhigh- impedancespeakerinsidethe computerand is alsoconnectedto the externalsoundjack on the backof the computer.Insertinga plugintothe externalsoundjackdisconnectsthe internalspeaker.Theexternalsoundjackprovidesa low-impedance, high-levelsignal (8voltspeak-to-peak)thatcan drivea loadimpedanceof 32 ohmsor higher. A Warning Thesignalavailableat the externalsoundjackon the Macintosh Plus and Macintosh SEcomputersis capableof damagingsomepower amplifiers andcangeneratedangerousoundlevelsin headphones. Youshoulduseextremecautionwhenusingthissignalwithamplifiers or headphones.... Soundbuffers TheMacintosh Plusand earlierMacintosh computershavetwosoundbuffers;the Macintosh SEcomputerhas onlyone.Thestartingaddressesof the soundbuffersdepend on the amountof memoryinstalledin the system.Theaddressof the mainsoundbufferis storedin the globalvariableSoundBaseand is alsoavailableas the constantsoundLow. The addressof the alternatesoundbufferis SoundBase-$5C00. Chapter13 Sound 429 • Note:Thealternatesoundbufferis not availablein the Macintoshcomputersthat use the ASC.Seethe section"ASCSoundSystem." Eachsoundbuffercontains370wordsof data.Soundinformation is storedin the high (evenaddress)byteof eachword,and disk-speedinformation is storedin the low (odd address)byte. ~ Developer tip TheMacintosh SE,MacintoshPlus,and earlierMacintoshcomputers use the low-orderbyteof eachwordin the soundbufferforcontrolling the speedof the motorin single-sided floppydiskdrives.Don'tstore any informationin thosebytes,or you'llinterferewithdiskcontrolfor single-sidedrives.4 To use the alternatesoundbuffer,you haveto specifythat choiceto the SegmentLoader as describedin InsideMacintosh.To switchto the alternatesoundbuffer,clearbit 3 of VIADataregisterA to 0. To switchbackto the mainbuffer,set the samebit to 1. TheVIA is describedin Chapter4. ~ Developer tip Thediskdriversin the Macintosh Plusand earlierMacintosh computersstore disk-speedcontrolinformationfor single-sided floppydiskdrivesonlyin the mainsoundbuffer.An applicationwith its ownsounddriversoftwaremustswitchbackto the mainsound bufferbeforeaccessinga single-sidedrive,or the drivewon'twork properly.4 Generatingsounds Bystoringa rangeof valuesin the soundbuffer,you cangeneratethe corresponding waveformin the soundoutputline.Thesoundcircuitryusesa formof pulse-width encodingto createsounds.Thesoundcircuitryreadsone word(16bits)in the sound bufferduringeachhorizontalblankinginterval(includingthe virtualintervalsduring verticalblanking)and usesthe high-orderbyteof the wordto generatea pulseof electricity whosedurationis proportionalto the valuein the byte.Thispulseis sentto the Sonysoundchip. 430 Guideto the MacintoshFamilyHardware To makea soundaccessto RAM,the generalogicIC(thePALor the BBU)firstdisables the RAMdata-busbuffersso thatthe CPUcannotread datafromthe RAM,and then generatesa RAMaddressin the sound-buffer range.TheRAMrespondsby puttingthe sounddataon the databus.ThegeneralogicICthen convertsthat datato a squarewave. Thesquarewaveis a pulse-width-modulated (PWM)signal;thatis, the widthof eachpulse is proportionalto the valueof a byteof data.ThegeneralogicICsendsthistrainof pulsesto the Sonysoundchip. A circuitin the Sonysoundchipintegratesthe trainof pulsesintoa smoothlyvarying waveform,the amplitudeof whichis proportionalto the pulsewidth.Theamplitudeof thissignalis then attenuatedaccordingto a 3-bitvolume-controlvaluefromthe VIA.After attenuation,the soundsignalis passedby the Sonysoundchipto the audiooutputline. To set the volumedirectly,storea 3-bitnumberin the low-orderbitsof VIAData registerA.Youcantum the soundgeneratoron or offby writing1 (ofOor 0 (on)to bit 7 of VIADataregisterB. Formoreinformation, referto the section"VIARegisters" in Chapter4. ~ Developer tip Thetechniquedescribedin InsideMacintoshforgeneratingsquare- wavesoundby directlycontrollinga VIAtimercanbe usedon the MacintoshSE,MacintoshPlus,and earlierMacintoshcomputers,but it does notworkon the Macintosh SE/30,MacintoshPortable,or the MacintoshII-familycomputers,and it probablywon'tworkon future Macintoshcomputers.Youcan use routinesin the SoundManager describedin InsideMacintoshto achievethe sameeffect,withthe addedadvantagethattheseroutineswillworkon all Macintosh computers,presentand future.4 Scanningthe soundbuffers Thesoundcircuitryin the Macintosh Plusand Macintosh SEscansthe soundbufferat a fixedrateof 370wordsper videoframe,repeatingthe fullcycle60.147timesper second (the exactsamplerate is 22.2545kHz).Therefore,if you storeone patternin the sound bufferand do not changeit, that patternis repeated60.147timesper secondto generate the soundsignal.To avoidcreatingan audiblediscontinuity or glitcheachtimethe patternis repeated,the patternmustcorrespondto one or morecompletecycles;in other words,the frequencyof the waveformmustbe an integermultipleof the scanrate. Chapter13 Sound 431 Figure13-1illustratesa sinewavethat has a frequencyof exactly2 timesthe scanrate (the periodof the sinewaveis exactly1/2 the lengthof the soundbuffer).Youcan scansucha waverepeatedlywithoutproducingglitches.To generatea glitch-freesignalwitha varying waveformor witha frequencythat is not a multipleof the scanrate,you muststorenew data intothe soundbufferbetweenscans.Figure13-2illustratesa sinewavewhose freqencyis not an exactmultipleof the scanrate. • Figure13-1 A soundwaveformwitha frequencyof 2 timesthe scanrate Firstscan Second scan .,________ 16.6ms -------- --------- 16.6ms -------- 1 • Figure13-2 A soundwaveformwitha frequencythat is not a multipleof the scanrate Firstscan Secondscan ' ' ' --:---:--- ' ' .. ·•-:•- ' ..; .... 432 Guideto theMacintosh FamilyHardware 4 Developertip Youcanperformyourownupdatesof the soundbufferusingthe verticalblankinginterruptfromthe VIAto synchronizeyourupdates to the bufferscan.For the sake of compatibility with different models,Applerecommends thatyouuse the routinesin the Sound Driverandthe SoundManagerto generatecomplexsounds.~ Circuit diagrams Figures13-3and 13-4showblockdiagramsforthe PWMsoundcircuitsusedin the MacintoshPlusand MacintoshSEcomputers.Notethat the Macintosh SEhas onlyone sound buffer. Chapter13 Sound 433 • Figure13-3Blockdiagramof the PWMsoundcircuitin the MacintoshPluscomputer Sound ~ output ~ connector ~rei:i:~: __.r::::·::~ ~,____ (disconnectedwhen _ soundoutput connecterisused) Sound amplifier 6522(VIA) Sony sound PAO chip Volumecontrol Sound/disk-speed PAI (eightlevels) buffer(In RAM) Sound PA2 High Low Page2 PA3 (even) (odd) Sound On-offswitch 0 Sound Disk ··•"·\ PB7 (square-wave 1 Sound Disk ··•·······. (timer1) generator) 2 Sound Disk PAis 3 Sound Disk ::::<~t\ I I '•.-=, • Digital-to-analog converter I I I : .... !: • ••··:~::;f ,...:_u_u:...,:-.--~...,:,......•• Buffer Wordsfrom High byte 170 Sound Disk ··•····/ select selectedbuffer 171 Sound Disk ··•····' Low byte Alternate buffer 0 Sound Disk ··•·····... Digital-to-analog 1 Sound Disk ··•·····..\ converter .. ··-.::• ·-::":: Tomotorspeed-control lines 16F Sound Disk forintemalandextemal 170 Sound Disk single-sided diskdrives 171 Sound Disk 434 Guideto the MacintoshFamilyHardware • Figure13-4 Blockdiagramof the PWMsoundcircuitin the Macintosh SEcomputer High-impedance internalspeaker (disconnected when externalsound jackis used) Sound amplifier AppleVIA(6522) Sony sound chip SouncVdfsk-speed On-offswitch buffer(in RAM) PB7 (square-wave High Low (timer1) generator) (even) (odd) BBU byte byte Digital-to-analog 0 Sound Disk ·•···\ converter 1 Sound Disk ·•·······. ]] M l Sound Disk Sound Disk !::::i?\ High byte ] P. : ·-11------ Wordsfrom it. ~ • ! .... sound/disk-speed '~~ buffer Low < t !::>-:-:-~-~-=~-·- 170 Sound Disk ··•·····/ • ;/ byte Digital-to-analog 171 Sound Disk ··•····' converter Tomotorspeed-control line forexternalsingle-sided diskdrive Chapter13 Sound 43S ASCsound system TheMacintosh ASCsoundcircuitusesan ApplecustomICcalledtheAppleSoundChip(ASC).The ASCis compatiblewithsoftwarewrittenfor Macintoshmodelsthatuse the PWMsoundcircuit,and alsooffersstereosoundand otherenhancements not availablein thosecomputers.TheMacintosh modelsthatuseASCsoundare • MacintoshSE/30 • MacintoshPortable • MacintoshII • MacintoshIlx • MacintoshHex • MacintoshIlci • MacintoshIlfx Thehardwareof the Macintosh ASCsoundsystemconsistsof thesehardwarecomponents: • the digitalAppleSoundChip(ASC) • twoanalogsoundprocessingchips(the Sonysoundchips) • an internalspeaker • an externalstereomini-phonejack TheASChas itsowndatabuffersand implementsin hardwaremanyof the functions carriedout by ROMcodein the Macintosh Plusand Macintosh SEcomputers. • Note:Unlikethe Macintoshcomputersthat use the PWM,Macintoshcomputersthat use the ASCdo not generatespeed-controlsignalsfor single-sided floppydiskdrives; therefore,those computersdo not storedisk-speedcontrolinformationin their sound buffers. ASCsound modes TheASCcontains2 KBof RAMthatcanbe configuredas eithertwo 1 KBsoundbuffersor as four512-bytesoundbuffers.TheAS~can operatein anyof fourfunctionalmodes: • Monaural single-voicemode.Theon-boardRAMis configuredas two 1 KBbuffers.The outputof the left-channel bufferis convertedto a PWMsignaland fed to both channels. 436 Guideto the MacintoshFamilyHardware • Stereosingle-voice mode.Theon-boardRAMis configuredas two 1 KBbuffers.The outputof eachbufferis convertedintoa PWMsignal;one is sentto the leftchannel and the otheris sentto the rightchannel. • Monauralfour-voice synthesismode.Theon-boardRAMis configuredas four independent512-bytebuffers.At eachsampleclockperiod,a soundvalueis taken fromeachof the fourbuffers,all fourvaluesare summed,and the resultis convertedto a PWMsignaland outputto bothchannels. • Stereofour-voicesynthesismode.The on-boardRAMis configuredas four independent512-bytebuffers.Ateachsampleclockperiod,a soundvalueis taken fromeachof the fourbuffers,the valuesare summedin pairs,and the resultof each summedpairis convertedto a PWMsignal.One of the PWMsignalsis outputto the rightchanneland the otheris sentto the leftchannel. Becausethe ASCusesits internalRAMand performswavetablesoundsynthesisin hardware,it requiresverylittleprocessortime.In addition,ASCsounddoesnot haveto be synchronizedwiththe videoblankinginterval,unlikethe PWMsoundsystemused in the classicMacintoshand Macintosh SEcomputers. Undercontrolof the SoundManager,the ASCcansamplethe valuesin itsRAMat any incrementto changethe frequencyof the outputsound.Usingeveryothersample(a samplingintervalof 2.0)doublesthe frequencyof the signal(thatis, raisesthe pitchby one octave).Usingeverysampletwice(a samplingintervalof 0.5)halvesthe frequencyof the signal(thatis, lowersthe pitchby one octave).Throughthe SoundManager,you can specifyanyfixed-pointnumberforthe samplinginterval.TheASCpicksthe samplesin the RAMlocationsthat fallclosesto the selectedsamplinginterval.Forexample,if the intervalis 1.4,the ASCpickssamplesin RAMlocations1, 3, 4, and 6 (roundingfrom1.4, 2.8,4.2,and 5.6).Theincrementsusedby the ASCare extremelyprecise,havinga 24-bit resolution. Generatingsounds TheASCgeneratesa pulse-width-modulated square-waveoutputsimilarto that generated by the PWMsystemused in the MacintoshPlusand Macintosh SE.Everysampleperiod, the ASCgeneratesa pulseforeachstereochannel,the widthof whichdependson the valuesreadfromthe soundbuffers.Thesetrainsof pulsesare sentto the Sonysound chips,whichfilterthemto producesmoothlyvaryingwaveforms. TheSonysoundchips adjustthe amplitudesof the waveformsaccordingto a 3-bitvaluefromthe ASCand send the signalsto the internalspeakeror the externalsoundjack. Chapter13 Sound 437 The usefulbandwidthof the MacintoshASCsoundsystemis approximately 7.5KHz.The samplerate can be eitherthe compact-disc standardof 44.1KHz,or 22.255KHz(the samplerate used by the MacintoshPWMsoundsystemdescribedin the previoussection). ~ Developer tip The Macintoshmodelsthat use the ASCdo not providethe VIAtimer signal(Tl) to the soundcircuitsometimesused in the classic Macintoshand MacintoshSEcomputersto generatesquare-wave sound.Youcan use routinesin the SoundManagerto achievethe same effect,withthe addedadvantagethat theseroutineswillworkon all Macintoshcomputers,both presentand future.The SoundManager routinesare describedin InsideMacintosh.4 The internal32-ohm,2.25-inchspeakeris drivenby a 250mWpower_amplifier in the Sony soundchip.Soundmaybe playedthroughthe internalspeaker,or throughthe external soundjack.If a plugis insertedin the externalsoundjack,the internalspeakeris disconnected.Mixingthe two stereochannelstogetherfor the internalspeakeris handled differentlyin differentmodels. In all ASC-equipped Macintoshmodelsexceptthe MacintoshSE/30,the internalspeakeris connectedto the leftchannelonly.Wheneverthe internalspeakeris in use, a logicsignal goesto the SoundManagercausingit to sendall soundsthroughthe leftchannel.Whena plug is insertedintothe soundjack,the SoundManagersets the ASCto stereomodefor the externalheadphonesor amplifier.In the MacintoshSE/30,the two channelsare added togetherfor the internalspeakerand the SoundManageralwaysoperatesin stereomode. The externalsoundjackis at standardline level(approximately1.5voltspeak-to-peak) and its sourceimpedenceis approximately 47 ohms.The jackis capableof drivinga headphoneload of 8 to 600ohms,or the inputto almostany audioamplifieror amplified speakers.It willnot adequatelydrivea directlyconnectedexternalspeaker.The external sound jack is short-circuitprotected. TheControlPanelofferseightchoices(0 through7) for overallvolumecontrol.Whenthe volumecontrolsettingis set to 0, the SoundManagerdisablessoundoutputand flashes the menubar instead. TheASCcan emulatethe behaviorof the soundhardwareof the classicMacintoshand MacintoshSEcomputers;however,the ASCalso providesa varietyof featuresnot availablein thoseMacintoshcomputers.Forexample,the ASCcan generatestereosound synthesizedfromtwo voicesper channel,usingon-boarddata buffers. 438 Guideto the MacintoshFamilyHardware Circuit diagrams Figure13-5showsa blockdiagramof the ASCsoundcircuitused in the Macintosh Portable,MacintoshII, MacintoshIlx, MacintoshHex,MacintoshIlci, and MacintoshIlfx computers.Noticethat the internalspeakeris connectedto only one channel.Whenan externalspeakeror amplifieris pluggedin, a signalindicatingthatboth channelscanbe usedgoesto the VIAin the Macintosh Portableand to VIA2in the MacintoshII, Macintosh Ilx, and Macintosh Hex.A similarsignalgoes to the RBVin the Macintoshllci and to the OSSin the MacintoshIlfx. TheASCsoundcircuitusedin the Macintosh SE/30is slightlydifferent,as shownin Figure13-6.Thatmachinealwaysoperatesin stereoand the soundcircuitrymixesthe channelstogetherforthe internalspeaker. ~ Developer tip Theinformation on the AppleSoundChippresentedin this chapteris specificto the Macintoshmodelsthat use that chip.The ASCis not used in allMacintosh computers,and futureversionsof the ASCare not guaranteedto be functionallyidenticalto the presentmodel. Furthermore, if yourprogramaddressesthe ASCdirectly,it is likelyto interferewiththe operationof otherprogramsthat are runningat the sametimeand that use the SoundManager.The information in this chapteris providedfor the sake of completenessonly;Applestrongly recommends thatyouuse the routinesin the SoundDriverand Sound Managerto controlsoundin yourapplications. TheSoundManager andSoundDriveraredescribedin InsideMacintosh.,-. Chapter13 Sound 439 • Figure13-S Blockdiagramof the ASCsoundcircuitin the MacintoshPortable, MacintoshII, MacintoshIlx, MacintoshHex,MacintoshIlci, and MacintoshIlfx computers Stereosound outputjack is connected• "Speaker ToVIA, -----+----------------1-+---<1 RBV,orOSS High-impedance Sound Sound internalspeaker amplifier amplifier (disconnected when =. chip Sony sound chip externalsound jackis used) Volumecontrol (eightlevels) Rightchannel Leftchannel PWMsound PWMsound SoundIR AppleSoundChip(ASC) 440 Guideto the MacintoshFamilyHardware • Figure13-6Blockdiagramof the ASCsoundcircuitin the Macintosh SE/30computer Stereosound outputjack Sound amplifier High-impedance internalspeaker Sound Sound amplifier amplifier =. chip Sony sound chip Volume control Rightchannel Leftchannel PWMsound PWMsound AppleSoundChip{ASC) Chapter13 Sound 441 Chapter14 ExpansionInterfaces Macintoshcomputersuse two typesof hardwareexpansion:a single processor-directexpansionslot (PDS),or severalNuBusexpansionslots: • processor-directslot: MacintoshSE, MacintoshSE/30,Macintosh Portable,and Macintosh llfx computers • NuBusslots: MacintoshII, MacintoshIlx, MacintoshHex, MacintoshIlci, and MacintoshIlfx computers Note that the MacintoshIlfx computerhas both kinds of expansion slots.The MacintoshPlushas no hardwareexpansionslot,althoughit does providefor internalmemoryexpansion,as describedin Chapter5. The processor-directslots provideunbufferedaccessto their respectiveprocessorbusesthrougha singleexpansionconnector.The 68000processor-directslot in the MacintoshSEand MacintoshPortable computersuses a Euro-DIN96-pinconnector;the 68030processor-direct slot in the MacintoshSE/30and MacintoshIlfx computersuses a Euro- DIN 120-pinconnector. NuBusis a 32-bit-wide,processor-independent bus usingEuro-DIN 96-pinconnectors.The MacintoshII, MacintoshIlx, and MacintoshIlfx computershave six NuBusslotsto supportexpansioncards.The Macintosh llcxandMacintosh llci havethreeNuBuslots. • Note:For a descriptionof memoryexpansion,includingSIMMs for all modelsand the optionalcache card for the Macintosh _Ilci,please referto Chapter5. 443 Expansion method (none) MacintoshPlus 68000PDS MacintoshSE 68030PDS MacintoshSE/30 68000PDS MacintoshPortable NuBus (6 slots) MacintoshII NuBus (6 slots) MacintoshIlx NuBus (3 slots) MacintoshJlcx NuBus (3 slots) MacintoshJlci NuBus(6 slots) & 68030PDS MacintoshJlfx 444 Guideto theMacintosh FamilyHardware The 68000 processor-directslot (PDS) The 68000processor-direct slot (68000PDS)providesunbufferedaccessto the MC68000 processorthrougha singleEuro-DIN 96-pinexpansionconnector.Thereare two different versionsof the 68000PDS:one on the MacintoshSEcomputerand anotheron the MacintoshPortable.Althoughthe two versionsare mechanically the same,theyare electricallydifferent. • Note:Somebooks,amongthemApple'searliermanualsMacintosh FamilyHardware Referenceand Designing CardsandDrivers for Macintosh II andMacintosh SE,referto the processor-direct SEas the .Macintosh slot in the Macintosh SEBus. The 68000processor-direct slotprovidesthe sameaddressand datalinesused by the processorbus,severalcontrolines,and powerand groundingforexpansioncards.A card in the 68000PDScan accesssystemRAMand ROMat the sameratesas doesthe MC68000: RAMaccessesare at an averagerate of 3.22MBper second,and ROMaccessesare at 3.92MBper second. Each68000PDShas two clocksignals:the CPUclock,whichcan be differenton different models,and a 16MHzclockthat is the sameon all models.TheCPUclockon the MacintoshSEhas a frequencyof 8 MHz;the CPUclockon the MacintoshPortableruns at 16MHz.The common16MHzclockmakesit easierto designcircuitsthat willworkon morethan one model. Referto Motorola'sdocumentationfor the MC68000 processor,the MC6800016-Bit Microprocessor User's Manual,for moreinformation on the MC68000 processorbus. Detailedguidelinesfor designingcardsto operatein the 68000PDScan be foundin DesigningCardsand Drivers for theMacintoshFamily,secondedition. Examplesof typesof cardsfor the processor-direct slot include • coprocessors • memoryexpansionand RAMdisks • localarea network(LAN)interfaces • digitalsoundsamplingand playbacksystems • videoimageprocessors,framegrabbers,and additionaldisplays Chapter14 ExpansionInterfaces 44S ~ Developer tip Becausethe 68000processor-direct slot is connecteddirectlyto the processorbus,anychangesto the processoror processorbus in future Macintosh models(suchas a changeto a higherclockrate)couldresult in an expansioncard'sbeingincompatiblewiththe newmainlogic board. 4 Figure14-1showsthe pinoutsforthe Euro-DIN 9frpinexpansionconnectorusedforthe 68000PDSon the Macintosh SEand the MacintoshPortable.Becausethe two versionsof the 68000PDSare electrically different,the signalsare describedin separatesections, followingFigure14-1. 446 Guideto the MacintoshFamilyHardware • Figure14-1 Pinoutof the Euro-DIN 96-pinconnectorusedfor the 68000PDS \. 0 I D D D 1 D D D 2 D D D 3 D D D 4 D D D 5 D D D 6 D D D 7 D D D 8 D D D 9 D D D 10 D D D 11 D D D 12 D D D 13 D D D 14 D D D 15 D D D 16 D D D 17 D D D 18 D D D 19 D D D 20 D D D 21 D D D 22 D D D 23 D D D 24 D D D 25 D D D 26 D D D 27 D D D 28 D D D 29 D D D 30 D D D 31 D D D 32 I ( 0 A B C Chapter14 ExpansionInterfaces 447 68000 PDSon the MacintoshSEcomputer Table14-1showsthe signalassignments andTable14-2describesthe signalson the 68000 PDSin the MacintoshSEcomputer.Forinformationaboutthe 68000PDSin the MacintoshPortable,pleasereferto the next section. • Table14-1 Signalassignmentsfor the 68000PDSon the MacintoshSEcomputer Pin RowA RowB Rowe 1 FC2 GND NPA 2 FCl GND /VMA 3 FC0 GND /BR 4 Al GND /BGACK 5 A2 GND /BG 6 A3 GND /DTACK 7 A4 GND R/W 8 AS GND /LOS 9 A6 GND IUDS 10 A7 Reserved !AS 11 AB Reserved /PMCYC 12 A9 /HALT /RESET 13 AlO +5V +5V 14 All +5V DO 15 A12 +5V D1 16 A13 +5V D2 17 A14 +5V D3 18 A15 /IPL0 D4 19 A16 /IPLl D5 20 A17 /IPL2 D6 21 A18 /BERR D7 22 A19 Spare D8 23 A20 Reserved D9 24 A21 Reserved D10 25 A22 Reserved D11 26 A23 Reserved D12 (continued) 448 Guideto the MacintoshFamilyHardware • Table14-1 Signalassignments for the 68000PDSon the Macintosh SEcomputer (continued) ftl RowA llowB llowC 27 E Reserved D13 28 C8M /EXT.DTK D14 29 C16M GND D15 30 GND +12V GND 31 +12V +12V Spare 32 +12V -5V -12V • Table14-2 Signaldescriptionsfor the 68000PDSin the Macintosh SEcomputer Signal Usual Logicboard name source destination Signaldescription FC2-FC0 MC68000 Euro-DIN 96-pin MC68000processorfunctioncodes. A19-Al MC68000 RAM,ROM,VIA, Memoryand registeraddressing. sec,SWIM,SCSI A23-20 MC68000 BBU Decodedto selectRAM,ROM,VIA,sec, SWIM, and SCSIdevices. E MC68000 VIA 783.36KHzclockfor VIAfromCPU. C8M BBU MC68000 7.8336MHzclockfor MC68000. C16M Oscillator BBU,SWIM 15.6672MHzmasterclockfor BBUand SWIM. /HALT MC68000 /RESline Haltsignal;generatedby CPUon double bus fault.Tiedto MC68000 /RESline. /IPL0 BBU MC68000 Assertedon VIAor SCSI.IRQ interrupt; removedon SCC(IIPLl)interrupt. /IPLl sec MC68000 InterruptfromSCC.- /IPL2 NMIswitch MC68000 Programmer's interruptswitch. /BERR BBU MC68000 In pseudo-OMA mode,indicatesthat the SCSIinterfacefailedto completea transactionin 265ms. /EXT.DTK Euro-DIN BBU Whenan externaldevicepullsthispin low, the 96-pinBBUmakesits /DTACK output tri-stateso that the externaldevicecan drivethe /DTACK line. (continued) Chapter14 ExpansionInterfaces 449 • Table14-2 (continued) Signaldescriptionsfor the 68000PDSin the Macintosh SEcomputer Sfgoal Usual logic board omne source destfnadon Sfgoaldescripdon /VPA BBU MC68000 Indicatesthat a 6800-typedevice(usually the VIA)is beingaddressedin the $EOOOOO-$FFFFFF space,an accessthat needsto be synchronized withthe MC68000's E clock. /VMA MC68000 VIA Passesa /VPA accesson to a 6800-type device,afterproper synchronization to the MC68000's E-clocksignal. /BR Euro-DIN MC68000 Busrequest:asksthe MC68000 to 96-pin relinquishthe bus (tri-stateits linesand relinquishthe address,data,and control buses). /BG MC68000 Euro-DIN 96-pin Busgrant:tellsthe requestingdevicethat the MC68000 willrelinquishthe bus at the end of the currentbus cycle. /BGACK Euro-DIN MC68000 Indicatesthat the requestingdevicehas 96-pin takenoverthe bus. /DTACK BBU MC68000 Indicatesthat validdata is on the data bus. R/W MC68000 BBU,VIA Whenhigh,MC68000 is readingfromthe databus;whenlow,MC68000 is writingto the data bus. /LDS MC68000 BBU Selectsthe lowerbyte (D0-D7)of the data bus for readingor writingoperations.This is the odd-addressbit: AO= 1. . IUDS MC68000 BBU .Selectsthe upperbyte (D8--D15) of the databus for read or writeoperations.This is the even-addressbit:AO=0. /AS MC68000 BBU Indicatesthat a validaddressis on the addressbus.If thissignalis lowfor more than 265ms,the BBUgenerates/BERR. /PMCYC BBU RAMaddressMUXs Goeslowwhenthe MC68000 canaccess RAM; goeshighwhenvideois accessing RAM. (continued) 4SO Guideto the MacintoshFamilyHardware • Table14-2 Signaldescriptionsfor the 68000PDSin the Macintosh SEcomputer (continued) Sfgnal Usual Logicboard name source destination Sfgnaldescription /RESET Sonychip MC68000, VIA,SWIM Masterreset for entireboard;tied to sec,SCSI,BBU MC68000 /HALTline,Resetswitch,and MC68000 /RESline. D7-D0 MC68000, SWIM, MC68000, SWIM Lower(odd) byte of data bus. ROM,RAM RAM D15-D8 MC68000, VIA, MC68000,VIA, Upper(even)byte of data bus. ROM,RAM, RAM,sec, sec,SCSI SCSI 68000 PDSon the MacintoshPortable The processor-directslot on the MacintoshPortableis similarto that of the Macintosh SE. The68HC000 signalsare broughtout on a 96-pinEuro-DIN connector.Table14-3shows the signalassignmentsand Table14-4liststhe functionsof the signalson the 68000PDS connectoron the MacintoshPortable. Chapter14 ExpansionInterfaces 4Sl • Table14-3 Signalassignmentsfor the 68000PDSon the MacintoshPortablecomputer Plnnumber RowA Rowe Rowe 1 GND GND GND 2 +SV +SV +SV 3 +SV +SV +SV 4 +SV +SV +SV 5 /DELAY.CS SYS.PWR/ VPA/ 6 /VMA /BR /BGACK 7 /BG /DTACK R/W 8 /LDS IUDS !AS 9 GND +5/0V' Al 10 A2 A3 A4 11 AS A6 A7 12 A8 A9 AlO 13 All A12 A13 14 A14 A15 A16 15 A17 A18 Reserved 16 Reserved Reserved Reserved 17 Reserved Reserved Reserved 18 Reserved Reserved Reserved 19 Reserved +12V DO 20 Dl D2 D3 21 D4 DS D6 22 D7 D8 D9 23 DlO Dll D12 24 D13 D14 D15 25 +5/3.7V +SV GND 26 A19 A20 A21 27 A22 A23 E 28 FCO FCl FC2 29 /IPLO /IPLl /IPL2 30 /BERR /EXT.DTACK/SYS.RST 31 GND 16M GND 32 GND GND GND by the PowerManagerIC. "Switched 4S2 Guideto the MacintoshFamilyHardware • Table14-4 Signaldescriptionsfor the 68000PDSin the MacintoshPortablecomputer SJgoalname Sigoaldescription GND Logicground DO-D15 68HC000 unbuffereddatabus 0-15 Al-A23 68HC000 unbufferedaddressbus 1-23 16M 16MHzclock /EXT.DTACKExternalDTACK, an inputto the CPUlogicgluethatallowsforexternal generation_ of /DTACK E 68HC000 E clock /BERR 68HC000 BusError IPL2-IPL0 68HC000 InterruptPriorityLevel2-0 /SYS.RST 68HC000Reset /SYS.PWR PowerManagerICsignalthat causesassociatedcircuitsto go intoidle state;deassertedduringsleep state !AS 68HC000 AddressStrobe IUDS 68HC000 UpperAddressStrobe /LDS 68HC000 LowerAddressStrobe R/W 68HC000Read/Write /DTACK 68HC000 DataTransferAcknowledge /DELAY.CS Signalindicatingthat the systemis insertingwaitstates;can be used to strobechip selects /BG 68HC000 BusGrant /BGACK 68HC000 BusGrantAcknowledge /BR 68HC000 BusRequest /VMA 68HC000 ValidMemoryAddress NPA 68HCOO0 ValidPeripheralAddress FC2-0 68HC000 FunctionCode2 through0 +5/0V +5voltswhenthe systemis active,0 voltswhenthe systemis in sleepstate +5/3.7V +5voltswhenthe systemis active,3.7voltswhenthe systemis in sleepstate Chapter14 ExpansionInterfaces 4S3 The 68030processor-directslot (PDS) The 68030processor-directslot (PDS)providesunbufferedaccessto the MC68030 processorthrougha singleEuro-DIN 120-pinexpansionconnector.The68030PDSis used in the Macintosh SE/30and Macintosh Ilfxcomputers. In additionto the same32-bitaddressand datalinesusedby the processorbus,the 68030PDS providesOMAcontrolsignals,otherCPUcontrolsignals,interruptinputs,and status signalsfor expansioncardsusingprotocolsimulatingthoseof the NuBus.The68030PDSalsoprovides +5volt,-5 volt,+12volt,and-12 voltpowerand groundingfor expansioncards. In the MacintoshSE/30,a cardin the 68030PDScanaccesssystemRAMand ROMat the samerate as the mainprocessor:15.67MBpersecond.In the Macintosh Ilfx,the 68030 PDScan accesssystemRAMand ROMat a rateof 20.0MBper second.Thatis slowerthan the mainprocessor'smemoryaccessrate,whichaveragesabout60MBper second, becausethe PDScannotuse burst-modeaccessto the cache. ~ Developer tip Whereasmostof the signalson the 68030processor-direct slot connectorare the sameon allmodelsthatuse thisexpansion connector,a fewsignalsare machine-specific. Pleasereferto Table14-7 for machine-specific signals.4 In the MacintoshSE/30,twoclocksignalsare availablefor use by cardspluggedintothe 68030PDS:the CPUclocksignalusedby the MC68030 and a general-purpose clocksignal. In the MacintoshSE/30,thesetwo clocksignalshavethe samefrequency(15.6672 MHz) and phase.In the Macintosh Ilfx,the general-purpose clockis divideddownto a frequencyof 20MHzfromthe 40MHzclocksignalusedby the mainprocessor.TheCPU clocksignalis not availableon the PDS. ~ Developer tip PDSexpansioncardsforthe Macintosh SE/30shoulduse the general- purposeclockfor on-boarddevicesthatare speedsensitiveand use the CPUclockfor synchronization withthe MC68030. 4 454 Guideto the MacintoshFamilyHardware Referto Motorola'sdocumentation processor,MC68030Enhanced for the MC68030 32-BitMicroprocessorUser's Manual,formoreinformation on the MC68030 processorbus. Detailedinformationaboutthe 68030processor-direct slot and advicefor developers designingPDScardscanbe foundin DesigningCardsandDrivers for theMacintoshFamily, second edition. Figure14-2showsthe pinoutsforthe Euro-DIN 120-pinexpansionconnectorusedforthe 68030PDS.Table14-5showsthe signalassignments forthe 68030PDS. The 68030processor-direct slot has a set of address,data,and controlsignalsthat are commonto all Macintoshcomputersthatuse the MC68030 processor-includingthe ones thathaveNuBusexpansionslots.Table14-6liststhe signalson the 68030processor-direct slotthat are commonto all thosemachines. Othersignalson the 68030processor-directslotare not the sameon differentmachines. Specifically, machinesthat alsohaveNuBusslotsare differentfrommachinesthat don't. Table14-7liststhe signalson the 68030processor-directslotthatare differenton differentmachines. Chapter14 ExpansionInterfaces 455 • Figure14-2 Pinoutof the Euro-DIN120-pinconnectorused for the 68030PDS 0 I D D D 1 D D D 2 D D D 3 D D D 4 D D D 5 D D D 6 D D D 7 D D D 8 D D D 9 D D D 10 D D D 11 D D D 12 D D D 13 D D D 14 D D D 15 D D D 16 D D D 17 D D D 18 D D D 19 D D D 20 D D D 21 D D D 22 D D D 23 D D D 24 D D D 25 D D D 26 D D D 27 D D D 28 D D D 29 D D D 30 D D D 31 D D D 32 D D D 33 D D D 34 D D D 35 D D D 36 D D D 37 D D D 38 D D D 39 D D D 40 I 0 A B C 456 Guideto the MacintoshFamilyHardware • Table14-5 Signalassignments on the 68030PDS Ill RowA RowB Rowe 1 Reservedor GND• Reservedor ECS• PWROFF or /PFW' 2 Reservedor /PDS.MASTER•GNDorn.c.• /NUBUS or n.c.• 3 /BUSLOCK or reserved• /TMlAor /PDS.BG• /TM0Aor /PDS.BR• 4 /IRQ3or n.c.• /IRQ2or /IRQlS• /IRQl or /IRQ6• 5 /IPL2 /IPLl /IPL0 6 /CIOUT IDS /RMC 7 /STERM /CBACK /CBREQ 8 /DSACKl /DSACK0 R/W 9 SIZl SIZ0 /AS 10 /BGACK /BG /BR 11 FC2 FCl FC0 12 /RESET /BERR /HALT 13 DO +5V Dl 14 D2 D3 D4 15 D5 D6 D7 16 DB GND D9 17 Dl0 Dll D12 18 D13 D14 D15 19 D16 +5V D17 20 D18 D19 D20 21 D21 D22 D23 22 D24 GND D25 23 D26 D27 D28 24 D29 D30 D31 25 A31 +5V A30 26 A29 A28 A~7 27 A26 A25 A24 28 A23 GND A22 29 A21 A20 A19 'Signalswithtwonamesaredifferenton differentmodels;signalnameson theMacintosh SE/30aregiven first.Referto Table14-7fordetailsof themachine-specific signals. (continued) Chapter14 ExpansionInterfaces 457 • Table14-S Signalassignmentson the 68030PDS(continued) Pia. RowA RowB RowC 30 A18 A17 A16 31 A15 +5V A14 32 A13 A12 All 33 AlO A9 AB 34 A7 GND A6 35 AS A4 A3 36 A2 Al AO 37 +5V +5V +5V 38 CPUCLOCK or n.c.• ECLKor n.c.• C16Mor CPUCLK• 39 GND GNDor /SLOT.E GND 40 -12V -5V +12V 'Signalswithtwo namesare differenton differentmodels;signalnameson theMacintosh SE/30aregiven first.Referto Table14-7fordetailsof themachine-specific signals. 4S8 Guideto the MacintoshFamilyHardware • Table14-6 Signaldescriptionsfor the 68030PDS:commonsignals Signalname Signaldescription A(31-0) Addresslines FC(2-0) Functioncode;identifiesthe addressspaceof the currentbus cycle D(31-0) Datalines /IPL(2-lt Interruptprioritylevellines /CIOUTt Inhibitsoperationof an externalcache /CBREQt Identifiesa burstrequestfor the instructionor data cache /CBACK Indicatesthat the devicecan operatein burstmode /STERM A bus responsesignalindicatingthat the port size is 32 bits and that data can be latchedon the nextfallingclockedgefor a readcycle /DSACK(l-0) Indicatesthe completionof a data transferoperation SIZ(l-0) Indicatesthe numberof bytesremainingto be transferredin the currentcycle /BR Signalfroman externaldevicerequestingto becomebus master /BG Busgrant;indicatesthat an externaldevicemaybecomebus masterfollowing completionof the currentprocessorbus cycle /BGACK Indicatesthat an externaldevicehas becomebus master /RESET Initiatesa systemreset /BERR Buserror;signalsan invalidbus operation /RMC Identifiesthe currentbus cycleas part of an indivisibleread-modify-write operation R/W Defineswhethera bustransferis a reador a write !AS Addressstrobe;indicatesa validaddress /HALT Directsthe processorto suspendbus activity IDS Datastrobe;duringa read operation,directsa deviceto placedata on the bus; duringa writeoperation,indicatesthat data is valid "Donot use interruptprioritylineson the Macintosh Ilfx;instead,use /IRQ6,whichis partof that machine's interruptscheme. too not use /CIOUTin conjunctionwith/CBREQ; in otherwords,do not inhibithe cacheduringburst- mode cycles. Chapter14 ExpansionInterfaces 4S9 • Table14-7 Signaldescriptionsfor the 68030PDS:machine-specific signals Signalnameon Signalnameon MacintoshSE/30 Macintoshllfx Signal description Reserved /ECS Early-cycle start signalfromthe MC68030. PWROFF /PFW Statussignalindicatingthat power is about to be removed (ShutDownhas been chosenfromthe Specialmenu). /NUBUS n.c. In the MacintoshSE/30,indicatesaddressin the memory range$60000000to $FFFFFFFF.Thissignalis activewhen the CPUaddressesthe built-invideo display.(Expansioncards can use this signaland furtherdecodethe slot addressranges to avoid conflictwith the video logic.) /BUSLOCK n.c. In the MacintoshSE/30,the /BUSLOCK signalis not used. n.c. /PDS.MASTER In the MacintoshIIfx,this signalindicatesthat the PDScard replacesthe MC68030 as the bus master;used with /PDS.BG and /PDS.BR. /TMlA /PDS.BG In the MacintoshSE/30,an input to VIA2;currentsystem softwaredoes not use it. See the section"DataRegisterB in VIA2"in Chapter4. In the MacintoshIIfx, indicatesthat an externaldevice may becomebus masterfollowingcompletionof the current PDS-cardbus cyclewhen /PDS.MASTER is asserted. /TM0A /PDS.BR In the MacintoshSE/30,an input to VIA2;currentsystem softwaredoes not use it. See the section"DataRegisterB in VIA2"in Chapter4. In the MacintoshIIfx,the signalfroman externaldevice requestingto becomebus masterwhen /PDS.MASTER is asserted. /IRQ3-/IRQ2 /IRQ15 In the MacintoshSE/30,the /IRQl, /IRQ2,and /IRQ3signals are general-purposeinterruptsthat correspondto the pseudo-slotaddresses(slots $9-$B). In the MacintoshIlfx, /IRQ15is an additionalinterrupt(not pseudo-slot)for the addressrange $60000000-$7FFFFFF. /IRQl /IRQ6 In the MacintoshSE/30,an interruptline like/IRQ2and /IRQ3. In the MacintoshIlfx, the interruptline that correspondsto the pseudo-slotaddressused in the MacintoshIIfx (slot $E). CPUCLOCK n.c. Clocksignalused for timingand synchronizationon the MacintoshSE/30.Its frequencyis 16.67MHz. (continued) 4(i() Guideto the MacintoshFamilyHardware • Table14-7 Signaldescriptionsfor the 68030PDS:machine-specific signals(continued) Slgaalnameon Signalnameon MacIntoshSE/30 MacintoshDfx Signaldescripdon ECLK n.c. Clocksignalfor the VIAchipson the maincircuitboardof the MacintoshSE/30. C16M CPUCLK In the MacintoshSE/30,a general-purpose clockwitha frequencyof 15.6672MHz. In the MacintoshIIfx,the clocksignalfor synchronizing to the mainprocessor,but at a frequencyof 20MHz,halfthat of the processor. GND /SLOT.E Whenthissignalis low,the PDSreplacesNuBuslot$Ein the addressmap. ~ Developer tip Becausemanysignalson the Macintosh Ilfxare high-speedsignals, youshouldhaveApple'stechnicalsupportgroupreviewanycardyou developfor the PDSin the Macintosh IIfx.4 Formoreinformationaboutdevelopingcardsforthe 68030PDS,youshouldreadthe companionbookto thisone,DesigningCardsand Drivers for theMacintoshFamily, second edition. The NuBusexpansioninterface NuBusis a 32-bit-wide,processor-independent bus usingEuro-DIN 96-pinconnectors. The expansionslotson the Macintosh II-familycomputersuse Apple'simplementation of the NuBusinterface.The Macintosh II, MacintoshIlx, and Macintosh Ilfx havesix NuBus slots;the Macintosh IIcxand Macintosh Ilci havethree NuBusslots.Detailed_information on thisimplementationof NuBuscanbe foundin DesigningCardsand Drivers for the MacintoshFamily,secondedition. The Instituteof Electricaland ElectronicsEngineers(IEEE)has establisheda standardfor NuBus,describedin IEEE1196,NuB~A Simple32-BitBackplaneBus. Chapter14 ExpansionInterfaces 461 6. Important TexasInstruments,Inc.ownspatentson NuBus.If youwishto makea devicethatworkswithNuBus,you mustobtaina licensefromTexas Instruments.Writeto the followingaddress: TexasInstruments,Inc. 12501ResearchBoulevard Austin,TX78759 Attn:NuBusLicensing MIS21516. TheMacintosh II VideoCardand othervideocardsgo in a NuBusexpansionslot.Other examplesof usesforNuBuscardsinclude • coprocessors • memoryexpansionand RAMdisks • localarea network(LAN)interfaces • additionalSCSIports • digitalsoundsamplingand playbacksystems Figure14-3showsthe pinoutsof the 96-pinNuBusexpansionconnectoron the mainlogicboard. Table14-8liststhe signalassignments forthe NuBusexpansionconnector.Table14-9lists the use of eachsignal.NuBusdatacommunications are describedin DesigningCardsand Driversfor theMacintosh Family,secondedition. 462 Guideto the MacintoshFamilyHardware • Figure14-3 Pinoutof the Euro-DIN 96-pinconnectorused for the NuBus ~0 I D D D 1 D D D 2 D D D 3 D D D 4 D D D 5 D D D 6 D D D 7 D D D 8 D D D 9 D D D 10 D D D 11 D D D 12 D D D 13 D D D 14 D D D 15 D D D 16 D D D 17 D D D 18 D D D 19 D D D 20 D D D 21 D D D 22 D D D 23 D D D 24 D D D 25 D D D 26 D D D 27 D D D 28 D D D 29 D D D 30 D D D 31 D D D 32 I ( 0 A B C Chapter14 ExpansionInterfaces 463 • Table14-8 Signalassignmentsfor the NuBusexpansionconnector Jin RowA RowB Rowe 1 -12 -12 /RESET 2 GND• GND GND• 3 /SPV GND +5 4 /SP +5 +5 5 /TMl +5 /TMO 6 /ADI +5 /ADO 7 /AD3 +5 /AD2 8 /ADS t /AD4 9 !AD7 t !AD6 10 /AD9 t !ADS 11 /ADll t /ADlO 12 /AD13 GND /AD12 13 /AD15 GND /AD14 14 /AD17 GND /AD16 15 /AD19 GND /AD18 16 /AD21 GND /AD20 17 /AD23 GND /AD22 18 /AD25 GND /AD24 19 /AD27 GND /AD26 20 /AD29 GND /AD28 21 /AD31 GND /AD30 22 GND GND GND 23 GND GND /PFW 24 /ARBl t /ARBO 25 /ARB3 t /ARB2 26 /IDl t /IDO 27 /ID3 t /ID2 28 !ACK +5 /START 29 +5 +5 +5 30 /RQST GND +5 31 /NMRQ GND GND 32 +12 +12 /CLK ~ese pinsare reservedin the IEEENuBuspecification; in the Macintosh II,theyare grounded. 1Toesepinsare connectedtogether,but not suppliedwiththe -5.2 V describedin the IEEENuBus Thisvoltagecouldbe suppliedby a card,in whichcase-5.2 Vwouldbe availableto all cards. specification. 464 Guideto the MacintoshFamilyHardware • Table14-9 Signaldescriptionsfor the NuBusexpansionconnector Slpal name Sigaaldescription /SPV SystemParityValid /SP SystemParity TMl-TMO Transfermodelines /AD30-/ADO Address/data lines /PFW PowerFailWarning IARB3-IARBOArbitration /ID3-/IDO Slot identificationlines /ACK Acknowledge /START Start /RQST Request /NMRQ Non-Master Request /CUC Clock Figure14-4showsa blockdiagramof the NuBusinterface.TheNuBusis a synchronous bus runningon a 10MHzclock;the processorbusis asynchronous andusesa clockwitha rate of 15.67MHzor higher,dependingon the model.The blocksat the bottomof the figure are finite-statemachinesthat implementthe handshakingand synchronizetransfers betweenthe twobuses.Thestatemachinesare part of the logicinsidethe NuBus controllerIC(NuChip,NuChip3O, or BIU3O). TheNuBususesa multiplexed address/databus,whereasthe mainlogicboarduses separateaddressand databuses.TheNuBustransceivers buffer,multiplex,and demultiplex the NuBusaddress/databussignals.The/ADl,/ADO,/TMl,and/TMOlineson the NuBusideof the interface,and the SIZland SIZOlineson the processorsideof the interface,controlthe sizeof a datatransfer.Becauseof thisdualuse of the /ADl and IADOlines,the encoder/decodershownin Figure14-4translatesthe twolow-orderaddress bitsbetweenthe processor-bus valuesandthe valuesusedon NuBus. Chapter14 ExpansionInterfaces 46S • Figure14-4 NuBusblockdiagram NB u us contro1 . ls s1gna /AD31-/ADO Transceivers Transceivers NuBusaddress/ - - databus A31-A24 /AD31-/AD24 D7-DO A23-A16 /AD23-/AD16 D15-D8 D31-DO A31-Al Processor Processor A15-A8 /AD15-/AD8 D23-D16 databus addressbus A7-A2 /AD7-/ADO D31-D24 Al-AO Encoder/ SIZl-SIZO decoder -- /TMl-/TMO ...,_ Processor controlsignals (forexample, NuBusslave statemachine ,_ /START, /ACK,etc. Processor-bus toNuBus i-/AS, /NUBUS, /DSAC Kn) NuBus-I> statemachine clock ' NuBus-[> <,- Processor clock clock NuBusto processor-bus statemachine Processor Processorclock-1> controlsignals (forexample, /BR,/AS,/DSACKn) 4<>6 Guideto the MacintoshFamilyHardware A MacintoshFamily Appendix HardwareSpecifications Thisappendixgivesthe specifications for nine Macintoshmodels: • MacintoshPlus • MacintoshSE • MacintoshSE/30 • MacintoshPortable • MacintoshII • MacintoshIlx • MacintoshIlcx • MacintoshIlci • MacintoshIlfx 467 MacintoshPlus Processor MC68000, 32-bitinternalarchitecture,16-bitexternaldata bus, 24-bitexternaladdressbus Processorclock 7.8336MHz RAM 1 MBof systemRAM(expandableto 4 MB); 256bytesof parameterRAMin RTC ROM 128KBROM(expandableto 256KB) Floppydisk drive One internal800KBdouble-sided3.5-inchdiskdrive; one externaldisk-driveconnector Harddisk drive ExternalDB-19connectoracceptsan AppleHardDisk20; externalSCSIconnectoracceptsa SCSIhard disk Videodisplay Built-in9-inch(diagonal),512-pixelby 342-pixelbit-mapped videodisplayscreen 1/0 Synchronous serialkeyboardbus; two RS-422serialports; mouse interface; IWMportwithone internalconnectorand one externalconnector; monosoundport for externalamplifier Soundgenerator Four-voice monosoundwithdigital-to-analog conversionusing 22.255KHzsamplerate Keyboard MacintoshPluskeyboardwithbuilt-inkeypad Mouse Mechanical/opticalmechanismgenerating90 pulsesper inchon eachaxis of travel Real-timeclock CMOScustomchip containing256bytesof parameterRAM; rechargeable 4.5-volt(EvereadyNo.523or equivalent)user- replaceablebatterybackup Powerrequirements Linevoltage:85 to 135or 170to 270V (rms) Frequency:47 to 63 Hz Power:80W maximumforpeakload Poweroutput 46.8W at maximumsustainableload 468 . Guideto the MacintoshFamilyHardware • TableA-1 Sizeand weightof the MacintoshPluscomputer Wdght Height Width Depth Mainunit 7.5kg 344mm 246mm 276mm (16lbs.8 oz.) (13.5in.) (9.7 in.) (10.9in.) Keyboard 1.2kg 65mm 395mm 146mm (2 lbs. 10oz.) (2.6 in.) (15.6in.) (5.8in.) Mouse 0.2kg 37mm 60mm 109mm (7 oz.) (1.45in.) (2.4 in.) (4.3 in.) Environment Operatingtemperature 10°Cto 40°C (50°F to 104°F) No componentinsidethe machineshouldget hotterthan 80%of the manufacturer's maximumwhenoperatingat the maximumtemperature. Storagetemperature -40° C to 50°C (-40°F to 122°F) Relativehumidity 200/4 to 95%(noncondensing) at 25°C (77°F) to 40°C (104°F) Altitude Oto 4572m (0 to 15,000ft.) AppendixA MacintoshFamilyHardwareSpecifications 469 MacintoshSE Processor MC68000, 32-bitinternalarchitecture,16-bitexternaldata bus, 24-bitexternaladdressbus Processorclock 7.8336MHz RAM 1 MBof systemRAM(expandableto 4 MB); 256bytesof parameterRAM in RTC ROM 256KBROM Floppydisk drive One internal1440KBMacintoshFDHDdiskdrive; one optionalsecondinternal1440KBMacintoshFDHDdrive; one externalDB-19connector Hard disk drive One optionalinternal20 MBSCSIhard disk; externalDB-19connectoracceptsan AppleHardDisk20; externalSCSIconnectoracceptsa SCSIhard disk Videodisplay Built-in9-inch(diagonal),512-pixelby 342-pixelbit-mapped videodisplayscreen 1/0 AppleDesktopBuswith two connectorsfor communication with keyboard,mouse,and otherdevicesover low-speed, synchronousserialbus; two RS-422serialportswithsynchronousmodemsupport on port A; SWIMport withone internalconnectorand one external connector; SCSIport withone internalconnectorand one external connector; monosoundport for externalamplifier Expansionslot 68000processor-direct slot for expansioncard Soundgenerator Four-voicemonosoundwithdigital-to-analog conversionusing 22.255KHzsamplerate Keyboards AppleStandardKeyboardor AppleExtendedKeyboard(Apple DesktopBus) Mouse AppleStandardMouse(AppleDesktopBus); mechanical/opticalmechanismgeneratingeither100countsor 200countsper inchon eachaxis of travel Real-timeclock CMOScustomchip containing256bytesof parameterRAM; long-lifelithiumbatterybackup Powerrequirements Linevoltage:85to 270V (rms) Frequency:47 to 63 Hz Power:142W maximumfor peak load Power output 76 W at maximumsustainableload 470 Guideto the MacintoshFamilyHardware • TableA-2 Sizeand weightof the Macintosh SEcomputer Weight Height Width Depth Mainunit 7.7-10kgt 344mm 246mm 276mm (17-22lbs.•) (13.55in.) (9.69in.) (10.87in.) AppleStandard 1.0kg 44.5mm 418.3mm 140.0mm Keyboard (2 lbs.4 oz.) (1.8 in.) (16.5in.) (5.5 in.) AppleExtended 1.6kg 56.4mm 486mm 188mm Keyboard (3 lbs. 10oz.) (2.22in.) (19.15in.) (7.4 in.) AppleStandard 0.17kg 27.9mm 53.3mm 96.5mm Mouse (6 oz.) (1.1 in.) (2.1 in.) (3.8 in.) "Weightvariesdependingon installation of optionalhard diskdriveor second3.5-inchfloppydiskdrive. Environment Operatingtemperature 10°C to 40°C (50°F to 104°F) No componentinsidethe machineshouldget hotterthan 80%1of the manufacturer's maximumwhenoperatingat the maximumtemperature. Storagetemperature -40° C to 47° C (-40° F to 116.6°F) Relativehumidity 20%to 95%(noncondensing) at 25° C (77°F) to 40°C (104°F) Altitude Oto 4572m (0 to 15,000ft.) AppendixA MacintoshFamilyHardwareSpecifications 471 MacintoshSE/30 Processor MC68030, 32-bitinternalarchitecture,32-bitexternaldata bus, 32-bitexternaladdressbus Processorclock 15.6672MHz Coprocessor MC68882 floating-pointunit RAM 1 MBof systemRAM,expandableto 64 MB; 256bytesof parameterRAMin RTC; 2 KBof soundRAMin ASC; ROM 256KB,expandableto 2 MB Floppydisk drive One internal1440KBMacintosh FDHDdiskdrive; one optionalsecondinternal1440KBMacintosh FDHDdrive; one externalDB-19connector Harddisk drive Oneoptionalinternal40 or 80 MBSCSIharddisk; externalSCSIconnectoracceptsa SCSIhard disk Videodisplay Built-in9-inch(diagonal),512-pixelby 342-pixelbit-mappedvideo displayscreen;interfaceemulatesexpansion-bus architecturewith 8 KBdeclarationROMand 64KBdisplaybuffer 1/0 AppleDesktopBuswithtwo connectorsfor communication with keyboard,mouse,and otherdevicesoverlow-speed,synchronous serialbus; two RS-422 serialportswithsynchronousmodemsupport on portA; SWIMportwithone internalconnectorand one externalconnector; SCSIportwithone internalconnectorand one externalconnector; stereosoundport for externalamplifier Expansionslot 68030processor-direct slot for expansioncard Soundgenerator Four-voicestereoor monosoundwithdigital-to-analog conversionusingeither22.255KHzor 44.1KHzsamplerate Keyboards AppleStandardKeyboardor AppleExtendedKeyboard(Apple DesktopBus) Mouse AppleStandardMouse(AppleDesktopBus); mechanical/optical mechanismgeneratingeither100countsor 200countsper inchon eachaxisof travel Real-timeclock CMOScustomchip containing256bytesof parameterRAM; long-Hfe lithiumbatterybackup Powerrequirements Linevoltage:85 to 270V (rms) Frequency:47 to 63 Hz Power:142W maximumforpeakload Poweroutput 76W at maximumsustainableload 47Z Guideto the MacintoshFamilyHardware • TableA-3 Sizeand weightof the Macintosh SE/30computer Wdght Height Width Depth Mainunit 7.7-10kg• 344mm 246mm 276mm (17-22lbs.•) (13.55in.) (9.69in.) (10.87in.) AppleStandard 1.0kg 44.5mm 418.3mm 140.0mm Keyboard (2 lbs.4 oz.) (1.8in.) (16.5in.) (5.5 in.) AppleExtended 1.6kg 56.4mm 486mm 188mm Keyboard (3 lbs. 10oz.) (2.22in.) (19.15in.) (7.4 in.) AppleStandard 0.17kg 27.9mm 53.3mm 96.5mm Mouse (6 oz.) (1.1 in.) (2.1 in.) (3.8in.) • Weightvariesdependingon installation of optionalharddiskdriveor secondFDHDdrive. Environment Operatingtemperature 10°C to 40°C (50°F to 104°F) No componentinsidethe machineshouldget hotterthan 80%of the manufacturer's maximumwhenoperatingat the maximumtemperature. Storagetemperature --40°C to 47°C (--40°F to 116.6°F) Relativehumidity 20%to 95%(noncondensing) at 25° C (77°F) to 40°C (104°F) Altitude Oto 4572m (0 to 15,000ft.) AppendixA MacintoshFamilyHardwareSpecifications 473 MacintoshPortable Processor MC68000, 32-bitinternalarchitecture,16-bitexternaldata bus, 24-bitexternaladdressbus Processorclock 15.6672MHz RAM 1 MBof systemRAM(expandableto 4 MB); 256bytesof parameterRAMin RTC ROM 256KBROM Floppydisk drive One internal1440KBMacintoshFDHDdiskdrive; one optionalsecondinternalFDHDdiskdrive Harddisk drive One optionalinternal40 or 80 MBSCSIharddisk ExternalSCSIconnectoracceptsa SCSIhard disk Flat-paneldisplay Built-in9.8-inchdiagonal,512-pixelby 342-pixelflat-panel displayscreen; connectorfor externalvideomonitor(adapterneeded) I/ 0 AppleDesktopBuswithone connectorfor communication with low-powerkeyboard,mouse,and otherlow-powerdevicesover low-speed,synchronous serialbus; twoRS-422 serialportswithsynchronousmodemsupporton one port; connectorfor internalmodem(usesmodemserialport); IWMportwithtwo internalconnectorsand one externalconnector; SCSIportwithone internalconnectorand one externalconnector; monosoundport for externalamplifier Soundgenerator Four-voicestereoor monosoundwithdigital-to-analog conversionusingeither22.255KHzor 44.1KHzsamplerate Keyboards Built-inlow-powerversionof AppleStandardKeyboard; acceptsexternalow-powerkeyboard(AppleDesktopBus) Trackball Stationarypointingdevice Mouse Acceptslow-powerversionof AppleStandardMouse(Apple DesktopBus) Real-timeclock CMOScustomchip containing256bytesof parameterRAM; long-lifelithiumbatterybackup Powerrequirements• Linevoltage:85 to 270V (rms) Frequency:48 to 62 Hz Power:15W maximumfor peakload Poweroutput Batterypowerfor8 hoursof normaluse 76W at maximumsustainableload • Wall-mounted batteryrecharger,ACinput 474 Guideto the MacintoshFamilyHardware • TableA-4 Sizeand weightof the MacintoshPortablecomputer Weight Height Width Depth Mainunit 6.4-7.7k( 51-102mmt 386mm 349mm (14-17lbs.•) (2.0-4.0in.t) (15.2in.) (13.75in.) AppleStandard 0.17kg 27.9mm 53.3mm 96.5mm Mouse (6 oz.) (1.1 in.) (2.1in.) (3.8 in.) °Weightvariesdependingon installation of optionalhard diskdriveor secondFDHDdrive. tunitis wedgeshaped,thickertowardthe back. Environment Operatingtemperature 10°C to 40°C (50°F to 104°F) Nocomponentinsidethe machineshouldget hotterthan 80%of the manufacturer's maximumwhenoperatingat the maximumtemperature. Storagetemperature -40° C to 47°C (-40° F to 116.6°F) Relativehumidity 20%to 95%(noncondensing) at 25°C (77°F) to 40°C (104°F) Altitude Oto 4572m (0 to 15,000ft.) AppendixA MacintoshFamilyHardwareSpecifications 475 Macintoshll Processor MC68020, 32-bitinternalarchitecture,32-bitexternaldata bus, 32-bitexternaladdressbus Processorclock 15.6672MHz RAM 1 MBof systemRAM,expandableto 128MB, expandableto 2 GBin NuBuscards; 256bytesof parameterRAMin RTC; 2 KBof soundRAMin ASC; videoRAMand otherspecial-purpose RAMin NuBuscards ROM 256KB,expandableto 512KB Coprocessor MC68881 floating-pointunit Memorymanagement ApplecustomAddressManagement Unit(AMU); replaceableby optionalMC68851 PagedMemoryManagement Unit(PMMU) Floppydisk drive One internal800KBdouble-sided3.5-inchdiskdrive; one optionalsecondinternal800KBdouble-sided 3.5-inchdisk drive Harddisk drive One optionalinternalSCSIhard disk; externalSCSIconnectoracceptsa SCSIhard disk Videodisplay Separatevideodisplaymonitorconnectedto a NuBuscard. Appleoptionsincludea 12-inch640-by-480 pixelmonochrome monitor,13-inch640-by-480 pixelRGBmonitor,and 15-inch 640-by-870 pixel portraitmonitor. 1/0 AppleDesktopBuswithtwo connectorsfor communication with keyboard,mouse,and otherdevicesoverlow-speed,synchronous serialbus; two RS-422 serialportswithsynchronousmodemsupporton one port; IWMport withtwo internalconnectors; SCSIport withone internalconnectorand one externalconnector; stereosoundport for externalaudioamplifieror earphones Expansionslots SixinternalNuBusslotsfor expansioncards Soundgenerator Four-voicestereoor monosoundwithdigital-to-analog conversionusingeither22.255KHzor 44.1KHzsamplerate Keyboards AppleStandardKeyboardor AppleExtendedKeyboard(Apple DesktopBus) Mouse AppleStandardMouse(AppleDesktopBus); mechanical/ opticalmechanismgeneratingeither100countsor 200countsper inchon eachaxisof travel 476 Guideto the MacintoshFamilyHardware Real-timeclock CMOScustomchip containing256bytesof parameterRAM; long-lifelithiumbatterybackup Powerrequirements Linevoltage:90to 140and 170to 270V (rms) Frequency:47 to 63 Hz Power:230W maximumfor peakload,not includingpowerfor monitoror otherexternalperipheraldevices Poweroutput 132W at maximumsustainableload • TableA-S Sizeand weightof the MacintoshII computer Weight Height Width Depth Mainunit 10.9to 11.8kg• 140mm 474mm 365mm (24to 26 lbs.) (5.51in.) (18.66in.) (14.37in.) AppleStandard 1.0kg 44.5mm 418.3mm 140.0mm Keyboard (2 lbs.4 oz.) (1.8 in.) (16.5in.) (5.5 in.) AppleExtended 1.6kg 56.4mm 486mm 188mm Keyboard (3 lbs. 10oz.) (2.22in.) (19.15in.) (7.4 in.) AppleStandard 0.17kg 27.9mm 53.3mm 96.5mm Mouse (6 oz.) (1.1 in.) (2.1 in.) (3.8 in.) Applehigh- 7.7 kg 255mm 310mm 373mm resolution (17 lbs.) (10.04in.) (12.2in.) (14.68in.) monochrome monitor Applehigh- 15.45kg 281mm 344mm 402mm resolution (34 lbs.) (11.06in.) (13.54in.) (15.83in.) RGBmonitor • Weightvariesdependingon installation of optionalharddiskdriveor second3.5-inchfloppydiskdrive. AppendixA MacintoshFamilyHardwareSpecifications 477 Environment Operatingtemperature 10°C to 35°C (50°F to 95°F) No componentinsidethe machineshouldget hotterthan 80%of the manufacturer's maximumwhenoperatingat the maximumtemperature. Storagetemperature -40° C to 47°C (-40°F to 116.6°F) Relativehumidity 20%to 95%(noncondensing) at 25°C (77°F) to 40°C (104°F) _Altitude Oto 3048m (0 to 10,000ft.) 478 Guideto the MacintoshFamilyHardware MacintoshIlx Processor MC68030, 32-bitinternalarchitecture,32-bitexternaldata bus, 32-bitexternaladdressbus Processorclock 15.6672MHz RAM 1 MBof systemRAM,expandableto 128MB, expandableto 2 GBin NuBuscards; 256bytesof parameterRAMin RTC; 2 KBof soundRAMin ASC; videoRAMand otherspecial-purpose RAMin NuBuscards ROM 256KB,expandableto 8 MB Coprocessor MC68882 floating-pointunit Memorymanagement Builtinto MC68030 processor Floppydisk drive One internal1440KBMacintoshFDHDdiskdrive; one optionalsecondinternalFDHDdiskdrive Harddisk drive One optionalinternal40 or 80 MBSCSIharddisk; externalSCSIconnectoracceptsa SCSIhard disk Videodisplay Separatevideodisplaymonitorconnectedto a NuBuscard. Appleoptionsincludea 12-inch640-by-480 pixelmonochrome monitor,13-inch640-by-480 pixelRGBmonitor,and 15-inch 640-by-870 pixelportraitmonitor. 1/0 AppleDesktopBuswithtwo connectorsfor communication with keyboard,mouse,and otherdevicesoverlow-speed,synchronous serialbus; twoRS-422 serialportswithsynchronous modemsupporton one port; SWIMport withtwo internalconnectors; SCSIportwithone internalconnectorand one.externalconnector; stereosoundport for externalaudioamplifieror earphones Expansionslots SixinternalNuBuslotsforexpansioncards Soundgenerator Four-voicestereoor monosoundwithdigital-to-analog conversionusingeither22.255KHzor 44.l KHzsamplerate Keyboards AppleStandardKeyboardor AppleExtendedKeyboard(Apple DesktopBus) Mouse AppleStandardMouse(AppleDesktopBus); mechanical/optical mechanismgeneratingeither100countsor 200countsper inchon eachaxisof travel Real-timeclock CMOScustomchip containing256bytesof parameterRAM; long-Hfe lithiumbatterybackup AppendixA MacintoshFamilyHardwareSpecifications 479 Powerrequirements Linevoltage:90 to 140and 170to 270V (rms) Frequency:47 to 63 Hz Power:230W maximumforpeakload,not includingpowerfor monitoror otherexternalperipheraldevices Poweroutput 132W at maximumsustainableload • TableA-6 Sizeand weightof the Macintosh Ilx computer Weight Height Width Depth Mainunit 10.9to 11.8kg• 140mm 474mm 365mm (24to 26lbs.) (5.51in.) (18.66in.) (14.37in.) AppleStandard 1.0kg 44.Smm 418.3mm 140.0mm Keyboard (2 lbs.4 oz.) (1.8 in.) (16.Sin.) (5.5 in.) AppleExtended 1.6kg 56.4mm 486mm 188mm Keyboard (3 lbs. 10oz.) (2.22in.) (19.15in.) (7.4 in.) AppleStandard 0.17kg 27.9mm 53.3mm 96.5mm Mouse (6 oz.) (1.1in.) (2.1 in.) (3.8 in.) Applehigh- 7.7 kg 255mm 310mm 373mm resolution (17 lbs.) (10.04in.) (12.2in.) (14.68in.) monochrome monitor Applehigh- 15.45kg 281mm 344mm 402mm resolution (34 lbs.) (11.06in.) (13.54in.) (15.83in.) RGBmonitor • Weightvariesdependingon installation of optionalharddiskdriveor secondFDHDdrive. Environment Operatingtemperature 10°C to 35°C (50°F to 95°F) No componentinsidethe machineshouldget hotterthan 800/4 of the manufacturer's maximumwhenoperatingat the maximumtemperature. Storagetemperature -40° C to 47°C (-40° F to 116.6°F) Relativehumidity 20%to 95%(noncondensing) at 25°C (77°F) to 40°C (104°F) Altitude Oto 3048m (0 to 10,000ft.) 480 G~ideto the MacintoshFamilyHardware MacintoshIlcx Processor MC68030, 32-bitinternalarchitecture,32-bitexternaldata bus, 32-bitexternaladdressbus Processorclock 15.6672MHz RAM 1 MBof systemRAM,expandableto 128MB, expandableto 2 GBin NuBuscards; 256bytesof parameterRAMin RTC; 2 KBof soundRAMin ASC; videoRAMand otherspecial-putpose RAMin NuBuscards ROM 256KB,expandableto 8 MB Coprocessor MC68882 floating-pointunit Memorymanagement Builtinto MC68030 processor Floppydisk drive One internal1440KBMacintosh FDHDdiskdrive; one optionalexternalFDHDdiskdrive Harddisk drive One optionalinternal40 or 80 MBSCSIharddisk; externalSCSIconnectoracceptsa SCSIhard disk Videodisplay Separatevideodisplaymonitorconnectedto a NuBuscard. Appleoptionsincludea 12-inch640-by-480 pixelmonochrome monitor,13-inch640-by-480 pixelRGBmonitor,and 15-inch 640-by-870 pixelportraitmonitor. 1/0 AppleDesktopBuswithtwo connectorsfor communication with keyboard,mouse,and otherdevicesoverlow-speed,synchronous serialbus; twoRS-422 serialportswithsynchronous modemsupporton one port; SWIM portwithone internalconnectorand one external connector; SCSIportwithone internalconnectorand one externalconnector; stereosoundportfor externalaudioamplifieror eaiphones Expansionslots ThreeinternalNuBuslotsforexpansioncards Soundgenerator Four-voicestereoor monosoundwithdigital-to-analog conversionusingeither22.255KHzor 44.1KHzsamplerate Keyboards AppleStandardKeyboardor AppleExtendedKeyboard(Apple DesktopBus) Mouse AppleStandardMouse(AppleDesktopBus); mechanical/optical mechanismgeneratingeither100countsor 200countsper inchon eachaxisof travel Real-timeclock CMOScustomchip containing256bytesof parameterRAM; long-lifelithiumbatterybackup AppendixA MacintoshFamilyHardwareSpecifications 481 Powerrequirements Linevoltage:90to 140and 170to 270V (rms) Frequency:47 to 63Hz Power:130W maximum forpeakload,not includingpowerfor monitoror otherexternalperipheraldevices Poweroutput 90W at maximum sustainable load • TableA-7 Sizeand weightof the Macintosh Ilcx computer W'dgbt Height Width Depth Mainunit 6.2kgt 140mm 302mm 365mm O3 lbs.10oz.) (5.51in.) (11.9in.) (14.4in.) AppleStandard 1.0kg 44.Smm 418.3mm 140.0mm Keyboard (2 lbs.4 oz.) (1.8in.) (16.Sin.) (5.5in.) AppleExtended 1.6kg 56.4mm 486mm 188mm Keyboard (3 lbs.10oz.) (2.22in.) (19.15in.) (7.4in.) AppleStandard 0.17kg 27.9mm 53.3mm 96.Smm Mouse (6 oz.) (1.1in.) (2.1in.) (3.8in.) Applehigh- 7.7kg 255mm 310mm 373mm resolution (17 lbs.) (10.04in.) (12.2in.) (14.68in.) monochrome monitor Applehigh- 15.45kg 281mm 344mm 402mm resolution (34lbs.) (11.06in.) (13.54in.) (15.83in.) RGBmonitor • Weightvariesdependingon installation of optionalharddiskdrive. Environment Operatingtemperature 10°Cto 35°C (50°F to 95°F) Nocomponentinsidethe machineshouldget hotterthan 80%of the manufacturer's maximum whenoperatingat the maximumtemperature. Storagetemperature --40°Cto 47°C (--40°F to 116.6°F) Relativehumidity 20%to 95%(noncondensing) at 25°C (77°F) to 40°C(104°F) Altitude Oto 3048m (0 to 10,000ft.) 482 •Guideto the Macintosh FamilyHardware MacintoshDci Processor MC68030, 32-bitinternalarchitecture,32-bitexternaldata bus, 32-bitexternaladdressbus Processorclock 25.00MHz RAM 1 MBof systemRAM,expandableto 128MB, expandableto 2 GBin NuBuscards; slot for optionalhigh-speedRAMcachecard; 256bytesof parameterRAMin RTC; 2 KBof soundRAMin ASC; videoRAMand otherspecial-purpose RAMin NuBuscards ROM 512KB,expandableto 8 MB Coprocessor MC68882 floating-pointunit Memorymanagement Builtinto MC68030 processor Floppydisk drive One internal1440KBMacintosh FDHDdiskdrive; one optionalexternalFDHDdiskdrive Harddisk drive Oneoptionalinternal40 or 80 MBSCSIharddisk; externalSCSIconnectoracceptsa SCSIhard disk Videodisplay Built-invideocircuitsfor connectinga separatevideodisplay monitor;Appleoptionsincludea 12-inch640-by-480 pixel monochromemonitor,13-inch640-by-480 pixelRGBmonitor, and 15-inch640-by-870 pixelportraitmonitor. Canalsouse a videomonitorconnectedto a NuBuscard. 1/0 AppleDesktopBuswithtwo connectorsfor communication with keyboard,mouse,and otherdevicesoverlow-speed,synchronous serialbus; twoRS-422 serialportswithsynchronous modemsupporton one port; SWIMportwithone internalconnectorand one externalconnector; SCSIportwithone internalconnectorand one externalconnector; stereosoundportfor externalaudioamplifieror earphones Expansionslots ThreeinternalNuBuslotsforexpansioncards Soundgenerator Four-voicestereoor monosoundwithdigital-to-analog conversionusingeither22.255KHzor 44.1KHzsamplerate Keyboards AppleStandardKeyboardor AppleExtendedKeyboard(Apple DesktopBus) Mouse AppleStandardMouse(AppleDesktopBus); mechanical/optical mechanismgeneratingeither100countsor 200countsper inchon eachaxisof travel AppendixA MacintoshFamilyHardwareSpecifications 483 Real-timeclock CMOScustomchipcontaining256bytesof parameterRAM; long-lifelithiumbatterybackup Powerrequirements Linevoltage:90to 140and 170to 270V (rms) Frequency: 47to 63Hz Power:130Wmaximumforpeakload,not includingpowerfor monitoror otherexternalperipheraldevices Poweroutput 90W at maximumsustainableload • TableA-8 Sizeand weightof the Macintosh Ilci computer Weight Belght Width Depth Mainunit 6.2k( 140mm 302mm 365mm 03 lbs.10oz.) (5.51in.) (11.9in.) (14.4in.) AppleStandard 1.0kg 44.5mm 418.3mm 140.0mm Keyboard (2 lbs.4 oz.) (1.8in.) (16.5in.) (5.5in.) AppleExtended 1.6kg 56.4mm 486mm 188mm Keyboard (3 lbs. 10oz.) (2.22in.) (19.15in.) (7.4in.) AppleStandard 0.17kg 27.9mm 53.3mm 96.5mm Mouse (6 oz.) (1.1in.) (2.1in.) (3.8in.) Applehigh- 7.7kg 255mm 310mm 373mm resolution (17lbs.) (10.04in.) (12.2in.) (14.68in.) monochrome monitor Applehigh- 15.45kg 281mm 344mm 402mm resolution (34 lbs.) (11.06in.) (13.54in.) (15.83in.) RGBmonitor "Weightvariesdependingon installation of optionalharddiskdrive. 484 Guideto the Macintosh FamilyHardware Environment Operating temperature 10° C to 35° C (50°F to 95° F) No componentinsidethe machineshouldget hotterthan 80%iof the manufacturer's maximumwhen operatingat the maximumtemperature. Storagetemperature -40° Cto 47° C (-40° F to 116.6°F) Relativehumidity 20%to 95%(noncondensing) at 25° C (77°F) to 40°C (104°F) Altitude 0 to 3048m (0 to 10,000ft.) AppendixA MacintoshFamilyHardwareSpecifications 485 MacintoshIffx Processor MC68030, 32-bitinternalarchitecture,32-bitexternaldata bus, 32-bitexternaladdressbus Processorclock 40.00MHz RAM 4 MBof systemRAM,expandableto 128MB, expandableto 2 GBin NuBuscards; 32 KBof fastRAMcache; 256bytesof parameterRAMin RTC; 2 KBof soundRAMin ASC; videoRAMand otherspecial-purpose RAMin NuBuscards ROM 512KB,expandableto 8 MB Coprocessor MC68882 floating-pointunit, clockspeed of 40.00MHz Memorymanagement Builtinto the MC68030 processor Floppydisk drive One internal1440KBMacintoshFDHDdiskdrive; one optionalsecondinternalFDHDdisk drive Hard disk drive One optionalinternal80 or 160MBSCSIharddisk; externalSCSIconnectoracceptsa SCSIhard disk Videodisplay Separatevideodisplaymonitorconnectedto a NuBuscard. Appleoptionsincludea 12-inch640-by-480 pixelmonochrome monitor,13-inch640-by-480 pixelRGBmonitor,and 15-inch 640-by-870 pixel portraitmonitor. I/0 AppleDesktopBuswith two connectorsfor communication with keyboard,mouse,and otherdevicesoverlow-speed,synchronous serialbus; I/O processorcontrollingtwo RS-422serialportswithsynchronous modemsupporton one port; 1/0 processorcontrollingSWIMport with two internalconnectors; SCSIport withone internalconnectorand one externalconnector; stereosoundport for externalaudioamplifieror earphones Expansionslots SixinternalNuBusslotsfor expansioncards; 68030processor-direct slot for expansioncard Soundgenerator Four-voicestereoor monosound withdigital-to-analog conversionusingeither22.255KHzor 44.1KHzsamplerate Keyboards AppleStandardKeyboardor AppleExtendedKeyboard(Apple DesktopBus) Mouse AppleStandardMouse(AppleDesktopBus); mechanical/ opticalmechanismgeneratingeither100countsor 200countsper inchon eachaxisof travel 486 Guideto the MacintoshFamilyHardware Real-timeclock CMOScustomchip containing256bytesof parameterRAM; long-lifelithiumbatterybackup Powerrequirements Linevoltage:100to 240V (rms) Frequency:48 to 62 Hz Power:230W maximumfor peak load,not includingpowerfor monitoror otherexternalperipheraldevices Poweroutput 90 W at maximumsustainableload • TableA-9 Sizeand weightof the MacintoshIlfx computer Weight Height Width Depth Mainunit 10.9to 11.8kg* 140mm 474mm 365mm (24to 26 lbs.) (5.51in.) (18.66in.) (14.37in.) AppleStandard 1.0kg 44.5mm 418.3mm 140.0mm Keyboard (2 lbs. 4 oz.) (1.8 in.) (16.5in.) (5.5 in.) AppleExtended 1.6kg 56.4mm 486mm 188mm Keyboard (3 lbs. 10 oz.) (2.22in.) (19.15in.) (7.4 in.) AppleStandard 0.17kg 27.9mm 53.3mm 96.5mm Mouse (6.0 oz.) (1.1 in.) (2.1 in.) (3.8 in.) Applehigh- 7.7 kg 255mm 310mm 373mm resolution (17 lbs.) (10.04in.) (12.2in.) (14.68in.) monochrome monitor Applehigh- 15.45kg 281mm 344mm 402mm resolution (34 lbs.) (11.06in.) (13.54in.) (15.83in.) RGBmonitor "Weightvariesdependingon installation of optionalharddiskdriveor secondFDHDdrive. AppendixA MacintoshFamilyHardwareSpecifications 487 Environment Operatingtemperature 10°C to 40°C (50°F to 95° F) No componentinsidethe machineshouldget hotterthan of the manufacturer's 800/4 maximumwhenoperatingat the maximumtemperature. Storagetemperature -40° C to 47° C (-40° F to 116.6°F) Relativehumidity 5%to 95%(noncondensing) at 25° C (77°F) to 40°C (104°F) Altitude Oto 3048m (0 to 10,000ft.) 488 Guideto the MacintoshFamilyHardware B Hardware-Related Appendix GlobalVariables TableB-1liststhe systemglobalvariablesthat relateto hardware components.Fora completelistof systemglobalvariables,see the InsideMacintoshX-Ref.Systemglobalvariablesare includedas equate (EQU)statementsin MacintoshProgrammer's Workshop(MPW) Assembly LanguagefilesnamedHardwareEqu.a and SysEqu.a.These • filesare locatedin a foldernamedAlncludes. TheMPWdevelopment system,whichincludesthe MPWAssembler and the Alncludesfolder,is availablefromAPDA.TheAlncludesfolderis also availableas a separateproductfromAPDA.Theaddressof APDAis given in the section"Howto GetMoreInformation," in the Preface. • • TableB-1 Hardware-related globalvariables Name Contents HWCfgFlags Hardwarecomponentsconnected IWM IWMbase address KbdLast ADBaddressof the keyboardlast used (byte) KbdType Keyboardtype of the keyboardlast used (byte) MemTop Addressof end of RAM PortBUse Currentavailability of serialport B (byte) RAMBase Trapdispatchtable'sbase addressfor routinesin RAM ROMBase Baseaddressof ROM ROM85 Versionnumberof ROM(word) SCCRd SCCread baseaddress SCCWr SCCwritebase address ScrHRes Pixelsper inchhorizontally(word) ScmBase Addressof mainscreenbuffer ScrVRes Pixelsper inchvertically(word) SdVolume Currentspeakervolume(byte:low-order3 bitsonly) SoundBase Pointerto free-formsynthesizerbuffer SoundLevel Amplitudein 740-bytebuffer(byte) SoundPtr Pointerto four-voicesound definitiontable SPPortA Modemport configuration(word) SPPortB Printerport configuration(word) SPVolCtl Speakervolumesettingin parameterRAM(byte) SysParam Low-memory copyof parameterRAM(20bytes) TimeSCCDB Numberof timesthe SCCcan be accessedper millisecond(word) TimeSCSIDB Numberof timesthe SCSIcan be accessedper millisecond (word) VIA VIAbase address 490 .Guideto the MacintoshFamilyHardware Glossary active:Seeasserted.Seealsoactivehigh, calledHochsprung MemoryManagement Unit activelow. (HMMU). It can be replacedby the optional PagedMemoryManagement Unit(PMMU), the activehigh:Saidof a signalthatis Truewhen MotorolaMC68851. the voltageon thatlinegoeshigh.Compare activelow. addressmap:Theassignmentof portionsof the addressspace of the computerto specific activelow:Saidof a signalthatis Truewhenthe devices.Seealsomemory-mappedevice voltageon thatlinegoeslow.Compareactive selection. high. addressmapping:Seeaddresstranslation. ADB:SeeAppleDesktopBus. addresspace:A rangeof accessiblememory. ADBtransceiver:A 4-bitmicroprocessor that, Seealsoaddressmap. in conjunctionwiththe mainprocessor,controls the ADBnetwork.In the MacintoshPortable,the addresstranslation:Theconversionof one set PowerManagerICalsofunctionsas the ADB of addressesinto another,correspondingset. For transceiver. example,softwaredesignedfor the classic Macintosh uses only24 bitsfor addresses address:A numberthat specifiesthe locationof whereasthe Macintosh II has a 32-bitaddress a bytein memory. bus; therefore,the Macintosh II converts(maps) addressbus:Theset of electricalwiresalong the 24-bitaddressescomingfromthe software whichaddressesare transmitted.Thewidthof into32-bitaddressesfor use by the hardware. the addressbus (numberof wires)determines Sameas addressmapping.Seealsoaddress how manyaddressescan be addresseddirectly map, memory-mapped deviceselection. by the mainprocessor.Forexample,the AMU:SeeAddressManagement Unit. Macintosh SEcomputerhas a 24-bitaddressbus and so has a 16MB(224) addressspace.The analogboard:In Macintosh modelsthat havea Macintosh II has a 32-bitaddressbus and so has built-invideomonitor,the printedcircuitboard a 16MB(224) addressspace.The Macintosh II that containsthe powersupplyand the video has a 32-bitaddressbus andso has a 4 GB(232) circuitry.Comparelogic board. addressspace.Comparecontrollines, data bus. AppleDesktopBus(ADB):A low-speedserial bus that connectsthe keyboard,mouse,and AddressManagement Unit(AMU):TheApple optionalinput devicesto the MacintoshSE, customintegratedcircuitin the Macintosh II MacintoshPortable,and MacintoshII-family that performs24-to-32bit addressmapping.Also computers. 491 AppleSoundChip(ASC): TheApplecustom blockdevice:A devicethat readsand writes soundICin all Macintosh modelsexceptthe blocksof bytesat a time.It can read or writeany classicMacintoshand the Macintosh SE.It accessibleblockon demand.A diskdriveis an generatesa stereoaudiosignalthat,in exampleof a blockdevice.Comparecharacter conjunctionwith othersoundcircuitry,drives device. the internalspeakeror an externalsoundjack. board:A printedcircuitboardthat is a built-in ASC:SeeAppleSoundChip. part of the computer.Comparecard. asserted:Indicatesthat a signalis True, Bob Balley Unit:SeeBBU. independentof whetherthat logicalconditionis cacheRAM:A smallamountof high-speedRAM representedby a highor lowvoltage.Sameas used as a bufferto makedata and instructions active.Oppositeof deasserted. availableto the mainprocessormorequickly asynchronous:Notsynchronized by a mutual thantheycan be readfromnormalRAM. timingsignalor clock.Comparesynchronous. cacheslot: A slot in the Macintosh Ilci for automaticvectoring:A modeof operationin installingan optionalcachecard. whichthe interruptvectoris basedon the levelof card:A removableprintedcircuitboardthat the interrupt,so that the mainprocessor plugsintoa connectorinsidethe computer. automatically jumpsto an interrupthandlerthat correspondsto the priorityof an interrupt. Cardsare used to expandthe capabilitiesof the computer,and are sometimesreferredto as auxiliaryprocessor:A processorthat expansioncards.Compareboard. communicates withthe mainprocessorat the levelof a device.An exampleis the Power characterdevice:A devicethatreadsor writesa ManagerICin the Macintosh Portable.Seealso stream of characters,one at a time.It can neither coprocessor,mainprocessor. skipcharactersnor go backto a previous character.A printeris an exampleof a character BBU:TheApplecustomIC in the Macintosh SE device.Compareblock device. that handlesRAM,video,and sound;selects devices;and performsother controlfunctions. classicMacintosh:A termencompassing the BBUstandsforBobBaileyUnit. originalMacintoshcomputer(128Kand 512K models),the Macintosh512Kenhanced,and the BIU2:The customIC that containsthe NuBus MacintoshPlus. transceiversin the Macintosh Ilfx computer.See alsoBIU30,NuBuscontroller. clockchip:Seereal-timeclock. BIU30:The customIC that controlsthe NuBus CLUfDAC:An ICin an expansionvideocardor interfacein the Macintosh Ilfx computer.See in the Macintosh Ilci that convertsdigitalvideo alsoBIU2,NuBuscontroller. dataintoanalogsignalsfor an externalvideo monitor.See also RBV. hlankioginterval:Seehorimntalblanking interval,verticalblankinginterval. controllines:Wiresthat carrystatusor control signals. block:Agroupregardedas a unit;usuallyrefers to data or memoryin whichdata is stored. 492 Guideto the MacintoshFamilyHardware coprocessor:A processorthat communicates device:(1) A componenton the Macintoshlogic directlywiththe mainprocessor,sharingits data board that can exchangeinformationwith the and addressbuses.An exampleis the MC68882 CPU.TheSerialCommunications Chipis an unit.Seealsomain processor, floating-point exampleof a device.(2)A peripheraldevice. auxiliaryprocessor. A printeris an exampleof a peripheraldevice. CPU:Centralprocessingunit.Seemain deviceaddressspace:A portionof address processor. spaceused for addressinginternaldevices.See alsoaddressmap,memory-mapped device CPUGLU: An ApplecustomICin the Macintosh selection. Portablecomputerthat selectsdevicesand performsother controlfunctions.See also digitalboard:Sameas logic board. generallogic unit. DMA:Directmemoryaccess.A techniquefor databus:Thewiresalongwhichgeneral transferringdata in or out of memorywithout information(all informationexceptfor memory usingthe CPU. addressesand controlsignals)is transmitted withinthe computer.The widerthe databus, the DRAM:Pronounced"dee-ram."Seedynamic more informationcan be transmittedat once. random-access memory. The Macintoshcomputersthat use the MC68000 dynamicbus sizing:A procedureby whichthe have 16-bitdata buses.The Macintosh MC68020 or MC68030 processordeterminesthe computersthat use the MC68020 and MC68030 bus size of a deviceand automatically performs have 32-bitdata buses.Compareaddressbus, as manybus cyclesas necessaryto transferdata. controllines. Forexample,to read a longword(32bits)from deasserted:Indicatesthat a signalis False, the SCSIchip-which has an 8-bitdata bus-the independentof whetherthat logicalconditionis processoruns foursuccessive8-bitread cycles. representedby a highor lowvoltage.Sameas dynamicrandom-access memory(DRAM): inactive.Oppositeof asserted. Random-access memorythat must be debounce:To conditionthe signalfroma periodicallyrefreshedto preventit fromlosing mechanicalswitch(suchas a pushbutton)so as the informationit contains.Seealsorandom- to removethe multipleconnectionsor accessmemory,staticrandom-access memory. disconnectionscommonlyproducedby such switches. exception:An erroror abnormalcondition declarationROM: A ROMon a NuBusexpansion detectedby the processorin the courseof card that containsinformationabout the card programexecution.Exceptionsincluderesets, and mayalso containcode or other data. bus errors,interrupts,and traps. deltaguide:A book that describesonlychanges exceptionevent:Seeexception. in a hardwaredeviceor softwareprogram.A exceptionvector:A locationin memory deltaguideis writtento supplementa book that containingthe startingaddressof the routine completelydescribesan earlierversionof a that takescontrolin the eventof a particular product. exception. Glossary 493 expansioncard:Seecard. group-coderecording(GCR):A methodof formattingdata in whicheach3 bytesare written expansionslot: Seeslot. as four8-bitpatternsconstructedso that no 5380:SeeSCSIchip. patterncontainsmorethan two consecutiveO's. Group-coderecordingis used in conjunction finite-statemachine:A blockof logic, withNRZIencodingto writedataon Apple3.5- implementedin hardwareor software,that can inchfloppydisksand HardDisk20 hard disks. assumea finitenumberof valuesor states,and Comparemodifiedfrequencymodulation. that makesa transitionfromone stateto anotherin a set sequencein responseto specific harddisk interleave:To placeconsecutive inputs.Foreachstate,a statemachinegenerates sectorsin noncontiguous locationson the a specificoutput,or assertsor deassertsa disk,alternatingwith othersectors.For •specificsignal. example,a 2:1 interleavemightincludesectors in the sequence1, 5, 2, 6, 3,...; whereasa 3:1 floating-pointunit (FPU):AnICthatprovides interleavemightincludesectorsin the sequence high-speedsupportfor extended-precision 1, 4, 7, 2, 5, 8, 3,... arithmetic.TheMotorolaMC68881 is used in the Macintosh II computer;the MC68882 is used in heap:Theareaof memoryin whichspaceis the MacintoshSE/30,MacintoshIIx, dynamically allocatedand releasedas neededby MacintoshIIcx, MacintoshIIci, and applications and the operatingsystem. MacintoshIlfx. high address: Theendingaddressof a blockof FPU:Seefloating-pointunit. codeor datain memory.Comparelow address. GB:Abbreviationfor gigabyte.A gigabyteis HMMU: SeeAddressManagementUnit. 1,024megabytes,or 1,073,741,824bytes. HochsprungMemoryManagement Unit GCR:Seegroupcode recording. (HMMU):SeeAddressManagementUnit. generallogic unit (GUJ):A generictermforan horizontalblankinginterval:Thetime ApplecustomICusedto performseveralcontrol betweenthe displayof the rightmostpixelon functions.See also BBU,CPUGLU,GLUE, one lineand the leftmostpixelon the nextline. MDU,MiscellaneousGLU,RBV. Sameas horizontalretracetime.Compare verticalblankinginterval. genlock:In a devicethatproducesa video displaysignal,the processof synchronizing its horizontalretracetime:Seehorizontal outputwitha videosignalproducedby some blankinginterval. other device. inactive:Sameas deasserted. GLU:Seegenerallogic unit. initiali7.e:To bringto someknownstate,usually GLUE: TheApplecustomICin the whena systemis startedup or reset. MacintoshSE/30,MacintoshII, MacintoshIlx, and MacintoshHexcomputersthat selects devicesand performsother controlfunctions. Seealsogenerallogic unit. 494 G4ideto the MacintoshFamilyHardware IntegratedWoz Machine(IWM): The custom logic board:A circuitboardthat holdsthe CPU, IC that controlsthe floppydiskdrivesin the RAM,ROM,and other integratedcircuitsthat MacintoshPlusand Macintosh II computersand performthe built-inlogicfunctionsof the in MacintoshSEcomputersmanufacturedbefore computer.Compareanalogboard,card. September1989. longword:In MC68000 terminology(including interleave:To alternatebetweentwo or more the MC68020 and MC68030), a longword distincteventsor entities.Seealso harddisk comprisestwo 16-bitwords. interleave,video interleave. low address:Thestartingaddressof a blockof interrupt:An exceptionthatis signaledto the codeor datain memory.Comparehigh processorby a deviceto notifythe processorof address. a changein conditionof the device,suchas the mainlogic board:Sameas logic board. completionof an VOrequest. main processor:The microprocessor that interrupthandler:Theroutinethatgetscontrol executesprogramcode;the centralprocessing in the eventof an interrupt. unit.SeeMC68000,MC68HC000,MC68020, interruptprioritylevel:A numberthat MC68o30. indicatesthe importanceof an interrupt.If the main systemunit:In a modularcomputersuch prioritylevelof an interruptis higherthanthe as the MacintoshII, the modulethat containsthe currentprocessorpriority,the exception logicboard,the expansionslots,the power processingsequenceis started. supply,and the built-indiskdrives. interruptvector:An exceptionvectorfor an interrupt. manager:A type of routinefoundin the MacintoshOperatingSystemor Toolbox.Some I0P: See 1/0 Processor. managers-suchas the SCSIManagerand the ADBManager-controlthe exchangeof 1/0 Processor(IOP):AnApplecustomIC. informationbetweena Macintoshand peripheral In the Macintosh IIfx,one IOPcontrolsthe devices. SCCand anothercontrol~the SWIMand the ADBinterface. . MB: Abbreviation for megabyte;1,024 kilobytes,or 1,048,576bytes. IWM:SeeIntegratedWoz Machine. Mblt:Abbreviationfor m~gabit;1,024kilobits, KB:Abbreviation for kilobyte;1024bytes. or 1,048,576bits. Kblt:Abbreviationfor kilobit;1024bits. MC68000:Theintegratedcircuitused as the logicaladdress:An addressusedby software. mainprocessorin the MacintoshSE,Macintosh Thelogicaladdressmaybe translatedintoa Plus,and earlierMacintoshcomputers. physicaladdressby the memorymanagement MC68000PDS:Theprocessor-direct slotin the unit. MacintoshSEand MacintoshPortable computers.Seealsoprocessor-directslot Glossary 495 MC68HC000:Theintegratedcircuitused as the memory-mapped devicesdection:The mainprocessorin the MacintoshPortable selectionof devicesand expansioncardsby computer. addressingspecificlocationsin the computer's addressspace.Portionsof the computer's MC68020:Theintegratedcircuitusedas the addressspaceare assignedto RAMand ROMand mainprocessorin the Macintosh II computer. the rest of the addressspaceis dividedamong MC68030:Theintegratedcircuitusedas the variousdevicessuchas 1/0 interfacesand mainprocessorin the MacintoshSE/30, expansionslots.Whenthe CPUputsan address MacintoshIIx, MacintoshIlcx, MacintoshIlci, on the addressbus, logiccircuitsin the computer and MacintoshIlfx computers. decodethat addressto determinewhichdevice to activateand what functionthat deviceis to MC68030PDS:Theprocessor-direct slotin the perform.The logiccircuitsthen assertselectand · MacintoshSE/30and the Macintosh IIfx.See controlsignalsto that deviceas appropriate.See alsoprocessor-direct slot. alsoslot space. MC688S1:Theintegratedcircuitusedas the MFM: See modifiedfrequencymodulation. optionalPagedMemoryManagement Unit (PMMU) in the Macintosh II computer. MichaelDhueyUnit:See MDU. MC68881:Theintegratedcircuitusedas the MiscellaneousGLU: AnApplecustomICin the floating-point unit (FPU)in the Macintosh II MacintoshPortablecomputerthat selects computer. devicesand performsothercontrolfunctions. Seealsogenerallogic unit. MC68882:Theintegratedcircuitusedas the floating-point unit (FPU)in the Macintosh IIx, modifiedfrequencymodulation(MFM): A MacintoshIIcx, MacintoshIIci, and methodof recordingdata onto magneticmedia MacintoshIlfx computers. suchas floppydisks.MFMencodingcan be used to writedata on high-densitydisks.Compare MDU(MemoryDecodeUnit):An Apple group-coderecording. customIC in the MacintoshIlci that selects devicesand performsother controlfunctions. motherboard: Sameas logicboard. Seealsogenerallogicunit. mouse scaling:An operating-system option MemoryDecodeUnit:See MDU. that increasesthe screenpointermovementas the mouseis movedfaster. memorymanagementunit (MMU): Ageneric termfor the componenthat performsaddress multiplex:To encodeinformationso that a mappingin a Macintoshcomputer.In the singleset of wirescan carrydifferentsets of Macintosh II, it is eitherthe Address informationor differentkinds of information. Management Unit(AMU) or the PagedMemory NCR5380:The integratedcircuitchip used to Management Unit(PMMU). TheMMUfunctionis implementhe SmallComputerSystemInterface builtintothe MC68030, the mainprocessorin (SCSI)in Macintoshcomputers.SeealsoSmall manyMacintoshmodels. ComputerSystemInterface. memorymap:Seeaddressmap. 496 ~uide to the MacintoshFamilyHardware NRZIencoding:A methodof encodingdata in ORoperation: A logicaloperationin whichan whicha 1 is writtenas a transitionanda Ois outputsignalis assertedif one or moreof the writtenas no transition.NRZIstandsfor inputsignalsare asserted. nonretumtozero,inverted. Seealsogroup-code overlay:SeeROMoverlay,videooverlay. recording. overlaybit:A bit in DataregisterA in the VIA NuBus:The32-bitwidesynchronous bus used (orVIAlin machineswithtwoVIAs)that,when for expansioncardsin the Macintosh II familyof set to 1, causesa signalthat invokesthe ROM computers.SeealsoNuBuscontroller,NuBus overlay. expansionslot. PagedMemoryManagementUnit (PMMU): NuBuscontroller:An ICthatcontrolsthe TheMotorolaMC68851 chip,used in the NuBusinterface.SeealsoNuChip,NuChip30, Macintosh II computerto performlogical-to- BIU30. physicaladdresstranslationand pagedmemory NuBusexpansionslot: A connectorattached managementfor virtual-memory operating to the NuBusin the Macintosh II family,into systemsuchas A/UX. ThePMMU canbe installed whichan expansioncardcanbe installed. as an option,replacingtheAMU.ThePMMU can alsoperform24-to-32bit addressmappingto NuChip:ThecustomICthat controlsthe NuBus emulatethe AMU.Seealsopagetable,virtual interfacein the Macintosh II, Macintosh IIx, and memory. Macintosh IIcxcomputers.See alsoNuBus controller. pagetable:A tableusedby the PMMU that relateslogicaladdressesto the actualphysical NuChip30: ThecustomICthatcontrolsthe locationsof blocksof data to supportvirtual- NuBusinterfacein the Macintosh IIci computer. memoryoperatingsystems. SeealsoNuBuscontroller. PAL:An integratedcircuitimplementing open-collectorsignal:A signaldrivenby an programmable arraylogic. outputdevicethat can drivethe linelow(about zerovolts),but cannotdrivethe linehigh(about parameterRAM: A smallrandom-access memory +5volts).Whenthe devicestopsdrivingthe line in whichcertainsystemparametersand Control low,the devicegoesintoa high-impedance state Panelsettingsare stored.ParameterRAMis and a resistor,connectedbetween+5voltsand poweredby a batterywhenthe systemis off, theline,pullsthelineup to a highlevel(near thus preservingthe information. +5volts).Thisarrangement allowsmorethanone deviceto drivethe samesignaline,becausethe p~ty: A processof errordetectionusingan inactivedevicesare essentiallydisconnected extrabit for eachbytestoredin RAM(or sent fromthe line. through a serialport)in suchas wayas to detect wheneverthe valueread(or received)is not the operatingsystem:Thelowest-level softwarein sameas the valuestored(or sent). the Macintosh. It does basictaskssuchas 1/0, memorymanagement, and interrupthandling. paritybit:An extrabit appendedto a byteof memoryand usedfor errordetection.Seeparity. PDS:See processor-direct slot. Glossary 497 peripheraldevice:A pieceof external programmer's switch:An optionalpairof equipmenthat can transferinformationinto or buttonsthat can be installedon a Macintosh out of the computer.A diskdriveis an example computer.One buttonassertsa nonmaskable of a peripheraldevice.Comparedevice. interrupto the CPUand one buttonassertsa Resetsignalto the CPUand otherchips. physicaladdress:An addressrepresentedby bitson a physicaladdressbus,suchas the pseudo-slotvideo:Thetechniqueused in the MC68020 processorbus.Thephysicaladdress MacintoshSE/30and MacintoshIlci to enable maybe differentfromthe logicaladdressused softwareto addressbuilt-invideocircuitrythe by software,in whichcaseth~memory samewayit addressesa videoexpansioncardin managementunit translatesthe logicaladdress a slot. into a physicaladdress. pulse-width-modulated signal:A rectangular- . port:(1) A connectoron the backpanelof the wavesignalin whichthewidthof eachpulseis computerwhereyoucanplugin a cableto proportionalto the valueof a byte of data. connecta peripheraldevice,anothercomputer, or a network.(2)An interfacethroughwhichdata PWM: Seepulse-width-modulated signal. entersor exitsan internaldeviceor a peripheral RAM: See random-access memory. device. RAM-Based Videocontroller:SeeRBV. PowerManager: A set of routinesin the ROMof the MacintoshPortablecomputerthat controls random-access memory(RAM): Memory the PowerManagerICand thatdetermineswhen whosecontentscan be changed;read-write to put the MacintoshPortableinto the sleep memory.TheRAMin a Macintosh computeris state. used for exceptionvectors,buffersused by hardwaredevices,the systemand application PowerManagerIC:A single-chipmicro- heaps,the stack,and other informationused by processor(Mitsubishi 50753)in the Macintosh applications. Seealsodynamicrandom-access Portablecomputerthat directsthe power- memory,staticrandom-access memory. controlcircuitsand servesas the real-timeclock (RTC)and ADBtransceiver. ComparePower RBV(RAM-Based Videocontroller):An Apple Manager. customIC in the Macintosh Ilci that readsand formatsvideodata and controlsthe videoCLUT powersupply:A circuithat drawselectrical DAC.SeealsoCUITDAC. powerfroma poweroutletand convertsit to the kindof powerthe computercan use. RCnetwork:A resistorand a capacitor connectedso as to functionas a frequency- processor-direct slot: A typeof expansionslot dependentfilter. that providesunbufferedaccessto the main processor.SeeMC68000 PDS,MC68030 PDS. read-onlymemory(ROM): Memorywhose contentsare permanent.The Macintosh programcounter:A registerin the CPUthat . computer'sROMcontainsroutinesfor the containsa pointerto the memorylocationof the toolboxand operatingsystem;the ROMalso next instructionto be executed. containsthe varioussystemtraps. 498 Guideto the MacintoshFamilyHardware real-timeclock (RTC):A chip that keepstrack secport B:The printerport.SeealsoSerial of the currenttimeand date and that contains CommunicationsController. parameterRAM.The real-timeclockis powered by a batterywhen the systemis off,thus screenbuffer:An areaof memoryfromwhich preservingthe information. the videocircuitryreads informationto createa screendisplay. reset:In the Macintosh,a resetis the highest SCSI:Pronounced"skuzzy."SeeSmall levelof exception.The systemgeneratesa reset ComputerSystemInterface. by assertingthe /RESET signalto the CPU.The /RESET signalis assertedwheneverthe machine SCSIchip:TheNCR53C80or NCR5380chip is turnedon or resetby pressingthe resetbutton used in Macintoshcomputersto implementhe on the programmer's switch.SeealsoReset SmallComputerSystemInterface(SCSI). handler,Reset,vector. SCSIdevices:Devices,such as hard disksand Resethandler:The ROMroutineexecutedby tape backupunits,that use the SmallComputer the CPUaftera reset.SeealsoResetvector. SystemInterface. Resetvector:An exceptionvectorpointingto sector:A unit of diskspace composedof 512 the Resethandler. consecutivebytes of standardinformationand retracetime:Seehorizontalblanking 12 bytesof file tags. interval,verticalblankinginterval. SerialCommunications Controller(SCC): rms:Abbreviation for rootmeansquare.The The integratedcircuit(Zilog28530)that handles squareroot of the meanof the squaresof a set of serial1/0 throughthe modemand printerports. values.The rmsvalueof a sinusoidalalternating- SIMM: SeeSingleIn-lineMemoryModule. currentvoltageequals0.707timesthe maximum valueof the voltage. SingleIn-lineMemoryModule(SIMM): A smallprintedcircuitboardthat can be plugged RobertBaileyVideo:See RBV. into a socketon the logicboardto expandthe ROM:Seeread-onlymemory. size of RAMor ROM.ManyMacintoshmodelsuse SIMMsfor RAMexpansion;the MacintoshIlx, ROMoverlay:Addressremapping,used at MacintoshHex, MacintoshIlci, and systemstartup,that createsan addressmap with MacintoshIlfx also use SIMMsfor ROM ROMat the lowestaddressesin the computer's expansion. addressspace.Aftersystemstartup,ROMis remappedto addressesabovethose used for 60.15Hz interrupt:In the MacintoshII-family RAM. computers,a periodicinterruptthat simulates the verticalblankinginterruptfoundin the RTC:See real-timeclock. MacintoshSEand earliermodels.It is used for general-purpose timingbut is not realtedto the SCC:SeeSerialCommunications Controller. SLOTinterruptgeneratedin the MacintoshIlci secportA: Themodemport.SeealsoSerial or on an expansionvideocard. CommunicationsController. 6522:SeeVersatileInterfaceAdapter. Glossary 499 sleep state:In the MacintoshPortable standardslot space:The addressspacefrom computer,a non-operational state that uses $F100000through$FFFFFFFin the negligiblepower,corresponding to the power- MacintoshSE/30computerand in MacintoshII- off state in other machines. familycomputers.In MacintoshII-family computers,16MBof addressspacewithinthis slot:A connectorintowhicha cardcan be rangeis assignedto eachNuBuslot.In the installedto expandthe capabilitiesof a MacintoshSE/30and MacintoshIIfx computers, computer.Seecache slot, NuBusexpansion a PDScardthatemulatesa NuBuscardresponds slot, processor-directslot. to an addressin thisrange.Seealsosuperslot SLOTinterropt:An interruptgeneratedat the space. beginningof the verticalblankingintervalby the statemachine:Seefinite-statemachine. built-invideocircuitsin the MacintoshIIcior by a Macintosh II VideoCard.Seealso60.15Hz staticrandom-access memory(SIAM):A ·interrupt,verticalblankinginterrupt. type of random-access memorythat retainsdata as longas poweris on withouthe necessityfor slot space:The addressspaceassignedto refreshing.Seedynamicrandom-access NuBusslots in Macintosh II-familycomputers memory,random-access memory. and to expansioncardsthat emulateNuBuscards in the Macintosh SE/30and Macintosh IIfx superslot space:The addressspacefrom computers.Seealsomemory-mapped device $60000000through$EFFFFFFin the selection,standardslot space,superslot Macintosh SE/30computerand in MacintoshII- space. familycomputers.In MacintoshII-family computers,256MBof addressspacewithinthis SmallComputerSystemInterface(SCSI):An rangeis assignedto eachNuBusslot.In the industrystandardhigh-speedparallelbus that MacintoshSE/30and MacintoshIIfx computers, providesa methodof connectingsmall a PDScardthatemulatesa NuBuscardresponds computerswithintelligentperipheralsuchas to an addressin thisrange.Seealsostandard hard disks,printers,and opticaldisks.Seealso slot space. NCR5380. supervisorstackpointer:A registerin the CPU Sonysoundchip:The chipthatdrivesthe that indicatesthe next byte on the systemstack internalspeakeror externalsoundjackin whenthe processoris in supervisormode. Macintoshcomputers.The Sonysoundchip acceptsPWMand volume-control signalsfrom SuperWozIntegratedMachine(SWIM): The the soundcircuitryin the computerand converts customICthat controlsthe FDHDdrives.It can themto analogsoundat the specifiedvolume. readand write400KBand 800KBGCR-format disksand 1.4MBMFM-format disks. soundbuffer:An areaof memoryfromwhich the soundcircuitryreadsdatato createa sound SWIM: SeeSuperWozIntegratedMachine. signal. synchronous:Operationsor data transmission synchronized by a mutualtimingsignalor clock. SRAM: Pronounced"ess-ram."Seestatic In a synchronousystem,a constantimeinterval random-access memory. existsbetweensuccessiveventsexecutedby differentdevices.Compareasynchronous. 500 Guideto the MacintoshFamilyHardware synchronousmodem:A modemthatprovides VersatileInterfaceAdapter(VIA):TheIC two clocksfor synchronouscommunication with (6522)that handlesmostof the Macintosh its host computer-one clockfor sendingdata computer's1/0 and interrupts.The fromthe host computerto the modem,and a MacintoshSE/30,MacintoshII, MacintoshIlx, secondclockfor sendingdata fromthe modem and Macintosh Hexhavetwo VIAs.SomeVIA to the host computer. functionsare performedby the RBVin the Macintosh Ilci and by the OSSin the systemstartupinformation:Configurable MacintoshIlfx. systemparametersthat are storedin the firsttwo logicalblocksof a volumeand are readin at verticalblankinginteffllpt:In the systemstartup. Macintosh SEand earliermodels,an interrupt generatedby the VIAat the beginningof the timingout:The conditionthat occurswhena verticalblankinginterval.In the Macintosh II process,suchas, a datatransferover.theSCSI family,the equivalentinterruptis the 60.lS Hz bus,takeslongerthana presetlimit.Whena intermptgeneratedby the VIALThebuilt-in processtimesout, it is normallyterminatedand a videocircuitsin the Macintosh Ilci and on an bus erroror othererrorconditionmayresult. expansionvideooperateindependentlyof this trap:An exceptioncausedby recognitionof interrupt.SeealsoSLOTintermpt. abnormalconditionsduringinstruction verticalblankinginterval:The timebetween execution(suchas an attempto executean the displayof the rightmostpixelon the lastline unimplemented instruction)or fromuse of an of the screenand the leftmostpixelon the first instructionthat normallycausesan exception. lineof the screen.Sameas verticalretracetime. trapdispatcher:Thepartof the Macintosh Seealsoverticalblankinginteffllpt.Compare OperatingSystemthat examinesthe instruction horizontalblankinginterval. that causeda trap in orderto determinewhat verticalretracetime:Seeverticalhlaoldog operationit standsfor,looksup the addressof interval. the corresponding routinein the trap dispatch table,and jumpsto that routine. VIA:SeeVersatileInterfaceAdapter. trapdispatchtable:A tablein RAMcontaining video interleave:In Macintoshcomputerswith the addressesof all MacintoshToolboxand built-invideo,the alternationof the CPU'sRAM OperatingSystemroutinesin encodedform. accesscycleswithvideocircuitry'sRAMaccess cycles. unimplementedinstruction:An instruction wordthat doesn'tcorrespondto any valid vicko overlay:The abilityof a devicethat machine-language instruction.The attemptto producesa videodisplaysignalto acceptthe executean unimplemented instructioncausesa videosignalfromsomeotherdeviceand trap. combinethe signalsso as to superimpose additionalimagesonto the display. VBL:Seeverticalblankingintermpt,vertical blaoldoginterval. Glossary S01 videoRAM(VRAM):A type of dual-ported RAMthat supportsconventionalreadingand writingas wellas havingbuilt-inshiftregisters that providerapid bit-streamoutput;used in mostvideoexpansioncards. virtualmemory:A memorymanagement schemein whichthe fullrangeof addressspace usedfor memoryis not necessarily implemented in RAM. Thelogicaladdressusedby softwareis translatedby a memorymanagement chip(such as the PMMU) intoa physicaladdress;if the blockof data referredto by the logicaladdressis · not currentlyin RAM,the operatingsystemreads the blockof data into RAMbeforeaccessingthe data.SeealsoPagedMemoryManagement Unit, pagetable. VRAM: SeevideoRAM. Pronounced"vee-ram." word:(1) Forthe MC68000 familyof micro- processors(includingthe MC68020 and MC68030), 2 bytes(16 bits).(2) Forthe NuBus, 4 bytes(32 bits). Z8S30:SeeSerialf.ommunications Controller. 502 Guideto the MacintoshFamilyHardware Index I AVECsignal98 68000processor-direct slot(PDS)(continued) /DSACK signal97,131,138 in the MacintoshPortable451-453 IDSsignal97 in the MacintoshSE 448-451 /DTACK signal90 typesof cards 445 in the MacintoshPlus 122 68030processor-direct slot(PDS)454-461 in the MacintoshPortable 128 clocksignals454 in the MacintosJtSE 126 commonsignals 459 /ENBLlsignal 161,170,337,347 compatibility454 /EXT.DTACK signal 126 connector 456 /!PLOinterrupt118 in the MacintoshSE/30 134 /!PLO, /IPLl,/IPL2signals91 in the MacintoshIlfx 461 /IDSsignal34,90 machine-specific signals 459-461 /MODEM.BUSY signal374 signals455-461 /MODEM.PWR signal 374 68851.SeePagedMemoryManagementUnit /PFWsignal 270 68881.Seemathematicscoprocessor /POWEROFF signal 270 68882.Seemathematicscoprocessor /POWERON signal 270 800KBdriveinterface332-343 IUDSsignal34,90 circuitdiagrams339-341 /VPAsignal90,91 connectors334-338 in the MacintoshPlus 122 800KBdriveinterfaceIC.See!WM in the Macintosh SE 126 800KBfloppydiskdrive 330-338 /W/REQA signal 16o,163,169 8530.Seesec /W/REQB signal 160,163,169 1010instructions103 A 1111instructions97,103 AOaddresssignal34,90 24-bitaddresses45,64,131,136 abbreviationsxxxii 24-to-32bitaddresstranslation45,46,131,136 abnormalconditionsof the powersupply 265 controlling175 absolute-positiondevices 277 32-bitaddresses45,131,136 ADB(AppleDesktopBus) 75-77,289-326.Seealsoentries 400KBfloppydiskdrive thatfollow compatibility342 communications312-320· speed-control signal 342,430,436 shiftingdatathroughthe VIA182 50753.SeePowerManagerIC statebits 169,173 5380SCSIcontrollerIC 377,392 componentsof 289 60.15Hzinterrupt170,174,177,178 differenceson the MacintoshPortable296--299, to providecompatibility172 303-304,310-311 not synchronouswithscreenblanking400 differenceson the Macintosh Ilfx 289 6522.SeeVIA interface291-296,298-299 68o00processor-direct slot(PDS)445-453 interrupts99,102,169,173 clocksignals445 overview289 connector 446 patentlicensefor 287 ADB.CLOCK line 177 ADBtransceiver IC 289,292,312,315 ADBcommands313,315-316 in keyboards307,309 compatibility316 addresslineAO34,90 componentsof 315 AddressManagement Unit(AMU)27,34, 105.Seealso executionof 314 memorymanagementunit; PMMU Flushcommand 316 addressmaps 34-46,120-143 Listencommand 316 in the Macintosh512K36,122-125 reserved316 in the MacintoshPlus 37,122 SendResetcommand 316 in the MacintoshPortable39, 128-130 Talkcommand 316 in the MacintoshSE 38, 125-126 ADBconnector291 in the MacintoshSFJ3041,130-135 pinouts 291 in the MacintoshII 42, 135-140 signals291 in the MacintoshIIci 43, 141 ADB.DATAline 177 in the MacintoshIIcx 42, 135-140 ADBdevices320-326 in the MacintoshIIfx 44, 141-143 activator325 in the MacintoshIlx 42, 135-140 collisiondetection324-325 NuBuscards 139 componentsof 320 reading35, 121 deviceaddress322,323 ROMoverlay120,122,125,128,131,136 DeviceHandlerID 323-324 shadedareasin 121 · changingfor Optionand Control309 simplified36-44 for mouse 302 addresssignalAO34,90 obtaining287 addresstranslation, 24-to-32 bit 40,45-46,64 reserved323-324 AMU(AddressManagement Unit) 27,34, 105.Seealso fortrackball304 memorymanagementunit; PMMU unrecognized324 APDAxxxvi devicemode 323 appearance6 devicetable 323 of the Macintosh128K,512K,512Kenhanced 6-7 numberof 289,295 of the Macintosh Portable12-13 polling312,318,325-326 of the Macintosh Plus 8 powerfor 295 of the Macintosh SE 8 registers312,320,321 of the Macintosh SE/308 signals312 of the Macintosh II 14-15 unplugging290 of the Macintosh Ilci 16-17 ADBkeyboards300,305-311 of the Macintosh Ilcx 16-17 ADBtransceiver in 307,309 of the Macintosh IIfx 14-15 AppleExtendedKeyboard308-310 of the Macintosh Ilx 14-15 AppleStandardKeyboard305-307 AppleDesktopBus.Seeentriesat ADB Macintosh Portablekeyboard296,297,310-311 AppleDeveloperProgramsxxxvii ADBManager312,314 Appledeveloperservicesxxxvii ADBmouse 300-303 Apple800KBfloppydiskdrive 330-338 ADBtransceiver in 303 AppleExtendedKeyboard308-310 ADBperipheraldevices.SeeADBdevices ADBtransceiver309,310 ADBsignals312 functionkeys 308 Attentionsignal317 Keyboardregisters309 GlobalResetsignal317 keycodereassignments309 ServiceRequestsignal318,325 AppleFDHDdrive 330-331,343-349 Syncsignal317 Apple400KBfloppydiskdrive ADBSresource323 compatibility342 speed-control signal342,430,436 504 Guideto the MacintoshFamilyHardware AppleSoundChip.SeeASC blockdiagrams49-60 AppleStandardKeyboard305-307 of the Macintosh128K,512K,and 512Kenhanced 50 ADBtransceiver307 of the Macintosh Plus 51 keyboardmicroprocessor305 of the MacintoshPortable54 keycodereassignments306 of the Macintosh SE 52 transitioncodes 306 of the MacintoshSE/3053 AppleStandardMouse 300-303 of the Macintosh II 56 ADBtransceiverin 303 of the Macintosh Ilci 58 AppleTalk82 of the Macintosh Ilcx 57 Appleusergroups xxxvi of the MacintoshIlfx 59 architectureof Macintoshcomputers47--85 of the MacintoshIlx 57 ASC(AppleSoundChip) 72,436 board,definitionxxxiii interrupts95,99,102,179 booksaboutMacintoshcomputersxxxv ASCsoundsystem72,436-441 boot.Seestartup,system circuitdiagrams , 439 buffers compatibilitywithPWM431,438,439 databus 60 componentsof 436 fast/slow61 externalsoundjack 438 videodatabus 60 four-voicesynthesis437 built-invideocircuits internalspeaker 438 in the Macintosh Plusand Macintosh SE 401-402 samplerate 438 in the MacintoshSE/30114,409-410 samplinginterval437 in the Macintoshlid 117,410-421 single-voicemode 437 built-invideodisplay399-403,409-421 soundbuffers436 addressgeneration413 soundmodes 436,437 circuitsfor 401-402 stereosound 437,438 colorlook-uptable(CLUT)418 twostereochannels438 pseudo-slotaddressing409-410 unlikethe PWMsoundsystem437 timingspecifications415 volumecontrol 438 videosignals418 Attentionsignal317 audio. Seesound C automaticvectoring63,91,98. Seealsointerrupts cachecard in the Macintosh Ilci 223-228 A/UX27,45,64,106 controlling175 AuxiliaryControlregister(in VIA)179-181 cache RAM auxiliaryprocessors 104-110 in the Macintosh Ilci 223-228 AMU27,34,105 in the Macintosh Ilfx 228-231 IOPs 109-110 card,definitionxxxiii mathematicscoprocessors107-108 CASsignal210 PMMU27,34,105-106 centralprocessingunit. SeeCPiJ PowerManagerIC 108 cir~it diagrams IAVECsignal98 ADBinterface293-295,299 AOaddresssignal34,90 800KB driveinterface339-341 FDHDdriveinterface351-355 B keyboard,in the MacintoshPlus 281 battery,in the MacintoshPortable modeminterface,in the MacintoshPortable 372 charging266,267 mouse,in the MacintoshPlus 279 monitor 267 powercircuit,in the Macintosh II family272 BatteryMonitor routine 268 SCSIport 3~391 BBU112-113 serial1/0 interface365-370 bitsper pixel 411 soundcircuits432-435,440-441 Index 505 clocksignal,in the ADB176 componentoverviews(continued) CLUT(colorlook-uptable) 406,418 SCSI78-79 collisiondetection,AppleDesktopBus 324-325 SonysoundIC 71,7-2 colorlook-uptable(CLUT)406,418 summaryof Macintoshfeatures 2-3 ColorQuickDraw406 SWIM80-81 colorvideosignals406 VIA 7~77 Column Address Strobe(CAS) signal210 video69-71 commands,AppleDesktopBus 313,315-316 videoRAM66 compatibility316 configurationROM.SeedeclarationROM componentsof 315 connectors executionof 314 AppleDesktopBus 291,297 Flushcommand 316 on backof the Macintosh128K,512K, Listencommand 316 512Kenhanced 7 reserved316 on backof the MacintoshPlus 8 SendResetcommand 316 on backof the MacintoshPortable 13 Talkcommand 316 on backof the MacintoshII 15 communications, AppleDesktopBus 312-320 on backof the MacintoshIIci 17 comparisonof Macintoshcomputers 4-6 on backof the MacintoshIIcx 17 compatibility issues on backof the MacintoshIIx 15 ADBhardware296 cachecard connectorin the MacintoshIIci 225-228 ADBreservedcommands316 800KBfloppydiskdrive 334-341 ASCand PWMsoundsystems431,438,439 expansionvideocard 407-408 400KBdrivewithIWM 342 externalvideo,on the MacintoshPortable 423-424 400KBdrivewithSWIM356 FDHDdrive 345-350 HardDisk20withIWM 342-343 keyboard280,291,297 HardDisk20withSWIM356 MacintoshII VideoCard 407-408 IOPand sec110,364 8-pin,forserialport 359-360 miniature keyboardwithapplications300 mouse(non-ADB)278 mousewithapplications300,302 NuBusexpansionslot 463-465 68000PDS,versionsof 446 power 246-251 68030PDS,versionsof 454 SCSIport 379-384 componentoverviews serialport 359-360 ADBinIOP 76 68000PDS446-447 ADBin PowerManagerIC 76 68030PDS455-458 ADBtransceiver75 sound 429,438 ASC72 ControlPanel 77 CPU61 coprocessor(1111)instructions97 diskdrives81 coprocessors,mathematics63, 107-108.Seealsoauxiliary generalogiccircuits65 processors internal 18-33 CPU61-63,89-104.SeealsoMC68000; MC68020; MC68030; IOP 83, 109-110 MC68HC000 IWM 80--81 controllingthe caches 177 mathematicscoprocessor 63 interrupts62 MMU64 RAMaccess 194 PowerManager64 traps 63 PWMsound 71 unimplementedinstructions63 RAM65 CPUGLU118 real-timeclock 77 ROM68 sec82-83 506 Guide to the MacintoshFamilyHardware CPU.IDlines diskstate-control lines 160,163,170 in the Macintosh II 163 displays.Seeflat-paneldisplay;videodisplay in the Macintosh IIci 164,165 OMA in the Macintosh IIx 163 blockingNuBus175 CRT.Seevideodisplay on the Macintosh IIfx 79,394 currentMacintoshmodelsxxx DRQsignalcontrolledby VIA2PeripheralControlregister 178-179 D on the Macintosh Plus 93 DAC406,418 on the Macintosh SE 94 databus 6o--61 on the Macintosh II 99 buffers60 on MC68030 machines102 dynamicbus sizing 96 IDSsignal97 datacachein the MC68030 100.SeealsocacheRAM IDSACKsignal97,131,138 controlling176 IDTACKsignal90 DataregisterA(VIA)159-167 in the MacintoshPlus 122 DataregisterB(VIA)167-173 in the MacintoshPortable128 datastrobes34 in the MacintoshSE 126 IDSsignal97 dynamicbus sizing 96 /IDSsignal34,90 IUDSsignal34,90 E DataTransferAcknowledge. SeeIDTACKsignal; earlierMacintosh models xxx,19 /EXT.DTACK signal blockdiagram 50 DataTransferand SizeAcknowledge. SeeIDSACKsignal Eclock61,90,128,182 DCoutput.Seepowersupply EDisks233 declarationROM EIAstandardRS-232-C 82, 361 on expansionvideocard 407 EIAstandardRS-42282,361 for pseudo-slotcard 135 800KBdriveinterface332-343 for pseudo-slotvideo 410 circuitdiagram339-341 defaultADBdeviceaddress322 connectors334-337 deviceaddress,AppleDesktopBus 322 signals33Cr338 deviceaddressspace 34 800KBdriveinterfaceIC.SeeIWM DeviceHandlerID,ADB323-324 800KBfloppydiskdrive 330-338 changing309 8530.Seesec for mouse 302 1111instructions97,103 obtaining287 Enablesignal(Eclock)61,90,128,182 reserved323-324 IENBLlsignal161,170,337,347 fortrackball304 Environsprocedure 6 unrecognized324 errorconditions,AppleDesktopBus 320 deviceID,SCSI377 eventtimers,VIA180,181 · deviceregisters,ADB320 excep.Jions 91,191,192.Seealsointerrupts;resets;traps deviceselection,memory-mapped34-46,120-143 exceptionvectors191,192 differential signalin RS-422standard82 expansioninterface.Seeprocessor-directslot;NuBus digital-to-analog converter4o6,418 expansionvideocard(Macintosh II VideoCard) 404-409 disk-driveconnectors334-338,345-350 components405-409 external337,348-350 driversoftware407 internal334,345-348 externalconnector407--408 signalson 33Cr338, 34Cr350 initialization code 407 diskdrivers,developing329 signalson connector408 diskdrives.Seefloppydiskdrives timinggeneration405 disk0speedcontrol72-73,430 videosignals406,408 Index '11 /EXT.DTACK signal 126 floppydiskdrives(continued) ExtendedKeyboard.SeeAppleExtendedKeyboard interface80-81 exteriorfeatures6 forthe 800KBdrive 332-343 of the Macintosh128K,512K,512Kenhanced7 forthe FDHDdrive 343-356 of the MacintoshPlus 8 MFMencoding 331-332 of the MacintoshPortable12-13 NRZIencoding 331 of the MacintoshSE 8 selecting161,170 of the MacintoshSE/308 single-sided drive 342,356 of the MacintoshII 14-15 speedcontrol 72 of the Macintoshlid 16 summary80-81 of the MacintoshHex 16-17 types 329-332 of the MacintoshII family13-17 Flushcommand 316 of the MacintoshIlfx 14-15 FMC120,228 of the MacintoshIlx 14-15 400KBfloppydiskdrive externalsoundjack 429,438 compatibility342 warningforuse of 429 speed-controlsignal342,430,436 external-videoadapterfor the Macintosh Portable423 FPU.Seemathematicscoprocessors FrameBufferController(FBC)405 F functioncodesignals(FC2-FC1)98, 107 FastMemoryController(FMC)120,228 functionkeys 308 fast/slowbuffers61 FBC(FrameBufferController)405 G FCO,FCl, FC2signals98 GB(gigabyte)xxxii FDHDdrive 330-331,343-349 GCRformatting331 data rate345 generalogiccircuits65,111 FDHDdriveinterface343-356 BBU112-113 circuitdiagrams351-355 CPUGLU118 connectors345-350 FMC120,228 data rateof 345 GLU113 incompatibilitywith400KBdrive 356 GLUE113-114 SWIMinterfaceIC 344-345 intenupts98 FDHDdriveinterfaceIC.SeeSWIM in the Macintosh Plusand earliermodels 111 400KBfloppydiskdrive in the Macintosh Portable117-118 compatibility342 in the Macintosh SE 112-113 speed-controlsignal 342,430,436 in the Macintosh SE/30113-114 50753.SeePowerManagerIC in the Macintosh II 113-114 5380SCSIcontroller3n, 392 in the Macintosh Ilci 115-117 flat-paneldisplay421-422 in the Macintosh Ilcx 111 flicker,in videodisplays402,403,405 in the Macintosh Ilfx 119-120 floating-point coprocessor.Seemathematicscoprocessors in the Macintosh Ilx 113-114 floating-point unit (FPU).Seemathematicscoprocessors MDU115-116 floppydiskdrives329-356 Misc.GLU118 Apple800KBdrive 330-338 oss119,186 Apple400KBdrive 72,342,356 PALs111 AppleFDHDdrive 330-331,343-349 RBV116-117 compatibility342,356 timingcircuitsin 415 data encodingmethods 330-332 VIAemulationregisters116-117,166,173,185,186 GCRformatting331 . videocircuitsin 117,414 howtheywork 330 VOi 118 general-purpose input 82 508 Guideto the MacintoshFamilyHardware gigabyte(GB)xxxii instructions GlobalResetsignal317 illegal103 globalvariablesxxxiii unimplemented63, 103 HWCfgFlags 6 IntegratedWozMachine.SeeIWM MemTop197,201,205 interfacecircuits ROMBase 231 ADB292 VIA 158 800KBdrive 339-340 GLU113 FDHDdrive 351-355 GLUE113-114 SCSI386-391 intelTUpts98 serialVO 366--370 GPisignal82,162,163,171 videoin Macintosh IIci 412-420 graphicstablets323 internalcomponents18--33 in the MacintoshPlusand earliermodels 18--19 H in the MacintoshPortable23-26 handshaking. Seealso/DSACK signal;/DTACK signal in the MacintoshSE 20-21 withgeneralogiccircuits61 in the MacintoshSE/3022-23 in theSCC82 in the MacintoshII 26-28 in the SCSI79,393 in the MacintoshIIci 29-31 HardDisk20drive 14,80 in the MacintoshIIcx 29-31 compatibilitywithIWM 342-343 in the MacintoshII family26-33 compatibilitywithSWIM356 in the MacintoshIIfx 32-33 devicedriverfor 343,356 in the MacintoshIIx 26-28 usedforstartup81 IntelTUpt Enableregister186-187 HD20.SeeHardDisk20drive Inte1TUpt Flagregisters184-186 HMMU.SeeAMU in the MacintoshIIci 186 horizontalblanking 168 inte1TUpt handler 63,91,98 HWCfgFlags globalvariable6 intelTUpts 62 AppleDesktopBus 99,102,169,173 I ASC179 VOaddressbusbuffers61 automaticvectoringof 63,91,98 VOdata-busbuffers61 enabling186 ID.SeeDeviceHandlerID,ADB;ID underSCSI in the MacintoshPlusand earliermodels 92-93 identifying models6, 163,164,165 in the MacintoshPortable95-96,118,178 idletimein the Macintosh Portable268 in the MacintoshSE 93-94,449 illegalinstructions103 in the MacintoshSE/30101 incompatible secdrivers 110,364 in the MacintoshII 98--100 initialization code 407 in the MacintoshIIci 101,186 inputpower.Seepowersupply in the MacintoshIIcx 101 Inquirycommand 282 in the MacintoshIlfx 101 InsideMacintoshxxxiv ,in the MacintoshIlx 101 installing RAMSIMMs withthe MC68000 91-96 in the MacintoshPlusand Macintosh SE 198 withthe MC68020 97-100 in the MacintoshSE/30211 withtheMc68030101-103 in the MacintoshII family211 NuBus85,99,102,167,179 Instantcommand 283 one-second145,176,177,178 Instituteof Electrical and Electronics Engineers(IEEE) in the PowerManagerIC 178 NuBusstandard461 instructioncache 96, 100 controlling176 Index 50') interrupts(continued) keyboards.SeealsoADB(AppleDesktopBus) sec363 AppleExtendedKeyboard308-310 in the MacintoshPlus 93 AppleStandardKeyboard305-307 in the MacintoshPortable95 commandsin the MacintoshPlus 283 in the MacintoshSE 94 compatibility300 in the MacintoshII 100 in earlierMacintoshmodels 280,284-285 in the MC68030 computers103 interface74 SCSI in the MacintoshPlus 280-284 in the MacintoshSE 79,94,168-169 in the MacintoshPortable296,297,310-311 in the MacintoshII 79,99,178-179 microprocessor 76,280,296,305 in the MC68030 computers79, 102,178-179 non-ADB protocol 283 6o.15Hz 172,174,177,178,400 transitioncodes 28~284 on the 68ooo PDS449,453 keyboardclockline 176,282 on the 68030PDS167,459,460 keyboardcommandsin the MacintoshPlus 283 verticalblanking172,177,178 keyboarddataline 176 VIA18~187 keyboardmicroprocessor280,305 interruptswitch93,94,96,100,103 in the MacintoshPortable296 IOP 83,109-110 Keyboardregisters307,309 ADBfunctionsin 289 keypadprotocol,MacintoshPlus 283 datatransfers109 keypad,separate284-286 dedicatedRAMfor 109 communication286 OMAtransfers110 protocol 286 effecton RAM rate 110 keyboardprotocol,MacintoshPlus 283 interfaceto 109-110 keyswitchmatrix secincompatiblity110,364 AppleExtendedKeyboard308 /IPL0interrupt118 AppleStandardKeyboard305 /IPLO,/IPLl,/IPU signals91 in the MacintoshPlus 280 IRQsignalcontrolledby the VIA2PeripheralControl in the MacintoshPortable297 register178-179 kilobit(Kbit)xxxii on the Macintosh Plus 93 kilobyte(KB)xxxii on the Macintosh SE 94 on the Macintosh II 99 L on the MC68030 computers102 /LOSsignal34,90 IWM80--81,333 Listencommand 316 clocksignal333 logic.Seegeneralogiccircuits compatibilitywith400KBdrive 342 compatibilitywithHardDisk20drive 342-343 M diskdrivers,developing329 M50740MacintoshPortablekeyboardprocessor296 signals336-338 M50753.SeePowerManagerIC Macintosh512Kenhancedmouseand keyboard 273 J Macintosh512Kmouseand keyboard 273 jack,external Macintoshmodels,current xxx ASCsoundsystem438 Macintosh models,earlier xxx,19 PWMsoundsystem 429 Macintosh128Kmouseand keyboard 273 Macintosh OperatingSystem5, 40,45,64,105,131,136 K version7.0 27,45,106 KB(kilobyte)xxxii Kbit(kilobit)xxxii 510 Guide to the MacintoshFamilyHardware MacintoshPlus MacintoshSE addressmaps 37,122 addressmaps 38,125-126 appearanceof 8 appearanceof 8 blockdiagram51 blockdiagram52 800KBdiskdrive332-339, 342 800KBdiskdrive332-338, 340 generalogiccircuits111 FDHDdrives343-345, 347-348, 350-351 interrupts92-93 generalogiccircuits112-113 keyboard2.80--284 interrupts93-94,449 keyboardcoMector 280 processor-directslotin 448-451 keyboardtransitioncodes 283-284 RAM 197-201,203-204 mouse 275-279 SCSIinterface387 RAM 194,198,202 serial1/0 interface367 SCSIinterface386 sizeandweight471 serial1/0 interface366 soundsystem71,429-433 sizeandweight469 specifications470-471 soundsystem71,72-73,429-435 summaryof features21 specifications468--469 systemstartup242-243 summaryof features19 Macintosh SF/30 systemstartup242 addressmaps 41,130-135 MacintoshPortable appearanceof 8 ADBinterface298 blockdiagram53 addressmaps 39,128-130 FDHDdrives343-345, 347-348, 350-351 appearanceof 12-13 generalogiccircuits113-114 AppleDesktopBus 296 interrupts101 battery266,267 processor-directslotin 454-461 blockdiagram54 RAM 209-213,216,220 displays421-425 SCSIinterface390 externalvideoon 423-425 serial1/0 interface369 flat-paneldisplay421-422 sizeandweight473 keyboard310-311 soundsystem72,436-439, 441 keyboardcoMector 297 specifications472-473 keyboardprocessor296 summaryof features22-23 low-powerdevices304 systemstartup243-244 modemslot 371-374 Macintosh technicaldocumentationxxxv powercircuit266-269 MacintoshII PowerManagerIC 268,296 addressmaps 42,135-140 processor-directslot 451-453 appearanceof 14-15 RAM20':r208 blockdiagram56 SCSIinterface388 800KBdiskdrive332-338, 34i serial1/0 interface368 g~eral logiccircuits113-114 sizeandweight475 interrupts98,100 sleepstate268 NuBusexpansioninterface461 soundsystem72,436-440 powercircuit269-272 specifications474-475 RAM 209-220 summaryof features25-26 SCSIinterface390 systemstartup243 serial1/0 interface369 trackball297,303 sizeandweight477 soundsystem72,436-440 Index Sll MacintoshII (continued) MacintoshIlfx specifications 476 addressmaps 44, 141-143 summaryof features 26-28 appearanceof 14-15 systemstartup 243-244 blockdiagram 59 Macintosh II VideoCard 404-409 cacheRAM 67 components40~09 FDHDdrives343-346,348,355 externalconnector407-408 generalogiccircuits119-120 driversoftware407 interrupts101 initiali7.ation code 407 NuBusexpansioninterface461 signalson connector408 processor-direct slot 461 timinggeneration405 RAM222,228-231 videosignals406,408 SCSIinterface391 MacintoshIlci serial1/0 interface370 addressmaps 43, 141 sizeand weight487 appearanceof 16-17 soundsystem72,436-440 blockdiagram 58 specifications486-488 cachecard connector 226 summaryof features 32-33 cacheRAMin 68 systemstartup 243-244 controllingthe cachecard 175 MacintoshIlx FDHDdrives343-346,348-349,354 addressmaps 42, 135-140 generalogiccircuits115-117 appearanceof 14-15 interrupts101,186 blockdiagram 57 NuBusexpansioninterface461 FDHDdrives343-346,348,355 RAM209-220,221,222,223-227 generalogiccircuits113-114 SCSIinterface390 interrupts101 serial1/0 interface369 NuBusexpansioninterface461 sizeandweight484 RAM209-220 soundsystem72,436-440 SCSIinterface390 specifications483-485 serial1/0 interface369 summaryof features 29-31 sizeandweight480 systemstartup 243-244 soundsystem72,436-440 MacintoshIlcx specifications479-480 addressmaps 42, 135-140 summaryof features 26-28 appearanceof 16-17 systemstartup 243-244 blockdiagram 57 mainprocessor61--Q3, 89-104.SeealsoMC68000; FDHDdrives343-346,348-349,354 MC68020; MC68030; MC68HCOOO generalogiccircuits111 controllingthe cachesof 176 interrupts101 interruptsin 62 NuBusexpansioninterface461 RAMaccess 194 RAM209-220 traps 63,103-104 SCSIinterface390 unimplementedinstructions63 serial1/0 interface369 mathematics coprocessors63, 107-108 sizeandweight482 clockspeed 107 soundsystem72,436-440 MB(megabyte)xxxii specifications481-482 Mbit(megabit)xxxii summaryof features 29-30 MC68000 90-96 systemstartup 243-244 interrupts91-96 MC68020 96-100 coprocessorinstructions97 interrupts97-100 512 Guideto the MacintoshFamilyHardware MC68030 100-103 mousemotion 275-277,300-301 interrupts101-103 direction276,300-301 MC68851. SeePagedMemoryManagement Unit rate 277,303 MC68881. Seemathematics coprocessors MC68882. Seemathematics coprocessors N MC68HCOOO 90-96 NMI.Seenonmaskableinterrupts MDU115-116 nonmaskable interrupts93,94,96,100,103 megabit(Mbit)xxxii NRZIencoding 331 megabyte(MB)xxxii NuBusexpansioninterface84-85,461--466 memory189-238.Seealsoaddressmaps;RAM;ROM addresses139 CPUaccessto 194 blockdiagram466 MemoryDecodeUnit(MDU)115-116 blockingOMA 175 memorymanagementunit 33, 40, 64 connector463 in the Macintosh II 27,34,105-106 IEEEstandardfor 461 in the MC68030 iOl interrupts85,99,102,179 memorymap. Seeaddressmaps multiplexed address/databus 465 memorymappeddeviceselection34-46,120-143 patentlicensefor 462 memorytesting signals462-465 in the Macintosh128K,512K,and 512Kenhanced 197 statusbits 174 in the MacintoshPlusand Macintosh SE 201 10MHzclock 465 in the Macintosh Portable205 typesof cardsusedin 462 MemTopglobalvariable197,201,205 numerics.Seemathematicscoprocessors MFMencoding 331-332 microprocessor. Seemainprocessor.SeealsoMC68000; 0 MC68020; MC68030; MC68HCOOO Offswitch245 Misc.GLU 118 On switch244.Seealsostartup,system MitsubishiM50753. SeePowerManagerIC 1010instructions103 MMU.Seememorymanagementunit 1111instructions97,103 ModelNumbercommand 282 one-secondinterrupt145,176,177,178 modem BatteryMonitorroutine 268 in the Macintosh Portable82,371-374 operatingsystem.SeeMacintoshOperatingSystem;A/UX synchronous82,161,163,170 organization of the book xxx /MODEM.BUSY signal374 oss119 /MODEM.PWR signal 374 VIAemulation166,171,173,185,186 modemslot in the MacintoshPortable371-374 output,powersupply.SeepowersupplyDCoutput monitor.Seevideo monitor p monitorpowerreceptaclein the Macintosh II family264 mouse.SeealsoADB(AppleDesktopBus) PagedMemoryManagement Unit(PMMU)27,34, 105-106 AppleStandard(ADB),75,300-303 pagetable 106 · compatibilitywithapplications300,302 PAI.$111 withthe Macintosh Plus 75,275-279 parallelport.SeeSCSI withearliermodels273 parameterRAM77, 144 motion 275-277 PDS.Seeprocessordirectslot readingquadraturesignals 168 PeripheralControlregister(VIA) 17Cr179 switch,reading168 peripheraldevices,ADB.SeeADBdevices mouse,ADB300-303 /PFWsignal 270 mousebutton 277 phaseof timingsignals,checkingat startup 122 mouse mechanism pixel399,400,402 in the AppleStandard(ADB)mouse 300 pixelclockrate 400 in the Macintosh Plus 277 Index 513 PMMU27,34, 105-106.Seealsomemorymanagement power-switch interrupt100 unit;AMU powerup. Seestartup,system pollingprotocol,AppleDesktopBus 325-326 processor.Seeauxiliaryprocessors;mainprocessor portablecomputer.SeeMacintoshPortable processor-directslot(PDS)84 powercircuit interrupts102 in the Macintosh Portable266-269 processorinterruptregisters(VIA) 183-187 sleepstate 268 68000PDS445-453 in the Macintosh II family269 68030PDS454-461 powerconnectors246-251 statusbits 174 in the Macintosh Plusand earliermodels 246 programmable anay logic(PAL)111 in the Macintosh Portable249 programmer's interruptswitch93,94,96,100,103 in the Macintosh SEand SF/30247-248 protocols in the Macintosh II and IIx 251 Macintosh Pluskeyboard283 in the Macintosh IIci 250 Macintosh Pluskeypad 283 in the Macintosh IIcx 250 separatekeypad286 in theMacintosh Ilfx 251 pseudo-slotvideo 409 powerdown 245 declarationROMfor 410 powerfailwarning270 in Macintosh SF/30409-410 PowerManagerIC 64,77,108 in Macintosh IIci 412 acknowledge signal170 PWMsoundsystem71,429-435 chargingbattery267 alternatesoundbuffer430 databus 162 circuitdiagrams433-435 functions108 compatibilitywithASC431,438 interrupts178 components429 requestsignal170 externalsoundjack 429 startup243 externalsoundwarning429 wake-uptimer 269 frequencyrelatedto scanrate 431 /POWEROFF signal 270 generatingsounds 430 power-off switch245 glitch-free432 /POWERON signal270 soundbuffer429-433 power-onswitch244.Seealsostartup,system volumecontrol 160,431 powerreceptaclefor monitor264 powersupplies239-272 Q abnonnalconditions265 quadraturesignals168 inputrequirements252-256 outputspecifications 257-264 R specifications R/Wsignal90,97 in theMacintosh Plus 253,258 RAM65,191-231.SeealsoRAMSIMMs in the Macintosh Portable255,261 accessrates 194-196,414 in the Macintosh SE 254,259-260 addressing191,193,196,205,210 in theMacintosh SF/30254,259-260 cache 67-68 in the Macintosh II 257,263-264 in the Macintosh IIfx 228 in the Macintosh IIci 256,261-262 cachecard 223 in the Macintosh IIcx 256,26J-262 configurations196-220 in the Macintosh IIfx 257,263-264 CPUaccessrates 194-196, 414 in theMacintosh Ilx 257,263-264 data-busbuffers60 switching off 175 in the earlierMacintoshcomputers196-199 powerswitch in the MacintoshPlus 197-202 in the Macintosh II 245 in the MacintoshPortable205-208 in the Macintosh II family269 in the MacintoshSE 197-201,203-204 514 Guideto the MacintoshFamilyHardware RAM(continued) ROM68,231-238.SeealsoROMoverlay;ROMSIMMs in the Macintosh SE/30209-213,216,220 accessrates 231 in the MacintoshIIci 221-222,223-227 addressing231 in the MacintoshII family209-220 configurations232 in the Macintosh Ilfx 222,228-231 MacintoshPortableexpansionROM234-235 parityRAM222 ROMBase globalvariable231 readingfrom 66 ROMdisks 233 size 166,198,199 ROMoverlay120,160,163 sizesetting198,199 in the classicMacintosh242 system191 in the Macintosh512K122,242 videobuffer 66 in the MacintoshPlus 122,242 videoRAM221 in the MacintoshPortable 128 RAMaccessrates 194-196 in the MacintoshSE 125,242 effectof videoRAMon 414 in the MacintoshSE/30131,244 RAM-Based Vide9IC.SeeRBV in the MacintoshII 136,244 RAMexpansionin the MacintoshPortable in the MacintoshIIcx 136 expansionconnectorpinouts 207 in the MacintoshIIx 136 expansionconnectorsignalassignments208 ROMSIMMs235-238 internalexpansion206 socketpinouts 236 RAMParityUnit(RPU)222 socketsignalassignments237 RAMSIMMs197-204,209,220 RowAddressStrobe(RAS)signal 210 banks 210 RPU(RAMParityUnit) 222 configurations202,203-204,220 RS-232standard82,361 installing198,211 RS-422standard82,361 locations216-219 RTC.Seereal-time clock(RTC)IC socketpinout 199 RTxCsignal161,163,170 socketsignalassignments200,201,212,214,215 randomaccessmemory.See RAM s RASsignal210 SANE108 RBV(RAM-Based Videocontroller)116-117 SCC82-83,359.Seealsofor serial1/0 entries timingcircuitsin 415 addresses363-365 VIAemulationregisters116-117,166,173,185,186 controlledby the IOPin the Macintosh Ilfx 359,364 videocircuitsin 117,414 GPisignal82 readingRAM66 handshaking82 read-onlymemory.See ROM interrupts.Seeinterrupts,SCC real-timeclock(RTC)IC 77,144-146 synchronousmodem 161,163,170 one-secondinterrupt 145,176,177,178 Wait/Request signal 160,163,169 signals168,173 screen.Seevideodisplay referencesto additionalreadingxxxiii screenbuffer 70.SeealsovideoRAM Reset63 in the MacintoshIIci 411,413 in the MacintoshPlusand earliermodels 242 selecting160,163 in the MacintoshPortable243,269 SCSI(SmallComputerSystemInterface)78-79,377-396. in the MacintoshSE 242 Seealsoentriesthatfollow in the MacintoshSE/30and Macintosh II family 244 ANSIstandardfor 78 Resethandlerin the classicMacintosh242 controlledby differentICs 393 Resetvector63 datatransfers392 in the MacintoshPlusand earliermodels 242 deviceID 377 in the MacintoshSE 242 diskdriver,developing377 in the MacintoshSE/30and Macintosh II family 244 OMAwith 79 RGBvideosignals406 DRQsignal93,94,99,102,178-179 Index ;1; SCSI(SmallComputerSystemInterface)(continued) SingleIn-lineMemoryModules.SeeRAMSIMMs; ROM ID 78 SIMMs interruptmask 169 single-sidediskdrive.SeeApple400KBfloppydiskdrive interrupts 60.15Hz interrupt in the MacintoshSE 79,94,168-169 bitin dataregisterB 174 in the MacintoshII 79,99, 178-179 for compatibility172 in the MC68030 computers79,102,178-179 controlledby PeripheralControlregister 172,177,178 IRQsignal93,94,99,102,178-179 not synchronized withscreenblanking400 pseudo-OMA mode 392,393-394 6522.SeeVIA SCSIconnectors 68000processor-direct slot(PDS)44~53 external379-380 clocksignals445 internal380-384 connector 446 SCSicontrollerIC377,392,394 in the MacintoshPortable451-453 SCSIOMAIC 394 in the MacintoshSE 448-451 SCSIport typesof cards 445 circuitdiagrams386-391 68030processor-direct slot(PDS)454-461 connectors379-384 clocksignals454 signals379,380 commonsignals 459 terminationblock 377,378 compatibility454 terminationresistors377 connector 456 selectingdevices34-46, 120-143 machine-specificsignals459-461 SELsignal160,161,163,164,170 in the MacintoshSE/30134 SendResetcommand 316 in the MacintoshIIfx 461 SerialCommunications Controller.Seesec signals455-461 serialVOports.Seealsosec 68851.SeePagedMemoryManagementUnit circuitdiagrams365,370 68881.Seemathematicscoprocessor connectors359-360 68882.Seemathematicscoprocessor datarate 363 sizeand weight driversand receivers361 of the MacintoshPlus 469 handshaking82 of the MacintoshPortable475 interruptpriority361 of the MacintoshSE 471 interrupts.Seeinterrupts,sec of the MacintoshSE/30473 serviceduringdiskaccesses363 of the Mac.intosh II 477 signals361-362,363 of the MacintoshIIci 484 VIAemulation166,171,173,185,186 of the MacintoshHex 482 writingdriversoftwarefor 363-364 of the MacintoshIIx 480 serialVO connector of the MacintoshIIfx 487 pinout 359 sleepstatein the Macintosh Portable268 signals360 slotinterrupt,NuBus179 serialVOsignals SmallComputerSystemInterface.SeeSCSI differentialtype 362 SonysoundIC 72,430,431,437 on earlierMacintoshmodels 362 in the MacintoshPlusand earliermodels 242 handshaking361-362 in the MacintoshSE 242 servicerequest,AppleDesktopBus 326 in the MacintoshSE/30and Macintosh II family 244 ServiceRequestsignal 318 sound 71-72.SeealsoASCsoundsystem;PWMsound Shiftregister(VIA) 181,182 system shortcircuit 265 compatibility431,438,439 shutdown 245 switchingon and off 168,170 ShutDownmenuchoice 270 volume 160,431,438 SIMMs. SeeRAMSIMMs; ROMSIMMs 516 Guideto the MacintoshFamilyHardware soundbuffer72 Testcommand283 selecting160 theanalswitch271 soundjack 170,174,181,429,438 32-bitaddresses45,131,136 SoundManager72 timers,event 180-183 soundmodes,in the ASC436,437 timing,AppleDesktopBus 319 specialinstructionsto causetraps 103 timingsignals,checkingat startup122 specifications Toolbox,Macintosh63 of the Macintosh Plus 468--469 trackballin the Macintosh Portable303-305 of the Macintosh Portable474-475 connector297 of the Macintosh SE 470-471 signals298 of the Macintosh SE/30472-473 directions305 of the Macintosh II 476 transactions,AppleDesktopBus 313-314 of the Macintosh Ilci 483-485 transitioncodes of the Macintosh Hex 481-482 forthe AppleExtendedKeyboard308-309 of theMacintosh Ilfx 486-488 forthe AppleStandardKeyboard306 of the Macintosh Ilx 479-480 forthe earlyMacintosh keyboards285 speedcontrolfor400KBdiskdrives72 forthe Macintosh Pluskeyboard284 StandardAppleNumericsEnvironment (SANE)108 forthe separatekeypad286 standardslotspace 138 traps63,103-104 startup,system241-244 turningthe computeroff 245 in the Macintosh Plusand earliermodels 242 turrningthe computeron. Seestartup,system in the Macintosh Portable243 24-bitaddresses45,64,131,136 in the Macintosh SE 242 24-to-32bitaddresstranslation45,46,131,136 in the Macintosh SE/30244 controlling175 in the Macintosh II family244 typesof floppydiskdrives329-332 summaryof Macintosh features2-3 SuperDrive. SeeFDHDdrive u superslotspace 138 IUDSsignal34,90 SuperWozIntegratedMachine.SeeSWIM unimplementedinstructions63, 103 SWIM80-~U,344-345 UNIX.SeeA/UX clockfrequency345 usergroupsxxxvi compatibilitywithHardDisk20 356 diskdriver,developing329 V incompatibilitywith400KBdrive 356 ValidPeripheral Addressignal.See/VPA signals347-348 variablenamesxxxiii switching offthe computer245 vBaseconstant158 switchingon the computer.Seestartup,system vBase2constant159 synchronouscommunication61 VBL.See60.15Hzinterrupt;verticalblankinginterrupt synchronousmodem 82 VDI(VideoDisplayInterface) IC 118 Syncsignal317 VDT.~eevideodisplay SysEnvirons function6 VectorBaseregister97,192 systemsoftwareversion7.0 27,45,lo6,131,136 vectornumber 63 systemstartup.Seestartup,system VersatileInterfaceAdapter.SeeVIAs version7.0,of systemsoftware27,45,lo6,131,136 T verticalblankinginterrupt(VBL)172,177,178,400,402 Talkcommand316 verticalblankinginterval400,402,405 temperatureprotection271 VerticalBlanking signal180 1010instructions103 verticalscanrate 401 termination block,SCSI377,378 VIAemulation registers116-117,119 termination resistors,SCSI377 Index S17 VIAregisters158 videodisplay(continued) Auxiliary Controlregister179 multiplemonitorsfor 404 DataregisterA 159-167 pixel 399,400,402 DataregisterB 167-173 pixelclockrate 400 eventtimers 180-183 RAMaccessfor 401 InterruptEnableregister 186-187 scanline 402 InterruptFlagregister184-186 scanning399-401 in the OSS119 screenbuffer401,402-403,406 PeripheralControlregister 176-179 synchroni7.ationof 403,405 processor-interruptregisters183-187 timinggeneration405 in the RBV116-117 verticalblankinginterval400 Shiftregister181,182 verticalscanrate 401 VIAs 73-77,149,187.SeeahoVIAemulationregisters; VideoDisplayInterface(VOi) IC 118 VIAregisters videodisplayscanning399-401 baseaddress 158 videodriver 407 communication withCPU 61, 128 video monitor communication with mainprocessor 149 detectingtypeof 409,411 eventtimers.SeeVIAregisters sizesof 411 functions151-155 videoRAM66,406 globalvariable158 effecton CPUaccessrate 414 interrupts92,94,95,99,102,183-187 in the Macintosh Ilci 195 keyboardinterface74 videotiminggeneration405 mouseinterface75 virtualmemory64, 106 registerlocationoffsets159 /VPAsignal90,91 RTCbits144 in the MacintoshPlus 122 test signal170 in the Macintosh SE 126 VIAl74,162-164,167-171,177 VIA2 74,165,173,178,186 w video.Seevideodisplay waitstates videocarcl.See expansionvideocard in the MacintoshSF/30 131,134 videocircuits in the MacintoshII 138 in the claMicMacintoshand Macintosh SE 401-402 in the MacintoshIlcx 138 in the MacintoshIlci 117,410-420 in the MacintoshIlx 138 in the MacintoshSF/30 114,409-410 wake-uptimerin the MacintoshPortable269 videodata-busbuffers60 warning,externalsoundjack 429 videodisplay weight bitsper pixel 411 of the MacintoshPlus 469 built-in399,401-403,409-410 of the MacintoshPortable475 circuits69-70,114,117,401-402 of the MacintoshSE 471 displaysizes 70-71 of the MacintoshSF/30473 expansionvideocard 404-409 of the MacintoshII 477 externalon MacintoshPortable423 of the MacintoshIlci 484 flat-paneldisplay421-422 of the MacintoshHex 482 flickerin 402 of the MacintoshIlfx 487 flicker-free403,405 of the MacintoshIlx 480 horizontalblanking 168 /W/RF.QA signal160,163,169 interrupts102 /W/REQB signal 160,163,169 in the MacintoshPortable423 in the MacintoshSF/30 409-410 z in tb.eMacintoshIlci 410-420 zs530sec 359 518 Guideto the MacintoshFamilyHardware THEAPPLEPUBLISHING SYSTEM ThisApplemanualwaswritten,edited,and composedon a desktoppublishingsystemusing AppleMacintosh® computersand Microsoft®Wordsoftware.Proofpageswere createdon AppleLaserWriter® printers.Finalpages werecreatedon the Varityper VT600imagesetter. Lineart wascreatedusingAdobeIllustrator™. PostScript®, the page-description languagefor the LaserWriter, wasdevelopedby AdobeSystems Incorporated. Texttypeand displaytypeareApple'scorporate font,a condensedversionof ITCGaramond.Bullets are ITCZapfDingbats®. LeadWriter:AllenWatsonIII Writer:PaulBlack BookDesign:LlsaMirski Developmental Editors:LaurelRezeauand AnneSzabla Art Direction:BarbaraSmyth Illustrators:PatColeman,MilMadamba,and GeorgeVrana ProductionSupervisor:J. ReneeEkleberry Production:JanetM.Anders Specialthanksto MarkBaumwell,RichCollyer, MaryFitzsimmons, DenisHescox,RonHochsprung, BrianHoward,ToddKessler,BrianKliment,Jon Krakower,AnnNunziata,NoahPrice,andJimStockdale. > $26-95 FPT USA ,_ > $34-95 CANADA TbeOfficial Family GuidetotheMacintosh® Hardware Publicationfrom AppleComputer,Inc. SecondEdition Writtenand producedby the peopleat AppleComputer,Inc.,thisisthe definitiveguide to the hardwaredesignof theApple®Macintosh familyof computers.It provides essentialinformation forhardwareengineerswho designperipheraldevicesand for systemprogrammers who needto understandhowthe Macintoshardwareworks.A companionbook,Designing CardsandDriversfor theMacintoshFamily,second edition,providesadditionaldesigninformation aboutMacintoshexpansioncards. GuidetotheMacintoshFamilyHardware, secondedition,providesextensive information aboutnineMacintosh models: • Macintosh Plus • Macintosh IIx • Macintosh SE • Macintosh Ilcx • SF/30 Macintosh • Macintosh lid • Macintosh Portable • Macintosh Ilfx • Macintosh II It alsocontainsinformation aboutearlierMacintosh models:the originalMacintosh 128K,the Macintosh 512K,and the Macintosh 512Kenhanced. Thisbookdevotesa chapterto eachmajorfeature-processor , memory,serialVO,and so on----