Hextwelve

From WiiBrew
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
hextwelve
General
Author(s)theStack, lewurm
LicenceGPL2
Links
Download
Discussion
Source
Peripherals
WiiDrawing.svg USB Keyboard USBGecko2.svg

hextwelve is a simple Host Controller Driver for both Wiis OHCI controllers, based on Team Twiizers mini/ppcskel (aka BootMii). As the original goal of the project is just to faciliate the (IOS-independent) usage of an USB keyboard, it currently supports only control and interrupt transfers, which lays the groundwork for supporting other HID class devices as well.

Features

  • simple OHCI driver, supports control and interrupt transfers (through AHPBROT)
  • HID keyboard driver, but only for keyboards that support the boot protocol
  • lsusb-like output for low- and fullspeed devices (per USB gecko only)
  • not so important, but worth mentioning for interested developers: improved ppcskel that can be used as basis for other project, including SHA1 engine support (using AHPBROT) and a simple interrupt handler (including hollywood IRQs)

May more or less easy to achieve

  • a nice keyboard driver ;)
  • mouse support should be easy (assuming it supports the boot protocol)
  • Bulk transfers, so stoarge support could be implemented (save NAND backup to usb stick?)
  • wii mote support, but I think this is far away

Feel free to contribute!


Video

demo0:


Known Issues

  • Quirk for endpoint transfers: We have to wait about 11ms(!) for the host controller every time we start an endpoint transfer. This is pretty bad, so this need further review.
  • Sometimes my keyboard won't send characters and just [a-zA-Z0-9] will work. I don't really care atm ;)
  • The last character of a device string get lost (see @ usb gecko output)

Download

  • get compiled ppc file here and copy it on your SD card to /bootmii/ or use a usb gecko to upload it.
    • plug in any low- or fullspeed device to so a lsusb-like output on gecko
    • plug in a usb keyboard. keep in mind, it must support the boot protocol. check it with
 lsusb -v | grep -i boot 
    • type some characters :)
    • press reset button to boot sysmenu
  • source @ github

License & Warnings

GPL2 (derived from ppcskel)

!!!USE IT ON YOUR OWN RISK!!!

Thanks to

  • Christian El-Salloum - for giving us the possibility to use this project as internship at university
  • Team Twiizers & Co. - well, for making homebrew software possible at all, and plenty of other genius hacks, in our case especially BootMii
  • Benedikt Sauter - for his very well written diploma thesis about USB and his "usbport" project which inspired us in writing our usb stack
  • MIKE Kernel Team - for their OHCI kernel code Wii adaptions, especially concerning quirks
  • Linus Torvalds - for creating that genius tool called "git" that we joyfully used as source code management tool for our project, and of course for Linux (see next point)
  • Linux Kernel Team (last, but not least) - for providing and consistently improving such an awesome operating system we use day-to-day, and well, for writing a stable OHCI-driver that helped us in developing our stack

Name

0x12 was the first byte we received through the host controller