📄 copyvid.inc
字号:
add edi,64*2+64*2 mov ecx,256 SSInterpLineV sub esi,256*2 add edi,64*2+64*2 dec dl jz near .done mov ecx,256 call .loopa2 add esi,16*2+16*2 add edi,64*2+64*2 dec dl jnz near .loopa jmp .done.loopa2 mov ax,[esi] mov [es:edi],ax mov [es:edi+2],ax add esi,byte 2 add edi,byte 4 dec ecx jnz .loopa2 ret.smallscreen add edi,60*640*2+128*2 cmp byte[MMXSupport],1 je .ssloopb.ssloopa mov ecx,256/4*2 rep movsd add esi,16*2+16*2 add edi,192*2+192*2 dec dl jnz .ssloopa jmp .done.ssloopb mov ecx,256/16*2 MMXStuff add esi,16*2+16*2 add edi,192*2+192*2 dec dl jnz .ssloopb emms jmp .done.fullscreen sub edi,64*2.fsloopa mov ecx,256/4 call .fsloopb sub esi,256*2 mov ecx,256/4 call .fsloopb add esi,16*2+16*2 dec dl jz near .done mov ecx,256/4 call .fsloopb add esi,16*2+16*2 dec dl jnz .fsloopa jmp .done.fsloopb mov ebx,1 call .fsloopc sub esi,byte 2 mov ebx,4 call .fsloopc dec ecx jnz .fsloopb ret.fsloopc mov ax,[esi] mov [es:edi],ax mov [es:edi+2],ax add esi,byte 2 add edi,byte 4 dec ebx jnz .fsloopc ret.done pop es ret;*******************************************************; Copy VESA2 640x480x8b Copies buffer to 640x480x8bVBE2;*******************************************************%endifSECTION .bssNEWSYM res640, resb 1NEWSYM res480, resb 1SECTION .dataNEWSYM EagleHold, dd 0NEWSYM CurrentGUIOn, dd 0vesavaland dd 0,0mmxvalanda dd 11111111110000001111111111000000b,11111111110000001111111111000000bmmxvalandb dd 00000000000111110000000000011111b,00000000000111110000000000011111bSECTION .text%ifdef __MSDOS__NEWSYM copyvesa2640x480x8bgui mov byte[CurrentGUIOn],1 cmp byte[smallscreenon],1 je near smallscreen640x480x8b cmp byte[ScreenScale],1 je near smallscreen640x480x8b.fullscreen cmp byte[antienab],1 je near proceagle cmp byte[scanlines],1 je near copyvesa2640x480x8bs mov byte[res640],1 cmp byte[curblank],40h jne .startcopy ret.startcopy jmp copyvesa2640x480x8b.startcopy2NEWSYM copyvesa2640x480x8b mov byte[CurrentGUIOn],0 cmp byte[smallscreenon],1 je near smallscreen640x480x8b cmp byte[ScreenScale],1 je near smallscreen640x480x8b.fullscreen FilterTest proceagle cmp byte[scanlines],1 je near copyvesa2640x480x8bs mov byte[res640],1 cmp byte[curblank],40h jne .startcopy ret.startcopy cmp byte[f3menuen],1 je .startcopy2 cmp byte[ForceNewGfxOff],0 jne .startcopy2 cmp byte[newengen],0 jne near copyvesa2640x480x8ng.startcopy2 mov dword[ignor512],0 push es mov ax,[vesa2selec] mov es,ax mov esi,[vidbuffer] mov edi,32*2 ; Draw @ Y from 9 to 247 cmp word[resolutn],224 jne .res239 mov edi,8*640+32*2.res239 add edi,[VidStartDraw] add esi,16+256+32 xor eax,eax mov ebx,hirestiledat+1 mov dl,[resolutn] dec dl dec dl.loopa cmp byte[Triplebufen],1 je .ignorehr cmp byte[ebx],1 je near .yeshires.ignorehr mov ecx,128.a mov al,[esi+1] mov ah,al shl eax,16 mov al,[esi] mov ah,al mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a mov ecx,128 add edi,64*2 sub esi,256.a2r mov al,[esi+1] mov ah,al shl eax,16 mov al,[esi] mov ah,al mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a2r.returnloop add esi,32 add edi,64*2 inc ebx dec dl jnz .loopa pop es cmp byte[Triplebufen],1 je .ignorehr2 xor byte[res512switch],1.ignorehr2 ret.yeshires mov byte[ebx],0 test byte[res512switch],1 jnz .rightside mov ecx,256.b mov al,[esi] mov [es:edi],al mov [es:edi+640],al inc esi add edi,byte 2 dec ecx jnz .b add edi,640 jmp .returnloop.rightside mov ecx,256.b2 mov al,[esi] mov [es:edi+1],al mov [es:edi+641],al inc esi add edi,byte 2 dec ecx jnz .b2 add edi,640 jmp .returnloopNEWSYM copyvesa2640x480x8ng push es mov ax,[vesa2selec] mov es,ax mov esi,[vidbuffer] mov edi,32*2 ; Draw @ Y from 9 to 247 cmp word[resolutn],224 jne .res239 mov edi,8*640+32*2.res239 add edi,[VidStartDraw] add esi,16+256+32 xor eax,eax mov ebx,1 mov dl,[resolutn] dec dl dec dl.loopa mov ecx,256 cmp dword[ignor512],0 je .ignore test byte[intrlng+ebx],01h jnz near .interlaced cmp byte[BGMA+ebx],5 je near .hires cmp byte[BGMA+ebx],6 je near .hires cmp byte[Mode7HiRes],0 je .nomode7hires test byte[mosenng+ebx],1 jz .yesmode7hires cmp byte[mosszng+ebx],0 jne .nomode7hires.yesmode7hires test byte[intrlng+ebx],40h jnz .nomode7hires cmp byte[BGMA+ebx],7 jne .nomode7hires cmp byte[BGMA+ebx+1],7 je near .mode7hires.nomode7hires.ignore mov ecx,128.a mov al,[esi+1] mov ah,al shl eax,16 mov al,[esi] mov ah,al mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a mov ecx,128 add edi,64*2 sub esi,256.a2r mov al,[esi+1] mov ah,al shl eax,16 mov al,[esi] mov ah,al mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a2r.returnloop add esi,32 add edi,64*2 ;+640 inc ebx dec dl jnz near .loopa mov dword[ignor512],0 pop es ret.hires mov ecx,128.a3 mov al,[esi+1] mov ah,[esi+75037] shl eax,16 mov al,[esi] mov ah,[esi+75036] mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a3 add edi,64*2 sub esi,256 mov ecx,128.a6 mov al,[esi+1] mov ah,[esi+75037] shl eax,16 mov al,[esi] mov ah,[esi+75036] mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a6 jmp .returnloop.interlaced mov ecx,128 cmp byte[BGMA+ebx],5 je .hiresi cmp byte[BGMA+ebx],6 je .hiresi test byte[cfield],1 jz .b add edi,640.b.a2 mov al,[esi+1] mov ah,al shl eax,16 mov al,[esi] mov ah,al mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a2 test byte[cfield],1 jnz .bi add edi,640.bi jmp .returnloop.hiresi test byte[cfield],1 jz .b2 add edi,640.b2.a4 mov al,[esi+1] mov ah,[esi+75037] shl eax,16 mov al,[esi] mov ah,[esi+75036] mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a4 test byte[cfield],1 jnz .bi2 add edi,640.bi2 jmp .returnloop.mode7hires cmp byte[mode7hr+ebx],1 je near .mode7hiresb mov ecx,128.a7 mov al,[esi+1] mov ah,al shl eax,16 mov al,[esi] mov ah,al mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a7 mov ecx,128 add edi,64*2 add esi,75036-256.a7r mov al,[esi+1] mov ah,al shl eax,16 mov al,[esi] mov ah,al mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a7r sub esi,75036 jmp .returnloop.mode7hiresb mov ecx,64.a7hr mov eax,[esi] mov [es:edi],eax add esi,4 add edi,4 dec ecx jnz .a7hr mov ecx,64 add esi,75036*2-256.a7hrb mov eax,[esi] mov [es:edi],eax add esi,4 add edi,4 dec ecx jnz .a7hrb sub esi,75036*2 add edi,64*2 add esi,75036-256 mov ecx,64.a7hrr mov eax,[esi] mov [es:edi],eax add esi,4 add edi,4 dec ecx jnz .a7hrr mov ecx,64 add esi,75036*2-256.a7hrbr mov eax,[esi] mov [es:edi],eax add esi,4 add edi,4 dec ecx jnz .a7hrbr sub esi,75036*3 jmp .returnloopNEWSYM smallscreen640x480x8b mov byte[res640],0 cmp byte[curblank],40h jne .startcopy ret.startcopy push es mov ax,[vesa2selec] mov es,ax mov esi,[vidbuffer] mov edi,32*2 ; Draw @ Y from 9 to 247 cmp word[resolutn],224 jne .res239 mov edi,8*640+32*2.res239 add edi,[VidStartDraw] add edi,128+120*640 add esi,16+256+32 xor eax,eax mov ebx,hirestiledat+1 mov dl,[resolutn] dec dl dec dl.loopa mov ecx,64 rep movsd add esi,32 add edi,640-256 inc ebx dec dl jnz .loopa pop es ret.fullscreen cmp byte[curblank],40h jne .startcopy2 ret.startcopy2 push es mov ax,[vesa2selec] mov es,ax mov esi,[vidbuffer] xor edi,edi cmp word[resolutn],224 jne .res239b mov edi,8*640.res239b add edi,[VidStartDraw] add esi,16+256+32 xor eax,eax mov ebx,hirestiledat+1 mov dl,[resolutn] dec dl dec dl cmp byte[scanlines],1 je near .scanlines.loopa3 mov ecx,128.loopa2 mov al,[esi] mov [es:edi],al mov [es:edi+1],al mov [es:edi+640],al mov [es:edi+641],al mov al,[esi+1] mov [es:edi+2],al mov [es:edi+3],al mov [es:edi+4],al mov [es:edi+642],al mov [es:edi+643],al mov [es:edi+644],al add esi,byte 2 add edi,5 dec ecx jnz .loopa2 add esi,32 add edi,640 inc ebx dec dl jnz .loopa3 pop es ret.scanlines.loopa5 mov ecx,128.loopa4 mov al,[esi] mov [es:edi],al mov [es:edi+1],al mov al,[esi+1] mov [es:edi+2],al mov [es:edi+3],al mov [es:edi+4],al add esi,byte 2 add edi,5 dec ecx jnz .loopa4 add esi,32 add edi,640 inc ebx dec dl jnz .loopa5 pop es retNEWSYM copyvesa2640x480x8bs cmp byte[curblank],40h jne .startcopy ret.startcopy mov byte[res640],2 push es mov ax,[vesa2selec] mov es,ax mov esi,[vidbuffer] mov edi,32*2 ; Draw @ Y from 9 to 247 cmp word[resolutn],224 jne .res239 mov edi,8*640+32*2.res239 add edi,[VidStartDraw] add esi,16+256+32 xor eax,eax mov ebx,hirestiledat+1 mov dl,[resolutn] dec dl dec dl cmp byte[CurrentGUIOn],1 je .loopa cmp byte[ForceNewGfxOff],0 jne .loopa cmp byte[newengen],0 jne near copyvesa2640x480x8bsng.loopa cmp byte[Triplebufen],1 je .ignorehr cmp byte[ebx],1 je .yeshires.ignorehr mov ecx,256.a mov al,[esi] mov [es:edi],al inc esi mov [es:edi+1],al add edi,byte 2 dec ecx jnz .a.returnloop add esi,32 add edi,64*2+640 inc ebx dec dl jnz .loopa pop es cmp byte[Triplebufen],1 je .ignorehr2 xor byte[res512switch],1.ignorehr2 ret.yeshires mov byte[ebx],0 test byte[res512switch],1 jnz .rightside mov ecx,256.b mov al,[esi] inc esi mov [es:edi],al add edi,byte 2 dec ecx jnz .b jmp .returnloop.rightside mov ecx,256.b2 mov al,[esi] inc esi mov [es:edi+1],al add edi,byte 2 dec ecx jnz .b2 jmp .returnloopcopyvesa2640x480x8bsng: xor ebx,ebx.loopa cmp byte[BGMA+ebx],5 je near .hires cmp byte[BGMA+ebx],6 je near .hires mov ecx,128.a mov al,[esi+1] mov ah,al shl eax,16 mov al,[esi] mov ah,al mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a.returnloop add esi,32 add edi,64*2+640 inc ebx dec dl jnz .loopa pop es xor byte[res512switch],1 ret.hires mov ecx,128.a2 mov al,[esi+1] mov ah,[esi+75037] shl eax,16 mov al,[esi] mov ah,[esi+75036] mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .a2 jmp .returnloopNEWSYM proceagle mov byte[res640],0 cmp byte[curblank],40h jne .startcopy ret.startcopy push es mov ax,[vesa2selec] mov es,ax mov esi,[vidbuffer] add esi,16+256+32 mov dl,237 mov edi,32*2 ; Draw @ Y from 9 to 247 cmp word[resolutn],224 jne .res239 mov edi,8*640+32*2 add edi,[VidStartDraw] mov dl,222.res239 call draweagle pop es retNEWSYM draweagle ; copies a buffer from esi to es:edi with dl # of lines ; This only works under vesa 2 640x480x8b mode mov [lineleft],dl ; copy the first line directly mov ecx,128.drawnext mov al,[esi] mov ah,al shl eax,16 mov al,[esi] mov ah,al mov [es:edi],eax add esi,byte 2 add edi,4 dec ecx jnz .drawnext
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -