diff --git a/desmume/src/cheatSystem.cpp b/desmume/src/cheatSystem.cpp index c5b0ead87..2c27ea43f 100644 --- a/desmume/src/cheatSystem.cpp +++ b/desmume/src/cheatSystem.cpp @@ -536,6 +536,22 @@ u32 CHEATS::getSize() return list.size(); } +size_t CHEATS::getActiveCount() +{ + size_t activeCheatCount = 0; + const size_t cheatListCount = this->getSize(); + + for (size_t i = 0; i < cheatListCount; i++) + { + if (list[i].enabled) + { + activeCheatCount++; + } + } + + return activeCheatCount; +} + void CHEATS::setDescription(const char *description, u32 pos) { strncpy(list[pos].description, description, sizeof(list[pos].description)); diff --git a/desmume/src/cheatSystem.h b/desmume/src/cheatSystem.h index a37a90bcc..671c4c9e3 100644 --- a/desmume/src/cheatSystem.h +++ b/desmume/src/cheatSystem.h @@ -82,6 +82,7 @@ public: BOOL get(CHEATS_LIST *cheat, u32 pos); CHEATS_LIST* getItemByIndex(const u32 pos); u32 getSize(); + size_t getActiveCount(); void setDescription(const char *description, u32 pos); BOOL save(); BOOL load(); diff --git a/desmume/src/cocoa/cocoa_GPU.h b/desmume/src/cocoa/cocoa_GPU.h index 531f53b20..b2e9dce83 100644 --- a/desmume/src/cocoa/cocoa_GPU.h +++ b/desmume/src/cocoa/cocoa_GPU.h @@ -60,6 +60,8 @@ - (void) hideGPUType:(const NSInteger)theGpuType; - (void) showGPUType:(const NSInteger)theGpuType; +- (NSString *) render3DRenderingEngineString; + @end #ifdef __cplusplus diff --git a/desmume/src/cocoa/cocoa_GPU.mm b/desmume/src/cocoa/cocoa_GPU.mm index 3ba1885ed..beaecd991 100644 --- a/desmume/src/cocoa/cocoa_GPU.mm +++ b/desmume/src/cocoa/cocoa_GPU.mm @@ -652,6 +652,26 @@ GPU3DInterface *core3DList[] = { [self setGpuStateFlags:flags]; } +- (NSString *) render3DRenderingEngineString +{ + NSString *theString = @"Uninitialized"; + + pthread_mutex_lock(self.mutexProducer); + + if(gpu3D == NULL) + { + pthread_mutex_unlock(self.mutexProducer); + return theString; + } + + const char *theName = gpu3D->name; + theString = [NSString stringWithCString:theName encoding:NSUTF8StringEncoding]; + + pthread_mutex_unlock(self.mutexProducer); + + return theString; +} + @end void SetGPULayerState(const int gpuType, const unsigned int i, const bool state) diff --git a/desmume/src/cocoa/cocoa_cheat.h b/desmume/src/cocoa/cocoa_cheat.h index 8ee228056..49064dfea 100644 --- a/desmume/src/cocoa/cocoa_cheat.h +++ b/desmume/src/cocoa/cocoa_cheat.h @@ -111,6 +111,7 @@ - (void) remove:(CocoaDSCheatItem *)cheatItem; - (BOOL) update:(CocoaDSCheatItem *)cheatItem; - (BOOL) save; +- (NSUInteger) activeCount; - (NSMutableArray *) cheatListFromDatabase:(NSURL *)fileURL errorCode:(NSInteger *)error; - (void) applyInternalCheat:(CocoaDSCheatItem *)cheatItem; diff --git a/desmume/src/cocoa/cocoa_cheat.mm b/desmume/src/cocoa/cocoa_cheat.mm index 650d9ccb7..3327f5f54 100644 --- a/desmume/src/cocoa/cocoa_cheat.mm +++ b/desmume/src/cocoa/cocoa_cheat.mm @@ -888,6 +888,15 @@ static NSImage *iconCodeBreaker = nil; return result; } +- (NSUInteger) activeCount +{ + pthread_mutex_lock(self.cdsCore.mutexCoreExecute); + NSUInteger activeCheatsCount = self.listData->getActiveCount(); + pthread_mutex_unlock(self.cdsCore.mutexCoreExecute); + + return activeCheatsCount; +} + - (NSMutableArray *) cheatListFromDatabase:(NSURL *)fileURL errorCode:(NSInteger *)error { NSMutableArray *newDBList = nil; diff --git a/desmume/src/cocoa/cocoa_core.h b/desmume/src/cocoa/cocoa_core.h index 6f81c8d32..d5b5c7c48 100644 --- a/desmume/src/cocoa/cocoa_core.h +++ b/desmume/src/cocoa/cocoa_core.h @@ -138,6 +138,10 @@ typedef struct - (void) removeOutput:(CocoaDSOutput *)theOutput; - (void) removeAllOutputs; +- (NSString *) cpuEmulationEngineString; +- (NSString *) slot1DeviceTypeString; +- (NSString *) slot2DeviceTypeString; + @end static void* RunCoreThread(void *arg); diff --git a/desmume/src/cocoa/cocoa_core.mm b/desmume/src/cocoa/cocoa_core.mm index 3fda30c9a..c1b555ee6 100644 --- a/desmume/src/cocoa/cocoa_core.mm +++ b/desmume/src/cocoa/cocoa_core.mm @@ -759,6 +759,67 @@ static BOOL isCoreStarted = NO; [CocoaDSCore shutdownCore]; } +- (NSString *) cpuEmulationEngineString +{ + NSString *theString = @"Uninitialized"; + + switch ([self cpuEmulationEngine]) + { + case CPU_EMULATION_ENGINE_INTERPRETER: + theString = @"Interpreter"; + break; + + case CPU_EMULATION_ENGINE_DYNAMIC_RECOMPILER: + theString = @"Dynamic Recompiler"; + break; + + default: + break; + } + + return theString; +} + +- (NSString *) slot1DeviceTypeString +{ + NSString *theString = @"Uninitialized"; + + pthread_mutex_lock(&threadParam.mutexThreadExecute); + + if(slot1_device == NULL) + { + pthread_mutex_unlock(&threadParam.mutexThreadExecute); + return theString; + } + + const Slot1Info *info = slot1_device->info(); + theString = [NSString stringWithCString:info->name() encoding:NSUTF8StringEncoding]; + + pthread_mutex_unlock(&threadParam.mutexThreadExecute); + + return theString; +} + +- (NSString *) slot2DeviceTypeString +{ + NSString *theString = @"Uninitialized"; + + pthread_mutex_lock(&threadParam.mutexThreadExecute); + + if(slot2_device == NULL) + { + pthread_mutex_unlock(&threadParam.mutexThreadExecute); + return theString; + } + + const Slot2Info *info = slot2_device->info(); + theString = [NSString stringWithCString:info->name() encoding:NSUTF8StringEncoding]; + + pthread_mutex_unlock(&threadParam.mutexThreadExecute); + + return theString; +} + @end static void* RunCoreThread(void *arg) diff --git a/desmume/src/cocoa/cocoa_output.h b/desmume/src/cocoa/cocoa_output.h index c53ecd933..1a09c199c 100644 --- a/desmume/src/cocoa/cocoa_output.h +++ b/desmume/src/cocoa/cocoa_output.h @@ -101,6 +101,9 @@ typedef struct - (void) setMute:(BOOL)mute; - (NSInteger) filter; - (void) setFilter:(NSInteger)filter; +- (NSString *) audioOutputEngineString; +- (NSString *) spuInterpolationModeString; +- (NSString *) spuSyncMethodString; - (void) handleSetVolume:(NSData *)volumeData; - (void) handleSetAudioOutputEngine:(NSData *)methodIdData; - (void) handleSetSpuAdvancedLogic:(NSData *)stateData; diff --git a/desmume/src/cocoa/cocoa_output.mm b/desmume/src/cocoa/cocoa_output.mm index c08df1cb6..141e55b5c 100644 --- a/desmume/src/cocoa/cocoa_output.mm +++ b/desmume/src/cocoa/cocoa_output.mm @@ -329,6 +329,87 @@ [property setValue:[NSNumber numberWithInteger:filter] forKey:@"filter"]; } +- (NSString *) audioOutputEngineString +{ + NSString *theString = @"Uninitialized"; + + pthread_mutex_lock(self.mutexProducer); + + SoundInterface_struct *soundCore = SPU_SoundCore(); + if(soundCore == NULL) + { + pthread_mutex_unlock(self.mutexProducer); + return theString; + } + + const char *theName = soundCore->Name; + theString = [NSString stringWithCString:theName encoding:NSUTF8StringEncoding]; + + pthread_mutex_unlock(self.mutexProducer); + + return theString; +} + +- (NSString *) spuInterpolationModeString +{ + NSString *theString = @"Unknown"; + NSInteger theMode = [self spuInterpolationMode]; + + switch (theMode) + { + case SPUInterpolation_None: + theString = @"None"; + break; + + case SPUInterpolation_Linear: + theString = @"Linear"; + break; + + case SPUInterpolation_Cosine: + theString = @"Cosine"; + break; + + default: + break; + } + + return theString; +} + +- (NSString *) spuSyncMethodString +{ + NSString *theString = @"Unknown"; + NSInteger theMode = [self spuSyncMode]; + NSInteger theMethod = [self spuSyncMethod]; + + if (theMode == ESynchMode_DualSynchAsynch) + { + theString = @"Dual SPU Sync/Async"; + } + else + { + switch (theMethod) + { + case ESynchMethod_N: + theString = @"\"N\" Sync Method"; + break; + + case ESynchMethod_Z: + theString = @"\"Z\" Sync Method"; + break; + + case ESynchMethod_P: + theString = @"\"P\" Sync Method"; + break; + + default: + break; + } + } + + return theString; +} + - (void)handlePortMessage:(NSPortMessage*)portMessage { NSInteger message = (NSInteger)[portMessage msgid]; diff --git a/desmume/src/cocoa/translations/English.lproj/MainMenu.xib b/desmume/src/cocoa/translations/English.lproj/MainMenu.xib index 18ebc091a..9d4fe441d 100644 --- a/desmume/src/cocoa/translations/English.lproj/MainMenu.xib +++ b/desmume/src/cocoa/translations/English.lproj/MainMenu.xib @@ -2,9 +2,9 @@ 1050 - 12F37 + 12F45 851 - 1187.39 + 1187.40 626.00 com.apple.InterfaceBuilder.CocoaPlugin @@ -12,7 +12,6 @@ YES - YES @@ -2679,11 +2678,9 @@ {1.7976931348623157e+308, 1.7976931348623157e+308} - + 256 {400, 100} - - {{0, 0}, {1920, 1178}} {1.7976931348623157e+308, 1.7976931348623157e+308} @@ -2691,7 +2688,7 @@ YES - + 268 YES @@ -3206,11 +3203,10 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {520, 422} - NSView - + 268 YES @@ -3219,7 +3215,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{97, 463}, {96, 17}} - YES 68157504 @@ -3237,7 +3232,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{195, 457}, {265, 26}} - YES -2076180416 @@ -3298,7 +3292,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{462, 457}, {116, 26}} - YES -2076180416 @@ -3442,7 +3435,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA256 {640, 394} - YES NO YES @@ -3451,7 +3443,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA256 {640, 17} - @@ -3459,7 +3450,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA-2147483392 {{584, 0}, {16, 17}} - YES @@ -3650,7 +3640,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 17}, {640, 394}} - @@ -3661,7 +3650,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA-2147483392 {{584, 17}, {15, 102}} - NO _doScroller: @@ -3672,7 +3660,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA-2147483392 {{1, 420}, {624, 15}} - NO 1 @@ -3688,7 +3675,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 0}, {640, 17}} - @@ -3698,14 +3684,12 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{-1, 37}, {642, 412}} - 133682 - QSAAAEEgAABBmAAAQZgAAA 0.25 4 @@ -3715,7 +3699,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{197, 12}, {247, 17}} - YES 605028416 @@ -3734,12 +3717,10 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {640, 495} - - InputPrefsView - + 268 YES @@ -3748,7 +3729,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA12 {{13, 10}, {463, 401}} - YES @@ -3773,7 +3753,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{72, 44}, {84, 17}} - YES 68157504 @@ -3791,7 +3770,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{44, 16}, {112, 17}} - YES 68157504 @@ -3809,7 +3787,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{158, 38}, {126, 26}} - YES -2076180416 @@ -3902,7 +3879,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{289, 14}, {72, 22}} - YES -1804599231 @@ -3994,7 +3970,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{63, 72}, {93, 17}} - YES 68157504 @@ -4012,7 +3987,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{158, 66}, {126, 26}} - YES -2076180416 @@ -4081,7 +4055,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{158, 11}, {126, 26}} - YES -2076180416 @@ -4183,12 +4156,10 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 1}, {429, 100}} - {{6, 206}, {431, 116}} - {0, 0} 67108864 @@ -4232,7 +4203,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{18, 14}, {100, 38}} - YES NO 2 @@ -4426,12 +4396,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {194, 62}} - {{15, 53}, {196, 78}} - {0, 0} 67108864 @@ -4465,7 +4433,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{18, 14}, {150, 38}} - YES NO 2 @@ -4657,12 +4624,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {194, 62}} - {{218, 53}, {196, 78}} - {0, 0} 67108864 @@ -4686,7 +4651,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{15, 18}, {126, 17}} - YES 68157504 @@ -4704,7 +4668,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{339, 16}, {72, 22}} - YES -1804599231 @@ -4787,7 +4750,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{144, 12}, {189, 26}} - YES -2080112384 @@ -4810,7 +4772,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{305, 38}, {38, 11}} - YES 68157504 @@ -4832,7 +4793,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{263, 38}, {38, 11}} - YES 68157504 @@ -4850,7 +4810,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{220, 38}, {38, 11}} - YES 68157504 @@ -4868,7 +4827,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{178, 38}, {38, 11}} - YES 68157504 @@ -4886,7 +4844,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{137, 38}, {38, 11}} - YES 68157504 @@ -4902,12 +4859,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {429, 141}} - {{6, 45}, {431, 157}} - {0, 0} 67108864 @@ -4929,7 +4884,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{10, 33}, {443, 355}} - Display Views @@ -5931,8 +5885,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {489, 425} - - NSView @@ -6788,7 +6740,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA NSView - + 268 YES @@ -6797,7 +6749,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 12 {{13, 10}, {528, 349}} - YES @@ -6822,7 +6773,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 32}, {197, 18}} - YES -2080374784 @@ -6846,7 +6796,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 12}, {217, 18}} - YES 67108864 @@ -6868,12 +6817,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {494, 58}} - {{6, 229}, {496, 74}} - {0, 0} 67108864 @@ -6907,7 +6854,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{18, 14}, {165, 38}} - YES NO 2 @@ -7101,7 +7047,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{243, 15}, {72, 17}} - YES 68157504 @@ -7119,7 +7064,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{320, 13}, {50, 22}} - YES -1804599231 @@ -7196,7 +7140,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{371, 10}, {19, 27}} - YES 67895328 @@ -7214,12 +7157,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {494, 62}} - {{6, 147}, {496, 78}} - {0, 0} 67108864 @@ -7253,7 +7194,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 32}, {145, 18}} - YES 67108864 @@ -7277,7 +7217,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 12}, {118, 18}} - YES 67108864 @@ -7299,12 +7238,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {494, 58}} - {{6, 69}, {496, 74}} - {0, 0} 67108864 @@ -7338,7 +7275,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{16, 12}, {462, 18}} - YES -2080374784 @@ -7360,12 +7296,10 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {494, 38}} - {{6, 11}, {496, 54}} - {0, 0} 67108864 @@ -7387,7 +7321,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{10, 33}, {508, 303}} - General Settings @@ -7797,8 +7730,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {554, 373} - - NSView @@ -23199,13 +23130,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES - - YES - General_LoadROMCompletelyInRAM - General_LoadROMCompletelyIntoRAM - General_StreamLoadRomFile - General_StreamLoadRomData - YES @@ -32938,6 +32862,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 8328 + + + cdsCoreController + + + + 8329 + + + + emuControlController + + + + 8330 + @@ -49594,7 +49534,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA - 8328 + 8330 @@ -51482,6 +51422,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES YES + cdsCoreController + emuControlController romInfoController troubleshootingWindowController viewBugReport @@ -51493,6 +51435,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES NSObjectController NSObjectController + NSObjectController + NSObjectController NSView NSView NSView @@ -51503,6 +51447,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES YES + cdsCoreController + emuControlController romInfoController troubleshootingWindowController viewBugReport @@ -51512,6 +51458,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES + + cdsCoreController + NSObjectController + + + emuControlController + NSObjectController + romInfoController NSObjectController diff --git a/desmume/src/cocoa/userinterface/troubleshootingWindowDelegate.h b/desmume/src/cocoa/userinterface/troubleshootingWindowDelegate.h index 9774fb096..1730c9076 100644 --- a/desmume/src/cocoa/userinterface/troubleshootingWindowDelegate.h +++ b/desmume/src/cocoa/userinterface/troubleshootingWindowDelegate.h @@ -34,6 +34,8 @@ enum TroubleshootingViewID NSWindow *window; NSObjectController *troubleshootingWindowController; NSObjectController *romInfoController; + NSObjectController *emuControlController; + NSObjectController *cdsCoreController; NSView *viewSupportRequest; NSView *viewBugReport; @@ -48,6 +50,8 @@ enum TroubleshootingViewID @property (readonly) IBOutlet NSWindow *window; @property (readonly) IBOutlet NSObjectController *troubleshootingWindowController; @property (readonly) IBOutlet NSObjectController *romInfoController; +@property (readonly) IBOutlet NSObjectController *emuControlController; +@property (readonly) IBOutlet NSObjectController *cdsCoreController; @property (readonly) IBOutlet NSView *viewSupportRequest; @property (readonly) IBOutlet NSView *viewBugReport; @property (readonly) IBOutlet NSView *viewFinishedForm; diff --git a/desmume/src/cocoa/userinterface/troubleshootingWindowDelegate.mm b/desmume/src/cocoa/userinterface/troubleshootingWindowDelegate.mm index f20b0bf21..b8f34fd0b 100644 --- a/desmume/src/cocoa/userinterface/troubleshootingWindowDelegate.mm +++ b/desmume/src/cocoa/userinterface/troubleshootingWindowDelegate.mm @@ -16,9 +16,14 @@ */ #import "troubleshootingWindowDelegate.h" +#import "EmuControllerDelegate.h" #import "cocoa_util.h" #import "cocoa_globals.h" +#import "cocoa_cheat.h" +#import "cocoa_core.h" +#import "cocoa_GPU.h" +#import "cocoa_output.h" @implementation TroubleshootingWindowDelegate @@ -26,6 +31,8 @@ @synthesize window; @synthesize troubleshootingWindowController; @synthesize romInfoController; +@synthesize emuControlController; +@synthesize cdsCoreController; @synthesize viewSupportRequest; @synthesize viewBugReport; @synthesize viewFinishedForm; @@ -68,6 +75,8 @@ - (IBAction) continueToFinalForm:(id)sender { static NSString *unspecifiedStr = @"Unspecified"; // Do not expose localized version for this NSString -- we want this to be in English + EmuControllerDelegate *emuControl = (EmuControllerDelegate *)[emuControlController content]; + CocoaDSCore *cdsCore = (CocoaDSCore *)[cdsCoreController content]; // Force end of editing of any text fields. [window makeFirstResponder:nil]; @@ -97,6 +106,53 @@ finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nModel Identifier: "] stringByAppendingString:[CocoaDSUtil modelIdentifierString]]; finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nROM Name: "] stringByAppendingString:romNameStr]; finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nROM Serial: "] stringByAppendingString:romSerialStr]; + finalFormTextStr = [finalFormTextStr stringByAppendingString:@"\n-----------------------------------"]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nEmulation Speed: "] stringByAppendingString:([cdsCore isSpeedLimitEnabled] ? [NSString stringWithFormat:@"%1.2fx", [emuControl lastSetSpeedScalar]] : @"Unlimited")]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nAuto Frame Skip: "] stringByAppendingString:([cdsCore isFrameSkipEnabled] ? @"YES" : @"NO")]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nSLOT-1 Device Type: "] stringByAppendingString:[cdsCore slot1DeviceTypeString]]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nSLOT-2 Device Type: "] stringByAppendingString:[cdsCore slot2DeviceTypeString]]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nAdvanced Bus-Level Timing: "] stringByAppendingString:([cdsCore emuFlagAdvancedBusLevelTiming] ? @"YES" : @"NO")]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nRigorous 3D Rendering Timing: "] stringByAppendingString:([cdsCore emuFlagRigorousTiming] ? @"YES" : @"NO")]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nCPU Emulation Engine: "] stringByAppendingString:([cdsCore cpuEmulationEngine] == CPU_EMULATION_ENGINE_DYNAMIC_RECOMPILER ? [NSString stringWithFormat:@"%@ (BlockSize=%li)", [cdsCore cpuEmulationEngineString], [cdsCore maxJITBlockSize]] : [cdsCore cpuEmulationEngineString])]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nExternal BIOS: "] stringByAppendingString:([cdsCore emuFlagUseExternalBios] ? @"YES" : @"NO")]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nExternal Firmware: "] stringByAppendingString:([cdsCore emuFlagUseExternalFirmware] ? @"YES" : @"NO")]; + + NSString *render3DEngineDetails = [[cdsCore cdsGPU] render3DRenderingEngineString]; + switch ([[cdsCore cdsGPU] render3DRenderingEngine]) + { + case CORE3DLIST_NULL: + break; + + case CORE3DLIST_SWRASTERIZE: + render3DEngineDetails = [NSString stringWithFormat:@"%@ (HighResColor=%@, EdgeMark=%@, Fog=%@, DepthCompare=%ld)", + [[cdsCore cdsGPU] render3DRenderingEngineString], + ([[cdsCore cdsGPU] render3DHighPrecisionColorInterpolation] ? @"YES" : @"NO"), + ([[cdsCore cdsGPU] render3DEdgeMarking] ? @"YES" : @"NO"), + ([[cdsCore cdsGPU] render3DFog] ? @"YES" : @"NO"), + [[cdsCore cdsGPU] render3DDepthComparisonThreshold]]; + break; + + case CORE3DLIST_OPENGL: + render3DEngineDetails = [NSString stringWithFormat:@"%@ (MSAA=%@)", + [[cdsCore cdsGPU] render3DRenderingEngineString], + ([[cdsCore cdsGPU] render3DMultisample] ? @"YES" : @"NO")]; + break; + + default: + break; + } + + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\n3D Renderer - Engine: "] stringByAppendingString:render3DEngineDetails]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\n3D Renderer - Line Hack: "] stringByAppendingString:([[cdsCore cdsGPU] render3DLineHack] ? @"YES" : @"NO")]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\n3D Renderer - Textures: "] stringByAppendingString:([[cdsCore cdsGPU] render3DTextures] ? @"YES" : @"NO")]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\n3D Renderer - Thread Count: "] stringByAppendingString:([[cdsCore cdsGPU] render3DThreads] == 0 ? @"Automatic" : [NSString stringWithFormat:@"%ld", [[cdsCore cdsGPU] render3DThreads]])]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nAudio - Output Engine: "] stringByAppendingString:[[emuControl cdsSpeaker] audioOutputEngineString]]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nAudio - Advanced SPU Logic: "] stringByAppendingString:([[emuControl cdsSpeaker] spuAdvancedLogic] ? @"YES" : @"NO")]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nAudio - Sound Interpolation Method: "] stringByAppendingString:[[emuControl cdsSpeaker] spuInterpolationModeString]]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nAudio - Sound Synchronization Method: "] stringByAppendingString:[[emuControl cdsSpeaker] spuSyncMethodString]]; + finalFormTextStr = [finalFormTextStr stringByAppendingString:@"\n-----------------------------------"]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nCheats: "] stringByAppendingString:([cdsCore isCheatingEnabled] ? [NSString stringWithFormat:@"YES (ActiveCheatCount=%ld)", [[emuControl cdsCheats] activeCount]] : @"NO")]; + finalFormTextStr = [finalFormTextStr stringByAppendingString:@"\n-----------------------------------"]; if ([window contentView] == viewSupportRequest) { @@ -106,7 +162,7 @@ supportRequestTextStr = unspecifiedStr; } - finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\n\nSupport Request: "] stringByAppendingString:supportRequestTextStr]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nSupport Request: "] stringByAppendingString:supportRequestTextStr]; [bindings setValue:NSSTRING_HELP_COPY_PASTE_TECH_SUPPORT forKey:@"copyPasteHelpText"]; [bindings setValue:NSSTRING_TITLE_GO_TECH_SUPPORT_WEBPAGE_TITLE forKey:@"goWebpageButtonTitle"]; } @@ -124,7 +180,7 @@ bugReportExpectedTextStr = unspecifiedStr; } - finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\n\nObserved Behavior: "] stringByAppendingString:bugReportObservedTextStr]; + finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\nObserved Behavior: "] stringByAppendingString:bugReportObservedTextStr]; finalFormTextStr = [[finalFormTextStr stringByAppendingString:@"\n\nExpected Behavior: "] stringByAppendingString:bugReportExpectedTextStr]; [bindings setValue:NSSTRING_HELP_COPY_PASTE_BUG_REPORT forKey:@"copyPasteHelpText"]; [bindings setValue:NSSTRING_TITLE_GO_BUG_REPORT_WEBPAGE_TITLE forKey:@"goWebpageButtonTitle"];