diff --git a/.github/workflows/scripts/linux/app-variables.sh b/.github/workflows/scripts/linux/app-variables.sh index e48db82095..834b934b47 100644 --- a/.github/workflows/scripts/linux/app-variables.sh +++ b/.github/workflows/scripts/linux/app-variables.sh @@ -10,7 +10,7 @@ fi export BINARY_NAME=$(basename "$ARGV0") if [[ ! -e "$PWD/$BINARY_NAME.config" ]]; then mkdir "$PWD/$BINARY_NAME.config" -fi +fi export XDG_CONFIG_HOME="$PWD/$BINARY_NAME.config" mkdir -p "$HOME"/.local/share/icons/hicolor/scalable/apps && cp "$APPDIR"/PCSX2.png "$HOME"/.local/share/icons/hicolor/scalable/apps diff --git a/cmake/FindLibc.cmake b/cmake/FindLibc.cmake index 81921280c0..d081fa326f 100644 --- a/cmake/FindLibc.cmake +++ b/cmake/FindLibc.cmake @@ -1,6 +1,6 @@ # Once done, this will define # -# LIBC_FOUND - system has libc +# LIBC_FOUND - system has libc # LIBC_LIBRARIES - link these to use libc if(LIBC_LIBRARIES) @@ -12,7 +12,7 @@ find_library(libm NAMES m) # OSX doesn't have rt. On Linux timer and aio dependency. if(APPLE) find_library(libdl NAMES dl) - set(LIBC_LIBRARIES ${librt} ${libdl} ${libm}) + set(LIBC_LIBRARIES ${librt} ${libdl} ${libm}) elseif(Linux) find_library(libdl NAMES dl) find_library(librt NAMES rt) @@ -23,7 +23,7 @@ else() set(LIBC_LIBRARIES ${librt} ${libm}) endif() -# handle the QUIETLY and REQUIRED arguments and set LIBC_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set LIBC_FOUND to TRUE if # all listed variables are TRUE include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Libc DEFAULT_MSG LIBC_LIBRARIES) diff --git a/pcsx2/CDVD/CDVD.cpp b/pcsx2/CDVD/CDVD.cpp index 62cf68c462..bb3b7e5f07 100644 --- a/pcsx2/CDVD/CDVD.cpp +++ b/pcsx2/CDVD/CDVD.cpp @@ -746,7 +746,7 @@ static uint cdvdRotationalLatency(CDVD_MODE_TYPE mode) { const float rotationPerSecond = static_cast(((mode == MODE_CDROM) ? CD_MIN_ROTATION_X1 : DVD_MIN_ROTATION_X1) * cdvd.Speed) / 60.0f; const float msPerRotation = 1000.0f / rotationPerSecond; - + return ((PSXCLK / 1000) * msPerRotation); } else @@ -1123,7 +1123,7 @@ __fi void cdvdReadInterrupt() cdvdUpdateReady(CDVD_DRIVE_BUSY); cdvdUpdateStatus(CDVD_STATUS_READ); cdvd.WaitingDMA = false; - + if (!cdvd.Readed) { // Seeking finished. Process the track we requested before, and @@ -1166,7 +1166,7 @@ __fi void cdvdReadInterrupt() cdvdSetIrq(); return; } - + if (cdvd.Reading) { if (cdvd.RErr == 0) @@ -1288,7 +1288,7 @@ static uint cdvdStartSeek(uint newsector, CDVD_MODE_TYPE mode) // So In the case where it's seeking to data it will be Spinning (0x2) not reading (0x8) and Seeking (0x10, but because seeking is also spinning 0x2 is also set)) // Update - Apparently all that was rubbish and some games don't like it. WRC was the one in this scenario which hated SEEK |ZPAUSE, so just putting it back to pause for now. // We should really run some tests for this behaviour. - + cdvdUpdateStatus(CDVD_STATUS_SEEK); if (!cdvd.Spinning) @@ -1324,7 +1324,7 @@ static uint cdvdStartSeek(uint newsector, CDVD_MODE_TYPE mode) // if delta > 0 it will read a new sector so the readInterrupt will account for this. seektime = 0; isSeeking = false; - + if (delta == 0) { //cdvd.Status = CDVD_STATUS_PAUSE; @@ -1336,9 +1336,9 @@ static uint cdvdStartSeek(uint newsector, CDVD_MODE_TYPE mode) // setting Readed to 0 skips the seek logic, which means the next call to // cdvdReadInterrupt will load a block. So make sure it's properly scheduled // based on sector read speeds: - + //seektime = cdvd.ReadTime; - + if (!cdvd.nextSectorsBuffered)//Buffering time hasn't completed yet so cancel it and simulate the remaining time { if (psxRegs.interrupt & (1 << IopEvt_CdvdSectorReady)) diff --git a/pcsx2/CDVD/CDVDcommon.h b/pcsx2/CDVD/CDVDcommon.h index 5944ea2b88..de32341197 100644 --- a/pcsx2/CDVD/CDVDcommon.h +++ b/pcsx2/CDVD/CDVDcommon.h @@ -145,7 +145,7 @@ struct CDVD_API }; // ---------------------------------------------------------------------------- -// Multiple interface system for CDVD. +// Multiple interface system for CDVD. // ---------------------------------------------------------------------------- extern CDVD_API* CDVD; // currently active CDVD access mode api (either Iso, NoDisc, or Disc) diff --git a/pcsx2/CDVD/Windows/IOCtlSrc.cpp b/pcsx2/CDVD/Windows/IOCtlSrc.cpp index 695b84e28d..90b9beb604 100644 --- a/pcsx2/CDVD/Windows/IOCtlSrc.cpp +++ b/pcsx2/CDVD/Windows/IOCtlSrc.cpp @@ -212,7 +212,7 @@ bool IOCtlSrc::ReadDVDInfo() // least 18 bytes of the layer descriptor or else the ioctl will fail. The // media specific information seems to be empty, so there's no point reading // any more than that. - + // UPDATE 15 Jan 2021 // Okay so some drives seem to have descriptors BIGGER than 22 bytes! // This causes the read to fail with INVALID_PARAMETER. diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 3050a20b43..97618b76a9 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -443,7 +443,7 @@ endif() set(pcsx2USBNullSources USB/USBNull.cpp) set(pcsx2USBNullHeaders USB/USB.h) -# USB sources +# USB sources set(pcsx2USBSources USB/USB.cpp USB/deviceproxy.cpp diff --git a/pcsx2/Cache.cpp b/pcsx2/Cache.cpp index 08d235e375..8486594acd 100644 --- a/pcsx2/Cache.cpp +++ b/pcsx2/Cache.cpp @@ -341,7 +341,7 @@ void CACHE() u32 addr = cpuRegs.GPR.r[_Rs_].UL[0] + _Imm_; // CACHE_LOG("cpuRegs.GPR.r[_Rs_].UL[0] = %x, IMM = %x RT = %x", cpuRegs.GPR.r[_Rs_].UL[0], _Imm_, _Rt_); - switch (_Rt_) + switch (_Rt_) { case 0x1a: //DHIN (Data Cache Hit Invalidate) doCacheHitOp(addr, "DHIN", [](CacheLine line) diff --git a/pcsx2/Counters.cpp b/pcsx2/Counters.cpp index b581a3fdec..3193ad0006 100644 --- a/pcsx2/Counters.cpp +++ b/pcsx2/Counters.cpp @@ -390,7 +390,7 @@ u32 UpdateVSyncRate() // The PS2's vsync timer is an *independent* crystal that is fixed to either 59.94 (NTSC) // or 50.0 (PAL) Hz. It has *nothing* to do with real TV timings or the real vsync of // the GS's output circuit. It is the same regardless if the GS is outputting interlace - // or progressive scan content. + // or progressive scan content. const double vertical_frequency = GetVerticalFrequency(); @@ -457,7 +457,7 @@ u32 UpdateVSyncRate() if (video_mode_initialized) Console.WriteLn(Color_Green, "(UpdateVSyncRate) Mode Changed to %s.", ReportVideoMode()); - + if (custom && video_mode_initialized) Console.Indent().WriteLn(Color_StrongGreen, "... with user configured refresh rate: %.02f Hz", vertical_frequency); @@ -543,7 +543,7 @@ static __fi void DoFMVSwitch() RendererSwitched = false; } -// Convenience function to update UI thread and set patches. +// Convenience function to update UI thread and set patches. static __fi void frameLimitUpdateCore() { DoFMVSwitch(); @@ -585,15 +585,15 @@ static __fi void frameLimit() // Conversion of delta from CPU ticks (microseconds) to milliseconds s32 msec = (int) ((sDeltaTime * -1000) / (s64) GetTickFrequency()); - + // If any integer value of milliseconds exists, sleep it off. // Prior comments suggested that 1-2 ms sleeps were inaccurate on some OSes; - // further testing suggests instead that this was utter bullshit. + // further testing suggests instead that this was utter bullshit. if (msec > 1) { Threading::Sleep(msec - 1); } - + // Conversion to milliseconds loses some precision; after sleeping off whole milliseconds, // spin the thread without sleeping until we finally reach our expected end time. while (GetCPUTicks() < uExpectedEnd) @@ -628,7 +628,7 @@ static __fi void VSyncStart(u32 sCycle) hwIntcIrq(INTC_VBLANK_S); psxVBlankStart(); - + if (gates) rcntStartGate(true, sCycle); // Counters Start Gate code // INTC - VB Blank Start Hack -- @@ -746,7 +746,7 @@ __fi void rcntUpdate_vSync() if (vsyncCounter.Mode == MODE_VSYNC) { VSyncEnd(vsyncCounter.sCycle); - + vsyncCounter.sCycle += vSyncInfo.Blank; vsyncCounter.CycleT = vSyncInfo.Render; vsyncCounter.Mode = MODE_VRENDER; @@ -962,7 +962,7 @@ static __fi void rcntEndGate(bool isVblank , u32 sCycle) // calls to rcntUpdate). counters[i].mode.IsCounting = 1; counters[i].sCycleT = cpuRegs.cycle; - + EECNT_LOG("EE Counter[%d] %s EndGate Type0, count = %x", i, isVblank ? "vblank" : "hblank", counters[i].count ); break; @@ -1131,7 +1131,7 @@ __fi u16 rcntRead32( u32 mem ) case(RCNT3_MODE): return (u16)counters[3].modeval; case(RCNT3_TARGET): return (u16)counters[3].target; } - + return psHu16(mem); } diff --git a/pcsx2/DEV9/DEV9.h b/pcsx2/DEV9/DEV9.h index c01307e4fc..c9ab328c9f 100644 --- a/pcsx2/DEV9/DEV9.h +++ b/pcsx2/DEV9/DEV9.h @@ -257,7 +257,7 @@ EXTERN int ThreadRun; #define SMAP_R_RXFIFO_FRAME_CNT (SMAP_REGBASE + 0xf3C) #define SMAP_R_RXFIFO_FRAME_DEC (SMAP_REGBASE + 0xf40) #define SMAP_R_RXFIFO_DATA (SMAP_REGBASE + 0x1100) - + #define SMAP_R_FIFO_ADDR (SMAP_REGBASE + 0x1200) #define SMAP_FIFO_CMD_READ (1<<1) #define SMAP_FIFO_DATA_SWAP (1<<0) diff --git a/pcsx2/DEV9/PacketReader/ARP/ARP_Packet.cpp b/pcsx2/DEV9/PacketReader/ARP/ARP_Packet.cpp index 818687bd91..79c67976c2 100644 --- a/pcsx2/DEV9/PacketReader/ARP/ARP_Packet.cpp +++ b/pcsx2/DEV9/PacketReader/ARP/ARP_Packet.cpp @@ -66,7 +66,7 @@ namespace PacketReader::ARP , senderProtocolAddress{std::make_unique(original.protocolAddressLength)} , targetHardwareAddress{std::make_unique(original.hardwareAddressLength)} , targetProtocolAddress{std::make_unique(original.protocolAddressLength)} - { + { memcpy(senderHardwareAddress.get(), original.senderHardwareAddress.get(), hardwareAddressLength); memcpy(senderProtocolAddress.get(), original.senderProtocolAddress.get(), protocolAddressLength); memcpy(targetHardwareAddress.get(), original.targetHardwareAddress.get(), hardwareAddressLength); diff --git a/pcsx2/DEV9/PacketReader/IP/IP_Address.h b/pcsx2/DEV9/PacketReader/IP/IP_Address.h index b920043774..2e1ae41910 100644 --- a/pcsx2/DEV9/PacketReader/IP/IP_Address.h +++ b/pcsx2/DEV9/PacketReader/IP/IP_Address.h @@ -19,7 +19,7 @@ namespace PacketReader::IP { struct IP_Address { - union + union { u8 bytes[4]; u32 integer; diff --git a/pcsx2/DEV9/PacketReader/IP/IP_Packet.h b/pcsx2/DEV9/PacketReader/IP/IP_Packet.h index 907e2be9c9..a9c706de59 100644 --- a/pcsx2/DEV9/PacketReader/IP/IP_Packet.h +++ b/pcsx2/DEV9/PacketReader/IP/IP_Packet.h @@ -82,7 +82,7 @@ namespace PacketReader::IP * Not Defined (xxx000) * 6 = Internetwork Control Class 6 * 7 = Network Control Class 7 - * + * * Lower 3 Bits * In TOS, defined as follows * bit 0: Reliability diff --git a/pcsx2/DEV9/Sessions/ICMP_Session/ICMP_Session.cpp b/pcsx2/DEV9/Sessions/ICMP_Session/ICMP_Session.cpp index e20164184e..d12a533025 100644 --- a/pcsx2/DEV9/Sessions/ICMP_Session/ICMP_Session.cpp +++ b/pcsx2/DEV9/Sessions/ICMP_Session/ICMP_Session.cpp @@ -75,7 +75,7 @@ using namespace std::chrono_literals; FreeBSD Raw sockets restricted No unprivilaged ICMP sockets - Timeouts reported as a normal packet?? + Timeouts reported as a normal packet?? Ping cli Present for all platforms, but command args differ diff --git a/pcsx2/DEV9/Win32/tap-win32.cpp b/pcsx2/DEV9/Win32/tap-win32.cpp index 5f4a2da411..5e40d6032b 100644 --- a/pcsx2/DEV9/Win32/tap-win32.cpp +++ b/pcsx2/DEV9/Win32/tap-win32.cpp @@ -371,15 +371,15 @@ bool TAPGetWin32Adapter(const std::string& name, PIP_ADAPTER_ADDRESSES adapter, * but it doesn't tell you whether it's a bridge or an LBFO team or something more exotic. * The way to distinguish exactly which flavor of ms_implat you have is to look at which LWF driver is bound to the *virtual miniport* above the IM driver. * This is two steps then. - * + * * 1. Given a physical NIC, you first want to determine which virtual NIC is layered over it. * 2. Given a virtual NIC, you want to determine whether ms_bridge is bound to it. - * + * * To get the first part, look through the interface stack table (GetIfStackTable). Search the stack table for any entry where the lower is the IfIndex of the physical NIC. * For any such entry (there will probably be a few), check if that entry's upper IfIndex is the IfIndex for a virtual miniport with component ID "COMPOSITEBUS\MS_IMPLAT_MP". * If you find such a thing, that means the physical NIC is a member of a bridge/LBFO/something-else-fancy. * If you don't find it, then you know the NIC isn't part of the bridge that comes with Windows 8 / Windows 10. - * + * * To get the second part, just use the same INetCfg code above on the *virtual* NIC's component. If the ms_bridge component is bound to the virtual NIC, * then that virtual NIC is doing bridging. Otherwise, it's doing something else (like LBFO). */ diff --git a/pcsx2/DEV9/smap.cpp b/pcsx2/DEV9/smap.cpp index dbcc20f265..a133238d0d 100644 --- a/pcsx2/DEV9/smap.cpp +++ b/pcsx2/DEV9/smap.cpp @@ -194,8 +194,8 @@ void tx_process() if (dev9.txfifo_rd_ptr==16384) dev9.txfifo_rd_ptr=0; } - - + + if (dev9.txfifo_rd_ptr&(~16383)) { @@ -612,7 +612,7 @@ void smap_write16(u32 addr, u16 value) value = (value >> 8) | (value << 8); dev9Ru16(addr) = value; /* - switch (addr & 0x7) + switch (addr & 0x7) { case 0: // ctrl_stat DevCon.WriteLn("DEV9: TX_CTRL_STAT[%d]: write %x", (addr - SMAP_BD_TX_BASE) / 8, value); @@ -642,7 +642,7 @@ void smap_write16(u32 addr, u16 value) value = (value >> 8) | (value << 8); dev9Ru16(addr) = value; /* - switch (addr & 0x7) + switch (addr & 0x7) { case 0: // ctrl_stat DevCon.WriteLn("DEV9: RX_CTRL_STAT[%d]: write %x", rx_index, value); @@ -772,7 +772,7 @@ void smap_write16(u32 addr, u16 value) emu_printf("SMAP: SMAP_R_EMAC3_TxMODE0_H 16bit write %x\n", value); dev9Ru16(addr) = value; return; - + case SMAP_R_EMAC3_TxMODE1_H: emu_printf("SMAP: SMAP_R_EMAC3_TxMODE1_H 16bit write %x\n", value); dev9Ru16(addr) = value; diff --git a/pcsx2/DebugTools/BiosDebugData.h b/pcsx2/DebugTools/BiosDebugData.h index f5c547f806..c474634244 100644 --- a/pcsx2/DebugTools/BiosDebugData.h +++ b/pcsx2/DebugTools/BiosDebugData.h @@ -49,7 +49,7 @@ enum { THS_WAIT_SUSPEND = 0x0C, THS_DORMANT = 0x10, }; - + enum { WAIT_NONE = 0, WAIT_WAKEUP_REQ = 1, diff --git a/pcsx2/DebugTools/Debug.h b/pcsx2/DebugTools/Debug.h index afdd02f0f0..a96e40e245 100644 --- a/pcsx2/DebugTools/Debug.h +++ b/pcsx2/DebugTools/Debug.h @@ -91,7 +91,7 @@ public: { return SysTraceLog::IsActive() && EmuConfig.Trace.EE.m_EnableAll; } - + std::string GetCategory() const override { return "EE"; } }; @@ -266,7 +266,7 @@ struct SysTraceLogPack SysTraceLog_EE_Disasm COP1; SysTraceLog_EE_Disasm COP2; SysTraceLog_EE_Disasm Cache; - + SysTraceLog_EE_Registers KnownHw; SysTraceLog_EE_Registers UnknownHw; SysTraceLog_EE_Registers DMAhw; @@ -281,7 +281,7 @@ struct SysTraceLogPack EE_PACK(); } EE; - + struct IOP_PACK { SysTraceLog_IOP Bios; diff --git a/pcsx2/DebugTools/DisassemblyManager.cpp b/pcsx2/DebugTools/DisassemblyManager.cpp index be4a184f6b..3536f1b766 100644 --- a/pcsx2/DebugTools/DisassemblyManager.cpp +++ b/pcsx2/DebugTools/DisassemblyManager.cpp @@ -221,11 +221,11 @@ void DisassemblyManager::analyze(u32 address, u32 size = 1024) std::vector DisassemblyManager::getBranchLines(u32 start, u32 size) { std::vector result; - + auto it = findDisassemblyEntry(entries,start,false); if (it != entries.end()) { - do + do { it->second->getBranchLines(start,size,result); it++; @@ -258,7 +258,7 @@ void DisassemblyManager::getLine(u32 address, bool insertSymbols, DisassemblyLin DisassemblyEntry* entry = it->second; if (entry->disassemble(address,dest,insertSymbols)) return; - + if (address % 4) dest.totalSize = ((address+3) & ~3)-address; else @@ -277,7 +277,7 @@ u32 DisassemblyManager::getStartAddress(u32 address) if (it == entries.end()) return address; } - + DisassemblyEntry* entry = it->second; int line = entry->getLineNum(address,true); return entry->getLineAddress(line); @@ -288,7 +288,7 @@ u32 DisassemblyManager::getNthPreviousAddress(u32 address, int n) while (cpu->isValidAddress(address)) { auto it = findDisassemblyEntry(entries,address,false); - + while (it != entries.end()) { DisassemblyEntry* entry = it->second; @@ -302,10 +302,10 @@ u32 DisassemblyManager::getNthPreviousAddress(u32 address, int n) n -= oldLineNum+1; it = findDisassemblyEntry(entries,address,false); } - + analyze(address-127,128); } - + return address-n*4; } @@ -314,7 +314,7 @@ u32 DisassemblyManager::getNthNextAddress(u32 address, int n) while (cpu->isValidAddress(address)) { auto it = findDisassemblyEntry(entries,address,false); - + while (it != entries.end()) { DisassemblyEntry* entry = it->second; @@ -532,7 +532,7 @@ void DisassemblyFunction::load() break; } } - + u32 funcPos = address; u32 funcEnd = address+size; @@ -563,7 +563,7 @@ void DisassemblyFunction::load() DisassemblyComment* comment = new DisassemblyComment(cpu,funcPos,nextPos-funcPos,".align","4"); entries[funcPos] = comment; lineAddresses.push_back(funcPos); - + funcPos = nextPos; opcodeSequenceStart = funcPos; continue; @@ -572,14 +572,14 @@ void DisassemblyFunction::load() MIPSAnalyst::MipsOpcodeInfo opInfo = MIPSAnalyst::GetOpcodeInfo(cpu,funcPos); u32 opAddress = funcPos; funcPos += 4; - + // skip branches and their delay slots if (opInfo.isBranch) { if (funcPos < funcEnd) funcPos += 4; // only include delay slots within the function bounds continue; } - + // lui if (MIPS_GET_OP(opInfo.encodedOpcode) == 0x0F && funcPos < funcEnd && funcPos != nextData) { @@ -692,7 +692,7 @@ void DisassemblyFunction::clear() bool DisassemblyOpcode::disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) { char opcode[64],arguments[256]; - + std::string dis = cpu->disasm(address,insertSymbols); parseDisasm(cpu->GetSymbolMap(),dis.c_str(),opcode,arguments,insertSymbols); dest.type = DISTYPE_OPCODE; @@ -770,7 +770,7 @@ bool DisassemblyMacro::disassemble(u32 address, DisassemblyLineInfo& dest, bool { case MACRO_LI: dest.name = name; - + addressSymbol = cpu->GetSymbolMap().GetLabelString(immediate); if (!addressSymbol.empty() && insertSymbols) { @@ -780,7 +780,7 @@ bool DisassemblyMacro::disassemble(u32 address, DisassemblyLineInfo& dest, bool } dest.params = buffer; - + dest.info.hasRelevantAddress = true; dest.info.releventAddress = immediate; break; @@ -883,7 +883,7 @@ void DisassemblyData::createLines() u32 pos = address; u32 end = address+size; u32 maxChars = DisassemblyManager::getMaxParamChars(); - + std::string currentLine; u32 currentLineStart = pos; @@ -904,7 +904,7 @@ void DisassemblyData::createLines() DataEntry entry = {currentLine,pos-1-currentLineStart,lineCount++}; lines[currentLineStart] = entry; lineAddresses.push_back(currentLineStart); - + currentLine = ""; currentLineStart = pos-1; inString = false; @@ -925,11 +925,11 @@ void DisassemblyData::createLines() { if (inString) currentLine += "\""; - + DataEntry entry = {currentLine,pos-1-currentLineStart,lineCount++}; lines[currentLineStart] = entry; lineAddresses.push_back(currentLineStart); - + currentLine = ""; currentLineStart = pos-1; inString = false; diff --git a/pcsx2/DebugTools/ExpressionParser.cpp b/pcsx2/DebugTools/ExpressionParser.cpp index 9312754394..82f7c9fd0b 100644 --- a/pcsx2/DebugTools/ExpressionParser.cpp +++ b/pcsx2/DebugTools/ExpressionParser.cpp @@ -305,7 +305,7 @@ bool initPostfixExpression(const char* infix, IExpressionFunctions* funcs, Postf while (true) { if (opcodeStack.empty()) - { + { sprintf(expressionError,"Closing parenthesis without opening one"); return false; } @@ -319,7 +319,7 @@ bool initPostfixExpression(const char* infix, IExpressionFunctions* funcs, Postf while (true) { if (opcodeStack.empty()) - { + { sprintf(expressionError,"Closing bracket without opening one"); return false; } diff --git a/pcsx2/DebugTools/MIPSAnalyst.cpp b/pcsx2/DebugTools/MIPSAnalyst.cpp index e5273227cc..9560531ff2 100644 --- a/pcsx2/DebugTools/MIPSAnalyst.cpp +++ b/pcsx2/DebugTools/MIPSAnalyst.cpp @@ -57,19 +57,19 @@ namespace MIPSAnalyst { u32 op = r5900Debug.read32(addr); const R5900::OPCODE& opcode = R5900::GetInstruction(op); - + int branchType = (opcode.flags & BRANCHTYPE_MASK); if ((opcode.flags & IS_BRANCH) && (branchType == BRANCHTYPE_BRANCH || branchType == BRANCHTYPE_BC1)) return addr + 4 + ((signed short)(op&0xFFFF)<<2); else return INVALIDTARGET; } - + u32 GetBranchTargetNoRA(u32 addr) { u32 op = r5900Debug.read32(addr); const R5900::OPCODE& opcode = R5900::GetInstruction(op); - + int branchType = (opcode.flags & BRANCHTYPE_MASK); if ((opcode.flags & IS_BRANCH) && (branchType == BRANCHTYPE_BRANCH || branchType == BRANCHTYPE_BC1)) { @@ -86,7 +86,7 @@ namespace MIPSAnalyst { u32 op = r5900Debug.read32(addr); const R5900::OPCODE& opcode = R5900::GetInstruction(op); - + if ((opcode.flags & IS_BRANCH) && (opcode.flags & BRANCHTYPE_MASK) == BRANCHTYPE_BRANCH) { bool sure = false; @@ -290,7 +290,7 @@ namespace MIPSAnalyst } } } - + if (end) { // most functions are aligned to 8 or 16 bytes // add the padding to this one @@ -353,7 +353,7 @@ namespace MIPSAnalyst case BRANCHTYPE_BRANCH: info.isConditional = true; info.branchTarget = info.opcodeAddress + 4 + ((s16)(op&0xFFFF)<<2); - + rs = info.cpu->getRegister(0,MIPS_GET_RS(op))._u64[0]; rt = info.cpu->getRegister(0,MIPS_GET_RT(op))._u64[0]; switch (opcode.flags & CONDTYPE_MASK) @@ -381,7 +381,7 @@ namespace MIPSAnalyst info.conditionMet = (((s64)rs) >= 0); break; } - + break; case BRANCHTYPE_REGISTER: info.isConditional = false; @@ -430,7 +430,7 @@ namespace MIPSAnalyst info.lrType = LOADSTORE_LEFT; else if (opcode.flags & IS_RIGHT) info.lrType = LOADSTORE_RIGHT; - + u32 rs = info.cpu->getRegister(0, (int)MIPS_GET_RS(op)); s16 imm16 = op & 0xFFFF; info.dataAddress = rs + imm16; @@ -457,7 +457,7 @@ namespace MIPSAnalyst info.dataSize = 16; break; } - + info.hasRelevantAddress = true; info.releventAddress = info.dataAddress; } diff --git a/pcsx2/DebugTools/MIPSAnalyst.h b/pcsx2/DebugTools/MIPSAnalyst.h index 9f8b5df418..a54dfdeb88 100644 --- a/pcsx2/DebugTools/MIPSAnalyst.h +++ b/pcsx2/DebugTools/MIPSAnalyst.h @@ -49,7 +49,7 @@ namespace MIPSAnalyst DebugInterface* cpu; u32 opcodeAddress; u32 encodedOpcode; - + // shared between branches and conditional moves bool isConditional; bool conditionMet; @@ -72,6 +72,6 @@ namespace MIPSAnalyst bool hasRelevantAddress; u32 releventAddress; } MipsOpcodeInfo; - + MipsOpcodeInfo GetOpcodeInfo(DebugInterface* cpu, u32 address); }; diff --git a/pcsx2/DebugTools/MipsAssembler.cpp b/pcsx2/DebugTools/MipsAssembler.cpp index 0d473a1648..1fb7802d5e 100644 --- a/pcsx2/DebugTools/MipsAssembler.cpp +++ b/pcsx2/DebugTools/MipsAssembler.cpp @@ -27,7 +27,7 @@ public: { // } - + static void queueError(ErrorType type, const wchar_t* text, ...) { // @@ -177,7 +177,7 @@ void SplitLine(const char* Line, char* Name, char* Arguments) *Name++ = *Line++; } *Name = 0; - + while (*Line == ' ' || *Line == '\t') Line++; while (*Line != 0) @@ -587,7 +587,7 @@ bool CMipsInstruction::LoadEncoding(const tMipsOpcode& SourceOpcode, const char* while (*Line == ' ' || *Line == '\t') Line++; if (*Line != 0) return false; // there's something else, bad - + // opcode is ok - now set all flags Opcode = SourceOpcode; immediate.value = immediate.originalValue; @@ -601,13 +601,13 @@ void CMipsInstruction::setOmittedRegisters() // copy over omitted registers if (Opcode.flags & MO_RSD) registers.grd = registers.grs; - + if (Opcode.flags & MO_RST) registers.grt = registers.grs; - + if (Opcode.flags & MO_RDT) registers.grt = registers.grd; - + if (Opcode.flags & MO_FRSD) registers.frd = registers.frs; } @@ -641,7 +641,7 @@ bool CMipsInstruction::Validate() if (immediateType != MIPS_NOIMMEDIATE) { immediate.originalValue = immediate.value; - + if (Opcode.flags & MO_IMMALIGNED) // immediate must be aligned { if (immediate.value % 4) @@ -657,7 +657,7 @@ bool CMipsInstruction::Validate() } else if (Opcode.flags & MO_IPCR) // relative 16 bit value { int num = (immediate.value-RamPos-4); - + if (num > 0x20000 || num < (-0x20000)) { Logger::queueError(Logger::Error,L"Branch target %08X out of range",immediate.value); @@ -665,7 +665,7 @@ bool CMipsInstruction::Validate() } immediate.value = num >> 2; } - + int immediateBits = getImmediateBits(immediateType); unsigned int mask = (0xFFFFFFFF << (32-immediateBits)) >> (32-immediateBits); int digits = (immediateBits+3) / 4; @@ -678,7 +678,7 @@ bool CMipsInstruction::Validate() immediate.value &= mask; } - + return true; } @@ -689,11 +689,11 @@ void CMipsInstruction::encodeNormal() if (registers.grs.num != -1) encoding |= MIPS_RS(registers.grs.num); // source reg if (registers.grt.num != -1) encoding |= MIPS_RT(registers.grt.num); // target reg if (registers.grd.num != -1) encoding |= MIPS_RD(registers.grd.num); // dest reg - + if (registers.frt.num != -1) encoding |= MIPS_FT(registers.frt.num); // float target reg if (registers.frs.num != -1) encoding |= MIPS_FS(registers.frs.num); // float source reg if (registers.frd.num != -1) encoding |= MIPS_FD(registers.frd.num); // float dest reg - + if (registers.ps2vrt.num != -1) encoding |= (registers.ps2vrt.num << 16); // ps2 vector target reg if (registers.ps2vrs.num != -1) encoding |= (registers.ps2vrs.num << 21); // ps2 vector source reg if (registers.ps2vrd.num != -1) encoding |= (registers.ps2vrd.num << 6); // ps2 vector dest reg diff --git a/pcsx2/DebugTools/SymbolMap.cpp b/pcsx2/DebugTools/SymbolMap.cpp index 59139c92c8..6e1a4eb5c7 100644 --- a/pcsx2/DebugTools/SymbolMap.cpp +++ b/pcsx2/DebugTools/SymbolMap.cpp @@ -133,7 +133,7 @@ bool SymbolMap::GetSymbolInfo(SymbolInfo *info, u32 address, SymbolType symmask) return true; } - + if (dataAddress != INVALID_ADDRESS) { if (info != NULL) { info->type = ST_DATA; diff --git a/pcsx2/Dmac.cpp b/pcsx2/Dmac.cpp index 5ed89c0310..a8cfb1596b 100644 --- a/pcsx2/Dmac.cpp +++ b/pcsx2/Dmac.cpp @@ -120,7 +120,7 @@ __fi tDMA_TAG* SPRdmaGetAddr(u32 addr, bool write) DevCon.Warning("MTVU: SPR Accessing VU1 Memory"); vu1Thread.WaitVU(); } - + //Access for VU Memory if((addr >= 0x1100c000) && (addr < 0x11010000)) @@ -134,7 +134,7 @@ __fi tDMA_TAG* SPRdmaGetAddr(u32 addr, bool write) //DevCon.Warning("VU0 Mem %x", addr); return (tDMA_TAG*)(VU0.Mem + (addr & 0xff0)); } - + //Possibly not needed but the manual doesn't say SPR cannot access it. if((addr >= 0x11000000) && (addr < 0x11004000)) { @@ -147,8 +147,8 @@ __fi tDMA_TAG* SPRdmaGetAddr(u32 addr, bool write) //DevCon.Warning("VU1 Micro %x", addr); return (tDMA_TAG*)(VU1.Micro + (addr & 0x3ff0)); } - - + + // Unreachable return NULL; } @@ -255,7 +255,7 @@ static __ri void DmaExec( void (*func)(), u32 mem, u32 value ) cpuClearInt( 11 ); QueuedDMA._u16 &= ~(1 << 11); //Clear any queued DMA requests for this channel } - + cpuClearInt( channel ); QueuedDMA._u16 &= ~(1 << channel); //Clear any queued DMA requests for this channel } @@ -307,7 +307,7 @@ __fi u32 dmacRead32( u32 mem ) // Set OPH and APATH from counter, cycling paths and alternating OPH return gifRegs.stat._u32 & ~(7 << 9) | (counter & 1 ? counter << 9 : 0); } - + return psHu32(mem); } diff --git a/pcsx2/Docs/Configuration_Guide/Configuration_Guide.md b/pcsx2/Docs/Configuration_Guide/Configuration_Guide.md index 5a2c439a0d..aebd27a041 100644 --- a/pcsx2/Docs/Configuration_Guide/Configuration_Guide.md +++ b/pcsx2/Docs/Configuration_Guide/Configuration_Guide.md @@ -41,7 +41,7 @@ Advanced users may wish to use a different folder for their BIOS, you can do so ![PCSX2_First_Time_Configuration_bios.png](PCSX2_First_Time_Configuration_bios.png) ## Post-Setup Configuration -A large number of games work out-of-the-box on default PCSX2 settings. However, a subset of games require special settings to run, and some games require special settings to be upscaled. This guide will briefly cover some frequent problems and configuration settings to address them. +A large number of games work out-of-the-box on default PCSX2 settings. However, a subset of games require special settings to run, and some games require special settings to be upscaled. This guide will briefly cover some frequent problems and configuration settings to address them. ### Multi-Threaded VU1 (MTVU) The MTVU option is a unique case of a recommended setting that is **not** enabled by default. MTVU boosts performance for PCs with at least 3 cores with almost no consequences for the overwhelming majority of games. However, a small number of high profile games are incompabible with MTVU and will break if it is enabled. For these reasons, we do not enable it by default, **but strongly recommend you do so yourself**. If your game fails to boot, crashes, stalls, or has other problems with it enabled, disable it and try again. @@ -50,7 +50,7 @@ The MTVU option is a unique case of a recommended setting that is **not** enable Looking for information specific to a single game? Head to the [PCSX2 Wiki](https://wiki.pcsx2.net/Main_Page) and search for your game using the search bar in the top right. Known issues and solutions should be towards the bottom of a game's wiki page. ### General solutions -Want some general ideas to try that are not specific to a game? Here are some more commonly known issues and solutions to try. +Want some general ideas to try that are not specific to a game? Here are some more commonly known issues and solutions to try. *Note: For some of these issues, multiple solutions are given one after the other. Before moving from one solution to the next, **undo the previous solution**. Stacking multiple fixes on top of each other is usually unnecessary and likely to introduce new issues.* #### Grid-like pattern on screen @@ -74,7 +74,7 @@ Sometimes a game uses blending for lighting effects and needs more accuracy for Increment Blending Accuracy until the problem goes away. Note, higher Blending Accuracy substantially increases performance requirements. #### Flickering or improperly shaped shadows -This can either be a GS or VU problem so solutions will vary wildly by game. +This can either be a GS or VU problem so solutions will vary wildly by game. ##### GS Navigate to the GSdx Advanced Settings and Hacks: diff --git a/pcsx2/Docs/License.txt b/pcsx2/Docs/License.txt index 61fa0f63ac..74e85cb3ca 100644 --- a/pcsx2/Docs/License.txt +++ b/pcsx2/Docs/License.txt @@ -5,7 +5,7 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2019 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. diff --git a/pcsx2/Docs/PCSX2_FAQ.md b/pcsx2/Docs/PCSX2_FAQ.md index 21a683d478..b4ed08cef9 100644 --- a/pcsx2/Docs/PCSX2_FAQ.md +++ b/pcsx2/Docs/PCSX2_FAQ.md @@ -25,7 +25,7 @@ There are a number of ways to help the project, whether it be bug reporting, gam * Want to improve the PCSX2 wiki? [Here is how to contribute](https://wiki.pcsx2.net/Help!_How_to_contribute_guide) ### Question 4: Is PCSX2 ready to run out-of-the-box? -No, first, you must dump your PlayStation 2 console's BIOS using the BIOS dumper. The BIOS dumper is [available on the PCSX2 website](https://pcsx2.net/download/releases/tools.html). +No, first, you must dump your PlayStation 2 console's BIOS using the BIOS dumper. The BIOS dumper is [available on the PCSX2 website](https://pcsx2.net/download/releases/tools.html). After dumping your PlayStation 2 console's BIOS and copying it to your computer, launch PCSX2, step through the first time setup wizard, and then you may begin playing. @@ -44,7 +44,7 @@ After dumping your PlayStation 2 console's BIOS and copying it to your computer, *Note: Recommended Single Thread Performance is based on moderately complex games. Games that pushed the PS2 hardware to its limits will struggle on CPUs at this level. Some release titles and 2D games which underutilized the PS2 hardware may run on CPUs rated as low as 1200. A quick reference for CPU **intensive games**: [Wiki](https://wiki.pcsx2.net/Category:CPU_intensive_games), [Forum](https://forums.pcsx2.net/Thread-LIST-The-Most-CPU-Intensive-Games) and CPU **light** games: [Forum](https://forums.pcsx2.net/Thread-LIST-Games-that-don-t-need-a-strong-CPU-to-emulate)* -#### Recommended +#### Recommended | Operating System | CPU | GPU | RAM | | --- | --- | --- | --- | @@ -66,7 +66,7 @@ The CPU load as reported in software such as Windows' Task Manager is usually a No. PCSX2 does not use or require SLI or Crossfire. ### Question 9: How do I check if a game is playable? -The PCSX2 website has a [compatibility list](https://pcsx2.net/compat/) with every game that has been tested. +The PCSX2 website has a [compatibility list](https://pcsx2.net/compat/) with every game that has been tested. ### Question 10: Do PS1 (PSX) games work on PCSX2? @@ -74,12 +74,12 @@ The PCSX2 website has a [compatibility list](https://pcsx2.net/compat/) with eve No, they will not work without issues. Please use a proper PS1 emulator, such as Duckstation or Mednafen. #### If you are a tinkerer and like to break things: -PS1 games may work on PCSX2, but compatibility is very limited. Specific settings are often required to get a game to boot, and there are other universal problems including missing/pitch-shifted audio and severe FMV corruption. A [forum thread for PS1 compatibility](https://forums.pcsx2.net/Thread-PSX-Mode-Unofficial-Compatibility-List) is tracking some fixes and compatibility reports. +PS1 games may work on PCSX2, but compatibility is very limited. Specific settings are often required to get a game to boot, and there are other universal problems including missing/pitch-shifted audio and severe FMV corruption. A [forum thread for PS1 compatibility](https://forums.pcsx2.net/Thread-PSX-Mode-Unofficial-Compatibility-List) is tracking some fixes and compatibility reports. *While we encourage discussion about PS1 games and improving compatibility, bug reports are NOT being accepted for PS1 games. Any reports for PS1 games will be closed immediately as invalid.* ### Question 11: Why does my game not work like it did in an earlier PCSX2 version? -Any change to the emulator may fix one game, but cause problems for another. If the issue is severe and not fixable with different settings, you can always revert back to the last known PCSX2 version to work, and report the build number that broke the game. [Development builds](https://pcsx2.net/download/development.html) are very helpful for finding the exact change that caused a regression. +Any change to the emulator may fix one game, but cause problems for another. If the issue is severe and not fixable with different settings, you can always revert back to the last known PCSX2 version to work, and report the build number that broke the game. [Development builds](https://pcsx2.net/download/development.html) are very helpful for finding the exact change that caused a regression. ### Question 12: Why is PCSX2 slow? The PlayStation 2 is a complex console, and this substantially raises the PC requirements to emulate it at full speed accurately. [This forum thread](https://forums.pcsx2.net/Thread-Why-is-PCSX2-slow) helps explain some of the technical reasons behind it, and our current guidelines for PC requirements are listed above. @@ -142,12 +142,12 @@ Some settings are greyed out. These are advanced counters that should only be mo ### Question 22: What is the normal speed for a PlayStation 2 game? * NTSC games will play at 59.94 FPS * PAL games will play at 50 FPS -* Keep in mind that there is a difference between the internal framerate (iFPS) and what PCSX2 shows as virtual framerate (vFPS). +* Keep in mind that there is a difference between the internal framerate (iFPS) and what PCSX2 shows as virtual framerate (vFPS). -These framerates are what the PlayStation 2 console would push to a real TV through its video cable. A game itself, typically, internally generates only half of those frames, and repeats frames to fill the gaps. This is why a "full speed" game may not "feel like 60 FPS". The console's "speed" (meaning AI, sound, physics, *everything*) is tied to the playback framerate, which is what PCSX2 reports as its "FPS". +These framerates are what the PlayStation 2 console would push to a real TV through its video cable. A game itself, typically, internally generates only half of those frames, and repeats frames to fill the gaps. This is why a "full speed" game may not "feel like 60 FPS". The console's "speed" (meaning AI, sound, physics, *everything*) is tied to the playback framerate, which is what PCSX2 reports as its "FPS". ### Question 23: What are Gamefixes? -Gamefixes are specialized fixes built into PCSX2 for specific games. Gamefixes mostly fix core emulation problems that would crash or soft lock a game, rather than graphical or performance issues. By default, the "System > Automatic Gamefixes" option is enabled, meaning any games that need gamefixes will have them automatically applied, regardless of what gamefix settings you have enabled. +Gamefixes are specialized fixes built into PCSX2 for specific games. Gamefixes mostly fix core emulation problems that would crash or soft lock a game, rather than graphical or performance issues. By default, the "System > Automatic Gamefixes" option is enabled, meaning any games that need gamefixes will have them automatically applied, regardless of what gamefix settings you have enabled. Most games will not need gamefixes, however if your game is having issues, you can try manually enabling them in Emulation Settings. @@ -161,7 +161,7 @@ As the name says, speedhacks are hacks to make things faster. They will speed up *Bug reports of issues caused by speedhacks will NOT be accepted, and will be immediately closed as invalid.* ### Question 25: What are all these EE/IOP and VU options? -The PS2 EE, IOP and VU processors are substantially different from a PC CPU and require different rounding and clamping modes to do math accurately. Most games work fine on the default options, but some games might need a different setting. You can check the [PCSX2 Wiki](https://wiki.pcsx2.net/Category:Games) to see if your game needs an alternate setting, or check the [PCSX2 Forums](https://forums.pcsx2.net/) to see if anyone else has posted about it there. +The PS2 EE, IOP and VU processors are substantially different from a PC CPU and require different rounding and clamping modes to do math accurately. Most games work fine on the default options, but some games might need a different setting. You can check the [PCSX2 Wiki](https://wiki.pcsx2.net/Category:Games) to see if your game needs an alternate setting, or check the [PCSX2 Forums](https://forums.pcsx2.net/) to see if anyone else has posted about it there. ### Question 26: What are PCSX2 plugins? Older versions of PCSX2 used a plugin framework for various sections of the emulator. A plugin is a small, incomplete piece of software that, when plugged in to another piece of software, provides some sort of additional function. PCSX2 used to use plugins for: @@ -184,7 +184,7 @@ For Linux users, PCSX2 will automatically detect and bind controls to any recogn --- ## Useful Links -### BIOS Dumping Guides +### BIOS Dumping Guides * [pgert's guide to BIOS and memory card tools](https://forums.pcsx2.net/Thread-An-orientation-through-some-of-the-PCSX2-BIOS-memcard-tools-Windows?pid=183709#pid183709) * [One of the original BIOS dumping guides, originally from ngemu](https://forums.pcsx2.net/Thread-Guide-to-Dumping-Your-PS2-Bios-over-LAN) diff --git a/pcsx2/Elfheader.cpp b/pcsx2/Elfheader.cpp index 276d3b29cd..90e74f6a14 100644 --- a/pcsx2/Elfheader.cpp +++ b/pcsx2/Elfheader.cpp @@ -150,7 +150,7 @@ std::pair ElfObject::getTextRange() if (start <= header.e_entry && (start+size) > header.e_entry) return std::make_pair(start,size); } - + return std::make_pair(0,0); } diff --git a/pcsx2/Frontend/LayeredSettingsInterface.cpp b/pcsx2/Frontend/LayeredSettingsInterface.cpp index 453e76c546..b16b5290c0 100644 --- a/pcsx2/Frontend/LayeredSettingsInterface.cpp +++ b/pcsx2/Frontend/LayeredSettingsInterface.cpp @@ -139,7 +139,7 @@ void LayeredSettingsInterface::SetDoubleValue(const char* section, const char* k void LayeredSettingsInterface::SetBoolValue(const char* section, const char* key, bool value) { - pxFailRel("Attempt to call SetBoolValue() on layered settings interface"); + pxFailRel("Attempt to call SetBoolValue() on layered settings interface"); } void LayeredSettingsInterface::SetStringValue(const char* section, const char* key, const char* value) diff --git a/pcsx2/GS.cpp b/pcsx2/GS.cpp index 9430602c83..aea8379214 100644 --- a/pcsx2/GS.cpp +++ b/pcsx2/GS.cpp @@ -96,7 +96,7 @@ static __fi void gsCSRwrite( const tGS_CSR& csr ) // Our emulated GS has no FIFO, but if it did, it would flush it here... //Console.WriteLn("GS_CSR FLUSH GS fifo: %x (CSRr=%x)", value, GSCSRr); } - + if(csr.SIGNAL) { // SIGNAL : What's not known here is whether or not the SIGID register should be updated @@ -114,9 +114,9 @@ static __fi void gsCSRwrite( const tGS_CSR& csr ) gifUnit.gsSIGNAL.queued = false; gifUnit.Execute(false, true); // Resume paused transfers } - + if (csr.FINISH) { - CSRreg.FINISH = false; + CSRreg.FINISH = false; gifUnit.gsFINISH.gsFINISHFired = false; //Clear the previously fired FINISH (YS, Indiecar 2005, MGS3) } if(csr.HSINT) CSRreg.HSINT = false; @@ -140,7 +140,7 @@ __fi void gsWrite8(u32 mem, u8 value) { // CSR 8-bit write handlers. // I'm quite sure these would just write the CSR portion with the other - // bits set to 0 (no action). The previous implementation masked the 8-bit + // bits set to 0 (no action). The previous implementation masked the 8-bit // write value against the previous CSR write value, but that really doesn't // make any sense, given that the real hardware's CSR circuit probably has no // real "memory" where it saves anything. (for example, you can't write to @@ -173,7 +173,7 @@ __fi void gsWrite16(u32 mem, u16 value) { // See note above about CSR 8 bit writes, and handling them as zero'd bits // for all but the written parts. - + case GS_CSR: gsCSRwrite( tGS_CSR((u32)value) ); return; // do not write to MTGS memory @@ -364,7 +364,7 @@ void gsIrq() { void gsPostVsyncStart() { //gifUnit.FlushToMTGS(); // Needed for some (broken?) homebrew game loaders - + const bool registers_written = s_GSRegistersWritten; s_GSRegistersWritten = false; GetMTGS().PostVsyncStart(registers_written); diff --git a/pcsx2/GS/GS.rc b/pcsx2/GS/GS.rc index accc4c6954..91749b5b73 100644 --- a/pcsx2/GS/GS.rc +++ b/pcsx2/GS/GS.rc @@ -28,12 +28,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#ifndef APSTUDIO_INVOKED\r\n" "#include ""targetver.h""\r\n" diff --git a/pcsx2/GS/GSClut.cpp b/pcsx2/GS/GSClut.cpp index 68da5194da..0e954ebc68 100644 --- a/pcsx2/GS/GSClut.cpp +++ b/pcsx2/GS/GSClut.cpp @@ -172,7 +172,7 @@ void GSClut::Write(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT) m_write.TEXCLUT = TEXCLUT; m_read.dirty = true; m_write.dirty = false; - + (this->*m_wc[TEX0.CSM][TEX0.CPSM][TEX0.PSM])(TEX0, TEXCLUT); } diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index a047eef6b3..4b42055d05 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -521,7 +521,7 @@ GSVector4i GSState::GetFrameRect(int i, bool ignore_off) return rectangle; const auto& DISP = m_regs->DISP[i].DISPLAY; - + const u32 DW = DISP.DW + 1; const u32 DH = DISP.DH + 1; const GSVector2i magnification(DISP.MAGH+1, DISP.MAGV + 1); @@ -1737,7 +1737,7 @@ inline bool GSState::TestDrawChanged() prim_mask &= ~0x7; else return true; - + if ((m_env.PRIM.U32[0] ^ m_prev_env.PRIM.U32[0]) & prim_mask) return true; @@ -2117,7 +2117,7 @@ void GSState::Move() endy = -1; y_inc = -y_inc; } - + for (int y = starty; y != endy; y+= y_inc, _sy += y_inc, _dy += y_inc) { auto s = getPAHelper(spo, sx, _sy); @@ -3455,7 +3455,7 @@ GSState::TextureMinMaxResult GSState::GetTextureMinMax(const GIFRegTEX0& TEX0, c if (m_vt.m_primclass == GS_SPRITE_CLASS && PRIM->FST == 1 && m_index.tail < 3) { // When coordinates are fractional, GS appears to draw to the right/bottom (effectively - // taking the ceiling), not to the top/left (taking the floor). + // taking the ceiling), not to the top/left (taking the floor). const GSVector4i int_rc(m_vt.m_min.p.ceil().xyxy(m_vt.m_max.p.floor())); const GSVector4i scissored_rc(int_rc.rintersect(GSVector4i(m_context->scissor.in))); if (!int_rc.eq(scissored_rc)) diff --git a/pcsx2/GS/GSState.h b/pcsx2/GS/GSState.h index 208f078c17..ec2b471cd8 100644 --- a/pcsx2/GS/GSState.h +++ b/pcsx2/GS/GSState.h @@ -185,7 +185,7 @@ protected: void GrowVertexBuffer(); void HandleAutoFlush(); - + template void VertexKick(u32 skip); diff --git a/pcsx2/GS/GSVector8.h b/pcsx2/GS/GSVector8.h index fa3f5d2c77..1f60768f39 100644 --- a/pcsx2/GS/GSVector8.h +++ b/pcsx2/GS/GSVector8.h @@ -116,8 +116,8 @@ public: __forceinline GSVector8(__m128 m0, __m128 m1) { -#if 0 // _MSC_VER >= 1700 - +#if 0 // _MSC_VER >= 1700 + this->m = _mm256_permute2f128_ps(_mm256_castps128_ps256(m0), _mm256_castps128_ps256(m1), 0x20); #else diff --git a/pcsx2/GS/GSVector8i.h b/pcsx2/GS/GSVector8i.h index 9db5f23734..3456ef889d 100644 --- a/pcsx2/GS/GSVector8i.h +++ b/pcsx2/GS/GSVector8i.h @@ -91,8 +91,8 @@ public: __forceinline GSVector8i(__m128i m0, __m128i m1) { -#if 0 // _MSC_VER >= 1700 - +#if 0 // _MSC_VER >= 1700 + this->m = _mm256_permute2x128_si256(_mm256_castsi128_si256(m0), _mm256_castsi128_si256(m1), 0); #else diff --git a/pcsx2/GS/Renderers/Common/GSRenderer.cpp b/pcsx2/GS/Renderers/Common/GSRenderer.cpp index b92057a88e..f6043c9372 100644 --- a/pcsx2/GS/Renderers/Common/GSRenderer.cpp +++ b/pcsx2/GS/Renderers/Common/GSRenderer.cpp @@ -213,7 +213,7 @@ bool GSRenderer::Merge(int field) // If using scanmsk we have to keep the single line offset, regardless of upscale // so we handle this separately after the rect calculations. float interlace_offset = 0.0f; - + if ((!GSConfig.PCRTCAntiBlur || m_scanmask_used) && display_offset) { interlace_offset = static_cast(display_diff.y & 1); @@ -266,7 +266,7 @@ bool GSRenderer::Merge(int field) if (display_diff.y >= 4 || !GSConfig.PCRTCAntiBlur) off.y = display_diff.y; - + if (samesrc) { // Adjusting the screen offset when using a negative offset. @@ -353,7 +353,7 @@ bool GSRenderer::Merge(int field) GSVector2i max_resolution = GetResolution(); resolution.x = display_combined.x - display_baseline.x; resolution.y = display_combined.y - display_baseline.y; - + if (isinterlaced() && m_regs->SMODE2.FFMD) { resolution.y >>= 1; diff --git a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp index 7861408c06..bdbbe93680 100644 --- a/pcsx2/GS/Renderers/DX11/GSDevice11.cpp +++ b/pcsx2/GS/Renderers/DX11/GSDevice11.cpp @@ -899,7 +899,7 @@ void GSDevice11::DoFXAA(GSTexture* sTex, GSTexture* dTex) Console.Error("FXAA shader is missing"); return; } - + ShaderMacro sm(m_shader_cache.GetFeatureLevel()); m_fxaa_ps = m_shader_cache.GetPixelShader(m_dev.get(), *shader, sm.GetPtr(), "ps_main"); if (!m_fxaa_ps) diff --git a/pcsx2/GS/Renderers/HW/GSHwHack.cpp b/pcsx2/GS/Renderers/HW/GSHwHack.cpp index d8d4a8f1c1..801211f270 100644 --- a/pcsx2/GS/Renderers/HW/GSHwHack.cpp +++ b/pcsx2/GS/Renderers/HW/GSHwHack.cpp @@ -142,7 +142,7 @@ bool GSC_Manhunt2(const GSFrameInfo& fi, int& skip) bool GSC_CrashBandicootWoC(const GSFrameInfo& fi, int& skip) { // Channel effect not properly supported - Removes fog to fix the fog wall issue on Direct3D at any resolution, and while upscaling on every Hardware renderer. - if (skip == 0) + if (skip == 0) { if (fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x008c0 || fi.FBP == 0x00a00) && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x008c0 || fi.TBP0 == 0x00a00) && fi.FBP == fi.TBP0 && fi.FPSM == PSM_PSMCT32 && fi.FPSM == fi.TPSM) { diff --git a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp index 00a46f89ca..db6bfcf42a 100644 --- a/pcsx2/GS/Renderers/HW/GSRendererHW.cpp +++ b/pcsx2/GS/Renderers/HW/GSRendererHW.cpp @@ -2878,7 +2878,7 @@ void GSRendererHW::EmulateBlending(bool& DATE_PRIMID, bool& DATE_BARRIER, bool& // For mixed blend, the source blend is done in the shader (so we use CONST_ONE as a factor). m_conf.blend = {true, GSDevice::CONST_ONE, blend.dst, blend.op, m_conf.ps.blend_c == 2, AFIX}; m_conf.ps.blend_mix = (blend.op == GSDevice::OP_REV_SUBTRACT) ? 2 : 1; - + // Elide DSB colour output if not used by dest. m_conf.ps.no_color1 |= !GSDevice::IsDualSourceBlendFactor(blend.dst); @@ -4412,7 +4412,7 @@ void GSRendererHW::OI_DoubleHalfClear(GSTextureCache::Target*& rt, GSTextureCach && (m_context->FRAME.PSM & 0xF) == (m_context->ZBUF.PSM & 0xF) && (u32)(GSVector4i(m_vt.m_max.p).z) == 0) { const GSVertex* v = &m_vertex.buff[0]; - + // Z and color must be constant and the same if (m_vt.m_eq.rgba != 0xFFFF || !m_vt.m_eq.z || v[1].XYZ.Z != v[1].RGBAQ.U32[0]) return; diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index 93f55ea6e3..17919fdccb 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -458,7 +458,7 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, con break; } } - } + } else { assert(type == RenderTarget); @@ -648,7 +648,7 @@ void GSTextureCache::ScaleTargetForDisplay(Target* t, const GIFRegTEX0& dispfb, // So, for these cases, we simply expand the target to include both images, based on the read height. // It won't affect normal rendering, since that doesn't go through this path. - + // Compute offset into the target that we'll start reading from. const int delta = dispfb.TBP0 - t->m_TEX0.TBP0; int y_offset = 0; @@ -2717,7 +2717,7 @@ GSTextureCache::SurfaceOffset GSTextureCache::ComputeSurfaceOffset(const Surface const auto it = m_surface_offset_cache.find(sok); if (it != m_surface_offset_cache.end()) return it->second; // Cache HIT. - + // Cache MISS. // Search for a valid offset from B to A in B coordinates. SurfaceOffset so; @@ -2810,7 +2810,7 @@ GSTextureCache::SurfaceOffset GSTextureCache::ComputeSurfaceOffset(const Surface const GSVector4i& r2 = b_rect; [[maybe_unused]] const GSVector4i ri = r1.rintersect(r2); assert(!so.is_valid || (r1.eq(ri) && r1.x >= 0 && r1.y >= 0 && r1.z > 0 && r1.w > 0)); - + // Clear cache if size too big. if (m_surface_offset_cache.size() + 1 > S_SURFACE_OFFSET_CACHE_MAX_SIZE) { diff --git a/pcsx2/GS/Renderers/Metal/present.metal b/pcsx2/GS/Renderers/Metal/present.metal index 899a046508..96b5084770 100644 --- a/pcsx2/GS/Renderers/Metal/present.metal +++ b/pcsx2/GS/Renderers/Metal/present.metal @@ -68,7 +68,7 @@ fragment float4 ps_filter_complex(ConvertShaderData data [[stage_in]], ConvertPS float2 texdim = float2(res.texture.get_width(), res.texture.get_height()); float factor = (0.9f - 0.4f * cos(2.f * M_PI_F * data.t.y * texdim.y)); float ycoord = (floor(data.t.y * texdim.y) + 0.5f) / texdim.y; - + return factor * res.sample(float2(data.t.x, ycoord)); } diff --git a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp index ced2c4a581..6ea6dd028d 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp @@ -669,7 +669,7 @@ void GSDeviceOGL::RestoreAPIState() glBlendEquationSeparate(GLState::eq_RGB, GL_FUNC_ADD); glBlendFuncSeparate(GLState::f_sRGB, GLState::f_dRGB, GL_ONE, GL_ZERO); - + const float bf = static_cast(GLState::bf) / 128.0f; glBlendColor(bf, bf, bf, bf); @@ -702,7 +702,7 @@ void GSDeviceOGL::RestoreAPIState() glStencilOp(GL_KEEP, GL_KEEP, GLState::stencil_pass); glBindSampler(0, GLState::ps_ss); - + for (GLuint i = 0; i < sizeof(GLState::tex_unit) / sizeof(GLState::tex_unit[0]); i++) glBindTextureUnit(i, GLState::tex_unit[i]); @@ -1263,7 +1263,7 @@ void GSDeviceOGL::PresentRect(GSTexture* sTex, const GSVector4& sRect, GSTexture cb.SetSource(sRect, sTex->GetSize()); cb.SetTarget(dRect, ds); cb.SetTime(shaderTime); - + GL::Program& prog = m_present[static_cast(shader)]; prog.Bind(); prog.Uniform4fv(0, cb.SourceRect.F32); @@ -2214,7 +2214,7 @@ void GSDeviceOGL::PopDebugGroup() #ifdef ENABLE_OGL_DEBUG if (!glPopDebugGroup) return; - + glPopDebugGroup(); #endif } @@ -2248,7 +2248,7 @@ void GSDeviceOGL::InsertDebugMessage(DebugMessageCategory category, const char* id = 0xDEAD; severity = GL_DEBUG_SEVERITY_MEDIUM; break; - case GSDevice::DebugMessageCategory::Performance: + case GSDevice::DebugMessageCategory::Performance: default: type = GL_DEBUG_TYPE_PERFORMANCE; id = 0xFEE1; diff --git a/pcsx2/GS/Renderers/SW/GSRendererSW.cpp b/pcsx2/GS/Renderers/SW/GSRendererSW.cpp index 170c0f17cd..b46889f19e 100644 --- a/pcsx2/GS/Renderers/SW/GSRendererSW.cpp +++ b/pcsx2/GS/Renderers/SW/GSRendererSW.cpp @@ -1014,7 +1014,7 @@ bool GSRendererSW::GetScanlineGlobalData(SharedData* data) bool zwrite = zm != 0xffffffff; bool ztest = context->TEST.ZTE && context->TEST.ZTST > ZTST_ALWAYS; /* - printf("%05x %d %05x %d %05x %d %dx%d\n", + printf("%05x %d %05x %d %05x %d %dx%d\n", fwrite || ftest ? m_context->FRAME.Block() : 0xfffff, m_context->FRAME.PSM, zwrite || ztest ? m_context->ZBUF.Block() : 0xfffff, m_context->ZBUF.PSM, PRIM->TME ? m_context->TEX0.TBP0 : 0xfffff, m_context->TEX0.PSM, (int)m_context->TEX0.TW, (int)m_context->TEX0.TH); diff --git a/pcsx2/GS/Renderers/Vulkan/GSTextureVK.cpp b/pcsx2/GS/Renderers/Vulkan/GSTextureVK.cpp index 658490eeea..63b68fb94c 100644 --- a/pcsx2/GS/Renderers/Vulkan/GSTextureVK.cpp +++ b/pcsx2/GS/Renderers/Vulkan/GSTextureVK.cpp @@ -401,7 +401,7 @@ void GSTextureVK::CommitClear(VkCommandBuffer cmdbuf) vkCmdClearColorImage(cmdbuf, m_texture.GetImage(), m_texture.GetLayout(), &cv, 1, &srr); } - SetState(GSTexture::State::Dirty); + SetState(GSTexture::State::Dirty); } VkFramebuffer GSTextureVK::GetFramebuffer(bool feedback_loop) { return GetLinkedFramebuffer(nullptr, feedback_loop); } diff --git a/pcsx2/GS/Window/GSCaptureDlg.cpp b/pcsx2/GS/Window/GSCaptureDlg.cpp index e5411201c8..88013437e8 100644 --- a/pcsx2/GS/Window/GSCaptureDlg.cpp +++ b/pcsx2/GS/Window/GSCaptureDlg.cpp @@ -142,7 +142,7 @@ void GSCaptureDlg::OnInit() else if (wcsstr(str.get(), L"@device:sw:")) prefix = L"(DS) "; else if (wcsstr(str.get(), L"@device:cm:")) prefix = L"(VfW) "; - + c.DisplayName = str.get(); wil::com_ptr_nothrow pPB; diff --git a/pcsx2/GS/resource.h b/pcsx2/GS/resource.h index 2b228f2496..34901f7980 100644 --- a/pcsx2/GS/resource.h +++ b/pcsx2/GS/resource.h @@ -20,7 +20,7 @@ #define IDC_STATIC -1 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 10019 diff --git a/pcsx2/Gif_Logger.cpp b/pcsx2/Gif_Logger.cpp index 5a004d3b12..f5a5f36b9d 100644 --- a/pcsx2/Gif_Logger.cpp +++ b/pcsx2/Gif_Logger.cpp @@ -41,7 +41,7 @@ void Gif_ParsePacket(u8* data, u32 size, GIF_PATH path) { if (offset + 16 > size) return; gifTag.setTag(&buffer[offset], 1); - + GIF_PARSE("--Gif Tag [mode=%s][pre=%d][prim=%d][nregs=%d][nloop=%d][qwc=%d][EOP=%d]", GifTag_ModeStr[gifTag.tag.FLG], gifTag.tag.PRE, gifTag.tag.PRIM, gifTag.nRegs, gifTag.nLoop, gifTag.len/16, gifTag.tag.EOP); diff --git a/pcsx2/Hw.cpp b/pcsx2/Hw.cpp index 614aa9843d..783ed00220 100644 --- a/pcsx2/Hw.cpp +++ b/pcsx2/Hw.cpp @@ -87,7 +87,7 @@ __fi uint intcInterrupt() //DevCon.Warning("*PCSX2*: intcInterrupt already cleared"); return 0; } - if ((psHu32(INTC_STAT) & psHu32(INTC_MASK)) == 0) + if ((psHu32(INTC_STAT) & psHu32(INTC_MASK)) == 0) { //DevCon.Warning("*PCSX2*: No valid interrupt INTC_MASK: %x INTC_STAT: %x", psHu32(INTC_MASK), psHu32(INTC_STAT)); return 0; @@ -106,13 +106,13 @@ __fi uint intcInterrupt() __fi uint dmacInterrupt() { if( ((psHu16(DMAC_STAT + 2) & psHu16(DMAC_STAT)) == 0 ) && - ( psHu16(DMAC_STAT) & 0x8000) == 0 ) + ( psHu16(DMAC_STAT) & 0x8000) == 0 ) { //DevCon.Warning("No valid DMAC interrupt MASK %x STAT %x", psHu16(DMAC_STAT+2), psHu16(DMAC_STAT)); return 0; } - if (!dmacRegs.ctrl.DMAE || psHu8(DMAC_ENABLER+2) == 1) + if (!dmacRegs.ctrl.DMAE || psHu8(DMAC_ENABLER+2) == 1) { //DevCon.Warning("DMAC Suspended or Disabled on interrupt"); return 0; @@ -174,12 +174,12 @@ __ri bool hwMFIFOWrite(u32 addr, const u128* data, uint qwc) pxFailDev( fmt::format( "Scratchpad/MFIFO: Invalid base physical address: 0x{:08x}", u32(dmacRegs.rbor.ADDR)).c_str() ); return false; } - + return true; } __ri void hwMFIFOResume(u32 transferred) { - + if (transferred == 0) { return; //Nothing got put in the MFIFO, we don't care @@ -203,7 +203,7 @@ __ri void hwMFIFOResume(u32 transferred) { //Apparently this is bad, i guess so, the data is going to memory rather than the FIFO //vif1Regs.stat.FQC = 0x10; // FQC=16 - } + } break; } case MFD_GIF: @@ -332,11 +332,11 @@ liked this. From what i've deduced, REFE does in fact increment, but END doesn't, after much testing, i've concluded this is how we can standardize DMA chains, so i've modified the code to work like this. The below function controls the increment -of the TADR along with the MADR on VIF, GIF and SPR1 when using the CNT tag, the others don't use it yet, but they +of the TADR along with the MADR on VIF, GIF and SPR1 when using the CNT tag, the others don't use it yet, but they can probably be modified to do so now. -Reason for this:- Many games (such as clock tower 3 and FFX Videos) watched the TADR to see when a transfer has finished, -so we need to simulate this wherever we can! Even the FFX video gets corruption and tries to fire multiple DMA Kicks +Reason for this:- Many games (such as clock tower 3 and FFX Videos) watched the TADR to see when a transfer has finished, +so we need to simulate this wherever we can! Even the FFX video gets corruption and tries to fire multiple DMA Kicks if this doesnt happen, which was the reasoning for the hacked up SPR timing we had, that is no longer required. -Refraction @@ -347,7 +347,7 @@ void hwDmacSrcTadrInc(DMACh& dma) //Don't touch it if in normal/interleave mode. if (dma.chcr.STR == 0) return; if (dma.chcr.MOD != 1) return; - + u16 tagid = (dma.chcr.TAG >> 12) & 0x7; if (tagid == TAG_CNT) diff --git a/pcsx2/HwRead.cpp b/pcsx2/HwRead.cpp index 461ee4421e..cf2e119ee9 100644 --- a/pcsx2/HwRead.cpp +++ b/pcsx2/HwRead.cpp @@ -44,7 +44,7 @@ mem32_t _hwRead32(u32 mem) { case 0x00: return rcntRead32<0x00>( mem ); case 0x01: return rcntRead32<0x01>( mem ); - + case 0x02: return ipuRead32( mem ); case 0x03: @@ -56,7 +56,7 @@ mem32_t _hwRead32(u32 mem) return vifRead32<0>(mem); } return dmacRead32<0x03>( mem ); - + case 0x04: case 0x05: case 0x06: @@ -104,7 +104,7 @@ mem32_t _hwRead32(u32 mem) case 0x00: ret = psxHu32(0x1f801814); break; - case 0x80: + case 0x80: #if PSX_EXTRALOGS DevCon.Warning("FIFO Size %x", sif2fifosize); #endif @@ -130,7 +130,7 @@ mem32_t _hwRead32(u32 mem) #endif return ret; - + } /*if ((mem & 0x1000ff00) == 0x1000f200) { @@ -189,7 +189,7 @@ mem32_t _hwRead32(u32 mem) //Hack for Transformers and Test Drive Unlimited to simulate filling the VIF FIFO //It actually stalls VIF a few QW before the end of the transfer, so we need to pretend its all gone //else itll take aaaaaaaaages to boot. - if(mem == (D1_CHCR + 0x10) && CHECK_VIFFIFOHACK) + if(mem == (D1_CHCR + 0x10) && CHECK_VIFFIFOHACK) return psHu32(mem) + (vif1ch.qwc * 16); /*if((mem == GIF_CHCR) && !vif1ch.chcr.STR && gifRegs.stat.M3P && gifRegs.stat.APATH != 3) @@ -284,7 +284,7 @@ static RETURNS_R64 _hwRead64(u32 mem) // No game is known to attempt such a thing (yay!), so probably nothing for us to // worry about. Chances are, though, doing so is "legal" and yields some sort // of reproducible behavior. Candidate for real hardware testing. - + // Current assumption: Reads 128 bits and discards the unused portion. uint wordpart = (mem >> 3) & 0x1; @@ -364,7 +364,7 @@ RETURNS_R128 _hwRead128(u32 mem) DevCon.Warning("128bit read from %x wibble", mem); if (mem == 0x1000f3E0) { - + ReadFifoSingleWord(); u32 part0 = psHu32(0x1000f3E0); ReadFifoSingleWord(); diff --git a/pcsx2/HwWrite.cpp b/pcsx2/HwWrite.cpp index 71ab9f7589..07079668a8 100644 --- a/pcsx2/HwWrite.cpp +++ b/pcsx2/HwWrite.cpp @@ -120,7 +120,7 @@ void _hwWrite32( u32 mem, u32 value ) DevCon.Warning("GIF Mode cancelling P3 Disable"); CPU_INT(DMAC_GIF, 8); } - + gifRegs.stat.M3R = gifRegs.mode.M3R; gifRegs.stat.IMT = gifRegs.mode.IMT; @@ -400,7 +400,7 @@ void _hwWrite64( u32 mem, const mem64_t* srcval ) hwWrite128(mem & ~0x0f, &zerofill); } return; - + default: // disregard everything except the lower 32 bits. // ... and skip the 64 bit writeback since the 32-bit one will suffice. diff --git a/pcsx2/IPU/IPU.cpp b/pcsx2/IPU/IPU.cpp index 7781edbbee..974e6b8e58 100644 --- a/pcsx2/IPU/IPU.cpp +++ b/pcsx2/IPU/IPU.cpp @@ -217,7 +217,7 @@ __fi u32 ipuRead32(u32 mem) ipucase(IPU_BP): // IPU_BP { pxAssume(g_BP.FP <= 2); - + ipuRegs.ipubp = g_BP.BP & 0x7f; ipuRegs.ipubp |= g_BP.IFC << 8; ipuRegs.ipubp |= g_BP.FP << 16; @@ -250,7 +250,7 @@ __fi RETURNS_R64 ipuRead64(u32 mem) if (getBits32((u8*)&ipuRegs.cmd.DATA, 0)) ipuRegs.cmd.DATA = BigEndian(ipuRegs.cmd.DATA); } - + if (ipuRegs.cmd.DATA & 0xffffff) IPU_LOG("read64: IPU_CMD=BUSY=%x, DATA=%08X", ipuRegs.cmd.BUSY ? 1 : 0, ipuRegs.cmd.DATA); return r64_load(&ipuRegs.cmd._u64); @@ -287,7 +287,7 @@ void ipuSoftReset() ipu_cmd.clear(); ipuRegs.cmd.BUSY = 0; ipuRegs.cmd.DATA = 0; // required for Enthusia - Professional Racing after fix, or will freeze at start of next video. - + hwIntcIrq(INTC_IPU); // required for FightBox } @@ -582,7 +582,7 @@ static __ri bool ipuCSC(tIPU_CMD_CSC csc) ipu_csc(decoder.mb8, decoder.rgb32, 0); if (csc.OFM) ipu_dither(decoder.rgb32, decoder.rgb16, csc.DTE); - + if (csc.OFM) { ipu_cmd.pos[1] += ipu_fifo.out.write(((u32*) & decoder.rgb16) + 4 * ipu_cmd.pos[1], 32 - ipu_cmd.pos[1]); @@ -769,7 +769,7 @@ __fi u8 getBits32(u8 *address, bool advance) if (!g_BP.FillBuffer(32)) return 0; const u8* readpos = &g_BP.internal_qwc->_u8[g_BP.BP/8]; - + if(uint shift = (g_BP.BP & 7)) { u32 mask = (0xff >> shift); diff --git a/pcsx2/IPU/IPU.h b/pcsx2/IPU/IPU.h index a3cf95d96d..9676661e5f 100644 --- a/pcsx2/IPU/IPU.h +++ b/pcsx2/IPU/IPU.h @@ -275,7 +275,7 @@ union tIPU_cmd u32 current; }; }; - + u128 _u128[2]; void clear(); diff --git a/pcsx2/IPU/IPU_Fifo.cpp b/pcsx2/IPU/IPU_Fifo.cpp index 8ef6ce762d..9765b97b96 100644 --- a/pcsx2/IPU/IPU_Fifo.cpp +++ b/pcsx2/IPU/IPU_Fifo.cpp @@ -124,7 +124,7 @@ int IPU_Fifo_Output::write(const u32 *value, uint size) uint origsize = size; /*do {*/ //IPU0dma(); - + uint transsize = std::min(size, 8 - (uint)ipuRegs.ctrl.OFC); if(!transsize) return 0; @@ -147,7 +147,7 @@ void IPU_Fifo_Output::read(void *value, uint size) { pxAssert(ipuRegs.ctrl.OFC >= size); ipuRegs.ctrl.OFC -= size; - + // Zeroing the read data is not needed, since the ringbuffer design will never read back // the zero'd data anyway. --air diff --git a/pcsx2/IPU/IPUdma.cpp b/pcsx2/IPU/IPUdma.cpp index 1c5d2ec8c3..2291e78c97 100644 --- a/pcsx2/IPU/IPUdma.cpp +++ b/pcsx2/IPU/IPUdma.cpp @@ -182,7 +182,7 @@ void IPU0dma() ipu0ch.madr += readsize << 4; ipu0ch.qwc -= readsize; - + if (dmacRegs.ctrl.STS == STS_fromIPU) // STS == fromIPU { //DevCon.Warning("fromIPU Stall Control"); diff --git a/pcsx2/IPU/mpeg2lib/Mpeg.cpp b/pcsx2/IPU/mpeg2lib/Mpeg.cpp index aeff5dc45f..b9c4fa65cd 100644 --- a/pcsx2/IPU/mpeg2lib/Mpeg.cpp +++ b/pcsx2/IPU/mpeg2lib/Mpeg.cpp @@ -236,7 +236,7 @@ int __fi get_dmv() int get_macroblock_address_increment() { const MBAtab *mba; - + u16 code = UBITS(16); if (code >= 4096) @@ -287,7 +287,7 @@ static __fi int get_luma_dc_dct_diff() // 9 bits max } - + if (size==0) dc_diff = 0; else @@ -347,7 +347,7 @@ static bool get_intra_block() const u8 (&quant_matrix)[64] = decoder.iq; int quantizer_scale = decoder.quantizer_scale; s16 * dest = decoder.DCTblock; - u16 code; + u16 code; /* decode AC coefficients */ for (int i=1 + ipu_cmd.pos[4]; ; i++) @@ -428,7 +428,7 @@ static bool get_intra_block() ipu_cmd.pos[4] = 0; return true; } - + i += (tab->run == 65) ? GETBITS(6) : tab->run; if (i >= 64) { @@ -528,7 +528,7 @@ static bool get_non_intra_block(int * last) tab = &DCT.first[(code >> 12) - 4]; } else - { + { tab = &DCT.next[(code >> 12)- 4]; } } @@ -537,7 +537,7 @@ static bool get_non_intra_block(int * last) tab = &DCT.tab0[(code >> 8) - 4]; } else if (code >= 512) - { + { tab = &DCT.tab1[(code >> 6) - 8]; } @@ -547,23 +547,23 @@ static bool get_non_intra_block(int * last) // have lots of room to spare. else if (code >= 256) - { + { tab = &DCT.tab2[(code >> 4) - 16]; } else if (code >= 128) - { + { tab = &DCT.tab3[(code >> 3) - 16]; } else if (code >= 64) - { + { tab = &DCT.tab4[(code >> 2) - 16]; } else if (code >= 32) - { + { tab = &DCT.tab5[(code >> 1) - 16]; } else if (code >= 16) - { + { tab = &DCT.tab6[code - 16]; } else @@ -884,7 +884,7 @@ __fi bool mpeg2sliceIDEC() default: /* end of slice/frame, or error? */ { - goto finish_idec; + goto finish_idec; } } } @@ -990,7 +990,7 @@ __fi bool mpeg2_slice() decoder.dc_dct_pred[1] = decoder.dc_dct_pred[2] = 128 << decoder.intra_dc_precision; } - + ipuRegs.ctrl.ECD = 0; ipuRegs.top = 0; memzero_sse_a(mb8); @@ -1236,7 +1236,7 @@ __fi bool mpeg2_slice() g_BP.Align(); do { - if (!g_BP.FillBuffer(24)) + if (!g_BP.FillBuffer(24)) { ipu_cmd.pos[0] = 4; return false; diff --git a/pcsx2/IPU/mpeg2lib/Mpeg.h b/pcsx2/IPU/mpeg2lib/Mpeg.h index 10feeaf7a9..37b1ac4350 100644 --- a/pcsx2/IPU/mpeg2lib/Mpeg.h +++ b/pcsx2/IPU/mpeg2lib/Mpeg.h @@ -171,7 +171,7 @@ struct decoder_t { { return ((u128*)&mb8) + ipu0_idx; } - + void AdvanceIpuDataBy(uint amt) { pxAssertMsg(ipu0_data>=amt, "IPU FIFO Overflow on advance!" ); diff --git a/pcsx2/IPU/mpeg2lib/Vlc.h b/pcsx2/IPU/mpeg2lib/Vlc.h index c2a3c61b1e..61bcd791b5 100644 --- a/pcsx2/IPU/mpeg2lib/Vlc.h +++ b/pcsx2/IPU/mpeg2lib/Vlc.h @@ -21,7 +21,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - + // WARNING! This file should only be included into Mpeg.cpp AND NOWHERE ELSE. // All contents of this file are used only by Mpeg.cpp, and including it elsewhere will // just result in the linker having to remove a whole lot of redundant/unused decoder diff --git a/pcsx2/Interpreter.cpp b/pcsx2/Interpreter.cpp index 629f58f082..026bb58e8f 100644 --- a/pcsx2/Interpreter.cpp +++ b/pcsx2/Interpreter.cpp @@ -75,7 +75,7 @@ void intMemcheck(u32 op, u32 bits, bool store) start = standardizeBreakpointAddress(start); u32 end = start + bits/8; - + auto checks = CBreakPoints::GetMemChecks(); for (size_t i = 0; i < checks.size(); i++) { @@ -499,7 +499,7 @@ static void intEventTest() { // Perform counters, ints, and IOP updates: _cpuEventTest_Shared(); - + if (intExitExecution) { intExitExecution = false; diff --git a/pcsx2/IopCounters.cpp b/pcsx2/IopCounters.cpp index 1fa0e4dba4..41cf16b81b 100644 --- a/pcsx2/IopCounters.cpp +++ b/pcsx2/IopCounters.cpp @@ -577,9 +577,9 @@ void psxRcntWcount32(int index, u32 value) } psxCounters[index].count = value; - + if (psxCounters[index].count > psxCounters[index].target) - { + { // Count already higher than Target //DevCon.Warning("32bit Count already higher than target"); psxCounters[index].target |= IOPCNT_FUTURE_TARGET; diff --git a/pcsx2/IopDma.h b/pcsx2/IopDma.h index 49e3b4e885..5a2122df3a 100644 --- a/pcsx2/IopDma.h +++ b/pcsx2/IopDma.h @@ -13,7 +13,7 @@ * If not, see . */ -#pragma once +#pragma once extern void psxDma2(u32 madr, u32 bcr, u32 chcr); extern void psxDma3(u32 madr, u32 bcr, u32 chcr); diff --git a/pcsx2/IopGte.cpp b/pcsx2/IopGte.cpp index 3415c40dca..791a4b02e0 100644 --- a/pcsx2/IopGte.cpp +++ b/pcsx2/IopGte.cpp @@ -163,11 +163,11 @@ __inline unsigned long MFC2(int reg) { gteORGB = (((gteIR1 >> 7) & 0x1f)) | (((gteIR2 >> 7) & 0x1f) << 5) | (((gteIR3 >> 7) & 0x1f) << 10); - // gteORGB = (gteIR1 ) | - // (gteIR2 << 5) | + // gteORGB = (gteIR1 ) | + // (gteIR2 << 5) | // (gteIR3 << 10); - // gteORGB = ((gteIR1 & 0xf80)>>7) | - // ((gteIR2 & 0xf80)>>2) | + // gteORGB = ((gteIR1 & 0xf80)>>7) | + // ((gteIR2 & 0xf80)>>2) | // ((gteIR3 & 0xf80)<<3); return gteORGB; @@ -453,7 +453,7 @@ __inline double limG1(double x) { if (x > 1023.0) { x = 1023.0; gteFLAG |= (1 << 14); } else if (x < -1024.0) { x = -1024.0; gteFLAG |= (1 << 14); } - + return (x); } @@ -494,10 +494,10 @@ __inline s32 FlimE(s32 x) { _LIMX(0, 65535, 12); } __inline s32 FlimG1(s64 x) { if (x > 2147483647) { gteFLAG |= (1 << 16); } else if (x < (s64)0xffffffff80000000) { gteFLAG |= (1 << 15); } - + if (x > 1023) { x = 1023; gteFLAG |= (1 << 14); } - else if (x < -1024) { x = -1024; gteFLAG |= (1 << 14); } - + else if (x < -1024) { x = -1024; gteFLAG |= (1 << 14); } + return (x); } @@ -508,8 +508,8 @@ __inline s32 FlimG2(s64 x) { if (x > 1023) { x = 1023; gteFLAG |= (1 << 13); } else - if (x < -1024) { x = -1024; gteFLAG |= (1 << 13); } - + if (x < -1024) { x = -1024; gteFLAG |= (1 << 13); } + return (x); } @@ -2475,7 +2475,7 @@ void gteDPCS() { } void gteDPCT() { - // unsigned long C,R,G,B; + // unsigned long C,R,G,B; // double RR0,GG0,BB0; #ifdef GTE_DUMP static int sample = 0; sample++; diff --git a/pcsx2/IopMem.cpp b/pcsx2/IopMem.cpp index 4da002a371..ec4f9a1210 100644 --- a/pcsx2/IopMem.cpp +++ b/pcsx2/IopMem.cpp @@ -101,7 +101,7 @@ void iopMemoryReserve::Reset() psxMemWLUT[i + 0x2000 + 0x1e00] = (uptr)&eeMem->ROM1[i << 16]; } - for (int i = 0; i < 0x0008; i++) + for (int i = 0; i < 0x0008; i++) { psxMemWLUT[i + 0x2000 + 0x1e40] = (uptr)&eeMem->ROM2[i << 16]; } diff --git a/pcsx2/MMI.cpp b/pcsx2/MMI.cpp index 482cb053a8..50575736b4 100644 --- a/pcsx2/MMI.cpp +++ b/pcsx2/MMI.cpp @@ -183,7 +183,7 @@ void PMFHL() { case 0x02: // SLW { s64 TempS64 = ((u64)cpuRegs.HI.UL[0] << 32) | (u64)cpuRegs.LO.UL[0]; - + if (TempS64 >= 0x000000007fffffffLL) { cpuRegs.GPR.r[_Rd_].UD[0] = 0x000000007fffffffLL; } else if (TempS64 <= -0x80000000LL) { diff --git a/pcsx2/MTGS.cpp b/pcsx2/MTGS.cpp index 95678a5898..ebb089010f 100644 --- a/pcsx2/MTGS.cpp +++ b/pcsx2/MTGS.cpp @@ -137,7 +137,7 @@ void SysMtgsThread::ThreadEntryPoint() m_sem_event.WaitForWork(); } - + // try initializing.. this could fail const bool opened = TryOpenGS(); m_open_flag.store(opened, std::memory_order_release); @@ -997,7 +997,7 @@ void SysMtgsThread::SetSoftwareRendering(bool software, bool display_message /* new_renderer = EmuConfig.GS.UseHardwareRenderer() ? EmuConfig.GS.Renderer : GSRendererType::Auto; else new_renderer = GSRendererType::SW; - + SwitchRenderer(new_renderer, display_message); } diff --git a/pcsx2/MTVU.cpp b/pcsx2/MTVU.cpp index 0702901379..a3b51ff420 100644 --- a/pcsx2/MTVU.cpp +++ b/pcsx2/MTVU.cpp @@ -362,7 +362,7 @@ void VU_Thread::Get_MTVUChanges() u32 interrupts = mtvuInterrupts.load(std::memory_order_relaxed); if (!interrupts) return; - + if (interrupts & InterruptFlagSignal) { std::atomic_thread_fence(std::memory_order_acquire); @@ -415,7 +415,7 @@ void VU_Thread::Get_MTVUChanges() if (interrupts & InterruptFlagVUEBit) { mtvuInterrupts.fetch_and(~InterruptFlagVUEBit, std::memory_order_relaxed); - + if(INSTANT_VU1) VU0.VI[REG_VPU_STAT].UL &= ~0xFF00; //DevCon.Warning("E-Bit registered %x", VU0.VI[REG_VPU_STAT].UL); diff --git a/pcsx2/MTVU.h b/pcsx2/MTVU.h index 410e8f5509..425299142d 100644 --- a/pcsx2/MTVU.h +++ b/pcsx2/MTVU.h @@ -99,7 +99,7 @@ public: void WriteVIRegs(REG_VI* viRegs); void WriteVFRegs(VECTOR* vfRegs); - + void WriteCol(vifStruct& _vif); void WriteRow(vifStruct& _vif); diff --git a/pcsx2/Memory.cpp b/pcsx2/Memory.cpp index 670f411151..a27ad4cbde 100644 --- a/pcsx2/Memory.cpp +++ b/pcsx2/Memory.cpp @@ -462,28 +462,28 @@ template static __fi void ClearVuFunc(u32 addr, u32 size) { template static mem8_t vuMicroRead8(u32 addr) { VURegs* vu = vunum ? &VU1 : &VU0; addr &= vunum ? 0x3fff: 0xfff; - + if (vunum && THREAD_VU1) vu1Thread.WaitVU(); return vu->Micro[addr]; } template static mem16_t vuMicroRead16(u32 addr) { VURegs* vu = vunum ? &VU1 : &VU0; addr &= vunum ? 0x3fff: 0xfff; - + if (vunum && THREAD_VU1) vu1Thread.WaitVU(); return *(u16*)&vu->Micro[addr]; } template static mem32_t vuMicroRead32(u32 addr) { VURegs* vu = vunum ? &VU1 : &VU0; addr &= vunum ? 0x3fff: 0xfff; - + if (vunum && THREAD_VU1) vu1Thread.WaitVU(); return *(u32*)&vu->Micro[addr]; } template static RETURNS_R64 vuMicroRead64(u32 addr) { VURegs* vu = vunum ? &VU1 : &VU0; addr &= vunum ? 0x3fff: 0xfff; - + if (vunum && THREAD_VU1) vu1Thread.WaitVU(); return r64_load(&vu->Micro[addr]); } @@ -491,7 +491,7 @@ template static RETURNS_R128 vuMicroRead128(u32 addr) { VURegs* vu = vunum ? &VU1 : &VU0; addr &= vunum ? 0x3fff: 0xfff; if (vunum && THREAD_VU1) vu1Thread.WaitVU(); - + return r128_load(&vu->Micro[addr]); } @@ -500,7 +500,7 @@ template static RETURNS_R128 vuMicroRead128(u32 addr) { template static void vuMicroWrite8(u32 addr,mem8_t data) { VURegs* vu = vunum ? &VU1 : &VU0; addr &= vunum ? 0x3fff: 0xfff; - + if (vunum && THREAD_VU1) { vu1Thread.WriteMicroMem(addr, &data, sizeof(u8)); return; @@ -513,7 +513,7 @@ template static void vuMicroWrite8(u32 addr,mem8_t data) { template static void vuMicroWrite16(u32 addr, mem16_t data) { VURegs* vu = vunum ? &VU1 : &VU0; addr &= vunum ? 0x3fff: 0xfff; - + if (vunum && THREAD_VU1) { vu1Thread.WriteMicroMem(addr, &data, sizeof(u16)); return; @@ -526,7 +526,7 @@ template static void vuMicroWrite16(u32 addr, mem16_t data) { template static void vuMicroWrite32(u32 addr, mem32_t data) { VURegs* vu = vunum ? &VU1 : &VU0; addr &= vunum ? 0x3fff: 0xfff; - + if (vunum && THREAD_VU1) { vu1Thread.WriteMicroMem(addr, &data, sizeof(u32)); return; @@ -544,7 +544,7 @@ template static void vuMicroWrite64(u32 addr, const mem64_t* data) { vu1Thread.WriteMicroMem(addr, (void*)data, sizeof(u64)); return; } - + if (*(u64*)&vu->Micro[addr]!=data[0]) { ClearVuFunc(addr, 8); *(u64*)&vu->Micro[addr] =data[0]; @@ -735,7 +735,7 @@ void eeMemoryReserve::Reset() pxAssert(Source_PageFault); mmap_faultHandler = new mmap_PageFaultHandler(); } - + _parent::Reset(); // Note!! Ideally the vtlb should only be initialized once, and then subsequent @@ -765,7 +765,7 @@ void eeMemoryReserve::Reset() vu0_micro_mem = vtlb_RegisterHandlerTempl1(vuMicro,0); vu1_micro_mem = vtlb_RegisterHandlerTempl1(vuMicro,1); vu1_data_mem = (1||THREAD_VU1) ? vtlb_RegisterHandlerTempl1(vuData,1) : 0; - + ////////////////////////////////////////////////////////////////////////////////////////// // IOP's "secret" Hardware Register mapping, accessible from the EE (and meant for use // by debugging or BIOS only). The IOP's hw regs are divided into three main pages in @@ -797,7 +797,7 @@ void eeMemoryReserve::Reset() // psHw Optimized Mappings // The HW Registers have been split into pages to improve optimization. - + #define hwHandlerTmpl(page) \ hwRead8, hwRead16, hwRead32, hwRead64, hwRead128, \ hwWrite8, hwWrite16,hwWrite32,hwWrite64,hwWrite128 @@ -878,7 +878,7 @@ eeMemoryReserve::~eeMemoryReserve() // =========================================================================================== -// Memory Protection and Block Checking, vtlb Style! +// Memory Protection and Block Checking, vtlb Style! // =========================================================================================== // For the first time code is recompiled (executed), the PS2 ram page for that code is // protected using Virtual Memory (mprotect). If the game modifies its own code then this @@ -943,7 +943,7 @@ vtlb_ProtectionMode mmap_GetRamPageInfo( u32 paddr ) void mmap_MarkCountedRamPage( u32 paddr ) { pxAssert( eeMem ); - + paddr &= ~0xfff; uptr ptr = (uptr)PSM( paddr ); diff --git a/pcsx2/PAD/Windows/PAD.rc b/pcsx2/PAD/Windows/PAD.rc index d4e157d048..f3f1af4938 100644 --- a/pcsx2/PAD/Windows/PAD.rc +++ b/pcsx2/PAD/Windows/PAD.rc @@ -25,18 +25,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#include \r\n" "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\r\n" "\0" @@ -55,7 +55,7 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "",IDC_BINDINGS_LIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_VSCROLL | WS_TABSTOP,7,7,183,237,WS_EX_CLIENTEDGE - // Input Bindings: + // Input Bindings: PUSHBUTTON "Select",ID_SELECT,328,34,34,15 PUSHBUTTON "Start",ID_START,366,34,34,15 PUSHBUTTON "Analog",ID_ANALOG,328,51,34,15 diff --git a/pcsx2/PCSX2.rc b/pcsx2/PCSX2.rc index e5686f29c6..63b781f8ba 100644 --- a/pcsx2/PCSX2.rc +++ b/pcsx2/PCSX2.rc @@ -29,14 +29,14 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "resource.h\r\n" "SysForwardDefs.h\r\n" "svnrev.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" @@ -54,7 +54,7 @@ END VS_VERSION_INFO VERSIONINFO #if PCSX2_isReleaseVersion == false && GIT_TAGGED_COMMIT && defined(GIT_TAG_HI) - FILEVERSION GIT_TAG_HI, GIT_TAG_MID, GIT_TAG_LO, 0 + FILEVERSION GIT_TAG_HI, GIT_TAG_MID, GIT_TAG_LO, 0 PRODUCTVERSION GIT_TAG_HI, GIT_TAG_MID, GIT_TAG_LO, 0 #else FILEVERSION VER_FILE_VERSION @@ -114,7 +114,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK // TEXTINCLUDE // -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\r\n" "\0" diff --git a/pcsx2/PINE.h b/pcsx2/PINE.h index 2cf61dc401..7798ce5bbd 100644 --- a/pcsx2/PINE.h +++ b/pcsx2/PINE.h @@ -13,7 +13,7 @@ * If not, see . */ -/* A reference client implementation for interfacing with PINE is available +/* A reference client implementation for interfacing with PINE is available * here: https://code.govanify.com/govanify/pine/ */ #pragma once @@ -84,10 +84,10 @@ protected: char* m_ipc_buffer; /** - * IPC Command messages opcodes. - * A list of possible operations possible by the IPC. + * IPC Command messages opcodes. + * A list of possible operations possible by the IPC. * Each one of them is what we call an "opcode" and is the first - * byte sent by the IPC to differentiate between commands. + * byte sent by the IPC to differentiate between commands. */ enum IPCCommand : unsigned char { @@ -122,7 +122,7 @@ protected: }; /** - * IPC message buffer. + * IPC message buffer. * A list of all needed fields to store an IPC message. */ struct IPCBuffer @@ -154,14 +154,14 @@ protected: * buf: buffer containing the IPC command. * buf_size: size of the buffer announced. * ret_buffer: buffer that will be used to send the reply. - * return value: IPCBuffer containing a buffer with the result - * of the command and its size. + * return value: IPCBuffer containing a buffer with the result + * of the command and its size. */ IPCBuffer ParseCommand(char* buf, char* ret_buffer, u32 buf_size); /** * Formats an IPC buffer - * ret_buffer: return buffer to use. + * ret_buffer: return buffer to use. * size: size of the IPC buffer. * return value: buffer containing the status code allocated of size */ @@ -170,17 +170,17 @@ protected: /** * Initializes an open socket for IPC communication. - * return value: -1 if a fatal failure happened, 0 otherwise. + * return value: -1 if a fatal failure happened, 0 otherwise. */ int StartSocket(); /** - * Converts an uint to an char* in little endian - * res_array: the array to modify + * Converts an uint to an char* in little endian + * res_array: the array to modify * res: the value to convert - * i: when to insert it into the array - * return value: res_array - * NB: implicitely inlined + * i: when to insert it into the array + * return value: res_array + * NB: implicitely inlined */ template static char* ToArray(char* res_array, T res, int i) @@ -190,11 +190,11 @@ protected: } /** - * Converts a char* to an uint in little endian + * Converts a char* to an uint in little endian * arr: the array to convert - * i: when to load it from the array - * return value: the converted value - * NB: implicitely inlined + * i: when to load it from the array + * return value: the converted value + * NB: implicitely inlined */ template static T FromArray(char* arr, int i) diff --git a/pcsx2/Patch.h b/pcsx2/Patch.h index 5707097687..f4d21701ff 100644 --- a/pcsx2/Patch.h +++ b/pcsx2/Patch.h @@ -67,7 +67,7 @@ enum patch_data_type { // PCSX2 currently supports the following values: // 0 - apply the patch line once on game boot/startup // 1 - apply the patch line continuously (technically - on every vsync) -// 2 - effect of 0 and 1 combined, see below +// 2 - effect of 0 and 1 combined, see below // Note: // - while it may seem that a value of 1 does the same as 0, but also later // continues to apply the patch on every vsync - it's not. @@ -76,7 +76,7 @@ enum patch_data_type { // will get applied before the first vsync and therefore earlier than 1 patches. // - There's no "place" value which indicates to apply both once on startup // and then also continuously, however such behavior can be achieved by -// duplicating the line where one has a 0 place and the other has a 1 place. +// duplicating the line where one has a 0 place and the other has a 1 place. enum patch_place_type { PPT_ONCE_ON_LOAD = 0, PPT_CONTINUOUSLY = 1, diff --git a/pcsx2/PrecompiledHeader.h b/pcsx2/PrecompiledHeader.h index bc1921f52c..6ab8a543f9 100644 --- a/pcsx2/PrecompiledHeader.h +++ b/pcsx2/PrecompiledHeader.h @@ -100,7 +100,7 @@ typedef void FnType_Void(); typedef FnType_Void* Fnptr_Void; // -------------------------------------------------------------------------------------- -// Compiler/OS specific macros and defines +// Compiler/OS specific macros and defines // -------------------------------------------------------------------------------------- #if defined(_MSC_VER) diff --git a/pcsx2/R3000A.h b/pcsx2/R3000A.h index 40d664a720..8d8cb34808 100644 --- a/pcsx2/R3000A.h +++ b/pcsx2/R3000A.h @@ -187,7 +187,7 @@ struct R3000Acpu { s32 (*ExecuteBlock)( s32 eeCycles ); // executes the given number of EE cycles. void (*Clear)(u32 Addr, u32 Size); void (*Shutdown)(); - + uint (*GetCacheReserve)(); void (*SetCacheReserve)( uint reserveInMegs ); }; diff --git a/pcsx2/R3000AInterpreter.cpp b/pcsx2/R3000AInterpreter.cpp index 2a6c96e075..86877b92be 100644 --- a/pcsx2/R3000AInterpreter.cpp +++ b/pcsx2/R3000AInterpreter.cpp @@ -187,7 +187,7 @@ void psxCheckMemcheck() int needed = psxIsMemcheckNeeded(pc); if (needed == 0) return; - + u32 op = iopMemRead32(needed == 2 ? pc + 4 : pc); // Yeah, we use the R5900 opcode table for the R3000 const R5900::OPCODE& opcode = R5900::GetInstruction(op); diff --git a/pcsx2/R3000AOpcodeTables.cpp b/pcsx2/R3000AOpcodeTables.cpp index dc9174a88f..bfebcb50c8 100644 --- a/pcsx2/R3000AOpcodeTables.cpp +++ b/pcsx2/R3000AOpcodeTables.cpp @@ -381,7 +381,7 @@ void (*psxCP2[64])() = { gteDPCS , gteINTPL, gteMVMVA, gteNCDS, gteCDP , psxNULL , gteNCDT , psxNULL, // 10 psxNULL , psxNULL , psxNULL , gteNCCS, gteCC , psxNULL , gteNCS , psxNULL, // 18 gteNCT , psxNULL , psxNULL , psxNULL, psxNULL, psxNULL , psxNULL , psxNULL, // 20 - gteSQR , gteDCPL , gteDPCT , psxNULL, psxNULL, gteAVSZ3, gteAVSZ4, psxNULL, // 28 + gteSQR , gteDCPL , gteDPCT , psxNULL, psxNULL, gteAVSZ3, gteAVSZ4, psxNULL, // 28 gteRTPT , psxNULL , psxNULL , psxNULL, psxNULL, psxNULL , psxNULL , psxNULL, // 30 psxNULL , psxNULL , psxNULL , psxNULL, psxNULL, gteGPF , gteGPL , gteNCCT // 38 }; diff --git a/pcsx2/R5900.cpp b/pcsx2/R5900.cpp index 785ff68573..c6441eacf0 100644 --- a/pcsx2/R5900.cpp +++ b/pcsx2/R5900.cpp @@ -255,7 +255,7 @@ __fi int cpuGetCycles(int interrupt) const int cycles = (cpuRegs.sCycle[interrupt] + cpuRegs.eCycle[interrupt]) - cpuRegs.cycle; return std::max(1, cycles); } - + } // tests the cpu cycle against the given start and delta values. @@ -768,7 +768,7 @@ void eeloadHook2() Console.WriteLn("eeloadHook2: arg block is '%s'.", (char *)PSM(g_osdsys_str)); #endif int argc = ParseArgumentString(g_osdsys_str); - + // Back up 4 bytes from start of args block for every arg + 4 bytes for start of argv pointer block, write pointers uptr block_start = g_osdsys_str - (argc * 4); for (int a = 0; a < argc; a++) @@ -791,12 +791,12 @@ inline bool isBranchOrJump(u32 addr) { u32 op = memRead32(addr); const OPCODE& opcode = GetInstruction(op); - + // Return false for eret & syscall as they are branch type in pcsx2 debugging tools, // but shouldn't have delay slot in isBreakpointNeeded/isMemcheckNeeded. if ((opcode.flags == (IS_BRANCH | BRANCHTYPE_SYSCALL)) || (opcode.flags == (IS_BRANCH | BRANCHTYPE_ERET))) return false; - + return (opcode.flags & IS_BRANCH) != 0; } @@ -821,7 +821,7 @@ int isMemcheckNeeded(u32 pc) { if (CBreakPoints::GetNumMemchecks() == 0) return 0; - + u32 addr = pc; if (isBranchOrJump(addr)) addr += 4; diff --git a/pcsx2/R5900.h b/pcsx2/R5900.h index 4de17e5f97..0c10be915b 100644 --- a/pcsx2/R5900.h +++ b/pcsx2/R5900.h @@ -294,7 +294,7 @@ struct R5900cpu // the virtual cpu provider. Allocating additional heap memory from this method is // NOT recommended. Heap allocations should be performed by Reset only. This // maximizes the likeliness of reservations claiming addresses they prefer. - // + // // Thread Affinity: // Called from the main/UI thread only. Cpu execution status is guaranteed to // be inactive. No locking is necessary. @@ -344,7 +344,7 @@ struct R5900cpu // call to return at the nearest state check (typically handled internally using // either C++ exceptions or setjmp/longjmp). // - // Exception Throws: + // Exception Throws: // Throws BaseR5900Exception and all derivatives. // Throws FileNotFound or other Streaming errors (typically related to BIOS MEC/NVM) // @@ -358,7 +358,7 @@ struct R5900cpu // Safely throws host exceptions from executing code (either recompiled or interpreted). // If this function is called outside the context of the CPU's code execution, then the // given exception will be re-thrown automatically. - // + // // Exception Throws: // (SEH) Rethrows the given exception immediately. // (setjmp) Re-throws immediately if called from outside the context of dynamically @@ -382,7 +382,7 @@ struct R5900cpu // doesn't matter if we're stripping it out soon. ;) // void (*Clear)(u32 Addr, u32 Size); - + uint (*GetCacheReserve)(); void (*SetCacheReserve)( uint reserveInMegs ); }; @@ -411,7 +411,7 @@ enum EE_EventType DMAC_STALL_SIS = 13, // SIS DMAC_MFIFO_EMPTY = 14, // MEIS DMAC_BUS_ERROR = 15, // BEIS - + DMAC_GIF_UNIT, VIF_VU0_FINISH, VIF_VU1_FINISH, diff --git a/pcsx2/R5900Exceptions.h b/pcsx2/R5900Exceptions.h index d3b0ed36c6..d5048a2f2d 100644 --- a/pcsx2/R5900Exceptions.h +++ b/pcsx2/R5900Exceptions.h @@ -138,7 +138,7 @@ namespace R5900Exception class DebugBreakpoint : public BaseR5900Exception { DEFINE_EXCEPTION_COPYTORS(DebugBreakpoint, BaseR5900Exception) - + public: explicit DebugBreakpoint() { diff --git a/pcsx2/R5900OpcodeImpl.cpp b/pcsx2/R5900OpcodeImpl.cpp index 01206839d1..4622cf6a74 100644 --- a/pcsx2/R5900OpcodeImpl.cpp +++ b/pcsx2/R5900OpcodeImpl.cpp @@ -64,7 +64,7 @@ static __fi bool _add32_Overflow( s32 x, s32 y, s64 &ret ) cpuException(0x30, cpuRegs.branch); return true; } - + ret = result.SD[0]; return false; @@ -201,7 +201,7 @@ static int __Deci2Call(int call, u32 *addr) sprintf( reqaddr, "%x %x %x %x", addr[3], addr[2], addr[1], addr[0] ); if (!deci2addr) return 1; - + const u32* d2ptr = (u32*)PSM(deci2addr); BIOS_LOG("deci2reqsend: %s: deci2addr: %x,%x,%x,buf=%x %x,%x,len=%x,%x", @@ -952,7 +952,7 @@ void SYSCALL() { u32 memaddr = cpuRegs.GPR.n.a0.UL[0]; u8 params[16]; - + cdvdReadLanguageParams(params); u32 osdconf = 0; @@ -1082,7 +1082,7 @@ void SYSCALL() // Pretty much what this does is find instances of string arguments and remaps them. // Instead of the addresse(s) being relative to the PS2 address space, make them relative to program memory. - // (This fixes issue #2865) + // (This fixes issue #2865) int curRegArg = 0; for (int i = 0; 1; i++) { @@ -1113,7 +1113,7 @@ void SYSCALL() } break; } - + default: break; diff --git a/pcsx2/R5900OpcodeTables.cpp b/pcsx2/R5900OpcodeTables.cpp index 8a9e78b772..08c79d1387 100644 --- a/pcsx2/R5900OpcodeTables.cpp +++ b/pcsx2/R5900OpcodeTables.cpp @@ -626,7 +626,7 @@ namespace R5900 const OPCODE& Class_SPECIAL(u32 op) { return tbl_Special[op & 0x3F]; } const OPCODE& Class_REGIMM(u32 op) { return tbl_RegImm[(op >> 16) & 0x1F]; } - + const OPCODE& Class_MMI(u32 op) { return tbl_MMI[op & 0x3F]; } const OPCODE& Class_MMI0(u32 op) { return tbl_MMI0[(op >> 6) & 0x1F]; } const OPCODE& Class_MMI1(u32 op) { return tbl_MMI1[(op >> 6) & 0x1F]; } diff --git a/pcsx2/RDebug/deci2.txt b/pcsx2/RDebug/deci2.txt index cec342f166..61f52c6a09 100644 --- a/pcsx2/RDebug/deci2.txt +++ b/pcsx2/RDebug/deci2.txt @@ -1,4 +1,4 @@ -pcsx2 log->debugger tty mapping +pcsx2 log->debugger tty mapping ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÑÍÍÑÍÍÍÄÄÄÂÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ Bios ³EE³ 0 ³IOP³ Bios ³ CPU & MMI & COP0 & FPU ³EE³ 1 ³IOP³ IOP cpu ³ diff --git a/pcsx2/Recording/InputRecordingControls.h b/pcsx2/Recording/InputRecordingControls.h index c7681b9174..bacff89e20 100644 --- a/pcsx2/Recording/InputRecordingControls.h +++ b/pcsx2/Recording/InputRecordingControls.h @@ -91,7 +91,7 @@ private: bool frameLock = false; // The frame value to use as the frame lock reset point u32 frameLockTracker = 0; - + bool IsFinishedReplaying() const; // Calls mainEmuFrame's videoCaptureToggle to end a capture if active void StopCapture() const; diff --git a/pcsx2/Recording/VirtualPad/VirtualPad.cpp b/pcsx2/Recording/VirtualPad/VirtualPad.cpp index fc24642387..1979f38642 100644 --- a/pcsx2/Recording/VirtualPad/VirtualPad.cpp +++ b/pcsx2/Recording/VirtualPad/VirtualPad.cpp @@ -93,7 +93,7 @@ VirtualPad::VirtualPad(wxWindow* parent, int controllerPort, AppConfig::InputRec InitPressureButtonGuiElements(virtualPadData.cross, NewBitmap(EmbeddedImage().Get(), wxPoint(938, 369)), this, wxPoint(1055, 645)); InitPressureButtonGuiElements(virtualPadData.left, NewBitmap(EmbeddedImage().Get(), wxPoint(110, 303)), this, wxPoint(175, 525), true); - InitPressureButtonGuiElements(virtualPadData.up, NewBitmap(EmbeddedImage().Get(), wxPoint(186, 227)), this, wxPoint(175, 565), true); + InitPressureButtonGuiElements(virtualPadData.up, NewBitmap(EmbeddedImage().Get(), wxPoint(186, 227)), this, wxPoint(175, 565), true); InitPressureButtonGuiElements(virtualPadData.right, NewBitmap(EmbeddedImage().Get(), wxPoint(248, 302)), this, wxPoint(175, 605), true); InitPressureButtonGuiElements(virtualPadData.down, NewBitmap(EmbeddedImage().Get(), wxPoint(186, 359)), this, wxPoint(175, 645), true); diff --git a/pcsx2/Reference/PS2-MemoryCardFileSystem.htm b/pcsx2/Reference/PS2-MemoryCardFileSystem.htm index ab70426b36..5a2d9129e2 100644 --- a/pcsx2/Reference/PS2-MemoryCardFileSystem.htm +++ b/pcsx2/Reference/PS2-MemoryCardFileSystem.htm @@ -9,7 +9,7 @@ PlayStation 2 Memory Card File System PlayStation 2 Memory Card File System
-

