Tuesday, December 28, 2010

Firewhip coming to a Wii near you, plans & where have I been?

Sorry for not posting in such a long time. I haven't directly coded on the Wii source for a bit of time, but I did take the Wii code and add SDL1.3 support to it, so now we have a (mostly) working iPhone port for BennuGD! Turns out that making BennuGD support SDL1.3 also fixes an annoying bug we had in MacOSX where 32bit color wasn't working at all. So you see, things fix all on their own with SDL1.3 :). The code is now in trunk.
If you have a look at the code, you'll see I've created many Makefile's, one for each supported platform. Things only get worse as now most platforms support two different/incompatible SDL versions.
I shall fix that* by dumping that system and creating a build system, probably based on CMake.

Also, a week ago or so, the nice guys from DevkitPro (the SDK I use to build BennuGD on the Wii) have released libogc 1.8.6. In their release notes, they say they've fixed something related to wrong readings in Balance Boards. Bennu was getting wrong readings from Balance Boards, so hopefully when I recompile BennuGD for the Wii with the new libogc, you'll be able to use the Balance Board correctly :)

Also, just a couple minutes ago I found out about a very cool game called "Firewhip". Have a look at the video, as it is a realy cool one:


As it turns out, this game had a pretty serious bug that had been triggered when it was converted from Fenix to BennuGD (some change in behaviour about process creation or something like that) that was pretty easy to fix once triggered, so stay tuned as this cool game is coming soon to a Wii near you!

Saturday, November 27, 2010

Starting the Opera browser in your Wii from your BennuGD games

The Internet Channel is a Nintendo-sanctioned port of the popular Opera browser that has been free to download for your Wii for quite some time.
With the latest builds of Bennu for the Wii, you can now launch any webpage you want from your code. To do so, just add the following line in the appropriate place:

exec(_P_NOWAIT, URL, 0, 0);

And the Internet Channel will open URL. Just remember that your game will quit right after that call and do as needed for a clean shutdown (saving gamestate, unloading resources...).

Tuesday, November 16, 2010

Pixbros preview release!


It has been quite a while since I told you I was working with Pix Juegos' Pixel to bring you a preview release of Pix Bros for Wii, but it's already arrived for your gaming pleasure!

As I said earlier today, it's still a preview so be sure to understand that what we're releasing today is only a preview of the game: when the final version is released, bugs will get fixed and the game will look much prettier. It is, however, a very playable version of the game: It's running at 32bpp, with MP3 music and it will even open the designer's group website when asked to! (more on this on a later post. If you want to give it a try, give an eye to the game's code).

Today's preview does have a few limitations, though. Fonts are not working as one might expect them to, so we've released a version of the game that uses the default system font. That font is basically available for debugging purposes, so it is barely visible and looks plain wrong.
This game also showed some issues with the joystick handling routines which might be caused by the SDL port. To avoid them, only one player can play at any given time, sorry for that.
On a final note, the game seems to slow down a bit at certain points. This is caused by it running at 32bpp: looks like we hit the Wii's limit when processing graphics without its GPU. In case we can't solve this, we might have to release the final version with 16bpp mode set by default.

On the bright side of life, you'll enjoy the latest and greatest version of Pix Juegos' game, which has gone through major improvement since its last release. I can promise you the game is really, really entertaining. I've been waiting for it on the Wii for a long time :)

For the rest, the game is completely playable. I haven't finished the game (those Rarutos keep killing me...) but it seem pretty rock-solid. It's really encouraging to see that :)

Both Pix Juegos and me wish you an absurd level of fun, but remember this is only a preview and things might be broken. If that's the case, please let us know so that we can fix them.

