[Project64] Clean up some spacing

This commit is contained in:
zilmar 2016-07-09 21:03:10 +10:00
parent a141e72899
commit c599451c60
3 changed files with 50 additions and 49 deletions

View File

@ -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;

View File

@ -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)

View File

@ -12,6 +12,7 @@
#include <Project64-core/N64System/N64Types.h>
#include <Project64-core/Settings/DebugSettings.h>
#include <Project64-core/Multilanguage.h>
class CN64Rom :
protected CDebugSettings