By +

By Ross Ridge @@ -27,7 +27,7 @@ missing, misleading or just plain wrong. At lot of assumptions had to be made during my research, and it's hard know to what exactly Sony intended in every case. All most all of the names for structures, fields and flags were made up by me. Nothing in this document should -be considered official. +be considered official.

For brevity, unused fields and flag bits are omitted from the tables. @@ -56,7 +56,7 @@ memory cards, so I've created short glossary.

See "erase block".
cluster
-
The unit of allocation used in the file system. A cluster +
The unit of allocation used in the file system. A cluster is one or more pages in size.
ECC
@@ -140,7 +140,7 @@ about the structure of the file system is kept. data area a spare area. The data area is used to store ordinary data, while the much smaller spare area is for software defined error-correcting codes (ECC), wear leveling, bad block remapping, - and other functions meant to deal with defects in the media. + and other functions meant to deal with defects in the media.

The flash devices used in PS2 memory cards have a 528 byte page @@ -150,7 +150,7 @@ about the structure of the file system is kept. The are 16384 pages, for a total combined raw data area capacity 8,388,608 bytes.

- +

File System Organization

@@ -327,7 +327,7 @@ in the FAT and directory entries are relative to this. alloc_end word 8135 -The cluster after the highest allocatable cluster. Relative to +The cluster after the highest allocatable cluster. Relative to alloc_offset.
Not used. @@ -337,7 +337,7 @@ in the FAT and directory entries are relative to this. rootdir_cluster word 0 -First cluster of the root directory. Relative to +First cluster of the root directory. Relative to alloc_offset.
Must be zero. @@ -476,9 +476,9 @@ if that block was found to be bad. FAT might look something like this:

