Cocoa Port:

- Add support for displaying the CPU load average in the HUD.
This commit is contained in:
rogerman 2015-10-28 05:29:17 +00:00
parent bb6fe7d06b
commit 2fbd0685d1
15 changed files with 359 additions and 93 deletions

View File

@ -2966,6 +2966,38 @@ bool ValidateSlot2Access(u32 procnum, u32 demandSRAMSpeed, u32 demand1stROMSpeed
return true;
}
void NDS_GetCPULoadAverage(u32 &outLoadAvgARM9, u32 &outLoadAvgARM7)
{
//calculate a 16 frame arm9 load average
u32 calcLoad = 0;
for (size_t i = 0; i < 16; i++)
{
//blend together a few frames to keep low-framerate games from having a jittering load average
//(they will tend to work 100% for a frame and then sleep for a while)
//4 frames should handle even the slowest of games
u32 sample = nds.runCycleCollector[ARMCPU_ARM9][(i + 0 + nds.idleFrameCounter) & 15]
+ nds.runCycleCollector[ARMCPU_ARM9][(i + 1 + nds.idleFrameCounter) & 15]
+ nds.runCycleCollector[ARMCPU_ARM9][(i + 2 + nds.idleFrameCounter) & 15]
+ nds.runCycleCollector[ARMCPU_ARM9][(i + 3 + nds.idleFrameCounter) & 15];
sample /= 4;
calcLoad = calcLoad/8 + sample*7/8;
}
outLoadAvgARM9 = std::min<u32>( 100, std::max<u32>(0, (u32)(calcLoad*100/1120380)) );
//calculate a 16 frame arm7 load average
calcLoad = 0;
for (size_t i = 0; i < 16; i++)
{
u32 sample = nds.runCycleCollector[ARMCPU_ARM7][(i + 0 + nds.idleFrameCounter) & 15]
+ nds.runCycleCollector[ARMCPU_ARM7][(i + 1 + nds.idleFrameCounter) & 15]
+ nds.runCycleCollector[ARMCPU_ARM7][(i + 2 + nds.idleFrameCounter) & 15]
+ nds.runCycleCollector[ARMCPU_ARM7][(i + 3 + nds.idleFrameCounter) & 15];
sample /= 4;
calcLoad = calcLoad/8 + sample*7/8;
}
outLoadAvgARM7 = std::min<u32>( 100, std::max<u32>(0, (u32)(calcLoad*100/1120380)) );
}
//these templates needed to be instantiated manually
template void NDS_exec<FALSE>(s32 nb);
template void NDS_exec<TRUE>(s32 nb);

View File

@ -462,6 +462,7 @@ void NDS_debug_continue();
void NDS_debug_step();
int NDS_GetCPUCoreCount();
void NDS_GetCPULoadAverage(u32 &outLoadAvgARM9, u32 &outLoadAvgARM7);
void NDS_SetupDefaultFirmware();
//void execHardware_doAllDma(EDMAMode modeNum);

View File

@ -110,6 +110,8 @@
<false/>
<key>HUD_ShowInput</key>
<false/>
<key>HUD_ShowCPULoadAverage</key>
<false/>
<key>HUD_ShowRTC</key>
<false/>
<key>Input_AudioInputMode</key>

View File

