
DESIGNING A SPRITE
For design purposes, it is convenient to lay out the sprite on paper first. You can show
the desired colors as numbers from 0 to 3. For example, the spaceship shown above
might look like this:
0000122332210000
0001223333221000
0012223333222100
0001223333221000
0000122332210000
The next step is to convert the numbers 0-3 into binary numbers, which will be used to
build the color descriptor words of the sprite data structure. The section below shows how
to do this.
BUILDING THE DATA STRUCTURE
After defining the sprite, you need to build its data structure, which is a series of 16-bit
words in a contiguous memory area. Some of the words contain position and control
information and some contain color descriptions. To create a sprite's data structure, you
need to:
o Write the horizontal and vertical position of the sprite into the first control word.
o Write the vertical stopping position into the second control word.
o Translate the decimal color numbers 0 - 3 in your sprite grid picture into binary color
numbers. Use the binary values to build color descriptor (data) words and write these
words into the data structure.
o Write the control words that indicate the end of the sprite data structure.
NOTE
Sprite data, like all other data accessed by the custom chips, must be loaded into Chip
RAM. Be sure all of your sprite data structures are word aligned in Chip Memory.
Table 4-1 shows a sprite data structure with the memory location and function of each
word:
- Sprite Hardware 101 -
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...