-fat_offset = fat_index % 256 +fat_offset = fat_index % 256
-indirect_index = fat_index / 256 +indirect_index = fat_index / 256
indirect_offset = indirect_index % 256
@@ -616,28 +616,28 @@ If this flag is clear, then the file or directory has been deleted. 0x00 mode -half +half See directory mode table.
0x04 length -word +word Length in bytes if a file, or entries if a directory.
0x08 created -byte[8] +byte[8] Creation time.
0x10 cluster -word +word First cluster of the file, or 0xFFFFFFFF for an empty file. In "." entries this the first cluster of this directory's parent directory instead. @@ -647,7 +647,7 @@ Relative to alloc_offset. 0x14 dir_entry -word +word Only in "." entries. Entry of this directory in its parent's directory.
@@ -655,21 +655,21 @@ in its parent's directory. 0x18 modified -byte[8] +byte[8] Modification time.
0x20 attr -word +word User defined attribute
0x40 name -byte[32] +byte[32] Zero terminated name for this directory entry.
@@ -698,7 +698,7 @@ in its parent's directory. cluster field which isn't used.

-
+
@@ -754,7 +754,7 @@ in its parent's directory. like the PS2 browser. The DF_PSX flag indicates that file was copied from a PSX memory card. If the DF_POCKETSTN flag is set as well, the file is a PocketStation application file copied - from a PocketStation. + from a PocketStation.