@ -5708,12 +5708,15 @@ OGLHUDLayer::OGLHUDLayer(OGLVideoOutput *oglVO)
_showRender3DFPS = false;
_showFrameIndex = false;
_showLagFrameCount = false;
_showCPULoadAverage = false;
_showRTC = false;
_lastVideoFPS = 0;
_lastRender3DFPS = 0;
_lastFrameIndex = 0;
_lastLagFrameCount = 0;
_lastCpuLoadAvgARM9 = 0;
_lastCpuLoadAvgARM7 = 0;
memset(_lastRTCString, 0, sizeof(_lastRTCString));
_textBoxLines = 0;
_textBoxWidth = 0;
@ -5923,12 +5926,14 @@ void OGLHUDLayer::SetFontUsingPath(const char *filePath)
glBindTexture(GL_TEXTURE_2D, 0);
}
void OGLHUDLayer::SetInfo(const uint32_t videoFPS, const uint32_t render3DFPS, const uint32_t frameIndex, const uint32_t lagFrameCount, const char *rtcString)
void OGLHUDLayer::SetInfo(const uint32_t videoFPS, const uint32_t render3DFPS, const uint32_t frameIndex, const uint32_t lagFrameCount, const char *rtcString, const uint32_t cpuLoadAvgARM9, const uint32_t cpuLoadAvgARM7)
{
this->_lastVideoFPS = videoFPS;
this->_lastRender3DFPS = render3DFPS;
this->_lastFrameIndex = frameIndex;
this->_lastLagFrameCount = lagFrameCount;
this->_lastCpuLoadAvgARM9 = cpuLoadAvgARM9;
this->_lastCpuLoadAvgARM7 = cpuLoadAvgARM7;
memcpy(this->_lastRTCString, rtcString, sizeof(this->_lastRTCString));
this->RefreshInfo();
@ -5981,11 +5986,26 @@ void OGLHUDLayer::RefreshInfo()
}
}
if (this->_showCPULoadAverage)
{
static char buffer[32];
memset(buffer, 0, sizeof(buffer));
snprintf(buffer, 25, "CPU Load Avg: %02d%% / %02d%%\n", this->_lastCpuLoadAvgARM9, this->_lastCpuLoadAvgARM7);
ss << buffer;
const GLint newTextBoxWidth = (charSize * 9.2f) + 6.5f;
if (newTextBoxWidth > this->_textBoxWidth)
{
this->_textBoxWidth = newTextBoxWidth;
}
}
if (this->_showRTC)
{
ss << "RTC: " << this->_lastRTCString << "\n";
const GLint newTextBoxWidth = (charSize * 10.7f) + 6.5f;
const GLint newTextBoxWidth = (charSize * 10.8f) + 6.5f;
if (newTextBoxWidth > this->_textBoxWidth)
{
this->_textBoxWidth = newTextBoxWidth;
@ -6056,6 +6076,16 @@ bool OGLHUDLayer::GetShowLagFrameCount() const
return this->_showLagFrameCount;
}
void OGLHUDLayer::SetShowCPULoadAverage(const bool visibleState)
{
this->_SetShowInfoItemOGL(this->_showCPULoadAverage, visibleState);
}
bool OGLHUDLayer::GetShowCPULoadAverage() const
{
return this->_showCPULoadAverage;
}
void OGLHUDLayer::SetShowRTC(const bool visibleState)
{
this->_SetShowInfoItemOGL(this->_showRTC, visibleState);

View File

@ -318,12 +318,15 @@ protected:
bool _showRender3DFPS;
bool _showFrameIndex;
bool _showLagFrameCount;
bool _showCPULoadAverage;
bool _showRTC;
uint32_t _lastVideoFPS;
uint32_t _lastRender3DFPS;
uint32_t _lastFrameIndex;
uint32_t _lastLagFrameCount;
uint32_t _lastCpuLoadAvgARM9;
uint32_t _lastCpuLoadAvgARM7;
char _lastRTCString[25];
GLint _textBoxLines;
@ -338,7 +341,7 @@ public:
void SetFontUsingPath(const char *filePath);
void SetInfo(const uint32_t videoFPS, const uint32_t render3DFPS, const uint32_t frameIndex, const uint32_t lagFrameCount, const char *rtcString);
void SetInfo(const uint32_t videoFPS, const uint32_t render3DFPS, const uint32_t frameIndex, const uint32_t lagFrameCount, const char *rtcString, const uint32_t cpuLoadAvgARM9, const uint32_t cpuLoadAvgARM7);
void RefreshInfo();
void SetShowVideoFPS(const bool visibleState);
@ -349,6 +352,8 @@ public:
bool GetShowFrameIndex() const;
void SetShowLagFrameCount(const bool visibleState);
bool GetShowLagFrameCount() const;
void SetShowCPULoadAverage(const bool visibleState);
bool GetShowCPULoadAverage() const;
void SetShowRTC(const bool visibleState);
bool GetShowRTC() const;

View File

@ -51,6 +51,8 @@ struct NDSFrameInfo
uint32_t render3DFPS;
uint32_t frameIndex;
uint32_t lagFrameCount;
uint32_t cpuLoadAvgARM9;
uint32_t cpuLoadAvgARM7;
char rtcString[25];
};
@ -72,6 +74,7 @@ typedef struct NDSFrameInfo NDSFrameInfo;
std::string _slot1R4Path;
NSTimer *_fpsTimer;
BOOL _isTimerAtSecond;
BOOL isGdbStubStarted;
BOOL isInDebugTrap;
@ -163,7 +166,7 @@ typedef struct NDSFrameInfo NDSFrameInfo;
- (void) restoreCoreState;
- (void) reset;
- (void) fpsUpdate:(NSTimer *)timer;
- (void) getTimedEmulatorStatistics:(NSTimer *)timer;
- (NSUInteger) frameNumber;
- (void) frameJumpTo:(NSUInteger)targetFrameNum;
- (void) frameJump:(NSUInteger)relativeFrameNum;

View File

@ -145,6 +145,7 @@ volatile bool execute = true;
}
_fpsTimer = nil;
_isTimerAtSecond = NO;
cdsController = nil;
cdsFirmware = nil;
@ -682,10 +683,11 @@ volatile bool execute = true;
if (_fpsTimer == nil)
{
_isTimerAtSecond = NO;
_fpsTimer = [[NSTimer alloc] initWithFireDate:[NSDate date]
interval:1.0
interval:0.5
target:self
selector:@selector(fpsUpdate:)
selector:@selector(getTimedEmulatorStatistics:)
userInfo:nil
repeats:YES];
@ -936,13 +938,28 @@ volatile bool execute = true;
[[self cdsController] updateMicLevel];
}
- (void) fpsUpdate:(NSTimer *)timer
- (void) getTimedEmulatorStatistics:(NSTimer *)timer
{
uint32_t loadAvgARM9;
uint32_t loadAvgARM7;
pthread_rwlock_rdlock(&threadParam.rwlockCoreExecute);
NDS_GetCPULoadAverage(loadAvgARM9, loadAvgARM7);
pthread_rwlock_unlock(&threadParam.rwlockCoreExecute);
for (CocoaDSOutput *cdsOutput in cdsOutputList)
{
if ([cdsOutput isKindOfClass:[CocoaDSDisplay class]])
{
[(CocoaDSDisplay *)cdsOutput takeFrameCount];
// The timer should fire every 0.5 seconds, so only take the frame
// count every other instance the timer fires.
_isTimerAtSecond = !_isTimerAtSecond;
if (_isTimerAtSecond)
{
[(CocoaDSDisplay *)cdsOutput takeFrameCount];
}
[(CocoaDSDisplay *)cdsOutput setCPULoadAvgARM9:loadAvgARM9 ARM7:loadAvgARM7];
}
}
}

