amiga hardware reference manual -2nd edition ebook-eng

Download Amiga Hardware Reference Manual -2nd Edition eBook-EnG

Post on 03-Dec-2014

110 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

Hardware Reference Manual Commodore Business Machines,Inc. Amiga Hardware Reference Manual CommodoreBusiness Machines,Inc. Amiga Technical ReferenceSeries Addison-WesleyPublishing Company,Inc. Reading,MassachusettsMenlo Park, CaliforniaDon Mills,Ontario Wokingham,EnglandAmsterdamSydneySingaporeTokyo MadridBogotaSantiagoSanJuan LibraryofCongressCataloging-in-Publication Data Mainentry undertitle: Amiga hardwarereferencemanual. Includes index.1.Amiga (Computer)I.Commodore Business Machines. QA76.8.A177 A651986004.16585-26650 ISBN0-201-1io77-6 BCDEFGHIJ-BA-89876 The text of this manual was writtenby Robert Peck, Susan Deyl,Jay Miner,and Chris Raymond. Special thanks to Bill Kolb,DaveNeedle,LeeHo,and Dale Luck. COPYRIGHT1986byCommodore-Amiga,Inc. Thismanualiscopyrightedandallrightsarereserved.Thisdocumentmaynot,inwholeorinpart,becopied,photocopied,repro-duced,translatedorreducedtoanyelectronicmediumormachinereadableformwithoutpriorconsent,inwriting,from Commodore-Amiga, Inc. DISCLAIMERS COMMODORE-AMIGA,INC.,("COMMODORE")MAKESNOWARRANTIES,EITHEREXPRESSEDORIMPLIED,WITH RESPECTTO THE PROGRAMSDESCRIBEDHEREIN,THEIRQUALITY,PERFORMANCE,MERCHANTABILITY,OR FIT-NESSFORANYPARTICULARPURPOSE.THESEPROGRAMSARESOLD"ASIS."THEENTIRERISKASTOTHEIR QUALITYANDPERFORMANCEISWITHTHEBUYER.SHOULDTHEPROGRAMSPROVEDEFECTIVEFOLLOWING PURCHASE,THEBUYER(ANDNOTTHECREATOROFTHEPROGRAMS,COMMODORE,THEIRDISTRIBUTORSOR THEIR RETAILERS)ASSUMESTHE ENTIRECOSTOFALLNECESSARYDAMAGES.INNOEVENTWILLCOMMODORE BE LIABLEFOR DIRECT,INDIRECT,INCIDENTALORCONSEQUENTIALDAMAGESRESULTINGFROM ANYDEFECT INTHE PROGRAMSEVEN IF IT HASBEEN ADVISEDOF THE POSSIBILITYOFSUCHDAMAGES.SOME LAWSDONOT ALLOWTHE EXCLUSIONORLIMITATIONOFIMPLIEDWARRANTIESORLIABILITIESFOR INCIDENTALORCONSE-QUENTIAL DAMAGES,SOTHE ABOVE LIMITATIONOR EXCLUSIONMAYNOT APPLY. THEAMIGACOMPUTERMEETSTITLE47OFTHECODEOFFEDERALREGULATIONSFORCLASSBCOMPUTING EQUIPMENT.THE FCCSTRICTLY FORBIDSTHE USEOFUNSHIELDEDCABLETOANYAMIGACONNECTORSWITH THEEXCEPTIONOFACPOWER.COMMODORE-AMIGASHALLNOTBEHELDLIABLEFORINTERFERENCEGEN-ERATED BYPERIPHERALSNOT AUTHORIZEDINWRITING BYCOMMODORE-AMIGA,INC. Amiga isatrademark of Commodore-Amiga,Inc. CBM Product Number 327272-02 Second Printing, July 1986 PREFACE ThismanualprovidesinformationabouttheAmiga[tm]graphicsandaudiohardware andabouthowthe Amiga talksto the outsideworldthroughperipheraldevices.A por-tionof thismanualisatutorialonwritingassemblylanguageprogramsto directlycon-trol the Amiga's graphics andhardware. This bookisintendedforthe followingaudiences: oAssemblylanguage programmers whoneedamoredirect way of interacting with the systemthantheroutinesdescribedinthe Amiga ROM Kernel Manual.You canfindinformationheretohelpyoumakeyourprogramsrunfasterordo thingsthat the ROM kernelroutines don't do. oAnyonewhowantsto addnewperipheralsto theAmiga or just wantsto know howthe hardware works. Wesuggestthat youusethisbookaccordingto yourlevelof familiaritywiththe Amiga system.Hereare some suggestions: oIfthisisyourinitialexposuretotheAmiga,readchapter1,whichgivesasur-veyofallthehardwarefeaturesandabriefrundownofgraphicsandaudio effects createdbyhardwareinteraction. oIf youarealreadyfamiliarwiththesystemandwanttoacquaintyourselfwith howthevariousbitsinthehardwareregistersgovernthewaythesystemfunc-tions,browsethroughchapters2through8.Examplesareincludedinthese chapters. oFor advancedusers,theappendixesgivea concise summary of the entire register setandtheusesof theindividualbits.Onceyouarefamiliarwiththe effects of changesinthevariousbits,youmaywishto refermoreoftento theappendixes thanto theexplanatory chapters. Hereisabrief overviewof thecontents: Chapter1,Introduction.Anoverviewofthehardwareandsurveyofthe Amiga's graphics andaudio features. Chapter 2,CoprocessorHardware.UsingtheCopper coprocessorto controlthe entiregraphicsandaudio system;directingmid-screenmodificationsingraphics displaysanddirecting registerchanges duringthetimebetweendisplays. -v-Chapter 3,Playfield Hardware.Creating,displayingandscrollingtheplayfields, oneofthebasicdisplayelements of the Amiga;howtheAmiga producesmulti-color,multi-graphical bit-mappeddisplays. Chapter 4,Sprite Hardware.Usingthe eight sprite direct-memoryaccess (DMA) channelstomake spritemovableobjects;creatingtheirdata structures,display-ingandmovingthem,reusing the DMA channels. Chapter 5,Audz'oHardware.Overviewof sampledsound;howto producequal-ity sound, simple andcomplex sounds,andmodulated sounds. Chapter6,BlitterHardware.UsingtheblitterDMAchanneltocreateanima-tion effectsanddrawlinesinto play fields. Chapter7,SystemOontrolHardware.Usingthecontrolregisterstodefine deptharrangementofgraphicsobjects,detectcollisionsbetweengraphics objects,control direct memoryaccess,andcontrol interrupts. Chapter8,InterfaceHardware.HowtheAmigatalkstotheoutsideworld throughcontrollerports,keyboard,audiojacksandvideoconnectors,serialand parallelinterfaces;informationaboutthediskcontrollerandRAMexpansion slot. Appendixes.Alphabeticalandaddress-orderlistingsofallthegraphicsand audiosystemregistersandthefunctionsoftheirbits,systemmemorymap, descriptions ofinternalandexternalconnectors,specificationsfortheperipheral interface ports,and specifications forthe keyboard. Glossary.After the appendixes,thereisaglossary of important terms. Youmaywishtolookat the followingbooksandmanuals forfurtherinformationabout the Amiga: oThe Amiga ROM Kernel Manual contains informationabout the Exec multitask-ingroutinesandisthesourceforalltheClanguageprimitives forAmiga graph-ics,animation,andaudio. oThe followingmanuals containinformationaboutthe AmigaDOSoperating sys-tem: oAmigaDOS User'sManual -vi-oAmigaDOS Developer's Manual oAmigaDOS Technical Reference Manual Itisourpolicytomakecertainthattheinformationcontainedhereisaccurate,con-sistent,andupto date.If youshouldfindanymaterial confusing,inaccurate,or incom-plete,please feelfreeto contact Amiga withyour questions or comments. -vii-Table of Contents Chapter 1INTRODUCTION ............................................................................................1 Components of the Amiga ...........................................................................................1 THE MO68000 ANDTHE AMIGA SPEOIAL-PURPOSE lIARDWARE.....................................................................................................................2 VOR ANDDIREOT OAMERA INTERFAOE .....................................................5 PRIMARY ANDSEOONDARY MEMORY.........................................................5 PERIPHERALS................................................................................................................5 System Expandability and Adaptability ..........................................................6 Chapter 2COPROCESSOR HARDWARE ..........................................................7 Introduction .............................................................................................................................7 ABOUT THISOHAPTER ............................................................................................8 What isaCopper Instruction?.................................................................................8 The MOVEInstruction ..................................................................................................9 The WAIT Instruction ....................................................................................................11 HORIZONTAL BEAM POSITION..........................................................................12 VERTIOAL BEAM POSITION.................................................................................12 THE OOMPARISON ENABLE BITS.....................................................................13 UsingtheCopper Registers .........................................................................................13 LOOATION REGISTERS............................................................................................13 JUMPSTROBE ADDRESS .........................................................................................14 OONTROL REGISTER ................................................................................................14 Putting Together aCopper Instruction List .................................................15 OOMPLETE SAMPLE OOPPER LIST.................................................................17 LOOPS ANDBRANOHES..........................................................................................19 Starting and Stopping theCopper ........................................................................19 STARTING THE OOPPER AFTER RESET ......................................................19 STOPPING THE OOPPER........................................................................................19 AdvancedTopics .................................................................................................................20 THE SI(IP INSTRUOTION........................................................................................20 OOPPER LOOPS ANDBRANOHES ANDOOMPARISON ENABLE ..............................................................................................................................21 USINGTHE COPPER IN INTERLACED MODE...........................................22 USINGTHE OOPPER WITH THE BLITTER..................................................23 THE COPPER ANDTHE 68000..............................................................................24 Summary of Copper Instructions...........................................................................24 -ix-Chapter 3PLAYFIELD HARDWARE .....................................................................27 Introduction .......................................................................................................... ,..................27 ABOUT THISCIIAPTER ............................................................................................28 PLAYFIELD FEATURES.....................................