Rev 117 | Rev 379 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 117 | Rev 119 | ||
---|---|---|---|
Line 170... | Line 170... | ||
170 | mov ecx,320 |
170 | mov ecx,320 |
171 | cld |
171 | cld |
172 | m13pix: |
172 | m13pix: |
173 | lodsd |
173 | lodsd |
174 | cmp eax,0 |
174 | cmp eax,0 |
175 | jne @f |
- | |
176 | xor eax,eax |
- | |
177 | jmp .save_pixel |
175 | je .save_pixel |
178 | @@: |
- | |
179 | push eax |
176 | push eax |
180 | mov ebx,eax |
177 | mov ebx,eax |
181 | and eax,(128+64+32) ; blue |
178 | and eax,(128+64+32) ; blue |
182 | shr eax,5 |
179 | shr eax,5 |
183 | and ebx,(128+64+32)*256 ; green |
180 | and ebx,(128+64+32)*256 ; green |
Line 196... | Line 193... | ||
196 | jnz m13pix |
193 | jnz m13pix |
197 | mov [EGA_counter],0 |
194 | mov [EGA_counter],0 |
198 | popad |
195 | popad |
199 | ret |
196 | ret |
Line -... | Line 197... | ||
- | 197 | ||
200 | 198 | VGA_drawbackground: |
|
- | 199 | ; draw all |
|
- | 200 | cmp [0xfe0c],dword 0x12 |
|
201 | novesal_1: |
201 | jne .end |
202 | pushad |
202 | pushad |
203 | mov esi,[0xfe80] |
203 | mov esi,[0xfe80] |
204 | mov edi,0xa0000 |
204 | mov edi,0xa0000 |
205 | mov ebx,640/32 ; 640*480/(8*4) |
205 | mov ebx,640/32 ; 640*480/(8*4) |
Line 215... | Line 215... | ||
215 | pop edi esi edx ebx |
215 | pop edi esi edx ebx |
216 | dec edx |
216 | dec edx |
217 | jnz @r |
217 | jnz @r |
218 | call VGA_draw_long_line_1 |
218 | call VGA_draw_long_line_1 |
219 | popad |
219 | popad |
- | 220 | .end: |
|
220 | ret |
221 | ret |
Line 221... | Line 222... | ||
221 | 222 | ||
222 | VGA_draw_long_line: |
223 | VGA_draw_long_line: |
223 | mov dx,3ceh |
224 | mov dx,3ceh |
Line 261... | Line 262... | ||
261 | ror eax,8 |
262 | ror eax,8 |
262 | mov ch,1 |
263 | mov ch,1 |
263 | dec cl |
264 | dec cl |
264 | shl ch,cl |
265 | shl ch,cl |
265 | cmp al,85 |
266 | cmp al,85 |
266 | jb .p13green |
267 | jbe .p13green |
267 | or [ebp],ch |
268 | or [ebp],ch |
268 | cmp al,170 |
269 | cmp al,170 |
269 | jb .p13green |
270 | jbe .p13green |
270 | or [ebp+12],ch |
271 | or [ebp+12],ch |
271 | .p13green: |
272 | .p13green: |
272 | cmp ah,85 |
273 | cmp ah,85 |
273 | jb .p13red |
274 | jbe .p13red |
274 | or [ebp+4],ch |
275 | or [ebp+4],ch |
275 | cmp ah,170 |
276 | cmp ah,170 |
276 | jb .p13red |
277 | jbe .p13red |
277 | or [ebp+12],ch |
278 | or [ebp+12],ch |
278 | .p13red: |
279 | .p13red: |
279 | shr eax,8 |
280 | shr eax,8 |
280 | cmp ah,85 |
281 | cmp ah,85 |
281 | jb .p13cont |
282 | jbe .p13cont |
282 | or [ebp+8],ch |
283 | or [ebp+8],ch |
283 | cmp ah,170 |
284 | cmp ah,170 |
284 | jb .p13cont |
285 | jbe .p13cont |
285 | or [ebp+12],ch |
286 | or [ebp+12],ch |
286 | .p13cont: |
287 | .p13cont: |
287 | ror eax,8 |
288 | ror eax,8 |
288 | mov ch,ah |
289 | mov ch,ah |
289 | inc cl |
290 | inc cl |
Line 331... | Line 332... | ||
331 | ; edi = address, eax = 24bit colour, ecx = bit no. (modulo 8) |
332 | ; edi = address, eax = 24bit colour, ecx = bit no. (modulo 8) |
332 | xor edx,edx |
333 | xor edx,edx |
333 | cmp eax,0 |
334 | cmp eax,0 |
334 | je .p13cont |
335 | je .p13cont |
335 | cmp al,85 |
336 | cmp al,85 |
336 | jb .p13green |
337 | jbe .p13green |
337 | or dl,0x01 |
338 | or dl,0x01 |
338 | cmp al,170 |
339 | cmp al,170 |
339 | jb .p13green |
340 | jbe .p13green |
340 | or dl,0x08 |
341 | or dl,0x08 |
341 | .p13green: |
342 | .p13green: |
342 | cmp ah,85 |
343 | cmp ah,85 |
343 | jb .p13red |
344 | jbe .p13red |
344 | or dl,0x02 |
345 | or dl,0x02 |
345 | cmp ah,170 |
346 | cmp ah,170 |
346 | jb .p13red |
347 | jbe .p13red |
347 | or dl,0x08 |
348 | or dl,0x08 |
348 | .p13red: |
349 | .p13red: |
349 | shr eax,8 |
350 | shr eax,8 |
350 | cmp ah,85 |
351 | cmp ah,85 |
351 | jb .p13cont |
352 | jbe .p13cont |
352 | or dl,0x04 |
353 | or dl,0x04 |
353 | cmp ah,170 |
354 | cmp ah,170 |
354 | jb .p13cont |
355 | jbe .p13cont |
355 | or dl,0x08 |
356 | or dl,0x08 |
356 | .p13cont: |
357 | .p13cont: |
357 | ror edx,8 |
358 | ror edx,8 |
358 | inc cl |
359 | inc cl |
359 | xor eax,eax |
360 | xor eax,eax |
Line 373... | Line 374... | ||
373 | ; ecx = size [x|y] |
374 | ; ecx = size [x|y] |
374 | ; edx = coordinates [x|y] |
375 | ; edx = coordinates [x|y] |
375 | cmp [0xfe0c],dword 0x12 |
376 | cmp [0xfe0c],dword 0x12 |
376 | jne @f |
377 | jne @f |
377 | pushad |
378 | pushad |
378 | ; calculate absolute (i.e. screen) coordinates |
- | |
379 | rol edx,16 |
379 | rol edx,16 |
380 | movzx eax,dx |
380 | movzx eax,dx |
381 | rol edx,16 |
381 | rol edx,16 |
382 | movzx ebx,dx |
382 | movzx ebx,dx |
383 | movzx edx,cx |
383 | movzx edx,cx |
Line 441... | Line 441... | ||
441 | add edi,edx |
441 | add edi,edx |
442 | call VGA_draw_long_line |
442 | call VGA_draw_long_line |
443 | pop edi esi edx ebx |
443 | pop edi esi edx ebx |
444 | ret |
444 | ret |
Line 445... | Line -... | ||
445 | - | ||
446 | VGA_drawbackground: |
- | |
447 | ; draw all |
- | |
448 | cmp [0xfe0c],dword 0x12 |
- | |
449 | jne @f |
- | |
450 | call novesal_1 |
445 | |
451 | @@: |
- |