View File

@ -147,8 +147,12 @@ typedef struct
uint32_t _currentReceivedFrameIndex;
uint32_t _receivedFrameCount;
uint32_t _cpuLoadAvgARM9;
uint32_t _cpuLoadAvgARM7;
OSSpinLock spinlockDisplayType;
OSSpinLock spinlockReceivedFrameIndex;
OSSpinLock spinlockCPULoadAverage;
}
@property (retain) id <CocoaDSDisplayDelegate> delegate;
@ -162,6 +166,7 @@ typedef struct
- (void) handleCopyToPasteboard;
- (void) takeFrameCount;
- (void) setCPULoadAvgARM9:(uint32_t)loadAvgARM9 ARM7:(uint32_t)loadAvgARM7;
- (NSImage *) image;
- (NSBitmapImageRep *) bitmapImageRep;

View File

@ -516,6 +516,7 @@
spinlockDisplayType = OS_SPINLOCK_INIT;
spinlockReceivedFrameIndex = OS_SPINLOCK_INIT;
spinlockCPULoadAverage = OS_SPINLOCK_INIT;
delegate = nil;
displayMode = DS_DISPLAY_TYPE_DUAL;
@ -526,6 +527,9 @@
_currentReceivedFrameIndex = 0;
_receivedFrameCount = 0;
_cpuLoadAvgARM9 = 0;
_cpuLoadAvgARM7 = 0;
[property setValue:[NSNumber numberWithInteger:displayMode] forKey:@"displayMode"];
[property setValue:NSSTRING_DISPLAYMODE_MAIN forKey:@"displayModeString"];
@ -679,6 +683,14 @@
OSSpinLockUnlock(&spinlockReceivedFrameIndex);
}
- (void) setCPULoadAvgARM9:(uint32_t)loadAvgARM9 ARM7:(uint32_t)loadAvgARM7
{
OSSpinLockLock(&spinlockCPULoadAverage);
_cpuLoadAvgARM9 = loadAvgARM9;
_cpuLoadAvgARM7 = loadAvgARM7;
OSSpinLockUnlock(&spinlockCPULoadAverage);
}
- (NSImage *) image
{
NSImage *newImage = [[NSImage alloc] initWithSize:[self displaySize]];
@ -824,10 +836,19 @@
[super handleEmuFrameProcessed];
NDSFrameInfo frameInfo;
frameInfo.videoFPS = _receivedFrameCount;
frameInfo.render3DFPS = Render3DFramesPerSecond;
frameInfo.frameIndex = currFrameCounter;
frameInfo.lagFrameCount = TotalLagFrames;
OSSpinLockLock(&spinlockReceivedFrameIndex);
frameInfo.videoFPS = _receivedFrameCount;
OSSpinLockUnlock(&spinlockReceivedFrameIndex);
OSSpinLockLock(&spinlockCPULoadAverage);
frameInfo.cpuLoadAvgARM9 = _cpuLoadAvgARM9;
frameInfo.cpuLoadAvgARM7 = _cpuLoadAvgARM7;
OSSpinLockUnlock(&spinlockCPULoadAverage);
rtcGetTimeAsString(frameInfo.rtcString);
[(id<CocoaDSDisplayVideoDelegate>)delegate doProcessVideoFrameWithInfo:frameInfo];

View File

@ -12,8 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="795"/>
<integer value="10142"/>
<integer value="29"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -1660,10 +1659,9 @@
<reference key="NSOnImage" ref="396634170"/>
<reference key="NSMixedImage" ref="678976864"/>
</object>
<object class="NSMenuItem" id="495131408">
<object class="NSMenuItem" id="861544292">
<reference key="NSMenu" ref="240738211"/>
<bool key="NSIsDisabled">YES</bool>
<string key="NSTitle">Input</string>
<string key="NSTitle">CPU Load Average</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="396634170"/>
@ -1677,6 +1675,15 @@
<reference key="NSOnImage" ref="396634170"/>
<reference key="NSMixedImage" ref="678976864"/>
</object>
<object class="NSMenuItem" id="495131408">
<reference key="NSMenu" ref="240738211"/>
<bool key="NSIsDisabled">YES</bool>
<string key="NSTitle">Input</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="396634170"/>
<reference key="NSMixedImage" ref="678976864"/>
</object>
</object>
</object>
</object>
@ -3943,7 +3950,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA</str
<string key="NSClassName">InputPrefsView</string>
</object>
<object class="NSCustomView" id="373257179">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -3959,7 +3966,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA</str
</object>
<string key="NSFrame">{{13, 10}, {463, 413}}</string>
<reference key="NSSuperview" ref="373257179"/>
<reference key="NSWindow"/>
<object class="NSMutableArray" key="NSTabViewItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTabViewItem" id="750316744">
@ -3984,7 +3990,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA</str
<int key="NSvFlags">268</int>
<string key="NSFrame">{{72, 44}, {84, 17}}</string>
<reference key="NSSuperview" ref="610612997"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="968604102"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1051872315">
@ -4004,7 +4009,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA</str
<int key="NSvFlags">268</int>
<string key="NSFrame">{{44, 16}, {112, 17}}</string>
<reference key="NSSuperview" ref="610612997"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="177937550"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="279286359">
@ -4024,7 +4028,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA</str
<int key="NSvFlags">268</int>
<string key="NSFrame">{{158, 38}, {126, 26}}</string>
<reference key="NSSuperview" ref="610612997"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="836571966"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="644484329">
@ -4118,7 +4121,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA</str
</object>
<string key="NSFrame">{{289, 14}, {72, 22}}</string>
<reference key="NSSuperview" ref="610612997"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="367271593"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="689714106">
@ -4212,7 +4214,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA</str
<int key="NSvFlags">268</int>
<string key="NSFrame">{{63, 72}, {93, 17}}</string>
<reference key="NSSuperview" ref="610612997"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="117229342"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="86457779">
@ -4232,7 +4233,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA</str
<int key="NSvFlags">268</int>
<string key="NSFrame">{{158, 66}, {126, 26}}</string>
<reference key="NSSuperview" ref="610612997"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="975008903"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="977881385">
@ -4302,7 +4302,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA</str
<int key="NSvFlags">268</int>
<string key="NSFrame">{{158, 11}, {126, 26}}</string>
<reference key="NSSuperview" ref="610612997"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="909152771"/>
<bool key="NSEnabled">YES</bool>
<object class="NSPopUpButtonCell" key="NSCell" id="729105354">
@ -4405,13 +4404,11 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA</str
</object>
<string key="NSFrame">{{1, 1}, {429, 100}}</string>
<reference key="NSSuperview" ref="654619277"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="493465383"/>
</object>
</object>
<string key="NSFrame">{{6, 218}, {431, 116}}</string>
<reference key="NSSuperview" ref="698863500"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="610612997"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@ -4453,7 +4450,6 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA</str
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 14}, {100, 38}}</string>
<reference key="NSSuperview" ref="713770080"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1057767226"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
@ -4701,13 +4697,11 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
</object>
<string key="NSFrame">{{1, 1}, {194, 62}}</string>
<reference key="NSSuperview" ref="405894970"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="534073839"/>
</object>
</object>
<string key="NSFrame">{{15, 53}, {196, 78}}</string>
<reference key="NSSuperview" ref="320484480"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="713770080"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@ -4739,7 +4733,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 14}, {150, 38}}</string>
<reference key="NSSuperview" ref="533349872"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="918179914"/>
<bool key="NSEnabled">YES</bool>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
@ -4985,13 +4978,11 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
</object>
<string key="NSFrame">{{1, 1}, {194, 62}}</string>
<reference key="NSSuperview" ref="1057767226"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="399471743"/>
</object>
</object>
<string key="NSFrame">{{218, 53}, {196, 78}}</string>
<reference key="NSSuperview" ref="320484480"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="533349872"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@ -5013,7 +5004,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<int key="NSvFlags">268</int>
<string key="NSFrame">{{15, 18}, {126, 17}}</string>
<reference key="NSSuperview" ref="320484480"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="959427339"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="418483299">
@ -5033,7 +5023,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<int key="NSvFlags">268</int>
<string key="NSFrame">{{339, 16}, {72, 22}}</string>
<reference key="NSSuperview" ref="320484480"/>
<reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="134325674">
<int key="NSCellFlags">-1804599231</int>
@ -5117,7 +5106,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<int key="NSvFlags">268</int>
<string key="NSFrame">{{144, 12}, {189, 26}}</string>
<reference key="NSSuperview" ref="320484480"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="969904240"/>
<bool key="NSEnabled">YES</bool>
<object class="NSSliderCell" key="NSCell" id="414720816">
@ -5141,7 +5129,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<int key="NSvFlags">268</int>
<string key="NSFrame">{{305, 38}, {38, 11}}</string>
<reference key="NSSuperview" ref="320484480"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="1051500204"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="494052588">
@ -5165,7 +5152,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<int key="NSvFlags">268</int>
<string key="NSFrame">{{263, 38}, {38, 11}}</string>
<reference key="NSSuperview" ref="320484480"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="183585208"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="273276002">
@ -5185,7 +5171,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<int key="NSvFlags">268</int>
<string key="NSFrame">{{220, 38}, {38, 11}}</string>
<reference key="NSSuperview" ref="320484480"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="887564212"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="647568442">
@ -5205,7 +5190,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<int key="NSvFlags">268</int>
<string key="NSFrame">{{178, 38}, {38, 11}}</string>
<reference key="NSSuperview" ref="320484480"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="811409771"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="386451738">
@ -5225,7 +5209,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<int key="NSvFlags">268</int>
<string key="NSFrame">{{137, 38}, {38, 11}}</string>
<reference key="NSSuperview" ref="320484480"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="71769649"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="1069527907">
@ -5243,13 +5226,11 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
</object>
<string key="NSFrame">{{1, 1}, {429, 141}}</string>
<reference key="NSSuperview" ref="367271593"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="405894970"/>
</object>
</object>
<string key="NSFrame">{{6, 57}, {431, 157}}</string>
<reference key="NSSuperview" ref="698863500"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="320484480"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@ -5269,7 +5250,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
</object>
<string key="NSFrame">{{10, 33}, {443, 367}}</string>
<reference key="NSSuperview" ref="286093627"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="654619277"/>
</object>
<string key="NSLabel">Display Views</string>
@ -5961,7 +5941,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<object class="NSButton" id="250008560">
<reference key="NSNextResponder" ref="895927932"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{15, 221}, {103, 18}}</string>
<string key="NSFrame">{{15, 181}, {103, 18}}</string>
<reference key="NSSuperview" ref="895927932"/>
<string key="NSReuseIdentifierKey">_NS:682</string>
<bool key="NSEnabled">YES</bool>
@ -6008,6 +5988,31 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="70797817">
<reference key="NSNextResponder" ref="895927932"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{15, 221}, {184, 18}}</string>
<reference key="NSSuperview" ref="895927932"/>
<string key="NSReuseIdentifierKey">_NS:682</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="807770195">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">0</int>
<string key="NSContents">Show CPU Load Average</string>
<reference key="NSSupport" ref="462791774"/>
<string key="NSCellIdentifier">_NS:682</string>
<reference key="NSControlView" ref="70797817"/>
<int key="NSButtonFlags">1211912448</int>
<int key="NSButtonFlags2">2</int>
<reference key="NSNormalImage" ref="254121778"/>
<reference key="NSAlternateImage" ref="1000893652"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSBox" id="625929242">
<reference key="NSNextResponder" ref="895927932"/>
<int key="NSvFlags">12</int>
@ -6051,8 +6056,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
</object>
</object>
<string key="NSFrameSize">{489, 437}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="286093627"/>
<string key="NSClassName">NSView</string>
</object>
@ -20919,7 +20922,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<object class="NSWindowTemplate" id="485576541">
<int key="NSWindowStyleMask">279</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{170, 51}, {194, 210}}</string>
<string key="NSWindowRect">{{170, 35}, {194, 226}}</string>
<int key="NSWTFlags">-461896704</int>
<string key="NSWindowTitle">HUD Settings</string>
<string key="NSWindowClass">NSPanel</string>
@ -20927,14 +20930,14 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<nil key="NSUserInterfaceItemIdentifier"/>
<string key="NSWindowContentMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
<object class="NSView" key="NSWindowView" id="1004755540">
<reference key="NSNextResponder"/>
<nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="272928836">
<reference key="NSNextResponder" ref="1004755540"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 103}, {99, 18}}</string>
<string key="NSFrame">{{16, 119}, {99, 18}}</string>
<reference key="NSSuperview" ref="1004755540"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="954076959">
@ -20957,7 +20960,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<object class="NSButton" id="269230248">
<reference key="NSNextResponder" ref="1004755540"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 143}, {84, 18}}</string>
<string key="NSFrame">{{16, 159}, {84, 18}}</string>
<reference key="NSSuperview" ref="1004755540"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="160348149">
@ -20980,7 +20983,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<object class="NSButton" id="189973188">
<reference key="NSNextResponder" ref="1004755540"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 63}, {60, 18}}</string>
<string key="NSFrame">{{16, 39}, {60, 18}}</string>
<reference key="NSSuperview" ref="1004755540"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="769061633">
@ -21003,7 +21006,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<object class="NSButton" id="278136792">
<reference key="NSNextResponder" ref="1004755540"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 123}, {121, 18}}</string>
<string key="NSFrame">{{16, 139}, {121, 18}}</string>
<reference key="NSSuperview" ref="1004755540"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="408515625">
@ -21026,7 +21029,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<object class="NSButton" id="708958649">
<reference key="NSNextResponder" ref="1004755540"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 83}, {98, 18}}</string>
<string key="NSFrame">{{16, 99}, {98, 18}}</string>
<reference key="NSSuperview" ref="1004755540"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="541291923">
@ -21049,7 +21052,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<object class="NSButton" id="523387766">
<reference key="NSNextResponder" ref="1004755540"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 43}, {121, 18}}</string>
<string key="NSFrame">{{16, 59}, {121, 18}}</string>
<reference key="NSSuperview" ref="1004755540"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="975096499">
@ -21069,10 +21072,33 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="256074520">
<reference key="NSNextResponder" ref="1004755540"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 79}, {130, 18}}</string>
<reference key="NSSuperview" ref="1004755540"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="90042676">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">131072</int>
<string key="NSContents">CPU Load Average</string>
<reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="256074520"/>
<int key="NSButtonFlags">1211912448</int>
<int key="NSButtonFlags2">2</int>
<reference key="NSNormalImage" ref="254121778"/>
<reference key="NSAlternateImage" ref="1000893652"/>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSButton" id="448396937">
<reference key="NSNextResponder" ref="1004755540"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 13}, {162, 19}}</string>
<string key="NSFrame">{{16, 11}, {162, 19}}</string>
<reference key="NSSuperview" ref="1004755540"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="480403001">
@ -21093,7 +21119,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<object class="NSButton" id="302843702">
<reference key="NSNextResponder" ref="1004755540"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{16, 174}, {167, 18}}</string>
<string key="NSFrame">{{16, 190}, {167, 18}}</string>
<reference key="NSSuperview" ref="1004755540"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="654468506">
@ -21116,7 +21142,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<object class="NSBox" id="304092617">
<reference key="NSNextResponder" ref="1004755540"/>
<int key="NSvFlags">12</int>
<string key="NSFrame">{{12, 165}, {170, 5}}</string>
<string key="NSFrame">{{12, 181}, {170, 5}}</string>
<reference key="NSSuperview" ref="1004755540"/>
<string key="NSOffsets">{0, 0}</string>
<object class="NSTextFieldCell" key="NSTitleCell">
@ -21133,8 +21159,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<bool key="NSTransparent">NO</bool>
</object>
</object>
<string key="NSFrameSize">{194, 210}</string>
<reference key="NSSuperview"/>
<string key="NSFrameSize">{194, 226}</string>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1177}}</string>
<string key="NSMaxSize">{1.7976931348623157e+308, 1.7976931348623157e+308}</string>
@ -29814,6 +29839,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<string>mainWindow.view.isHUDFrameIndexVisible</string>
<string>mainWindow.view.isHUDLagFrameCountVisible</string>
<string>mainWindow.view.isHUDRealTimeClockVisible</string>
<string>mainWindow.view.isHUDCPULoadAverageVisible</string>
</object>
<string key="NSObjectClassName">EmuControllerDelegate</string>
<object class="_NSManagedProxy" key="_NSManagedProxy"/>
@ -30083,10 +30109,6 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<bool key="NSClearsFilterPredicateOnInsertion">YES</bool>
</object>
<object class="NSUserDefaultsController" id="178548672">
<object class="NSMutableArray" key="NSDeclaredKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>HUD_ShowRTC</string>
</object>
<bool key="NSSharedInstance">YES</bool>
</object>
</object>
@ -42692,6 +42714,46 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
</object>
<int key="connectionID">10189</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: selection.mainWindow.view.isHUDCPULoadAverageVisible</string>
<reference key="source" ref="256074520"/>
<reference key="destination" ref="258098641"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="256074520"/>
<reference key="NSDestination" ref="258098641"/>
<string key="NSLabel">value: selection.mainWindow.view.isHUDCPULoadAverageVisible</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">selection.mainWindow.view.isHUDCPULoadAverageVisible</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">10194</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">toggleShowHUDCPULoadAverage:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="861544292"/>
</object>
<int key="connectionID">10195</int>
</object>
<object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">value: values.HUD_ShowCPULoadAverage</string>
<reference key="source" ref="70797817"/>
<reference key="destination" ref="178548672"/>
<object class="NSNibBindingConnector" key="connector">
<reference key="NSSource" ref="70797817"/>
<reference key="NSDestination" ref="178548672"/>
<string key="NSLabel">value: values.HUD_ShowCPULoadAverage</string>
<string key="NSBinding">value</string>
<string key="NSKeyPath">values.HUD_ShowCPULoadAverage</string>
<int key="NSNibBindingConnectorVersion">2</int>
</object>
</object>
<int key="connectionID">10199</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -43232,6 +43294,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<reference ref="448396937"/>
<reference ref="708958649"/>
<reference ref="523387766"/>
<reference ref="256074520"/>
</object>
<reference key="parent" ref="485576541"/>
</object>
@ -57605,10 +57668,11 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="330095013"/>
<reference ref="1031139579"/>
<reference ref="495131408"/>
<reference ref="713295923"/>
<reference ref="837022608"/>
<reference ref="249126242"/>
<reference ref="861544292"/>
<reference ref="495131408"/>
</object>
<reference key="parent" ref="836576903"/>
</object>
@ -57664,6 +57728,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<reference ref="770825807"/>
<reference ref="115372504"/>
<reference ref="821096320"/>
<reference ref="70797817"/>
</object>
<reference key="parent" ref="460623416"/>
</object>
@ -57770,6 +57835,39 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<reference key="object" ref="922088406"/>
<reference key="parent" ref="821096320"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10190</int>
<reference key="object" ref="861544292"/>
<reference key="parent" ref="240738211"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10191</int>
<reference key="object" ref="256074520"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="90042676"/>
</object>
<reference key="parent" ref="1004755540"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10192</int>
<reference key="object" ref="90042676"/>
<reference key="parent" ref="256074520"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10196</int>
<reference key="object" ref="70797817"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="807770195"/>
</object>
<reference key="parent" ref="895927932"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">10197</int>
<reference key="object" ref="807770195"/>
<reference key="parent" ref="70797817"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@ -57902,6 +58000,13 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<string>10179.IBPluginDependency</string>
<string>10179.IBViewBoundsToFrameTransform</string>
<string>10180.IBPluginDependency</string>
<string>10190.IBPluginDependency</string>
<string>10191.IBPluginDependency</string>
<string>10191.IBViewBoundsToFrameTransform</string>
<string>10192.IBPluginDependency</string>
<string>10196.IBPluginDependency</string>
<string>10196.IBViewBoundsToFrameTransform</string>
<string>10197.IBPluginDependency</string>
<string>1034.IBPluginDependency</string>
<string>1035.IBPluginDependency</string>
<string>1036.IBPluginDependency</string>
@ -60337,7 +60442,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{603, 622}, {181, 123}}</string>
<string>{{603, 602}, {181, 143}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@ -60378,7 +60483,18 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBcAAAw1kAAA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAABBcAAAw20AAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBiAAAwvQAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBcAAAw20AAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@ -60472,7 +60588,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{66, 482}, {489, 437}}</string>
<string>{{372, 123}, {489, 437}}</string>
<string>{796.5, 896.5}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSMutableDictionary">
@ -62763,9 +62879,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{703, 808}, {194, 210}}</string>
<string>{{703, 792}, {194, 226}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{703, 808}, {194, 210}}</string>
<string>{{703, 792}, {194, 226}}</string>
<boolean value="NO"/>
<object class="NSMutableDictionary">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -62988,7 +63104,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<object class="NSAffineTransform">
<bytes key="NSTransformStruct">P4AAAL+AAABBgAAAwmwAAA</bytes>
<bytes key="NSTransformStruct">P4AAAL+AAABBgAAAwswAAA</bytes>
</object>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@ -63752,7 +63868,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">10189</int>
<int key="maxID">10199</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@ -64281,6 +64397,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<string>toggleFullScreenDisplay:</string>
<string>toggleHUDVisibility:</string>
<string>toggleKeepMinDisplaySizeAtNormal:</string>
<string>toggleShowHUDCPULoadAverage:</string>
<string>toggleShowHUDFrameIndex:</string>
<string>toggleShowHUDInput:</string>
<string>toggleShowHUDLagFrameCount:</string>
@ -64333,6 +64450,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<string>id</string>
<string>id</string>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
@ -64360,6 +64478,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<string>toggleFullScreenDisplay:</string>
<string>toggleHUDVisibility:</string>
<string>toggleKeepMinDisplaySizeAtNormal:</string>
<string>toggleShowHUDCPULoadAverage:</string>
<string>toggleShowHUDFrameIndex:</string>
<string>toggleShowHUDInput:</string>
<string>toggleShowHUDLagFrameCount:</string>
@ -64461,6 +64580,10 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2
<string key="name">toggleKeepMinDisplaySizeAtNormal:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleShowHUDCPULoadAverage:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">toggleShowHUDFrameIndex:</string>
<string key="candidateClassName">id</string>

