
HOW IT WORKS:
Both loops are, for the most part, exactly the same. In each, the Copper waits until the
vertical position register has $?F (? is any hex digit) in it, at which point we issue a
Copper interrupt to the Amiga hardware. To make sure that the Copper does not loop
back before the vertical position has changed and cause another interrupt on the same
scan line, wait for the horizontal position to be $E2 alter each interrupt. Position $E2 is
horizontal position 113 for the Copper and the last real horizontal position available. This
will force the Copper to the next line before the next WAIT. The loop is executed by
writing to the COPJMP1 register. This causes the Copper to jump to the address that was
initialized in COP1LC.
The masking problem described above makes this code fail after vertical position 127. A
separate loop must be executed when vertical position is greater than or equal 127. When
the vertical position becomes greater than or equal to 127, the first loop instruction is
skipped, dropping the Copper into the second loop. The second loop is much the same as
the first, except that it waits for $?F with the high bit set (binary 1xxx1111). This is true
for both the vertical and the horizontal WAIT instructions. To cause the second loop, write
to the COPJMP2 register. The list is put into an infinite wait when VP >= 255 so that it will
end before the vertical blank. At the end of the vertical blanking period COP1LC is written
to by the operating system, causing the first loop to start up again.
NOTE
The COP1LC register is written at the end of the vertical blanking period by a graphics
interrupt handler which is in the vertical blank interrupt server chain. As long as this
server is intact, COP1LC will be correctly strobed at the end of each vertical blank.
;
; This is the data for the Copper list.
;
; It is assumed that COPPERL1 is loaded into COP1LC and
; that COPPERL2 is loaded into COP2LC by some other code.
;
COPPERL1:
DC.W $0F01,$8F00 ; Wait for VP=0xxxllll
DC.W INTREQ,$8010 ; Set the copper interrupt bit
DC.W $00E3,$80FE ; Wait for Horizontal $E2
; This is so the line gets finished before
; we check if we are there (The wait above)
DC.W $7F01,$7F01 ; Skip if VP>=127
DC.W COPJMP1,$0 ; Force a jump to COP1LC
COPPERL2:
DC.W $8F01,$8F00 ; Wait for Vp=1xxx1111
DC.W INTREQ,$8010 ; Set the copper interrupt bit...
DC.W $80E3,$80FE ; Wait for Horizontal $E2
; This is so the line gets finished before
; we check if we are there (The wait above)
DC.W $FF01, $FE01 : Skip if VP>=255
- Coprocessor Hardware 29 -
Содержание 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...