Showing posts with label mod_wm. Show all posts
Showing posts with label mod_wm. Show all posts

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:
    • WPAD_BATT
  • 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.

Wednesday, April 28, 2010

Progress

Even if I've not written about it lately, there's been some very interesting progress lately.
I released alpha 5 of Bennu, which includes and improved version of mod_wpad. This new version allows you to query your Wiimote for the raw accelerometer data, make it vibrate...
A few days later, my brother found the cause of the bug that was triggered when using save and load. I released alpha5~1 which solved it and integrated mod_iconv (a wrapper around iconv I created some time ago).

For alpha 6, I'm working on making module loading dependant on your code. Right now, all the bits from all the supported modules are loaded when you fire the interpreter.
This is suboptimal as you may end up initializing things you won't be using later; and memory is an important concern in this particular platform. So, from alpha 6 on, if you want to use the functions in -say- mod_wpad, you'll have to import it.
This'll make the code more compatible with upstream Bennu, and less cluttered.
Also, mod_wpad will be expanded to allow reading the data from the Nunchuk's accelerometers and a way to find the appropriate resolution for each Wii.

Now, some people have been working with the latest alphas in the BennuGD forums, and they've shown the things is quite usable, already.
Have a look at this video by BomberLink that shows an arcade game he's currently working on where he's using accelerometers to control the main character.

Also, Me Matsusaka has ported his KOF Flames of Courage v5 (a King of Fighters clone) to the Wii. You can get it here:
http://www.megaupload.com/?d=ZZKFY5VL

I have not tried it myself, but hope to do it this evening :)

Wednesday, March 31, 2010

libkey, mod_key & a few shots

I've integrated the keyboard handling functions. I've not tested them on a real Wii yet, but the same code in my Linux box seems to be working fine.

As I wrote earlier today, I wanted to share some screenshots of actual games with you.
The first one comes from a fighting game called "Fostiator" (don't ask) which is a very old fighting game that came as an example for the program that inspired Fenix and then Bennu:



The code is the same one you'll be using in your Wii and should work just like it, with the sole exception of the endianess bug that'd make colours look pretty broken right now.

The following screenshot comes from a game called "EEEEK! EEEEEK! HOOOOOOK!!!" by Gabriel Garrote and won the first BennuGD/GPH game programming contest. I had to patch this one a little bit so that it wouldn't use some functions found in mod_wm, but the rest of the code is untouched.







The main motivation behind testing this code is to be able to play some cool games in my computer. The "other" motivation is to test the scroll functions.... Well, here's the result:



As you can imagine, the scroll is pretty much broken right now. There's a lot of working code there, however! :)

I will let you know when I fix the libscroll code, in the meantime, you might like to play Gabriel Garrote's EEEEK! EEEEEK! HOOOOOOK!!!.
Seriously, it's a great game (that you'll soon be playing in your Wii :).

PS: One more

Sunday, March 28, 2010

mod_draw, mod_screen, mod_path & a few small fixes

The other day I integrated libdraw. That same afternoon I integrated mod_draw, so that's done and you can now paint those beautiful Bezier curves in your Wii.

Also, yesterday I integrated mod_screen (regions, backgrounds...) & mod_path (path finding module). I added some test code for mod_screen and it seems to be working fine. I will have to write some code for mod_path too, just to be sure.

I also uploaded a wiki page in the google code page to keeo track of the modules that are already implemented and the modules that need to be integrated (or won't get implemented at all, like mod_wm).
You can compare how big both columns are here.

Again, if you want to start porting your games to the Wii, please let me know.

PS: Endianess bug is still there, and even if I fixed some minor bug with mod_grproc, some process will refuse to die.

Thursday, December 31, 2009

Finally! The all-text release

Today I integrated the last three text-mode-only modules left I had planned to integrate before starting work in the graphical part of Bennu: mod_sort, mod_mem & mod_timers.

This means that most of the non-graphics related part of Bennu for the Wii is now done -just in time to celebrate the new year- and now it's time for me to focus on the part of Bennu that you can actually show to other people.

I also updated mod_sound and fixed a couple of bugs I had put there.

Last but not least, I did the same offsetting for the GLOBALs as I had to do for the LOCALs.

Happy new year, and say welcome 2010: the year of graphics for Bennu in the Wii! :)

PS: Just like it happens with the MacOSX platform (which isn't compiling right now in Bennu but has a lot of supporting code inside) memory_total() and memory_free() are placeholders and always return 0. I might be able to implement those, but I am not sure.
PS2: The text-only modules I have not yet implemented fall in one of these categories:

  • Either they don't make sense in the Wii (mod_wm, mod_sys). These will just be a list of placeholder functions that will only return default values and run no code.
  • Or they provide functionality not always present in the Wii (mod_key, mod_cd).
  • They're mod_debug, This one is big&complex and even if it's very useful, I want to focus on the rest of Bennu first.