View File

@ -60,6 +60,7 @@ class OGLVideoOutput;
@property (assign) BOOL isHUDRender3DFPSVisible;
@property (assign) BOOL isHUDFrameIndexVisible;
@property (assign) BOOL isHUDLagFrameCountVisible;
@property (assign) BOOL isHUDCPULoadAverageVisible;
@property (assign) BOOL isHUDRealTimeClockVisible;
@property (assign) BOOL useVerticalSync;
@property (assign) BOOL videoFiltersPreferGPU;
@ -188,6 +189,7 @@ class OGLVideoOutput;
- (IBAction) toggleShowHUDFrameIndex:(id)sender;
- (IBAction) toggleShowHUDLagFrameCount:(id)sender;
- (IBAction) toggleShowHUDInput:(id)sender;
- (IBAction) toggleShowHUDCPULoadAverage:(id)sender;
- (IBAction) toggleShowHUDRealTimeClock:(id)sender;
- (IBAction) toggleKeepMinDisplaySizeAtNormal:(id)sender;
- (IBAction) toggleStatusBar:(id)sender;

View File

@ -740,6 +740,11 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
//[[self view] setIsHUDInputVisible:![[self view] isHUDInputVisible]];
}
- (IBAction) toggleShowHUDCPULoadAverage:(id)sender
{
[[self view] setIsHUDCPULoadAverageVisible:![[self view] isHUDCPULoadAverageVisible]];
}
- (IBAction) toggleShowHUDRealTimeClock:(id)sender
{
[[self view] setIsHUDRealTimeClockVisible:![[self view] isHUDRealTimeClockVisible]];
@ -935,6 +940,7 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
[[NSUserDefaults standardUserDefaults] setBool:[[self view] isHUDRender3DFPSVisible] forKey:@"HUD_ShowRender3DFPS"];
[[NSUserDefaults standardUserDefaults] setBool:[[self view] isHUDFrameIndexVisible] forKey:@"HUD_ShowFrameIndex"];
[[NSUserDefaults standardUserDefaults] setBool:[[self view] isHUDLagFrameCountVisible] forKey:@"HUD_ShowLagFrameCount"];
[[NSUserDefaults standardUserDefaults] setBool:[[self view] isHUDCPULoadAverageVisible] forKey:@"HUD_ShowCPULoadAverage"];
[[NSUserDefaults standardUserDefaults] setBool:[[self view] isHUDRealTimeClockVisible] forKey:@"HUD_ShowRTC"];
// TODO: Show HUD Input.
//[[NSUserDefaults standardUserDefaults] setBool:[[self view] isHUDInputVisible] forKey:@"HUD_ShowInput"];
@ -1122,6 +1128,13 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
[(NSMenuItem *)theItem setState:([[self view] isHUDLagFrameCountVisible]) ? NSOnState : NSOffState];
}
}
else if (theAction == @selector(toggleShowHUDCPULoadAverage:))
{
if ([(id)theItem isMemberOfClass:[NSMenuItem class]])
{
[(NSMenuItem *)theItem setState:([[self view] isHUDCPULoadAverageVisible]) ? NSOnState : NSOffState];
}
}
else if (theAction == @selector(toggleShowHUDRealTimeClock:))
{
if ([(id)theItem isMemberOfClass:[NSMenuItem class]])
@ -1378,6 +1391,7 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
@dynamic isHUDRender3DFPSVisible;
@dynamic isHUDFrameIndexVisible;
@dynamic isHUDLagFrameCountVisible;
@dynamic isHUDCPULoadAverageVisible;
@dynamic isHUDRealTimeClockVisible;
@dynamic useVerticalSync;
@dynamic videoFiltersPreferGPU;
@ -1593,6 +1607,28 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
return theState;
}
- (void) setIsHUDCPULoadAverageVisible:(BOOL)theState
{
OSSpinLockLock(&spinlockIsHUDVisible);
CGLLockContext(cglDisplayContext);
CGLSetCurrentContext(cglDisplayContext);
oglv->GetHUDLayer()->SetShowCPULoadAverage((theState) ? true : false);
[self drawVideoFrame];
CGLUnlockContext(cglDisplayContext);
OSSpinLockUnlock(&spinlockIsHUDVisible);
}
- (BOOL) isHUDCPULoadAverageVisible
{
OSSpinLockLock(&spinlockIsHUDVisible);
const BOOL theState = (oglv->GetHUDLayer()->GetShowCPULoadAverage()) ? YES : NO;
OSSpinLockUnlock(&spinlockIsHUDVisible);
return theState;
}
- (void) setIsHUDRealTimeClockVisible:(BOOL)theState
{
OSSpinLockLock(&spinlockIsHUDVisible);
@ -2076,7 +2112,9 @@ static std::unordered_map<NSScreen *, DisplayWindowController *> _screenMap; //
frameInfo.render3DFPS,
frameInfo.frameIndex,
frameInfo.lagFrameCount,
frameInfo.rtcString);
frameInfo.rtcString,
frameInfo.cpuLoadAvgARM9,
frameInfo.cpuLoadAvgARM7);
hudLayer->ProcessOGL();
}

