Rev 129 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 129 | Rev 384 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | mov eax,edi |
54 | mov eax,edi |
55 | call color_24_to_4_bits |
55 | call color_24_to_4_bits |
56 | mov edi,eax |
56 | mov edi,eax |
57 | pop eax |
57 | pop eax |
Line 58... | Line 58... | ||
58 | 58 | ||
59 | mov ebp,[0x3010] |
59 | mov ebp,[TASK_BASE] |
60 | movsx esi,word[ebp-0x3000+0] |
60 | movsx esi,word[ebp-CURRENT_TASK+0] |
61 | add eax,esi |
61 | add eax,esi |
62 | add ecx,esi |
62 | add ecx,esi |
63 | movsx esi,word[ebp-0x3000+4] |
63 | movsx esi,word[ebp-CURRENT_TASK+4] |
64 | add ebx,esi |
64 | add ebx,esi |
65 | add edx,esi |
65 | add edx,esi |
66 | ; add eax,[ebp-0x3000+0] |
66 | ; add eax,[ebp-CURRENT_TASK+0] |
67 | ; add ebx,[ebp-0x3000+4] |
67 | ; add ebx,[ebp-CURRENT_TASK+4] |
68 | ; add ecx,[ebp-0x3000+0] |
68 | ; add ecx,[ebp-CURRENT_TASK+0] |
Line 69... | Line 69... | ||
69 | ; add edx,[ebp-0x3000+4] |
69 | ; add edx,[ebp-CURRENT_TASK+4] |
70 | 70 | ||
71 | mov esi,[0x00003000] |
71 | mov esi,[CURRENT_TASK] |
72 | mov esi,[CLIP_RECTS+esi*4] |
72 | mov esi,[CLIP_RECTS+esi*4] |
73 | mov ebp,[esi] |
73 | mov ebp,[esi] |
74 | or ebp,ebp |
74 | or ebp,ebp |
Line 87... | Line 87... | ||
87 | mov ecx,[rr.right] |
87 | mov ecx,[rr.right] |
88 | @@: jif edx,l,[rr.bottom],@f |
88 | @@: jif edx,l,[rr.bottom],@f |
89 | mov edx,[rr.bottom] |
89 | mov edx,[rr.bottom] |
90 | @@: call is_intersect_rc |
90 | @@: call is_intersect_rc |
91 | jc .put |
91 | jc .put |
92 | cmp [mouse_invisible],0 |
92 | cmp byte[MOUSE_VISIBLE],0 |
93 | jne .put |
93 | je .put |
94 | call [SF.draw_mouse_under] |
94 | call [SF.draw_mouse_under] |
95 | mov [mouse_invisible],1 |
95 | mov byte[MOUSE_VISIBLE],0 |
96 | .put: sub edx,ebx |
96 | .put: sub edx,ebx |
97 | push edx edi ebx eax |
97 | push edx edi ebx eax |
98 | mov edi,ebx |
98 | mov edi,ebx |
99 | shl edi,6 |
99 | shl edi,6 |
100 | shl ebx,4 |
100 | shl ebx,4 |
101 | add edi,ebx |
101 | add edi,ebx |
102 | shr eax,3 |
102 | shr eax,3 |
103 | add edi,eax |
103 | add edi,eax |
104 | add edi,0x000A0000 |
104 | add edi,VGABasePtr |
105 | pop eax ebx |
105 | pop eax ebx |
Line 106... | Line 106... | ||
106 | 106 | ||
107 | mov ebx,eax |
107 | mov ebx,eax |
108 | mov esi,ecx |
108 | mov esi,ecx |
Line 272... | Line 272... | ||
272 | pop eax |
272 | pop eax |
273 | mov ecx,[esp+4*8] |
273 | mov ecx,[esp+4*8] |
Line 274... | Line 274... | ||
274 | 274 | ||
275 | test edi,1 |
275 | test edi,1 |
276 | jnz .forced |
276 | jnz .forced |
277 | mov esi,[0x00003000] |
277 | mov esi,[CURRENT_TASK] |
278 | mov esi,[CLIP_RECTS+esi*4] |
278 | mov esi,[CLIP_RECTS+esi*4] |
279 | mov edi,[esi] |
279 | mov edi,[esi] |
280 | or edi,edi |
280 | or edi,edi |
281 | jz .exit |
281 | jz .exit |
Line 296... | Line 296... | ||
296 | mov edx,[rr.bottom] |
296 | mov edx,[rr.bottom] |
297 | dec edx |
297 | dec edx |
298 | .draw: |
298 | .draw: |
299 | @@: call is_intersect_vln |
299 | @@: call is_intersect_vln |
300 | jc .put |
300 | jc .put |
301 | cmp [mouse_invisible],0 |
301 | cmp byte[MOUSE_VISIBLE],0 |
302 | jne .put |
302 | je .put |
303 | call [SF.draw_mouse_under] |
303 | call [SF.draw_mouse_under] |
304 | mov [mouse_invisible],1 |
304 | mov byte[MOUSE_VISIBLE],0 |
305 | .put: push ebx eax |
305 | .put: push ebx eax |
306 | mov ebp,ebx |
306 | mov ebp,ebx |
307 | shl ebp,6 |
307 | shl ebp,6 |
308 | shl ebx,4 |
308 | shl ebx,4 |
309 | add ebp,ebx |
309 | add ebp,ebx |
310 | shr eax,3 |
310 | shr eax,3 |
311 | add ebp,eax |
311 | add ebp,eax |
312 | add ebp,0x000A0000 |
312 | add ebp,VGABasePtr |
313 | pop eax ebx |
313 | pop eax ebx |
314 | @@: mov ch,[ebp] |
314 | @@: mov ch,[ebp] |
315 | mov [ebp],cl |
315 | mov [ebp],cl |
316 | add ebp,80 |
316 | add ebp,80 |
317 | inc ebx |
317 | inc ebx |
Line 347... | Line 347... | ||
347 | dl.horz_line: |
347 | dl.horz_line: |
348 | cld |
348 | cld |
349 | mov ecx,[esp+4*8] |
349 | mov ecx,[esp+4*8] |
350 | test edi,1 |
350 | test edi,1 |
351 | jnz .forced |
351 | jnz .forced |
352 | mov esi,[0x00003000] |
352 | mov esi,[CURRENT_TASK] |
353 | mov esi,[CLIP_RECTS+esi*4] |
353 | mov esi,[CLIP_RECTS+esi*4] |
354 | mov edi,[esi] |
354 | mov edi,[esi] |
355 | or edi,edi |
355 | or edi,edi |
356 | jz .exit |
356 | jz .exit |
357 | add esi,4 |
357 | add esi,4 |
Line 371... | Line 371... | ||
371 | mov edx,[rr.right] |
371 | mov edx,[rr.right] |
372 | dec edx |
372 | dec edx |
373 | .draw: |
373 | .draw: |
374 | @@: call is_intersect_hln |
374 | @@: call is_intersect_hln |
375 | jc .put |
375 | jc .put |
376 | cmp [mouse_invisible],0 |
376 | cmp byte[MOUSE_VISIBLE],0 |
377 | jne .put |
377 | je .put |
378 | call [SF.draw_mouse_under] |
378 | call [SF.draw_mouse_under] |
379 | mov [mouse_invisible],1 |
379 | mov byte[MOUSE_VISIBLE],0 |
380 | .put: push edi ebx eax |
380 | .put: push edi ebx eax |
381 | mov edi,eax |
381 | mov edi,eax |
382 | shl edi,6 |
382 | shl edi,6 |
383 | shl eax,4 |
383 | shl eax,4 |
384 | add edi,eax |
384 | add edi,eax |
385 | shr ebx,3 |
385 | shr ebx,3 |
386 | add edi,ebx |
386 | add edi,ebx |
387 | add edi,0x000A0000 |
387 | add edi,VGABasePtr |
388 | pop eax ebx |
388 | pop eax ebx |
Line 389... | Line 389... | ||
389 | 389 | ||
390 | push eax ebx edx esi ecx |
390 | push eax ebx edx esi ecx |
391 | mov esi,edx |
391 | mov esi,edx |
Line 462... | Line 462... | ||
462 | mov eax,[esp] |
462 | mov eax,[esp] |
463 | mov [edi],al ; Write Pixel |
463 | mov [edi],al ; Write Pixel |
464 | .D_End: |
464 | .D_End: |
465 | pop ecx esi edx ebx eax edi |
465 | pop ecx esi edx ebx eax edi |
Line 466... | Line 466... | ||
466 | 466 | ||
467 | ; mov ebp,[bytes_per_scanline] |
467 | ; mov ebp,[BytesPerScanLine] |
468 | ; imul ebp,eax |
468 | ; imul ebp,eax |
469 | ; lea ebp,[ebp+ebx*4] |
469 | ; lea ebp,[ebp+ebx*4] |
470 | ; add ebp,[lfb_address] |
470 | ; add ebp,[LFBAddress] |
471 | ; @@: test ecx,0x01000000 |
471 | ; @@: test ecx,0x01000000 |
472 | ; jz .dr |
472 | ; jz .dr |
473 | ; mov ecx,[ebp] |
473 | ; mov ecx,[ebp] |
474 | ; not ecx |
474 | ; not ecx |
Line 516... | Line 516... | ||
516 | ; edi = 0x00000001 force |
516 | ; edi = 0x00000001 force |
517 | ;----------------------------------------------------------------------------- |
517 | ;----------------------------------------------------------------------------- |
518 | begin |
518 | begin |
519 | pushad |
519 | pushad |
520 | cli |
520 | cli |
521 | ; mov edx,[bytes_per_scanline] |
521 | ; mov edx,[BytesPerScanLine] |
522 | ; imul edx,ebx |
522 | ; imul edx,ebx |
523 | ; lea edx,[edx+eax*4] |
523 | ; lea edx,[edx+eax*4] |
524 | ; add edx,[lfb_address] |
524 | ; add edx,[LFBAddress] |
525 | ; test ecx,0x01000000 |
525 | ; test ecx,0x01000000 |
526 | ; jz @f |
526 | ; jz @f |
527 | ; mov ecx,[edx] |
527 | ; mov ecx,[edx] |
528 | ; not ecx |
528 | ; not ecx |
529 | @@: test edi,1 |
529 | @@: test edi,1 |
530 | jnz .forced |
530 | jnz .forced |
531 | mov esi,[0x00003000] |
531 | mov esi,[CURRENT_TASK] |
532 | mov esi,[CLIP_RECTS+esi*4] |
532 | mov esi,[CLIP_RECTS+esi*4] |
533 | mov edi,[esi] |
533 | mov edi,[esi] |
534 | or edi,edi |
534 | or edi,edi |
535 | jz .exit |
535 | jz .exit |
536 | add esi,4 |
536 | add esi,4 |
Line 539... | Line 539... | ||
539 | jif ebx,l,[rr.top],.skip |
539 | jif ebx,l,[rr.top],.skip |
540 | jif ebx,ge,[rr.bottom],.skip |
540 | jif ebx,ge,[rr.bottom],.skip |
541 | call get_cursor_rect |
541 | call get_cursor_rect |
542 | call is_intersect_pt |
542 | call is_intersect_pt |
543 | jc .put |
543 | jc .put |
544 | cmp [mouse_invisible],0 |
544 | cmp byte[MOUSE_VISIBLE],0 |
545 | jne .put |
545 | je .put |
546 | call [SF.draw_mouse_under] |
546 | call [SF.draw_mouse_under] |
547 | mov [mouse_invisible],1 |
547 | mov byte[MOUSE_VISIBLE],0 |
548 | .put:;mov [edx],ecx |
548 | .put:;mov [edx],ecx |
549 | ; mov ax,SegA000 {Calculate Offset} |
549 | ; mov ax,SegA000 {Calculate Offset} |
550 | ; mov es,ax |
550 | ; mov es,ax |
551 | ; mov bx,[y] |
551 | ; mov bx,[y] |
552 | mov edi,ebx |
552 | mov edi,ebx |
Line 562... | Line 562... | ||
562 | and cl,7 ; Get Bit that Changes |
562 | and cl,7 ; Get Bit that Changes |
563 | mov ax,0x8008 |
563 | mov ax,0x8008 |
564 | shr ah,cl |
564 | shr ah,cl |
565 | mov dx,0x03CE |
565 | mov dx,0x03CE |
566 | out dx,ax |
566 | out dx,ax |
567 | add edi,0x000A0000 |
567 | add edi,VGABasePtr |
Line 568... | Line 568... | ||
568 | 568 | ||
569 | call color_24_to_4_bits |
569 | call color_24_to_4_bits |
570 | mov ah,[edi] ; dummy read |
570 | mov ah,[edi] ; dummy read |
Line 601... | Line 601... | ||
601 | and cl,7 ; Get Bit that Changes |
601 | and cl,7 ; Get Bit that Changes |
602 | mov ax,0x8008 |
602 | mov ax,0x8008 |
603 | shr ah,cl |
603 | shr ah,cl |
604 | mov dx,0x03CE |
604 | mov dx,0x03CE |
605 | out dx,ax |
605 | out dx,ax |
606 | add edi,0x000A0000 |
606 | add edi,VGABasePtr |
Line 607... | Line 607... | ||
607 | 607 | ||
608 | pop eax |
608 | pop eax |
609 | call color_24_to_4_bits |
609 | call color_24_to_4_bits |
610 | mov ah,[edi] ; dummy read |
610 | mov ah,[edi] ; dummy read |
Line 637... | Line 637... | ||
637 | shl ebx,4 |
637 | shl ebx,4 |
638 | add edi,ebx |
638 | add edi,ebx |
639 | mov cl,al |
639 | mov cl,al |
640 | shr eax,3 ; /8 |
640 | shr eax,3 ; /8 |
641 | add edi,eax ; 80*y + (x/8) |
641 | add edi,eax ; 80*y + (x/8) |
642 | add edi,0x000A0000 |
642 | add edi,VGABasePtr |
Line 643... | Line 643... | ||
643 | 643 | ||
644 | and ecx,7 |
644 | and ecx,7 |
645 | neg ecx |
645 | neg ecx |
646 | add cl,7 |
646 | add cl,7 |
Line 702... | Line 702... | ||
702 | movsx edx,word[esp+4*4] |
702 | movsx edx,word[esp+4*4] |
703 | lea edi,[ecx*3] |
703 | lea edi,[ecx*3] |
704 | push edi |
704 | push edi |
705 | add ecx,eax |
705 | add ecx,eax |
706 | add edx,ebx |
706 | add edx,ebx |
707 | mov edi,[0x00003010] |
707 | mov edi,[TASK_BASE] |
708 | movsx esi,word[edi-0x3000+0] |
708 | movsx esi,word[edi-CURRENT_TASK+0] |
709 | add eax,esi |
709 | add eax,esi |
710 | add ecx,esi |
710 | add ecx,esi |
711 | movsx esi,word[edi-0x3000+4] |
711 | movsx esi,word[edi-CURRENT_TASK+4] |
712 | add ebx,esi |
712 | add ebx,esi |
713 | add edx,esi |
713 | add edx,esi |
714 | ; add eax,[esi-0x3000+0] |
714 | ; add eax,[esi-CURRENT_TASK+0] |
715 | ; add ebx,[esi-0x3000+4] |
715 | ; add ebx,[esi-CURRENT_TASK+4] |
716 | ; add ecx,[esi-0x3000+0] |
716 | ; add ecx,[esi-CURRENT_TASK+0] |
717 | ; add edx,[esi-0x3000+4] |
717 | ; add edx,[esi-CURRENT_TASK+4] |
Line 718... | Line 718... | ||
718 | 718 | ||
719 | mov esi,[0x00003000] |
719 | mov esi,[CURRENT_TASK] |
720 | mov esi,[CLIP_RECTS+esi*4] |
720 | mov esi,[CLIP_RECTS+esi*4] |
721 | mov edi,[esi] |
721 | mov edi,[esi] |
722 | or edi,edi |
722 | or edi,edi |
723 | jz .exit |
723 | jz .exit |
Line 736... | Line 736... | ||
736 | mov ecx,[rr.right] |
736 | mov ecx,[rr.right] |
737 | @@: jif edx,l,[rr.bottom],@f |
737 | @@: jif edx,l,[rr.bottom],@f |
738 | mov edx,[rr.bottom] |
738 | mov edx,[rr.bottom] |
739 | @@: call is_intersect_rc |
739 | @@: call is_intersect_rc |
740 | jc .put |
740 | jc .put |
741 | cmp [mouse_invisible],0 |
741 | cmp byte[MOUSE_VISIBLE],0 |
742 | jne .put |
742 | je .put |
743 | call [SF.draw_mouse_under] |
743 | call [SF.draw_mouse_under] |
744 | mov [mouse_invisible],1 |
744 | mov byte[MOUSE_VISIBLE],0 |
745 | .put: |
745 | .put: |
746 | mov esi,ebx |
746 | mov esi,ebx |
747 | sub esi,[esp+4*4] |
747 | sub esi,[esp+4*4] |
748 | imul esi,[esp+4*8] |
748 | imul esi,[esp+4*8] |
749 | mov edi,eax |
749 | mov edi,eax |
Line 754... | Line 754... | ||
754 | mov edi,ebx |
754 | mov edi,ebx |
755 | mov ebp,ebx |
755 | mov ebp,ebx |
756 | shl edi,6 ; 80*y |
756 | shl edi,6 ; 80*y |
757 | shl ebp,4 |
757 | shl ebp,4 |
758 | add edi,ebp |
758 | add edi,ebp |
759 | add edi,0x000A0000 |
759 | add edi,VGABasePtr |
760 | .xxx: push eax edx esi edi ebx eax |
760 | .xxx: push eax edx esi edi ebx eax |
761 | or ebp,-1 |
761 | or ebp,-1 |
762 | mov edx,0x03CE |
762 | mov edx,0x03CE |
763 | @@: mov eax,[esp] |
763 | @@: mov eax,[esp] |
764 | push ecx edi |
764 | push ecx edi |
Line 854... | Line 854... | ||
854 | mov ecx,[rr.right] |
854 | mov ecx,[rr.right] |
855 | @@: jif edx,l,[rr.bottom],@f |
855 | @@: jif edx,l,[rr.bottom],@f |
856 | mov edx,[rr.bottom] |
856 | mov edx,[rr.bottom] |
857 | @@: call is_intersect_rc |
857 | @@: call is_intersect_rc |
858 | jc .put |
858 | jc .put |
859 | cmp [mouse_invisible],0 |
859 | cmp byte[MOUSE_VISIBLE],0 |
860 | jne .put |
860 | je .put |
861 | call [SF.draw_mouse_under] |
861 | call [SF.draw_mouse_under] |
862 | mov [mouse_invisible],1 |
862 | mov byte[MOUSE_VISIBLE],0 |
863 | .put: sub edx,ebx |
863 | .put: sub edx,ebx |
864 | push edx edi ebx eax |
864 | push edx edi ebx eax |
865 | mov edi,ebx |
865 | mov edi,ebx |
866 | shl edi,6 |
866 | shl edi,6 |
867 | shl ebx,4 |
867 | shl ebx,4 |
868 | add edi,ebx |
868 | add edi,ebx |
869 | shr eax,3 |
869 | shr eax,3 |
870 | add edi,eax |
870 | add edi,eax |
871 | add edi,0x000A0000 |
871 | add edi,VGABasePtr |
872 | pop eax ebx |
872 | pop eax ebx |
Line 873... | Line 873... | ||
873 | 873 | ||
874 | mov ebx,eax |
874 | mov ebx,eax |
875 | mov esi,ecx |
875 | mov esi,ecx |
Line 990... | Line 990... | ||
990 | sti |
990 | sti |
991 | popad |
991 | popad |
992 | retn |
992 | retn |
Line 993... | Line 993... | ||
993 | 993 | ||
994 | .tiled: |
994 | .tiled: |
995 | mov eax,bg_address |
995 | mov eax,IMG_BACKGROUND |
996 | mov ebx,[bg_width-2] |
996 | mov ebx,[bg_width-2] |
997 | mov bx,word[bg_height] |
997 | mov bx,word[bg_height] |
998 | xor ecx,ecx |
998 | xor ecx,ecx |
999 | xor edx,edx |
999 | xor edx,edx |
1000 | .lp1: push eax |
1000 | .lp1: push eax |
1001 | call vm_mike_put_image.04.direct |
1001 | call vm_mike_put_image.04.direct |
1002 | pop eax |
1002 | pop eax |
1003 | add edx,[bg_width] |
1003 | add edx,[bg_width] |
1004 | cmp edx,[screen_width] |
1004 | cmp edx,[ScreenWidth] |
1005 | jae @f |
1005 | jae @f |
1006 | shl edx,16 |
1006 | shl edx,16 |
1007 | add ecx,edx |
1007 | add ecx,edx |
1008 | shr edx,16 |
1008 | shr edx,16 |
1009 | jmp .lp1 |
1009 | jmp .lp1 |
1010 | @@: and ecx,0x0000FFFF |
1010 | @@: and ecx,0x0000FFFF |
1011 | xor edx,edx |
1011 | xor edx,edx |
1012 | add ecx,[bg_height] |
1012 | add ecx,[bg_height] |
1013 | cmp ecx,[screen_height] |
1013 | cmp ecx,[ScreenHeight] |
1014 | jb .lp1 |
1014 | jb .lp1 |
1015 | popad |
1015 | popad |
1016 | retn |
1016 | retn |
1017 | endf |
1017 | endf |