diff options
| author | fires.gc <fires.gc@gmail.com> | 2009-03-13 16:10:58 +0000 |
|---|---|---|
| committer | fires.gc <fires.gc@gmail.com> | 2009-03-13 16:10:58 +0000 |
| commit | b3a6208fccab9cdfb264fb123aeff2d82b0865ee (patch) | |
| tree | 7683dabe8aef616abbc766b51ae827db65835db4 /Source | |
| parent | 727f74fc9d320f27b475ff74fae02807f67e7f79 (diff) | |
added dummy device for keyboard
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2650 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.cpp | 58 | ||||
| -rw-r--r-- | Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_usb.h | 23 |
2 files changed, 65 insertions, 16 deletions
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 eeeba7e9d5..94962bb7fd 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 @@ -1953,6 +1953,13 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::LOG_LinkKey(const u8* _pLinkKey) } +//////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// CWII_IPC_HLE_Device_usb_oh0 +// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + CWII_IPC_HLE_Device_usb_oh0::CWII_IPC_HLE_Device_usb_oh0(u32 _DeviceID, const std::string& _rDeviceName) : IWII_IPC_HLE_Device(_DeviceID, _rDeviceName) { @@ -1960,31 +1967,20 @@ CWII_IPC_HLE_Device_usb_oh0::CWII_IPC_HLE_Device_usb_oh0(u32 _DeviceID, const st CWII_IPC_HLE_Device_usb_oh0::~CWII_IPC_HLE_Device_usb_oh0() {} -/////////////////////////// - -// =================================================== -/* Open */ -// ---------------- bool CWII_IPC_HLE_Device_usb_oh0::Open(u32 _CommandAddress, u32 _Mode) { Memory::Write_U32(GetDeviceID(), _CommandAddress+4); return true; } - -// =================================================== -/* IOCtl */ -// ---------------- bool CWII_IPC_HLE_Device_usb_oh0::IOCtl(u32 _CommandAddress) { - return IOCtlV(_CommandAddress); //hack + // write return value + Memory::Write_U32(0, _CommandAddress + 0x4); + return true; } - -// =================================================== -/* IOCtlV */ -// ---------------- bool CWII_IPC_HLE_Device_usb_oh0::IOCtlV(u32 _CommandAddress) { // write return value @@ -1992,5 +1988,37 @@ bool CWII_IPC_HLE_Device_usb_oh0::IOCtlV(u32 _CommandAddress) return true; } -// ================ + +//////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// +// CWII_IPC_HLE_Device_usb_kbd +// +//////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +CWII_IPC_HLE_Device_usb_kbd::CWII_IPC_HLE_Device_usb_kbd(u32 _DeviceID, const std::string& _rDeviceName) +: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName) +{ +} + +CWII_IPC_HLE_Device_usb_kbd::~CWII_IPC_HLE_Device_usb_kbd() +{} + +bool CWII_IPC_HLE_Device_usb_kbd::Open(u32 _CommandAddress, u32 _Mode) +{ + Memory::Write_U32(GetDeviceID(), _CommandAddress+4); + return true; +} + +bool CWII_IPC_HLE_Device_usb_kbd::IOCtl(u32 _CommandAddress) +{ + u32 Parameter = Memory::Read_U32(_CommandAddress +0x0C); + u32 BufferIn = Memory::Read_U32(_CommandAddress + 0x10); + u32 BufferInSize = Memory::Read_U32(_CommandAddress + 0x14); + u32 BufferOut = Memory::Read_U32(_CommandAddress + 0x18); + u32 BufferOutSize = Memory::Read_U32(_CommandAddress + 0x1C); + + ERROR_LOG(WII_IPC, "USB_KBD not implemented: parameter %i", Parameter); + Memory::Write_U32(0, _CommandAddress + 0x4); + return true; +} 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 baf0079357..4267a9c92b 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 @@ -232,6 +232,27 @@ public: virtual bool IOCtl(u32 _CommandAddress); // virtual u32 Update(); -#endif }; +class CWII_IPC_HLE_Device_usb_kbd : public IWII_IPC_HLE_Device +{ +public: + + CWII_IPC_HLE_Device_usb_kbd(u32 _DeviceID, const std::string& _rDeviceName); + + virtual ~CWII_IPC_HLE_Device_usb_kbd(); + + virtual bool Open(u32 _CommandAddress, u32 _Mode); + + virtual bool IOCtl(u32 _CommandAddress); +}; + +#endif + + + + + + + + |
