Fixed MMX interpolation bug with scanlines

This commit is contained in:
pagefault
2003-03-16 22:02:12 +00:00
parent c700560655
commit fc373239e9

View File

@@ -40,6 +40,7 @@ NEWSYM copy640x480x16bwin
cmp byte[curblank],40h cmp byte[curblank],40h
jne .startcopy jne .startcopy
ret ret
ALIGN4
.startcopy .startcopy
push es push es
mov ax,ds mov ax,ds
@@ -57,35 +58,36 @@ NEWSYM copy640x480x16bwin
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
jne .nommx jne .nommx
cmp byte[En2xSaI],0 cmp byte[En2xSaI],0
jne near Process2xSaIwin jne Process2xSaIwin
.nommx .nommx
cmp byte[antienab],1 cmp byte[antienab],1
je near interpolate640x480x16bwin je interpolate640x480x16bwin
.nointerp .nointerp
mov dl,[resolutn] mov dl,[resolutn]
sub dl,2 sub dl,2
cmp byte[scanlines],1 cmp byte[scanlines],1
je near .scanlines je .scanlines
cmp byte[scanlines],3 cmp byte[scanlines],3
je near .halfscanlines je .halfscanlines
cmp byte[scanlines],2 cmp byte[scanlines],2
je near .quartscanlines je .quartscanlines
mov ebx,hirestiledat+1 mov ebx,hirestiledat+1
cmp byte[newengen],0 cmp byte[newengen],0
je .loopa je .loopa
mov ebx,SpecialLine+1 mov ebx,SpecialLine+1
ALIGN4
.loopa .loopa
mov ecx,256 mov ecx,256
cmp byte[ebx],1 cmp byte[ebx],1
je near .yeshires je .yeshires
cmp byte[GUIOn],1 cmp byte[GUIOn],1
je .ignorehr je .ignorehr
cmp byte[ebx],1 cmp byte[ebx],1
ja near .yeshiresng ja .yeshiresng
.ignorehr .ignorehr
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je near .mmx je .mmx
.a .a
mov ax,[esi] mov ax,[esi]
shl eax,16 shl eax,16
@@ -112,15 +114,17 @@ NEWSYM copy640x480x16bwin
add edi,[AddEndBytes] add edi,[AddEndBytes]
inc ebx inc ebx
dec dl dec dl
jnz near .loopa jnz .loopa
pop es pop es
xor byte[res512switch],1 xor byte[res512switch],1
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je .mmx2 je .mmx2
ret ret
ALIGN4
.mmx2 .mmx2
emms emms
ret ret
ALIGN4
.yeshires .yeshires
mov byte[ebx],0 mov byte[ebx],0
test byte[res512switch],1 test byte[res512switch],1
@@ -138,6 +142,7 @@ NEWSYM copy640x480x16bwin
pop ebx pop ebx
add edi,[NumBytesPerLine] add edi,[NumBytesPerLine]
jmp .return jmp .return
ALIGN4
.rightside .rightside
push ebx push ebx
mov ebx,[NumBytesPerLine] mov ebx,[NumBytesPerLine]
@@ -152,6 +157,7 @@ NEWSYM copy640x480x16bwin
pop ebx pop ebx
add edi,[NumBytesPerLine] add edi,[NumBytesPerLine]
jmp .return jmp .return
ALIGN4
.mmx .mmx
mov eax,[spritetablea] mov eax,[spritetablea]
mov ecx,64 mov ecx,64
@@ -188,10 +194,12 @@ NEWSYM copy640x480x16bwin
dec ecx dec ecx
jnz .mmxr2 jnz .mmxr2
jmp .return jmp .return
ALIGN4
.yeshiresng .yeshiresng
call HighResProc call HighResProc
jmp .return jmp .return
ALIGN4
.bng .bng
mov eax,[esi+75036*4-2] mov eax,[esi+75036*4-2]
mov ax,[esi] mov ax,[esi]
@@ -213,6 +221,7 @@ NEWSYM copy640x480x16bwin
jnz .bngb jnz .bngb
jmp .return jmp .return
ALIGN4
.scanlines .scanlines
mov ebx,hirestiledat+1 mov ebx,hirestiledat+1
cmp byte[GUIOn],1 cmp byte[GUIOn],1
@@ -220,6 +229,7 @@ NEWSYM copy640x480x16bwin
cmp byte[newengen],0 cmp byte[newengen],0
je .loopab je .loopab
mov ebx,SpecialLine+1 mov ebx,SpecialLine+1
ALIGN4
.loopab .loopab
mov ecx,256 mov ecx,256
cmp byte[ebx],1 cmp byte[ebx],1
@@ -228,9 +238,10 @@ NEWSYM copy640x480x16bwin
jbe .ignorehrb jbe .ignorehrb
call HighResProc call HighResProc
jmp .returnb jmp .returnb
ALIGN4
.ignorehrb .ignorehrb
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je near .mmxsl je .mmxsl
.ab .ab
mov ax,[esi] mov ax,[esi]
shl eax,16 shl eax,16
@@ -244,6 +255,7 @@ NEWSYM copy640x480x16bwin
add esi,64 add esi,64
add edi,[AddEndBytes] add edi,[AddEndBytes]
mov ecx,256 mov ecx,256
ALIGN4
.fslloop .fslloop
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
@@ -256,8 +268,9 @@ NEWSYM copy640x480x16bwin
pop es pop es
xor byte[res512switch],1 xor byte[res512switch],1
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je near .mmx2 je .mmx2
ret ret
ALIGN4
.yeshiresb .yeshiresb
mov byte[ebx],0 mov byte[ebx],0
test byte[res512switch],1 test byte[res512switch],1
@@ -270,6 +283,7 @@ NEWSYM copy640x480x16bwin
dec ecx dec ecx
jnz .bb jnz .bb
jmp .returnb jmp .returnb
ALIGN4
.rightsideb .rightsideb
.cb .cb
mov ax,[esi] mov ax,[esi]
@@ -279,6 +293,7 @@ NEWSYM copy640x480x16bwin
dec ecx dec ecx
jnz .cb jnz .cb
jmp .returnb jmp .returnb
ALIGN4
.mmxsl .mmxsl
mov ecx,64 mov ecx,64
.mmxrsl .mmxrsl
@@ -295,6 +310,7 @@ NEWSYM copy640x480x16bwin
jnz .mmxrsl jnz .mmxrsl
jmp .returnb jmp .returnb
ALIGN4
.halfscanlines .halfscanlines
mov ebx,hirestiledat+1 mov ebx,hirestiledat+1
cmp byte[GUIOn],1 cmp byte[GUIOn],1
@@ -302,14 +318,16 @@ NEWSYM copy640x480x16bwin
cmp byte[newengen],0 cmp byte[newengen],0
je .loopabh je .loopabh
mov ebx,SpecialLine+1 mov ebx,SpecialLine+1
ALIGN4
.loopabh .loopabh
cmp byte[ebx],1 cmp byte[ebx],1
jbe .ignorehrbh jbe .ignorehrbh
call HighResProc call HighResProc
jmp .returnbh jmp .returnbh
ALIGN4
.ignorehrbh .ignorehrbh
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je near .mmxslh je .mmxslh
mov ecx,256 mov ecx,256
.abh .abh
mov ax,[esi] mov ax,[esi]
@@ -339,11 +357,12 @@ NEWSYM copy640x480x16bwin
add edi,[AddEndBytes] add edi,[AddEndBytes]
inc ebx inc ebx
dec dl dec dl
jnz near .loopabh jnz .loopabh
pop es pop es
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je near .mmx2 je .mmx2
ret ret
ALIGN4
.mmxslh .mmxslh
mov eax,[spritetablea] mov eax,[spritetablea]
mov ecx,64 mov ecx,64
@@ -390,6 +409,7 @@ NEWSYM copy640x480x16bwin
jnz .mmxr2h jnz .mmxr2h
jmp .returnbh jmp .returnbh
ALIGN4
.quartscanlines .quartscanlines
mov [lineleft],dl mov [lineleft],dl
mov ebx,hirestiledat+1 mov ebx,hirestiledat+1
@@ -398,14 +418,16 @@ NEWSYM copy640x480x16bwin
cmp byte[newengen],0 cmp byte[newengen],0
je .loopabh2 je .loopabh2
mov ebx,SpecialLine+1 mov ebx,SpecialLine+1
ALIGN4
.loopabh2 .loopabh2
cmp byte[ebx],1 cmp byte[ebx],1
jbe .ignorehrbh2 jbe .ignorehrbh2
call HighResProc call HighResProc
jmp .returnbh2 jmp .returnbh2
ALIGN4
.ignorehrbh2 .ignorehrbh2
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je near .mmxslh2 je .mmxslh2
mov ecx,256 mov ecx,256
.abh2 .abh2
mov ax,[esi] mov ax,[esi]
@@ -439,11 +461,12 @@ NEWSYM copy640x480x16bwin
add edi,[AddEndBytes] add edi,[AddEndBytes]
inc ebx inc ebx
dec byte[lineleft] dec byte[lineleft]
jnz near .loopabh2 jnz .loopabh2
pop es pop es
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je near .mmx2 je .mmx2
ret ret
ALIGN4
.mmxslh2 .mmxslh2
mov eax,[spritetablea] mov eax,[spritetablea]
mov ecx,64 mov ecx,64
@@ -490,12 +513,13 @@ NEWSYM copy640x480x16bwin
jnz .mmxr2h2 jnz .mmxr2h2
jmp .returnbh2 jmp .returnbh2
ALIGN4
HighResProc: HighResProc:
mov ecx,256 mov ecx,256
cmp byte[ebx],3 cmp byte[ebx],3
je near .hiresmode7 je .hiresmode7
cmp byte[ebx],7 cmp byte[ebx],7
je near .hiresmode7 je .hiresmode7
test byte[ebx],4 test byte[ebx],4
jz .nofield jz .nofield
cmp byte[scanlines],0 cmp byte[scanlines],0
@@ -505,7 +529,7 @@ HighResProc:
add edi,[NumBytesPerLine] add edi,[NumBytesPerLine]
.nofield .nofield
test byte[ebx],3 test byte[ebx],3
jnz near .hires jnz .hires
.a .a
mov ax,[esi] mov ax,[esi]
shl eax,16 shl eax,16
@@ -522,6 +546,7 @@ HighResProc:
add edi,[NumBytesPerLine] add edi,[NumBytesPerLine]
.nofielde .nofielde
ret ret
ALIGN4
.hiresmode7 .hiresmode7
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je .yeshiresngmmxmode7 je .yeshiresngmmxmode7
@@ -549,6 +574,7 @@ HighResProc:
jnz .a2b jnz .a2b
sub esi,75036*4 sub esi,75036*4
ret ret
ALIGN4
.yeshiresngmmxmode7 .yeshiresngmmxmode7
mov ecx,64 mov ecx,64
.mmxr .mmxr
@@ -581,9 +607,10 @@ HighResProc:
jnz .mmxrb jnz .mmxrb
sub esi,75036*4 sub esi,75036*4
ret ret
ALIGN4
.hires .hires
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je near .yeshiresngmmx je .yeshiresngmmx
.bng .bng
mov eax,[esi+75036*4-2] mov eax,[esi+75036*4-2]
mov ax,[esi] mov ax,[esi]
@@ -601,13 +628,14 @@ HighResProc:
add edi,[NumBytesPerLine] add edi,[NumBytesPerLine]
.lowerfield .lowerfield
ret ret
ALIGN4
.nofieldb .nofieldb
cmp byte[scanlines],1 cmp byte[scanlines],1
je near .scanlines je .scanlines
cmp byte[scanlines],3 cmp byte[scanlines],3
je near .halfscanlines je .halfscanlines
cmp byte[scanlines],2 cmp byte[scanlines],2
je near .quartscanlines je .quartscanlines
add edi,[AddEndBytes] add edi,[AddEndBytes]
sub esi,256*2 sub esi,256*2
mov ecx,256 mov ecx,256
@@ -620,8 +648,10 @@ HighResProc:
dec ecx dec ecx
jnz .bngb jnz .bngb
ret ret
ALIGN4
.scanlines .scanlines
ret ret
ALIGN4
.yeshiresngmmx .yeshiresngmmx
mov eax,[spritetablea] mov eax,[spritetablea]
mov ecx,64 mov ecx,64
@@ -650,19 +680,20 @@ HighResProc:
add edi,[NumBytesPerLine] add edi,[NumBytesPerLine]
.lowerfieldb .lowerfieldb
ret ret
ALIGN4
.nofieldc .nofieldc
cmp byte[scanlines],1 cmp byte[scanlines],1
je near .scanlines je .scanlines
cmp byte[scanlines],3 cmp byte[scanlines],3
je near .halfscanlinesmmx je .halfscanlinesmmx
cmp byte[scanlines],2 cmp byte[scanlines],2
je near .quartscanlinesmmx je .quartscanlinesmmx
test byte[ebx+1],3 test byte[ebx+1],3
jz .noaa jz .noaa
cmp byte[En2xSaI],0 cmp byte[En2xSaI],0
jne near .antialias jne .antialias
cmp byte[antienab],0 cmp byte[antienab],0
jne near .antialias jne .antialias
.noaa .noaa
add edi,[AddEndBytes] add edi,[AddEndBytes]
mov eax,[spritetablea] mov eax,[spritetablea]
@@ -682,6 +713,7 @@ HighResProc:
dec ecx dec ecx
jnz .mmxr2 jnz .mmxr2
ret ret
ALIGN4
.antialias .antialias
add edi,[AddEndBytes] add edi,[AddEndBytes]
mov eax,[spritetablea] mov eax,[spritetablea]
@@ -715,6 +747,7 @@ HighResProc:
dec ecx dec ecx
jnz .mmxr2aa jnz .mmxr2aa
ret ret
ALIGN4
.halfscanlines .halfscanlines
add edi,[AddEndBytes] add edi,[AddEndBytes]
sub esi,256*2 sub esi,256*2
@@ -731,6 +764,7 @@ HighResProc:
dec ecx dec ecx
jnz .abhs jnz .abhs
ret ret
ALIGN4
.quartscanlines .quartscanlines
add edi,[AddEndBytes] add edi,[AddEndBytes]
sub esi,256*2 sub esi,256*2
@@ -750,6 +784,7 @@ HighResProc:
dec ecx dec ecx
jnz .abhs2 jnz .abhs2
ret ret
ALIGN4
.halfscanlinesmmx .halfscanlinesmmx
mov eax,[spritetablea] mov eax,[spritetablea]
mov ecx,32 mov ecx,32
@@ -778,6 +813,7 @@ HighResProc:
dec ecx dec ecx
jnz .mmxr2h jnz .mmxr2h
ret ret
ALIGN4
.quartscanlinesmmx .quartscanlinesmmx
mov eax,[spritetablea] mov eax,[spritetablea]
mov ecx,64 mov ecx,64
@@ -807,6 +843,7 @@ HighResProc:
jnz .mmxr2h2 jnz .mmxr2h2
ret ret
ALIGN4
Process2xSaIwin: Process2xSaIwin:
mov ebx,hirestiledat+1 mov ebx,hirestiledat+1
cmp byte[GUIOn],1 cmp byte[GUIOn],1
@@ -814,6 +851,7 @@ Process2xSaIwin:
cmp byte[newengen],0 cmp byte[newengen],0
je .loopabi je .loopabi
mov ebx,SpecialLine+1 mov ebx,SpecialLine+1
ALIGN4
.loopabi .loopabi
mov [InterPtr],ebx mov [InterPtr],ebx
@@ -845,6 +883,7 @@ Process2xSaIwin:
jnz .nextb jnz .nextb
pop ebx pop ebx
jmp .returninterp jmp .returninterp
ALIGN4
.ignorehr .ignorehr
;srcPtr equ 8 ;srcPtr equ 8
@@ -874,9 +913,11 @@ Process2xSaIwin:
je .super2xSaI je .super2xSaI
call _2xSaILineW call _2xSaILineW
jmp .normal jmp .normal
ALIGN4
.supereagle .supereagle
call _2xSaISuperEagleLineW call _2xSaISuperEagleLineW
jmp .normal jmp .normal
ALIGN4
.super2xSaI .super2xSaI
call _2xSaISuper2xSaILineW call _2xSaISuper2xSaILineW
.normal .normal
@@ -888,9 +929,10 @@ Process2xSaIwin:
add ebx,576 add ebx,576
inc dword[InterPtr] inc dword[InterPtr]
dec dword[lineleft] dec dword[lineleft]
jnz near .next jnz .next
mov ecx,256 mov ecx,256
sub edi,[NumBytesPerLine] sub edi,[NumBytesPerLine]
ALIGN4
.loop .loop
mov dword[es:edi],0 mov dword[es:edi],0
add edi,4 add edi,4
@@ -899,17 +941,19 @@ Process2xSaIwin:
pop es pop es
emms emms
ret ret
ALIGN4
.returninterp .returninterp
add esi,64 add esi,64
inc dword[InterPtr] inc dword[InterPtr]
add edi,[AddEndBytes] add edi,[AddEndBytes]
add ebx,576 add ebx,576
dec byte[lineleft] dec byte[lineleft]
jnz near .next jnz .next
emms emms
pop es pop es
ret ret
ALIGN4
MMXInterpolwin: MMXInterpolwin:
mov ebx,hirestiledat+1 mov ebx,hirestiledat+1
cmp byte[GUIOn],1 cmp byte[GUIOn],1
@@ -917,17 +961,18 @@ MMXInterpolwin:
cmp byte[newengen],0 cmp byte[newengen],0
je .loopab je .loopab
mov ebx,SpecialLine+1 mov ebx,SpecialLine+1
ALIGN4
.loopab .loopab
mov dl,[resolutn] mov dl,[resolutn]
sub dl,3 sub dl,3
movq mm2,[HalfTransC] movq mm2,[HalfTransC]
cmp byte[scanlines],1 cmp byte[scanlines],1
je near .scanlines je .scanlines
cmp byte[scanlines],2 cmp byte[scanlines],2
je near .scanlinesquart je .scanlinesquart
cmp byte[scanlines],3 cmp byte[scanlines],3
je near .scanlineshalf je .scanlineshalf
inc ebx inc ebx
mov [lineleft],dl mov [lineleft],dl
; do scanlines ; do scanlines
@@ -970,6 +1015,7 @@ MMXInterpolwin:
call HighResProc call HighResProc
movq mm2,[HalfTransC] movq mm2,[HalfTransC]
jmp .returninterp jmp .returninterp
ALIGN4
.ignorehr .ignorehr
mov eax,[esi+510] mov eax,[esi+510]
mov ecx,64 mov ecx,64
@@ -1022,7 +1068,7 @@ MMXInterpolwin:
add edi,16 add edi,16
add edx,16 add edx,16
dec ecx dec ecx
jnz near .a3 jnz .a3
add edi,[AddEndBytes] add edi,[AddEndBytes]
mov edx,[spritetablea] mov edx,[spritetablea]
add edx,512 add edx,512
@@ -1041,11 +1087,12 @@ MMXInterpolwin:
add edi,[AddEndBytes] add edi,[AddEndBytes]
inc ebx inc ebx
dec byte[lineleft] dec byte[lineleft]
jnz near .a5 jnz .a5
emms emms
pop es pop es
ret ret
ALIGN4
.scanlines .scanlines
inc dl inc dl
mov [lineleft],dl mov [lineleft],dl
@@ -1059,6 +1106,7 @@ MMXInterpolwin:
call HighResProc call HighResProc
movq mm2,[HalfTrans] movq mm2,[HalfTrans]
jmp .returninterps jmp .returninterps
ALIGN4
.ignorehrs .ignorehrs
.a .a
movq mm0,[esi] movq mm0,[esi]
@@ -1079,12 +1127,13 @@ MMXInterpolwin:
add edi,16 add edi,16
dec ecx dec ecx
jnz .a jnz .a
mov eax,[esi+510] ; mov eax,[esi+510]
mov [esi+512],eax ; mov [esi+512],eax
.returninterps .returninterps
add esi,64 add esi,64
add edi,[AddEndBytes] add edi,[AddEndBytes]
mov ecx,256 mov ecx,256
ALIGN4
.fslloop .fslloop
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
@@ -1094,11 +1143,12 @@ MMXInterpolwin:
inc ebx inc ebx
mov ecx,64 mov ecx,64
dec byte[lineleft] dec byte[lineleft]
jnz near .asl jnz .asl
emms emms
pop es pop es
ret ret
ALIGN4
.scanlineshalf .scanlineshalf
inc dl inc dl
mov [lineleft],dl mov [lineleft],dl
@@ -1109,6 +1159,7 @@ MMXInterpolwin:
call HighResProc call HighResProc
movq mm2,[HalfTrans] movq mm2,[HalfTrans]
jmp .returninterphs jmp .returninterphs
ALIGN4
.ignorehrhs .ignorehrhs
mov eax,[esi+510] mov eax,[esi+510]
mov ecx,64 mov ecx,64
@@ -1158,11 +1209,12 @@ MMXInterpolwin:
add esi,64 add esi,64
inc ebx inc ebx
dec byte[lineleft] dec byte[lineleft]
jnz near .ahb jnz .ahb
emms emms
pop es pop es
ret ret
ALIGN4
.scanlinesquart .scanlinesquart
inc dl inc dl
mov [lineleft],dl mov [lineleft],dl
@@ -1173,6 +1225,7 @@ MMXInterpolwin:
call HighResProc call HighResProc
movq mm2,[HalfTransC] movq mm2,[HalfTransC]
jmp .returninterpqs jmp .returninterpqs
ALIGN4
.ignorehrqs .ignorehrqs
mov eax,[esi+510] mov eax,[esi+510]
mov ecx,64 mov ecx,64
@@ -1208,6 +1261,8 @@ MMXInterpolwin:
add edi,[AddEndBytes] add edi,[AddEndBytes]
sub edx,16*64 sub edx,16*64
mov ecx,64 mov ecx,64
movq mm3,mm2
.ahc2 .ahc2
movq mm0,[edx] movq mm0,[edx]
movq mm1,[edx+8] movq mm1,[edx+8]
@@ -1234,14 +1289,15 @@ MMXInterpolwin:
add edi,[AddEndBytes] add edi,[AddEndBytes]
inc ebx inc ebx
dec byte[lineleft] dec byte[lineleft]
jnz near .ahb2 jnz .ahb2
emms emms
pop es pop es
ret ret
ALIGN4
NEWSYM interpolate640x480x16bwin NEWSYM interpolate640x480x16bwin
cmp byte[MMXSupport],1 cmp byte[MMXSupport],1
je near MMXInterpolwin je MMXInterpolwin
mov ebx,hirestiledat+1 mov ebx,hirestiledat+1
cmp byte[GUIOn],1 cmp byte[GUIOn],1
@@ -1249,17 +1305,18 @@ NEWSYM interpolate640x480x16bwin
cmp byte[newengen],0 cmp byte[newengen],0
je .loopabi je .loopabi
mov ebx,SpecialLine+1 mov ebx,SpecialLine+1
ALIGN4
.loopabi .loopabi
mov [InterPtr],ebx mov [InterPtr],ebx
mov dl,[resolutn] mov dl,[resolutn]
sub dl,3 sub dl,3
cmp byte[scanlines],1 cmp byte[scanlines],1
je near .scanlines je .scanlines
cmp byte[scanlines],2 cmp byte[scanlines],2
je near .scanlinesquart je .scanlinesquart
cmp byte[scanlines],3 cmp byte[scanlines],3
je near .scanlineshalf je .scanlineshalf
inc dword[InterPtr] inc dword[InterPtr]
mov [lineleft],dl mov [lineleft],dl
; do first line ; do first line
@@ -1283,12 +1340,14 @@ NEWSYM interpolate640x480x16bwin
add esi,66 add esi,66
add edi,[AddEndBytes] add edi,[AddEndBytes]
add edi,4 add edi,4
ALIGN4
.loopb .loopb
mov ebx,[InterPtr] mov ebx,[InterPtr]
cmp byte[ebx],1 cmp byte[ebx],1
jbe .ignorehr jbe .ignorehr
call HighResProc call HighResProc
jmp .returninterp jmp .returninterp
ALIGN4
.ignorehr .ignorehr
mov ecx,255 mov ecx,255
mov edx,[spritetablea] mov edx,[spritetablea]
@@ -1329,18 +1388,20 @@ NEWSYM interpolate640x480x16bwin
add edi,[AddEndBytes] add edi,[AddEndBytes]
add edi,4 add edi,4
dec byte[lineleft] dec byte[lineleft]
jnz near .loopb jnz .loopb
pop es pop es
ret ret
ALIGN4
.returninterp .returninterp
add esi,64 add esi,64
inc dword[InterPtr] inc dword[InterPtr]
add edi,[AddEndBytes] add edi,[AddEndBytes]
dec byte[lineleft] dec byte[lineleft]
jnz near .loopb jnz .loopb
pop es pop es
ret ret
ALIGN4
.scanlines .scanlines
xor eax,eax xor eax,eax
mov ebx,hirestiledat+1 mov ebx,hirestiledat+1
@@ -1349,6 +1410,7 @@ NEWSYM interpolate640x480x16bwin
cmp byte[newengen],0 cmp byte[newengen],0
je .loopabis je .loopabis
mov ebx,SpecialLine+1 mov ebx,SpecialLine+1
ALIGN4
.loopabis .loopabis
.loopab .loopab
mov ecx,255 mov ecx,255
@@ -1356,6 +1418,7 @@ NEWSYM interpolate640x480x16bwin
jbe .ignorehrs jbe .ignorehrs
call HighResProc call HighResProc
jmp .returninterps jmp .returninterps
ALIGN4
.ignorehrs .ignorehrs
cmp byte[ebx],1 cmp byte[ebx],1
je .yeshiresb je .yeshiresb
@@ -1380,6 +1443,7 @@ NEWSYM interpolate640x480x16bwin
add edi,4 add edi,4
add edi,[AddEndBytes] add edi,[AddEndBytes]
mov ecx,256 mov ecx,256
ALIGN4
.fslloop .fslloop
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
@@ -1392,6 +1456,7 @@ NEWSYM interpolate640x480x16bwin
pop es pop es
xor byte[res512switch],1 xor byte[res512switch],1
ret ret
ALIGN4
.yeshiresb .yeshiresb
mov byte[ebx],0 mov byte[ebx],0
test byte[res512switch],1 test byte[res512switch],1
@@ -1404,6 +1469,7 @@ NEWSYM interpolate640x480x16bwin
dec ecx dec ecx
jnz .bb jnz .bb
jmp .returnb jmp .returnb
ALIGN4
.rightsideb .rightsideb
.cb .cb
mov ax,[esi] mov ax,[esi]
@@ -1413,11 +1479,13 @@ NEWSYM interpolate640x480x16bwin
dec ecx dec ecx
jnz .cb jnz .cb
jmp .returnb jmp .returnb
ALIGN4
.returninterps .returninterps
add esi,64 add esi,64
inc dword[InterPtr] inc dword[InterPtr]
add edi,[AddEndBytes] add edi,[AddEndBytes]
mov ecx,256 mov ecx,256
ALIGN4
.fslloop2 .fslloop2
mov dword[edi],0 mov dword[edi],0
add edi,4 add edi,4
@@ -1425,19 +1493,22 @@ NEWSYM interpolate640x480x16bwin
jnz .fslloop2 jnz .fslloop2
add edi,[AddEndBytes] add edi,[AddEndBytes]
dec byte[lineleft] dec byte[lineleft]
jnz near .loopab jnz .loopab
pop es pop es
ret ret
ALIGN4
.scanlineshalf .scanlineshalf
xor eax,eax xor eax,eax
mov [lineleft],dl mov [lineleft],dl
ALIGN4
.loopab2 .loopab2
mov ebx,[InterPtr] mov ebx,[InterPtr]
cmp byte[ebx],1 cmp byte[ebx],1
jbe .ignorehrhs jbe .ignorehrhs
call HighResProc call HighResProc
jmp .returninterphs jmp .returninterphs
ALIGN4
.ignorehrhs .ignorehrhs
mov ecx,255 mov ecx,255
mov edx,[spritetablea] mov edx,[spritetablea]
@@ -1476,27 +1547,31 @@ NEWSYM interpolate640x480x16bwin
add edi,4 add edi,4
add edi,[AddEndBytes] add edi,[AddEndBytes]
dec byte[lineleft] dec byte[lineleft]
jnz near .loopab2 jnz .loopab2
pop es pop es
ret ret
ALIGN4
.returninterphs .returninterphs
add esi,64 add esi,64
inc dword[InterPtr] inc dword[InterPtr]
add edi,[AddEndBytes] add edi,[AddEndBytes]
dec byte[lineleft] dec byte[lineleft]
jnz near .loopab2 jnz .loopab2
pop es pop es
ret ret
ALIGN4
.scanlinesquart .scanlinesquart
xor eax,eax xor eax,eax
mov [lineleft],dl mov [lineleft],dl
ALIGN4
.loopab3 .loopab3
mov ebx,[InterPtr] mov ebx,[InterPtr]
cmp byte[ebx],1 cmp byte[ebx],1
jbe .ignorehrqs jbe .ignorehrqs
call HighResProc call HighResProc
jmp .returninterpqs jmp .returninterpqs
ALIGN4
.ignorehrqs .ignorehrqs
mov ecx,255 mov ecx,255
mov edx,[spritetablea] mov edx,[spritetablea]
@@ -1539,15 +1614,16 @@ NEWSYM interpolate640x480x16bwin
add edi,4 add edi,4
add edi,[AddEndBytes] add edi,[AddEndBytes]
dec byte[lineleft] dec byte[lineleft]
jnz near .loopab3 jnz .loopab3
pop es pop es
ret ret
ALIGN4
.returninterpqs .returninterpqs
add esi,64 add esi,64
inc dword[InterPtr] inc dword[InterPtr]
add edi,[AddEndBytes] add edi,[AddEndBytes]
dec byte[lineleft] dec byte[lineleft]
jnz near .loopab3 jnz .loopab3
pop es pop es
ret ret