5 EXTRN C l1:word, C l2:word, C l3:word, C l4:word, C k1:word, C k2:word, C k3:word, C k4:word
\r
6 EXTRN C il1:word, C il2:word, C il3:word, C il4:word, C ik1:word, C ik2:word, C ik3:word, C ik4:word
\r
10 PUBLIC C frame_count, C init_copper_, C close_copper_, C cop_drop, C cop_pal, C do_pal
\r
11 PUBLIC C cop_scrl, C cop_start, C cop_plz
\r
48 mov cx, OFFSET copper1
\r
54 mov cx, OFFSET copper2
\r
60 mov cx, OFFSET copper3
\r
71 mov ah, [Byte cs:cop_start]
\r
74 mov ah, [Byte cs:cop_start+1]
\r
80 mov ax, [cs:cop_scrl]
\r
100 inc [cs:frame_count]
\r
102 cmp [cs:do_pal], 0d
\r
104 lds si, [cs:cop_pal]
\r
113 mov [cs:do_pal], 0d
\r
115 cmp [cs:cop_plz], 0d
\r
120 cmp [cs:cop_drop], 0d
\r
148 mov [cs:cop_scrl], 4d
\r
153 out dx, ax ; 8th bit
\r
156 test [cs:pompi], 1d
\r
158 mov [cs:cop_scrl], 0d
\r
198 REPT 65 ; 43=dy*512/dt
\r
199 dw ccc*ccc/4*43/128+60
\r
204 fadepal db 768*2 dup(?)
\r
206 PUBLIC C cop_fadepal
\r
212 cmp [cs:cop_drop], 64d
\r
216 mov bx, [cs:cop_drop]
\r
218 add bx, OFFSET dtau
\r
222 mov al, 18h ; linecompare
\r
233 out dx, ax ; 8th bit
\r
239 cmp [cs:cop_drop], 256d
\r
241 cmp [cs:cop_drop], 128
\r
243 cmp [cs:cop_drop], 64+32d
\r
246 @@lll: mov [Word cs:cop_pal], OFFSET fadepal
\r
247 mov [Word cs:cop_pal+2], SEG fadepal
\r
250 cmp [cs:cop_drop], 65
\r
257 out dx, ax ; 8th bit
\r
264 lds si, [cs:cop_fadepal]
\r
265 mov di, OFFSET fadepal
\r
270 mov ax, [ds:si+ccc*2]
\r
271 add [cs:di+ccc+768], al
\r
272 adc [cs:di+ccc], ah
\r
290 out dx, ax ; 8th bit
\r
295 mov [cs:cop_drop], 0d
\r