MMX detection not working

Strictly for discussing ZSNES development and for submitting code. You can also join us on IRC at irc.libera.chat in #zsnes.
Please, no requests here.

Moderator: ZSNES Mods

Post Reply
hector
Rookie
Posts: 49
Joined: Fri Jun 09, 2006 12:47 am

MMX detection not working

Post by hector »

As you all know I have a Macbook which contains the latest Intel Core Duo chip in it, yet Zsnes thinks it doesn't have MMX. I think I found the bug in the detection routine that was causing this.

Code: Select all

Index: ui.asm
===================================================================
--- ui.asm      (revision 3259)
+++ ui.asm      (working copy)
@@ -384,7 +384,6 @@
     pushfd
     pop eax
     xor eax,edx
-    xor eax,eax
     jz .nommx
 
     ; MMX support
That last xor unconditionally sets the zero flag, which means it will always think we don't have MMX. Taking it out makes the routine correct. edx contains a copy of the flags before we try to toggle the Id bit. eax contains a copy of the flags after we attempt the toggle. If the toggle was unsuccessful (that is, eax and edx are the same) then MMX isn't available. Otherwise the toggle was successful and we enable MMX support.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Thanks.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Post Reply