The screen grab below shows the state of an early build of the game (it's really the same one as shown earlier). 



Get the game from here.

Monday, November 15, 2010

WIP sign for your games

When we released the EEEEK! EEEEEK! HOOOOOOK!!! preview, many people liked it and took it for what it was with bugs and all.
Many people downloaded it and found it playable to the point that some user uploaded the preview to the Homebrew Browser, the author of the game grew concerned that many people would play a pre-release version of the game that contained known bugs and featured no notification on that regard.

The final version of the game for the Wii was released a few days later with many enhancements and all the known bugs fixed, but we were left with the doubt of whether many people wouldn't upgrade from the pre-released version just because they thought it represented the overall quality of the game.

That's why, for the launch of a Pix Bros preview (coming later today) I've created a pretty straightforward sign, which can be seen below:


And here's the original SVG image. It probably won't display correctly in your browser, it works just fine with Inkscape. Feel free to add it to your projects (even if they're not Wii-related) and treat the image as public domain.

For example, here's what Pixel you'll see in Pix Bros when you download the preview:


Enough, will be back with some real news (Pix Bros pre-release, a code status update and I'll tell you how to open web addresses from your games directly in your Wii!) later today.

Thursday, October 28, 2010

On yesterday's post


Yesterday, I posted an entry with a photo of Pixbros working in a Wii with the latest SVN build.
There are a few bugs to fix yet, but there are some things that it's worth noting:

  • The game is working pretty well in 32bpp mode.
  • scale_resolution seems to not work at all in the Wii, don't try to use it yet :)
  • In the photo, you can see there are two characters playing. This is, in fact, a bug as there was only one controller present. Libjoy was reporting incorrect values for joysticks that weren't present. I've uploaded some changes to the SVN repo and this issue seems to be fixed.
  • You might notice that the score counter is blank. There seems to be some problem with FNT loading or displaying. I'll have a look at it as soon as possible.
  • The game is using music in MP3, as recommended, and those are encoded @48KHz, which is the new default frequency for BennuGD games in the Wii, starting with the next beta release.
If you really, really, want to give it a try, you can compile the latest BennuGD for the Wii from the SVN repo yourself and then compile pixbros from their SVN repo, otherwise you can just wait a little bit; it shouldn't take us long to have everything ready for release!

This game is pretty big and uses many features from BennuGD, so I'm pretty excited to see it's working that well with very little effort on the game author's side. So thanks him a lot for taking the time to make the game Wii compatible.

PS: The game is so cool that it's even been featured in Spain's public TV (Pixbros appears @ 1:21)



PS2: As the cow points ot, there are now more than 20000 users of BennuGD for the Wii. Future game release will only make that number bigger and bigger, so big thanks to everybody!

Wednesday, October 27, 2010

Pixbros

I asked for it long ago and, well...


Have fun!

PS: It's not ready yet, but it's definitely working quite well. It'll arrive soon!

Monday, October 25, 2010

Early bennugd-monolithic builds running on a PSP

I'm going slightly off-topic with this one, but as you might know, the same source code used for creating the Wii version of BennuGD is being used by Daniel Franzini to create a PSP port.
He's shared a video of an early BennuGD build running on his PSP, which you can see below.


Go, Daniel, go!

Experiencing random crashes? Use MP3!

After some debugging -using the info I mentioned the other day- some game that used to crash "randomly", I've found that all the crashes I could reproduce were related to Tremor (the library used to play OGG files) and in particular to oggpack_readinit. I believe this problem arises more on games with multiple sound sources playing at once, and doesn't seem to appear in simpler games with only one or two sound channels.
This error might well be related to this other bug or even this other one.

I'm not really sure I'll be able to fix this anytime soon, but I've made some simple tests with MP3 playback and they seem to work much better; the interpreter doesn't seem to crash anymore and I believe that both bugs mentioned above might also go away. If this is true, I'll update the transcode_music scripts so that they recode&resample your music to MP3 by default.

Just one note: You will only be able to play what smpeg can: MPEG-1 - Layer III sound files (the simplest/oldest kind of MP3 available), but hopefully the transcoding script will do all the hard work converting your files so that you don't have to.

Hope this solves stability problems, in case you found'em.

Happy coding! :)

Sunday, October 24, 2010

Send me photos of your crashes so I can fix them!

I just found this article on the wiibrew site. It explains how to debug that ugly -but useful- crash messages the PPC CPU inside your Wii dumps when bgdi crashes.
I don't own a USB Gekko device (which is the preferred debugging method) but it should help during debugging nonetheless. Thanks, devkitpro guys!

So, if you find your Wii crashes when running BennuGD games, please send me a photo of the screen where I can read the text, and possibly the source code for your game and a little explanation or what your code was doing when it crashed.

This will help create more stable builds and might eventually help BennuGD upstream, too. So thanks for your help!

Thursday, October 21, 2010

Brewing your own builds

A couple of days ago I uploaded the SDK I'm using to compile the bennugd-monolithic code.

  • In order to install the SDK, follow the instructions to install devkitpro from here.
  • Download the latest copy of my DevkitPPC directory available here -it can be used in win32, linux or OS X- and uncompress it to (following the example in the Getting Started page) /opt/devkitpro/ so that there you'll have threee folders: devklitPPC, libogc & portlibs.
  • Now, set the DEVKITPRO & DEVKITPPC environment vars as described in the Devkitpro "Getting Started" page.
  • Get the latest bennugd-monolithic code as described here.
  • Last, in your favorite console, and from the bennugd-monolithic-read-only/core directory type make. That's it! After that, your binaries will be in core/bgdc/bgdc.elf & core/bgdi/bgdi.elf.
  • Should you want to create a monolithic build for Linux (which should work just as fine as the normal BennuGD build, as you won't experience any endianess issues), type make linux instead of make.
Hope you find this info useful, I'll use this same info in the Wiki page.

Saturday, October 9, 2010

On the lack of updates

Sorry for the lack of updates lately, I've had a lot to do in my university (again) and couldn't work much on this. I did get to touch the code a bit, with mixed results:

  • I will probably change the default sound frequency from the current 33KHz to 48KHz. I've done this primarily because recent versions of VLC refuse to transcode the audio files to 33KHz but are happy with 48KHz. Also, many audio programs can use 48KHz just fine. For example, if you use my FMOD Ex bindings (they include spectrum analysis support for both the available mics and for the playing songs!) for BennuGD in your normal computer, you can use the same audio files in your computer and the Wii; you might have to code a couple of ifdef's to handle the API differences, though.
    Sorry for that, I expect not to have to touch the audio frequency again.
  • I've found out that set_volume doesn't work as expected, if you use it you'll just hear a very nasty noise... Will have to have a look at it.
  • There have been some pretty important changes in the most basic libs used by the Wii version of the port... I'm trying to update SDL and libogc in order to get things working again.
  • I've been integrating some changes to the code that Daniel (the guy working on getting this working on the PSP) passed me, and we've been trying to set up my development environment to be able to code for the PSP, in case I can help him at all.
  • I mostly completed the port for Puzsion. I contacted the author and they're happy to replace some graphics for some more... Wii-specific. This is on top of the to-do list.
So you see: not much coding, but still a little bit of progress.

PS: As for the PSP SDK, we're using this one.
PS2: I would really LOVE to integrate my VLC module into this Wii port, and now that VLC has been released for the iOS (which doesn't allow dynamic linking, either) that seems to be possible. If anyone can help me with getting the iOS libVLC.a to compile for the Wii, I'd be REALLY grateful.

Monday, August 30, 2010

Pixdash


The guys from Pixjuegos have released a BennuGD tech demo for a platform game. It's still in a very early phase of development and I really hope that the graphics are not final but most of the gameplay is there and working well.

The interesting part is that all their code is open source and can be retrieved from their project page, so you can use it as an starting point to create your own platform games or as an entry point for BennuGD programming.

In case you want to have a look, a Cid2Mizard from Nintendomax has been kind enough to upload a video of the gameplay and upload it to Youtube:


Thanks, Pixjuegos! But you know that's not the game I'm expecting from you ;)

Thursday, August 26, 2010

More than 12000 users!

According to these stats more than 12000 people have, as of this writing, downloaded a copy of any of the games that are available for Wii through the Homebrew Browser!

Most of them have downloaded the impressive "King of Fighters: Flames of Courage" game and as more great BennuGD games get packaged for the Wii that figure should just keep increasing.

I shall soon package and upload Puzsion, you can see it running on my Wii below:


I'm also eager to get Pixjuegos' excellent PixPang and Pixbros running on the Wii again, I really enjoy playing them. The author is busy porting his game to the Caanoo right now, but he's promised he'll get the games running on the Wii ASAP.

Monday, August 23, 2010

Impressive KOF v5f video and Wii version download link!

If you like this video of "King of Fighters: Flames of Courage v5f", a game for Wii made with BennuGD (of course)...


...you can get the full Wii version from here.

Project webpage here.


PS: This version fixes a couple of bugs from the previous 5e version, which was also available for the Wii, full source code is available.

Monday, August 16, 2010

EEEEK! EEEEEK! HOOOOOOK!!! version 1.2 released for Wii!

I've just committed the last changes to EEEEK! EEEEEK! HOOOOOOK!!! and I've finished uploading it.
We're calling this version 1.2 and includes quite a few changes from what you could see in the preview version. Most of them are small bug fixes, but there are a few graphical changes that are important for the game consistency too (Wii specific controls in the tutorial, for example).

You should also expect a minor update soon which should bring a few extra features such as warning the user when the batteries of the Wiimote are about to drain.

You can get the game from here, and it should be soon in the Homebrew Browser, too.

Thursday, August 12, 2010

EEEEK! EEEEEK! HOOOOOOK!!! preview video

An anonymous reader has uploaded a video showing the eek preview I uploaded the other day running on his Wii. Thanks a lot for your support!. Here it is:


I'll soon upload a final version of the game to the proper channels with some minor changes made by the original author, including changes to the initial tutorial so it doesn't show a mouse cursor, but a Wiimote.

Wednesday, August 11, 2010

Preview of EEEEK! EEEEEK! HOOOOOOK!!! released for Wii



[EDIT] This is old, get the final release from here.


I've just uploaded a preview release of EEEEK! EEEEEK! HOOOOOOK!!! for the Wii to megaupload. I haven't yet uploaded it to more proper channels as there are still some annoying bugs to iron out; nothing critical, but the lasers seem to be a little bit out of control. For the rest, I believe it works pretty well.

I've modified the code a bit to detect clicking even when the Wiimote is not pointing at the screen and a remapped a few Wiimote buttons to their respective functions. Which reminds me that I should create a version of jkeys.lib specifically for the Wii :)

You can get your copy from here, and as soon as it's ready, I'll upload it to the Homebrew Channel and to the BennuGD projects page.

PS: If anyone can upload a short video/photos of the game running on his Wii, I'd be really grateful as I don't currently have the means to record the videos myself. Please post them in the comments section and I'll post them :)

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.

Friday, August 6, 2010

Beta 2 released!

I've just uploaded Beta 2 of the BennuGD for Wii interpreter.

More details&test version using libELM to come soon, please note there's a known endianess bug when using short data types (like BYTE others possibly affected too) in local variables. For the moment, please replace them with INT and things should work fine.

PS: I'll also upload EEEEK! EEEEEK! HOOOOOOK!!! & Puzsion for Wii soon :)

Wednesday, August 4, 2010

The monkey is coming...

Yesterday I worked a bit on this and I finally got to understand what was going on with the bug I blogged about. More detail will come, but you might like to know that it's now fixed.

I also found the bug that prevented eek from working correctly, so you'll be able to have some Wii-monkey fun soon.

Please, expect beta 2 to arrive later this week. More details to come.

I broke something....

I seem to have broken something (possibly related to the new libglob I'm using) and newer builds don't work as they should on the Wii. I'll try to fix this asap but it might take a bit of time... sorry!

Wednesday, July 14, 2010

Beta 1 released!!

I've just uploaded the first binary beta to the new project page.
I'm in a bit of a hurry, so I'll write about it later, but it basically has all the official modules in BennuGD, and the wpad library (used to handle Wiimote input, it was inside the previous builds) has been extended to support Nunchuk input and gravity detection for both your Wiimote and your Nunchuk (i.e: how your controllers are oriented in the real world). Readings are only valid on some axis, but that's a limitation of the controllers' hardware, not a bug.

More wpad support should follow, as to be able to handle more controllers, like: Classic, Wii MotionPlus, Guitar Hero....

There are a few bugs here and there, but nothing is critical and the port is working pretty well :)

Monday, July 12, 2010

Rearchitecturing the port for the future

The day for the big news has arrived!

Today I've finally completed integrating all the modules inside the new architecture. This new architecture has a lot of advantages over the previous one, to name a few:

  • The code is much easier to mantain now (it involves many less modifications to the original BennuGD source).
  • The interpreter (bgdi) can now be compiled without the modules you don't need, so it can be a lot smaller.
  • Up to where the endianess issues in BennuGD allow us, the DCBs generated with this new version are completely compatible with the official standard version.
  • This new version includes all the modules from the official Bennu version (minus mod_crypt).
  • Modules only get loaded when you import them (they were always loaded, which meant more unused RAM in a system without resources to waste).
  • Me messing around less with the code means a much more stable version.
  • This new architecture is much more friendly to others creating monolithic ports for other platforms.
And here is where I wanted to arrive; in some quick tests, this new version is extremely more stable: it fixes random crashes and misbehaviours of the previous versions whose origin I couldn't trace. Please understand that this new version has been completely rewritten in under a week -so there are still some bugs- but when bugs get fixed, this new version should be as solid as upstream BennuGD.

I'll comment on some particular examples; take a look at the screenshot below:

EEEEK! EEEEEK! HOOOOOOK!!! by Gabriel Garrote

In the latest build with the old architecture, the left eye appeared in the upper-left corner of the screen, for no particular reason. This works now just fine, as you can see from the screenshot above.

I'll probably "test" Pixbros later (and for "test", I mean play). Pixbros used to crash after a certain amount of playing time. I'm pretty confident it'll work just great now.

As for another example, Puzsion used to crash horribly when loading, so it was completely unplayable. As you can see from the screenshot below, it's now working perfectly.

Worked great until my Wiimote ran out of battery :'(

Also, speaking of better mantainability: I've been working with Daniel Franzini and we're now hosting a common code repository for both the Wii port and the PSP port (the new architecture is awesome :).
You can find the new code here, and this new repository superseeds the older one.

There are no released binaries yet because mod_wpad has not yet been integrated, but I'll probably dump the old code and start using Grisendo's mod_wpad, which is much more complete.

Anyway, don't take my word, as soon as I upload the new binaries, download & start using them, you'll see how much better they work compared to the previous version.

Hope you find the news interesting :)

Have fun!

Saturday, July 10, 2010

Soon

A very big update on the code front should arrive very soon (around next week) so stay tuned... :)

23/45

Wednesday, June 23, 2010

Wii menu update

It seems like Nintendo has issued a system menu update (version 4.3) which -in their own words- doesn't update pretty much anything but deletes the Homebrew Channel (and thus will make using bennugd-wii much harder).

It still seems to be possible to install the Homebrew Channel back but, if you can, don't upgrade to the latest menu version

PS: Some important updates on the project will come in the following weeks.

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 :)

