⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hq4x32.asm

📁 linux下的任天堂模拟器代码。供大家参考。
💻 ASM
📖 第 1 页 / 共 5 页
字号:
;Copyright (C) 1997-2007 ZSNES Team ( zsKnight, _Demo_, pagefault, Nach );;http://www.zsnes.com;http://sourceforge.net/projects/zsnes;https://zsnes.bountysource.com;;This program is free software; you can redistribute it and/or;modify it under the terms of the GNU General Public License;version 2 as published by the Free Software Foundation.;;This program is distributed in the hope that it will be useful,;but WITHOUT ANY WARRANTY; without even the implied warranty of;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the;GNU General Public License for more details.;;You should have received a copy of the GNU General Public License;along with this program; if not, write to the Free Software;Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.;----------------------------------------------------------;hq4x filter;Copyright (C) 2003 MaxSt ( maxst@hiend3d.com );----------------------------------------------------------%include "macros.mac"EXTSYM vidbuffer,curblank,MMXSupport,GUIOn,GUIOn2,vidbufferofsb,FilteredGUIEXTSYM resolutn,lineleft,cfield,hirestiledat,newengen,SpecialLine,hqFilterEXTSYM AddEndBytes,NumBytesPerLine,WinVidMemStart,BitConv32Ptr,RGBtoYUVPtrEXTSYM prevline,nextline,deltaptr,xcounter,w1,w2,w3,w4,w5,w6,w7,w8,w9EXTSYM c1,c2,c3,c4,c6,c7,c8,c9,reg_blank,const3,const5,const6,const7,cross,thresholdSECTION .text%macro AUXADDRESS 0    mov     ecx, edi    add     ecx, ebx    add     ecx, ebx%endmacro%macro TestDiff 2    mov     edx,[%1]    sub     edx,[%2]    jz      %%fin    mov     edx,[%1]    shl     edx,2    add     edx,[RGBtoYUVPtr]    movd    mm1,[edx]    movq    mm5,mm1    mov     edx,[%2]    shl     edx,2    add     edx,[RGBtoYUVPtr]    movd    mm2,[edx]    psubusb mm1,mm2    psubusb mm2,mm5    por     mm1,mm2    psubusb mm1,[threshold]    movd    edx,mm1%%fin:%endmacro%macro DiffOrNot 4   TestDiff %1,%2   test edx,edx   jz   %%same   %3   jmp %%fin%%same:   %4%%fin%endmacro%macro DiffOrNot 8   TestDiff %1,%2   test edx,edx   jz   %%same   %3   %4   %5   jmp %%fin%%same:   %6   %7   %8%%fin%endmacro%macro DiffOrNot 10   TestDiff %1,%2   test edx,edx   jz near %%same   %3   %4   %5   %6   jmp %%fin%%same:   %7   %8   %9   %10%%fin%endmacro%macro DiffOrNot 14   TestDiff %1,%2   test edx,edx   jz near %%same   %3   %4   %5   %6   %7   %8   jmp %%fin%%same:   %9   %10   %11   %12   %13   %14%%fin%endmacro%macro Interp1 3    mov edx,%2    shl edx,2    add edx,%3    sub edx,%2    shr edx,2    mov %1,edx%endmacro%macro Interp2 4    mov edx,%2    shl edx,1    add edx,%3    add edx,%4    shr edx,2    mov %1,edx%endmacro%macro Interp3 2    movd       mm1, eax    movd       mm2, %2    punpcklbw  mm1, [reg_blank]    punpcklbw  mm2, [reg_blank]    pmullw     mm1, [const7]    paddw      mm1, mm2    psrlw      mm1, 3    packuswb   mm1, [reg_blank]    movd       %1, mm1%endmacro%macro Interp5 3    mov edx,%2    add edx,%3    shr edx,1    mov %1,edx%endmacro%macro Interp6 3    movd       mm1, eax    movd       mm2, %2    movd       mm3, %3    punpcklbw  mm1, [reg_blank]    punpcklbw  mm2, [reg_blank]    punpcklbw  mm3, [reg_blank]    pmullw     mm1, [const5]    psllw      mm2, 1    paddw      mm1, mm3    paddw      mm1, mm2    psrlw      mm1, 3    packuswb   mm1, [reg_blank]    movd       %1, mm1%endmacro%macro Interp7 3    movd       mm1, eax    movd       mm2, %2    movd       mm3, %3    punpcklbw  mm1, [reg_blank]    punpcklbw  mm2, [reg_blank]    punpcklbw  mm3, [reg_blank]    pmullw     mm1, [const6]    paddw      mm2, mm3    paddw      mm1, mm2    psrlw      mm1, 3    packuswb   mm1, [reg_blank]    movd       %1, mm1%endmacro%macro Interp8 3    movd       mm1, %2    movd       mm2, %3    punpcklbw  mm1, [reg_blank]    punpcklbw  mm2, [reg_blank]    pmullw     mm1, [const5]    pmullw     mm2, [const3]    paddw      mm1, mm2    psrlw      mm1, 3    packuswb   mm1, [reg_blank]    movd       %1, mm1%endmacro%macro PIXEL00_0 0    mov [edi],eax%endmacro%macro PIXEL00_11 0    Interp1 [edi],eax,[c4]%endmacro%macro PIXEL00_12 0    Interp1 [edi],eax,[c2]%endmacro%macro PIXEL00_20 0    Interp2 [edi],eax,[c2],[c4]%endmacro%macro PIXEL00_50 0    Interp5 [edi],[c2],[c4]%endmacro%macro PIXEL00_80 0    Interp8 [edi],eax,[c1]%endmacro%macro PIXEL00_81 0    Interp8 [edi],eax,[c4]%endmacro%macro PIXEL00_82 0    Interp8 [edi],eax,[c2]%endmacro%macro PIXEL01_0 0    mov [edi+4],eax%endmacro%macro PIXEL01_10 0    Interp1 [edi+4],eax,[c1]%endmacro%macro PIXEL01_12 0    Interp1 [edi+4],eax,[c2]%endmacro%macro PIXEL01_14 0    Interp1 [edi+4],[c2],eax%endmacro%macro PIXEL01_21 0    Interp2 [edi+4],[c2],eax,[c4]%endmacro%macro PIXEL01_31 0    Interp3 [edi+4],[c4]%endmacro%macro PIXEL01_50 0    Interp5 [edi+4],[c2],eax%endmacro%macro PIXEL01_60 0    Interp6 [edi+4],[c2],[c4]%endmacro%macro PIXEL01_61 0    Interp6 [edi+4],[c2],[c1]%endmacro%macro PIXEL01_82 0    Interp8 [edi+4],eax,[c2]%endmacro%macro PIXEL01_83 0    Interp8 [edi+4],[c2],[c4]%endmacro%macro PIXEL02_0 0    mov [edi+8],eax%endmacro%macro PIXEL02_10 0    Interp1 [edi+8],eax,[c3]%endmacro%macro PIXEL02_11 0    Interp1 [edi+8],eax,[c2]%endmacro%macro PIXEL02_13 0    Interp1 [edi+8],[c2],eax%endmacro%macro PIXEL02_21 0    Interp2 [edi+8],[c2],eax,[c6]%endmacro%macro PIXEL02_32 0    Interp3 [edi+8],[c6]%endmacro%macro PIXEL02_50 0    Interp5 [edi+8],[c2],eax%endmacro%macro PIXEL02_60 0    Interp6 [edi+8],[c2],[c6]%endmacro%macro PIXEL02_61 0    Interp6 [edi+8],[c2],[c3]%endmacro%macro PIXEL02_81 0    Interp8 [edi+8],eax,[c2]%endmacro%macro PIXEL02_83 0    Interp8 [edi+8],[c2],[c6]%endmacro%macro PIXEL03_0 0    mov [edi+12],eax%endmacro%macro PIXEL03_11 0    Interp1 [edi+12],eax,[c2]%endmacro%macro PIXEL03_12 0    Interp1 [edi+12],eax,[c6]%endmacro%macro PIXEL03_20 0    Interp2 [edi+12],eax,[c2],[c6]%endmacro%macro PIXEL03_50 0    Interp5 [edi+12],[c2],[c6]%endmacro%macro PIXEL03_80 0    Interp8 [edi+12],eax,[c3]%endmacro%macro PIXEL03_81 0    Interp8 [edi+12],eax,[c2]%endmacro%macro PIXEL03_82 0    Interp8 [edi+12],eax,[c6]%endmacro%macro PIXEL10_0 0    mov [edi+ebx],eax%endmacro%macro PIXEL10_10 0    Interp1 [edi+ebx],eax,[c1]%endmacro%macro PIXEL10_11 0    Interp1 [edi+ebx],eax,[c4]%endmacro%macro PIXEL10_13 0    Interp1 [edi+ebx],[c4],eax%endmacro%macro PIXEL10_21 0    Interp2 [edi+ebx],[c4],eax,[c2]%endmacro%macro PIXEL10_32 0    Interp3 [edi+ebx],[c2]%endmacro%macro PIXEL10_50 0    Interp5 [edi+ebx],[c4],eax%endmacro%macro PIXEL10_60 0    Interp6 [edi+ebx],[c4],[c2]%endmacro%macro PIXEL10_61 0    Interp6 [edi+ebx],[c4],[c1]%endmacro%macro PIXEL10_81 0    Interp8 [edi+ebx],eax,[c4]%endmacro%macro PIXEL10_83 0    Interp8 [edi+ebx],[c4],[c2]%endmacro%macro PIXEL11_0 0    mov [edi+ebx+4],eax%endmacro%macro PIXEL11_30 0    Interp3 [edi+ebx+4],[c1]%endmacro%macro PIXEL11_31 0    Interp3 [edi+ebx+4],[c4]%endmacro%macro PIXEL11_32 0    Interp3 [edi+ebx+4],[c2]%endmacro%macro PIXEL11_70 0    Interp7 [edi+ebx+4],[c4],[c2]%endmacro%macro PIXEL12_0 0    mov [edi+ebx+8],eax%endmacro%macro PIXEL12_30 0    Interp3 [edi+ebx+8],[c3]%endmacro%macro PIXEL12_31 0    Interp3 [edi+ebx+8],[c2]%endmacro%macro PIXEL12_32 0    Interp3 [edi+ebx+8],[c6]%endmacro%macro PIXEL12_70 0    Interp7 [edi+ebx+8],[c6],[c2]%endmacro%macro PIXEL13_0 0    mov [edi+ebx+12],eax%endmacro%macro PIXEL13_10 0    Interp1 [edi+ebx+12],eax,[c3]%endmacro%macro PIXEL13_12 0    Interp1 [edi+ebx+12],eax,[c6]%endmacro%macro PIXEL13_14 0    Interp1 [edi+ebx+12],[c6],eax%endmacro%macro PIXEL13_21 0    Interp2 [edi+ebx+12],[c6],eax,[c2]%endmacro%macro PIXEL13_31 0    Interp3 [edi+ebx+12],[c2]%endmacro%macro PIXEL13_50 0    Interp5 [edi+ebx+12],[c6],eax%endmacro%macro PIXEL13_60 0    Interp6 [edi+ebx+12],[c6],[c2]%endmacro%macro PIXEL13_61 0    Interp6 [edi+ebx+12],[c6],[c3]%endmacro%macro PIXEL13_82 0    Interp8 [edi+ebx+12],eax,[c6]%endmacro%macro PIXEL13_83 0    Interp8 [edi+ebx+12],[c6],[c2]%endmacro%macro PIXEL20_0 0    mov [ecx],eax%endmacro%macro PIXEL20_10 0    Interp1 [ecx],eax,[c7]%endmacro%macro PIXEL20_12 0    Interp1 [ecx],eax,[c4]%endmacro%macro PIXEL20_14 0    Interp1 [ecx],[c4],eax%endmacro%macro PIXEL20_21 0    Interp2 [ecx],[c4],eax,[c8]%endmacro%macro PIXEL20_31 0    Interp3 [ecx],[c8]%endmacro%macro PIXEL20_50 0    Interp5 [ecx],[c4],eax%endmacro%macro PIXEL20_60 0    Interp6 [ecx],[c4],[c8]%endmacro%macro PIXEL20_61 0    Interp6 [ecx],[c4],[c7]%endmacro%macro PIXEL20_82 0    Interp8 [ecx],eax,[c4]%endmacro%macro PIXEL20_83 0    Interp8 [ecx],[c4],[c8]%endmacro%macro PIXEL21_0 0    mov [ecx+4],eax%endmacro%macro PIXEL21_30 0    Interp3 [ecx+4],[c7]%endmacro%macro PIXEL21_31 0    Interp3 [ecx+4],[c8]%endmacro%macro PIXEL21_32 0    Interp3 [ecx+4],[c4]%endmacro%macro PIXEL21_70 0    Interp7 [ecx+4],[c4],[c8]%endmacro%macro PIXEL22_0 0    mov [ecx+8],eax%endmacro%macro PIXEL22_30 0    Interp3 [ecx+8],[c9]%endmacro%macro PIXEL22_31 0    Interp3 [ecx+8],[c6]%endmacro%macro PIXEL22_32 0    Interp3 [ecx+8],[c8]%endmacro%macro PIXEL22_70 0    Interp7 [ecx+8],[c6],[c8]%endmacro%macro PIXEL23_0 0    mov [ecx+12],eax%endmacro%macro PIXEL23_10 0    Interp1 [ecx+12],eax,[c9]%endmacro%macro PIXEL23_11 0    Interp1 [ecx+12],eax,[c6]%endmacro%macro PIXEL23_13 0    Interp1 [ecx+12],[c6],eax%endmacro%macro PIXEL23_21 0    Interp2 [ecx+12],[c6],eax,[c8]%endmacro%macro PIXEL23_32 0    Interp3 [ecx+12],[c8]%endmacro%macro PIXEL23_50 0    Interp5 [ecx+12],[c6],eax%endmacro%macro PIXEL23_60 0    Interp6 [ecx+12],[c6],[c8]%endmacro%macro PIXEL23_61 0    Interp6 [ecx+12],[c6],[c9]%endmacro%macro PIXEL23_81 0    Interp8 [ecx+12],eax,[c6]%endmacro%macro PIXEL23_83 0    Interp8 [ecx+12],[c6],[c8]%endmacro%macro PIXEL30_0 0    mov [ecx+ebx],eax%endmacro%macro PIXEL30_11 0    Interp1 [ecx+ebx],eax,[c8]%endmacro%macro PIXEL30_12 0    Interp1 [ecx+ebx],eax,[c4]%endmacro%macro PIXEL30_20 0    Interp2 [ecx+ebx],eax,[c8],[c4]%endmacro%macro PIXEL30_50 0    Interp5 [ecx+ebx],[c8],[c4]%endmacro%macro PIXEL30_80 0    Interp8 [ecx+ebx],eax,[c7]%endmacro%macro PIXEL30_81 0    Interp8 [ecx+ebx],eax,[c8]%endmacro%macro PIXEL30_82 0    Interp8 [ecx+ebx],eax,[c4]%endmacro%macro PIXEL31_0 0    mov [ecx+ebx+4],eax%endmacro%macro PIXEL31_10 0    Interp1 [ecx+ebx+4],eax,[c7]%endmacro%macro PIXEL31_11 0    Interp1 [ecx+ebx+4],eax,[c8]%endmacro%macro PIXEL31_13 0    Interp1 [ecx+ebx+4],[c8],eax%endmacro%macro PIXEL31_21 0    Interp2 [ecx+ebx+4],[c8],eax,[c4]%endmacro%macro PIXEL31_32 0    Interp3 [ecx+ebx+4],[c4]%endmacro%macro PIXEL31_50 0    Interp5 [ecx+ebx+4],[c8],eax%endmacro%macro PIXEL31_60 0    Interp6 [ecx+ebx+4],[c8],[c4]%endmacro%macro PIXEL31_61 0    Interp6 [ecx+ebx+4],[c8],[c7]%endmacro%macro PIXEL31_81 0    Interp8 [ecx+ebx+4],eax,[c8]%endmacro

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -