Second and final pass of clearing out tabs.

This commit is contained in:
Lioncash 2014-02-16 23:51:41 -05:00
parent a8ca2c6cc2
commit 3fd87a7636
242 changed files with 1706 additions and 1702 deletions

View File

@ -16,7 +16,7 @@ typedef struct
s32 iMajorVersion; s32 iMajorVersion;
s32 iMinorVersion; s32 iMinorVersion;
u32 uiSourceCount; u32 uiSourceCount;
vector<string> *pvstrExtensions; vector<string>* pvstrExtensions;
bool bSelected; bool bSelected;
} ALDEVICEINFO, *LPALDEVICEINFO; } ALDEVICEINFO, *LPALDEVICEINFO;

View File

@ -20,7 +20,7 @@ class FixedSizeQueue
int count; // sacrifice 4 bytes for a simpler implementation. may optimize away in the future. int count; // sacrifice 4 bytes for a simpler implementation. may optimize away in the future.
// Make copy constructor private for now. // Make copy constructor private for now.
FixedSizeQueue(FixedSizeQueue &other) { } FixedSizeQueue(FixedSizeQueue &other) {}
public: public:
FixedSizeQueue() FixedSizeQueue()

View File

@ -64,13 +64,13 @@ LogManager::LogManager()
m_Log[LogTypes::WII_IPC_HLE] = new LogContainer("WII_IPC_HLE", "WII IPC HLE"); m_Log[LogTypes::WII_IPC_HLE] = new LogContainer("WII_IPC_HLE", "WII IPC HLE");
m_Log[LogTypes::WII_IPC_DVD] = new LogContainer("WII_IPC_DVD", "WII IPC DVD"); m_Log[LogTypes::WII_IPC_DVD] = new LogContainer("WII_IPC_DVD", "WII IPC DVD");
m_Log[LogTypes::WII_IPC_ES] = new LogContainer("WII_IPC_ES", "WII IPC ES"); m_Log[LogTypes::WII_IPC_ES] = new LogContainer("WII_IPC_ES", "WII IPC ES");
m_Log[LogTypes::WII_IPC_FILEIO] = new LogContainer("WII_IPC_FILEIO","WII IPC FILEIO"); m_Log[LogTypes::WII_IPC_FILEIO] = new LogContainer("WII_IPC_FILEIO", "WII IPC FILEIO");
m_Log[LogTypes::WII_IPC_SD] = new LogContainer("WII_IPC_SD", "WII IPC SD"); m_Log[LogTypes::WII_IPC_SD] = new LogContainer("WII_IPC_SD", "WII IPC SD");
m_Log[LogTypes::WII_IPC_STM] = new LogContainer("WII_IPC_STM", "WII IPC STM"); m_Log[LogTypes::WII_IPC_STM] = new LogContainer("WII_IPC_STM", "WII IPC STM");
m_Log[LogTypes::WII_IPC_NET] = new LogContainer("WII_IPC_NET", "WII IPC NET"); m_Log[LogTypes::WII_IPC_NET] = new LogContainer("WII_IPC_NET", "WII IPC NET");
m_Log[LogTypes::WII_IPC_WC24] = new LogContainer("WII_IPC_WC24", "WII IPC WC24"); m_Log[LogTypes::WII_IPC_WC24] = new LogContainer("WII_IPC_WC24", "WII IPC WC24");
m_Log[LogTypes::WII_IPC_SSL] = new LogContainer("WII_IPC_SSL", "WII IPC SSL"); m_Log[LogTypes::WII_IPC_SSL] = new LogContainer("WII_IPC_SSL", "WII IPC SSL");
m_Log[LogTypes::WII_IPC_WIIMOTE] = new LogContainer("WII_IPC_WIIMOTE","WII IPC WIIMOTE"); m_Log[LogTypes::WII_IPC_WIIMOTE] = new LogContainer("WII_IPC_WIIMOTE", "WII IPC WIIMOTE");
m_Log[LogTypes::ACTIONREPLAY] = new LogContainer("ActionReplay", "ActionReplay"); m_Log[LogTypes::ACTIONREPLAY] = new LogContainer("ActionReplay", "ActionReplay");
m_Log[LogTypes::MEMCARD_MANAGER] = new LogContainer("MemCard Manager", "MemCard Manager"); m_Log[LogTypes::MEMCARD_MANAGER] = new LogContainer("MemCard Manager", "MemCard Manager");
m_Log[LogTypes::NETPLAY] = new LogContainer("NETPLAY", "Netplay"); m_Log[LogTypes::NETPLAY] = new LogContainer("NETPLAY", "Netplay");

View File

