4. Define Data Fetch. Set registers DDFSTRT and DDFSTOP: o For DDFSTRT, use the horizontal position as shown in "Setting the Display Window Starting Position." o For DDFSTOP, use the horizontal position as shown in "Setting the Display Window Stopping Position." 5. Define Modulo. Set registers BPL1MOD and BPL2MOD. Set modulo to 0 for non- interlaced, 40 for interlaced. 6. Write Copper Instructions To Handle Redisplay. 7. Enable Color Display. For the A1000: set bit 9 in BPLCON0 to enable the color display on a composite video monitor. RGB video is not affected. Only the A1000 has color composite video output, other machines cannot enable this feature using standard hardware.
EXAMPLES OF FORMING BASIC PLAYFIELDS The following examples show how to set the registers and write the coprocessor lists for two different playfields. The first example sets up a 320 x 200 playfield with one bit-plane, which is located at $21000. Also, a Copper list is set up at $20000. This example relies on the include file "hw examples.i", which is found in Appendix J.
LEA CUSTOM,a0 ; a0 points at custom chip MOVE.W #$1200,BPLCON0(a0) ; One bit-plane, enable composite color MOVE.W #0,BPLCON1(a0) ; Set horizontal scroll value to 0 MOVE.W #0,BPL1MOD(a0) ; Set modulo to 0 for all odd bit-planes MOVE.W #$0038,DDFSTRT(a0) ; Set data-fetch start to $38 MOVE.W #$00D0,DDFSTOP(a0) ; Set data-fetch stop to $D0 MOVE.W #$2C81,DIWSTRT(a0) ; Set DIWSTRT to $2C81 MOVE.W #$F4C1,DIWSTOP(a0) ; Set DIWSTOP to $F4Cl MOVE.W #$0F00,COLOR00(a0) ; Set background color to red MOVE.W #$0FF0,COLOR01(a0) ; Set color register 1 to yellow ; ; Fill bit-plane with $FF00FF00 to produce stripes ; MOVE.L #$21000,a1 ; Point at beginning of bit-plane MOVE.L #$FF00FF00,d0 ; We will write $FF00FF00 long words MOVE.W #2000,d1 ; 2000 long words = 8000 bytes ; LOOP:
MOVE.L d0,(a1)+ ; Write a long word DBRA d1,LOOP ; Decrement counter and loop until done ; ; Set up Copper list at $20000 ; MOVE.L #$20000,a1 ; Point at Copper list destination LEA COPPERL(pc).a2 ; Point a2 at Copper list data - Playfield Hardware 59 -