diff --git a/desmume/src/frontend/cocoa/cocoa_GPU.mm b/desmume/src/frontend/cocoa/cocoa_GPU.mm
index f28c46d17..dc77caa60 100644
--- a/desmume/src/frontend/cocoa/cocoa_GPU.mm
+++ b/desmume/src/frontend/cocoa/cocoa_GPU.mm
@@ -412,11 +412,20 @@ public:
{
rendererID = CORE3DLIST_NULL;
}
- else if (rendererID > GPU_3D_RENDERER_COUNT)
+ else if (rendererID >= GPU_3D_RENDERER_COUNT)
{
+ puts("DeSmuME: Invalid 3D renderer chosen; falling back to SoftRasterizer.");
rendererID = CORE3DLIST_SWRASTERIZE;
}
+#if defined(__ppc__) || defined(__ppc64__)
+ if ( (rendererID != CORE3DLIST_NULL) && (rendererID != CORE3DLIST_SWRASTERIZE) )
+ {
+ puts("DeSmuME: PowerPC Macs only support SoftRasterizer; falling back to SoftRasterizer.");
+ rendererID = CORE3DLIST_SWRASTERIZE;
+ }
+#endif
+
gpuEvent->ApplyRender3DSettingsLock();
GPU->Set3DRendererByID(rendererID);
gpuEvent->ApplyRender3DSettingsUnlock();
diff --git a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.strings b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.strings
index a26d816f4..f2059bc44 100644
Binary files a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.strings and b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.strings differ
diff --git a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib
index afc0e5a7d..7e10ec7ba 100644
--- a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib
+++ b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib
@@ -53121,22 +53121,6 @@ xcjGRsbDx0HHv8g9yLzJOsm5yjjKt8s2y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ
9143
-
value: selection.cdsGPU.render3DTextures
@@ -60838,6 +60822,186 @@ xcjGRsbDx0HHv8g9yLzJOsm5yjjKt8s2y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ
12254
+
+
+ enabled: isAppRunningOnPowerPC
+
+
+
+
+
+ enabled: isAppRunningOnPowerPC
+ enabled
+ isAppRunningOnPowerPC
+
+ NSValueTransformerName
+ NSNegateBoolean
+
+ 2
+
+
+ 12258
+
+
+
+ enabled: isAppRunningOnPowerPC
+
+
+
+
+
+ enabled: isAppRunningOnPowerPC
+ enabled
+ isAppRunningOnPowerPC
+
+ NSValueTransformerName
+ NSNegateBoolean
+
+ 2
+
+
+ 12260
+
+
+
+ enabled: isAppRunningOnPowerPC
+
+
+
+
+
+ enabled: isAppRunningOnPowerPC
+ enabled
+ isAppRunningOnPowerPC
+
+ NSValueTransformerName
+ NSNegateBoolean
+
+ 2
+
+
+ 12262
+
+
+
+ enabled: isAppRunningOnPowerPC
+
+
+
+
+
+ enabled: isAppRunningOnPowerPC
+ enabled
+ isAppRunningOnPowerPC
+
+ NSValueTransformerName
+ NSNegateBoolean
+
+ 2
+
+
+ 12264
+
+
+
+ enabled: isAppRunningOnPowerPC
+
+
+
+
+
+ enabled: isAppRunningOnPowerPC
+ enabled
+ isAppRunningOnPowerPC
+
+ NSValueTransformerName
+ NSNegateBoolean
+
+ 2
+
+
+ 12266
+
+
+
+ enabled: isAppRunningOnPowerPC
+
+
+
+
+
+ enabled: isAppRunningOnPowerPC
+ enabled
+ isAppRunningOnPowerPC
+
+ NSValueTransformerName
+ NSNegateBoolean
+
+ 2
+
+
+ 12268
+
+
+
+ enabled: isAppRunningOnPowerPC
+
+
+
+
+
+ enabled: isAppRunningOnPowerPC
+ enabled
+ isAppRunningOnPowerPC
+
+ NSValueTransformerName
+ NSNegateBoolean
+
+ 2
+
+
+ 12270
+
+
+
+ selectedTag: selection.cdsGPU.render3DRenderingEngine
+
+
+
+
+
+ selectedTag: selection.cdsGPU.render3DRenderingEngine
+ selectedTag
+ selection.cdsGPU.render3DRenderingEngine
+
+ NSConditionallySetsEnabled
+
+
+ 2
+
+
+ 12273
+
+
+
+ enabled: isAppRunningOnPowerPC
+
+
+
+
+
+ enabled: isAppRunningOnPowerPC
+ enabled
+ isAppRunningOnPowerPC
+
+ NSValueTransformerName
+ NSNegateBoolean
+
+ 2
+
+
+ 12275
+
@@ -86860,7 +87024,7 @@ xcjGRsbDx0HHv8g9yLzJOsm5yjjKt8s2y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ
ToolTip
- Sets the dynarec engine to emulate the ARM7 and ARM9 CPUs by default. It features far superior performance to the Interpreter engine, but is not compatible with all configurations. Also, some ROMs may not work or may show erratic behavior when using this engine. (This feature is not available on a PowerPC-based Mac.)
+ Sets the dynarec engine to emulate the ARM7 and ARM9 CPUs by default. It features far superior performance to the Interpreter engine, but is not compatible with all configurations. Also, some ROMs may not work or may show erratic behavior when using this engine. (Requires a Mac with an Intel processor.)com.apple.InterfaceBuilder.CocoaPlugin
@@ -86881,7 +87045,7 @@ xcjGRsbDx0HHv8g9yLzJOsm5yjjKt8s2y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ
ToolTip
- Uses the dynarec engine to emulate the ARM7 and ARM9 CPUs. It features far superior performance to the interpreter engine, but is not compatible with all configurations. Also, some ROMs may not work or may show erratic behavior when using this engine. (This feature is not available on a PowerPC-based Mac.) [Changes to the CPU emulation engine will only take effect after a ROM is loaded or after the emulator is reset.]
+ Uses the dynarec engine to emulate the ARM7 and ARM9 CPUs. It features far superior performance to the interpreter engine, but is not compatible with all configurations. Also, some ROMs may not work or may show erratic behavior when using this engine. (Requires a Mac with an Intel processor.) [Changes to the CPU emulation engine will only take effect after a ROM is loaded or after the emulator is reset.]com.apple.InterfaceBuilder.CocoaPlugin
@@ -86905,7 +87069,7 @@ xcjGRsbDx0HHv8g9yLzJOsm5yjjKt8s2y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ
ToolTip
- OpenGL-based 3D rendering engine. Some 3D objects may have better looking texturing, but 3D emulation is less accurate overall. Low CPU usage. However, it requires the usage of your GPU.
+ OpenGL-based 3D rendering engine. Some 3D objects may have better looking texturing, but 3D emulation is less accurate overall. Low CPU usage. However, it requires the usage of your GPU. (Not available for PowerPC Macs.)com.apple.InterfaceBuilder.CocoaPlugin
@@ -86914,7 +87078,7 @@ xcjGRsbDx0HHv8g9yLzJOsm5yjjKt8s2y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ
ToolTip
- OpenGL-based 3D rendering engine. Some 3D objects may have better looking texturing, but 3D emulation is less accurate overall. Low CPU usage. However, it requires the usage of your GPU.
+ OpenGL-based 3D rendering engine. Some 3D objects may have better looking texturing, but 3D emulation is less accurate overall. Low CPU usage. However, it requires the usage of your GPU. (Not available for PowerPC Macs.)com.apple.InterfaceBuilder.CocoaPlugin
@@ -88548,7 +88712,7 @@ xcjGRsbDx0HHv8g9yLzJOsm5yjjKt8s2y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ
- 12254
+ 12275
diff --git a/desmume/src/frontend/cocoa/userinterface/appDelegate.h b/desmume/src/frontend/cocoa/userinterface/appDelegate.h
index 7cde29dfe..1d15b7d98 100644
--- a/desmume/src/frontend/cocoa/userinterface/appDelegate.h
+++ b/desmume/src/frontend/cocoa/userinterface/appDelegate.h
@@ -47,8 +47,12 @@
NSMenu *mLoadStateSlot;
NSMenu *mSaveStateSlot;
+ BOOL isAppRunningOnPowerPC;
BOOL isAppRunningOnIntel;
+ BOOL isAppRunningOnARM64;
+
BOOL isDeveloperPlusBuild;
+
BOOL didApplicationFinishLaunching;
NSString *delayedROMFileName;
}
@@ -68,8 +72,12 @@
@property (readonly) IBOutlet NSMenu *mSaveStateSlot;
@property (readonly) IBOutlet InputPrefsView *inputPrefsView;
-@property (assign) BOOL isAppRunningOnIntel;
-@property (assign) BOOL isDeveloperPlusBuild;
+@property (readonly) BOOL isAppRunningOnPowerPC;
+@property (readonly) BOOL isAppRunningOnIntel;
+@property (readonly) BOOL isAppRunningOnARM64;
+
+@property (readonly) BOOL isDeveloperPlusBuild;
+
@property (assign) BOOL didApplicationFinishLaunching;
@property (copy) NSString *delayedROMFileName;
diff --git a/desmume/src/frontend/cocoa/userinterface/appDelegate.mm b/desmume/src/frontend/cocoa/userinterface/appDelegate.mm
index 1147e5fd6..416ce34e1 100644
--- a/desmume/src/frontend/cocoa/userinterface/appDelegate.mm
+++ b/desmume/src/frontend/cocoa/userinterface/appDelegate.mm
@@ -54,7 +54,9 @@
@synthesize wifiSettingsPanelDelegate;
@synthesize migrationDelegate;
+@synthesize isAppRunningOnPowerPC;
@synthesize isAppRunningOnIntel;
+@synthesize isAppRunningOnARM64;
@synthesize isDeveloperPlusBuild;
@synthesize didApplicationFinishLaunching;
@synthesize delayedROMFileName;
@@ -67,12 +69,24 @@
return nil;
}
+#if defined(__ppc__) || defined(__ppc64__)
+ isAppRunningOnPowerPC = YES;
+#else
+ isAppRunningOnPowerPC = NO;
+#endif
+
// Determine if we're running on Intel or non-Intel (PowerPC or ARM64).
#if defined(__i386__) || defined(__x86_64__)
isAppRunningOnIntel = YES;
#else
isAppRunningOnIntel = NO;
#endif
+
+#if defined(__aarch64__)
+ isAppRunningOnARM64 = YES;
+#else
+ isAppRunningOnARM64 = NO;
+#endif
#if defined(GDB_STUB)
isDeveloperPlusBuild = YES;
@@ -557,12 +571,6 @@
[cdsCore setEmuFlagEmulateEnsata:[[NSUserDefaults standardUserDefaults] boolForKey:@"Emulation_EmulateEnsata"]];
[cdsCore setEmuFlagDebugConsole:[[NSUserDefaults standardUserDefaults] boolForKey:@"Emulation_UseDebugConsole"]];
- // If we're not running on Intel, force the CPU emulation engine to use the interpreter engine.
- if (!isAppRunningOnIntel)
- {
- [[NSUserDefaults standardUserDefaults] setInteger:CPUEmulationEngineID_Interpreter forKey:@"Emulation_CPUEmulationEngine"];
- }
-
// Set the CPU emulation engine per user preferences.
[cdsCore setCpuEmulationEngine:[[NSUserDefaults standardUserDefaults] integerForKey:@"Emulation_CPUEmulationEngine"]];
[cdsCore setMaxJITBlockSize:[[NSUserDefaults standardUserDefaults] integerForKey:@"Emulation_MaxJITBlockSize"]];