View File

@ -632,6 +632,7 @@
const BOOL hudShowRender3DFPS = [(NSNumber *)[windowProperties valueForKey:@"hudShowRender3DFPS"] boolValue];
const BOOL hudShowFrameIndex = [(NSNumber *)[windowProperties valueForKey:@"hudShowFrameIndex"] boolValue];
const BOOL hudShowLagFrameCount = [(NSNumber *)[windowProperties valueForKey:@"hudShowLagFrameCount"] boolValue];
const BOOL hudShowCPULoadAverage = [(NSNumber *)[windowProperties valueForKey:@"hudShowCPULoadAverage"] boolValue];
const BOOL hudShowRTC = [(NSNumber *)[windowProperties valueForKey:@"hudShowRTC"] boolValue];
// TODO: Show HUD Input.
//const BOOL hudShowInput = [(NSNumber *)[windowProperties valueForKey:@"hudShowInput"] boolValue];
@ -670,6 +671,7 @@
[[windowController view] setIsHUDRender3DFPSVisible:hudShowRender3DFPS];
[[windowController view] setIsHUDFrameIndexVisible:hudShowFrameIndex];
[[windowController view] setIsHUDLagFrameCountVisible:hudShowLagFrameCount];
[[windowController view] setIsHUDCPULoadAverageVisible:hudShowCPULoadAverage];
[[windowController view] setIsHUDRealTimeClockVisible:hudShowRTC];
[[windowController masterWindow] setFrameOrigin:NSMakePoint(frameX, frameY)];
@ -742,6 +744,7 @@
[NSNumber numberWithBool:[[windowController view] isHUDRender3DFPSVisible]], @"hudShowRender3DFPS",
[NSNumber numberWithBool:[[windowController view] isHUDFrameIndexVisible]], @"hudShowFrameIndex",
[NSNumber numberWithBool:[[windowController view] isHUDLagFrameCountVisible]], @"hudShowLagFrameCount",
[NSNumber numberWithBool:[[windowController view] isHUDCPULoadAverageVisible]], @"hudShowCPULoadAverage",
[NSNumber numberWithBool:[[windowController view] isHUDRealTimeClockVisible]], @"hudShowRTC",
[NSNumber numberWithBool:[windowController isMinSizeNormal]], @"isMinSizeNormal",
[NSNumber numberWithBool:[windowController isShowingStatusBar]], @"isShowingStatusBar",

