Difference between revisions of "/dev/usb/ven"

From WiiBrew
< /dev‎ | usb
Jump to: navigation, search
(I think OHCI0 is meant by OHC1 (OHCI1 wouldn't make sense, since it's /dev/usb/oh1))
Line 1: Line 1:
==Description==
+
{{stub}}
This device is used to communicate with the USB camera provided with the game "Your Shape".
 
Not much information is known at this time.
 
  
It is implemented by a module (USB_VEN) in IOS58. It appears to be able to generically address devices via OHCI0 or EHCI, by way of ioctl calls to /dev/usb/usb. It is accessed via several ioctl/ioctlvs. This information is incomplete, please fill it in when possible.
+
''/dev/usb/ven'' is an IOS resource manager that is used to interact with USB devices in IOS57, IOS58 and IOS59. It replaces [[:/dev/usb/oh0]], which is repurposed as an internal USB backend in these versions.
 +
 
 +
This device is implemented by the USB_VEN module, which is a thin wrapper around [[:/dev/usb/usb]].
 +
 
 +
VEN is often used by official games to communicate with USB cameras (such as ''Your Shape'') and microphones (in the newer singing games). It is also used by libogc for USB2 support.
  
 
All buffers must be in MEM2 (addr > 0x10000000) and aligned to a 32-byte boundary.  For all of the ioctlvs, the first buffer must be 64 bytes long.
 
All buffers must be in MEM2 (addr > 0x10000000) and aligned to a 32-byte boundary.  For all of the ioctlvs, the first buffer must be 64 bytes long.

Revision as of 14:33, 27 October 2017

/dev/usb/ven is an IOS resource manager that is used to interact with USB devices in IOS57, IOS58 and IOS59. It replaces /dev/usb/oh0, which is repurposed as an internal USB backend in these versions.

This device is implemented by the USB_VEN module, which is a thin wrapper around /dev/usb/usb.

VEN is often used by official games to communicate with USB cameras (such as Your Shape) and microphones (in the newer singing games). It is also used by libogc for USB2 support.

All buffers must be in MEM2 (addr > 0x10000000) and aligned to a 32-byte boundary. For all of the ioctlvs, the first buffer must be 64 bytes long.

Ioctls

Ioctlv Parameters Function Notes
0 0 / 0x20 (ioctl) ven_open
1 0 / 0x180 (ioctl) ven_attach_complete_callback
2 0 / 0 (ioctl) ven_close
3 0x20 / 0xC0 (ioctl) ? calls /dev/usb/usb ioctl 2
4 0x20 / 0 (ioctl) ?
5 0x20 / 0 (ioctl) ? indirectly calls /dev/usb/usb ioctl 1
6 0 / 0 (ioctl) ? calls /dev/usb/usb ioctl 1
7 0x20 / 0 (ioctl) ven_set_alt_setting calls /dev/usb/usb ioctl 5 and/or 0x11
8 0x20 / ? (ioctl) ? calls /dev/usb/usb ioctl 3
0x10 0x20 / 0 (ioctl) ven_suspend_resume, ven_attach_suspend_callback, ven_attach_get_device_params_callback calls /dev/usb/usb ioctl 4
0x11 0x20 / 0 (ioctl) ven_cancel_endpoint calls /dev/usb/usb ioctl 0x10
0x12 1 in / 1 io, or 2 in / 0 io? (ioctlv) ven_ctrl calls /dev/usb/usb ioctl 0x11
0x13 1/1 or 2/0? (ioctlv) ven_intr calls /dev/usb/usb ioctl 0x12
0x14 2/2 or 3/1 (ioctlv) ven_isoc calls /dev/usb/usb ioctl 0x13
0x15 ? (ioctlv) ven_? calls /dev/usb/usb ioctl 0x14