bentorkington / sf2ww

A clone of Street Fighter 2 World Warrior, written from scratch in C + OpenGL
80 stars 9 forks source link

Building and running on Apple Silicon (M2) #8

Open palmerj opened 9 months ago

palmerj commented 9 months ago

Anyone tested this?

I've patched sf2types.h

diff --git a/FistBlue/sf2types.h b/FistBlue/sf2types.h
index 850c90c..96ef487 100644
--- a/FistBlue/sf2types.h
+++ b/FistBlue/sf2types.h
@@ -27,7 +27,7 @@
 #define SF2_CPU_AMD64
 #endif

-#ifdef __arm__
+#if defined(__arm__) || defined(__arm64__)
 #define SF2_ENDIAN_LITTLE
 #define SF2_CPU_ARM
 #endif

then built the roms, compiled the code with cmake, and then ran glutBasics I get a brown screen with debug info only.

Screenshot 2024-02-15 at 17 43 13

I've also tried building and running the code using the xcode project, but I got the same result.

Any tips for areas of the code to look at for platform issues?

mdreeling commented 1 month ago

@palmerj I have this running under Sonoma (14.5) and XCode 16.1 (used the same patch as you have above) - I'm wondering if its something to do with your roms? I'm able to run both the Cocoa and GLUT targets. Strongly suggest getting it running, lots of fun looking at the code.