From d8b9b3825cd2497918e7ecf8ac98745825428639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 14 Jan 2017 22:09:09 +0100 Subject: [PATCH] IOS HLE: Add resource request structs This adds well-defined structs that are responsible for parsing resource requests, instead of duplicating the logic and offsets all over IOS HLE. Command handler functions are now passed parsed requests instead of a command address. This may not seem like a very important change, but it removes the need to remember all of the struct offsets or copy/paste existing struct request variables. It also prevents nasty bugs which have occurred in the past, such as parsing an ioctl as if it were an ioctlv (that's way too easy to do if you pass command addresses directly); or writing something to 0x0, which can easily happen by mistake with a close handler that can be called with invalid command addresses. Bonus changes: - The return code is not an obscure Memory::Write_U32 anymore, but an explicit, more obvious SetReturnValue() call. (Which correctly takes a s32 instead of a u32, since return codes are signed.) - Open handlers are now only responsible for returning an IOS ret code, and Close handlers don't return anything and don't have to worry about checking whether the request is a real one anymore. - DumpAsync was moved to the ioctlv request struct, because it did not really make sense to make it part of the IOS device and it only works for ioctlvs. All current usages have been removed; they will be readded in a later commit. As of this commit, nothing uses the structs yet. Usages will be migrated progressively. --- .../Core/Core/IPC_HLE/WII_IPC_HLE_Device.cpp | 207 +++++++++++++----- Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h | 107 ++++++++- .../IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp | 3 - .../Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp | 1 - .../Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp | 4 - .../IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp | 8 - .../Core/IPC_HLE/WII_IPC_HLE_Device_stm.cpp | 1 - .../IPC_HLE/WII_IPC_HLE_Device_usb_bt_emu.cpp | 4 - .../IPC_HLE/WII_IPC_HLE_Device_usb_kbd.cpp | 3 - .../IPC_HLE/WII_IPC_HLE_Device_usb_ven.cpp | 2 - 10 files changed, 248 insertions(+), 92 deletions(-) diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.cpp index 0a3d9cf9a3..e4b33e12d7 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.cpp @@ -2,12 +2,16 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include "Core/IPC_HLE/WII_IPC_HLE.h" +#include + +#include "Common/Logging/Log.h" #include "Common/StringUtil.h" #include "Core/HW/Memmap.h" #include "Core/HW/SystemTimers.h" +#include "Core/IPC_HLE/WII_IPC_HLE.h" #include "Core/IPC_HLE/WII_IPC_HLE_Device.h" +// TODO: remove this once all device classes have been migrated. SIOCtlVBuffer::SIOCtlVBuffer(const u32 address) : m_Address(address) { // These are the Ioctlv parameters in the IOS communication. The BufferVector @@ -46,6 +50,116 @@ SIOCtlVBuffer::SIOCtlVBuffer(const u32 address) : m_Address(address) } } +IOSRequest::IOSRequest(const u32 address_) : address(address_) +{ + command = static_cast(Memory::Read_U32(address)); + fd = Memory::Read_U32(address + 8); +} + +void IOSRequest::SetReturnValue(const s32 new_return_value) const +{ + Memory::Write_U32(static_cast(new_return_value), address + 4); +} + +IOSOpenRequest::IOSOpenRequest(const u32 address_) : IOSRequest(address_) +{ + path = Memory::GetString(Memory::Read_U32(address + 0xc)); + flags = static_cast(Memory::Read_U32(address + 0x10)); +} + +IOSReadWriteRequest::IOSReadWriteRequest(const u32 address_) : IOSRequest(address_) +{ + buffer = Memory::Read_U32(address + 0xc); + size = Memory::Read_U32(address + 0x10); +} + +IOSSeekRequest::IOSSeekRequest(const u32 address_) : IOSRequest(address_) +{ + offset = Memory::Read_U32(address + 0xc); + mode = static_cast(Memory::Read_U32(address + 0x10)); +} + +IOSIOCtlRequest::IOSIOCtlRequest(const u32 address_) : IOSRequest(address_) +{ + request = Memory::Read_U32(address + 0x0c); + buffer_in = Memory::Read_U32(address + 0x10); + buffer_in_size = Memory::Read_U32(address + 0x14); + buffer_out = Memory::Read_U32(address + 0x18); + buffer_out_size = Memory::Read_U32(address + 0x1c); +} + +IOSIOCtlVRequest::IOSIOCtlVRequest(const u32 address_) : IOSRequest(address_) +{ + request = Memory::Read_U32(address + 0x0c); + const u32 in_number = Memory::Read_U32(address + 0x10); + const u32 out_number = Memory::Read_U32(address + 0x14); + const u32 vectors_base = Memory::Read_U32(address + 0x18); // address to vectors + + u32 offset = 0; + for (size_t i = 0; i < (in_number + out_number); ++i) + { + IOVector vector; + vector.address = Memory::Read_U32(vectors_base + offset); + vector.size = Memory::Read_U32(vectors_base + offset + 4); + offset += 8; + if (i < in_number) + in_vectors.emplace_back(vector); + else + io_vectors.emplace_back(vector); + } +} + +bool IOSIOCtlVRequest::HasInputVectorWithAddress(const u32 vector_address) const +{ + return std::any_of(in_vectors.begin(), in_vectors.end(), + [&](const auto& in_vector) { return in_vector.address == vector_address; }); +} + +void IOSIOCtlRequest::Log(const std::string& device_name, LogTypes::LOG_TYPE type, + LogTypes::LOG_LEVELS verbosity) const +{ + GENERIC_LOG(type, verbosity, "%s (fd %u) - IOCtl 0x%x (in_size=0x%x, out_size=0x%x)", + device_name.c_str(), fd, request, buffer_in_size, buffer_out_size); +} + +void IOSIOCtlRequest::Dump(const std::string& description, LogTypes::LOG_TYPE type, + LogTypes::LOG_LEVELS level) const +{ + Log("===== " + description, type, level); + GENERIC_LOG(type, level, "In buffer\n%s", + HexDump(Memory::GetPointer(buffer_in), buffer_in_size).c_str()); + GENERIC_LOG(type, level, "Out buffer\n%s", + HexDump(Memory::GetPointer(buffer_out), buffer_out_size).c_str()); +} + +void IOSIOCtlRequest::DumpUnknown(const std::string& description, LogTypes::LOG_TYPE type, + LogTypes::LOG_LEVELS level) const +{ + Dump("Unknown IOCtl - " + description, type, level); +} + +void IOSIOCtlVRequest::Dump(const std::string& description, LogTypes::LOG_TYPE type, + LogTypes::LOG_LEVELS level) const +{ + GENERIC_LOG(type, level, "===== %s (fd %u) - IOCtlV 0x%x (%zu in, %zu io)", description.c_str(), + fd, request, in_vectors.size(), io_vectors.size()); + + size_t i = 0; + for (const auto& vector : in_vectors) + GENERIC_LOG(type, level, "in[%zu] (size=0x%x):\n%s", i++, vector.size, + HexDump(Memory::GetPointer(vector.address), vector.size).c_str()); + + i = 0; + for (const auto& vector : io_vectors) + GENERIC_LOG(type, level, "io[%zu] (size=0x%x)", i++, vector.size); +} + +void IOSIOCtlVRequest::DumpUnknown(const std::string& description, LogTypes::LOG_TYPE type, + LogTypes::LOG_LEVELS level) const +{ + Dump("Unknown IOCtlV - " + description, type, level); +} + IWII_IPC_HLE_Device::IWII_IPC_HLE_Device(const u32 device_id, const std::string& device_name, const DeviceType type) : m_name(device_name), m_device_id(device_id), m_device_type(type) @@ -66,18 +180,35 @@ void IWII_IPC_HLE_Device::DoStateShared(PointerWrap& p) p.Do(m_is_active); } +// TODO: remove the wrappers once all device classes have been migrated. +IOSReturnCode IWII_IPC_HLE_Device::Open(const IOSOpenRequest& request) +{ + Open(request.address, request.flags); + return static_cast(Memory::Read_U32(request.address + 4)); +} + IPCCommandResult IWII_IPC_HLE_Device::Open(u32 command_address, u32 mode) { m_is_active = true; return GetDefaultReply(); } +void IWII_IPC_HLE_Device::Close() +{ + Close(0, true); +} + IPCCommandResult IWII_IPC_HLE_Device::Close(u32 command_address, bool force) { m_is_active = false; return GetDefaultReply(); } +IPCCommandResult IWII_IPC_HLE_Device::Seek(const IOSSeekRequest& request) +{ + return Seek(request.address); +} + IPCCommandResult IWII_IPC_HLE_Device::Seek(u32 command_address) { WARN_LOG(WII_IPC_HLE, "%s does not support Seek()", m_name.c_str()); @@ -85,6 +216,11 @@ IPCCommandResult IWII_IPC_HLE_Device::Seek(u32 command_address) return GetDefaultReply(); } +IPCCommandResult IWII_IPC_HLE_Device::Read(const IOSReadWriteRequest& request) +{ + return Read(request.address); +} + IPCCommandResult IWII_IPC_HLE_Device::Read(u32 command_address) { WARN_LOG(WII_IPC_HLE, "%s does not support Read()", m_name.c_str()); @@ -92,6 +228,11 @@ IPCCommandResult IWII_IPC_HLE_Device::Read(u32 command_address) return GetDefaultReply(); } +IPCCommandResult IWII_IPC_HLE_Device::Write(const IOSReadWriteRequest& request) +{ + return Write(request.address); +} + IPCCommandResult IWII_IPC_HLE_Device::Write(u32 command_address) { WARN_LOG(WII_IPC_HLE, "%s does not support Write()", m_name.c_str()); @@ -99,6 +240,11 @@ IPCCommandResult IWII_IPC_HLE_Device::Write(u32 command_address) return GetDefaultReply(); } +IPCCommandResult IWII_IPC_HLE_Device::IOCtl(const IOSIOCtlRequest& request) +{ + return IOCtl(request.address); +} + IPCCommandResult IWII_IPC_HLE_Device::IOCtl(u32 command_address) { WARN_LOG(WII_IPC_HLE, "%s does not support IOCtl()", m_name.c_str()); @@ -106,6 +252,11 @@ IPCCommandResult IWII_IPC_HLE_Device::IOCtl(u32 command_address) return GetDefaultReply(); } +IPCCommandResult IWII_IPC_HLE_Device::IOCtlV(const IOSIOCtlVRequest& request) +{ + return IOCtlV(request.address); +} + IPCCommandResult IWII_IPC_HLE_Device::IOCtlV(u32 command_address) { WARN_LOG(WII_IPC_HLE, "%s does not support IOCtlV()", m_name.c_str()); @@ -125,57 +276,3 @@ IPCCommandResult IWII_IPC_HLE_Device::GetNoReply() { return {false, 0}; } - -// Write out the IPC struct from command_address to num_commands numbers -// of 4 byte commands. -void IWII_IPC_HLE_Device::DumpCommands(u32 command_address, size_t num_commands, - LogTypes::LOG_TYPE log_type, LogTypes::LOG_LEVELS verbosity) -{ - GENERIC_LOG(log_type, verbosity, "CommandDump of %s", GetDeviceName().c_str()); - for (u32 i = 0; i < num_commands; i++) - { - GENERIC_LOG(log_type, verbosity, " Command%02i: 0x%08x", i, - Memory::Read_U32(command_address + i * 4)); - } -} - -void IWII_IPC_HLE_Device::DumpAsync(u32 buffer_vector, u32 number_in_buffer, u32 number_io_buffer, - LogTypes::LOG_TYPE log_type, LogTypes::LOG_LEVELS verbosity) -{ - GENERIC_LOG(log_type, verbosity, "======= DumpAsync ======"); - - u32 BufferOffset = buffer_vector; - for (u32 i = 0; i < number_in_buffer; i++) - { - u32 InBuffer = Memory::Read_U32(BufferOffset); - BufferOffset += 4; - u32 InBufferSize = Memory::Read_U32(BufferOffset); - BufferOffset += 4; - - GENERIC_LOG(log_type, LogTypes::LINFO, "%s - IOCtlV InBuffer[%i]:", GetDeviceName().c_str(), i); - - std::string Temp; - for (u32 j = 0; j < InBufferSize; j++) - { - Temp += StringFromFormat("%02x ", Memory::Read_U8(InBuffer + j)); - } - - GENERIC_LOG(log_type, LogTypes::LDEBUG, " Buffer: %s", Temp.c_str()); - } - - for (u32 i = 0; i < number_io_buffer; i++) - { - u32 OutBuffer = Memory::Read_U32(BufferOffset); - BufferOffset += 4; - u32 OutBufferSize = Memory::Read_U32(BufferOffset); - BufferOffset += 4; - - GENERIC_LOG(log_type, LogTypes::LINFO, "%s - IOCtlV OutBuffer[%i]:", GetDeviceName().c_str(), - i); - GENERIC_LOG(log_type, LogTypes::LINFO, " OutBuffer: 0x%08x (0x%x):", OutBuffer, - OutBufferSize); - - if (verbosity >= LogTypes::LOG_LEVELS::LINFO) - DumpCommands(OutBuffer, OutBufferSize, log_type, verbosity); - } -} diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h index 2894ba2bd3..b56b6ba4ec 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device.h @@ -11,7 +11,6 @@ #include "Common/ChunkFile.h" #include "Common/CommonTypes.h" #include "Common/Logging/Log.h" -#include "Common/StringUtil.h" #include "Core/IPC_HLE/WII_IPC_HLE.h" enum IOSReturnCode : s32 @@ -42,6 +41,7 @@ enum IOSReturnCode : s32 }; // A struct for IOS ioctlv calls +// TODO: remove this once nothing uses this anymore. struct SIOCtlVBuffer { explicit SIOCtlVBuffer(u32 address); @@ -59,6 +59,91 @@ struct SIOCtlVBuffer std::vector PayloadBuffer; }; +struct IOSRequest +{ + u32 address = 0; + IPCCommandType command = IPC_CMD_OPEN; + u32 fd = 0; + explicit IOSRequest(u32 address); + virtual ~IOSRequest() = default; + void SetReturnValue(s32 new_return_value) const; +}; + +enum IOSOpenMode : s32 +{ + IOS_OPEN_READ = 1, + IOS_OPEN_WRITE = 2, + IOS_OPEN_RW = (IOS_OPEN_READ | IOS_OPEN_WRITE) +}; + +struct IOSOpenRequest final : IOSRequest +{ + std::string path; + IOSOpenMode flags = IOS_OPEN_READ; + explicit IOSOpenRequest(u32 address); +}; + +struct IOSReadWriteRequest final : IOSRequest +{ + u32 buffer = 0; + u32 size = 0; + explicit IOSReadWriteRequest(u32 address); +}; + +struct IOSSeekRequest final : IOSRequest +{ + enum SeekMode + { + IOS_SEEK_SET = 0, + IOS_SEEK_CUR = 1, + IOS_SEEK_END = 2, + }; + u32 offset = 0; + SeekMode mode = IOS_SEEK_SET; + explicit IOSSeekRequest(u32 address); +}; + +struct IOSIOCtlRequest final : IOSRequest +{ + u32 request = 0; + u32 buffer_in = 0; + u32 buffer_in_size = 0; + // Contrary to the name, the output buffer can also be used for input. + u32 buffer_out = 0; + u32 buffer_out_size = 0; + explicit IOSIOCtlRequest(u32 address); + void Log(const std::string& description, LogTypes::LOG_TYPE type = LogTypes::WII_IPC_HLE, + LogTypes::LOG_LEVELS level = LogTypes::LINFO) const; + void Dump(const std::string& description, LogTypes::LOG_TYPE type = LogTypes::WII_IPC_HLE, + LogTypes::LOG_LEVELS level = LogTypes::LINFO) const; + void DumpUnknown(const std::string& description, LogTypes::LOG_TYPE type = LogTypes::WII_IPC_HLE, + LogTypes::LOG_LEVELS level = LogTypes::LERROR) const; +}; + +struct IOSIOCtlVRequest final : IOSRequest +{ + struct IOVector + { + u32 address = 0; + u32 size = 0; + }; + u32 request = 0; + // In vectors are *mostly* used for input buffers. Sometimes they are also used as + // output buffers (notably in the network code). + // IO vectors are *mostly* used for output buffers. However, as indicated in the name, + // they're also used as input buffers. + // So both of them are technically IO vectors. But we're keeping them separated because + // merging them into a single std::vector would make using the first out vector more complicated. + std::vector in_vectors; + std::vector io_vectors; + explicit IOSIOCtlVRequest(u32 address); + bool HasInputVectorWithAddress(u32 vector_address) const; + void Dump(const std::string& description, LogTypes::LOG_TYPE type = LogTypes::WII_IPC_HLE, + LogTypes::LOG_LEVELS level = LogTypes::LINFO) const; + void DumpUnknown(const std::string& description, LogTypes::LOG_TYPE type = LogTypes::WII_IPC_HLE, + LogTypes::LOG_LEVELS level = LogTypes::LERROR) const; +}; + class IWII_IPC_HLE_Device { public: @@ -79,6 +164,16 @@ public: const std::string& GetDeviceName() const { return m_name; } u32 GetDeviceID() const { return m_device_id; } + // Replies to Open and Close requests are sent by WII_IPC_HLE, not by the devices themselves. + virtual IOSReturnCode Open(const IOSOpenRequest& request); + virtual void Close(); + virtual IPCCommandResult Seek(const IOSSeekRequest& request); + virtual IPCCommandResult Read(const IOSReadWriteRequest& request); + virtual IPCCommandResult Write(const IOSReadWriteRequest& request); + virtual IPCCommandResult IOCtl(const IOSIOCtlRequest& request); + virtual IPCCommandResult IOCtlV(const IOSIOCtlVRequest& request); + + // TODO: remove these once all device classes have been migrated. virtual IPCCommandResult Open(u32 command_address, u32 mode); virtual IPCCommandResult Close(u32 command_address, bool force = false); virtual IPCCommandResult Seek(u32 command_address); @@ -99,14 +194,4 @@ protected: u32 m_device_id; DeviceType m_device_type; bool m_is_active = false; - - // Write out the IPC struct from command_address to number_of_commands numbers - // of 4 byte commands. - void DumpCommands(u32 command_address, size_t number_of_commands = 8, - LogTypes::LOG_TYPE log_type = LogTypes::WII_IPC_HLE, - LogTypes::LOG_LEVELS verbosity = LogTypes::LDEBUG); - - void DumpAsync(u32 buffer_vector, u32 number_in_buffer, u32 number_io_buffer, - LogTypes::LOG_TYPE log_type = LogTypes::WII_IPC_HLE, - LogTypes::LOG_LEVELS verbosity = LogTypes::LDEBUG); }; diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp index 8cd1f853a4..972dc6ea35 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp @@ -308,9 +308,6 @@ IPCCommandResult CWII_IPC_HLE_Device_FileIO::Write(u32 _CommandAddress) IPCCommandResult CWII_IPC_HLE_Device_FileIO::IOCtl(u32 _CommandAddress) { DEBUG_LOG(WII_IPC_FILEIO, "FileIO: IOCtl (Device=%s)", m_name.c_str()); -#if defined(_DEBUG) || defined(DEBUGFAST) - DumpCommands(_CommandAddress); -#endif const u32 Parameter = Memory::Read_U32(_CommandAddress + 0xC); u32 ReturnValue = 0; diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp index dd20bbdb7d..c190bfdc63 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_es.cpp @@ -1282,7 +1282,6 @@ IPCCommandResult CWII_IPC_HLE_Device_es::IOCtlV(u32 _CommandAddress) default: INFO_LOG(WII_IPC_ES, "CWII_IPC_HLE_Device_es: 0x%x", Buffer.Parameter); - DumpCommands(_CommandAddress, 8, LogTypes::WII_IPC_ES); INFO_LOG(WII_IPC_ES, "command.Parameter: 0x%08x", Buffer.Parameter); break; } diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp index ffb1d08103..829c5ff873 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_hid.cpp @@ -296,10 +296,6 @@ IPCCommandResult CWII_IPC_HLE_Device_hid::IOCtlV(u32 _CommandAddress) INFO_LOG(WII_IPC_HID, " BufferVector: 0x%08x", CommandBuffer.BufferVector); INFO_LOG(WII_IPC_HID, " PayloadAddr: 0x%08x", CommandBuffer.PayloadBuffer[0].m_Address); INFO_LOG(WII_IPC_HID, " PayloadSize: 0x%08x", CommandBuffer.PayloadBuffer[0].m_Size); -#if defined(_DEBUG) || defined(DEBUGFAST) - DumpAsync(CommandBuffer.BufferVector, CommandBuffer.NumberInBuffer, - CommandBuffer.NumberPayloadBuffer); -#endif Memory::Write_U32(ReturnValue, _CommandAddress + 4); return GetDefaultReply(); diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp index be712534cd..0a7bcf82cc 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_sdio_slot0.cpp @@ -204,11 +204,6 @@ IPCCommandResult CWII_IPC_HLE_Device_sdio_slot0::IOCtl(u32 _CommandAddress) break; } - // INFO_LOG(WII_IPC_SD, "InBuffer"); - // DumpCommands(BufferIn, BufferInSize / 4, LogTypes::WII_IPC_SD); - // INFO_LOG(WII_IPC_SD, "OutBuffer"); - // DumpCommands(BufferOut, BufferOutSize/4, LogTypes::WII_IPC_SD); - if (ReturnValue == RET_EVENT_REGISTER) { // async @@ -265,9 +260,6 @@ IPCCommandResult CWII_IPC_HLE_Device_sdio_slot0::IOCtlV(u32 _CommandAddress) break; } - // DumpAsync(CommandBuffer.BufferVector, CommandBuffer.NumberInBuffer, - // CommandBuffer.NumberPayloadBuffer, LogTypes::WII_IPC_SD); - Memory::Write_U32(ReturnValue, _CommandAddress + 0x4); return GetDefaultReply(); diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_stm.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_stm.cpp index 07d2747ba0..77f250a719 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_stm.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_stm.cpp @@ -59,7 +59,6 @@ IPCCommandResult CWII_IPC_HLE_Device_stm_immediate::IOCtl(u32 command_address) case IOCTL_STM_VIDIMMING: // (Input: 20 bytes, Output: 20 bytes) INFO_LOG(WII_IPC_STM, "%s - IOCtl:", GetDeviceName().c_str()); INFO_LOG(WII_IPC_STM, " IOCTL_STM_VIDIMMING"); - // DumpCommands(buffer_in, buffer_in_size / 4, LogTypes::WII_IPC_STM); // Memory::Write_U32(1, buffer_out); // return_value = 1; break; diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_emu.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_emu.cpp index f81169a140..7902659c7c 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_emu.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_bt_emu.cpp @@ -268,10 +268,6 @@ IPCCommandResult CWII_IPC_HLE_Device_usb_oh1_57e_305_emu::IOCtlV(u32 _CommandAdd INFO_LOG(WII_IPC_WIIMOTE, " BufferVector: 0x%08x", CommandBuffer.BufferVector); INFO_LOG(WII_IPC_WIIMOTE, " PayloadAddr: 0x%08x", CommandBuffer.PayloadBuffer[0].m_Address); INFO_LOG(WII_IPC_WIIMOTE, " PayloadSize: 0x%08x", CommandBuffer.PayloadBuffer[0].m_Size); -#if defined(_DEBUG) || defined(DEBUGFAST) - DumpAsync(CommandBuffer.BufferVector, CommandBuffer.NumberInBuffer, - CommandBuffer.NumberPayloadBuffer); -#endif } break; } diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.cpp index ed8c3df786..2634dbcf8d 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_kbd.cpp @@ -73,9 +73,6 @@ IPCCommandResult CWII_IPC_HLE_Device_usb_kbd::Close(u32 _CommandAddress, bool _b IPCCommandResult CWII_IPC_HLE_Device_usb_kbd::Write(u32 _CommandAddress) { DEBUG_LOG(WII_IPC_HLE, "Ignoring write to CWII_IPC_HLE_Device_usb_kbd"); -#if defined(_DEBUG) || defined(DEBUGFAST) - DumpCommands(_CommandAddress, 10, LogTypes::WII_IPC_HLE, LogTypes::LDEBUG); -#endif return GetDefaultReply(); } diff --git a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_ven.cpp b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_ven.cpp index a613e39242..d448c38586 100644 --- a/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_ven.cpp +++ b/Source/Core/Core/IPC_HLE/WII_IPC_HLE_Device_usb_ven.cpp @@ -25,8 +25,6 @@ IPCCommandResult CWII_IPC_HLE_Device_usb_ven::IOCtlV(u32 command_address) INFO_LOG(OSHLE, " NumberIn: 0x%08x", command_buffer.NumberInBuffer); INFO_LOG(OSHLE, " NumberOut: 0x%08x", command_buffer.NumberPayloadBuffer); INFO_LOG(OSHLE, " BufferVector: 0x%08x", command_buffer.BufferVector); - DumpAsync(command_buffer.BufferVector, command_buffer.NumberInBuffer, - command_buffer.NumberPayloadBuffer); Memory::Write_U32(0, command_address + 4); return GetNoReply();