Tuesday, April 20, 2010

The first game

Carles V. Ginés has released the first BennuGD game for the Wii, called Garnatron
It's a very small one and leaves a lot of room for improvement, but it's fun to play :)
You can see a video of Garnatro in action in the link above.

Also, Pixel has added Wii as a platform for your games to the BennuGD projects uploading form, so now you can just add your BennuGD Wii games to the list :)

PS: Don't tell anybody, but full WPAD support (rumble support, accelerometer data reading, angle checking....) is done and should come as a binary soonish.

Friday, April 16, 2010

Alpha 4 released

Today, I'm releasing alpha 4.
This version changes the way mod_say works: until now, it'd just do a printf(). This caused artifacts onscreen. From now on, mod_say will output text to a file named "stdout.txt"
Also, this version includes a new module: mod_wpad. This Wii-specific module tries to provide much more info about the controller input than what the normal Bennu version would.
This is a very preliminary set of functions, and seems to not be working perfectly right now:

  • WPAD_IS_READY(int channel). Will return 1 if channel channel is available and started. Otherwise, it'll return <0.
  • WPAD_IS_BALANCEBOARD(int channel). Will return 1 if channel channel corresponds to a Wii Balance Board.
  • WPAD_QUERY_BALANCEBOARD(int channel, int data). Will query info from a balanceboard. Data can be:
    • 0: X position of the center of gravity.
    • 1: Y position of the center of gravity.
    • 2: Weight measured on the TOP-LEFT base.
    • 3: Weight in TOP-RIGHT.
    • 4: Weight in BOTTOM-LEFT.
    • 5: Weight in BOTTOM-RIGHT.
  • WPAD_BATTERY_LEVEL(int channel). Will return the battery level for a particular channel. 0<level<256.
Other functions will come, and you'll be able to get info on Wiimote acceleration, and other data. Also, as I said, the function names or return values are not done yet. It's a beginning, though.

Thursday, April 8, 2010

Alpha 3

Today I released alpha 3 for BennuGD-Wii (can be found at the google code project page).
Alpha 2 brought some upstream fixes to the BennuGD core (including Splinter's own fix for the endianess issue, which is believed to be solved both upstream and here).
Alpha 3 brings just a quick fix to the wrong ALPHA_STEPS behaviour present in previous builds. Now FADE's should work fine.

Wednesday, April 7, 2010

Endianess, color and mod_effects; let's call it the alpha 1 release

Yesterday, my brother found the solution to the endianess bug (that resulted in Bennu displaying the wrong colors) that you can see in the video I posted a couple of days ago. So, big thanks to him!
I also integrated mod_effects and now te vast majority of modules that apply and are needed for creating 2D games have been integrated.
There are many things that don't yet work as expected -the most notorious of which is sound, that always plays @ 30KHz, no matter what your music files want-

However, I'd like to call this alpha version 1 of BennuGD for the Wii. It's now very buggy but usable, and you're more than welcome to test it and start creating your BennuGD games targetting the Wii.
If you get'em to work fine with this version, fear not, they'll work in the final version. Should you find any bugs, please report them in the project bugtrack.

So, go get the alpha 1 release at the google code project page.

Monday, April 5, 2010

Pixbros working on the Wii

A shortish video that shows how the port is doing. You can see Pixjuegos' Pixbros working on the Wii. As you can see in the video, some colors are now showing well (I did some digging and some things got fixed) but I must work on others.

Judge for yourself:

Friday, April 2, 2010

One short entry more today

mod_blendop is in.

The future

After yesterday's post with some screenshots of different existing games running fine in the static version of Bennu, I wanted to share some thoughts/questions about the future of the port and the work that needs to be done.

  • First of all; soon after posting the message, I fixed the scrolls. This was particularly easy. Most of the times a module acts weird it's because I screwed something in core/includes/offsets.h. I just opened that file and changed [83+16=] 98 for [83+16=] 99. Problem solved :)
  • My brother sent some code that adds some support for bigendian systems. Will have to test it on a real Wii.
  • If you think about the Wii controls, I can think of at least 5 different ways of controlling your game in a Wii, depending on how many accessories you plug in your Wiimote and how you grab your Wiimote.
    I will have to write some helper code to make control handling easier for bennu newbies.
  • There are a few modules I'd like to create specifically for the Wii that add support for some very interesting Wii features. These include:
    • Reading Mii info. It'd be based on Matthew Bauer's libmii.
    • Reading Wiimote's and Nunchuk's accelerometer output.
    • Reading output from things like the Wii balance board. According to wikipedia, it creates a virtual device by emulating two joysticks.
    • I'd like to find out how easy/difficult it is to play sounds in Wiimote's integrated speaker.
    • Others? Stub implementation should also exist for your pc, to make game creation/debugging easier.
  • I'd like to integrate some video functionality into the port. Currently Bennu natively supports some prehistoric video format, but that's really not enough. I have created a video module based on VLC that works great on both Linux and win32, but I don't think porting that would be easy.
    I might go for mpeg support. We've got a couple of mpeg implementations that might fit in here perfectly.
  • I'd like to make the port's code cleaner and bring it closer to the upstream BennuGD code. Ideally this would mean that given the right compilation script, my code could generate both the upstream modular BennuGD release and the Wii-specific monolithic Bennu version. This would make it easier to keep sync with future upstream changes.
I think that's pretty much it :)

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

mod_scroll, OS_WII and a small coming surprise

Just wanted to let you know that I've integrated mod_scroll, so now scrolls should be working.
Instead of writing some test code that would leave most people wondering if I'll ever get to a point where this thing become usable, I've decided to recompile a very old fighting game (directly ported from DIV Games Studio code).
It won't yet work in your Wii for two main reasons:
  • The endianess bug (that's being worked on).
  • It needs mod_key (I should integrate this sooner than later).
mod_key should be very easy to integrate, so I'll soon post some screenshots of how the game will look once the endianess bug is solved.

I've also talked to Splinter (the main BennuGD developer) and we've agreed to use OS_ID values over 1000 for unofficial ports, so now OS_WII=1000 (up until now, OS_WII was 9).

signal working now?

After a few hours of reading and re-reading Bennu code and even reimplementing mod_proc, I think I finally fixed the regression in mod_proc that caused signal not to work.

This was a stupid bug. It was caused by me not knowing well enough how C works. Should I have read and understood how enums work in C, I wouldn't have redefined some internal value that told Bennu to kill a process when told so (I was instead messing with some other internal var).

Well, I just wanted to let you know that I think I fixed it.

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.

Tuesday, March 23, 2010

libdraw is in

Just a fast update to let you know that libdraw is in. Libdraw is the low level stuff used inside the mod_draw module for drawing primitives (simple geometric elements such as lines, rectangles, circles...). This one was particularly easy, so you should get primitive drawing today or so.

Also, it looks like signal is not working as well as it should for processes with a GRAPH assigned to them (processes without GRAPHs seem to get killed as they should). I'm also trying to find a solution for the endianess issue in the blitting functions that pretty much ruins all the experience with Bennu in the Wii.

Tuesday, March 9, 2010

Collision, signal fixed!

Ok, I finally fixed the signal and collision bugs. At some point during the integration of mod_proc & mod_grproc, I had broken a few things. What I'm not really sure of is why signal was working before...
Both 09_mod_proc.prg and 20_mod_grproc.prg work now as expected.

Wow! I did a few things in under an hour of coding today! :)

PS: BTW, this thing is starting to look usable (if you don't take colours being broken into the account) so if you want to start porting your games to the Wii and help test the port, please get in touch with me.

mod_regex

I owed this one to you since New Year's day. Test code seems to be working fine.
I'll try to work a bit with mod_grproc to see if I can fix it. Using collision results in core dumps right now.

Happy coding!

PS: Advance seems to be working fine, it's not the whole mod_grproc that's broken :)

Wednesday, March 3, 2010

A few videos of Bennugd-wii in action

Below are a couple of videos I've created with my phone (sorry for the blurriness).
The first one runs this code & shows the cursor moving after applying a graph I loaded from a PNG image. The video has no audio, but there's some music in the background, too.
If you look closely you might be able to see that the colors in the mouse cursor are wrong, that's a result of some endianess issues I must solve.



The second video shows some text being written in the Bennu standard font (although others should work, too) and in red colour. When you press the right mouse button (button B in your wiimote) the text moves to a random position.
This one also plays some music. You can find the code here.



I have removed the console initialization code because it caused artifacts, as SDL is the one that initializes all the graphics stuff now.

So, when I solve the signal&endianess bugs and integrate just one more module (mod_grproc) most of the 2D games created with Bennu should start to be playable!

Thursday, February 25, 2010

libtext & mod_text in

I've integrated libtext and mod_text. This means that you can now use write, write_var and similar functions.
The test code sets the text color to red, and moves it when you press the right mouse button. Then deletes it. Seems to be working pretty well.

Things are starting to come up nicely so if you want to give it a try, I've uploaded new binaries to the google code page for you to give'em a try.

Fixed librender, mod_map working (minus byte-order). Regressions in mod_proc.

Today I fixed librender, there were a few thing I had omitted, the most important of which was telling Bennu to redraw the screen every FRAME.

So after some rough testing, I believe that mod_map is working fine. I'll have to do more thorough testing, though.
I'm expecting to find problems with mod_map when working in a real Wii (I tested the code in my linux box) because of the different byte-order it uses. Colours will most likely seem broken. Expect a couple of demos about this later today or maybe tomorrow.

I've also found a regression in mod_proc. signal seems to not be working as expected. I'll have a look into that.

Also, the module dependency diagram is growing :)

Wednesday, February 24, 2010

libmouse, mod_mouse, libfont & mod_map

Today I've integrated libmouse into the core & runtime. I didn't need to integrate mod_mouse as it has no real code and all it does is declare its dependency upon libmouse.
Also, while doing yesterday's changes to the way the offsets were defined, I pretty much broke all the GLOBALs because of a stupid error. That made Bennu think the mouse was static at (9999,9999) and make it not detect mouse events such as clicking. That's fixed now.

So now that the mouse is working pretty much as expected, I've integrated libfont into the runtime & compiler. No major hiccups with that and it was a required step for integrating mod_map.
Mod_map is in and parts of it work fine. Other parts don't, yet. So for example, you can do a png_load and a png_save but you cannot display GRAPHs onscreen. I'll have to look into that a bit further, but I think I'll post a small surprise after I get mod_map working, so that you can get an idea of the real state of the port, in case you don't care at all about/understand all the technical jargon.

To sum up, things are going great! :)

Monday, February 22, 2010

libblit, libvideo, libgrbase, librender & video initializarion

It's been a long time! But well, I bring good news :)

Today I finally integrated libblit, libvideo, libgrbase and librender into the runtime. The test code works fine in my linux box and graphics are initialized to the default resolution (windowed+320x240) so it seems to be doing well.
The code needs to be tested in a real Wii, but I'll wait until I integrate mod_video (and probably finish integrating mod_mouse&mod_text) so that I can check that my code is running properly.

It took me longer than needed to complete the integration of these modules today as I hit a problem with the GCC preprocessor. The problem is that Bennu defines the byte offsets in the DCB files incrementally. So if you want to read property C from the DCB file, that property will be located in position: B+32bits.
B's position will itself depend in A's position. So to calculate the position of C, the GCC preprocessor had to do:
C=B+32=(A+32)+32=A+64

This method works well if you don't have too many properties and is very easy to maintain, but it has its limits, and while integrating more and more properties -coming from more and more modules- I hit that limit. Now I'm defining the fixed location of the properties by hand (A=0; B=32; C=64....), which is pretty painful to maintain.
It compiles, though.

Just in case you want to have a look, you can see how the offsets file is looking right now here.

Wednesday, February 3, 2010

Second article on BennuGD in the TodoLinux magazine, status update

Remember that the second part of the article Osk wrote should now be available in a store near you. In this second part you'll be able to create a complete (although simple) game with Bennu.

Related to the status of the project I'm currently busy with my exams in the university so I'm not working on it. Doesn't mean that the project is dead; it's just on hold until I finish my exams.
That means that you should hopefully have a feature-complete -and probably buggy- native version of Bennu for the Wii by march or so.

Thursday, January 7, 2010

BennuGD in the Spanish TodoLinux magazine

Sorry to be a bit off-topic with this one, but the news are pretty exciting.
One of the users of the BennuGD forums has written an article for the TodoLinux magazine that is on sale in Spain.

If you want to know more on the issue, go to the main news piece in the main Bennu website, here.

Friday, January 1, 2010

Some work on video

New year: more work done.


I've integrated libgrbase, libvideo & libblit into the runtime. As you can see from the module dependency diagram above, only librender rests to be integrated before I can integrate mod_video and do a set_mode() (or others, of course).

On a couple of related notes, on the last post  I told you that all the modules that didn't depend on libgrbase that I wanted to integrate were already in. Well, I realized a bit later that mod_regex
(which only provides one funtcion, but a very useful one: split()) isn't in and should be. I'll fix that as soon as possible.

On an unrelated note, the main idea of the modular design behind Bennu is that the user should only load the modules they need, so no resources are wasted moving parts of Bennu that won't really get used.
Well, as you might know, the Wii has a pretty limited amount of RAM (~88MB) and therefore memory is a pretty serious concern here.
So, as this project basically takes all the modules and integrates them into the Bennu core, that main advantage of the modular design will be lost. To fix that, Splinter (the guy who does all the real Bennu hacking) has suggested that I find a way to only integrate -at Bennu compilation time- the modules the user will be needing, so that you can get a version of Bennu tailored to your particular needs.
I have a couple of ideas of how to implement that, as it seems pretty reasonable so expect to hear more on that when the project advances.

PS: Oh! And happy new year!