Cocoa Port:

- Add support for changing the JIT max block size in Emulation Settings.
This commit is contained in:
rogerman 2013-04-15 23:44:21 +00:00
parent 70a2ac3fed
commit 8cd082bdde
7 changed files with 621 additions and 35 deletions

View File

@ -107,6 +107,7 @@ typedef struct
@property (assign) BOOL emuFlagDebugConsole;
@property (assign) BOOL emuFlagEmulateEnsata;
@property (assign) NSInteger cpuEmulationEngine;
@property (assign) NSInteger maxJITBlockSize;
@property (assign) NSInteger slot1DeviceType;
@property (assign) NSString *slot1StatusText;

View File

@ -62,6 +62,7 @@ volatile bool execute = true;
@synthesize emuFlagDebugConsole;
@synthesize emuFlagEmulateEnsata;
@dynamic cpuEmulationEngine;
@dynamic maxJITBlockSize;
@synthesize slot1DeviceType;
@synthesize slot1StatusText;
@ -478,6 +479,22 @@ static BOOL isCoreStarted = NO;
return engineID;
}
- (void) setMaxJITBlockSize:(NSInteger)blockSize
{
pthread_mutex_lock(&threadParam.mutexCoreExecute);
CommonSettings.jit_max_block_size = (blockSize > 0) ? blockSize : 1;
pthread_mutex_unlock(&threadParam.mutexCoreExecute);
}
- (NSInteger) maxJITBlockSize
{
pthread_mutex_lock(&threadParam.mutexCoreExecute);
const NSInteger blockSize = CommonSettings.jit_max_block_size;
pthread_mutex_unlock(&threadParam.mutexCoreExecute);
return blockSize;
}
- (void) setCoreState:(NSInteger)coreState
{
pthread_mutex_lock(&threadParam.mutexThreadExecute);

File diff suppressed because it is too large Load Diff

View File

@ -1002,6 +1002,7 @@
[[NSUserDefaults standardUserDefaults] setBool:[cdsCore emuFlagAdvancedBusLevelTiming] forKey:@"Emulation_AdvancedBusLevelTiming"];
[[NSUserDefaults standardUserDefaults] setBool:[cdsCore emuFlagRigorousTiming] forKey:@"Emulation_RigorousTiming"];
[[NSUserDefaults standardUserDefaults] setInteger:[cdsCore cpuEmulationEngine] forKey:@"Emulation_CPUEmulationEngine"];
[[NSUserDefaults standardUserDefaults] setInteger:[cdsCore maxJITBlockSize] forKey:@"Emulation_MaxJITBlockSize"];
[[NSUserDefaults standardUserDefaults] setBool:[cdsCore emuFlagUseExternalBios] forKey:@"Emulation_UseExternalBIOSImages"];
[[NSUserDefaults standardUserDefaults] setBool:[cdsCore emuFlagEmulateBiosInterrupts] forKey:@"Emulation_BIOSEmulateSWI"];
[[NSUserDefaults standardUserDefaults] setBool:[cdsCore emuFlagPatchDelayLoop] forKey:@"Emulation_BIOSPatchDelayLoopSWI"];

View File

@ -410,6 +410,7 @@
// Set the CPU emulation engine per user preferences.
[cdsCore setCpuEmulationEngine:[[NSUserDefaults standardUserDefaults] integerForKey:@"Emulation_CPUEmulationEngine"]];
[cdsCore setMaxJITBlockSize:[[NSUserDefaults standardUserDefaults] integerForKey:@"Emulation_MaxJITBlockSize"]];
// Set the SLOT-1 device settings per user preferences.
NSString *slot1R4Path = (NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"EmulationSLOT1_R4StoragePath"];