Commodore Amiga 1200
Total Page:16
File Type:pdf, Size:1020Kb
AMIGA HARDWARE REFERENCE MANUAL Amiga 1200 PAL © 1992 Commodore Business Machines AMIGA HARDWARE REFERENCE MANUAL TABLE OF CONTENTS Chapter 1 INTRODUCTION Components of the Amiga ..................................2 THE MC68000 AND THE AMIGA CUSTOM CHIPS.................2 VCR AND DIRECT CAMERA INTERFACE........................5 PERIPHERALS............................................5 SYSTEM EXPANDABILITY AND ADAPTABILITY..................6 About the Examples........................................7 Some Caveats to Hardware Level Programmers ...............9 Chapter 2 COPROCESSOR HARDWARE ............................13 Introduction.............................................13 ABOUT THIS CHAPTER....................................14 What is a Copper Instruction? ...........................14 The MOVE Instruction ....................................15 The WAIT Instruction.....................................17 HORIZONTAL BEAM POSITION..............................18 VERTICAL BEAM POSITION ...............................18 THE COMPARISON ENABLE BITS............................19 Using the Copper Registers...............................20 LOCATION REGISTERS ...................................20 JUMP STROBE ADDRESS...................................21 CONTROL REGISTER......................................21 Putting Together a Copper Instruction List ..............22 COMPLETE SAMPLE COPPER LIST...........................24 LOOPS AND BRANCHES ...................................25 Starting and Stopping the Copper ........................25 STARTING THE COPPER AFTER RESET.......................25 STOPPING THE COPPER...................................26 Advanced Topics..........................................27 THE SKIP INSTRUCTION..................................27 COPPER LOOPS AND BRANCHES AND COMPARISON ENABLE.......28 USING THE COPPER IN INTERLACED MODE ..................30 USING THE COPPER WITH THE BLITTER.....................31 THE COPPER AND THE 68000..............................31 Summary of Copper Instructions ..........................32 Chapter 3 PLAYIELD HARDWARE................................33 Introduction.............................................33 ABOUT THIS CHAPTER....................................34 PLAYFIELD FEATURES ...................................34 Forming a Basic Playfield ...............................38 HEIGHT AND WIDTH OF THE PLAYFIELD.....................39 BIT-PLANES AND COLOR .................................39 SELECTING HORIZONTAL AND VERTICAL RESOLUTION .........43 ALLOCATING MEMORY FOR BIT-PLANES .....................46 CODING THE BIT-PLANES FOR CORRECT COLORING ...........49 DEFINING THE SIZE OF THE DISPLAY WINDOW ..............50 TELLING THE SYSTEM HOW TO FETCH AND DISPLAY DATA .....53 DISPLAYING AND REDISPLAYING THE PLAYFIELD ............56 ENABLING THE COLOR DISPLAY ...........................56 BASIC PLAYFIELD SUMMARY ..............................57 EXAMPLES OF FORMING BASIC PLAYFIELDS .................59 Forming a Dual-playfield Display ........................62 Bit-Plane Assignment in Dual-playfield Mode .............62 COLOR REGISTERS IN DUAL-PLAYFIELD MODE ...............65 DUAL-PLAYFIELD PRIORITY AND CONTROL ..................66 ACTIVATING DUAL-PLAYFIELD MODE .......................67 DUAL PLAYFIELD SUMMARY ...............................67 Bit-planes and Display Windows of All Sizes .............68 WHEN THE BIG PICTURE IS LRGR THAN THE DISPLAY WINDOW .68 MAXIMUM DISPLAY WINDOW SIZE...........................74 Moving (Scrolling) Playfields ...........................75 VERTICAL SCROLLING....................................75 HORIZONTAL SCROLLING .................................77 SCROLLED PLAYFIELD SUMMARY ...........................80 Advanced Topics..........................................81 INTERACTIONS AMONG PLAYFIELDS AND OTHER OBJECTS ......81 HOLD-AND-MODIFY MODE .................................81 FORMING A DISPLAY WITH SEVERAL DIFFERENT PLAYFELD ....84 USING AN EXTERNAL VIDEO SOURCE .......................84 SUMMARY OF PLAYFIELD REGISTERS .......................84 Summary of Color Selection ..............................87 COLOR REGISTER CONTENTS ..............................87 SOME SAMPLE COLOR REGISTER CONTENTS ..................88 COLOR SELECTION IN LOW-RESOLUTION MODE ...............88 COLOR SELECTION IN HOLD-AND-MODIFY MODE ..............90 COLOR SELECTION IN HIGH-RESOLUTION MODE ..............90 Chapter 4 SPRITE HARDWARE .................................93 Introduction.............................................93 ABOUT THIS CHAPTER....................................94 Forming a Sprite ........................................94 SCREEN POSITION ......................................94 SIZE OF SPRITES ......................................97 SHAPE OF SPRITES .....................................97 SPRITE COLOR..........................................98 DESIGNING A SPRITE...................................101 BUILDING THE DATA STRUCTURE..........................101 Displaying a Sprite.....................................106 SELECTING A DMA CHANNEL AND SETTING THE POINTERS.....107 RESETTING THE ADDRESS POINTERS ......................107 SPRITE DISPLAY EXAMPLE...............................108 Moving a Sprite.........................................110 Creating Additional Sprites.............................111 SPRITE PRIORITY......................................112 Reusing Sprite DMA Channels ............................113 Overlapped Sprites......................................115 Attached Sprites .......................................117 Manual Mode ............................................120 Sprite Hardware Details ................................121 Summary of Sprite Registers.............................124 POINTERS.............................................124 CONTROL REGISTERS....................................124 DATA REGISTERS ......................................126 Summary of Sprite Color Registers.......................126 INTERACTIONS AMONG SPRITES AND OTHER OBJECTS ........128 Chapter 5 AUDIO HARDWARE..................................129 Introduction............................................129 INTRODUCING SOUND GENERATION.........................130 THE AMIGA SOUND HARDWARE.............................133 Forming and Playing a Sound ............................134 DECIDING WHICH CHANNEL TO USE........................134 CREATING THE WAVEFORM DATA...........................134 TELLING THE SYSTEM ABOUT THE DATA ...................136 SELECTING THE VOLUME ................................136 SELECTING THE DATA OUTPUT RATE.......................137 PLAYING THE WAVEFORM ................................140 STOPPING THE AUDIO DMA...............................141 SUMMARY..............................................142 EXAMPLE..............................................142 Producing Complex Sounds................................143 JOINING TONES .......................................143 PLAYING MULTIPLE TONES AT THE SAME TIME..............145 MODULATING SOUND ....................................145 Producing High-quality Sound............................148 MAKING WAVEFORM TRANSITIONS .........................148 SAMPLING RATE .......................................148 EFFICIENCY...........................................149 NOISE REDUCTION......................................150 ALIASING DISTORTION .................................150 LOW-PASS FILTER .....................................152 Using Direct (Non-DMA) Audio Output ....................153 The Equal-tempered Musical Scale........................154 Decibel Values for Volume Ranges .......................159 The Audio State Machine.................................160 Chapter 6 BLITTER HARDWARE................................163 Introduction............................................163 Memory Layout ..........................................164 DMA Channels............................................164 Function Generator......................................168 DESIGNING THE LF CONTROL BYTE WITH MINTERMS..........169 DESIGNING THE LF CONTROL BYTE WITH VENN DIAGRAMS.....172 Shifts and Masks........................................173 Descending Mode ........................................176 Copying Arbitrary Regions...............................177 Area Fill Mode..........................................178 Blitter Done Flag.......................................180 MULTITASKING AND THE BLITTER ........................181 Interrupt Flag .........................................181 Zero Flag...............................................182 Pipeline Register.......................................182 Line Mode...............................................184 REGISTER SUMMARY FOR LINE MODE.......................186 Blitter Speed ..........................................188 Blitter Operations and System DMA ......................189 Blitter Block Diagram...................................193 Blitter Key Points......................................195 EXAMPLE: ClearMem....................................195 EXAMPLE: SimpleLine..................................197 EXAMPLE: RotateBits..................................199 Chapter 7 SYSTEM CONTROL HARDWARE ........................201 Introduction............................................201 Video Priorities .......................................202 FIXED SPRITE PRIORITES ..............................202 HOW SPRITES ARE GROUPED..............................203 UNDERSTANDING VIDEO PRIORITIES ......................203 SETTING