Mod_dir is in, just remember that you don't want to move files around the filesystem or rename them.... It seems like those functions won't work as we're dealing with a very minimal C library.
You can create those functions with Bennu code, though, by opening the destination file+copying contents+deleting original file.
Saturday, November 28, 2009
Long time, a few modules
Got a bit of time to work on this today:
- I worked a bit more on mod_proc. Now bgdc, bgdrtm and bgdi compile. I wouldn't say it's working yet, as there are some values that have to be defined at runtime that are not yet being defined, but it's a start.
Also, this modules defines some LOCAL vars. They're defined right after the GLOBALs.
A funny thing I noticed about how Bennu works is that these vars are defined, from within C code, with Bennu syntax. What that means is that the compiler adds that Bennu code in the Process declaration, as if you'd written it there. - Got mod_rand in. This one was really easy :)
- Started working on mod_mouse. mod_mouse has no real code or definitions, all the code is in libmouse. It won't work, yet, as libmouse depends in the graphical part of Bennu and work on that has not yet started.
The compiler & interpreter will, however, be fine with you messing around with the MOUSE struct. Obviously the values you'll get are default ones and won't bear any resemblance with your mouse's position. - Fixed a few warnings.
I plan on getting all the modules that don't depend in libgrbase in soon, make sure they work and then proceed with the remaining modules.
Wednesday, November 4, 2009
BennuGD-wii, "Comes With Music" edition
After the guys from SDL-Wii fixed the sound initialization code, sound is working better than ever (well, it's working for the first time).
To commemorate this event, I've uploaded a new version of BennuGD-WII code-named "Comes With Music". Basically, what this is is a version of Bennu that integrates the functionality found in mod_sound (minus a few bits related to the definition of these globals that I'll hopefully add sooner than later).
The code uploaded comes with a module tracker example song that will play when you unpack the contents of the archive to the APPS folder of your SD card and load it through the Homebrew Channel on your Wii, but the binary should allow playback of many other song formats: OGG, WAV, MP3, MIDI...
Hope you like it!
To commemorate this event, I've uploaded a new version of BennuGD-WII code-named "Comes With Music". Basically, what this is is a version of Bennu that integrates the functionality found in mod_sound (minus a few bits related to the definition of these globals that I'll hopefully add sooner than later).
The code uploaded comes with a module tracker example song that will play when you unpack the contents of the archive to the APPS folder of your SD card and load it through the Homebrew Channel on your Wii, but the binary should allow playback of many other song formats: OGG, WAV, MP3, MIDI...
Hope you like it!
mod_sound might get fixed soon
Looks like I might be able to fix the problem with mod_sound soon. There was a bug in the SDL code for Wii that caused the sound to initialize incorrectly when trying to play an ogg sound... This resulted in a very crappy sound, as described here.
Will report on progress and upload some test code when I get time to test this.
PS: To clarify, the code is really inside the binaries I uploaded a few days ago, I just need to link that code to a newer revision of the SDL code and hopefully, that will give us sound support.
Will report on progress and upload some test code when I get time to test this.
PS: To clarify, the code is really inside the binaries I uploaded a few days ago, I just need to link that code to a newer revision of the SDL code and hopefully, that will give us sound support.
Sunday, November 1, 2009
Binary release for the Homebrew Channel with bundled happiness. mod_joy is in :)
Haven't fixed mod_sound yet, but I've included mod_joy and think it might be a good time to release a binary version of the package, as it starts to be usable.
I have provided, as with most modules, some test code for the functionality inside mod_joy.
This library has been a bit more difficult than previous ones to integrate, as I had to do a few new things:
I have provided, as with most modules, some test code for the functionality inside mod_joy.
This library has been a bit more difficult than previous ones to integrate, as I had to do a few new things:
- mod_joy depends in libjoy, so I had to get libjoy working first.
- libjoy depends in libsdlhandler, so I had to get libsdlhandler working first.
- The initialization code for libjoy is a bit more complex than the one found in other libs, so I had to add some functions to the header for libjoy.c that declared the initialization and finalization functions.
- That also made me think that the way I was initializating the module code was not correct (as I was doing it from within bgdi code, not bgdrtm code).
So I moved all the initialization code into the correct place in core/bgdrtm/src/sysprocs.c. - Also, libsdlhandler gets in charge of updating the SDL event list (a "list" that keeps track of things that change and should be noted, like pressing a key in your keyboard, moving your mouse or using you joystick, to name a few). So it has a function that must be ran every FRAME.
I had to find the way to tell bennugd-wii to do it.
Basically, you just have to use hook_add() in the initialization code with the correct hook, but that hook was in modules/libsdlhandler/libsdlhandler.c, so I had to declare the HOOK in modules/libsdlhandler/libsdlhandler.h.
By the way, I must take the function declaration out of core/bgdrtm/src/sysprocs.c as the code is getting pretty nasty. I will probably create a header for every modules (that doesn't have it) to declare all those needed externs.
For the brave, I've released a package with a binary snapshot of today's SVN code and the test code.
You can directly use it in the Homebrew Channel provided you read the included README file.
You can get it from the project homepage here.
You can get it from the project homepage here.
Hope you like it.
sound is crappy
I more or less integrated mod_sound into bennugd-wii. The functions are there, and sound playback starts, but the only sound playback is a horrible static noise.
It might be related to this advice on the SDL doc and other people seem to have this same problem...
I will post any updates when I get it working.
It might be related to this advice on the SDL doc and other people seem to have this same problem...
I will post any updates when I get it working.
Subscribe to:
Posts (Atom)