From 0849a96d815ee0695c442ba1182594ffb97b72da Mon Sep 17 00:00:00 2001 From: masken Date: Sat, 23 Aug 2008 14:53:33 +0000 Subject: [PATCH] Added SYSCONF files. Fixed the return value of FileIO::Read(). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@281 8ced0084-cf51-0410-be5f-012b33b47a6e --- Binary/win32/WII/shared2/sys/SYSCONF | Bin 0 -> 16384 bytes Binary/win32/WII/shared2/sys/readme.txt | 1 + .../title/00000001/00000002/data/setting.txt | Bin 0 -> 256 bytes Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp | 2 +- .../Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp | 6 +++--- .../Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.h | 9 +++++++++ .../Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp | 5 +++++ .../Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h | 1 + 8 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 Binary/win32/WII/shared2/sys/SYSCONF create mode 100644 Binary/win32/WII/shared2/sys/readme.txt create mode 100644 Binary/win32/WII/title/00000001/00000002/data/setting.txt diff --git a/Binary/win32/WII/shared2/sys/SYSCONF b/Binary/win32/WII/shared2/sys/SYSCONF new file mode 100644 index 0000000000000000000000000000000000000000..8925006cdb5d1efed05552aae11b02a54b594276 GIT binary patch literal 16384 zcmeIuF%Cok6h+a`3T8^3N-1msk!Um|vjT-erV)wVYuJJEyyh0KJ5zg9k;EtN70q0B z!`LU^G&>`H>$?5-C9j`f2@oJafB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 o2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+0D<=fF7S2-E&u=k literal 0 HcmV?d00001 diff --git a/Binary/win32/WII/shared2/sys/readme.txt b/Binary/win32/WII/shared2/sys/readme.txt new file mode 100644 index 0000000000..140df0d38f --- /dev/null +++ b/Binary/win32/WII/shared2/sys/readme.txt @@ -0,0 +1 @@ +This SYSCONF file describes a single registered Wiimote, with the Bluetooth address used by Dolphin. diff --git a/Binary/win32/WII/title/00000001/00000002/data/setting.txt b/Binary/win32/WII/title/00000001/00000002/data/setting.txt new file mode 100644 index 0000000000000000000000000000000000000000..65f57c2ee985713476ac0b6e3483e6fe472e2176 GIT binary patch literal 256 LcmZQz7})>-0RR92 literal 0 HcmV?d00001 diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index 9292842e98..f80ec0559d 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -209,7 +209,7 @@ void ExecuteCommand(u32 _Address) // HLE - Create a new HLE device std::string DeviceName; Memory::GetString(DeviceName, Memory::Read_U32(_Address + 0xC)); - u32 Mode = (DeviceName, Memory::Read_U32(_Address+0x10)); + u32 Mode = Memory::Read_U32(_Address+0x10); u32 DeviceID = GetDeviceIDByName(DeviceName); if (DeviceID == 0) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp index 9c9f3c1b0b..b4c7a83d69 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp @@ -62,7 +62,7 @@ CWII_IPC_HLE_Device_FileIO::Open(u32 _CommandAddress) } else { - PanicAlert("CWII_IPC_HLE_Device_FileIO: cant open %s", Filename.c_str()); + //PanicAlert("CWII_IPC_HLE_Device_FileIO: cant open %s", Filename.c_str()); } Memory::Write_U32(GetDeviceID(), _CommandAddress+4); @@ -97,7 +97,7 @@ CWII_IPC_HLE_Device_FileIO::Read(u32 _CommandAddress) if (m_pFileHandle != NULL) { fread(Memory::GetPointer(Address), Size, 1, m_pFileHandle); - ReturnValue = 1; + ReturnValue = Size; LOG(WII_IPC_HLE, "FileIO reads from %s (Addr=0x%08x Size=0x%x)", GetDeviceName().c_str(), Address, Size); } else @@ -118,7 +118,7 @@ CWII_IPC_HLE_Device_FileIO::Write(u32 _CommandAddress) LOG(WII_IPC_HLE, "FileIO: Write (Device=%s)", GetDeviceName().c_str()); DumpCommands(_CommandAddress); - PanicAlert("CWII_IPC_HLE_Device_FileIO: Write (Device=%s)", GetDeviceName().c_str()); + //PanicAlert("CWII_IPC_HLE_Device_FileIO: Write (Device=%s)", GetDeviceName().c_str()); u32 ReturnValue = 1; Memory::Write_U32(ReturnValue, _CommandAddress + 0x4); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.h index 03eea3ef0d..4b665e5bdd 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_fs.h @@ -35,6 +35,15 @@ public: Memory::Write_U32(GetDeviceID(), _CommandAddress+4); return true; } + +#if 0 + virtual bool Close(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Close()", m_Name.c_str()); return true; } + virtual bool Seek(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Seek()", m_Name.c_str()); return true; } + virtual bool Read(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Read()", m_Name.c_str()); return true; } + virtual bool Write(u32 _CommandAddress) { _dbg_assert_msg_(WII_IPC_HLE, 0, "%s is not able to run Write()", m_Name.c_str()); return true; } +#endif + virtual bool IOCtl(u32 _CommandAddress) { return true; } + virtual bool IOCtlV(u32 _CommandAddress) { return true; } }; #endif diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp index 0c0ead2358..188e9880af 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp @@ -48,6 +48,11 @@ bool CWII_IPC_HLE_Device_usb_oh1_57e_305::Open(u32 _CommandAddress) return true; } +bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtl(u32 _CommandAddress) +{ + return IOCtlV(_CommandAddress); //hack +} + bool CWII_IPC_HLE_Device_usb_oh1_57e_305::IOCtlV(u32 _CommandAddress) { // wpadsampled.elf - patch so the USB_LOG will print somehting diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h index e9d989a546..3076060f07 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h @@ -52,6 +52,7 @@ public: virtual bool Open(u32 _CommandAddress); virtual bool IOCtlV(u32 _CommandAddress); + virtual bool IOCtl(u32 _CommandAddress); virtual u32 Update();