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.