diff --git a/desmume/src/NDSSystem.h b/desmume/src/NDSSystem.h
index f4ad4c6cc..7052b4ebd 100644
--- a/desmume/src/NDSSystem.h
+++ b/desmume/src/NDSSystem.h
@@ -598,7 +598,6 @@ extern struct TCommonSettings
} gamehacks;
int StylusPressure;
- bool StylusJitter;
bool dispLayers[2][5];
diff --git a/desmume/src/frontend/cocoa/DefaultUserPrefs.plist b/desmume/src/frontend/cocoa/DefaultUserPrefs.plist
index cafd98073..3bc98772b 100644
--- a/desmume/src/frontend/cocoa/DefaultUserPrefs.plist
+++ b/desmume/src/frontend/cocoa/DefaultUserPrefs.plist
@@ -66,14 +66,14 @@
Emulation_StylusPressure
50
- Emulation_StylusEnableJitter
-
Emulation_UseDebugConsole
Emulation_UseExternalBIOSImages
Emulation_UseExternalFirmwareImage
+ Emulation_UseGameSpecificHacks
+
EmulationSlot1_DeviceType
1
FirmwareConfig_Birthday
@@ -702,8 +702,6 @@
Microphone_HardwareMicMute
- Render3D_DepthComparisonThreshold
- 0
Render3D_EdgeMarking
Render3D_Fog
diff --git a/desmume/src/frontend/cocoa/cocoa_GPU.h b/desmume/src/frontend/cocoa/cocoa_GPU.h
index 4d0902946..22841f872 100644
--- a/desmume/src/frontend/cocoa/cocoa_GPU.h
+++ b/desmume/src/frontend/cocoa/cocoa_GPU.h
@@ -94,7 +94,6 @@ class GPUEventHandlerOSX;
@property (assign) BOOL render3DEdgeMarking;
@property (assign) BOOL render3DFog;
@property (assign) BOOL render3DTextures;
-@property (assign) NSUInteger render3DDepthComparisonThreshold;
@property (assign) NSUInteger render3DThreads;
@property (assign) BOOL render3DLineHack;
@property (assign) BOOL render3DMultisample;
diff --git a/desmume/src/frontend/cocoa/cocoa_GPU.mm b/desmume/src/frontend/cocoa/cocoa_GPU.mm
index 6f179898c..d8b5e314f 100644
--- a/desmume/src/frontend/cocoa/cocoa_GPU.mm
+++ b/desmume/src/frontend/cocoa/cocoa_GPU.mm
@@ -106,7 +106,6 @@ public:
@dynamic render3DEdgeMarking;
@dynamic render3DFog;
@dynamic render3DTextures;
-@dynamic render3DDepthComparisonThreshold;
@dynamic render3DThreads;
@dynamic render3DLineHack;
@dynamic render3DMultisample;
@@ -386,22 +385,6 @@ public:
return state;
}
-- (void) setRender3DDepthComparisonThreshold:(NSUInteger)threshold
-{
- gpuEvent->Render3DLock();
- CommonSettings.GFX3D_Zelda_Shadow_Depth_Hack = threshold;
- gpuEvent->Render3DUnlock();
-}
-
-- (NSUInteger) render3DDepthComparisonThreshold
-{
- gpuEvent->Render3DLock();
- const NSUInteger threshold = (NSUInteger)CommonSettings.GFX3D_Zelda_Shadow_Depth_Hack;
- gpuEvent->Render3DUnlock();
-
- return threshold;
-}
-
- (void) setRender3DThreads:(NSUInteger)numberThreads
{
NSUInteger numberCores = [[NSProcessInfo processInfo] activeProcessorCount];
diff --git a/desmume/src/frontend/cocoa/cocoa_core.h b/desmume/src/frontend/cocoa/cocoa_core.h
index c30ebcedf..83857c24a 100644
--- a/desmume/src/frontend/cocoa/cocoa_core.h
+++ b/desmume/src/frontend/cocoa/cocoa_core.h
@@ -121,6 +121,7 @@ typedef struct
@property (assign) NSUInteger emulationFlags;
@property (assign) BOOL emuFlagAdvancedBusLevelTiming;
@property (assign) BOOL emuFlagRigorousTiming;
+@property (assign) BOOL emuFlagUseGameSpecificHacks;
@property (assign) BOOL emuFlagUseExternalBios;
@property (assign) BOOL emuFlagEmulateBiosInterrupts;
@property (assign) BOOL emuFlagPatchDelayLoop;
diff --git a/desmume/src/frontend/cocoa/cocoa_core.mm b/desmume/src/frontend/cocoa/cocoa_core.mm
index 359b6bd47..2eed0949b 100644
--- a/desmume/src/frontend/cocoa/cocoa_core.mm
+++ b/desmume/src/frontend/cocoa/cocoa_core.mm
@@ -98,6 +98,7 @@ volatile bool execute = true;
@dynamic emulationFlags;
@synthesize emuFlagAdvancedBusLevelTiming;
@synthesize emuFlagRigorousTiming;
+@dynamic emuFlagUseGameSpecificHacks;
@synthesize emuFlagUseExternalBios;
@synthesize emuFlagEmulateBiosInterrupts;
@synthesize emuFlagPatchDelayLoop;
@@ -595,6 +596,23 @@ volatile bool execute = true;
return theFlags;
}
+- (void) setEmuFlagUseGameSpecificHacks:(BOOL)useTiming
+{
+ pthread_rwlock_wrlock(&threadParam.rwlockCoreExecute);
+ CommonSettings.gamehacks.en = (useTiming) ? true : false;
+ CommonSettings.gamehacks.apply();
+ pthread_rwlock_unlock(&threadParam.rwlockCoreExecute);
+}
+
+- (BOOL) emuFlagUseGameSpecificHacks
+{
+ pthread_rwlock_rdlock(&threadParam.rwlockCoreExecute);
+ const BOOL useTiming = (CommonSettings.gamehacks.en) ? YES : NO;
+ pthread_rwlock_unlock(&threadParam.rwlockCoreExecute);
+
+ return useTiming;
+}
+
- (void) setCpuEmulationEngine:(NSInteger)engineID
{
OSSpinLockLock(&spinlockCPUEmulationEngine);
diff --git a/desmume/src/frontend/cocoa/cocoa_input.h b/desmume/src/frontend/cocoa/cocoa_input.h
index 8a8652277..59cefc235 100644
--- a/desmume/src/frontend/cocoa/cocoa_input.h
+++ b/desmume/src/frontend/cocoa/cocoa_input.h
@@ -99,7 +99,6 @@ typedef struct
NSPoint touchLocation;
NSInteger paddleAdjust;
NSInteger stylusPressure;
- BOOL stylusEnableJitter;
float micLevel;
BOOL hardwareMicMute;
@@ -124,7 +123,6 @@ typedef struct
@property (assign) BOOL autohold;
@property (assign) NSInteger paddleAdjust;
@property (assign) NSInteger stylusPressure;
-@property (assign) BOOL stylusEnableJitter;
@property (readonly) BOOL isHardwareMicAvailable;
@property (readonly) BOOL isHardwareMicIdle;
@property (readonly) BOOL isHardwareMicInClip;
diff --git a/desmume/src/frontend/cocoa/cocoa_input.mm b/desmume/src/frontend/cocoa/cocoa_input.mm
index 9fda1d973..f74a65b22 100644
--- a/desmume/src/frontend/cocoa/cocoa_input.mm
+++ b/desmume/src/frontend/cocoa/cocoa_input.mm
@@ -38,7 +38,6 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
@dynamic autohold;
@synthesize paddleAdjust;
@synthesize stylusPressure;
-@synthesize stylusEnableJitter;
@dynamic isHardwareMicAvailable;
@dynamic isHardwareMicIdle;
@dynamic isHardwareMicInClip;
@@ -346,7 +345,6 @@ SineWaveGenerator sineWaveGenerator(250.0, MIC_SAMPLE_RATE);
// Setup the DS touch pad.
CommonSettings.StylusPressure = (int)[self stylusPressure];
- CommonSettings.StylusJitter = ([self stylusEnableJitter]) ? true : false;
if (isTouchDown)
{
diff --git a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.strings b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.strings
index 7e9d020cf..eb15010b9 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 620817e07..e8e288d17 100644
--- a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib
+++ b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.xib
@@ -2955,7 +2955,7 @@
YES