Showing posts with label librender. Show all posts
Showing posts with label librender. Show all posts

Thursday, February 25, 2010

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

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.

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!