Second and final pass of clearing out tabs.
This commit is contained in:
parent
a8ca2c6cc2
commit
3fd87a7636
|
@ -346,11 +346,6 @@ public:
|
|||
return owns;
|
||||
}
|
||||
|
||||
//explicit operator bool () const
|
||||
//{
|
||||
// return owns_lock();
|
||||
//}
|
||||
|
||||
mutex_type* mutex() const
|
||||
{
|
||||
return pm;
|
||||
|
|
|
@ -520,11 +520,7 @@ std::string SHIFTJISToUTF8(const std::string& input)
|
|||
|
||||
std::string UTF16ToUTF8(const std::wstring& input)
|
||||
{
|
||||
std::string result =
|
||||
// CodeToUTF8("UCS-2", input);
|
||||
// CodeToUTF8("UCS-2LE", input);
|
||||
// CodeToUTF8("UTF-16", input);
|
||||
CodeToUTF8("UTF-16LE", input);
|
||||
std::string result = CodeToUTF8("UTF-16LE", input);
|
||||
|
||||
// TODO: why is this needed?
|
||||
result.erase(std::remove(result.begin(), result.end(), 0x00), result.end());
|
||||
|
|
|
@ -308,7 +308,7 @@ bool RunCode(const ARCode &arcode)
|
|||
{
|
||||
// skip until a "00000000 40000000" line is reached
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -49,34 +49,34 @@ bool CBoot::EmulatedBS2_GC()
|
|||
|
||||
// Write necessary values
|
||||
// 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
|
||||
|
||||
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)
|
||||
// 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
|
||||
// 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(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(0x09a7ec80, 0x800000F8); // Bus Clock Speed
|
||||
Memory::Write_U32(0x1cf7c580, 0x800000FC); // CPU Clock Speed
|
||||
|
||||
Memory::Write_U32(0x4c000064, 0x80000300); // write default DFI 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, 0x80000300); // Write default DFI Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000800); // Write default FPU 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
|
||||
//Memory::Write_U16(0x8200, 0x000030e6); // Console type
|
||||
|
||||
HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader
|
||||
|
||||
// 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 iAppLoaderEntry = VolumeHandler::Read32(iAppLoaderOffset + 0x10);
|
||||
u32 iAppLoaderSize = VolumeHandler::Read32(iAppLoaderOffset + 0x14) + VolumeHandler::Read32(iAppLoaderOffset + 0x18);
|
||||
|
@ -91,8 +91,8 @@ bool CBoot::EmulatedBS2_GC()
|
|||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bNTSC)
|
||||
{
|
||||
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[13] = 0x81465320; // global pointer to Small Data Area Base (Luigi's Mansion's apploader uses it)
|
||||
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)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -321,9 +321,9 @@ bool CBoot::EmulatedBS2_Wii()
|
|||
UReg_MSR& m_MSR = ((UReg_MSR&)PowerPC::ppcState.msr);
|
||||
m_MSR.FP = 1;
|
||||
|
||||
Memory::Write_U32(0x4c000064, 0x80000300); // write default DFI 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, 0x80000300); // Write default DFI Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000800); // Write default FPU Handler: rfi
|
||||
Memory::Write_U32(0x4c000064, 0x80000C00); // Write default Syscall Handler: rfi
|
||||
|
||||
HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader
|
||||
|
||||
|
|
|
@ -271,7 +271,8 @@ bool SCoreStartupParameter::AutoSetup(EBootBS2 _BootBS2)
|
|||
delete pVolume;
|
||||
}
|
||||
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
|
||||
m_strName.clear();
|
||||
m_strUniqueID.clear();
|
||||
|
|
|
@ -547,8 +547,7 @@ void CUCode_Zelda::RenderAddVoice(ZeldaVoicePB &PB, s32* _LeftBuffer, s32* _Righ
|
|||
RenderSynth_RectWave(PB, m_VoiceBuffer, _Size);
|
||||
break;
|
||||
|
||||
case 0x0001: // Example: "Denied" sound when trying to pull out a sword
|
||||
// indoors in ZWW
|
||||
case 0x0001: // Example: "Denied" sound when trying to pull out a sword indoors in ZWW
|
||||
RenderSynth_SawWave(PB, m_VoiceBuffer, _Size);
|
||||
break;
|
||||
|
||||
|
|
|
@ -825,8 +825,8 @@ void ExecuteCommand(UDICR& _DICR)
|
|||
break;
|
||||
|
||||
// Audio Stream (Immediate)
|
||||
// m_DICMDBUF[0].CMDBYTE1 = subcommand
|
||||
// m_DICMDBUF[1].Hex << 2 = offset on disc
|
||||
// m_DICMDBUF[0].CMDBYTE1 = Subcommand
|
||||
// m_DICMDBUF[1].Hex << 2 = Offset on disc
|
||||
// m_DICMDBUF[2].Hex = Length of the stream
|
||||
case 0xE1:
|
||||
{
|
||||
|
|
|
@ -988,7 +988,8 @@ void GCMemcard::Gcs_SavConvert(DEntry &tempDEntry, int saveType, int length)
|
|||
switch(saveType)
|
||||
{
|
||||
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.
|
||||
// It is stored only within the corresponding GSV file.
|
||||
// If the GCS file is added without using the GameSaves software,
|
||||
|
|
|
@ -148,7 +148,8 @@ inline void WriteToHardware(u32 em_address, const T data, u32 effective_address,
|
|||
// reason we end up in this function:
|
||||
if (em_address == 0xCC008000)
|
||||
{
|
||||
switch (sizeof(T)) {
|
||||
switch (sizeof(T))
|
||||
{
|
||||
case 1: GPFifo::Write8((u8)data, em_address); return;
|
||||
case 2: GPFifo::Write16((u16)data, em_address); return;
|
||||
case 4: GPFifo::Write32((u32)data, em_address); return;
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
#include "../InputCommon/InputConfig.h"
|
||||
#include "ChunkFile.h"
|
||||
|
||||
enum {
|
||||
enum
|
||||
{
|
||||
WIIMOTE_CHAN_0 = 0,
|
||||
WIIMOTE_CHAN_1,
|
||||
WIIMOTE_CHAN_2,
|
||||
|
|
|
@ -397,7 +397,8 @@ void Spy(Wiimote* wm_, const void* data_, size_t size_)
|
|||
//if(((u8*)&wm->m_reg_ext)[0xf0] == 0xaa) {
|
||||
// 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, "Cal_zero.x: %i\n", data[7 + 0]);
|
||||
// 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.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, "Lx.Max: %i\n", data[7 + 0]);
|
||||
// INFO_LOG(CONSOLE, "Lx.Min: %i\n", data[7 + 1]);
|
||||
|
|
|
@ -470,8 +470,7 @@ void Wiimote::GetIRData(u8* const data, bool use_accel)
|
|||
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\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);
|
||||
// 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);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -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 Size = Memory::Read_U32(_CommandAddress + 0x10);
|
||||
|
||||
|
||||
if (auto file = OpenFile())
|
||||
{
|
||||
if (m_Mode == ISFS_OPEN_READ)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include "../VolumeHandler.h"
|
||||
|
||||
#define MAX_NAME (12)
|
||||
#define MAX_NAME 12
|
||||
|
||||
static Common::replace_v replacements;
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
//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)
|
||||
|
|
|
@ -218,7 +218,7 @@ private:
|
|||
// Execute HCI Message
|
||||
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 CommandWritePageScanType(u8* _Input);
|
||||
void CommandHostBufferSize(u8* _Input);
|
||||
|
@ -237,11 +237,11 @@ private:
|
|||
void CommandDeleteStoredLinkKey(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 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 CommandWriteLocalName(u8* _Input);
|
||||
void CommandWritePageTimeOut(u8* _Input);
|
||||
|
@ -253,13 +253,13 @@ private:
|
|||
void CommandWriteInquiryScanType(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 CommandReadLocalVer(u8* _Input);
|
||||
void CommandReadLocalFeatures(u8* _Input);
|
||||
void CommandReadBDAdrr(u8* _Input);
|
||||
|
||||
// OGF 0x3F Vendor specific
|
||||
// OGF 0x3F - Vendor specific
|
||||
void CommandVendorSpecific_FC4C(u8* _Input, u32 _Size);
|
||||
void CommandVendorSpecific_FC4F(u8* _Input, u32 _Size);
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ enum
|
|||
CON_ERR_VERSION_MISMATCH = 3
|
||||
};
|
||||
|
||||
namespace NetPlay {
|
||||
namespace NetPlay
|
||||
{
|
||||
bool IsNetPlayRunning();
|
||||
};
|
||||
|
|
|
@ -54,8 +54,7 @@ inline T CLAMP(T a, T bottom, T top) {
|
|||
return a;
|
||||
}
|
||||
|
||||
void Interpreter::Helper_Quantize(const u32 _Addr, const double _fValue,
|
||||
const EQuantizeType _quantizeType, const unsigned int _uScale)
|
||||
void Interpreter::Helper_Quantize(const u32 _Addr, const double _fValue, const EQuantizeType _quantizeType, const unsigned int _uScale)
|
||||
{
|
||||
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,
|
||||
const unsigned int _uScale)
|
||||
float Interpreter::Helper_Dequantize(const u32 _Addr, const EQuantizeType _quantizeType, const unsigned int _uScale)
|
||||
{
|
||||
// dequantize the value
|
||||
float fResult;
|
||||
|
|
|
@ -254,7 +254,8 @@ void Jit64::reg_imm(UGeckoInstruction inst)
|
|||
}
|
||||
break;
|
||||
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)
|
||||
if (!js.isLastInstruction && !Core::g_CoreStartupParameter.bEnableDebugging)
|
||||
{
|
||||
|
|
|
@ -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!
|
||||
static std::pair<OpArg, u32> regBuildMemAddress(RegInfo& RI, InstLoc I,
|
||||
InstLoc AI, unsigned OpNum, unsigned Size, X64Reg* dest) {
|
||||
static std::pair<OpArg, u32> regBuildMemAddress(RegInfo& RI, InstLoc I, InstLoc AI,
|
||||
unsigned OpNum, unsigned Size, X64Reg* dest)
|
||||
{
|
||||
if (isImm(*AI)) {
|
||||
unsigned addr = RI.Build->GetImmValue(AI);
|
||||
if (Memory::IsRAMAddress(addr)) {
|
||||
|
|
|
@ -365,7 +365,6 @@ static void ImHere()
|
|||
return;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,33 +77,36 @@ integer code are more aggresively combining blocks and dead condition
|
|||
register elimination, which should be very helpful for small blocks.
|
||||
|
||||
TODO (in no particular order):
|
||||
JIT for misc remaining FP instructions
|
||||
JIT for bcctrx
|
||||
Misc optimizations for FP instructions
|
||||
Inter-block dead register elimination; this seems likely to have large
|
||||
- JIT for misc remaining FP instructions
|
||||
- JIT for bcctrx
|
||||
- Misc optimizations for FP instructions
|
||||
- Inter-block dead register elimination; this seems likely to have large
|
||||
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
|
||||
IR can't really deal with branches whose destination is in the
|
||||
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
|
||||
implementations for 64-bit involving abusing 64-bit shifts.
|
||||
64-bit compat (it should only be a few tweaks to register allocation and
|
||||
the load/store code)
|
||||
Scheduling to reduce register pressure: PowerPC compilers like to push
|
||||
64-bit compat (it should only be a few tweaks to register allocation and the load/store code)
|
||||
|
||||
- Scheduling to reduce register pressure: PowerPCcompilers like to push
|
||||
uses far away from definitions, but it's rather unfriendly to modern
|
||||
x86 processors, which are short on registers and extremely good at
|
||||
instruction reordering.
|
||||
Common subexpression elimination
|
||||
Optimize load/store of sum using complex addressing (partially implemented)
|
||||
Loop optimizations (loop-carried registers, LICM)
|
||||
Code refactoring/cleanup
|
||||
Investigate performance of the JIT itself; this doesn't affect
|
||||
x86 processors, which are short on registers and extremely good at instruction reordering.
|
||||
|
||||
- Common subexpression elimination
|
||||
- Optimize load/store of sum using complex addressing (partially implemented)
|
||||
- Loop optimizations (loop-carried registers, LICM)
|
||||
- Code refactoring/cleanup
|
||||
|
||||
- Investigate performance of the JIT itself; this doesn't affect
|
||||
framerates significantly, but it does take a visible amount
|
||||
of time for a complicated piece of code like a video decoder
|
||||
to compile.
|
||||
Fix profiled loads/stores to work safely. On 32-bit, one solution is to
|
||||
of time for a complicated piece of code like a video decoder to compile.
|
||||
|
||||
- Fix profiled loads/stores to work safely. On 32-bit, one solution is to
|
||||
use a spare segment register, and expand the backpatch solution
|
||||
to work in all the relevant situations. On 64-bit, the existing
|
||||
fast memory solution should basically work. An alternative
|
||||
|
|
|
@ -252,7 +252,7 @@ void CompressAndDumpState(CompressAndDumpState_args save_args)
|
|||
|
||||
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;
|
||||
while (true)
|
||||
|
@ -374,7 +374,7 @@ void LoadFileStateData(const std::string& filename, std::vector<u8>& ret_data)
|
|||
|
||||
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);
|
||||
|
||||
|
|
|
@ -25,7 +25,8 @@ namespace ButtonManager
|
|||
std::map<std::pair<int, int>, Button*> m_buttons;
|
||||
std::map<std::pair<int, int>, Axis*> m_axises;
|
||||
std::unordered_map<std::string, InputDevice*> m_controllers;
|
||||
const char* configStrings[] = { "InputA",
|
||||
const char* configStrings[] = {
|
||||
"InputA",
|
||||
"InputB",
|
||||
"InputStart",
|
||||
"InputX",
|
||||
|
@ -44,7 +45,8 @@ namespace ButtonManager
|
|||
"CStickLeft",
|
||||
"CStickRight",
|
||||
"InputL",
|
||||
"InputR" };
|
||||
"InputR"
|
||||
};
|
||||
const int configStringNum = 20;
|
||||
|
||||
void AddBind(std::string dev, sBind *bind)
|
||||
|
|
|
@ -26,12 +26,9 @@ public:
|
|||
{
|
||||
SetToolBitmapSize(wxSize(24, 24));
|
||||
|
||||
m_Bitmaps[Toolbar_Delete] =
|
||||
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_MC] =
|
||||
wxBitmap(wxGetBitmapFromMemory(toolbar_add_memcheck_png).ConvertToImage().Rescale(24, 24));
|
||||
m_Bitmaps[Toolbar_Delete] = 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_MC] = wxBitmap(wxGetBitmapFromMemory(toolbar_add_memcheck_png).ConvertToImage().Rescale(24, 24));
|
||||
|
||||
AddTool(ID_DELETE, wxT("Delete"), m_Bitmaps[Toolbar_Delete]);
|
||||
Bind(wxEVT_COMMAND_TOOL_CLICKED, &CBreakPointWindow::OnDelete, parent, ID_DELETE);
|
||||
|
|
|
@ -57,8 +57,7 @@ class CCodeWindow
|
|||
|
||||
void Update();
|
||||
void NotifyMapLoaded();
|
||||
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter,
|
||||
wxMenuBar *pMenuBar);
|
||||
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter, wxMenuBar *pMenuBar);
|
||||
void CreateMenuOptions(wxMenu *pMenu);
|
||||
void CreateMenuSymbols(wxMenuBar *pMenuBar);
|
||||
void RecreateToolbar(wxAuiToolBar*);
|
||||
|
|
|
@ -94,8 +94,7 @@ void CCodeWindow::Save()
|
|||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
|
||||
ini.Set("General", "DebuggerFont",
|
||||
WxStrToStr(DebuggerFont.GetNativeFontInfoUserDesc()));
|
||||
ini.Set("General", "DebuggerFont", WxStrToStr(DebuggerFont.GetNativeFontInfoUserDesc()));
|
||||
|
||||
// Boot to pause or not
|
||||
ini.Set("General", "AutomaticStart", GetMenuBar()->IsChecked(IDM_AUTOMATICSTART));
|
||||
|
|
|
@ -58,7 +58,8 @@ void cInterfaceEGL::DetectMode()
|
|||
EGL_NONE };
|
||||
|
||||
// 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");
|
||||
goto err_exit;
|
||||
}
|
||||
|
@ -112,14 +113,16 @@ bool cInterfaceEGL::Create(void *&window_handle)
|
|||
|
||||
GLWin.egl_dpy = Platform.EGLGetDisplay();
|
||||
|
||||
if (!GLWin.egl_dpy) {
|
||||
if (!GLWin.egl_dpy)
|
||||
{
|
||||
INFO_LOG(VIDEO, "Error: eglGetDisplay() failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
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");
|
||||
return false;
|
||||
}
|
||||
|
@ -163,7 +166,8 @@ bool cInterfaceEGL::Create(void *&window_handle)
|
|||
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");
|
||||
exit(1);
|
||||
}
|
||||
|
@ -189,16 +193,17 @@ bool cInterfaceEGL::Create(void *&window_handle)
|
|||
INFO_LOG(VIDEO, "EGL_CLIENT_APIS = %s\n", s);
|
||||
|
||||
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");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
GLWin.native_window = Platform.CreateWindow();
|
||||
|
||||
GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config,
|
||||
GLWin.native_window, NULL);
|
||||
if (!GLWin.egl_surf) {
|
||||
GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.native_window, NULL);
|
||||
if (!GLWin.egl_surf)
|
||||
{
|
||||
INFO_LOG(VIDEO, "Error: eglCreateWindowSurface failed\n");
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -70,8 +70,8 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
|||
{
|
||||
indexOne = SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG");
|
||||
}
|
||||
else
|
||||
{ // GC
|
||||
else // GC
|
||||
{
|
||||
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");
|
||||
}
|
||||
else
|
||||
{ // GC
|
||||
else // GC
|
||||
{
|
||||
indexOther = SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,11 +134,6 @@ void CodeConfigPanel::UpdateInfoBox(wxCommandEvent&)
|
|||
}
|
||||
}
|
||||
|
||||
//void CodeConfigPanel::ApplyChanges(wxCommandEvent&)
|
||||
//{
|
||||
// Gecko::SetActiveCodes(m_gcodes);
|
||||
//}
|
||||
|
||||
void CodeConfigPanel::DownloadCodes(wxCommandEvent&)
|
||||
{
|
||||
if (m_gameid.empty())
|
||||
|
|
|
@ -223,11 +223,9 @@ void CLogWindow::OnWrapLineCheck(wxCommandEvent& event)
|
|||
Text = m_Log->GetValue();
|
||||
m_Log->Destroy();
|
||||
if (event.IsChecked())
|
||||
m_Log = CreateTextCtrl(this, IDM_LOG,
|
||||
wxTE_RICH | wxTE_MULTILINE | wxTE_READONLY | wxTE_WORDWRAP);
|
||||
m_Log = CreateTextCtrl(this, IDM_LOG, wxTE_RICH | wxTE_MULTILINE | wxTE_READONLY | wxTE_WORDWRAP);
|
||||
else
|
||||
m_Log = CreateTextCtrl(this, IDM_LOG,
|
||||
wxTE_RICH | wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP);
|
||||
m_Log = CreateTextCtrl(this, IDM_LOG, wxTE_RICH | wxTE_MULTILINE | wxTE_READONLY | wxTE_DONTWRAP);
|
||||
m_Log->SetDefaultStyle(wxTextAttr(*wxWHITE));
|
||||
m_Log->AppendText(Text);
|
||||
PopulateBottom();
|
||||
|
|
|
@ -118,10 +118,12 @@ void Host_SysMessage(const char *fmt, ...)
|
|||
va_end(list);
|
||||
|
||||
size_t len = strlen(msg);
|
||||
if (msg[len - 1] != '\n') {
|
||||
if (msg[len - 1] != '\n')
|
||||
{
|
||||
msg[len - 1] = '\n';
|
||||
msg[len] = '\0';
|
||||
}
|
||||
|
||||
fprintf(stderr, "%s", msg);
|
||||
}
|
||||
|
||||
|
@ -295,8 +297,10 @@ int main(int argc, char* argv[])
|
|||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
while ((ch = getopt_long(argc, argv, "eh?v", longopts, 0)) != -1) {
|
||||
switch (ch) {
|
||||
while ((ch = getopt_long(argc, argv, "eh?v", longopts, 0)) != -1)
|
||||
{
|
||||
switch (ch)
|
||||
{
|
||||
case 'e':
|
||||
break;
|
||||
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, "A multi-platform Gamecube/Wii emulator\n\n");
|
||||
fprintf(stderr, "Usage: %s [-e <file>] [-h] [-v]\n", argv[0]);
|
||||
|
@ -346,7 +351,8 @@ int main(int argc, char* argv[])
|
|||
#endif
|
||||
#if HAVE_X11
|
||||
#if USE_EGL
|
||||
if (GLWin.platform == EGL_PLATFORM_X11) {
|
||||
if (GLWin.platform == EGL_PLATFORM_X11)
|
||||
{
|
||||
#endif
|
||||
XInitThreads();
|
||||
X11_MainLoop();
|
||||
|
|
|
@ -36,21 +36,21 @@ class CMemcardManager : public wxDialog
|
|||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
int page[2],
|
||||
itemsPerPage,
|
||||
maxPages;
|
||||
std::string DefaultMemcard[2],
|
||||
DefaultIOPath;
|
||||
int page[2];
|
||||
int itemsPerPage;
|
||||
int maxPages;
|
||||
std::string DefaultMemcard[2];
|
||||
std::string DefaultIOPath;
|
||||
IniFile MemcardManagerIni;
|
||||
IniFile::Section* iniMemcardSection;
|
||||
|
||||
wxButton *m_CopyFrom[2],
|
||||
*m_SaveImport[2],
|
||||
*m_SaveExport[2],
|
||||
*m_Delete[2],
|
||||
*m_NextPage[2],
|
||||
*m_PrevPage[2],
|
||||
*m_ConvertToGci;
|
||||
wxButton* m_CopyFrom[2];
|
||||
wxButton* m_SaveImport[2];
|
||||
wxButton* m_SaveExport[2];
|
||||
wxButton* m_Delete[2];
|
||||
wxButton* m_NextPage[2];
|
||||
wxButton* m_PrevPage[2];
|
||||
wxButton* m_ConvertToGci;
|
||||
wxFilePickerCtrl *m_MemcardPath[2];
|
||||
wxStaticText *t_Status[2];
|
||||
|
||||
|
@ -142,8 +142,8 @@ class CMemcardManager : public wxDialog
|
|||
Unbind(wxEVT_RIGHT_DOWN, &CMemcardListCtrl::OnRightClick, this);
|
||||
}
|
||||
_mcmSettings & __mcmSettings;
|
||||
bool prevPage,
|
||||
nextPage;
|
||||
bool prevPage;
|
||||
bool nextPage;
|
||||
private:
|
||||
void OnRightClick(wxMouseEvent& event);
|
||||
};
|
||||
|
|
|
@ -18,10 +18,14 @@
|
|||
|
||||
static Common::replace_v replacements;
|
||||
|
||||
const u8 SDKey[16] = {0xAB, 0x01, 0xB9, 0xD8, 0xE1, 0x62, 0x2B, 0x08,
|
||||
0xAF, 0xBA, 0xD8, 0x4D, 0xBF, 0xC2, 0xA5, 0x5D};
|
||||
const u8 MD5_BLANKER[0x10] = {0x0E, 0x65, 0x37, 0x81, 0x99, 0xBE, 0x45, 0x17,
|
||||
0xAB, 0x06, 0xEC, 0x22, 0x45, 0x1A, 0x57, 0x93};
|
||||
const u8 SDKey[16] = {
|
||||
0xAB, 0x01, 0xB9, 0xD8, 0xE1, 0x62, 0x2B, 0x08,
|
||||
0xAF, 0xBA, 0xD8, 0x4D, 0xBF, 0xC2, 0xA5, 0x5D
|
||||
};
|
||||
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;
|
||||
|
||||
bool CWiiSaveCrypted::ImportWiiSave(const char* FileName)
|
||||
|
@ -147,8 +151,8 @@ void CWiiSaveCrypted::ReadHDR()
|
|||
m_TitleID = Common::swap64(_header.hdr.SaveGameTitle);
|
||||
|
||||
|
||||
u8 md5_file[16],
|
||||
md5_calc[16];
|
||||
u8 md5_file[16];
|
||||
u8 md5_calc[16];
|
||||
memcpy(md5_file, _header.hdr.Md5, 0x10);
|
||||
memcpy(_header.hdr.Md5, MD5_BLANKER, 0x10);
|
||||
md5((u8*)&_header, HEADER_SZ, md5_calc);
|
||||
|
@ -450,13 +454,17 @@ void CWiiSaveCrypted::do_sig()
|
|||
|
||||
u32 NG_key_id = 0x6AAB8C59;
|
||||
|
||||
u8 NG_priv[30] = { 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_priv[30] = {
|
||||
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,
|
||||
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(name, "NG%08x", NG_id);
|
||||
|
|
|
@ -43,10 +43,10 @@ private:
|
|||
|
||||
void MakeNetPlayDiag(int port, const std::string &game, bool is_hosting);
|
||||
|
||||
wxTextCtrl *m_nickname_text,
|
||||
*m_host_port_text,
|
||||
*m_connect_port_text,
|
||||
*m_connect_ip_text;
|
||||
wxTextCtrl* m_nickname_text;
|
||||
wxTextCtrl* m_host_port_text;
|
||||
wxTextCtrl* m_connect_port_text;
|
||||
wxTextCtrl* m_connect_ip_text;
|
||||
|
||||
wxListBox* m_game_lbox;
|
||||
#ifdef USE_UPNP
|
||||
|
|
|
@ -123,7 +123,8 @@ const wxString WXKeyToString(int keycode)
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,12 +17,6 @@ namespace ciface
|
|||
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)
|
||||
{
|
||||
((std::list<DIDEVICEOBJECTINSTANCE>*)pvRef)->push_back(*lpddoi);
|
||||
|
|
|
@ -32,13 +32,15 @@ private:
|
|||
class Axis : public Input
|
||||
{
|
||||
public:
|
||||
enum direction {
|
||||
enum direction
|
||||
{
|
||||
positive = 0,
|
||||
negative
|
||||
};
|
||||
std::string GetName() const;
|
||||
Axis(IOHIDElementRef element, IOHIDDeviceRef device, direction dir);
|
||||
ControlState GetState() const;
|
||||
|
||||
private:
|
||||
const IOHIDElementRef m_element;
|
||||
const IOHIDDeviceRef m_device;
|
||||
|
@ -51,7 +53,8 @@ private:
|
|||
class Hat : public Input
|
||||
{
|
||||
public:
|
||||
enum direction {
|
||||
enum direction
|
||||
{
|
||||
up = 0,
|
||||
right,
|
||||
down,
|
||||
|
@ -60,6 +63,7 @@ private:
|
|||
std::string GetName() const;
|
||||
Hat(IOHIDElementRef element, IOHIDDeviceRef device, direction dir);
|
||||
ControlState GetState() const;
|
||||
|
||||
private:
|
||||
const IOHIDElementRef m_element;
|
||||
const IOHIDDeviceRef m_device;
|
||||
|
|
|
@ -514,8 +514,7 @@ void Renderer::SetViewport()
|
|||
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
|
||||
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y,
|
||||
Wd, Ht,
|
||||
D3D11_VIEWPORT vp = CD3D11_VIEWPORT(X, Y, Wd, Ht,
|
||||
0.f, // (xfregs.viewport.farZ - xfregs.viewport.zRange) / 16777216.0f;
|
||||
1.f); // xfregs.viewport.farZ / 16777216.0f;
|
||||
D3D::context->RSSetViewports(1, &vp);
|
||||
|
|
Loading…
Reference in New Issue