
CODING THE BIT-PLANES FOR CORRECT COLORING
After you have specified the number of bit-planes and set the bit-plane pointers, you can
actually write the color register codes into the bit-planes.
A ONE-OR TWO-COLOR PLAYFIELD
For a one-color playfield, all you need do is write "0"s in all the bits of the single bit-plane
as shown in the example below. This code fills a low-resolution bit-plane with the
background color (COLOR00) by writing all "0"s into its memory area. The bit-plane starts
at $21000 and is 8,000 bytes long.
LEA $21000,a0 ; Point at bit-plane
MOVE.W #2000,d0 ; Write 2000 longwords = 8000 bytes
LOOP: MOVE.L #0,(a0)+ ; Write out a zero
DBRA d0,LOOP ; Decrement counter and loop until done
For a two-color playfield, you define a bit-plane that has "0"s where you want the
background color and "1"s where you want the color in register 1. The following example
code is identical to the last example, except the bit-plane is filled with $FF00FF00 instead
of all 0's. This will produce two colors.
LEA $21000,a0 ; Point at bit-plane
MOVE.W #2000,d0 ; Write 2000 longwords = 8000 bytes
LOOP: MOVE.L #$FF00FF00,(a0)+ ; Write out $FF00FF00
DBRA d0,LOOP ; Decrement counter & loop until done
A PLAYFIELD OF THREE OR MORE COLORS
For three or more colors, you need more than one bit-plane. The task here is to define
each bit-plane in such a way that when they are combined for display, each pixel contains
the correct combination of bits. This is a little more complicated than a playfield of one
bit-plane. The following examples show a four-color playfield, but the basic idea and
procedures are the same for playfields containing up to 32 colors.
Figure 3-8 shows two bit-planes forming a four-color playfield:
- Playfield Hardware 49 -
Summary of Contents for Amiga A1000
Page 1: ...AMIGA HARDWARE REFERENCE MANUAL 1992 Commodore Business Machines Amiga 1200 PAL...
Page 20: ...Figure 1 1 Block Diagram for the Amiga Computer Family Introduction 11...
Page 21: ...12 Introduction...
Page 72: ...Figure 3 12 A dual Playfield display Playfield Hardware 63...
Page 87: ...Figure 3 24 Horizontal Scrolling 78 playfield hardware...
Page 101: ...92 Playfield Hardware...
Page 199: ...Figure 6 9 DMA time slot allocation 190 Blitter hardware...
Page 203: ...Figure 6 13 Blitter Block Diagram 194 Blitter Hardware...
Page 229: ...220 System Control Hardware...
Page 246: ...Figure 8 8 Chinon Timing diagram cont Interface Hardware 237...
Page 265: ...256 Interface Hardware...
Page 289: ...280 Appendix A...
Page 297: ...288 Appendix B...
Page 298: ...APPENDIX C CUSTOM CHIP PIN ALLOCATION LIST NOTE Means an active low signal Appendix C 289...
Page 302: ...APPENDIX D SYSTEM MEMORY MAP Appendix D 293...
Page 343: ...334 Appendix F...
Page 351: ...342 Appendix G...
Page 361: ...352 Appendix H...
Page 367: ...358 Appendix I...