View File

@ -2208,28 +2208,12 @@ static void StepRunLoop_User()
if(nds.idleFrameCounter==0 || oneSecond)
{
//calculate a 16 frame arm9 load average
for(int cpu=0;cpu<2;cpu++)
{
int load = 0;
//printf("%d: ",cpu);
for(int i=0;i<16;i++)
{
//blend together a few frames to keep low-framerate games from having a jittering load average
//(they will tend to work 100% for a frame and then sleep for a while)
//4 frames should handle even the slowest of games
s32 sample =
nds.runCycleCollector[cpu][(i+0+nds.idleFrameCounter)&15]
+ nds.runCycleCollector[cpu][(i+1+nds.idleFrameCounter)&15]
+ nds.runCycleCollector[cpu][(i+2+nds.idleFrameCounter)&15]
+ nds.runCycleCollector[cpu][(i+3+nds.idleFrameCounter)&15];
sample /= 4;
load = load/8 + sample*7/8;
}
//printf("\n");
load = std::min(100,std::max(0,(int)(load*100/1120380)));
Hud.cpuload[cpu] = load;
}
u32 loadAvgARM9;
u32 loadAvgARM7;
NDS_GetCPULoadAverage(loadAvgARM9, loadAvgARM7);
Hud.cpuload[ARMCPU_ARM9] = (int)loadAvgARM9;
Hud.cpuload[ARMCPU_ARM7] = (int)loadAvgARM7;
}
Hud.cpuloopIterationCount = nds.cpuloopIterationCount;