From c599451c60f6197660cc60eec01a6a7c8850e259 Mon Sep 17 00:00:00 2001 From: zilmar Date: Sat, 9 Jul 2016 21:03:10 +1000 Subject: [PATCH] [Project64] Clean up some spacing --- .../Project64-core/N64System/Mips/PifRam.cpp | 44 +++++++-------- Source/Project64-core/N64System/N64Class.cpp | 54 +++++++++---------- Source/Project64-core/N64System/N64RomClass.h | 1 + 3 files changed, 50 insertions(+), 49 deletions(-) diff --git a/Source/Project64-core/N64System/Mips/PifRam.cpp b/Source/Project64-core/N64System/Mips/PifRam.cpp index fc855b0a1..9f541d8b0 100644 --- a/Source/Project64-core/N64System/Mips/PifRam.cpp +++ b/Source/Project64-core/N64System/Mips/PifRam.cpp @@ -170,28 +170,28 @@ void CPifRam::PifRamWrite() { case 0x02: // format the 'challenge' message into 30 nibbles for X-Scale's CIC code - { - char Challenge[30], Response[30]; - for (int32_t i = 0; i < 15; i++) - { - Challenge[i * 2] = (m_PifRam[48 + i] >> 4) & 0x0f; - Challenge[i * 2 + 1] = m_PifRam[48 + i] & 0x0f; - } - n64_cic_nus_6105(Challenge, Response, CHALLENGE_LENGTH - 2); - uint64_t ResponseValue = 0; - m_PifRam[46] = m_PifRam[47] = 0x00; - for (int32_t z = 8; z > 0; z--) - { - ResponseValue = (ResponseValue << 8) | ((Response[(z - 1) * 2] << 4) + Response[(z - 1) * 2 + 1]); - } - memcpy(&m_PifRam[48], &ResponseValue, sizeof(uint64_t)); - ResponseValue = 0; - for (int32_t z = 7; z > 0; z--) - { - ResponseValue = (ResponseValue << 8) | ((Response[((z + 8) - 1) * 2] << 4) + Response[((z + 8) - 1) * 2 + 1]); - } - memcpy(&m_PifRam[56], &ResponseValue, sizeof(uint64_t)); - } + { + char Challenge[30], Response[30]; + for (int32_t i = 0; i < 15; i++) + { + Challenge[i * 2] = (m_PifRam[48 + i] >> 4) & 0x0f; + Challenge[i * 2 + 1] = m_PifRam[48 + i] & 0x0f; + } + n64_cic_nus_6105(Challenge, Response, CHALLENGE_LENGTH - 2); + uint64_t ResponseValue = 0; + m_PifRam[46] = m_PifRam[47] = 0x00; + for (int32_t z = 8; z > 0; z--) + { + ResponseValue = (ResponseValue << 8) | ((Response[(z - 1) * 2] << 4) + Response[(z - 1) * 2 + 1]); + } + memcpy(&m_PifRam[48], &ResponseValue, sizeof(uint64_t)); + ResponseValue = 0; + for (int32_t z = 7; z > 0; z--) + { + ResponseValue = (ResponseValue << 8) | ((Response[((z + 8) - 1) * 2] << 4) + Response[((z + 8) - 1) * 2 + 1]); + } + memcpy(&m_PifRam[56], &ResponseValue, sizeof(uint64_t)); + } break; case 0x08: m_PifRam[0x3F] = 0; diff --git a/Source/Project64-core/N64System/N64Class.cpp b/Source/Project64-core/N64System/N64Class.cpp index 987d0375c..7fdcb6b52 100644 --- a/Source/Project64-core/N64System/N64Class.cpp +++ b/Source/Project64-core/N64System/N64Class.cpp @@ -31,33 +31,33 @@ #pragma warning(disable:4355) // Disable 'this' : used in base member initializer list CN64System::CN64System(CPlugins * Plugins, bool SavesReadOnly, bool SyncSystem) : -CSystemEvents(this, Plugins), -m_EndEmulation(false), -m_SaveUsing((SAVE_CHIP_TYPE)g_Settings->LoadDword(Game_SaveChip)), -m_Plugins(Plugins), -m_SyncCPU(NULL), -m_SyncPlugins(NULL), -m_MMU_VM(SavesReadOnly), -m_TLB(this), -m_Reg(this, this), -m_Recomp(NULL), -m_InReset(false), -m_NextTimer(0), -m_SystemTimer(m_NextTimer), -m_bCleanFrameBox(true), -m_bInitialized(false), -m_RspBroke(true), -m_DMAUsed(false), -m_TestTimer(false), -m_NextInstruction(0), -m_JumpToLocation(0), -m_TLBLoadAddress(0), -m_TLBStoreAddress(0), -m_SyncCount(0), -m_thread(NULL), -m_hPauseEvent(true), -m_CheatsSlectionChanged(false), -m_SyncCpu(SyncSystem) + CSystemEvents(this, Plugins), + m_EndEmulation(false), + m_SaveUsing((SAVE_CHIP_TYPE)g_Settings->LoadDword(Game_SaveChip)), + m_Plugins(Plugins), + m_SyncCPU(NULL), + m_SyncPlugins(NULL), + m_MMU_VM(SavesReadOnly), + m_TLB(this), + m_Reg(this, this), + m_Recomp(NULL), + m_InReset(false), + m_NextTimer(0), + m_SystemTimer(m_NextTimer), + m_bCleanFrameBox(true), + m_bInitialized(false), + m_RspBroke(true), + m_DMAUsed(false), + m_TestTimer(false), + m_NextInstruction(0), + m_JumpToLocation(0), + m_TLBLoadAddress(0), + m_TLBStoreAddress(0), + m_SyncCount(0), + m_thread(NULL), + m_hPauseEvent(true), + m_CheatsSlectionChanged(false), + m_SyncCpu(SyncSystem) { uint32_t gameHertz = g_Settings->LoadDword(Game_ScreenHertz); if (gameHertz == 0) diff --git a/Source/Project64-core/N64System/N64RomClass.h b/Source/Project64-core/N64System/N64RomClass.h index 84f817108..2efa815b4 100644 --- a/Source/Project64-core/N64System/N64RomClass.h +++ b/Source/Project64-core/N64System/N64RomClass.h @@ -12,6 +12,7 @@ #include #include +#include class CN64Rom : protected CDebugSettings