
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 -
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...