2007-04-11

DS Hardware Discoveries

(Written 06/04/2007)

No more coding today. Just split the ScrollingText class into h/cpp files and a separate directory, and released both it and the Slideshow library on Simian Zombie under the GPL. I briefly considered the LGPL, but to be honest I don’t really care if people use the libraries or not; I just want to see what people do with them if they are used. The GPL lets me do that, whilst the LGPL doesn’t.

I did manage to get hold of some interesting reading material, though, and it seems that the DS does in fact do hardware sprites - I thought that it might just have been something cobbled together in software by the PALib guys. I’ve also found out that the four backgrounds on each screen exist in hardware too.

Another thing is that the top-most bit in the 16-bit colours is to do with either alpha channeling or alpha blending, but I suppose that only really comes in useful when the other 3 backgrounds are on the go. PA_DrawBg must, therefore, point explicitly at BG3 for each screen to prevent drawing being done through it on the other backgrounds. That means I’m not drawing directly to the display like I thought; I’m drawing directly to the last background, which is later combined with the other three backgrounds and sent through to some sort of display switching method, before finally being sent to the LCD itself.

The last thing I learned from trawling through the docs is that the DS has hardware to accelerate square root and division calculations. This doesn’t appear to be supported by the PALib yet.

Oh, and another last thing I learned (adding this later) is that the X and Y buttons work completely differently to the other buttons on the system. It looks like the majority of the buttons are just implemented using bog-standard GBA hardware, whilst the X and Y, which weren’t present on the GBA, have been bodged in later.