add a stub in for /dev/oh0 (the external USB bus). It would be nice

to support this using libusb someday.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1837 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
bushing 2009-01-09 12:09:03 +00:00
parent ecb18e8392
commit 96f9e7a82e
3 changed files with 62 additions and 1 deletions

View File

@ -175,6 +175,10 @@ IWII_IPC_HLE_Device* CreateDevice(u32 _DeviceID, const std::string& _rDeviceName
else if (_rDeviceName.find("/dev/usb/oh1/57e/305") != std::string::npos) else if (_rDeviceName.find("/dev/usb/oh1/57e/305") != std::string::npos)
{ {
pDevice = new CWII_IPC_HLE_Device_usb_oh1_57e_305(_DeviceID, _rDeviceName); pDevice = new CWII_IPC_HLE_Device_usb_oh1_57e_305(_DeviceID, _rDeviceName);
}
else if (_rDeviceName.find("/dev/usb/oh0") != std::string::npos)
{
pDevice = new CWII_IPC_HLE_Device_usb_oh0(_DeviceID, _rDeviceName);
} }
else if (_rDeviceName.find("/dev/sdio/slot0") != std::string::npos) else if (_rDeviceName.find("/dev/sdio/slot0") != std::string::npos)
{ {

View File

@ -1886,3 +1886,45 @@ void CWII_IPC_HLE_Device_usb_oh1_57e_305::LOG_LinkKey(const u8* _pLinkKey)
, _pLinkKey[8], _pLinkKey[9], _pLinkKey[10], _pLinkKey[11], _pLinkKey[12], _pLinkKey[13], _pLinkKey[14], _pLinkKey[15]); , _pLinkKey[8], _pLinkKey[9], _pLinkKey[10], _pLinkKey[11], _pLinkKey[12], _pLinkKey[13], _pLinkKey[14], _pLinkKey[15]);
} }
CWII_IPC_HLE_Device_usb_oh0::CWII_IPC_HLE_Device_usb_oh0(u32 _DeviceID, const std::string& _rDeviceName)
: IWII_IPC_HLE_Device(_DeviceID, _rDeviceName)
{
}
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
}
// ===================================================
/* IOCtlV */
// ----------------
bool CWII_IPC_HLE_Device_usb_oh0::IOCtlV(u32 _CommandAddress)
{
// write return value
Memory::Write_U32(0, _CommandAddress + 0x4);
return true;
}
// ================

View File

@ -216,5 +216,20 @@ private:
void LOG_LinkKey(const u8* _pLinkKey); void LOG_LinkKey(const u8* _pLinkKey);
}; };
#endif class CWII_IPC_HLE_Device_usb_oh0 : public IWII_IPC_HLE_Device
{
public:
CWII_IPC_HLE_Device_usb_oh0(u32 _DeviceID, const std::string& _rDeviceName);
virtual ~CWII_IPC_HLE_Device_usb_oh0();
virtual bool Open(u32 _CommandAddress, u32 _Mode);
virtual bool IOCtlV(u32 _CommandAddress);
virtual bool IOCtl(u32 _CommandAddress);
// virtual u32 Update();
#endif
};