From 55a02bfcf248369d12c7d07012aec5d29bf84049 Mon Sep 17 00:00:00 2001 From: pagefault <> Date: Fri, 10 Aug 2001 19:36:47 +0000 Subject: [PATCH] Removed MMX save option; forced MMX always on if detected --- zsnes/src/gui/gui.asm | 6 +++--- zsnes/src/gui/guikeys.inc | 3 +-- zsnes/src/gui/guimouse.inc | 30 ++++++++++++++---------------- zsnes/src/ui.asm | 10 +--------- 4 files changed, 19 insertions(+), 30 deletions(-) diff --git a/zsnes/src/gui/gui.asm b/zsnes/src/gui/gui.asm index 4c555403..b4e552ac 100644 --- a/zsnes/src/gui/gui.asm +++ b/zsnes/src/gui/gui.asm @@ -125,7 +125,7 @@ EXTSYM GetScreen,GUITBWVID EXTSYM Clear2xSaIBuffer EXTSYM MouseWindow EXTSYM GotoHomepage -EXTSYM cfgcvidmode,ExitFromGUI +EXTSYM cfgcvidmode, ExitFromGUI EXTSYM GUIWFVID EXTSYM cfgvsync,newgfx16b EXTSYM cfgscanline,cfginterp @@ -146,11 +146,13 @@ EXTSYM pl1upk,pl1downk,pl1leftk,pl1rightk,pl1Lk,pl1Rk,pl1Ak,pl1Bk EXTSYM deinitipx EXTSYM InitModem EXTSYM outofmemfix,yesoutofmemory + EXTSYM CReadHead,ReadHead,CFWriteHead,CFWriteStart EXTSYM JoyX,JoyY,JoyMinX,JoyMinY,JoyMaxX,JoyMaxY,JoyMinX209,JoyMaxX209 EXTSYM JoyMinY209,JoyMaxY209,GetCoords,GetCoords3 EXTSYM MultiTap,SFXEnable EXTSYM RestoreSystemVars + EXTSYM TCPIPStartServer EXTSYM TCPIPInitConnectToServer EXTSYM TCPIPWaitForConnection @@ -168,7 +170,6 @@ EXTSYM DeInitModemC EXTSYM ipxgetchar,ipxsendchar,TCPIPStoreByte EXTSYM TCPIPGetByte,GUIBIFIL EXTSYM ModemSendChar -EXTSYM MMXCheck %ifdef __LINUX__ EXTSYM numlockptr %endif @@ -583,7 +584,6 @@ NEWSYM DisableScreenSaver, db 0 NEWSYM TrapMouseCursor, db 1 NEWSYM KeyQuickClock, dd 0 NEWSYM KeyQuickMinimize, dd 0 -NEWSYM MMXSupport, db 1 GUIsave equ $-GUIRAdd diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index 529a7f34..3f6631dd 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -832,8 +832,7 @@ GUIOptionKeys: ;.novsync cmp dh,'M' jne .nommxcopy - xor byte[MMXSupport],1 - call MMXCheck + xor byte[FPUCopy],2 .nommxcopy cmp dh,'U' jne .nousepl34 diff --git a/zsnes/src/gui/guimouse.inc b/zsnes/src/gui/guimouse.inc index a1c94fa1..72e3be47 100644 --- a/zsnes/src/gui/guimouse.inc +++ b/zsnes/src/gui/guimouse.inc @@ -1305,6 +1305,19 @@ GUIWinClicked: %endif %endmacro +%macro GUIClickCButtonMMX 3 + cmp eax,%1+1 + jl %%noclick + cmp edx,%2+3 + jl %%noclick + cmp eax,%1+6 + jg %%noclick + cmp edx,%2+8 + jg %%noclick + xor %3,2 +%%noclick +%endmacro + %macro GUIClickCButtonI 3 cmp eax,%1+1 jl %%noclick @@ -1321,21 +1334,6 @@ GUIWinClicked: %%noclick %endmacro -%macro GUIClickCButtonMMX 4 - cmp eax,%1+1 - jl %%noclick - cmp edx,%2+3 - jl %%noclick - cmp eax,%1+6 - jg %%noclick - cmp edx,%2+8 - jg %%noclick - xor %3,%4 - call MMXCheck - ret -%%noclick -%endmacro - %macro GUISlidebarPostImpl 13 ; x1,y1,x2,y2,upjump,downjump,holdpos,scsize,view,cur,listsize cmp dword[%11],0 je near %%nolower @@ -2154,7 +2152,7 @@ DisplayGUIOptionClick: GUIClickCButton2 11,36,byte[newengen],byte[cfgnewgfx],1 .invalidng ; GUIClickCButton2 11,46,byte[vsyncon],byte[cfgvsync],1 - GUIClickCButtonMMX 11,56,byte[MMXSupport],1 + GUIClickCButtonMMX 11,56,byte[FPUCopy] GUIClickCButtonM 11,66,byte[pl12s34] %ifdef __MSDOS__ GUIClickCButton 11,76,byte[SidewinderFix] diff --git a/zsnes/src/ui.asm b/zsnes/src/ui.asm index a40acd8f..1b81cd9a 100644 --- a/zsnes/src/ui.asm +++ b/zsnes/src/ui.asm @@ -33,7 +33,7 @@ EXTSYM smallscreenon,spcon EXTSYM statefileloc,LatestSave EXTSYM Create_File,Delete_File,Open_File,Get_File_Date,Close_File,Change_Dir,Get_Dir EXTSYM romloadskip -EXTSYM cfgloadgdir,cfgloadsdir,MMXSupport +EXTSYM cfgloadgdir,cfgloadsdir EXTSYM init18_2hz EXTSYM OSExit %ifdef __LINUX__ @@ -1568,8 +1568,6 @@ NEWSYM DosExit ; Terminate Program NEWSYM MMXCheck ; Check for cpu that doesn't support CPUID - cmp byte[MMXSupport],0 - je near .nommx3 mov edx,cpuidfname call Open_File jc .skipcheck @@ -1589,7 +1587,6 @@ NEWSYM MMXCheck ; MMX support mov byte[FPUCopy],0 - mov byte[MMXSupport],0 mov eax,1 CPUID @@ -1601,7 +1598,6 @@ NEWSYM MMXCheck test edx,1 << 23 jz .nommx mov byte[FPUCopy],2 - mov byte[MMXSupport],1 mov edx,YesMMX call PrintStr .nommx @@ -1610,9 +1606,5 @@ NEWSYM MMXCheck call Delete_File .nommx2 ret -.nommx3 - mov byte[FPUCopy],0 - mov byte[MMXSupport],0 - ret NEWSYM UIAsmEnd