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
91 inc [cs:frame_count]
\r
95 lds si, [cs:cop_pal]
\r
102 mov [cs:do_pal], 0d
\r
104 cmp [cs:cop_plz], 0d
\r
109 cmp [cs:cop_drop], 0d
\r
128 mov [cs:cop_scrl], 4d
\r
133 out dx, ax ; 8th bit
\r
136 test [cs:pompi], 1d
\r
138 mov [cs:cop_scrl], 0d
\r
178 REPT 65 ; 43=dy*512/dtý
\r
179 dw ccc*ccc/4*43/128+60
\r
184 fadepal db 768*2 dup(?)
\r
186 PUBLIC C cop_fadepal
\r
192 cmp [cs:cop_drop], 64d
\r
196 mov bx, [cs:cop_drop]
\r
198 add bx, OFFSET dtau
\r
202 mov al, 18h ; linecompare
\r
210 out dx, ax ; 8th bit
\r
216 cmp [cs:cop_drop], 256d
\r
218 cmp [cs:cop_drop], 128
\r
220 cmp [cs:cop_drop], 64+32d
\r
223 @@lll: mov [Word cs:cop_pal], OFFSET fadepal
\r
224 mov [Word cs:cop_pal+2], SEG fadepal
\r
227 cmp [cs:cop_drop], 65
\r
234 out dx, ax ; 8th bit
\r
238 lds si, [cs:cop_fadepal]
\r
239 mov di, OFFSET fadepal
\r
244 mov ax, [ds:si+ccc*2]
\r
245 add [cs:di+ccc+768], al
\r
246 adc [cs:di+ccc], ah
\r
261 out dx, ax ; 8th bit
\r
266 mov [cs:cop_drop], 0d
\r