@ -346,11 +346,6 @@ public:
return owns; return owns;
} }
//explicit operator bool () const
//{
// return owns_lock();
//}
mutex_type* mutex() const mutex_type* mutex() const
{ {
return pm; return pm;

View File

@ -520,11 +520,7 @@ std::string SHIFTJISToUTF8(const std::string& input)
std::string UTF16ToUTF8(const std::wstring& input) std::string UTF16ToUTF8(const std::wstring& input)
{ {
std::string result = std::string result = CodeToUTF8("UTF-16LE", input);
// CodeToUTF8("UCS-2", input);
// CodeToUTF8("UCS-2LE", input);
// CodeToUTF8("UTF-16", input);
CodeToUTF8("UTF-16LE", input);
// TODO: why is this needed? // TODO: why is this needed?
result.erase(std::remove(result.begin(), result.end(), 0x00), result.end()); result.erase(std::remove(result.begin(), result.end(), 0x00), result.end());

View File

@ -308,7 +308,7 @@ bool RunCode(const ARCode &arcode)
{ {
// skip until a "00000000 40000000" line is reached // skip until a "00000000 40000000" line is reached
LogInfo("Line skipped"); LogInfo("Line skipped");
if (0 == addr && 0x40000000 == data) // check for an endif line if (addr == 0 && 0x40000000 == data) // check for an endif line
skip_count = 0; skip_count = 0;
} }

View File

@ -49,34 +49,34 @@ bool CBoot::EmulatedBS2_GC()
// Write necessary values // Write necessary values
// Here we write values to memory that the apploader does not take care of. Game info goes // Here we write values to memory that the apploader does not take care of. Game info goes
// to 0x80000000 according to yagcd 4.2. // to 0x80000000 according to YAGCD 4.2.
DVDInterface::DVDRead(0x00000000, 0x80000000, 0x20); // write disc info DVDInterface::DVDRead(0x00000000, 0x80000000, 0x20); // write disc info
Memory::Write_U32(0x0D15EA5E, 0x80000020); // booted from bootrom. 0xE5207C22 = booted from jtag Memory::Write_U32(0x0D15EA5E, 0x80000020); // Booted from bootrom. 0xE5207C22 = booted from jtag
Memory::Write_U32(Memory::REALRAM_SIZE, 0x80000028); // Physical Memory Size (24MB on retail) Memory::Write_U32(Memory::REALRAM_SIZE, 0x80000028); // Physical Memory Size (24MB on retail)
// TODO determine why some games fail when using a retail id. (Seem to take different EXI paths, see ikaruga for example) // TODO determine why some games fail when using a retail ID. (Seem to take different EXI paths, see Ikaruga for example)
Memory::Write_U32(0x10000006, 0x8000002C); // Console type - DevKit (retail ID == 0x00000003) see yagcd 4.2.1.1.2 Memory::Write_U32(0x10000006, 0x8000002C); // Console type - DevKit (retail ID == 0x00000003) see YAGCD 4.2.1.1.2
Memory::Write_U32(SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC Memory::Write_U32(SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC
? 0 : 1, 0x800000CC); // fake the VI Init of the IPL (yagcd 4.2.1.4) ? 0 : 1, 0x800000CC); // Fake the VI Init of the IPL (YAGCD 4.2.1.4)
Memory::Write_U32(0x01000000, 0x800000d0); // ARAM Size. 16MB main + 4/16/32MB external (retail consoles have no external ARAM) Memory::Write_U32(0x01000000, 0x800000d0); // ARAM Size. 16MB main + 4/16/32MB external (retail consoles have no external ARAM)
Memory::Write_U32(0x09a7ec80, 0x800000F8); // Bus Clock Speed Memory::Write_U32(0x09a7ec80, 0x800000F8); // Bus Clock Speed
Memory::Write_U32(0x1cf7c580, 0x800000FC); // CPU Clock Speed Memory::Write_U32(0x1cf7c580, 0x800000FC); // CPU Clock Speed
Memory::Write_U32(0x4c000064, 0x80000300); // write default DFI Handler: rfi Memory::Write_U32(0x4c000064, 0x80000300); // Write default DFI Handler: rfi
Memory::Write_U32(0x4c000064, 0x80000800); // write default FPU Handler: rfi Memory::Write_U32(0x4c000064, 0x80000800); // Write default FPU Handler: rfi
Memory::Write_U32(0x4c000064, 0x80000C00); // write default Syscall Handler: rfi Memory::Write_U32(0x4c000064, 0x80000C00); // Write default Syscall Handler: rfi
Memory::Write_U64((u64)CEXIIPL::GetGCTime() * (u64)40500000, 0x800030D8); // preset time base ticks Memory::Write_U64((u64)CEXIIPL::GetGCTime() * (u64)40500000, 0x800030D8); // Preset time base ticks
// HIO checks this // HIO checks this
//Memory::Write_U16(0x8200, 0x000030e6); // Console type //Memory::Write_U16(0x8200, 0x000030e6); // Console type
HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader
// Load Apploader to Memory - The apploader is hardcoded to begin at 0x2440 on the disc, // Load Apploader to Memory - The apploader is hardcoded to begin at 0x2440 on the disc,
// but the size can differ between discs. Compare with yagcd chap 13. // but the size can differ between discs. Compare with YAGCD chap 13.
u32 iAppLoaderOffset = 0x2440; u32 iAppLoaderOffset = 0x2440;
u32 iAppLoaderEntry = VolumeHandler::Read32(iAppLoaderOffset + 0x10); u32 iAppLoaderEntry = VolumeHandler::Read32(iAppLoaderOffset + 0x10);
u32 iAppLoaderSize = VolumeHandler::Read32(iAppLoaderOffset + 0x14) + VolumeHandler::Read32(iAppLoaderOffset + 0x18); u32 iAppLoaderSize = VolumeHandler::Read32(iAppLoaderOffset + 0x14) + VolumeHandler::Read32(iAppLoaderOffset + 0x18);
@ -91,8 +91,8 @@ bool CBoot::EmulatedBS2_GC()
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC) if (SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC)
{ {
PowerPC::ppcState.gpr[1] = 0x81566550; // StackPointer, used to be set to 0x816ffff0 PowerPC::ppcState.gpr[1] = 0x81566550; // StackPointer, used to be set to 0x816ffff0
PowerPC::ppcState.gpr[2] = 0x81465cc0; // global pointer to Small Data Area 2 Base (haven't seen anything use it...meh) PowerPC::ppcState.gpr[2] = 0x81465cc0; // Global pointer to Small Data Area 2 Base (haven't seen anything use it...meh)
PowerPC::ppcState.gpr[13] = 0x81465320; // global pointer to Small Data Area Base (Luigi's Mansion's apploader uses it) PowerPC::ppcState.gpr[13] = 0x81465320; // Global pointer to Small Data Area Base (Luigi's Mansion's apploader uses it)
} }
else else
{ {
@ -321,9 +321,9 @@ bool CBoot::EmulatedBS2_Wii()
UReg_MSR& m_MSR = ((UReg_MSR&)PowerPC::ppcState.msr); UReg_MSR& m_MSR = ((UReg_MSR&)PowerPC::ppcState.msr);
m_MSR.FP = 1; m_MSR.FP = 1;
Memory::Write_U32(0x4c000064, 0x80000300); // write default DFI Handler: rfi Memory::Write_U32(0x4c000064, 0x80000300); // Write default DFI Handler: rfi
Memory::Write_U32(0x4c000064, 0x80000800); // write default FPU Handler: rfi Memory::Write_U32(0x4c000064, 0x80000800); // Write default FPU Handler: rfi
Memory::Write_U32(0x4c000064, 0x80000C00); // write default Syscall Handler: rfi Memory::Write_U32(0x4c000064, 0x80000C00); // Write default Syscall Handler: rfi
HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader

View File

@ -271,7 +271,8 @@ bool SCoreStartupParameter::AutoSetup(EBootBS2 _BootBS2)
delete pVolume; delete pVolume;
} }
else else
{ // null pVolume means that we are loading from nand folder (Most Likely Wii Menu) {
// null pVolume means that we are loading from nand folder (Most Likely Wii Menu)
// if this is the second boot we would be using the Name and id of the last title // if this is the second boot we would be using the Name and id of the last title
m_strName.clear(); m_strName.clear();
m_strUniqueID.clear(); m_strUniqueID.clear();

View File

@ -395,8 +395,8 @@ void Advance()
{ {
if (first->time <= globalTimer) if (first->time <= globalTimer)
{ {
// LOG(POWERPC, "[Scheduler] %s (%lld, %lld) ", //LOG(POWERPC, "[Scheduler] %s (%lld, %lld) ",
// event_types[first->type].name ? event_types[first->type].name : "?", (u64)globalTimer, (u64)first->time); // event_types[first->type].name ? event_types[first->type].name : "?", (u64)globalTimer, (u64)first->time);
Event* evt = first; Event* evt = first;
first = first->next; first = first->next;
event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time)); event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time));

View File

@ -35,7 +35,7 @@ enum partype_t
P_REGM19 = P_REG | 0x1910, // used in multiply instructions P_REGM19 = P_REG | 0x1910, // used in multiply instructions
P_REG1A = P_REG | 0x1a80, P_REG1A = P_REG | 0x1a80,
P_REG1C = P_REG | 0x1c00, P_REG1C = P_REG | 0x1c00,
// P_ACC = P_REG | 0x1c10, // used for global accum (gcdsptool's value) // P_ACC = P_REG | 0x1c10, // used for global accum (gcdsptool's value)
P_ACCL = P_REG | 0x1c00, // used for low part of accum P_ACCL = P_REG | 0x1c00, // used for low part of accum
P_ACCM = P_REG | 0x1e00, // used for mid part of accum P_ACCM = P_REG | 0x1e00, // used for mid part of accum
// The following are not in gcdsptool // The following are not in gcdsptool

View File

@ -41,10 +41,10 @@ void CUCode_AXWii::HandleCommandList()
u32 pb_addr = 0; u32 pb_addr = 0;
// WARN_LOG(DSPHLE, "Command list:"); // WARN_LOG(DSPHLE, "Command list:");
// for (u32 i = 0; m_cmdlist[i] != CMD_END; ++i) // for (u32 i = 0; m_cmdlist[i] != CMD_END; ++i)
// WARN_LOG(DSPHLE, "%04x", m_cmdlist[i]); // WARN_LOG(DSPHLE, "%04x", m_cmdlist[i]);
// WARN_LOG(DSPHLE, "-------------"); // WARN_LOG(DSPHLE, "-------------");
u32 curr_idx = 0; u32 curr_idx = 0;
bool end = false; bool end = false;

View File

@ -203,7 +203,7 @@ void CUCode_Zelda::HandleMail_SMSVersion(u32 _uMail)
soundStream->GetMixer()->SetHLEReady(true); soundStream->GetMixer()->SetHLEReady(true);
DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync"); DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync");
// soundStream->Update(); //do it in this thread to avoid sync problems // soundStream->Update(); //do it in this thread to avoid sync problems
m_bSyncCmdPending = false; m_bSyncCmdPending = false;
} }
@ -333,7 +333,7 @@ void CUCode_Zelda::HandleMail_NormalVersion(u32 _uMail)
soundStream->GetMixer()->SetHLEReady(true); soundStream->GetMixer()->SetHLEReady(true);
DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync"); DEBUG_LOG(DSPHLE, "Update the SoundThread to be in sync");
// soundStream->Update(); //do it in this thread to avoid sync problems // soundStream->Update(); //do it in this thread to avoid sync problems
m_bSyncCmdPending = false; m_bSyncCmdPending = false;
} }

View File

