
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 -
Содержание Amiga A1000
Страница 1: ...AMIGA HARDWARE REFERENCE MANUAL 1992 Commodore Business Machines Amiga 1200 PAL...
Страница 20: ...Figure 1 1 Block Diagram for the Amiga Computer Family Introduction 11...
Страница 21: ...12 Introduction...
Страница 72: ...Figure 3 12 A dual Playfield display Playfield Hardware 63...
Страница 87: ...Figure 3 24 Horizontal Scrolling 78 playfield hardware...
Страница 101: ...92 Playfield Hardware...
Страница 199: ...Figure 6 9 DMA time slot allocation 190 Blitter hardware...
Страница 203: ...Figure 6 13 Blitter Block Diagram 194 Blitter Hardware...
Страница 229: ...220 System Control Hardware...
Страница 246: ...Figure 8 8 Chinon Timing diagram cont Interface Hardware 237...
Страница 265: ...256 Interface Hardware...
Страница 289: ...280 Appendix A...
Страница 297: ...288 Appendix B...
Страница 298: ...APPENDIX C CUSTOM CHIP PIN ALLOCATION LIST NOTE Means an active low signal Appendix C 289...
Страница 302: ...APPENDIX D SYSTEM MEMORY MAP Appendix D 293...
Страница 343: ...334 Appendix F...
Страница 351: ...342 Appendix G...
Страница 361: ...352 Appendix H...
Страница 367: ...358 Appendix I...