Each directory entry is a massive 512 bytes long, so only two @@ -772,7 +772,7 @@ in its parent's directory.

Error Management

A number of strategies are employed in the file system to handle - errors are likely to occur when using memory cards. + errors are likely to occur when using memory cards.

@@ -858,7 +858,7 @@ in its parent's directory.

NAND Flash Memory

-Micron: NAND Flash 101: An Introduction to NAND Flash and How to Design It In +Micron: NAND Flash 101: An Introduction to NAND Flash and How to Design It In to Your Next Product
Wikipedia: Flash memory
diff --git a/pcsx2/SPU2/Windows/SPU2.rc b/pcsx2/SPU2/Windows/SPU2.rc index 7354bb94c5..829c66854a 100644 --- a/pcsx2/SPU2/Windows/SPU2.rc +++ b/pcsx2/SPU2/Windows/SPU2.rc @@ -228,18 +228,18 @@ LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#include ""svnrev.h""\r\n" "#include ""afxresmw.h""\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\0" END diff --git a/pcsx2/SPU2/spu2sys.cpp b/pcsx2/SPU2/spu2sys.cpp index ea1f83a893..334966c72c 100644 --- a/pcsx2/SPU2/spu2sys.cpp +++ b/pcsx2/SPU2/spu2sys.cpp @@ -1232,7 +1232,7 @@ static void RegWrite_VoiceAddr(u16 value) LoopReg = &thisvoice.LoopStartA; thisvoice.LoopMode = 1; } - + *LoopReg = (*LoopReg & 0x0F0000) | (value & 0xFFF8); } break; diff --git a/pcsx2/SaveState.cpp b/pcsx2/SaveState.cpp index e7981ac717..1e220671af 100644 --- a/pcsx2/SaveState.cpp +++ b/pcsx2/SaveState.cpp @@ -189,12 +189,12 @@ SaveStateBase& SaveStateBase::FreezeBios() // Check the BIOS, and issue a warning if the bios for this state // doesn't match the bios currently being used (chances are it'll still // work fine, but some games are very picky). - + u32 bioscheck = BiosChecksum; char biosdesc[256]; memzero( biosdesc ); memcpy( biosdesc, BiosDescription.c_str(), std::min( sizeof(biosdesc), BiosDescription.length() ) ); - + Freeze( bioscheck ); Freeze( biosdesc ); @@ -209,7 +209,7 @@ SaveStateBase& SaveStateBase::FreezeBios() biosdesc, bioscheck ); } - + return *this; } @@ -217,7 +217,7 @@ SaveStateBase& SaveStateBase::FreezeInternals() { // Print this until the MTVU problem in gifPathFreeze is taken care of (rama) if (THREAD_VU1) Console.Warning("MTVU speedhack is enabled, saved states may not be stable"); - + // Second Block - Various CPU Registers and States // ----------------------------------------------- FreezeTag( "cpuRegs" ); diff --git a/pcsx2/SaveState.h b/pcsx2/SaveState.h index 37c0d68f0a..29c00fd3ff 100644 --- a/pcsx2/SaveState.h +++ b/pcsx2/SaveState.h @@ -127,7 +127,7 @@ public: { return m_memory->GetPtr(m_idx); } - + u8* GetPtrEnd() const { return m_memory->GetPtrEnd(); diff --git a/pcsx2/Sif0.cpp b/pcsx2/Sif0.cpp index 51915e5d94..d8cd41e6cf 100644 --- a/pcsx2/Sif0.cpp +++ b/pcsx2/Sif0.cpp @@ -85,7 +85,7 @@ static __fi bool WriteIOPtoFifo() sif0.iop.cycles += writeSize; //1 word per cycle sif0.iop.counter -= writeSize; - + return true; } @@ -366,13 +366,13 @@ __fi void dmaSIF0() psHu32(SBUS_F240) |= 0x2000; sif0.ee.busy = true; - // Okay, this here is needed currently (r3644). + // Okay, this here is needed currently (r3644). // FFX battles in the thunder plains map die otherwise, Phantasy Star 4 as well // These 2 games could be made playable again by increasing the time the EE or the IOP run, // showing that this is very timing sensible. // Doing this DMA unfortunately brings back an old warning in Legend of Legaia though, but it still works. - //Updated 23/08/2011: The hangs are caused by the EE suspending SIF1 DMA and restarting it when in the middle + //Updated 23/08/2011: The hangs are caused by the EE suspending SIF1 DMA and restarting it when in the middle //of processing a "REFE" tag, so the hangs can be solved by forcing the ee.end to be false // (as it should always be at the beginning of a DMA). using "if iop is busy" flags breaks Tom Clancy Rainbow Six. // Legend of Legaia doesn't throw a warning either :) diff --git a/pcsx2/Sif1.cpp b/pcsx2/Sif1.cpp index b0cf750489..4c3625d1ae 100644 --- a/pcsx2/Sif1.cpp +++ b/pcsx2/Sif1.cpp @@ -128,7 +128,7 @@ static __fi bool SIFIOPReadTag() // Only use the first 24 bits. hw_dma10.madr = sif1data & 0xffffff; - + if (sif1words > 0xFFFFC) DevCon.Warning("SIF1 Overrun %x", sif1words); //Maximum transfer amount 1mb-16 also masking out top part which is a "Mode" cache stuff, we don't care :) sif1.iop.counter = sif1words & 0xFFFFC; @@ -342,13 +342,13 @@ __fi void dmaSIF1() sif1.ee.busy = true; - // Okay, this here is needed currently (r3644). + // Okay, this here is needed currently (r3644). // FFX battles in the thunder plains map die otherwise, Phantasy Star 4 as well // These 2 games could be made playable again by increasing the time the EE or the IOP run, // showing that this is very timing sensible. // Doing this DMA unfortunately brings back an old warning in Legend of Legaia though, but it still works. - //Updated 23/08/2011: The hangs are caused by the EE suspending SIF1 DMA and restarting it when in the middle + //Updated 23/08/2011: The hangs are caused by the EE suspending SIF1 DMA and restarting it when in the middle //of processing a "REFE" tag, so the hangs can be solved by forcing the ee.end to be false // (as it should always be at the beginning of a DMA). using "if iop is busy" flags breaks Tom Clancy Rainbow Six. // Legend of Legaia doesn't throw a warning either :) @@ -360,7 +360,7 @@ __fi void dmaSIF1() { sif1.ee.end = true; } - } + } SIF1Dma(); diff --git a/pcsx2/Sio.cpp b/pcsx2/Sio.cpp index 6c0c2e686b..62fb30a96b 100644 --- a/pcsx2/Sio.cpp +++ b/pcsx2/Sio.cpp @@ -52,7 +52,7 @@ static const u8 memcard_psx[] = {0x5A, 0x5D, 0x5C, 0x5D, 0x04, 0x00, 0x00, 0x80} //(A 'try' in this context is the game accessing SIO) static const int FORCED_MCD_EJECTION_MIN_TRIES =2; static const int FORCED_MCD_EJECTION_MAX_TRIES =128; -static const float FORCED_MCD_EJECTION_MAX_MS_AFTER_MIN_TRIES =2800; +static const float FORCED_MCD_EJECTION_MAX_MS_AFTER_MIN_TRIES =2800; //allow timeout also for the mcd manager panel void SetForceMcdEjectTimeoutNow( uint port, uint slot ) @@ -95,7 +95,7 @@ void sioInit() sio.bufSize = 4; siomode = SIO_START; - + for(int i = 0; i < 2; i++) { for(int j = 0; j < 4; j++) @@ -155,7 +155,7 @@ SIO_WRITE sioWriteStart(u8 data) //if(size1 != size2) // DevCon.Warning("SIO: Bad command length [%02X] (%02X|%02X)", data, size1, size2); - + // On mismatch, sio2.cmdlength (size1) is smaller than what it should (Persona 3) // while size2 is the proper length. -KrossX sio.bufSize = size2; //std::max(size1, size2); @@ -325,7 +325,7 @@ SIO_WRITE memcardAuth(u8 data) { switch(data) { - case 0x01: case 0x02: case 0x04: + case 0x01: case 0x02: case 0x04: case 0x0F: case 0x11: case 0x13: doXorCheck = true; xorResult = 0; @@ -358,7 +358,7 @@ SIO_WRITE memcardErase(u8 data) if(data != 0x81) sio.bufCount = -1; break; - case 1: + case 1: { u8 header[] = {0xFF, 0xFF, 0xFF, 0x2B, mcd->term}; @@ -407,7 +407,7 @@ SIO_WRITE memcardWrite(u8 data) if(data != 0x81) sio.bufCount = -1; break; - case 1: + case 1: { u8 header[] = {0xFF, 0xFF, 0xFF, 0x2B, mcd->term}; @@ -464,7 +464,7 @@ SIO_WRITE memcardWrite(u8 data) else if(sio.bufCount == checksum_pos) { u8 xor_check = mcd->DoXor(&sio.buf[4], checksum_pos - 4); - + if(xor_check != sio.buf[sio.bufCount]) Console.Warning("MemWrite: Checksum invalid! XOR: %02X, IN: %02X\n", xor_check, sio.buf[sio.bufCount]); @@ -498,7 +498,7 @@ SIO_WRITE memcardRead(u8 data) if(data != 0x81) sio.bufCount = -1; break; - case 1: + case 1: { u8 header[] = {0xFF, 0xFF, 0xFF, 0x2B, mcd->term}; @@ -563,7 +563,7 @@ SIO_WRITE memcardRead(u8 data) SIO_WRITE memcardSector(u8 data) { static u8 xor_check = 0; - + switch(sio.bufCount) { case 2: mcd->sectorAddr = data << 0; xor_check = data; break; @@ -604,7 +604,7 @@ SIO_WRITE memcardInit() forceEject = true; u32 numTimesAccessed = FORCED_MCD_EJECTION_MAX_TRIES - mcd->ForceEjection_Timeout; - + //minimum tries reached. start counting millisec timeout. if(numTimesAccessed == FORCED_MCD_EJECTION_MIN_TRIES) mcd->ForceEjection_Timestamp = Common::Timer::GetCurrentValue(); @@ -621,7 +621,7 @@ SIO_WRITE memcardInit() if(mcd->ForceEjection_Timeout == 0 && mcd->IsPresent()) Console.WriteLn( Color_Green, "Re-inserting auto-ejected memcard [port:%d, slot:%d]", sio.GetPort(), sio.GetSlot()); } - + if(!forceEject && mcd->IsPresent()) { DEVICE_PLUGGED(); @@ -633,7 +633,7 @@ SIO_WRITE memcardInit() siomode = SIO_DUMMY; } - + } SIO_WRITE sioWriteMemcard(u8 data) diff --git a/pcsx2/Sio.h b/pcsx2/Sio.h index 8de55d7be4..caa632fac6 100644 --- a/pcsx2/Sio.h +++ b/pcsx2/Sio.h @@ -26,8 +26,8 @@ struct _mcd u32 transferAddr; // Transfer address u8 FLAG; // for PSX; - - u8 port; // port + + u8 port; // port u8 slot; // and slot for this memcard // Auto Eject @@ -50,13 +50,13 @@ struct _mcd } // Read from memorycard to dest - void Read(u8 *dest, int size) + void Read(u8 *dest, int size) { FileMcd_Read(port, slot, dest, transferAddr, size); } // Write to memorycard from src - void Write(u8 *src, int size) + void Write(u8 *src, int size) { FileMcd_Save(port, slot, src,transferAddr, size); } diff --git a/pcsx2/System.cpp b/pcsx2/System.cpp index b7de4fd681..541b8fa0c4 100644 --- a/pcsx2/System.cpp +++ b/pcsx2/System.cpp @@ -148,7 +148,7 @@ void SysLogMachineCaps() if (GIT_TAGGED_COMMIT) // Nightly builds { // tagged commit - more modern implementation of dev build versioning - // - there is no need to include the commit - that is associated with the tag, + // - there is no need to include the commit - that is associated with the tag, // - git is implied and the tag is timestamped Console.WriteLn(Color_StrongGreen, "PCSX2 Nightly - %s Compiled on %s", GIT_TAG, __DATE__); } else { diff --git a/pcsx2/USB/Win32/USBDialog.rc b/pcsx2/USB/Win32/USBDialog.rc index a3019dd344..46ae18a270 100644 --- a/pcsx2/USB/Win32/USBDialog.rc +++ b/pcsx2/USB/Win32/USBDialog.rc @@ -170,18 +170,18 @@ LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_ARGENTINA // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "resource_usb.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#include ""WinResrc.h""\r\n" "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\r\n" "\0" diff --git a/pcsx2/USB/Win32/resource_usb.h b/pcsx2/USB/Win32/resource_usb.h index ead84d2ceb..5368e9d6ae 100644 --- a/pcsx2/USB/Win32/resource_usb.h +++ b/pcsx2/USB/Win32/resource_usb.h @@ -30,7 +30,7 @@ #define IDC_STATIC_USB -1 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 109 diff --git a/pcsx2/USB/configuration.cpp b/pcsx2/USB/configuration.cpp index ec4e6d63fe..c40efe6230 100644 --- a/pcsx2/USB/configuration.cpp +++ b/pcsx2/USB/configuration.cpp @@ -54,7 +54,7 @@ void USBsetLogDir(const char* dir) std::string GetSelectedAPI(const std::pair& pair) { - USBsetSettingsDir(); + USBsetSettingsDir(); auto it = changedAPIs.find(pair); if (it != changedAPIs.end()) return it->second; @@ -71,7 +71,7 @@ int GetSelectedSubtype(const std::pair& pair) bool LoadSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TCHAR* param, TSTDSTRING& value) { - USBsetSettingsDir(); + USBsetSettingsDir(); CIniKey* key; #ifdef _WIN32 auto sect = ciniFile.GetSection(section); @@ -93,7 +93,7 @@ bool LoadSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TC bool LoadSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TCHAR* param, int32_t& value) { - USBsetSettingsDir(); + USBsetSettingsDir(); CIniKey* key; #ifdef _WIN32 auto sect = ciniFile.GetSection(section); @@ -124,7 +124,7 @@ bool LoadSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TC bool SaveSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TCHAR* param, const TSTDSTRING& value) { - USBsetSettingsDir(); + USBsetSettingsDir(); #ifdef _WIN32 ciniFile.SetKeyValue(section, param, value); #else @@ -135,7 +135,7 @@ bool SaveSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TC bool SaveSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TCHAR* param, int32_t value) { - USBsetSettingsDir(); + USBsetSettingsDir(); #ifdef _WIN32 ciniFile.SetKeyValue(section, param, TSTDTOSTRING(value)); #else @@ -146,7 +146,7 @@ bool SaveSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TC void SaveConfig() { - USBsetSettingsDir(); + USBsetSettingsDir(); #ifdef _WIN32 SaveSetting(L"MAIN", L"log", conf.Log); #else @@ -260,7 +260,7 @@ void ClearSection(const TCHAR* section) void RemoveSection(const char* dev_type, int port, const std::string& key) { - USBsetSettingsDir(); + USBsetSettingsDir(); TSTDSTRING tkey; tkey.assign(key.begin(), key.end()); diff --git a/pcsx2/USB/icon_buzz_24.cpp b/pcsx2/USB/icon_buzz_24.cpp index f192ca68df..d173263ae7 100644 --- a/pcsx2/USB/icon_buzz_24.cpp +++ b/pcsx2/USB/icon_buzz_24.cpp @@ -15,7 +15,7 @@ // clang-format off #include "icon_buzz_24.h" -const unsigned char icon_buzz_24[] +const unsigned char icon_buzz_24[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/pcsx2/USB/qemu-usb/glib.cpp b/pcsx2/USB/qemu-usb/glib.cpp index 8829257c11..222fbd94a2 100644 --- a/pcsx2/USB/qemu-usb/glib.cpp +++ b/pcsx2/USB/qemu-usb/glib.cpp @@ -23,10 +23,10 @@ /** * g_malloc: * @n_bytes: the number of bytes to allocate - * + * * Allocates @n_bytes bytes of memory. * If @n_bytes is 0 it returns %NULL. - * + * * Returns: a pointer to the allocated memory */ void* my_g_malloc(size_t n_bytes) @@ -51,10 +51,10 @@ void* my_g_malloc(size_t n_bytes) /** * g_malloc0: * @n_bytes: the number of bytes to allocate - * + * * Allocates @n_bytes bytes of memory, initialized to 0's. * If @n_bytes is 0 it returns %NULL. - * + * * Returns: a pointer to the allocated memory */ void* my_g_malloc0(size_t n_bytes) @@ -80,10 +80,10 @@ void* my_g_malloc0(size_t n_bytes) * g_malloc_n: * @n_blocks: the number of blocks to allocate * @n_block_bytes: the size of each block in bytes - * + * * This function is similar to g_malloc(), allocating (@n_blocks * @n_block_bytes) bytes, * but care is taken to detect possible overflow during multiplication. - * + * * Since: 2.24 * Returns: a pointer to the allocated memory */ @@ -103,13 +103,13 @@ void* my_g_malloc_n(size_t n_blocks, * g_realloc: * @mem: (nullable): the memory to reallocate * @n_bytes: new size of the memory in bytes - * + * * Reallocates the memory pointed to by @mem, so that it now has space for * @n_bytes bytes of memory. It returns the new address of the memory, which may * have been moved. @mem may be %NULL, in which case it's considered to * have zero-length. @n_bytes may be 0, in which case %NULL will be returned * and @mem will be freed unless it is %NULL. - * + * * Returns: the new address of the allocated memory */ void* my_g_realloc(void* mem, @@ -139,10 +139,10 @@ void* my_g_realloc(void* mem, * @mem: (nullable): the memory to reallocate * @n_blocks: the number of blocks to allocate * @n_block_bytes: the size of each block in bytes - * + * * This function is similar to g_realloc(), allocating (@n_blocks * @n_block_bytes) bytes, * but care is taken to detect possible overflow during multiplication. - * + * * Since: 2.24 * Returns: the new address of the allocated memory */ diff --git a/pcsx2/USB/qemu-usb/qusb.h b/pcsx2/USB/qemu-usb/qusb.h index afe8081508..53d57af491 100644 --- a/pcsx2/USB/qemu-usb/qusb.h +++ b/pcsx2/USB/qemu-usb/qusb.h @@ -1,8 +1,8 @@ /* * QEMU USB API - * + * * Copyright (c) 2005 Fabrice Bellard - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights diff --git a/pcsx2/USB/qemu-usb/usb-hub.cpp b/pcsx2/USB/qemu-usb/usb-hub.cpp index 8d7c6910db..83d18686ac 100644 --- a/pcsx2/USB/qemu-usb/usb-hub.cpp +++ b/pcsx2/USB/qemu-usb/usb-hub.cpp @@ -2,7 +2,7 @@ * QEMU USB HUB emulation * * Copyright (c) 2005 Fabrice Bellard - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights @@ -114,7 +114,7 @@ static const uint8_t qemu_hub_config_descriptor[] = { 0x01, /* u8 bNumInterfaces; (1) */ 0x01, /* u8 bConfigurationValue; */ 0x00, /* u8 iConfiguration; */ - 0xc0, /* u8 bmAttributes; + 0xc0, /* u8 bmAttributes; Bit 7: must be set, 6: Self-powered, 5: Remote wakeup, diff --git a/pcsx2/USB/qemu-usb/vl.h b/pcsx2/USB/qemu-usb/vl.h index 047adb7ecd..1df9cbcd12 100644 --- a/pcsx2/USB/qemu-usb/vl.h +++ b/pcsx2/USB/qemu-usb/vl.h @@ -1,8 +1,8 @@ /* * QEMU System Emulator header - * + * * Copyright (c) 2003 Fabrice Bellard - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights diff --git a/pcsx2/USB/readerwriterqueue/LICENSE.md b/pcsx2/USB/readerwriterqueue/LICENSE.md index 6d9383648f..ac5127b5e1 100644 --- a/pcsx2/USB/readerwriterqueue/LICENSE.md +++ b/pcsx2/USB/readerwriterqueue/LICENSE.md @@ -5,7 +5,7 @@ license (embedded in atomicops.h). Simplified BSD License: -Copyright (c) 2013-2015, Cameron Desrochers +Copyright (c) 2013-2015, Cameron Desrochers All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/pcsx2/USB/readerwriterqueue/README.md b/pcsx2/USB/readerwriterqueue/README.md index d104b2d1e0..3e4b187045 100644 --- a/pcsx2/USB/readerwriterqueue/README.md +++ b/pcsx2/USB/readerwriterqueue/README.md @@ -50,7 +50,7 @@ int* front = q.peek(); assert(*front == 18); succeeded = q.try_dequeue(number); assert(succeeded && number == 18); -front = q.peek(); +front = q.peek(); assert(front == nullptr); // Returns nullptr if the queue was empty ``` @@ -82,7 +82,7 @@ reader.join(); assert(q.size_approx() == 0); ``` - + Note that `wait_dequeue` will block indefinitely while the queue is empty; this means care must be taken to only call `wait_dequeue` if you're sure another element will come along eventually, or if the queue has a static lifetime. This is because diff --git a/pcsx2/USB/usb-eyetoy/jo_mpeg.cpp b/pcsx2/USB/usb-eyetoy/jo_mpeg.cpp index 7367f1363e..b14d0c73df 100644 --- a/pcsx2/USB/usb-eyetoy/jo_mpeg.cpp +++ b/pcsx2/USB/usb-eyetoy/jo_mpeg.cpp @@ -22,7 +22,7 @@ * Movie players *should* support it as the spec allows it, but ... * * MPEG-1/2 currently has no active patents as far as I am aware. - * + * * http://dvd.sourceforge.net/dvdinfo/mpeghdrs.html * http://www.cs.cornell.edu/dali/api/mpegvideo-c.html * */ diff --git a/pcsx2/USB/usb-hid/usb-buzzer.cpp b/pcsx2/USB/usb-hid/usb-buzzer.cpp index 0adf2139cc..6edfb42146 100644 --- a/pcsx2/USB/usb-hid/usb-buzzer.cpp +++ b/pcsx2/USB/usb-hid/usb-buzzer.cpp @@ -1,8 +1,8 @@ /* * QEMU USB HID devices - * + * * Copyright (c) 2005 Fabrice Bellard - * + * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights @@ -262,7 +262,7 @@ static const uint8_t vk_to_key_code[] = { 0x00, //FAIL: Windows 2000/XP: Browser Forward 0x00, //FAIL: Windows 2000/XP: Browser Refresh 0x00, //FAIL: Windows 2000/XP: Browser Stop -0x00, //FAIL: Windows 2000/XP: Browser Search +0x00, //FAIL: Windows 2000/XP: Browser Search 0x00, //FAIL: Windows 2000/XP: Browser Favorites 0x00, //FAIL: Windows 2000/XP: Browser Start and Home 0x00, //FAIL: Windows 2000/XP: Volume Mute @@ -278,13 +278,13 @@ static const uint8_t vk_to_key_code[] = { 0x00, //FAIL: Windows 2000/XP: Start Application 2 0x00, //FAIL: 0x00 0x00, //FAIL: 0x00 -0x33, //FAIL: Windows 2000/XP: For the US standard keyboard, the ';:' key +0x33, //FAIL: Windows 2000/XP: For the US standard keyboard, the ';:' key 0x2E, //FAIL: Windows 2000/XP: For any country/region, the '+' 0x36, //FAIL: Windows 2000/XP: For any country/region, the ',' 0x2D, //FAIL: Windows 2000/XP: For any country/region, the '-' 0x37, //FAIL: Windows 2000/XP: For any country/region, the '.' -0x38, //FAIL: Windows 2000/XP: For the US standard keyboard, the '/?' key -0x35, //FAIL: Windows 2000/XP: For the US standard keyboard, the '`~' key +0x38, //FAIL: Windows 2000/XP: For the US standard keyboard, the '/?' key +0x35, //FAIL: Windows 2000/XP: For the US standard keyboard, the '`~' key 0x00, //FAIL: 0x00 0x00, //FAIL: 0x00 0x00, //FAIL: 0x00 @@ -344,7 +344,7 @@ static const uint8_t vk_to_key_code[] = { 0x00, //FAIL: Erase EOF 0x00, //FAIL: Play 0x00, //FAIL: Zoom -0x00, //FAIL: Reserved +0x00, //FAIL: Reserved 0x00, //FAIL: PA1 0x9C, //OK: Clear 0x00, //FAIL: 0x00 @@ -486,13 +486,13 @@ static const uint8_t qemu_keyboard_config_descriptor[] = { 0x01, /* u8 bNumInterfaces; (1) */ 0x01, /* u8 bConfigurationValue; */ 0x04, /* u8 iConfiguration; */ - 0xa0, /* u8 bmAttributes; + 0xa0, /* u8 bmAttributes; Bit 7: must be set, 6: Self-powered, 5: Remote wakeup, 4..0: resvd */ 50, /* u8 MaxPower; */ - + /* USB 1.1: * USB 2.0, single TT organization (mandatory): * one interface, protocol 0 @@ -514,7 +514,7 @@ static const uint8_t qemu_keyboard_config_descriptor[] = { 0x01, /* u8 if_bInterfaceSubClass; */ 0x01, /* u8 if_bInterfaceProtocol; [usb1.1 or single tt] */ 0x05, /* u8 if_iInterface; */ - + /* HID descriptor */ 0x09, /* u8 bLength; */ 0x21, /* u8 bDescriptorType; */ @@ -541,13 +541,13 @@ static const uint8_t qemu_tablet_config_descriptor[] = { 0x01, /* u8 bNumInterfaces; (1) */ 0x01, /* u8 bConfigurationValue; */ 0x04, /* u8 iConfiguration; */ - 0xa0, /* u8 bmAttributes; + 0xa0, /* u8 bmAttributes; Bit 7: must be set, 6: Self-powered, 5: Remote wakeup, 4..0: resvd */ 50, /* u8 MaxPower; */ - + /* USB 1.1: * USB 2.0, single TT organization (mandatory): * one interface, protocol 0 @@ -701,12 +701,12 @@ static int usb_keyboard_handle_control(USBDevice *dev, int request, int value, case DeviceRequest | USB_REQ_GET_DESCRIPTOR: switch(value >> 8) { case USB_DT_DEVICE: - memcpy(data, qemu_keyboard_dev_descriptor, + memcpy(data, qemu_keyboard_dev_descriptor, sizeof(qemu_keyboard_dev_descriptor)); ret = sizeof(qemu_keyboard_dev_descriptor); break; case USB_DT_CONFIG: - memcpy(data, qemu_keyboard_config_descriptor, + memcpy(data, qemu_keyboard_config_descriptor, sizeof(qemu_keyboard_config_descriptor)); ret = sizeof(qemu_keyboard_config_descriptor); break; @@ -764,7 +764,7 @@ static int usb_keyboard_handle_control(USBDevice *dev, int request, int value, case InterfaceRequest | USB_REQ_GET_DESCRIPTOR: switch(value >> 8) { case 0x22: - memcpy(data, qemu_keyboard_hid_report_descriptor, + memcpy(data, qemu_keyboard_hid_report_descriptor, sizeof(qemu_keyboard_hid_report_descriptor)); ret = sizeof(qemu_keyboard_hid_report_descriptor); break; @@ -796,7 +796,7 @@ static int usb_keyboard_handle_control(USBDevice *dev, int request, int value, return ret; } -static int usb_keyboard_handle_data(USBDevice *dev, int pid, +static int usb_keyboard_handle_data(USBDevice *dev, int pid, uint8_t devep, uint8_t *data, int len) { USBKeyboardState *s = (USBKeyboardState *)dev; @@ -872,10 +872,10 @@ USBDevice *usb_keyboard_init(void) ovl.OffsetHigh=0; HidD_GetHidGuid(&guid); - + devInfo=SetupDiGetClassDevs(&guid, 0, 0, DIGCF_DEVICEINTERFACE); if(!devInfo)return 0; - + diData.cbSize=sizeof(diData); while(SetupDiEnumDeviceInterfaces(devInfo, 0, &guid, i, &diData)){ @@ -903,7 +903,7 @@ USBDevice *usb_keyboard_init(void) if((attr.VendorID==BUZZER_VID) && (attr.ProductID==BUZZER_PID || attr.ProductID==BUZZER_PID2)){ //We've found our buzzers !!! free(didData); - + memset(buf, 0, 8); buf[2]=0xFF; WriteFile(usb_buzzer, buf, 8, 0, &ovl); diff --git a/pcsx2/USB/usb-hid/usb-hid.cpp b/pcsx2/USB/usb-hid/usb-hid.cpp index ca4e7896f0..ed5895dc7c 100644 --- a/pcsx2/USB/usb-hid/usb-hid.cpp +++ b/pcsx2/USB/usb-hid/usb-hid.cpp @@ -153,7 +153,7 @@ namespace usb_hid 0x01, /* u8 bNumInterfaces; (1) */ 0x01, /* u8 bConfigurationValue; */ 0x04, /* u8 iConfiguration; */ - 0xa0, /* u8 bmAttributes; + 0xa0, /* u8 bmAttributes; Bit 7: must be set, 6: Self-powered, 5: Remote wakeup, @@ -229,7 +229,7 @@ namespace usb_hid 0x01, /* u8 bNumInterfaces; (1) */ 0x01, /* u8 bConfigurationValue; */ 0x04, /* u8 iConfiguration; */ - 0xa0, /* u8 bmAttributes; + 0xa0, /* u8 bmAttributes; Bit 7: must be set, 6: Self-powered, 5: Remote wakeup, @@ -284,7 +284,7 @@ namespace usb_hid 0x01, /* u8 bNumInterfaces; (1) */ 0x01, /* u8 bConfigurationValue; */ 0x04, /* u8 iConfiguration; */ - 0xa0, /* u8 bmAttributes; + 0xa0, /* u8 bmAttributes; Bit 7: must be set, 6: Self-powered, 5: Remote wakeup, diff --git a/pcsx2/USB/usb-mic/audiodev.h b/pcsx2/USB/usb-mic/audiodev.h index 701f4afbb9..3f389c88cb 100644 --- a/pcsx2/USB/usb-mic/audiodev.h +++ b/pcsx2/USB/usb-mic/audiodev.h @@ -97,7 +97,7 @@ public: virtual uint32_t GetBuffer(int16_t* buff, uint32_t len) = 0; virtual uint32_t SetBuffer(int16_t* buff, uint32_t len) = 0; /* - Get how many frames has been recorded so that caller knows + Get how many frames has been recorded so that caller knows how much to allocated for 16-bit buffer. */ virtual bool GetFrames(uint32_t* size) = 0; diff --git a/pcsx2/USB/usb-pad/bitjuggling.cpp b/pcsx2/USB/usb-pad/bitjuggling.cpp index 3267e41d3c..6b0a9bcb57 100644 --- a/pcsx2/USB/usb-pad/bitjuggling.cpp +++ b/pcsx2/USB/usb-pad/bitjuggling.cpp @@ -100,7 +100,7 @@ void bitarray_copy(const uint8_t* src_org, int src_offset, int src_len, int src_len_modulo; unsigned char c; /* - * Begin: Line things up on destination. + * Begin: Line things up on destination. */ if (src_offset_modulo > dst_offset_modulo) { @@ -123,7 +123,7 @@ void bitarray_copy(const uint8_t* src_org, int src_offset, int src_len, *dst++ |= c; /* - * Middle: copy with only shifting the source. + * Middle: copy with only shifting the source. */ byte_len = src_len / CHAR_BIT; @@ -135,7 +135,7 @@ void bitarray_copy(const uint8_t* src_org, int src_offset, int src_len, } /* - * End: copy the remaing bits; + * End: copy the remaing bits; */ src_len_modulo = src_len % CHAR_BIT; if (src_len_modulo) diff --git a/pcsx2/USB/usb-pad/dx/versionproxy.rc b/pcsx2/USB/usb-pad/dx/versionproxy.rc index 74b2c5f52d..2f9cfc4296 100644 --- a/pcsx2/USB/usb-pad/dx/versionproxy.rc +++ b/pcsx2/USB/usb-pad/dx/versionproxy.rc @@ -25,18 +25,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "versionproxy.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#include ""WinResrc.h""\r\n" "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\r\n" "\0" diff --git a/pcsx2/USB/usb-pad/raw/raw-config.rc b/pcsx2/USB/usb-pad/raw/raw-config.rc index 929e30f36b..173f9cc239 100644 --- a/pcsx2/USB/usb-pad/raw/raw-config.rc +++ b/pcsx2/USB/usb-pad/raw/raw-config.rc @@ -110,18 +110,18 @@ LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_ARGENTINA // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "raw-config-res.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#include ""WinResrc.h""\r\n" "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\r\n" "\0" diff --git a/pcsx2/USB/usb-pad/raw/usb-pad-raw.h b/pcsx2/USB/usb-pad/raw/usb-pad-raw.h index e931dc113c..c4373a2d45 100644 --- a/pcsx2/USB/usb-pad/raw/usb-pad-raw.h +++ b/pcsx2/USB/usb-pad/raw/usb-pad-raw.h @@ -90,7 +90,7 @@ namespace usb_pad /* Layout: 0x8000 bit means it is a valid mapping, - where value is PS2 button/axis and + where value is PS2 button/axis and array (Mappings::btnMap etc.) index is physical button/axis (reversed for keyboard mappings). [31..16] bits player 2 mapping diff --git a/pcsx2/USB/usb-pad/usb-seamic.cpp b/pcsx2/USB/usb-pad/usb-seamic.cpp index 768180ec1c..bdae3afad5 100644 --- a/pcsx2/USB/usb-pad/usb-seamic.cpp +++ b/pcsx2/USB/usb-pad/usb-seamic.cpp @@ -404,7 +404,7 @@ namespace usb_pad #ifdef _WIN32 if (!LoadSetting(nullptr, port, usb_mic::SingstarDevice::TypeName(), N_DEVICE_API, tmp)) return nullptr; - api = wstr_to_str(tmp); + api = wstr_to_str(tmp); #else if (!LoadSetting(nullptr, port, usb_mic::SingstarDevice::TypeName(), N_DEVICE_API, api)) return nullptr; diff --git a/pcsx2/VU0.cpp b/pcsx2/VU0.cpp index fc054aad54..53d539cdb9 100644 --- a/pcsx2/VU0.cpp +++ b/pcsx2/VU0.cpp @@ -136,7 +136,7 @@ void CFC2() { _vu0FinishMicro(); } if (_Rt_ == 0) return; - + cpuRegs.GPR.r[_Rt_].UL[0] = VU0.VI[_Fs_].UL; if(VU0.VI[_Fs_].UL & 0x80000000) diff --git a/pcsx2/VU1microInterp.cpp b/pcsx2/VU1microInterp.cpp index 33280a3b72..31b95b1589 100644 --- a/pcsx2/VU1microInterp.cpp +++ b/pcsx2/VU1microInterp.cpp @@ -81,7 +81,7 @@ static void _vu1Exec(VURegs* VU) VU1regs_UPPER_OPCODE[VU->code & 0x3f](&uregs); u32 cyclesBeforeOp = VU1.cycle-1; - + _vuTestUpperStalls(VU, &uregs); /* check upper flags */ @@ -217,7 +217,7 @@ static void _vu1Exec(VURegs* VU) VU1.xgkicklastcycle = cpuRegs.cycle; } } - + // Progress the write position of the FMAC pipeline by one place if (uregs.pipe == VUPIPE_FMAC || lregs.pipe == VUPIPE_FMAC) VU->fmacwritepos = (VU->fmacwritepos + 1) & 3; diff --git a/pcsx2/VUmicro.h b/pcsx2/VUmicro.h index 572ce77850..b0027ffc83 100644 --- a/pcsx2/VUmicro.h +++ b/pcsx2/VUmicro.h @@ -104,7 +104,7 @@ public: // Gets the current cache reserve allocated to this CPU (value returned in megabytes) virtual uint GetCacheReserve() const=0; - + // Specifies the maximum cache reserve amount for this CPU (value in megabytes). // CPU providers are allowed to reset their reserves (recompiler resets, etc) if such is // needed to conform to the new amount requested. diff --git a/pcsx2/VUmicroMem.cpp b/pcsx2/VUmicroMem.cpp index 3c3911ee42..7c47de9020 100644 --- a/pcsx2/VUmicroMem.cpp +++ b/pcsx2/VUmicroMem.cpp @@ -47,7 +47,7 @@ vuMemoryReserve::~vuMemoryReserve() void vuMemoryReserve::Reset() { _parent::Reset(); - + pxAssert( VU0.Mem ); pxAssert( VU1.Mem ); diff --git a/pcsx2/VUops.cpp b/pcsx2/VUops.cpp index bd14e206ef..0c35419313 100644 --- a/pcsx2/VUops.cpp +++ b/pcsx2/VUops.cpp @@ -1646,7 +1646,7 @@ static __fi void _vuFTOI4(VURegs* VU) { if (_Y) VU->VF[_Ft_].SL[1] = float_to_int(float_to_int4(vuDouble(VU->VF[_Fs_].i.y))); if (_Z) VU->VF[_Ft_].SL[2] = float_to_int(float_to_int4(vuDouble(VU->VF[_Fs_].i.z))); if (_W) VU->VF[_Ft_].SL[3] = float_to_int(float_to_int4(vuDouble(VU->VF[_Fs_].i.w))); -} +} static __fi void _vuFTOI12(VURegs* VU) { @@ -2129,7 +2129,7 @@ static __ri void _vuRNEXT(VURegs* VU) { if (_Ft_ == 0) return; - + AdvanceLFSR(VU); if (_X) VU->VF[_Ft_].UL[0] = VU->VI[REG_R].UL; if (_Y) VU->VF[_Ft_].UL[1] = VU->VI[REG_R].UL; @@ -2153,7 +2153,7 @@ static __ri void _vuFSAND(VURegs* VU) imm = (((VU->code >> 21) & 0x1) << 11) | (VU->code & 0x7ff); if (_It_ == 0) return; - + VU->VI[_It_].US[0] = (VU->VI[REG_STATUS_FLAG].US[0] & 0xFFF) & imm; } @@ -2164,7 +2164,7 @@ static __ri void _vuFSEQ(VURegs* VU) imm = (((VU->code >> 21) & 0x1) << 11) | (VU->code & 0x7ff); if (_It_ == 0) return; - + if ((VU->VI[REG_STATUS_FLAG].US[0] & 0xFFF) == imm) VU->VI[_It_].US[0] = 1; else @@ -2609,7 +2609,7 @@ static __ri void _vuXITOP(VURegs* VU) { if (_It_ == 0) return; - + if (VU == &VU1 && THREAD_VU1) VU->VI[_It_].US[0] = vu1Thread.vifRegs.itop; else @@ -2730,7 +2730,7 @@ static __ri void _vuXTOP(VURegs* VU) { if (_It_ == 0) return; - + if (VU == &VU1 && THREAD_VU1) VU->VI[_It_].US[0] = (u16)vu1Thread.vifRegs.top; else diff --git a/pcsx2/Vif0_Dma.cpp b/pcsx2/Vif0_Dma.cpp index 1157b6a960..518dd966f2 100644 --- a/pcsx2/Vif0_Dma.cpp +++ b/pcsx2/Vif0_Dma.cpp @@ -108,13 +108,13 @@ __fi void vif0SetupTransfer() ret = VIF0transfer((u32*)&masked_tag + 2, 2, true); //Transfer Tag //ret = VIF0transfer((u32*)ptag + 2, 2); //Transfer Tag } - + if (!ret && vif0.irqoffset.enabled) { vif0.inprogress = 0; // Better clear this so it has to do it again (Jak 1) vif0ch.qwc = 0; // Gumball 3000 pauses the DMA when the tag stalls so we need to reset the QWC, it'll be gotten again later return; // IRQ set by VIFTransfer - + } } @@ -149,7 +149,7 @@ __fi void vif0VUFinish() vu0Finish(); _cycles = VU0.cycle - _cycles; //DevCon.Warning("Finishing VU0 %d cycles", _cycles); - CPU_INT(VIF_VU0_FINISH, _cycles * BIAS); + CPU_INT(VIF_VU0_FINISH, _cycles * BIAS); return; } vif0Regs.stat.VEW = false; @@ -216,11 +216,11 @@ __fi void vif0Interrupt() vif0.vifstalled.enabled = false; //Must go after the Stall, incase it's still in progress, GTC africa likes to see it still transferring. - if (vif0.cmd) + if (vif0.cmd) { if(vif0.done && vif0ch.qwc == 0) vif0Regs.stat.VPS = VPS_WAITING; } - else + else { vif0Regs.stat.VPS = VPS_IDLE; } @@ -278,7 +278,7 @@ void dmaVIF0() vif0ch.tadr, vif0ch.asr0, vif0ch.asr1); g_vif0Cycles = 0; - + if (vif0ch.qwc > 0) // Normal Mode { if (vif0ch.chcr.MOD == CHAIN_MODE) diff --git a/pcsx2/Vif_Codes.cpp b/pcsx2/Vif_Codes.cpp index e5e146e876..2782e5b73f 100644 --- a/pcsx2/Vif_Codes.cpp +++ b/pcsx2/Vif_Codes.cpp @@ -221,7 +221,7 @@ vifOp(vifCode_Flush) if (vif1.waitforvu || vif1Regs.stat.VGW) return 0; - + vif1.cmd = 0; vif1.pass = 0; } @@ -474,7 +474,7 @@ vifOp(vifCode_MSCNT) if (vifX.waitforvu) return 0; - + vuExecMicro(idx, -1, false); vifX.cmd = 0; vifX.pass = 0; diff --git a/pcsx2/Vif_Transfer.cpp b/pcsx2/Vif_Transfer.cpp index 4c8c60f259..dede156586 100644 --- a/pcsx2/Vif_Transfer.cpp +++ b/pcsx2/Vif_Transfer.cpp @@ -27,7 +27,7 @@ _vifT void vifTransferLoop(u32* &data) { vifStruct& vifX = GetVifX; u32& pSize = vifX.vifpacketsize; - + int ret = 0; vifXRegs.stat.VPS |= VPS_TRANSFERRING; @@ -39,7 +39,7 @@ _vifT void vifTransferLoop(u32* &data) { if(!vifXRegs.err.MII) { - if(vifX.irq && !CHECK_VIF1STALLHACK) + if(vifX.irq && !CHECK_VIF1STALLHACK) break; vifX.irq |= data[0] >> 31; @@ -47,8 +47,8 @@ _vifT void vifTransferLoop(u32* &data) { vifXRegs.code = data[0]; vifX.cmd = data[0] >> 24; - - + + VIF_LOG("New VifCMD %x tagsize %x irq %d", vifX.cmd, vifX.tag.size, vifX.irq); if (IsDevBuild && SysTrace.EE.VIFcode.IsActive()) { // Pass 2 means "log it" @@ -73,7 +73,7 @@ _vifT static __fi bool vifTransfer(u32 *data, int size, bool TTE) { // irqoffset necessary to add up the right qws, or else will spin (spiderman) int transferred = vifX.irqoffset.enabled ? vifX.irqoffset.value : 0; - + vifX.vifpacketsize = size; vifTransferLoop(data); @@ -85,13 +85,13 @@ _vifT static __fi bool vifTransfer(u32 *data, int size, bool TTE) { else g_vif1Cycles += std::max(1, (int)((transferred * BIAS) >> 2)); vifX.irqoffset.value = transferred % 4; // cannot lose the offset - + if (vifX.irq && vifX.cmd == 0) { VIF_LOG("Vif%d IRQ Triggering", idx); //Always needs to be set to return to the correct offset if there is data left. vifX.vifstalled.enabled = VifStallEnable(vifXch); vifX.vifstalled.value = VIF_IRQ_STALL; - } + } if (!TTE) // *WARNING* - Tags CAN have interrupts! so lets just ignore the dma modifying stuffs (GT4) { @@ -104,9 +104,9 @@ _vifT static __fi bool vifTransfer(u32 *data, int size, bool TTE) { vifX.irqoffset.enabled = false; - if(!vifXch.qwc) + if(!vifXch.qwc) vifX.inprogress &= ~0x1; - else if(vifX.irqoffset.value != 0) + else if(vifX.irqoffset.value != 0) vifX.irqoffset.enabled = true; } else diff --git a/pcsx2/Vif_Unpack.cpp b/pcsx2/Vif_Unpack.cpp index 97061cbdc5..f39fd90f9c 100644 --- a/pcsx2/Vif_Unpack.cpp +++ b/pcsx2/Vif_Unpack.cpp @@ -192,7 +192,7 @@ _vifT void vifUnpackSetup(const u32 *data) { vifStruct& vifX = GetVifX; GetVifX.unpackcalls++; - + if (GetVifX.unpackcalls > 3) { vifExecQueue(idx); diff --git a/pcsx2/gui/AppAssert.cpp b/pcsx2/gui/AppAssert.cpp index 92d4c7c2e8..d17df1ad6d 100644 --- a/pcsx2/gui/AppAssert.cpp +++ b/pcsx2/gui/AppAssert.cpp @@ -69,7 +69,7 @@ protected: }*/ m_stackTrace.Write(pxsFmt( L"[%02d]", frame.GetLevel()-m_skipped).c_str()); - + if (!frame.GetName().IsEmpty()) m_stackTrace.Write(pxsFmt( L" %-44s", WX_STR(frame.GetName()) ).c_str()); else @@ -85,7 +85,7 @@ protected: m_stackTrace.Write( L" %s:%d", WX_STR(wxfn.GetFullPath()), frame.GetLine() ); } - + m_stackTrace.Write(L"\n"); } }; diff --git a/pcsx2/gui/AppConfig.h b/pcsx2/gui/AppConfig.h index b939fe5c78..ba7fc1875c 100644 --- a/pcsx2/gui/AppConfig.h +++ b/pcsx2/gui/AppConfig.h @@ -34,7 +34,7 @@ enum DocsModeType // friendly to modern computing security requirements; as it isolates all file modification // to a zone of the hard drive that has granted write permissions to the user. DocsFolder_User, - + // uses a custom location for program data. Typically the custom folder is either the // absolute or relative location of the program -- absolute is preferred because it is // considered more secure by MSW standards, due to DLL search rules. @@ -57,7 +57,7 @@ namespace PathDefs extern wxDirName GetDocuments( DocsModeType mode ); } -extern DocsModeType DocsFolderMode; // +extern DocsModeType DocsFolderMode; // extern bool UseDefaultSettingsFolder; // when TRUE, pcsx2 derives the settings folder from the DocsFolderMode extern wxDirName CustomDocumentsFolder; // allows the specification of a custom home folder for PCSX2 documents files. @@ -91,7 +91,7 @@ extern InstallationModeType InstallationMode; extern const wxChar* CDVD_SourceLabels[]; // ===================================================================================================== -// Pcsx2 Application Configuration. +// Pcsx2 Application Configuration. // ===================================================================================================== class AppConfig @@ -286,7 +286,7 @@ public: InputRecordingOptions inputRecording; UiTemplateOptions Templates; CaptureOptions AudioCapture; - + // PCSX2-core emulation options, which are passed to the emu core prior to initiating // an emulation session. Note these are the options saved into the GUI ini file and // which are shown as options in the gui preferences, but *not* necessarily the options @@ -301,12 +301,12 @@ public: static int GetMaxPresetIndex(); static bool isOkGetPresetTextAndColor(int n, wxString& label, wxColor& c); - + bool IsOkApplyPreset(int n, bool ignoreMTVU); //The next 2 flags are used with ApplyConfigToGui which the presets system use: - + //Indicates that the scope is only for preset-related items. static const int APPLY_FLAG_FROM_PRESET = 0x01; diff --git a/pcsx2/gui/AppEventSources.cpp b/pcsx2/gui/AppEventSources.cpp index ab0cc0b5fd..c1195e7084 100644 --- a/pcsx2/gui/AppEventSources.cpp +++ b/pcsx2/gui/AppEventSources.cpp @@ -48,7 +48,7 @@ void IEventListener_CoreThread::DispatchEvent( const CoreThreadStatus& status ) case CoreThread_Suspended: CoreThread_OnSuspended(); break; case CoreThread_Reset: CoreThread_OnReset(); break; case CoreThread_Stopped: CoreThread_OnStopped(); break; - + jNO_DEFAULT; } } diff --git a/pcsx2/gui/AppForwardDefs.h b/pcsx2/gui/AppForwardDefs.h index 551955d193..4b93e06a5a 100644 --- a/pcsx2/gui/AppForwardDefs.h +++ b/pcsx2/gui/AppForwardDefs.h @@ -19,9 +19,9 @@ // // Purpose: // This header file is meant to be a dependency-free include that provides a relatively -// full compliment of forward defines for PCSX2/App and wxwidgets types. When +// full compliment of forward defines for PCSX2/App and wxwidgets types. When // forward defined in this way, these types can be used by method and class definitions -// as either pointers or handles without running into complicated header file +// as either pointers or handles without running into complicated header file // inter-dependence. // diff --git a/pcsx2/gui/AppInit.cpp b/pcsx2/gui/AppInit.cpp index 8fa536a8cc..90bc494bd8 100644 --- a/pcsx2/gui/AppInit.cpp +++ b/pcsx2/gui/AppInit.cpp @@ -135,8 +135,8 @@ void Pcsx2App::OpenProgramLog() for( int li=wxLANGUAGE_UNKNOWN+1; liLanguage)) continue; + { + if (i18n_IsLegacyLanguageId((wxLanguage)info->Language)) continue; Console.WriteLn( L"|| %-30s || %-8s ||", info->Description.c_str(), info->CanonicalName.c_str() ); } } diff --git a/pcsx2/gui/AppMain.cpp b/pcsx2/gui/AppMain.cpp index addc28dac6..4e23e93c00 100644 --- a/pcsx2/gui/AppMain.cpp +++ b/pcsx2/gui/AppMain.cpp @@ -128,18 +128,18 @@ public: { m_Method = method; } - + Pcsx2AppMethodEvent( const Pcsx2AppMethodEvent& src ) : pxActionEvent( src ) { m_Method = src.m_Method; } - + void SetMethod( FnPtr_Pcsx2App method ) { m_Method = method; } - + protected: void InvokeEvent() { @@ -359,7 +359,7 @@ wxAppTraits* Pcsx2App::CreateTraits() // ---------------------------------------------------------------------------- // LogicalVsync - Event received from the AppCoreThread (EEcore) for each vsync, -// roughly 50/60 times a second when frame limiting is enabled, and up to 10,000 +// roughly 50/60 times a second when frame limiting is enabled, and up to 10,000 // times a second if not (ok, not quite, but you get the idea... I hope.) void Pcsx2App::LogicalVsync() { @@ -374,7 +374,7 @@ void Pcsx2App::LogicalVsync() { if( ev->key == 0 ) break; - // in the past, in the plugin api, all plugins would have a first chance at treating the + // in the past, in the plugin api, all plugins would have a first chance at treating the // input here, with the ui eventually dealing with it otherwise. Obviously this solution // sucked and we had multiple components battling for input processing. I managed to make // most of them go away during the plugin merge but GS still needs to process the inputs, @@ -456,17 +456,17 @@ void Pcsx2App::HandleEvent(wxEvtHandler* handler, wxEventFunction func, wxEvent& // [TODO] Bind a listener to the CoreThread status, and automatically close the dialog // if the thread starts responding while we're waiting (not hard in fact, but I'm getting // a little tired, so maybe later!) --air - + Console.Warning( ex.FormatDiagnosticMessage() ); wxDialogWithHelpers dialog( NULL, _("PCSX2 Unresponsive Thread"), wxVERTICAL ); - + dialog += dialog.Heading( ex.FormatDisplayMessage() + L"\n\n" + pxE( L"'Ignore' to continue waiting for the thread to respond.\n'Cancel' to attempt to cancel the thread.\n'Terminate' to quit PCSX2 immediately.\n" ) ); int result = pxIssueConfirmation( dialog, MsgButtons().Ignore().Cancel().Custom( _("Terminate") ) ); - + if( result == pxID_CUSTOM ) { // fastest way to kill the process! (works in Linux and win32, thanks to windows having very @@ -565,7 +565,7 @@ void Pcsx2App::enterDebugMode() if (dlg) dlg->setDebugMode(true,false); } - + void Pcsx2App::leaveDebugMode() { DisassemblyDialog* dlg = GetDisassemblyPtr(); @@ -716,7 +716,7 @@ void Pcsx2App::OpenGsPanel() // // FIXME: GS memory leaks in DX10 have been fixed. This code may not be needed // anymore. - + const wxSize oldsize( gsFrame->GetSize() ); wxSize newsize( oldsize ); newsize.DecBy(1); @@ -832,7 +832,7 @@ public: { return _("Executing PS2 Virtual Machine..."); } - + SysExecEvent_Execute() : m_UseCDVDsrc(false) , m_UseELFOverride(false) diff --git a/pcsx2/gui/AppUserMode.cpp b/pcsx2/gui/AppUserMode.cpp index cf582e2ccb..5084df229e 100644 --- a/pcsx2/gui/AppUserMode.cpp +++ b/pcsx2/gui/AppUserMode.cpp @@ -59,7 +59,7 @@ bool Pcsx2App::TestUserPermissionsRights( const wxDirName& testFolder, wxString& // If any of the folders are not writable, then the user should be informed asap via // friendly and courteous dialog box! - const wxDirName PermissionFolders[] = + const wxDirName PermissionFolders[] = { PathDefs::Base::Settings(), PathDefs::Base::MemoryCards(), @@ -89,7 +89,7 @@ bool Pcsx2App::TestUserPermissionsRights( const wxDirName& testFolder, wxString& { accessFailedStr = (wxString)_("The following folders exist, but are not writable:") + L"\n" + accessme; } - + if (!createme.IsEmpty()) { createFailedStr = (wxString)_("The following folders are missing and cannot be created:") + L"\n" + createme; @@ -131,7 +131,7 @@ wxConfigBase* Pcsx2App::TestForPortableInstall() { wxString accessFailedStr, createFailedStr; if (TestUserPermissionsRights( portableDocsFolder, createFailedStr, accessFailedStr )) break; - + wxDialogWithHelpers dialog( NULL, AddAppName(_("Portable mode error - %s")) ); wxTextCtrl* scrollText = new wxTextCtrl( @@ -149,13 +149,13 @@ wxConfigBase* Pcsx2App::TestForPortableInstall() dialog += scrollText | pxExpand.Border(wxALL, 16); dialog += 6; dialog += dialog.Text( GetMsg_PortableModeRights() ); - + // [TODO] : Add url for platform-relevant user permissions tutorials? (low priority) wxWindowID result = pxIssueConfirmation( dialog, MsgButtons().Retry().Cancel().Custom(_("Switch to User Documents Mode"), "switchmode") ); - + switch (result) { case wxID_CANCEL: @@ -164,33 +164,33 @@ wxConfigBase* Pcsx2App::TestForPortableInstall() case wxID_RETRY: // do nothing (continues while loop) break; - + case pxID_CUSTOM: wxDialogWithHelpers dialog2( NULL, AddAppName(_("%s is switching to local install mode.")) ); dialog2 += dialog2.Heading( _("Try to remove the file called \"portable.ini\" from your installation directory manually." ) ); dialog2 += 6; pxIssueConfirmation( dialog2, MsgButtons().OK() ); - + return NULL; } } - + // Success -- all user-based folders have write access. PCSX2 should be able to run error-free! - // Force-set the custom documents mode, and set the + // Force-set the custom documents mode, and set the InstallationMode = InstallMode_Portable; DocsFolderMode = DocsFolder_Custom; CustomDocumentsFolder = portableDocsFolder; return conf_portable.release(); } - + return NULL; } // Reset RunWizard so the FTWizard is run again on next PCSX2 start. void Pcsx2App::WipeUserModeSettings() -{ +{ if (InstallationMode == InstallMode_Portable) { // Remove the portable.ini entry "RunWizard" conforming to this instance of PCSX2. @@ -198,7 +198,7 @@ void Pcsx2App::WipeUserModeSettings() std::unique_ptr conf_portable( OpenFileConfig( portableIniFile.GetFullPath() ) ); conf_portable->DeleteEntry(L"RunWizard"); } - else + else { // Remove the registry entry "RunWizard" conforming to this instance of PCSX2. std::unique_ptr conf_install( OpenInstallSettingsFile() ); diff --git a/pcsx2/gui/ApplyState.h b/pcsx2/gui/ApplyState.h index bd7c72bf12..ea8bb7e286 100644 --- a/pcsx2/gui/ApplyState.h +++ b/pcsx2/gui/ApplyState.h @@ -43,7 +43,7 @@ namespace Exception protected: BaseApplicableConfigPanel* m_Panel; - + protected: CannotApplySettings() { IsVerbose = true; } @@ -237,7 +237,7 @@ public: ); virtual ~ApplicableWizardPage() { m_ApplyState.DoCleanup(); } - + virtual bool PrepForApply(); }; diff --git a/pcsx2/gui/ConsoleLogger.cpp b/pcsx2/gui/ConsoleLogger.cpp index a19becaacd..93ad6050d0 100644 --- a/pcsx2/gui/ConsoleLogger.cpp +++ b/pcsx2/gui/ConsoleLogger.cpp @@ -463,7 +463,7 @@ ConsoleLogFrame::ConsoleLogFrame( MainEmuFrame *parent, const wxString& title, A menuSources.Append( MenuId_LogSource_Devel, _("Dev/&Verbose"), _("Shows PCSX2 developer logs."), wxITEM_CHECK ); menuSources.Append( MenuId_LogSource_CDVD_Info, _("&CDVD reads"), _("Shows disk read activity."), wxITEM_CHECK ); - + menuSources.AppendSeparator(); uint srcnt = std::size(ConLogSources); diff --git a/pcsx2/gui/ConsoleLogger.h b/pcsx2/gui/ConsoleLogger.h index 17df62b86c..02a0cfa008 100644 --- a/pcsx2/gui/ConsoleLogger.h +++ b/pcsx2/gui/ConsoleLogger.h @@ -115,7 +115,7 @@ protected: { return m_table[(int)coloridx]; } - + void SetColorScheme_Dark(); void SetColorScheme_Light(); }; diff --git a/pcsx2/gui/Debugger/BreakpointWindow.cpp b/pcsx2/gui/Debugger/BreakpointWindow.cpp index a17c5adaaa..729643ce71 100644 --- a/pcsx2/gui/Debugger/BreakpointWindow.cpp +++ b/pcsx2/gui/Debugger/BreakpointWindow.cpp @@ -31,7 +31,7 @@ BreakpointWindow::BreakpointWindow( wxWindow* parent, DebugInterface* _cpu ) wxBoxSizer* upperPart = new wxBoxSizer(wxHORIZONTAL); wxFlexGridSizer* leftSizer = new wxFlexGridSizer(2,2,7,7); - + // address wxStaticText* addressText = new wxStaticText(this,wxID_ANY,L"Address"); editAddress = new wxTextCtrl(this,wxID_ANY,L""); @@ -151,10 +151,10 @@ void BreakpointWindow::setDefaultValues() swprintf(str,64,L"0x%08X",address); editAddress->SetValue(str); } - + swprintf(str,64,L"0x%08X",size); editSize->SetValue(str); - editCondition->SetValue(wxString(condition,wxConvUTF8)); + editCondition->SetValue(wxString(condition,wxConvUTF8)); } void BreakpointWindow::loadFromMemcheck(MemCheck& memcheck) @@ -221,7 +221,7 @@ void BreakpointWindow::initBreakpoint(u32 _address) void BreakpointWindow::onRadioChange(wxCommandEvent& evt) { memory = radioMemory->GetValue(); - + checkRead->Enable(memory); checkWrite->Enable(memory); checkOnChange->Enable(memory); diff --git a/pcsx2/gui/Debugger/BreakpointWindow.h b/pcsx2/gui/Debugger/BreakpointWindow.h index 3c12270cbc..482fc2f828 100644 --- a/pcsx2/gui/Debugger/BreakpointWindow.h +++ b/pcsx2/gui/Debugger/BreakpointWindow.h @@ -36,7 +36,7 @@ private: bool fetchDialogData(); DebugInterface* cpu; - + wxTextCtrl* editAddress; wxTextCtrl* editSize; wxRadioButton* radioMemory; diff --git a/pcsx2/gui/Debugger/CtrlDisassemblyView.h b/pcsx2/gui/Debugger/CtrlDisassemblyView.h index e322be2b39..97b9e34d3c 100644 --- a/pcsx2/gui/Debugger/CtrlDisassemblyView.h +++ b/pcsx2/gui/Debugger/CtrlDisassemblyView.h @@ -38,7 +38,7 @@ public: void clearFunctions() { manager.clear(); }; void redraw(); void getOpcodeText(u32 address, char* dest); - + u32 getInstructionSizeAt(u32 address) { u32 start = manager.getStartAddress(address); diff --git a/pcsx2/gui/Debugger/CtrlMemSearch.cpp b/pcsx2/gui/Debugger/CtrlMemSearch.cpp index ccee3ab1de..8937c1f153 100644 --- a/pcsx2/gui/Debugger/CtrlMemSearch.cpp +++ b/pcsx2/gui/Debugger/CtrlMemSearch.cpp @@ -277,7 +277,7 @@ void CtrlMemSearch::Search(wxCommandEvent& evt) else { // We're searching for either a BYTE, WORD, DWORD or QWORD - + const auto res = StringUtil::FromChars(txtSearch->GetValue().ToStdString()); if(!res.has_value()) { @@ -300,7 +300,7 @@ void CtrlMemSearch::onSearchFinished(wxCommandEvent& evt) m_searchResultsMutex.lock(); lblSearchHits->SetLabelText(wxString::Format(L"Hits: %zu", m_searchResults.size())); - + // Enable the buttons only if we have results // -1 indicates we haven't jumped to a result yet m_searchIter = -1; diff --git a/pcsx2/gui/Debugger/CtrlMemSearch.h b/pcsx2/gui/Debugger/CtrlMemSearch.h index 95292f94a4..7411ac73d4 100644 --- a/pcsx2/gui/Debugger/CtrlMemSearch.h +++ b/pcsx2/gui/Debugger/CtrlMemSearch.h @@ -87,7 +87,7 @@ private: void Search(wxCommandEvent& evt); const u8 SEARCHTYPEBITS[8] = {8,16,32,64,32,64,0}; - + DebugInterface* cpu; wxFont font, underlineFont; wxTextCtrl* txtSearch; diff --git a/pcsx2/gui/Debugger/CtrlMemView.h b/pcsx2/gui/Debugger/CtrlMemView.h index 6982c88f33..775b7a12a3 100644 --- a/pcsx2/gui/Debugger/CtrlMemView.h +++ b/pcsx2/gui/Debugger/CtrlMemView.h @@ -23,7 +23,7 @@ class CtrlMemView: public wxWindow { public: CtrlMemView(wxWindow* parent, DebugInterface* _cpu); - + void paintEvent(wxPaintEvent & evt); void mouseEvent(wxMouseEvent& evt); void keydownEvent(wxKeyEvent& evt); diff --git a/pcsx2/gui/Debugger/DisassemblyDialog.cpp b/pcsx2/gui/Debugger/DisassemblyDialog.cpp index bcf98f0849..b45065263d 100644 --- a/pcsx2/gui/Debugger/DisassemblyDialog.cpp +++ b/pcsx2/gui/Debugger/DisassemblyDialog.cpp @@ -330,7 +330,7 @@ void DisassemblyDialog::onBreakRunClicked(wxCommandEvent& evt) CBreakPoints::SetSkipFirst(BREAKPOINT_IOP, r3000Debug.getPC()); r5900Debug.resumeCpu(); } - else + else { r5900Debug.pauseCpu(); gotoPc(); @@ -401,13 +401,13 @@ void DisassemblyDialog::stepOver() breakpointAddress += 4; } else // j, ... - { + { // in case of absolute branches, set the breakpoint at the branch target breakpointAddress = info.branchTarget; } } else // beq, ... - { + { if (info.conditionMet) { breakpointAddress = info.branchTarget; @@ -419,7 +419,7 @@ void DisassemblyDialog::stepOver() } } } - else + else { disassembly->scrollStepping(breakpointAddress); } @@ -449,7 +449,7 @@ void DisassemblyDialog::stepInto() { breakpointAddress = info.branchTarget; } - else + else { if (info.conditionMet) { @@ -523,7 +523,7 @@ void DisassemblyDialog::onDebuggerEvent(wxCommandEvent& evt) if (!executeExpressionWindow(this, cpu, addr)) return; - if (currentCpu != NULL) + if (currentCpu != NULL) { // GetInt() is 0 when called by the disassembly view, 1 when called by the memory view if (!evt.GetInt()) @@ -615,7 +615,7 @@ void DisassemblyDialog::update() breakpointButton->Enable(true); currentCpu->update(); } - else + else { stepOverButton->Enable(false); breakpointButton->Enable(false); @@ -695,7 +695,7 @@ void DisassemblyDialog::setDebugMode(bool debugMode, bool switchPC) if (currentCpu != NULL) currentCpu->loadCycles(); } - else + else { breakRunButton->SetLabel(L"Break"); diff --git a/pcsx2/gui/Debugger/DisassemblyDialog.h b/pcsx2/gui/Debugger/DisassemblyDialog.h index 2ed63bd284..136103d979 100644 --- a/pcsx2/gui/Debugger/DisassemblyDialog.h +++ b/pcsx2/gui/Debugger/DisassemblyDialog.h @@ -89,7 +89,7 @@ public: static wxString GetNameStatic() { return L"DisassemblyDialog"; } wxString GetDialogName() const { return GetNameStatic(); } - + void update(); void reset(); void populate(); diff --git a/pcsx2/gui/Dialogs/ConfigurationDialog.h b/pcsx2/gui/Dialogs/ConfigurationDialog.h index 6f0b641f2a..a81ac61892 100644 --- a/pcsx2/gui/Dialogs/ConfigurationDialog.h +++ b/pcsx2/gui/Dialogs/ConfigurationDialog.h @@ -39,7 +39,7 @@ namespace Dialogs class BaseConfigurationDialog : public BaseApplicableDialog { typedef BaseApplicableDialog _parent; - + protected: wxListbook* m_listbook; wxArrayString m_labels; @@ -171,7 +171,7 @@ namespace Dialogs public: virtual ~CreateMemoryCardDialog() = default; CreateMemoryCardDialog( wxWindow* parent, const wxDirName& mcdpath, const wxString& suggested_mcdfileName); - + //duplicate of MemoryCardFile::Create. Don't know why the existing method isn't used. - avih static bool CreateIt( const wxString& mcdFile, uint sizeInMB, bool isPSX ); wxString result_createdMcdFilename; @@ -197,7 +197,7 @@ namespace Dialogs public: virtual ~ConvertMemoryCardDialog() = default; ConvertMemoryCardDialog( wxWindow* parent, const wxDirName& mcdPath, MemoryCardType type, const wxString& sourceFilename ); - + protected: void CreateControls( const MemoryCardType sourceType ); void OnOk_Click( wxCommandEvent& evt ); diff --git a/pcsx2/gui/Dialogs/CreateMemoryCardDialog.cpp b/pcsx2/gui/Dialogs/CreateMemoryCardDialog.cpp index f48f986372..42a161c05e 100644 --- a/pcsx2/gui/Dialogs/CreateMemoryCardDialog.cpp +++ b/pcsx2/gui/Dialogs/CreateMemoryCardDialog.cpp @@ -245,10 +245,10 @@ void Dialogs::CreateMemoryCardDialog::CreateControls() . SetInt(64), RadioPanelItem(_("Folder [Recommended]"), _("Store memory card contents in the host filesystem instead of a file.")) - . SetToolTip(_t("Dynamically allocate and store memory card contents in a folder.\n" + . SetToolTip(_t("Dynamically allocate and store memory card contents in a folder.\n" "Only exposes the save files for the running game, rather than the whole memory card.\n" "You can see the structure and the saves with your File Explorer.\n" - "Can be used to back-up individual saves instead of all saves on a memcard.\n" + "Can be used to back-up individual saves instead of all saves on a memcard.\n" "Incompatible with PS2 memory card editing tools or savegame managers (such as MyMC, MyMCPlus).\n" "You can always convert back between folder type and single memcard file.\n")) . SetInt(0), diff --git a/pcsx2/gui/Dialogs/FirstTimeWizard.cpp b/pcsx2/gui/Dialogs/FirstTimeWizard.cpp index a9ef924c3c..3bf132ef53 100644 --- a/pcsx2/gui/Dialogs/FirstTimeWizard.cpp +++ b/pcsx2/gui/Dialogs/FirstTimeWizard.cpp @@ -95,7 +95,7 @@ Panels::FirstTimeIntroPanel::FirstTimeIntroPanel( wxWindow* parent ) *this += new wxHyperlinkCtrl( this, wxID_ANY, _("Configuration Guide"), configFile.c_str() ) | pxCenter.Border( wxALL, 5 ); - + *this += new wxHyperlinkCtrl( this, wxID_ANY, _("Readme / FAQ"), faqFile.c_str() ) | pxCenter.Border( wxALL, 5 ); diff --git a/pcsx2/gui/Dialogs/LogOptionsDialog.h b/pcsx2/gui/Dialogs/LogOptionsDialog.h index e6ebe5e0b5..31171c3ee2 100644 --- a/pcsx2/gui/Dialogs/LogOptionsDialog.h +++ b/pcsx2/gui/Dialogs/LogOptionsDialog.h @@ -35,7 +35,7 @@ public: protected: void OnOk_Click( wxCommandEvent& evt ); void OnApply_Click( wxCommandEvent& evt ); - + wxString& GetConfSettingsTabName() const { static wxString bleh = L"TraceLogs"; diff --git a/pcsx2/gui/Dialogs/McdConfigDialog.cpp b/pcsx2/gui/Dialogs/McdConfigDialog.cpp index d4af0e8555..31a7e29dc7 100644 --- a/pcsx2/gui/Dialogs/McdConfigDialog.cpp +++ b/pcsx2/gui/Dialogs/McdConfigDialog.cpp @@ -60,8 +60,8 @@ Panels::McdConfigPanel_Toggles::McdConfigPanel_Toggles(wxWindow *parent) // ------------------------------ for( uint i=0; i<2; ++i ) - *this += m_check_Multitap[i]; - + *this += m_check_Multitap[i]; + // *this += 4; // *this += m_check_SavestateBackup; @@ -106,7 +106,7 @@ Dialogs::McdConfigDialog::McdConfigDialog( wxWindow* parent ) wxFlexGridSizer* s_flex=new wxFlexGridSizer(3,1, 0, 0); s_flex->AddGrowableCol(0); s_flex->AddGrowableRow(1); - + //set own sizer to s_flex (3-rows-1-col table with growable width and growable middle-row-height) // instead of the default vertical sizer which cannot expand vertically. // (vertical sizers can expand horizontally and consume the minimum vertical height possible) diff --git a/pcsx2/gui/Dialogs/SysConfigDialog.cpp b/pcsx2/gui/Dialogs/SysConfigDialog.cpp index d2101e8bbb..fed19c930f 100644 --- a/pcsx2/gui/Dialogs/SysConfigDialog.cpp +++ b/pcsx2/gui/Dialogs/SysConfigDialog.cpp @@ -29,12 +29,12 @@ using namespace pxSizerFlags; static void CheckHacksOverrides() { if( !wxGetApp().Overrides.HasCustomHacks() ) return; - + // The user has commandline overrides enabled, so the options they see here and/or apply won't match // the commandline overrides. Let them know! wxDialogWithHelpers dialog( wxFindWindowByName( L"Dialog:" + Dialogs::SysConfigDialog::GetNameStatic() ), _("Config Overrides Warning") ); - + dialog += dialog.Text( pxEt( L"Warning! You are running PCSX2 with command line options that override your configured settings. These command line options will not be reflected in the Settings dialog, and will be disabled if you apply any changes here." )); @@ -60,7 +60,7 @@ void Dialogs::SysConfigDialog::UpdateGuiForPreset ( int presetIndex, bool preset AppConfig preset = *g_Conf; preset.IsOkApplyPreset( presetIndex, false ); //apply a preset to a copy of g_Conf. preset.EnablePresets = presetsEnabled; //override IsOkApplyPreset (which always applies/enabled) to actual required state - + //update the config panels of SysConfigDialog to reflect the preset. size_t pages = m_labels.GetCount(); for( size_t i=0; i patches are visually still enabled (last preset values) and grayed out. // 4. Clicking Apply (presets still unchecked) --> patches will be enabled and not grayed out, presets are disabled. // --> If clicking Cancel instead of Apply at 4., will revert everything to the state of 1 (preset disabled, patches disabled and not grayed out). - + bool origEnable=preset.EnablePresets; preset.EnablePresets=true; // will cause preset-related items to be grayed out at the menus regardless of their value. if ( GetMainFramePtr() ) GetMainFramePtr()->ApplyConfigToGui( preset, AppConfig::APPLY_FLAG_FROM_PRESET | AppConfig::APPLY_FLAG_MANUALLY_PROPAGATE ); - + // Not really needed as 'preset' is local and dumped anyway. For the sake of future modifications of more GUI elements. - preset.EnablePresets=origEnable; - + preset.EnablePresets=origEnable; + } void Dialogs::SysConfigDialog::AddPresetsControl() @@ -131,7 +131,7 @@ void Dialogs::SysConfigDialog::AddPresetsControl() m_msg_preset->Enable(g_Conf->EnablePresets); m_msg_preset->SetForegroundColour( c ); m_msg_preset->Bold(); - + //I'm unable to do without the next 2 rows.. what am I missing? m_msg_preset->SetMinWidth(250); m_msg_preset->Unwrapped(); @@ -161,7 +161,7 @@ void Dialogs::SysConfigDialog::Presets_Toggled(wxCommandEvent &event) void Dialogs::SysConfigDialog::Preset_Scroll(wxScrollEvent &event) -{ +{ wxString pl; wxColor c; AppConfig::isOkGetPresetTextAndColor(m_slider_presets->GetValue(), pl, c); @@ -180,7 +180,7 @@ void Dialogs::SysConfigDialog::Apply() //Console.WriteLn("Applying preset to to g_Conf: Preset index: %d, EnablePresets: %s", (int)m_slider_presets->GetValue(), m_check_presets->IsChecked()?"true":"false"); g_Conf->EnablePresets = m_check_presets->IsChecked(); g_Conf->PresetIndex = m_slider_presets->GetValue(); - + if (GetMainFramePtr()) GetMainFramePtr()->CommitPreset_noTrigger(); } diff --git a/pcsx2/gui/ExecutorThread.cpp b/pcsx2/gui/ExecutorThread.cpp index 3aebda61e3..e0de364c57 100644 --- a/pcsx2/gui/ExecutorThread.cpp +++ b/pcsx2/gui/ExecutorThread.cpp @@ -40,7 +40,7 @@ ConsoleLogSource_Event::ConsoleLogSource_Event() "SysEvents", "S&ysVM Control Events", "Logs events as they are passed to the PS2 virtual machine.", }; - + m_Descriptor = &myDesc; } @@ -183,7 +183,7 @@ struct ScopedThreadCancelDisable int oldstate; pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, &oldstate ); } - + ~ScopedThreadCancelDisable() { int oldstate; @@ -195,7 +195,7 @@ struct ScopedThreadCancelDisable void pxEvtQueue::ProcessEvents( pxEvtList& list, bool isIdle ) { ScopedLock synclock( m_mtx_pending ); - + pxEvtList::iterator node; while( node = list.begin(), node != list.end() ) { @@ -275,7 +275,7 @@ void pxEvtQueue::PostEvent( SysExecEvent* evt ) } ScopedLock synclock( m_mtx_pending ); - + pxEvtLog.Write( this, evt, pxsFmt(L"Posting event! (pending=%d, idle=%d)", m_pendingEvents.size(), m_idleEvents.size()) ); m_pendingEvents.push_back( sevt.release() ); @@ -371,7 +371,7 @@ bool pxEvtQueue::Rpc_TryInvoke( FnType_Void* method, const wxChar* traceName ) return true; } - + return false; } @@ -411,7 +411,7 @@ bool ExecutorThread::IsRunning() const void ExecutorThread::ShutdownQueue() { if( !m_EvtHandler ) return; - + if( !m_EvtHandler->IsShuttingDown() ) m_EvtHandler->ShutdownQueue(); diff --git a/pcsx2/gui/FrameForGS.cpp b/pcsx2/gui/FrameForGS.cpp index 83edb0c87a..6b2b6d6816 100644 --- a/pcsx2/gui/FrameForGS.cpp +++ b/pcsx2/gui/FrameForGS.cpp @@ -123,7 +123,7 @@ void GSPanel::InitRecordingAccelerators() m_Accels->Map(AAC(wxKeyCode('r')).Shift(), "InputRecordingModeToggle"); m_Accels->Map(AAC(wxKeyCode('l')).Shift(), "GoToFirstFrame"); #if defined(__unix__) - // Shift+P (80) and Shift+p (112) have two completely different codes + // Shift+P (80) and Shift+p (112) have two completely different codes // On Linux the former is sometimes fired so define bindings for both m_Accels->Map(AAC(wxKeyCode('P')).Shift(), "TogglePause"); m_Accels->Map(AAC(wxKeyCode('R')).Shift(), "InputRecordingModeToggle"); diff --git a/pcsx2/gui/GlobalCommands.cpp b/pcsx2/gui/GlobalCommands.cpp index 4dfb46586e..da75ee1078 100644 --- a/pcsx2/gui/GlobalCommands.cpp +++ b/pcsx2/gui/GlobalCommands.cpp @@ -915,7 +915,7 @@ void Pcsx2App::InitDefaultGlobalAccelerators() // At this early stage of startup, the application assumes installed mode, so portable mode custom keybindings may present issues. // Relevant - https://github.com/PCSX2/pcsx2/blob/678829a5b2b8ca7a3e42d8edc9ab201bf00b0fe9/pcsx2/gui/AppInit.cpp#L479 // Compared to L990 of GlobalCommands.cpp which also does an init for the GlobalAccelerators. - // The idea was to have: Reading from the PCSX2_keys.ini in the ini folder based on PCSX2_keys.ini.default which get overridden. + // The idea was to have: Reading from the PCSX2_keys.ini in the ini folder based on PCSX2_keys.ini.default which get overridden. // We also need to make it easier to do custom hotkeys for both normal/portable PCSX2 in the GUI. GlobalAccels->Map(AAC(WXK_TAB), "Framelimiter_TurboToggle"); GlobalAccels->Map(AAC(WXK_TAB).Shift(), "Framelimiter_SlomoToggle"); diff --git a/pcsx2/gui/MainFrame.cpp b/pcsx2/gui/MainFrame.cpp index 10a599e5f4..11f024c9e2 100644 --- a/pcsx2/gui/MainFrame.cpp +++ b/pcsx2/gui/MainFrame.cpp @@ -152,7 +152,7 @@ bool MainEmuFrame::Destroy() // void MainEmuFrame::OnCloseWindow(wxCloseEvent& evt) { - // the main thread is busy suspending everything, so let's not try to call it + // the main thread is busy suspending everything, so let's not try to call it // when closing the emulator //init_gspanel = false; diff --git a/pcsx2/gui/MainMenuClicks.cpp b/pcsx2/gui/MainMenuClicks.cpp index a2601b6aae..265655cba0 100644 --- a/pcsx2/gui/MainMenuClicks.cpp +++ b/pcsx2/gui/MainMenuClicks.cpp @@ -1117,7 +1117,7 @@ void MainEmuFrame::ApplyFirstFrameStatus() cdvd_menu->SetHelp(L"Loads the savestate that accompanies the active input recording"); else cdvd_menu->SetHelp(L"Reboots Emulation"); - + UpdateStatusBar(); } diff --git a/pcsx2/gui/Panels/BiosSelectorPanel.cpp b/pcsx2/gui/Panels/BiosSelectorPanel.cpp index 8f6e8320b2..e110ce1803 100644 --- a/pcsx2/gui/Panels/BiosSelectorPanel.cpp +++ b/pcsx2/gui/Panels/BiosSelectorPanel.cpp @@ -214,7 +214,7 @@ void Panels::BiosSelectorPanel::OnEnumComplete(wxCommandEvent& evt) if (currentBios == (*m_BiosList)[result.second]) m_ComboBox->SetSelection(sel); } - // Select a bios if one isn't selected. + // Select a bios if one isn't selected. // This makes it so users don't _have_ to click on their bios, // possibly reducing confusion. if(m_ComboBox->GetSelection() == -1 && m_ComboBox->GetCount() > 0) diff --git a/pcsx2/gui/Panels/CpuPanel.cpp b/pcsx2/gui/Panels/CpuPanel.cpp index 115e56f1cc..4e2c09c59c 100644 --- a/pcsx2/gui/Panels/CpuPanel.cpp +++ b/pcsx2/gui/Panels/CpuPanel.cpp @@ -157,10 +157,10 @@ Panels::CpuPanelEE::CpuPanelEE( wxWindow* parent ) s_recs += s_ee | SubGroup(); s_recs += s_iop | SubGroup(); - + *this += &s_recs | StdExpand(); - - // move following line down so EE and VU panels look more uniform. + + // move following line down so EE and VU panels look more uniform. // Use an empty Label (std expanded) so it work with custom font sizes, too. //*this += Label(_("")) | StdExpand(); *this += new wxStaticLine( this ) | pxExpand.Border(wxALL, 18); diff --git a/pcsx2/gui/Panels/DirPickerPanel.cpp b/pcsx2/gui/Panels/DirPickerPanel.cpp index 8beb1c8c2a..97e59c8e7e 100644 --- a/pcsx2/gui/Panels/DirPickerPanel.cpp +++ b/pcsx2/gui/Panels/DirPickerPanel.cpp @@ -85,7 +85,7 @@ void Panels::DirPickerPanel::Explore_Click( wxCommandEvent &evt ) // // Parameters: // label - label for the StaticBox that surrounds the dir picker control. If the 'label' -// parameter is not specified, the layout of the panel is assumed to be "compact" which +// parameter is not specified, the layout of the panel is assumed to be "compact" which // lacks a static box and compresses itself onto a single line. Compact mode may be useful // for situations where the expanded format is just too invasive. // @@ -235,7 +235,7 @@ void Panels::DirPickerPanel::Reset() m_pickerCtrl->Enable( IsEnabled() ? ( m_checkCtrl ? !isDefault : true ) : false ); m_pickerCtrl->SetPath( GetNormalizedConfigFolder( m_FolderId ) ); } - + if (m_textCtrl) { m_textCtrl->Disable(); @@ -292,7 +292,7 @@ void Panels::DirPickerPanel::SetPath( const wxString& newPath ) { if (m_pickerCtrl) m_pickerCtrl->SetPath( newPath ); - + if (m_textCtrl) m_textCtrl->SetValue( newPath ); } diff --git a/pcsx2/gui/Panels/GameFixesPanel.cpp b/pcsx2/gui/Panels/GameFixesPanel.cpp index 81cc85492b..cdce36e2dd 100644 --- a/pcsx2/gui/Panels/GameFixesPanel.cpp +++ b/pcsx2/gui/Panels/GameFixesPanel.cpp @@ -174,9 +174,9 @@ void Panels::GameFixesPanel::ApplyConfigToGui( AppConfig& configToApply, int fla const Pcsx2Config::GamefixOptions& opts( configToApply.EmuOptions.Gamefixes ); for (GamefixId i=GamefixId_FIRST; i < pxEnumEnd; ++i) m_checkbox[i]->SetValue( opts.Get((GamefixId)i) );//apply the use/don't-use fix values - + m_check_Enable->SetValue( configToApply.EnableGameFixes );//main gamefixes checkbox EnableStuff( &configToApply );// enable/disable the all the fixes controls according to the main one - + this->Enable(!configToApply.EnablePresets); } diff --git a/pcsx2/gui/Panels/LogOptionsPanels.h b/pcsx2/gui/Panels/LogOptionsPanels.h index 9eda40e332..c67ba88597 100644 --- a/pcsx2/gui/Panels/LogOptionsPanels.h +++ b/pcsx2/gui/Panels/LogOptionsPanels.h @@ -90,7 +90,7 @@ namespace Panels void OnUpdateEnableAll(); void OnCheckBoxClicked(wxCommandEvent &event); void Apply(); - + protected: BaseCpuLogOptionsPanel* GetCpuPanel( const wxString& token ) const; }; diff --git a/pcsx2/gui/Panels/MemoryCardListView.cpp b/pcsx2/gui/Panels/MemoryCardListView.cpp index fbca417416..2a1e6c1d45 100644 --- a/pcsx2/gui/Panels/MemoryCardListView.cpp +++ b/pcsx2/gui/Panels/MemoryCardListView.cpp @@ -53,7 +53,7 @@ void BaseMcdListView::LoadSaveColumns( IniInterface& ini ) int width = GetColumnWidth(col); ini.Entry( label, width, cinfo.width ); - + if (ini.IsLoading()) SetColumnWidth(col, width); } @@ -134,7 +134,7 @@ wxString MemoryCardListView_Simple::OnGetItemText(long item, long column) const return pxsFmt(wxString(L" ") + _("Port-%u / Multitap-%u--Port-1"), it.GetMtapPort()+1, it.GetMtapPort()+1); return pxsFmt(wxString(L" ")+_(" Multitap-%u--Port-%u"), it.GetMtapPort()+1, it.GetMtapSlot()+1); } - + return L""; /* case McdColS_Status: @@ -146,7 +146,7 @@ wxString MemoryCardListView_Simple::OnGetItemText(long item, long column) const res= L""; return prefix + res; } -*/ +*/ case McdColS_Size: return prefix + ( !it.IsPresent ? L"" : (it.IsPSX? pxsFmt( L"%u MBit", it.SizeInMB ) : ( it.SizeInMB > 0 ? pxsFmt( L"%u MiB", it.SizeInMB ) : L"Auto" ) ) ); case McdColS_Formatted: return prefix + ( !it.IsPresent ? L"" : ( it.IsFormatted ? _("Yes") : _("No")) ); case McdColS_Type: return prefix + ( !it.IsPresent ? L"" : ( it.IsPSX? _("PS1") : _("PS2")) ); @@ -168,7 +168,7 @@ wxString MemoryCardListView_Simple::OnGetItemText(long item, long column) const } wxDirName filepath( it.Filename.GetPath() ); - + if (filepath.SameAs(g_Conf->Folders.MemoryCards)) return prefix + it.Filename.GetFullName(); else diff --git a/pcsx2/gui/Panels/MemoryCardPanels.h b/pcsx2/gui/Panels/MemoryCardPanels.h index 4fe2548816..2ea360a01c 100644 --- a/pcsx2/gui/Panels/MemoryCardPanels.h +++ b/pcsx2/gui/Panels/MemoryCardPanels.h @@ -41,7 +41,7 @@ struct McdSlotItem int Slot; //0-7: internal slot. -1: unrelated to an internal slot (the rest of the files at the folder). bool IsPresent; //Whether or not a file is associated with this item (true/false when 0<=Slot<=7. Always true when Slot==-1) MemoryCardType Type; //The implementation used for this memory card - + //Only meaningful when IsPresent==true (a file exists for this item): wxFileName Filename; // full pathname bool IsFormatted; @@ -65,7 +65,7 @@ struct McdSlotItem Slot = -1; SizeInMB = 0; Type = MemoryCardType::Empty; - + IsPSX = false; IsPresent = false; IsEnabled = false; @@ -89,7 +89,7 @@ public: virtual void RemoveCardFromSlot(const wxFileName cardFile) =0; virtual bool IsNonEmptyFilesystemCards() const =0; virtual bool UiDuplicateCard( McdSlotItem& src, McdSlotItem& dest ) =0; - + }; // -------------------------------------------------------------------------------------- @@ -162,7 +162,7 @@ namespace Panels , public IMcdList // derived classes need to implement this { typedef BaseSelectorPanel _parent; - + protected: DirPickerPanel* m_FolderPicker; BaseMcdListView* m_listview; @@ -208,12 +208,12 @@ namespace Panels McdSlotItem m_Cards[8]; wxButton* m_button_Rename; - + // Doubles as Create and Delete buttons wxButton* m_button_Create; wxButton* m_button_Convert; - + // Doubles as Mount and Unmount buttons ("Enable"/"Disable" port) // wxButton* m_button_Mount; @@ -244,7 +244,7 @@ namespace Panels void OnRenameFile(wxCommandEvent& evt); void OnDuplicateFile(wxCommandEvent& evt); void OnAssignUnassignFile(wxCommandEvent& evt); - + void OnListDrag(wxListEvent& evt); void OnListSelectionChanged(wxListEvent& evt); void OnOpenItemContextMenu(wxListEvent& evt); @@ -275,7 +275,7 @@ namespace Panels virtual void UiConvertCard( McdSlotItem& card ); virtual void UiDeleteCard( McdSlotItem& card ); virtual void UiAssignUnassignFile( McdSlotItem& card ); - + }; // -------------------------------------------------------------------------------------- diff --git a/pcsx2/gui/Panels/MiscPanelStuff.cpp b/pcsx2/gui/Panels/MiscPanelStuff.cpp index 02c5f211c0..3c1d57c0e8 100644 --- a/pcsx2/gui/Panels/MiscPanelStuff.cpp +++ b/pcsx2/gui/Panels/MiscPanelStuff.cpp @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. @@ -39,7 +39,7 @@ Panels::DocsFolderPickerPanel::DocsFolderPickerPanel( wxWindow* parent, bool isF const wxString usermodeWarning( pxE( L"You can change the preferred default location for PCSX2 user-level documents here (includes memory cards, screenshots, settings, and savestates). This option only affects Standard Paths which are set to use the installation default value." ) ); - const RadioPanelItem UsermodeOptions[] = + const RadioPanelItem UsermodeOptions[] = { RadioPanelItem( _("User Documents (recommended)"), @@ -57,7 +57,7 @@ Panels::DocsFolderPickerPanel::DocsFolderPickerPanel( wxWindow* parent, bool isF m_radio_UserMode->SetPaddingHoriz( m_radio_UserMode->GetPaddingVert() + 4 ); m_radio_UserMode->Realize(); if( pxStaticText* woot = m_radio_UserMode->GetSubText(0) ) woot->Unwrapped(); // wrapping sucks for path names! - + m_dirpicker_custom = new DirPickerPanel( this, FolderId_Documents, AddAppName(_("Select a document root for %s")) ); *this += Heading( isFirstTime ? usermodeExplained : usermodeWarning ); @@ -150,7 +150,7 @@ void Panels::LanguageSelectionPanel::Apply() wxString sel( m_picker->GetString( m_picker->GetSelection() ) ); g_Conf->LanguageCode = L"default"; // use this if no matches found - g_Conf->LanguageId = wxLANGUAGE_DEFAULT; + g_Conf->LanguageId = wxLANGUAGE_DEFAULT; int size = m_langs.size(); for( int i=0; ifindKeycodeWithCommandId("Framelimiter_MasterToggle").toTitleizedString()+ wxString(")"), _("Uncaps FPS. Useful for running benchmarks.") ); @@ -63,7 +63,7 @@ Panels::FramelimiterPanel::FramelimiterPanel( wxWindow* parent ) s_spins += Label(L"%") | StdExpand(); s_spins += 5; - // Implement custom hotkeys (Shift + Tab) with translatable string intact + not blank in GUI. + // Implement custom hotkeys (Shift + Tab) with translatable string intact + not blank in GUI. s_spins += Label(_("Slow Motion Adjust:") + wxString::Format(" (%s)", wxGetApp().GlobalAccels->findKeycodeWithCommandId("Framelimiter_SlomoToggle").toTitleizedString())) | StdExpand(); s_spins += 5; @@ -71,7 +71,7 @@ Panels::FramelimiterPanel::FramelimiterPanel( wxWindow* parent ) s_spins += Label(L"%") | StdExpand(); s_spins += 5; - // Implement custom hotkeys (Tab) with translatable string intact + not blank in GUI. + // Implement custom hotkeys (Tab) with translatable string intact + not blank in GUI. s_spins += Label(_("Turbo Adjust:") + wxString::Format(" (%s)", wxGetApp().GlobalAccels->findKeycodeWithCommandId("Framelimiter_TurboToggle").toTitleizedString())) | StdExpand(); s_spins += 5; @@ -113,7 +113,7 @@ void Panels::FramelimiterPanel::ApplyConfigToGui( AppConfig& configToApply, int if( ! (flags & AppConfig::APPLY_FLAG_FROM_PRESET) ) { //Presets don't control these: only change if config doesn't come from preset. - + m_check_LimiterDisable->SetValue(!gsconf.FrameLimitEnable); m_spin_TurboPct->SetValue(appfps.TurboScalar * 100.0); @@ -174,7 +174,7 @@ Panels::VideoPanel::VideoPanel( wxWindow* parent ) : m_check_SynchronousGS = new pxCheckBox( left, _("Use Synchronized MTGS"), _t("For troubleshooting potential bugs in the MTGS only, as it is potentially very slow.") ); -#endif +#endif m_spinner_VsyncQueue = new wxSpinCtrl(left); m_spinner_VsyncQueue->SetRange(0, 3); @@ -182,9 +182,9 @@ Panels::VideoPanel::VideoPanel( wxWindow* parent ) : m_restore_defaults = new wxButton(this, wxID_DEFAULT, _("Restore Defaults")); m_spinner_VsyncQueue->SetToolTip( pxEt(L"Setting this to a lower value improves input lag, a value around 2 or 3 will slightly improve framerates. (Default is 2)")); -#ifdef PCSX2_DEVBUILD +#ifdef PCSX2_DEVBUILD m_check_SynchronousGS->SetToolTip( pxEt( L"Enable this if you think MTGS thread sync is causing crashes or graphical errors. For debugging to see if GS is running at the correct speed.")); -#endif +#endif //GSWindowSettingsPanel* winpan = new GSWindowSettingsPanel( left ); //winpan->AddFrame(_("Display/Window")); @@ -199,14 +199,14 @@ Panels::VideoPanel::VideoPanel( wxWindow* parent ) : *left += m_fpan | pxExpand; *left += 5; - + *s_vsyncs += left->Label(_("Vsyncs in MTGS Queue:")) | StdExpand(); *s_vsyncs += m_spinner_VsyncQueue | pxBorder(wxTOP, -2).Right(); *left += s_vsyncs | StdExpand(); -#ifdef PCSX2_DEVBUILD +#ifdef PCSX2_DEVBUILD *left += 2; *left += m_check_SynchronousGS | StdExpand(); -#endif +#endif *s_table += left | StdExpand(); @@ -238,9 +238,9 @@ void Panels::VideoPanel::OnOpenWindowSettings( wxCommandEvent& evt ) void Panels::VideoPanel::Apply() { -#ifdef PCSX2_DEVBUILD +#ifdef PCSX2_DEVBUILD g_Conf->EmuOptions.GS.SynchronousMTGS = m_check_SynchronousGS->GetValue(); -#endif +#endif g_Conf->EmuOptions.GS.VsyncQueueSize = m_spinner_VsyncQueue->GetValue(); } @@ -251,10 +251,10 @@ void Panels::VideoPanel::AppStatusEvent_OnSettingsApplied() void Panels::VideoPanel::ApplyConfigToGui( AppConfig& configToApply, int flags ){ -#ifdef PCSX2_DEVBUILD +#ifdef PCSX2_DEVBUILD m_check_SynchronousGS->SetValue( configToApply.EmuOptions.GS.SynchronousMTGS ); m_check_SynchronousGS->Enable(!configToApply.EnablePresets); -#endif +#endif m_spinner_VsyncQueue->SetValue( configToApply.EmuOptions.GS.VsyncQueueSize ); if( flags & AppConfig::APPLY_FLAG_MANUALLY_PROPAGATE ) diff --git a/pcsx2/gui/RecentIsoList.cpp b/pcsx2/gui/RecentIsoList.cpp index 4e36c125bd..1c5909a7b9 100644 --- a/pcsx2/gui/RecentIsoList.cpp +++ b/pcsx2/gui/RecentIsoList.cpp @@ -99,7 +99,7 @@ void RecentIsoManager::RemoveAllFromMenu() m_Menu->Destroy( curitem.ItemPtr ); curitem.ItemPtr = NULL; } - + if( m_Separator != nullptr ) { m_Menu->Destroy( m_Separator ); diff --git a/pcsx2/gui/Saveslots.h b/pcsx2/gui/Saveslots.h index ec41576545..8a848b4cf1 100644 --- a/pcsx2/gui/Saveslots.h +++ b/pcsx2/gui/Saveslots.h @@ -115,7 +115,7 @@ public: void Used() { - // Update the saveslot cache with the new saveslot, and give it the current timestamp, + // Update the saveslot cache with the new saveslot, and give it the current timestamp, // Because we aren't going to be able to get the real timestamp from disk right now. empty = false; updated = wxDateTime::Now(); diff --git a/pcsx2/gui/i18n.cpp b/pcsx2/gui/i18n.cpp index f5771c21db..6c88c4f7a6 100644 --- a/pcsx2/gui/i18n.cpp +++ b/pcsx2/gui/i18n.cpp @@ -182,11 +182,11 @@ static wxLanguage i18n_FallbackToAnotherLang( wxLanguage wxLangId ) case wxLANGUAGE_ARABIC_UAE : case wxLANGUAGE_ARABIC_YEMEN : return wxLANGUAGE_ARABIC_SAUDI_ARABIA; - case wxLANGUAGE_CHINESE_HONGKONG : + case wxLANGUAGE_CHINESE_HONGKONG : case wxLANGUAGE_CHINESE_MACAU : return wxLANGUAGE_CHINESE_TRADITIONAL; case wxLANGUAGE_CHINESE_SINGAPORE : return wxLANGUAGE_CHINESE_SIMPLIFIED; - // case wxLANGUAGE_SAMI : + // case wxLANGUAGE_SAMI : // case wxLANGUAGE_DANISH : case wxLANGUAGE_NORWEGIAN_NYNORSK : return wxLANGUAGE_NORWEGIAN_BOKMAL; @@ -202,10 +202,10 @@ static wxLanguage i18n_FallbackToAnotherLang( wxLanguage wxLangId ) case wxLANGUAGE_PORTUGUESE : return wxLANGUAGE_PORTUGUESE_BRAZILIAN; // Overkill 9000? - case wxLANGUAGE_GERMAN_AUSTRIAN : - case wxLANGUAGE_GERMAN_BELGIUM : - case wxLANGUAGE_GERMAN_LIECHTENSTEIN : - case wxLANGUAGE_GERMAN_LUXEMBOURG : + case wxLANGUAGE_GERMAN_AUSTRIAN : + case wxLANGUAGE_GERMAN_BELGIUM : + case wxLANGUAGE_GERMAN_LIECHTENSTEIN : + case wxLANGUAGE_GERMAN_LUXEMBOURG : // case wxLANGUAGE_LOWER_SORBIAN : // case wxLANGUAGE_UPPER_SORBIAN : // - Sorbian is not supported by wxWidgets (3.0.0). @@ -280,7 +280,7 @@ bool i18n_SetLanguage( wxLanguage wxLangId, const wxString& langCode ) info = wxLocale::GetLanguageInfo(LangId_fallback); } - // note: language canonical name mismatch probably means wxWidgets version changed since + // note: language canonical name mismatch probably means wxWidgets version changed since // the user's ini file was provided. Missing/invalid ID probably means the same thing. // If either is true, and the caller provided a canonical name, then let wx do a best // match based on the canonical name. @@ -300,7 +300,7 @@ bool i18n_SetLanguage( wxLanguage wxLangId, const wxString& langCode ) if (!info) return false; if (wxGetLocale() && (info->Language == wxGetLocale()->GetLanguage())) return true; - + std::unique_ptr locale(new wxLocale(info->Language)); if( !locale->IsOk() ) @@ -312,7 +312,7 @@ bool i18n_SetLanguage( wxLanguage wxLangId, const wxString& langCode ) } wxLangId = (wxLanguage)locale->GetLanguage(); - + if (wxLangId == wxLANGUAGE_UNKNOWN) { Console.WriteLn("System-default language is unknown? Defaulting back to English/US."); @@ -325,7 +325,7 @@ bool i18n_SetLanguage( wxLanguage wxLangId, const wxString& langCode ) locale.release(); return true; } - + Console.WriteLn( "Loading language translation databases for '%ls' [%ls]", WX_STR(i18n_GetBetterLanguageName(info)), WX_STR(locale->GetCanonicalName()) ); @@ -335,7 +335,7 @@ bool i18n_SetLanguage( wxLanguage wxLangId, const wxString& langCode ) L"pcsx2_Main", L"pcsx2_Iconized" }; - + bool foundone = false; for (uint i=0; i 0) psxHu32(0x1000f300) &= ~0x4000000; return true; @@ -85,7 +85,7 @@ static __fi bool WriteFifoToEE() sif2dma.madr += readSize << 4; sif2.ee.cycles += readSize; // fixme : BIAS is factored in above sif2dma.qwc -= readSize; - + return true; } @@ -96,7 +96,7 @@ static __fi bool WriteIOPtoFifo() const int writeSize = std::min(sif2.iop.counter, sif2.fifo.sif_free()); SIF_LOG("Write IOP to Fifo: +++++++++++ %lX of %lX", writeSize, sif2.iop.counter); - + sif2.fifo.write((u32*)iopPhysMem(hw_dma2.madr), writeSize); hw_dma2.madr += writeSize << 2; @@ -150,14 +150,14 @@ static __fi bool ProcessIOPTag() //sif2.iop.data = *(sifData *)iopPhysMem(hw_dma2.madr); //comment this out and replace words below // Process DMA tag at hw_dma9.tadr if (HW_DMA2_CHCR & 0x400) DevCon.Warning("First bit %x", sif2.iop.data.data); - + sif2.iop.data.words = sif2.iop.data.data >> 24; // Round up to nearest 4. // send the EE's side of the DMAtag. The tag is only 64 bits, with the upper 64 bits // ignored by the EE. - + // We're only copying the first 24 bits. Bits 30 and 31 (checked below) are Stop/IRQ bits. - + //psxHu32(HW_PS1_GPU_DATA) += 4; sif2.iop.counter = (HW_DMA2_BCR_H16 * HW_DMA2_BCR_L16); //makes it do more stuff?? //sif2words; /*if (HW_DMA2_CHCR & 0x400) @@ -217,7 +217,7 @@ static __fi void HandleEETransfer() sif2.ee.busy = false; return; } - + /*if (sif2dma.qwc == 0) if (sif2dma.chcr.MOD == NORMAL_MODE) if (!sif2.ee.end){ @@ -357,7 +357,7 @@ __fi void sif2Interrupt() SIF2Dma(); return; } - + SIF_LOG("SIF2 IOP Intr end"); HW_DMA2_CHCR &= ~0x01000000; psxDmaInterrupt2(2); @@ -383,18 +383,18 @@ __fi void dmaSIF2() psHu32(SBUS_F240) |= 0x8000; sif2.ee.busy = true; - // Okay, this here is needed currently (r3644). + // Okay, this here is needed currently (r3644). // FFX battles in the thunder plains map die otherwise, Phantasy Star 4 as well // These 2 games could be made playable again by increasing the time the EE or the IOP run, // showing that this is very timing sensible. // Doing this DMA unfortunately brings back an old warning in Legend of Legaia though, but it still works. - //Updated 23/08/2011: The hangs are caused by the EE suspending SIF1 DMA and restarting it when in the middle + //Updated 23/08/2011: The hangs are caused by the EE suspending SIF1 DMA and restarting it when in the middle //of processing a "REFE" tag, so the hangs can be solved by forcing the ee.end to be false // (as it should always be at the beginning of a DMA). using "if iop is busy" flags breaks Tom Clancy Rainbow Six. // Legend of Legaia doesn't throw a warning either :) //sif2.ee.end = false; - + SIF2Dma(); } diff --git a/pcsx2/vtlb.cpp b/pcsx2/vtlb.cpp index 030f0b627c..2f692cb461 100644 --- a/pcsx2/vtlb.cpp +++ b/pcsx2/vtlb.cpp @@ -82,7 +82,7 @@ __inline int CheckCache(u32 addr) { u32 mask; - if(((cpuRegs.CP0.n.Config >> 16) & 0x1) == 0) + if(((cpuRegs.CP0.n.Config >> 16) & 0x1) == 0) { //DevCon.Warning("Data Cache Disabled! %x", cpuRegs.CP0.n.Config); return false;// @@ -92,17 +92,17 @@ __inline int CheckCache(u32 addr) { if (((tlb[i].EntryLo1 & 0x38) >> 3) == 0x3) { mask = tlb[i].PageMask; - + if ((addr >= tlb[i].PFN1) && (addr <= tlb[i].PFN1 + mask)) { - //DevCon.Warning("Yay! Cache check cache addr=%x, mask=%x, addr+mask=%x, VPN2=%x PFN0=%x", addr, mask, (addr & mask), tlb[i].VPN2, tlb[i].PFN0); + //DevCon.Warning("Yay! Cache check cache addr=%x, mask=%x, addr+mask=%x, VPN2=%x PFN0=%x", addr, mask, (addr & mask), tlb[i].VPN2, tlb[i].PFN0); return true; } } if (((tlb[i].EntryLo0 & 0x38) >> 3) == 0x3) { mask = tlb[i].PageMask; - + if ((addr >= tlb[i].PFN0) && (addr <= tlb[i].PFN0 + mask)) { - //DevCon.Warning("Yay! Cache check cache addr=%x, mask=%x, addr+mask=%x, VPN2=%x PFN0=%x", addr, mask, (addr & mask), tlb[i].VPN2, tlb[i].PFN0); + //DevCon.Warning("Yay! Cache check cache addr=%x, mask=%x, addr+mask=%x, VPN2=%x PFN0=%x", addr, mask, (addr & mask), tlb[i].VPN2, tlb[i].PFN0); return true; } } @@ -122,19 +122,19 @@ DataType vtlb_memRead(u32 addr) if (!vmv.isHandler(addr)) { - if (!CHECK_EEREC) + if (!CHECK_EEREC) { - if(CHECK_CACHE && CheckCache(addr)) + if(CHECK_CACHE && CheckCache(addr)) { switch( DataSize ) { - case 8: + case 8: return readCache8(addr); break; - case 16: + case 16: return readCache16(addr); break; - case 32: + case 32: return readCache32(addr); break; @@ -173,7 +173,7 @@ RETURNS_R64 vtlb_memRead64(u32 mem) if (!vmv.isHandler(mem)) { if (!CHECK_EEREC) { - if(CHECK_CACHE && CheckCache(mem)) + if(CHECK_CACHE && CheckCache(mem)) { return readCache64(mem); } @@ -196,9 +196,9 @@ RETURNS_R128 vtlb_memRead128(u32 mem) if (!vmv.isHandler(mem)) { - if (!CHECK_EEREC) + if (!CHECK_EEREC) { - if(CHECK_CACHE && CheckCache(mem)) + if(CHECK_CACHE && CheckCache(mem)) { return readCache128(mem); } @@ -223,14 +223,14 @@ void vtlb_memWrite(u32 addr, DataType data) auto vmv = vtlbdata.vmap[addr>>VTLB_PAGE_BITS]; if (!vmv.isHandler(addr)) - { - if (!CHECK_EEREC) + { + if (!CHECK_EEREC) { - if(CHECK_CACHE && CheckCache(addr)) + if(CHECK_CACHE && CheckCache(addr)) { switch( DataSize ) { - case 8: + case 8: writeCache8(addr, data); return; case 16: @@ -259,10 +259,10 @@ void vtlb_memWrite64(u32 mem, const mem64_t* value) auto vmv = vtlbdata.vmap[mem>>VTLB_PAGE_BITS]; if (!vmv.isHandler(mem)) - { - if (!CHECK_EEREC) + { + if (!CHECK_EEREC) { - if(CHECK_CACHE && CheckCache(mem)) + if(CHECK_CACHE && CheckCache(mem)) { writeCache64(mem, *value); return; @@ -287,9 +287,9 @@ void vtlb_memWrite128(u32 mem, const mem128_t *value) if (!vmv.isHandler(mem)) { - if (!CHECK_EEREC) + if (!CHECK_EEREC) { - if(CHECK_CACHE && CheckCache(mem)) + if(CHECK_CACHE && CheckCache(mem)) { writeCache128(mem, value); return; @@ -559,7 +559,7 @@ static void vtlbDefaultPhyWrite128(u32 addr,const mem128_t* data) } // =========================================================================================== -// VTLB Public API -- Init/Term/RegisterHandler stuff +// VTLB Public API -- Init/Term/RegisterHandler stuff // =========================================================================================== // diff --git a/pcsx2/windows/FlatFileReaderWindows.cpp b/pcsx2/windows/FlatFileReaderWindows.cpp index dd38441e9b..5e45e656ae 100644 --- a/pcsx2/windows/FlatFileReaderWindows.cpp +++ b/pcsx2/windows/FlatFileReaderWindows.cpp @@ -72,7 +72,7 @@ void FlatFileReader::BeginRead(void* pBuffer, uint sector, uint count) { LARGE_INTEGER offset; offset.QuadPart = sector * (s64)m_blocksize + m_dataoffset; - + DWORD bytesToRead = count * m_blocksize; ZeroMemory(&asyncOperationContext, sizeof(asyncOperationContext)); @@ -87,7 +87,7 @@ void FlatFileReader::BeginRead(void* pBuffer, uint sector, uint count) int FlatFileReader::FinishRead(void) { DWORD bytes; - + if(!GetOverlappedResult(hOverlappedFile, &asyncOperationContext, &bytes, TRUE)) { asyncInProgress = false; diff --git a/pcsx2/windows/wxResources.rc b/pcsx2/windows/wxResources.rc index 95f3240124..fb94eae351 100644 --- a/pcsx2/windows/wxResources.rc +++ b/pcsx2/windows/wxResources.rc @@ -27,18 +27,18 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // TEXTINCLUDE // -1 TEXTINCLUDE +1 TEXTINCLUDE BEGIN "resource.h\0" END -2 TEXTINCLUDE +2 TEXTINCLUDE BEGIN "#include ""afxresmw.h""\r\n" "\0" END -3 TEXTINCLUDE +3 TEXTINCLUDE BEGIN "\r\n" "\0" diff --git a/pcsx2/x86/R5900_Profiler.h b/pcsx2/x86/R5900_Profiler.h index e3f10dd63e..37310cc746 100644 --- a/pcsx2/x86/R5900_Profiler.h +++ b/pcsx2/x86/R5900_Profiler.h @@ -203,7 +203,7 @@ static const char eeOpcodeName[][16] = { // "COP1" "MFC1" , /* , */ "CFC1" , /* , */ "MTC1" , /* , */ "CTC1" , /* , */ - + // "COP1 BC1" "BC1F" , "BC1T" , "BC1FL" , "BC1TL" , /* , */ /* , */ /* , */ /* , */ diff --git a/pcsx2/x86/ix86-32/iR5900LoadStore.cpp b/pcsx2/x86/ix86-32/iR5900LoadStore.cpp index 310a25401c..5c9ffa3eb6 100644 --- a/pcsx2/x86/ix86-32/iR5900LoadStore.cpp +++ b/pcsx2/x86/ix86-32/iR5900LoadStore.cpp @@ -541,7 +541,7 @@ void recLDL() t2reg = vtlb_DynGenRead64(64, -1); } - + int rtreg = _allocGPRtoXMMreg(-1, _Rt_, MODE_READ | MODE_WRITE); if (GPR_IS_CONST1(_Rs_)) @@ -590,7 +590,7 @@ void recLDR() #ifdef LOADSTORE_RECOMPILE int t2reg; - + if (GPR_IS_CONST1(_Rt_)) { _flushConstReg(_Rt_); diff --git a/pcsx2/x86/microVU_Alloc.inl b/pcsx2/x86/microVU_Alloc.inl index 1d462f9263..606ff1a582 100644 --- a/pcsx2/x86/microVU_Alloc.inl +++ b/pcsx2/x86/microVU_Alloc.inl @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. diff --git a/pcsx2/x86/microVU_Analyze.inl b/pcsx2/x86/microVU_Analyze.inl index de29c74f50..f76068f543 100644 --- a/pcsx2/x86/microVU_Analyze.inl +++ b/pcsx2/x86/microVU_Analyze.inl @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. @@ -594,7 +594,7 @@ __ri int mVUbranchCheck(mV) mVUregs.blockType = 2; mVUregs.needExactMatch |= 7; // This might not be necessary, but w/e... mVUregs.flagInfo = 0; - + if (mVUlow.branch == 2 || mVUlow.branch == 10) { Console.Error("microVU%d: %s in branch, branch delay slot requires link [%04x] - If game broken report to PCSX2 Team", mVU.index, diff --git a/pcsx2/x86/microVU_Branch.inl b/pcsx2/x86/microVU_Branch.inl index fc684e64f6..a5967175bc 100644 --- a/pcsx2/x86/microVU_Branch.inl +++ b/pcsx2/x86/microVU_Branch.inl @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. diff --git a/pcsx2/x86/microVU_Clamp.inl b/pcsx2/x86/microVU_Clamp.inl index d01929a93d..9f85b5f120 100644 --- a/pcsx2/x86/microVU_Clamp.inl +++ b/pcsx2/x86/microVU_Clamp.inl @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. diff --git a/pcsx2/x86/microVU_Compile.inl b/pcsx2/x86/microVU_Compile.inl index 57c2c0065b..13d5fe53bc 100644 --- a/pcsx2/x86/microVU_Compile.inl +++ b/pcsx2/x86/microVU_Compile.inl @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. diff --git a/pcsx2/x86/microVU_Log.inl b/pcsx2/x86/microVU_Log.inl index de1786a137..a47ffa50ed 100644 --- a/pcsx2/x86/microVU_Log.inl +++ b/pcsx2/x86/microVU_Log.inl @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. diff --git a/pcsx2/x86/microVU_Lower.inl b/pcsx2/x86/microVU_Lower.inl index 3da2fe2f59..3e0ca1fa1b 100644 --- a/pcsx2/x86/microVU_Lower.inl +++ b/pcsx2/x86/microVU_Lower.inl @@ -1686,7 +1686,7 @@ mVUop(mVU_XGKICK) mVU_XGKICK_DELAY(mVU); mVUinfo.doXGKICK = false; } - + if (!CHECK_XGKICKHACK) { mVUallocVIa(mVU, gprT1, _Is_); diff --git a/pcsx2/x86/microVU_Macro.inl b/pcsx2/x86/microVU_Macro.inl index 386634d682..d45f35d053 100644 --- a/pcsx2/x86/microVU_Macro.inl +++ b/pcsx2/x86/microVU_Macro.inl @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. @@ -49,7 +49,7 @@ void setupMacroOp(int mode, const char* opName) microVU0.prog.IRinfo.curPC = 0; microVU0.code = cpuRegs.code; memset(µVU0.prog.IRinfo.info[0], 0, sizeof(microVU0.prog.IRinfo.info[0])); - + if (mode & 0x01) // Q-Reg will be Read { xMOVSSZX(xmmPQ, ptr32[&vu0Regs.VI[REG_Q].UL]); @@ -531,7 +531,7 @@ static void recQMFC2() if (!_Rt_) return; - + if (!(cpuRegs.code & 1)) { _freeX86reg(eax); @@ -572,7 +572,7 @@ static void recQMTC2() if (!_Rd_) return; - + if (!(cpuRegs.code & 1)) { _freeX86reg(eax); diff --git a/pcsx2/x86/microVU_Profiler.h b/pcsx2/x86/microVU_Profiler.h index 84e9be9243..9e9de013b2 100644 --- a/pcsx2/x86/microVU_Profiler.h +++ b/pcsx2/x86/microVU_Profiler.h @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. diff --git a/pcsx2/x86/microVU_Tables.inl b/pcsx2/x86/microVU_Tables.inl index b473016528..b6c5afb5e3 100644 --- a/pcsx2/x86/microVU_Tables.inl +++ b/pcsx2/x86/microVU_Tables.inl @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version. diff --git a/pcsx2/x86/microVU_Upper.inl b/pcsx2/x86/microVU_Upper.inl index f993eb4920..7572d30d7b 100644 --- a/pcsx2/x86/microVU_Upper.inl +++ b/pcsx2/x86/microVU_Upper.inl @@ -1,6 +1,6 @@ /* PCSX2 - PS2 Emulator for PCs * Copyright (C) 2002-2010 PCSX2 Dev Team - * + * * PCSX2 is free software: you can redistribute it and/or modify it under the terms * of the GNU Lesser General Public License as published by the Free Software Found- * ation, either version 3 of the License, or (at your option) any later version.
Time of Day (8 bytes)