@ -487,7 +487,7 @@ void CUCode_Zelda::RenderAddVoice(ZeldaVoicePB &PB, s32* _LeftBuffer, s32* _Righ
} }
// XK: Use this to disable MIDI music (GREAT for testing). Also kills some sound FX. // XK: Use this to disable MIDI music (GREAT for testing). Also kills some sound FX.
//if(PB.SoundType == 0x0d00) { //if (PB.SoundType == 0x0d00) {
// PB.NeedsReset = 0; // PB.NeedsReset = 0;
// return; // return;
//} //}
@ -547,8 +547,7 @@ void CUCode_Zelda::RenderAddVoice(ZeldaVoicePB &PB, s32* _LeftBuffer, s32* _Righ
RenderSynth_RectWave(PB, m_VoiceBuffer, _Size); RenderSynth_RectWave(PB, m_VoiceBuffer, _Size);
break; break;
case 0x0001: // Example: "Denied" sound when trying to pull out a sword case 0x0001: // Example: "Denied" sound when trying to pull out a sword indoors in ZWW
// indoors in ZWW
RenderSynth_SawWave(PB, m_VoiceBuffer, _Size); RenderSynth_SawWave(PB, m_VoiceBuffer, _Size);
break; break;

View File

@ -251,9 +251,9 @@ void Init()
{ {
m_DISR.Hex = 0; m_DISR.Hex = 0;
m_DICVR.Hex = 0; m_DICVR.Hex = 0;
m_DICMDBUF[0].Hex= 0; m_DICMDBUF[0].Hex = 0;
m_DICMDBUF[1].Hex= 0; m_DICMDBUF[1].Hex = 0;
m_DICMDBUF[2].Hex= 0; m_DICMDBUF[2].Hex = 0;
m_DIMAR.Hex = 0; m_DIMAR.Hex = 0;
m_DILENGTH.Hex = 0; m_DILENGTH.Hex = 0;
m_DICR.Hex = 0; m_DICR.Hex = 0;
@ -534,7 +534,7 @@ void GenerateDIInterrupt(DI_InterruptType _DVDInterrupt)
void ExecuteCommand(UDICR& _DICR) void ExecuteCommand(UDICR& _DICR)
{ {
// _dbg_assert_(DVDINTERFACE, _DICR.RW == 0); // only DVD to Memory // _dbg_assert_(DVDINTERFACE, _DICR.RW == 0); // only DVD to Memory
int GCAM = ((SConfig::GetInstance().m_SIDevice[0] == SIDEVICE_AM_BASEBOARD) int GCAM = ((SConfig::GetInstance().m_SIDevice[0] == SIDEVICE_AM_BASEBOARD)
&& (SConfig::GetInstance().m_EXIDevice[2] == EXIDEVICE_AM_BASEBOARD)) && (SConfig::GetInstance().m_EXIDevice[2] == EXIDEVICE_AM_BASEBOARD))
? 1 : 0; ? 1 : 0;
@ -825,8 +825,8 @@ void ExecuteCommand(UDICR& _DICR)
break; break;
// Audio Stream (Immediate) // Audio Stream (Immediate)
// m_DICMDBUF[0].CMDBYTE1 = subcommand // m_DICMDBUF[0].CMDBYTE1 = Subcommand
// m_DICMDBUF[1].Hex << 2 = offset on disc // m_DICMDBUF[1].Hex << 2 = Offset on disc
// m_DICMDBUF[2].Hex = Length of the stream // m_DICMDBUF[2].Hex = Length of the stream
case 0xE1: case 0xE1:
{ {

View File

@ -43,7 +43,7 @@ u32 IEXIDevice::ImmRead(u32 _uSize)
void IEXIDevice::DMAWrite(u32 _uAddr, u32 _uSize) void IEXIDevice::DMAWrite(u32 _uAddr, u32 _uSize)
{ {
// _dbg_assert_(EXPANSIONINTERFACE, 0); // _dbg_assert_(EXPANSIONINTERFACE, 0);
while (_uSize--) while (_uSize--)
{ {
u8 uByte = Memory::Read_U8(_uAddr++); u8 uByte = Memory::Read_U8(_uAddr++);
@ -53,7 +53,7 @@ void IEXIDevice::DMAWrite(u32 _uAddr, u32 _uSize)
void IEXIDevice::DMARead(u32 _uAddr, u32 _uSize) void IEXIDevice::DMARead(u32 _uAddr, u32 _uSize)
{ {
// _dbg_assert_(EXPANSIONINTERFACE, 0); // _dbg_assert_(EXPANSIONINTERFACE, 0);
while (_uSize--) while (_uSize--)
{ {
u8 uByte = 0; u8 uByte = 0;

View File

@ -988,7 +988,8 @@ void GCMemcard::Gcs_SavConvert(DEntry &tempDEntry, int saveType, int length)
switch(saveType) switch(saveType)
{ {
case GCS: case GCS:
{ // field containing the Block count as displayed within {
// field containing the Block count as displayed within
// the GameSaves software is not stored in the GCS file. // the GameSaves software is not stored in the GCS file.
// It is stored only within the corresponding GSV file. // It is stored only within the corresponding GSV file.
// If the GCS file is added without using the GameSaves software, // If the GCS file is added without using the GameSaves software,

View File

@ -166,7 +166,7 @@ void DoState(PointerWrap &p)
{ {
bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii; bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
p.DoArray(m_pPhysicalRAM, RAM_SIZE); p.DoArray(m_pPhysicalRAM, RAM_SIZE);
// p.DoArray(m_pVirtualEFB, EFB_SIZE); //p.DoArray(m_pVirtualEFB, EFB_SIZE);
p.DoArray(m_pVirtualL1Cache, L1_CACHE_SIZE); p.DoArray(m_pVirtualL1Cache, L1_CACHE_SIZE);
p.DoMarker("Memory RAM"); p.DoMarker("Memory RAM");
if (bFakeVMEM) if (bFakeVMEM)

View File

@ -148,7 +148,8 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address,
// reason we end up in this function: // reason we end up in this function:
if (em_address == 0xCC008000) if (em_address == 0xCC008000)
{ {
switch (sizeof(T)) { switch (sizeof(T))
{
case 1: GPFifo::Write8((u8)data, em_address); return; case 1: GPFifo::Write8((u8)data, em_address); return;
case 2: GPFifo::Write16((u16)data, em_address); return; case 2: GPFifo::Write16((u16)data, em_address); return;
case 4: GPFifo::Write32((u32)data, em_address); return; case 4: GPFifo::Write32((u32)data, em_address); return;

View File

@ -7,7 +7,8 @@
#include "../InputCommon/InputConfig.h" #include "../InputCommon/InputConfig.h"
#include "ChunkFile.h" #include "ChunkFile.h"
enum { enum
{
WIIMOTE_CHAN_0 = 0, WIIMOTE_CHAN_0 = 0,
WIIMOTE_CHAN_1, WIIMOTE_CHAN_1,
WIIMOTE_CHAN_2, WIIMOTE_CHAN_2,

View File

@ -372,7 +372,7 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
if (!emu && !rdr->error) if (!emu && !rdr->error)
{ {
//if (dataReply[1] == 0xa4 && wm->GetMotionPlusActive()) //if (dataReply[1] == 0xa4 && wm->GetMotionPlusActive())
//memcpy(&((u8*)&wm->m_reg_motion_plus)[rdr->address>>8], rdr->data, rdr->size+1); // memcpy(&((u8*)&wm->m_reg_motion_plus)[rdr->address>>8], rdr->data, rdr->size+1);
//if (dataReply[1] == 0xa4 && !wm->GetMotionPlusActive()) //if (dataReply[1] == 0xa4 && !wm->GetMotionPlusActive())
//if (dataReply[1] == 0xa4) //if (dataReply[1] == 0xa4)
// memcpy(&((u8*)&wm->m_reg_ext)[rdr->address>>8], rdr->data, rdr->size+1); // memcpy(&((u8*)&wm->m_reg_ext)[rdr->address>>8], rdr->data, rdr->size+1);
@ -397,7 +397,8 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
//if(((u8*)&wm->m_reg_ext)[0xf0] == 0xaa) { //if(((u8*)&wm->m_reg_ext)[0xf0] == 0xaa) {
// wiimote_decrypt(&wm->m_ext_key, &data[0x07], 0x00, (data[4] >> 0x04) + 1); // wiimote_decrypt(&wm->m_ext_key, &data[0x07], 0x00, (data[4] >> 0x04) + 1);
//if (wm->m_extension->name == "NUNCHUCK") { //if (wm->m_extension->name == "NUNCHUCK")
//{
// INFO_LOG(CONSOLE, "\nGame got the Nunchuck calibration:\n"); // INFO_LOG(CONSOLE, "\nGame got the Nunchuck calibration:\n");
// INFO_LOG(CONSOLE, "Cal_zero.x: %i\n", data[7 + 0]); // INFO_LOG(CONSOLE, "Cal_zero.x: %i\n", data[7 + 0]);
// INFO_LOG(CONSOLE, "Cal_zero.y: %i\n", data[7 + 1]); // INFO_LOG(CONSOLE, "Cal_zero.y: %i\n", data[7 + 1]);
@ -412,7 +413,8 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
// INFO_LOG(CONSOLE, "Js.Min.y: %i\n", data[7 + 12]); // INFO_LOG(CONSOLE, "Js.Min.y: %i\n", data[7 + 12]);
// INFO_LOG(CONSOLE, "JS.Center.y: %i\n\n", data[7 + 13]); // INFO_LOG(CONSOLE, "JS.Center.y: %i\n\n", data[7 + 13]);
//} //}
//else // g_Config.bClassicControllerConnected { //else // g_Config.bClassicControllerConnected
//{
// INFO_LOG(CONSOLE, "\nGame got the Classic Controller calibration:\n"); // INFO_LOG(CONSOLE, "\nGame got the Classic Controller calibration:\n");
// INFO_LOG(CONSOLE, "Lx.Max: %i\n", data[7 + 0]); // INFO_LOG(CONSOLE, "Lx.Max: %i\n", data[7 + 0]);
// INFO_LOG(CONSOLE, "Lx.Min: %i\n", data[7 + 1]); // INFO_LOG(CONSOLE, "Lx.Min: %i\n", data[7 + 1]);

View File

@ -470,8 +470,7 @@ void Wiimote::GetIRData(u8* const data, bool use_accel)
ncos=1; ncos=1;
} }
// PanicAlert("%d %d %d\nx:%f\nz:%f\nsin:%f\ncos:%f",accel->x,accel->y,accel->z,ax,az,sin,cos); // PanicAlert("%d %d %d\nx:%f\nz:%f\nsin:%f\ncos:%f",accel->x,accel->y,accel->z,ax,az,sin,cos);
//PanicAlert("%d %d %d\n%d %d %d\n%d %d %d",accel->x,accel->y,accel->z,calib->zero_g.x,calib->zero_g.y,calib->zero_g.z, // PanicAlert("%d %d %d\n%d %d %d\n%d %d %d",accel->x,accel->y,accel->z,calib->zero_g.x,calib->zero_g.y,calib->zero_g.z, calib->one_g.x,calib->one_g.y,calib->one_g.z);
// calib->one_g.x,calib->one_g.y,calib->one_g.z);
} }
else else
{ {

View File

@ -477,14 +477,14 @@ int CWII_IPC_HLE_Device_di::GetCmdDelay(u32 _CommandAddress)
return SystemTimers::GetTicksPerSecond() / 146; return SystemTimers::GetTicksPerSecond() / 146;
break; break;
// case DVDLowAudioBufferConfig: // case DVDLowAudioBufferConfig:
// case DVDLowInquiry: // case DVDLowInquiry:
// case DVDLowReadDiskID: // case DVDLowReadDiskID:
// case DVDLowWaitForCoverClose: // case DVDLowWaitForCoverClose:
// case DVDLowGetCoverReg: // case DVDLowGetCoverReg:
// case DVDLowGetCoverStatus: // case DVDLowGetCoverStatus:
// case DVDLowReset: // case DVDLowReset:
// case DVDLowClosePartition: // case DVDLowClosePartition:
default: default:
// random numbers here! // random numbers here!
// More than ~1/2000th of a second hangs DKCR with DSP HLE, maybe. // More than ~1/2000th of a second hangs DKCR with DSP HLE, maybe.

View File

@ -252,7 +252,6 @@ bool CWII_IPC_HLE_Device_FileIO::Write(u32 _CommandAddress)
const u32 Address = Memory::Read_U32(_CommandAddress + 0xC); // Write data from this memory address const u32 Address = Memory::Read_U32(_CommandAddress + 0xC); // Write data from this memory address
const u32 Size = Memory::Read_U32(_CommandAddress + 0x10); const u32 Size = Memory::Read_U32(_CommandAddress + 0x10);
if (auto file = OpenFile()) if (auto file = OpenFile())
{ {
if (m_Mode == ISFS_OPEN_READ) if (m_Mode == ISFS_OPEN_READ)

View File

@ -17,7 +17,7 @@
#include "../VolumeHandler.h" #include "../VolumeHandler.h"
#define MAX_NAME (12) #define MAX_NAME 12
static Common::replace_v replacements; static Common::replace_v replacements;

View File

@ -204,10 +204,10 @@ bool CWII_IPC_HLE_Device_sdio_slot0::IOCtl(u32 _CommandAddress)
break; break;
} }
// INFO_LOG(WII_IPC_SD, "InBuffer"); // INFO_LOG(WII_IPC_SD, "InBuffer");
// DumpCommands(BufferIn, BufferInSize / 4, LogTypes::WII_IPC_SD); // DumpCommands(BufferIn, BufferInSize / 4, LogTypes::WII_IPC_SD);
// INFO_LOG(WII_IPC_SD, "OutBuffer"); // INFO_LOG(WII_IPC_SD, "OutBuffer");
// DumpCommands(BufferOut, BufferOutSize/4, LogTypes::WII_IPC_SD); // DumpCommands(BufferOut, BufferOutSize/4, LogTypes::WII_IPC_SD);
if (ReturnValue == RET_EVENT_REGISTER) if (ReturnValue == RET_EVENT_REGISTER)
{ {

View File

@ -150,7 +150,7 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::Close(u32 _CommandAddress, bool _bForc
bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtl(u32 _CommandAddress) bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtl(u32 _CommandAddress)
{ {
//ERROR_LOG(WII_IPC_WIIMOTE, "Passing ioctl to ioctlv"); //ERROR_LOG(WII_IPC_WIIMOTE, "Passing ioctl to ioctlv");
return IOCtlV(_CommandAddress); //hack return IOCtlV(_CommandAddress); // FIXME: Hack
} }
bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtlV(u32 _CommandAddress) bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtlV(u32 _CommandAddress)

View File

@ -218,7 +218,7 @@ private:
// Execute HCI Message // Execute HCI Message
void ExecuteHCICommandMessage(const SHCICommandMessage& _rCtrlMessage); void ExecuteHCICommandMessage(const SHCICommandMessage& _rCtrlMessage);
// OGF 0x01 Link control commands and return parameters // OGF 0x01 - Link control commands and return parameters
void CommandWriteInquiryMode(u8* _Input); void CommandWriteInquiryMode(u8* _Input);
void CommandWritePageScanType(u8* _Input); void CommandWritePageScanType(u8* _Input);
void CommandHostBufferSize(u8* _Input); void CommandHostBufferSize(u8* _Input);
@ -237,11 +237,11 @@ private:
void CommandDeleteStoredLinkKey(u8* _Input); void CommandDeleteStoredLinkKey(u8* _Input);
void CommandChangeConPacketType(u8* _Input); void CommandChangeConPacketType(u8* _Input);
// OGF 0x02 Link policy commands and return parameters // OGF 0x02 - Link policy commands and return parameters
void CommandWriteLinkPolicy(u8* _Input); void CommandWriteLinkPolicy(u8* _Input);
void CommandSniffMode(u8* _Input); void CommandSniffMode(u8* _Input);
// OGF 0x03 Host Controller and Baseband commands and return parameters // OGF 0x03 - Host Controller and Baseband commands and return parameters
void CommandReset(u8* _Input); void CommandReset(u8* _Input);
void CommandWriteLocalName(u8* _Input); void CommandWriteLocalName(u8* _Input);
void CommandWritePageTimeOut(u8* _Input); void CommandWritePageTimeOut(u8* _Input);
@ -253,13 +253,13 @@ private:
void CommandWriteInquiryScanType(u8* _Input); void CommandWriteInquiryScanType(u8* _Input);
void CommandWriteLinkSupervisionTimeout(u8* _Input); void CommandWriteLinkSupervisionTimeout(u8* _Input);
// OGF 0x04 Informational commands and return parameters // OGF 0x04 - Informational commands and return parameters
void CommandReadBufferSize(u8* _Input); void CommandReadBufferSize(u8* _Input);
void CommandReadLocalVer(u8* _Input); void CommandReadLocalVer(u8* _Input);
void CommandReadLocalFeatures(u8* _Input); void CommandReadLocalFeatures(u8* _Input);
void CommandReadBDAdrr(u8* _Input); void CommandReadBDAdrr(u8* _Input);
// OGF 0x3F Vendor specific // OGF 0x3F - Vendor specific
void CommandVendorSpecific_FC4C(u8* _Input, u32 _Size); void CommandVendorSpecific_FC4C(u8* _Input, u32 _Size);
void CommandVendorSpecific_FC4F(u8* _Input, u32 _Size); void CommandVendorSpecific_FC4F(u8* _Input, u32 _Size);

View File

@ -744,7 +744,7 @@ void CWII_IPC_HLE_WiiMote::SDPSendServiceAttributeResponse(u16 cid, u16 Transact
} }
// _dbg_assert_(WII_IPC_WIIMOTE, ServiceHandle == 0x10000); // _dbg_assert_(WII_IPC_WIIMOTE, ServiceHandle == 0x10000);
u32 contState = ParseCont(pContinuationState); u32 contState = ParseCont(pContinuationState);

View File

@ -72,6 +72,7 @@ enum
CON_ERR_VERSION_MISMATCH = 3 CON_ERR_VERSION_MISMATCH = 3
}; };
namespace NetPlay { namespace NetPlay
{
bool IsNetPlayRunning(); bool IsNetPlayRunning();
}; };

View File

@ -60,7 +60,7 @@ public:
static void fnmaddsx(UGeckoInstruction _inst); static void fnmaddsx(UGeckoInstruction _inst);
static void fnmsubsx(UGeckoInstruction _inst); static void fnmsubsx(UGeckoInstruction _inst);
static void fresx(UGeckoInstruction _inst); static void fresx(UGeckoInstruction _inst);
// static void fsqrtsx(UGeckoInstruction _inst); //static void fsqrtsx(UGeckoInstruction _inst);
static void fsubsx(UGeckoInstruction _inst); static void fsubsx(UGeckoInstruction _inst);
static void fabsx(UGeckoInstruction _inst); static void fabsx(UGeckoInstruction _inst);
static void fcmpo(UGeckoInstruction _inst); static void fcmpo(UGeckoInstruction _inst);

View File

@ -54,8 +54,7 @@ inline T CLAMP(T a, T bottom, T top) {
return a; return a;
} }
void Interpreter::Helper_Quantize(const u32 _Addr, const double _fValue, void Interpreter::Helper_Quantize(const u32 _Addr, const double _fValue, const EQuantizeType _quantizeType, const unsigned int _uScale)
const EQuantizeType _quantizeType, const unsigned int _uScale)
{ {
switch (_quantizeType) switch (_quantizeType)
{ {
@ -98,8 +97,7 @@ void Interpreter::Helper_Quantize(const u32 _Addr, const double _fValue,
} }
} }
float Interpreter::Helper_Dequantize(const u32 _Addr, const EQuantizeType _quantizeType, float Interpreter::Helper_Dequantize(const u32 _Addr, const EQuantizeType _quantizeType, const unsigned int _uScale)
const unsigned int _uScale)
{ {
// dequantize the value // dequantize the value
float fResult; float fResult;

View File

@ -310,7 +310,7 @@ static GekkoOPTemplate table59[] =
{18, Interpreter::fdivsx, {"fdivsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 16, 0, 0, 0}}, // TODO {18, Interpreter::fdivsx, {"fdivsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 16, 0, 0, 0}}, // TODO
{20, Interpreter::fsubsx, {"fsubsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}}, {20, Interpreter::fsubsx, {"fsubsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}},
{21, Interpreter::faddsx, {"faddsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}}, {21, Interpreter::faddsx, {"faddsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}},
// {22, Interpreter::fsqrtsx, {"fsqrtsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}}, // Not implemented on gekko //{22, Interpreter::fsqrtsx, {"fsqrtsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}}, // Not implemented on gekko
{24, Interpreter::fresx, {"fresx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}}, {24, Interpreter::fresx, {"fresx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}},
{25, Interpreter::fmulsx, {"fmulsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}}, {25, Interpreter::fmulsx, {"fmulsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}},
{28, Interpreter::fmsubsx, {"fmsubsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}}, {28, Interpreter::fmsubsx, {"fmsubsx", OPTYPE_FPU, FL_RC_BIT_F | FL_USE_FPU, 0, 0, 0, 0}},

View File

@ -254,7 +254,8 @@ void Jit64::reg_imm(UGeckoInstruction inst)
} }
break; break;
case 15: case 15:
if (a == 0) { // lis if (a == 0) // lis
{
// Merge with next instruction if loading a 32-bits immediate value (lis + addi, lis + ori) // Merge with next instruction if loading a 32-bits immediate value (lis + addi, lis + ori)
if (!js.isLastInstruction && !Core::g_CoreStartupParameter.bEnableDebugging) if (!js.isLastInstruction && !Core::g_CoreStartupParameter.bEnableDebugging)
{ {

View File

@ -107,11 +107,11 @@ void Jit64::psq_l(UGeckoInstruction inst)
CALLptr(MScaled(EDX, addr_scale, (u32)(u64)asm_routines.pairedLoadQuantized)); CALLptr(MScaled(EDX, addr_scale, (u32)(u64)asm_routines.pairedLoadQuantized));
ABI_RestoreStack(0); ABI_RestoreStack(0);
// MEMCHECK_START // FIXME: MMU does not work here because of unsafe memory access // MEMCHECK_START // FIXME: MMU does not work here because of unsafe memory access
CVTPS2PD(fpr.RX(inst.RS), R(XMM0)); CVTPS2PD(fpr.RX(inst.RS), R(XMM0));
// MEMCHECK_END // MEMCHECK_END
gpr.UnlockAll(); gpr.UnlockAll();
gpr.UnlockAllX(); gpr.UnlockAllX();

View File

@ -425,8 +425,9 @@ static void regMarkMemAddress(RegInfo& RI, InstLoc I, InstLoc AI, unsigned OpNum
} }
// in 64-bit build, this returns a completely bizarre address sometimes! // in 64-bit build, this returns a completely bizarre address sometimes!
static std::pair<OpArg, u32> regBuildMemAddress(RegInfo& RI, InstLoc I, static std::pair<OpArg, u32> regBuildMemAddress(RegInfo& RI, InstLoc I, InstLoc AI,
InstLoc AI, unsigned OpNum, unsigned Size, X64Reg* dest) { unsigned OpNum, unsigned Size, X64Reg* dest)
{
if (isImm(*AI)) { if (isImm(*AI)) {
unsigned addr = RI.Build->GetImmValue(AI); unsigned addr = RI.Build->GetImmValue(AI);
if (Memory::IsRAMAddress(addr)) { if (Memory::IsRAMAddress(addr)) {

View File

@ -365,7 +365,6 @@ static void ImHere()
return; return;
} }
DEBUG_LOG(DYNA_REC, "I'm here - PC = %08x , LR = %08x", PC, LR); DEBUG_LOG(DYNA_REC, "I'm here - PC = %08x , LR = %08x", PC, LR);
// printf("I'm here - PC = %08x , LR = %08x", PC, LR);
been_here[PC] = 1; been_here[PC] = 1;
} }

View File

@ -134,13 +134,13 @@ void JitArm::bx(UGeckoInstruction inst)
destination = SignExt26(inst.LI << 2); destination = SignExt26(inst.LI << 2);
else else
destination = js.compilerPC + SignExt26(inst.LI << 2); destination = js.compilerPC + SignExt26(inst.LI << 2);
#ifdef ACID_TEST #ifdef ACID_TEST
if (inst.LK) if (inst.LK)
{ {
MOV(R14, 0); MOV(R14, 0);
STRB(R14, R9, PPCSTATE_OFF(cr_fast[0])); STRB(R14, R9, PPCSTATE_OFF(cr_fast[0]));
} }
#endif #endif
if (destination == js.compilerPC) if (destination == js.compilerPC)
{ {
//PanicAlert("Idle loop detected at %08x", destination); //PanicAlert("Idle loop detected at %08x", destination);

View File

@ -77,33 +77,36 @@ integer code are more aggresively combining blocks and dead condition
register elimination, which should be very helpful for small blocks. register elimination, which should be very helpful for small blocks.
TODO (in no particular order): TODO (in no particular order):
JIT for misc remaining FP instructions - JIT for misc remaining FP instructions
JIT for bcctrx - JIT for bcctrx
Misc optimizations for FP instructions - Misc optimizations for FP instructions
Inter-block dead register elimination; this seems likely to have large - Inter-block dead register elimination; this seems likely to have large
performance benefits, although I'm not completely sure. performance benefits, although I'm not completely sure.
Inter-block inlining; also likely to have large performance benefits.
- Inter-block inlining; also likely to have large performance benefits.
The tricky parts are deciding which blocks to inline, and that the The tricky parts are deciding which blocks to inline, and that the
IR can't really deal with branches whose destination is in the IR can't really deal with branches whose destination is in the
the middle of a generated block. the middle of a generated block.
Specialized slw/srw/sraw; I think there are some tricks that could
- Specialized slw/srw/sraw; I think there are some tricks that could
have a non-trivial effect, and there are significantly shorter have a non-trivial effect, and there are significantly shorter
implementations for 64-bit involving abusing 64-bit shifts. implementations for 64-bit involving abusing 64-bit shifts.
64-bit compat (it should only be a few tweaks to register allocation and 64-bit compat (it should only be a few tweaks to register allocation and the load/store code)
the load/store code)
Scheduling to reduce register pressure: PowerPC compilers like to push - Scheduling to reduce register pressure: PowerPCcompilers like to push
uses far away from definitions, but it's rather unfriendly to modern uses far away from definitions, but it's rather unfriendly to modern
x86 processors, which are short on registers and extremely good at x86 processors, which are short on registers and extremely good at instruction reordering.
instruction reordering.
Common subexpression elimination - Common subexpression elimination
Optimize load/store of sum using complex addressing (partially implemented) - Optimize load/store of sum using complex addressing (partially implemented)
Loop optimizations (loop-carried registers, LICM) - Loop optimizations (loop-carried registers, LICM)
Code refactoring/cleanup - Code refactoring/cleanup
Investigate performance of the JIT itself; this doesn't affect
- Investigate performance of the JIT itself; this doesn't affect
framerates significantly, but it does take a visible amount framerates significantly, but it does take a visible amount
of time for a complicated piece of code like a video decoder of time for a complicated piece of code like a video decoder to compile.
to compile.
Fix profiled loads/stores to work safely. On 32-bit, one solution is to - Fix profiled loads/stores to work safely. On 32-bit, one solution is to
use a spare segment register, and expand the backpatch solution use a spare segment register, and expand the backpatch solution
to work in all the relevant situations. On 64-bit, the existing to work in all the relevant situations. On 64-bit, the existing
fast memory solution should basically work. An alternative fast memory solution should basically work. An alternative

View File

@ -62,13 +62,13 @@ void DoState(PointerWrap &p)
// it changes registers even in MODE_MEASURE (which is suspicious and seems like it could cause desyncs) // it changes registers even in MODE_MEASURE (which is suspicious and seems like it could cause desyncs)
// and because the values it's changing have been added to CoreTiming::DoState, so it might conflict to mess with them here. // and because the values it's changing have been added to CoreTiming::DoState, so it might conflict to mess with them here.
// rSPR(SPR_DEC) = SystemTimers::GetFakeDecrementer(); // rSPR(SPR_DEC) = SystemTimers::GetFakeDecrementer();
// *((u64 *)&TL) = SystemTimers::GetFakeTimeBase(); //works since we are little endian and TL comes first :) // *((u64 *)&TL) = SystemTimers::GetFakeTimeBase(); //works since we are little endian and TL comes first :)
p.DoPOD(ppcState); p.DoPOD(ppcState);
// SystemTimers::DecrementerSet(); // SystemTimers::DecrementerSet();
// SystemTimers::TimeBaseSet(); // SystemTimers::TimeBaseSet();
JitInterface::DoState(p); JitInterface::DoState(p);
} }

View File

@ -108,7 +108,7 @@ void OnIdleIL();
void UpdatePerformanceMonitor(u32 cycles, u32 num_load_stores, u32 num_fp_inst); void UpdatePerformanceMonitor(u32 cycles, u32 num_load_stores, u32 num_fp_inst);
// Easy register access macros. // Easy register access macros.
#define HID0 ((UReg_HID0&)PowerPC::ppcState.spr[SPR_HID0]) #define HID0 ((UReg_HID0&)PowerPC::ppcState.spr[SPR_HID0])
#define HID2 ((UReg_HID2&)PowerPC::ppcState.spr[SPR_HID2]) #define HID2 ((UReg_HID2&)PowerPC::ppcState.spr[SPR_HID2])
#define HID4 ((UReg_HID4&)PowerPC::ppcState.spr[SPR_HID4]) #define HID4 ((UReg_HID4&)PowerPC::ppcState.spr[SPR_HID4])

View File

@ -252,7 +252,7 @@ void CompressAndDumpState(CompressAndDumpState_args save_args)
f.WriteArray(&header, 1); f.WriteArray(&header, 1);
if (0 != header.size) // non-zero header size means the state is compressed if (header.size != 0) // non-zero header size means the state is compressed
{ {
lzo_uint i = 0; lzo_uint i = 0;
while (true) while (true)
@ -374,7 +374,7 @@ void LoadFileStateData(const std::string& filename, std::vector<u8>& ret_data)
std::vector<u8> buffer; std::vector<u8> buffer;
if (0 != header.size) // non-zero size means the state is compressed if (header.size != 0) // non-zero size means the state is compressed
{ {
Core::DisplayMessage("Decompressing State...", 500); Core::DisplayMessage("Decompressing State...", 500);

View File

@ -25,7 +25,8 @@ namespace ButtonManager
std::map<std::pair<int, int>, Button*> m_buttons; std::map<std::pair<int, int>, Button*> m_buttons;
std::map<std::pair<int, int>, Axis*> m_axises; std::map<std::pair<int, int>, Axis*> m_axises;
std::unordered_map<std::string, InputDevice*> m_controllers; std::unordered_map<std::string, InputDevice*> m_controllers;
const char* configStrings[] = { "InputA", const char* configStrings[] = {
"InputA",
"InputB", "InputB",
"InputStart", "InputStart",
"InputX", "InputX",
@ -44,7 +45,8 @@ namespace ButtonManager
"CStickLeft", "CStickLeft",
"CStickRight", "CStickRight",
"InputL", "InputL",
"InputR" }; "InputR"
};
const int configStringNum = 20; const int configStringNum = 20;
void AddBind(std::string dev, sBind *bind) void AddBind(std::string dev, sBind *bind)

View File

@ -26,12 +26,9 @@ public:
{ {
SetToolBitmapSize(wxSize(24, 24)); SetToolBitmapSize(wxSize(24, 24));
m_Bitmaps[Toolbar_Delete] = m_Bitmaps[Toolbar_Delete] = wxBitmap(wxGetBitmapFromMemory(toolbar_delete_png).ConvertToImage().Rescale(24, 24));
wxBitmap(wxGetBitmapFromMemory(toolbar_delete_png).ConvertToImage().Rescale(24, 24)); m_Bitmaps[Toolbar_Add_BP] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_breakpoint_png).ConvertToImage().Rescale(24, 24));
m_Bitmaps[Toolbar_Add_BP] = m_Bitmaps[Toolbar_Add_MC] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_memcheck_png).ConvertToImage().Rescale(24, 24));
wxBitmap(wxGetBitmapFromMemory(toolbar_add_breakpoint_png).ConvertToImage().Rescale(24, 24));
m_Bitmaps[Toolbar_Add_MC] =
wxBitmap(wxGetBitmapFromMemory(toolbar_add_memcheck_png).ConvertToImage().Rescale(24, 24));
AddTool(ID_DELETE, wxT("Delete"), m_Bitmaps[Toolbar_Delete]); AddTool(ID_DELETE, wxT("Delete"), m_Bitmaps[Toolbar_Delete]);
Bind(wxEVT_COMMAND_TOOL_CLICKED, &CBreakPointWindow::OnDelete, parent, ID_DELETE); Bind(wxEVT_COMMAND_TOOL_CLICKED, &CBreakPointWindow::OnDelete, parent, ID_DELETE);

View File

@ -57,8 +57,7 @@ class CCodeWindow
void Update(); void Update();
void NotifyMapLoaded(); void NotifyMapLoaded();
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter, void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter, wxMenuBar *pMenuBar);
wxMenuBar *pMenuBar);
void CreateMenuOptions(wxMenu *pMenu); void CreateMenuOptions(wxMenu *pMenu);
void CreateMenuSymbols(wxMenuBar *pMenuBar); void CreateMenuSymbols(wxMenuBar *pMenuBar);
void RecreateToolbar(wxAuiToolBar*); void RecreateToolbar(wxAuiToolBar*);

View File

@ -94,8 +94,7 @@ void CCodeWindow::Save()
IniFile ini; IniFile ini;
ini.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX)); ini.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
ini.Set("General", "DebuggerFont", ini.Set("General", "DebuggerFont", WxStrToStr(DebuggerFont.GetNativeFontInfoUserDesc()));
WxStrToStr(DebuggerFont.GetNativeFontInfoUserDesc()));
// Boot to pause or not // Boot to pause or not
ini.Set("General", "AutomaticStart", GetMenuBar()->IsChecked(IDM_AUTOMATICSTART)); ini.Set("General", "AutomaticStart", GetMenuBar()->IsChecked(IDM_AUTOMATICSTART));

View File

@ -37,21 +37,21 @@ public:
private: private:
DECLARE_EVENT_TABLE(); DECLARE_EVENT_TABLE();
wxPanel *m_MainPanel; wxPanel* m_MainPanel;
wxButton *m_pButtonPause; wxButton* m_pButtonPause;
wxButton *m_pButtonPauseAtNext; wxButton* m_pButtonPauseAtNext;
wxButton *m_pButtonPauseAtNextFrame; wxButton* m_pButtonPauseAtNextFrame;
wxButton *m_pButtonCont; wxButton* m_pButtonCont;
wxChoice *m_pPauseAtList; wxChoice* m_pPauseAtList;
wxButton *m_pButtonDump; wxButton* m_pButtonDump;
wxChoice *m_pDumpList; wxChoice* m_pDumpList;
wxButton *m_pButtonUpdateScreen; wxButton* m_pButtonUpdateScreen;
wxButton *m_pButtonClearScreen; wxButton* m_pButtonClearScreen;
wxButton *m_pButtonClearTextureCache; wxButton* m_pButtonClearTextureCache;
wxButton *m_pButtonClearVertexShaderCache; wxButton* m_pButtonClearVertexShaderCache;
wxButton *m_pButtonClearPixelShaderCache; wxButton* m_pButtonClearPixelShaderCache;
wxTextCtrl *m_pCount; wxTextCtrl* m_pCount;
// TODO: Prefix with GFX_ // TODO: Prefix with GFX_

View File

@ -59,11 +59,11 @@ CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos,
wxLC_REPORT | wxSUNKEN_BORDER | wxLC_ALIGN_LEFT | wxLC_SINGLE_SEL | wxLC_SORT_ASCENDING), wxLC_REPORT | wxSUNKEN_BORDER | wxLC_ALIGN_LEFT | wxLC_SINGLE_SEL | wxLC_SORT_ASCENDING),
0, wxEXPAND); 0, wxEXPAND);
sizerBig->Add(sizerSplit, 2, wxEXPAND); sizerBig->Add(sizerSplit, 2, wxEXPAND);
// sizerBig->Add(memview, 5, wxEXPAND); // sizerBig->Add(memview, 5, wxEXPAND);
// sizerBig->Add(sizerRight, 0, wxEXPAND | wxALL, 3); // sizerBig->Add(sizerRight, 0, wxEXPAND | wxALL, 3);
sizerBig->Add(button_refresh = new wxButton(this, IDM_REFRESH_LIST, _("&Refresh"))); sizerBig->Add(button_refresh = new wxButton(this, IDM_REFRESH_LIST, _("&Refresh")));
// sizerRight->Add(addrbox = new wxTextCtrl(this, IDM_ADDRBOX, _T(""))); // sizerRight->Add(addrbox = new wxTextCtrl(this, IDM_ADDRBOX, _T("")));
// sizerRight->Add(new wxButton(this, IDM_SETPC, _("S&et PC"))); // sizerRight->Add(new wxButton(this, IDM_SETPC, _("S&et PC")));
SetSizer(sizerBig); SetSizer(sizerBig);

View File

@ -79,9 +79,9 @@ static void SetSpecialRegValue(int reg, u32 value)
case 6: PowerPC::ppcState.spr[SPR_SRR0] = value; break; case 6: PowerPC::ppcState.spr[SPR_SRR0] = value; break;
case 7: PowerPC::ppcState.spr[SPR_SRR1] = value; break; case 7: PowerPC::ppcState.spr[SPR_SRR1] = value; break;
case 8: PowerPC::ppcState.Exceptions = value; break; case 8: PowerPC::ppcState.Exceptions = value; break;
// Should we just change the value, or use ProcessorInterface::SetInterrupt() to make the system aware? // Should we just change the value, or use ProcessorInterface::SetInterrupt() to make the system aware?
// case 9: return ProcessorInterface::GetMask(); // case 9: return ProcessorInterface::GetMask();
// case 10: return ProcessorInterface::GetCause(); // case 10: return ProcessorInterface::GetCause();
default: return; default: return;
} }
} }

View File

@ -712,7 +712,7 @@ void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
SConfig::GetInstance().m_ListUsa = SConfig::GetInstance().m_ListPal = SConfig::GetInstance().m_ListUsa = SConfig::GetInstance().m_ListPal =
SConfig::GetInstance().m_ListFrance = SConfig::GetInstance().m_ListItaly = SConfig::GetInstance().m_ListFrance = SConfig::GetInstance().m_ListItaly =
SConfig::GetInstance().m_ListKorea = SConfig::GetInstance().m_ListTaiwan = SConfig::GetInstance().m_ListKorea = SConfig::GetInstance().m_ListTaiwan =
SConfig::GetInstance().m_ListUnknown= true; SConfig::GetInstance().m_ListUnknown = true;
GetMenuBar()->FindItem(IDM_LISTGC)->Check(true); GetMenuBar()->FindItem(IDM_LISTGC)->Check(true);
GetMenuBar()->FindItem(IDM_LISTWII)->Check(true); GetMenuBar()->FindItem(IDM_LISTWII)->Check(true);

View File

@ -58,7 +58,8 @@ void cInterfaceEGL::DetectMode()
EGL_NONE }; EGL_NONE };
// Get how many configs there are // Get how many configs there are
if (!eglChooseConfig( GLWin.egl_dpy, attribs, NULL, 0, &num_configs)) { if (!eglChooseConfig( GLWin.egl_dpy, attribs, NULL, 0, &num_configs))
{
INFO_LOG(VIDEO, "Error: couldn't get an EGL visual config\n"); INFO_LOG(VIDEO, "Error: couldn't get an EGL visual config\n");
goto err_exit; goto err_exit;
} }
@ -112,14 +113,16 @@ bool cInterfaceEGL::Create(void *&window_handle)
GLWin.egl_dpy = Platform.EGLGetDisplay(); GLWin.egl_dpy = Platform.EGLGetDisplay();
if (!GLWin.egl_dpy) { if (!GLWin.egl_dpy)
{
INFO_LOG(VIDEO, "Error: eglGetDisplay() failed\n"); INFO_LOG(VIDEO, "Error: eglGetDisplay() failed\n");
return false; return false;
} }
GLWin.platform = Platform.platform; GLWin.platform = Platform.platform;
if (!eglInitialize(GLWin.egl_dpy, &egl_major, &egl_minor)) { if (!eglInitialize(GLWin.egl_dpy, &egl_major, &egl_minor))
{
INFO_LOG(VIDEO, "Error: eglInitialize() failed\n"); INFO_LOG(VIDEO, "Error: eglInitialize() failed\n");
return false; return false;
} }
@ -163,7 +166,8 @@ bool cInterfaceEGL::Create(void *&window_handle)
break; break;
} }
if (!eglChooseConfig( GLWin.egl_dpy, attribs, &config, 1, &num_configs)) { if (!eglChooseConfig( GLWin.egl_dpy, attribs, &config, 1, &num_configs))
{
INFO_LOG(VIDEO, "Error: couldn't get an EGL visual config\n"); INFO_LOG(VIDEO, "Error: couldn't get an EGL visual config\n");
exit(1); exit(1);
} }
@ -189,16 +193,17 @@ bool cInterfaceEGL::Create(void *&window_handle)
INFO_LOG(VIDEO, "EGL_CLIENT_APIS = %s\n", s); INFO_LOG(VIDEO, "EGL_CLIENT_APIS = %s\n", s);
GLWin.egl_ctx = eglCreateContext(GLWin.egl_dpy, config, EGL_NO_CONTEXT, ctx_attribs ); GLWin.egl_ctx = eglCreateContext(GLWin.egl_dpy, config, EGL_NO_CONTEXT, ctx_attribs );
if (!GLWin.egl_ctx) { if (!GLWin.egl_ctx)
{
INFO_LOG(VIDEO, "Error: eglCreateContext failed\n"); INFO_LOG(VIDEO, "Error: eglCreateContext failed\n");
exit(1); exit(1);
} }
GLWin.native_window = Platform.CreateWindow(); GLWin.native_window = Platform.CreateWindow();
GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.native_window, NULL);
GLWin.native_window, NULL); if (!GLWin.egl_surf)
if (!GLWin.egl_surf) { {
INFO_LOG(VIDEO, "Error: eglCreateWindowSurface failed\n"); INFO_LOG(VIDEO, "Error: eglCreateWindowSurface failed\n");
exit(1); exit(1);
} }

View File

@ -70,8 +70,8 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
{ {
indexOne = SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG"); indexOne = SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG");
} }
else else // GC
{ // GC {
indexOne = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage; indexOne = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;
} }
@ -79,8 +79,8 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
{ {
indexOther = SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG"); indexOther = SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG");
} }
else else // GC
{ // GC {
indexOther = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage; indexOther = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;
} }

View File

@ -134,11 +134,6 @@ void CodeConfigPanel::UpdateInfoBox(wxCommandEvent&)
} }
} }
//void CodeConfigPanel::ApplyChanges(wxCommandEvent&)
//{
// Gecko::SetActiveCodes(m_gcodes);
//}
void CodeConfigPanel::DownloadCodes(wxCommandEvent&) void CodeConfigPanel::DownloadCodes(wxCommandEvent&)
{ {
if (m_gameid.empty()) if (m_gameid.empty())

View File

@ -36,12 +36,12 @@ private:
std::string m_gameid; std::string m_gameid;
// wxwidgets stuff // wxwidgets stuff
wxCheckListBox *m_listbox_gcodes; wxCheckListBox* m_listbox_gcodes;
struct struct
{ {
wxStaticText *label_name, *label_notes, *label_creator; wxStaticText* label_name, *label_notes, *label_creator;
wxTextCtrl *textctrl_notes; wxTextCtrl* textctrl_notes;
wxListBox *listbox_codes; wxListBox* listbox_codes;
} m_infobox; } m_infobox;
wxButton* btn_download; wxButton* btn_download;
}; };

View File

@ -223,11 +223,9 @@ void CLogWindow::OnWrapLineCheck(wxCommandEvent& event)
Text = m_Log->GetValue(); Text = m_Log->GetValue();
m_Log->Destroy(); m_Log->Destroy();
if (event.IsChecked()) if (event.IsChecked())
m_Log = CreateTextCtrl(this, IDM_LOG, m_Log = CreateTextCtrl(this, IDM_LOG, wxTE_RICH | wxTE_MULTILINE | wxTE_READONLY | wxTE_WORDWRAP);
wxTE_RICH | wxTE_MULTILINE | wxTE_READONLY | wxTE_WORDWRAP);
else else
m_Log = CreateTextCtrl(this, IDM_LOG, m_Log = CreateTextCtrl(this, IDM_LOG, wxTE_RICH | wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP);
wxTE_RICH | wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP);
m_Log->SetDefaultStyle(wxTextAttr(*wxWHITE)); m_Log->SetDefaultStyle(wxTextAttr(*wxWHITE));
m_Log->AppendText(Text); m_Log->AppendText(Text);
PopulateBottom(); PopulateBottom();

View File

@ -118,10 +118,12 @@ void Host_SysMessage(const char *fmt, ...)
va_end(list); va_end(list);
size_t len = strlen(msg); size_t len = strlen(msg);
if (msg[len - 1] != '\n') { if (msg[len - 1] != '\n')
{
msg[len - 1] = '\n'; msg[len - 1] = '\n';
msg[len] = '\0'; msg[len] = '\0';
} }
fprintf(stderr, "%s", msg); fprintf(stderr, "%s", msg);
} }
@ -295,8 +297,10 @@ int main(int argc, char* argv[])
{ NULL, 0, NULL, 0 } { NULL, 0, NULL, 0 }
}; };
while ((ch = getopt_long(argc, argv, "eh?v", longopts, 0)) != -1) { while ((ch = getopt_long(argc, argv, "eh?v", longopts, 0)) != -1)
switch (ch) { {
switch (ch)
{
case 'e': case 'e':
break; break;
case 'h': case 'h':
@ -309,7 +313,8 @@ int main(int argc, char* argv[])
} }
} }
if (help == 1 || argc == optind) { if (help == 1 || argc == optind)
{
fprintf(stderr, "%s\n\n", scm_rev_str); fprintf(stderr, "%s\n\n", scm_rev_str);
fprintf(stderr, "A multi-platform Gamecube/Wii emulator\n\n"); fprintf(stderr, "A multi-platform Gamecube/Wii emulator\n\n");
fprintf(stderr, "Usage: %s [-e <file>] [-h] [-v]\n", argv[0]); fprintf(stderr, "Usage: %s [-e <file>] [-h] [-v]\n", argv[0]);
@ -346,7 +351,8 @@ int main(int argc, char* argv[])
#endif #endif
#if HAVE_X11 #if HAVE_X11
#if USE_EGL #if USE_EGL
if (GLWin.platform == EGL_PLATFORM_X11) { if (GLWin.platform == EGL_PLATFORM_X11)
{
#endif #endif
XInitThreads(); XInitThreads();
X11_MainLoop(); X11_MainLoop();

View File

@ -808,14 +808,14 @@ void CMemcardManager::CMemcardListCtrl::OnRightClick(wxMouseEvent& event)
popupMenu->AppendSeparator(); popupMenu->AppendSeparator();
// popupMenu->AppendCheckItem(COLUMN_BANNER, _("Show save banner")); // popupMenu->AppendCheckItem(COLUMN_BANNER, _("Show save banner"));
popupMenu->AppendCheckItem(COLUMN_TITLE, _("Show save title")); popupMenu->AppendCheckItem(COLUMN_TITLE, _("Show save title"));
popupMenu->AppendCheckItem(COLUMN_COMMENT, _("Show save comment")); popupMenu->AppendCheckItem(COLUMN_COMMENT, _("Show save comment"));
popupMenu->AppendCheckItem(COLUMN_ICON, _("Show save icon")); popupMenu->AppendCheckItem(COLUMN_ICON, _("Show save icon"));
popupMenu->AppendCheckItem(COLUMN_BLOCKS, _("Show save blocks")); popupMenu->AppendCheckItem(COLUMN_BLOCKS, _("Show save blocks"));
popupMenu->AppendCheckItem(COLUMN_FIRSTBLOCK, _("Show first block")); popupMenu->AppendCheckItem(COLUMN_FIRSTBLOCK, _("Show first block"));
// for (int i = COLUMN_BANNER; i <= COLUMN_FIRSTBLOCK; i++) // for (int i = COLUMN_BANNER; i <= COLUMN_FIRSTBLOCK; i++)
for (int i = COLUMN_TITLE; i <= COLUMN_FIRSTBLOCK; i++) for (int i = COLUMN_TITLE; i <= COLUMN_FIRSTBLOCK; i++)
{ {
popupMenu->FindItem(i)->Check(__mcmSettings.column[i]); popupMenu->FindItem(i)->Check(__mcmSettings.column[i]);

View File

@ -36,21 +36,21 @@ class CMemcardManager : public wxDialog
private: private:
DECLARE_EVENT_TABLE(); DECLARE_EVENT_TABLE();
int page[2], int page[2];
itemsPerPage, int itemsPerPage;
maxPages; int maxPages;
std::string DefaultMemcard[2], std::string DefaultMemcard[2];
DefaultIOPath; std::string DefaultIOPath;
IniFile MemcardManagerIni; IniFile MemcardManagerIni;
IniFile::Section* iniMemcardSection; IniFile::Section* iniMemcardSection;
wxButton *m_CopyFrom[2], wxButton* m_CopyFrom[2];
*m_SaveImport[2], wxButton* m_SaveImport[2];
*m_SaveExport[2], wxButton* m_SaveExport[2];
*m_Delete[2], wxButton* m_Delete[2];
*m_NextPage[2], wxButton* m_NextPage[2];
*m_PrevPage[2], wxButton* m_PrevPage[2];
*m_ConvertToGci; wxButton* m_ConvertToGci;
wxFilePickerCtrl *m_MemcardPath[2]; wxFilePickerCtrl *m_MemcardPath[2];
wxStaticText *t_Status[2]; wxStaticText *t_Status[2];
@ -142,8 +142,8 @@ class CMemcardManager : public wxDialog
Unbind(wxEVT_RIGHT_DOWN, &CMemcardListCtrl::OnRightClick, this); Unbind(wxEVT_RIGHT_DOWN, &CMemcardListCtrl::OnRightClick, this);
} }
_mcmSettings & __mcmSettings; _mcmSettings & __mcmSettings;
bool prevPage, bool prevPage;
nextPage; bool nextPage;
private: private:
void OnRightClick(wxMouseEvent& event); void OnRightClick(wxMouseEvent& event);
}; };

View File

@ -18,10 +18,14 @@
static Common::replace_v replacements; static Common::replace_v replacements;
const u8 SDKey[16] = {0xAB, 0x01, 0xB9, 0xD8, 0xE1, 0x62, 0x2B, 0x08, const u8 SDKey[16] = {
0xAF, 0xBA, 0xD8, 0x4D, 0xBF, 0xC2, 0xA5, 0x5D}; 0xAB, 0x01, 0xB9, 0xD8, 0xE1, 0x62, 0x2B, 0x08,
const u8 MD5_BLANKER[0x10] = {0x0E, 0x65, 0x37, 0x81, 0x99, 0xBE, 0x45, 0x17, 0xAF, 0xBA, 0xD8, 0x4D, 0xBF, 0xC2, 0xA5, 0x5D
0xAB, 0x06, 0xEC, 0x22, 0x45, 0x1A, 0x57, 0x93}; };
const u8 MD5_BLANKER[0x10] = {
0x0E, 0x65, 0x37, 0x81, 0x99, 0xBE, 0x45, 0x17,
0xAB, 0x06, 0xEC, 0x22, 0x45, 0x1A, 0x57, 0x93
};
const u32 NG_id = 0x0403AC68; const u32 NG_id = 0x0403AC68;
bool CWiiSaveCrypted::ImportWiiSave(const char* FileName) bool CWiiSaveCrypted::ImportWiiSave(const char* FileName)
@ -147,8 +151,8 @@ void CWiiSaveCrypted::ReadHDR()
m_TitleID = Common::swap64(_header.hdr.SaveGameTitle); m_TitleID = Common::swap64(_header.hdr.SaveGameTitle);
u8 md5_file[16], u8 md5_file[16];
md5_calc[16]; u8 md5_calc[16];
memcpy(md5_file, _header.hdr.Md5, 0x10); memcpy(md5_file, _header.hdr.Md5, 0x10);
memcpy(_header.hdr.Md5, MD5_BLANKER, 0x10); memcpy(_header.hdr.Md5, MD5_BLANKER, 0x10);
md5((u8*)&_header, HEADER_SZ, md5_calc); md5((u8*)&_header, HEADER_SZ, md5_calc);
@ -450,13 +454,17 @@ void CWiiSaveCrypted::do_sig()
u32 NG_key_id = 0x6AAB8C59; u32 NG_key_id = 0x6AAB8C59;
u8 NG_priv[30] = { 0, 0xAB, 0xEE, 0xC1, 0xDD, 0xB4, 0xA6, 0x16, 0x6B, 0x70, 0xFD, 0x7E, 0x56, 0x67, 0x70, u8 NG_priv[30] = {
0x57, 0x55, 0x27, 0x38, 0xA3, 0x26, 0xC5, 0x46, 0x16, 0xF7, 0x62, 0xC9, 0xED, 0x73, 0xF2}; 0, 0xAB, 0xEE, 0xC1, 0xDD, 0xB4, 0xA6, 0x16, 0x6B, 0x70, 0xFD, 0x7E, 0x56, 0x67, 0x70,
0x57, 0x55, 0x27, 0x38, 0xA3, 0x26, 0xC5, 0x46, 0x16, 0xF7, 0x62, 0xC9, 0xED, 0x73, 0xF2
};
u8 NG_sig[0x3C] = {0, 0xD8, 0x81, 0x63, 0xB2, 0x00, 0x6B, 0x0B, 0x54, 0x82, 0x88, 0x63, 0x81, 0x1C, 0x00, u8 NG_sig[0x3C] = {
0, 0xD8, 0x81, 0x63, 0xB2, 0x00, 0x6B, 0x0B, 0x54, 0x82, 0x88, 0x63, 0x81, 0x1C, 0x00,
0x71, 0x12, 0xED, 0xB7, 0xFD, 0x21, 0xAB, 0x0E, 0x50, 0x0E, 0x1F, 0xBF, 0x78, 0xAD, 0x37, 0x71, 0x12, 0xED, 0xB7, 0xFD, 0x21, 0xAB, 0x0E, 0x50, 0x0E, 0x1F, 0xBF, 0x78, 0xAD, 0x37,
0x00, 0x71, 0x8D, 0x82, 0x41, 0xEE, 0x45, 0x11, 0xC7, 0x3B, 0xAC, 0x08, 0xB6, 0x83, 0xDC, 0x00, 0x71, 0x8D, 0x82, 0x41, 0xEE, 0x45, 0x11, 0xC7, 0x3B, 0xAC, 0x08, 0xB6, 0x83, 0xDC,
0x05, 0xB8, 0xA8, 0x90, 0x1F, 0xA8, 0x2A, 0x0E, 0x4E, 0x76, 0xEF, 0x44, 0x72, 0x99, 0xF8}; 0x05, 0xB8, 0xA8, 0x90, 0x1F, 0xA8, 0x2A, 0x0E, 0x4E, 0x76, 0xEF, 0x44, 0x72, 0x99, 0xF8
};
sprintf(signer, "Root-CA00000001-MS00000002"); sprintf(signer, "Root-CA00000001-MS00000002");
sprintf(name, "NG%08x", NG_id); sprintf(name, "NG%08x", NG_id);

View File

@ -96,8 +96,8 @@ private:
struct BK_Header // Not encrypted struct BK_Header // Not encrypted
{ {
u32 size; // 0x00000070 u32 size; // 0x00000070
// u16 magic; // 'Bk' // u16 magic; // 'Bk'
// u16 magic2; // or version (0x0001) // u16 magic2; // or version (0x0001)
u32 magic; // 0x426B0001 u32 magic; // 0x426B0001
u32 NGid; u32 NGid;
u32 numberOfFiles; u32 numberOfFiles;

View File

@ -43,10 +43,10 @@ private:
void MakeNetPlayDiag(int port, const std::string &game, bool is_hosting); void MakeNetPlayDiag(int port, const std::string &game, bool is_hosting);
wxTextCtrl *m_nickname_text, wxTextCtrl* m_nickname_text;
*m_host_port_text, wxTextCtrl* m_host_port_text;
*m_connect_port_text, wxTextCtrl* m_connect_port_text;
*m_connect_ip_text; wxTextCtrl* m_connect_ip_text;
wxListBox* m_game_lbox; wxListBox* m_game_lbox;
#ifdef USE_UPNP #ifdef USE_UPNP

View File

@ -123,7 +123,8 @@ const wxString WXKeyToString(int keycode)
case WXK_WINDOWS_MENU: return _("Windows Menu"); case WXK_WINDOWS_MENU: return _("Windows Menu");
} }
if (keycode > WXK_SPACE && keycode < WXK_DELETE) { if (keycode > WXK_SPACE && keycode < WXK_DELETE)
{
return wxString((wxChar)keycode, 1); return wxString((wxChar)keycode, 1);
} }

View File

@ -17,12 +17,6 @@ namespace ciface
namespace DInput namespace DInput
{ {
//BOOL CALLBACK DIEnumEffectsCallback(LPCDIEFFECTINFO pdei, LPVOID pvRef)
//{
// ((std::list<DIEFFECTINFO>*)pvRef)->push_back(*pdei);
// return DIENUM_CONTINUE;
//}
BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef) BOOL CALLBACK DIEnumDeviceObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOID pvRef)
{ {
((std::list<DIDEVICEOBJECTINSTANCE>*)pvRef)->push_back(*lpddoi); ((std::list<DIDEVICEOBJECTINSTANCE>*)pvRef)->push_back(*lpddoi);

View File

@ -32,13 +32,15 @@ private:
class Axis : public Input class Axis : public Input
{ {
public: public:
enum direction { enum direction
{
positive = 0, positive = 0,
negative negative
}; };
std::string GetName() const; std::string GetName() const;
Axis(IOHIDElementRef element, IOHIDDeviceRef device, direction dir); Axis(IOHIDElementRef element, IOHIDDeviceRef device, direction dir);
ControlState GetState() const; ControlState GetState() const;
private: private:
const IOHIDElementRef m_element; const IOHIDElementRef m_element;
const IOHIDDeviceRef m_device; const IOHIDDeviceRef m_device;
@ -51,7 +53,8 @@ private:
class Hat : public Input class Hat : public Input
{ {
public: public:
enum direction { enum direction
{
up = 0, up = 0,
right, right,
down, down,
@ -60,6 +63,7 @@ private:
std::string GetName() const; std::string GetName() const;
Hat(IOHIDElementRef element, IOHIDDeviceRef device, direction dir); Hat(IOHIDElementRef element, IOHIDDeviceRef device, direction dir);
ControlState GetState() const; ControlState GetState() const;
private: private:
const IOHIDElementRef m_element; const IOHIDElementRef m_element;
const IOHIDDeviceRef m_device; const IOHIDDeviceRef m_device;

View File

@ -514,8 +514,7 @@ void Renderer::SetViewport()
Ht = (Y + Ht <= GetTargetHeight()) ? Ht : (GetTargetHeight() - Y); Ht = (Y + Ht <= GetTargetHeight()) ? Ht : (GetTargetHeight() - Y);
// Some games set invalid values for z-min and z-max so fix them to the max and min allowed and let the shaders do this work // Some games set invalid values for z-min and z-max so fix them to the max and min allowed and let the shaders do this work
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y, D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y, Wd, Ht,
Wd, Ht,
0.f, // (xfregs.viewport.farZ - xfregs.viewport.zRange) / 16777216.0f; 0.f, // (xfregs.viewport.farZ - xfregs.viewport.zRange) / 16777216.0f;
1.f); // xfregs.viewport.farZ / 16777216.0f; 1.f); // xfregs.viewport.farZ / 16777216.0f;
D3D::context->RSSetViewports(1, &vp); D3D::context->RSSetViewports(1, &vp);

View File

@ -541,11 +541,11 @@ void SetCpControlRegister()
// We don't emulate proper GP timing anyway at the moment, so this code would just slow down emulation. // We don't emulate proper GP timing anyway at the moment, so this code would just slow down emulation.
void SetCpClearRegister() void SetCpClearRegister()
{ {
// if (IsOnThread()) // if (IsOnThread())
// { // {
// if (!m_CPClearReg.ClearFifoUnderflow && m_CPClearReg.ClearFifoOverflow) // if (!m_CPClearReg.ClearFifoUnderflow && m_CPClearReg.ClearFifoOverflow)
// bProcessFifoToLoWatermark = true; // bProcessFifoToLoWatermark = true;
// } // }
} }
void Update() void Update()

View File

@ -144,7 +144,7 @@ public:
{ {
// TODO: Not ready for usage yet // TODO: Not ready for usage yet
return true; return true;
// return constant_usage[index]; //return constant_usage[index];
} }
private: private:
std::vector<bool> constant_usage; // TODO: Is vector<bool> appropriate here? std::vector<bool> constant_usage; // TODO: Is vector<bool> appropriate here?

View File

@ -130,7 +130,7 @@ void TextureCache::Cleanup()
TexCache::iterator tcend = textures.end(); TexCache::iterator tcend = textures.end();
while (iter != tcend) while (iter != tcend)
{ {
if ( frameCount > TEXTURE_KILL_THRESHOLD + iter->second->frameCount if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second->frameCount
// EFB copies living on the host GPU are unrecoverable and thus shouldn't be deleted // EFB copies living on the host GPU are unrecoverable and thus shouldn't be deleted
&& ! iter->second->IsEfbCopy() ) && ! iter->second->IsEfbCopy() )

View File

@ -1478,7 +1478,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
const __m128i bV = _mm_or_si128( _mm_slli_epi16(tmpbV, 3), _mm_srli_epi16(tmpbV, 2) ); const __m128i bV = _mm_or_si128( _mm_slli_epi16(tmpbV, 3), _mm_srli_epi16(tmpbV, 2) );
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24); //newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24);
const __m128i final = _mm_or_si128( _mm_or_si128(rV,_mm_slli_epi32(gV, 8)), const __m128i final = _mm_or_si128(_mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
_mm_or_si128(_mm_slli_epi32(bV, 16), aVxff00)); _mm_or_si128(_mm_slli_epi32(bV, 16), aVxff00));
_mm_storeu_si128( (__m128i*)newdst, final ); _mm_storeu_si128( (__m128i*)newdst, final );
} }
@ -1508,7 +1508,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
); );
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24); //newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24);
const __m128i final = _mm_or_si128( _mm_or_si128(rV,_mm_slli_epi32(gV, 8)), const __m128i final = _mm_or_si128(_mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
_mm_or_si128(_mm_slli_epi32(bV, 16), _mm_slli_epi32(aV, 24))); _mm_or_si128(_mm_slli_epi32(bV, 16), _mm_slli_epi32(aV, 24)));
_mm_storeu_si128( (__m128i*)newdst, final ); _mm_storeu_si128( (__m128i*)newdst, final );
} }
@ -1580,7 +1580,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
const __m128i bV = _mm_or_si128( _mm_slli_epi16(tmpbV, 3), _mm_srli_epi16(tmpbV, 2) ); const __m128i bV = _mm_or_si128( _mm_slli_epi16(tmpbV, 3), _mm_srli_epi16(tmpbV, 2) );
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24); //newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24);
const __m128i final = _mm_or_si128( _mm_or_si128(rV,_mm_slli_epi32(gV, 8)), const __m128i final = _mm_or_si128(_mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
_mm_or_si128(_mm_slli_epi32(bV, 16), aVxff00)); _mm_or_si128(_mm_slli_epi32(bV, 16), aVxff00));
// write the final result: // write the final result:
@ -1615,7 +1615,7 @@ PC_TexFormat TexDecoder_Decode_RGBA(u32 * dst, const u8 * src, int width, int he
); );
//newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24); //newdst[0] = r0 | (g0 << 8) | (b0 << 16) | (a0 << 24);
const __m128i final = _mm_or_si128( _mm_or_si128(rV,_mm_slli_epi32(gV, 8)), const __m128i final = _mm_or_si128(_mm_or_si128(rV,_mm_slli_epi32(gV, 8)),
_mm_or_si128(_mm_slli_epi32(bV, 16), _mm_slli_epi32(aV, 24))); _mm_or_si128(_mm_slli_epi32(bV, 16), _mm_slli_epi32(aV, 24)));
// write the final result: // write the final result: