Wednesday, August 11, 2010

Comments on Beta 2 and a refresh to the second beta.

As a first note, I'd like to comment that I've uploaded a beta 2 refresh. This is to solve a very small yet annoying bug I had missed: OS_WII was not being defined (ups!). It also includes small updates to libjoy and mod_joy coming from upstream.

As for the changes included in beta 2 with regard to beta 1, I'll highlight a few:

  • Exported mod_wm symbols. These where being compiled, but I forgot to export them, so they were unusable.
  • I also touched get_desktop_size() to return the size of the mode SDL has set. I wanted to have this return the Wii's native resolution for you, but this seems to not be easy as of now, so at least you've got a mode you can set_mode() to.
  • I also changed the dependency map so mod_mouse and mod_wpad both now depend on libjoy. This is to ensure correct hardware initialization and to improve compatibility with newer versions of the Homebrew Channel.
  • Speaking of mod_wpad, I improved it a bit. Now you can check if a particular controller has a Guitar Hero 3 guitar or a Classic Controller attached to it with:
    • WPAD_INFO(int channel, WPAD_HAS_GUITAR);
    • WPAD_INFO(int channel, WPAD_HAS_CLASSIC);
  • A few corresponding functions has been added to query those devices:
    • WPAD_INFO_CLASSIC(int channel, int info);
    • WPAD_INFO_GUITAR(int channel, int info);
  • info can (as of now) only retrieve the battery level from those, with the value:
  • mod_wpad can now also report the acceleration, as read from the Nunchuk. Please remind that the Nunchuk can only read acceleration in one axis, the rest will be 0. To get those readings, use:
    • WPAD_INFO_NUNCHUK(int channel, int ACCELX);
    • WPAD_INFO_NUNCHUK(int channel, int ACCELY); and
    • WPAD_INFO_NUNCHUK(int channel, int ACCELZ);
  • We can now also read the orientation of the Wiimote (in thousandths of a degree, I must double check this is coherent with Bennu's way of doing things). This works with WPAD_INFO_NUNCHUK() too but again, the results will only be valid on certain axes. Here are the new functions:
    • WPAD_INFO(int channel, int WPAD_GX);
    • WPAD_INFO(int channel, int WPAD_GY); and
    • WPAD_INFO(int channel, int WPAD_GZ);
I believe that's pretty much it for the changes. Bugs have been solved, and some initial work has been done on integrating more unofficial modules, namely mod_image, mod_iconv and mod_sqlite3. But that's incomplete and has not been compiled into this release.

For a real example on how to use the new mod_wpad functionality, check this examples code.

Also, mod_debug has been left out in this release just because it makes the binaries bigger and I believe it'd be a pain to try to use it in a real Wii. If you need those, please let me know and I'll send you a copy of the binaries with mod_debug integrated.

I believe that's pretty much it, as always, you can get the binaries for the beta from the google code page.

No comments: