Showing posts with label future. Show all posts
Showing posts with label future. Show all posts

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!

Friday, April 2, 2010

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