Monday, August 21, 2006

DS hardware crash course

Well, last friday I decided, after a quite stressing work day, to work a bit on the Desmume. As a source base, I used the last source found in Normmatt's blog. After a bit of testing of the binary provided, I found a few tiny details, the one that catched most my attention, is that it failed to pass a lot of the tests of the ARMWrestler by Mic (of Dualis fame). So, as I like writing cpu cores, and I didn't know anything about ARM cpus, I decided to try to fix some of the tests to learn some ARM assembly.

After about 9h of hardcore debugging, I fixed more than half of the errors that it reported. The next day, after talking with Normmatt and sending him the improved core, he sent me an updated source base, that included the 3D and sound cores written by yopyop (the original author of desmume). One of the main bugs with the 3D, is that the screen where the 3D is shown flickers a lot due to the way Desmume handles window updating. There were lots of other bugs, like the 3D api init failing on certain configurations, most of the libnds examples not working, etc.

So, lots of work ahead :)

Too keep a long story short, I'll just enumerate the changes:

- Fixed 3D core init.
- Fixed crash if a non mapped key was pressed.
- Preliminar flicker fix (this is VERY preliminar).
- Added lots of 3D display list command handling (needs more work).
- Fixed some of the 3D commands.
- Added sort of a "debug texture" when texture format is not yet handled.
- Fixes on 3D texturing.
- Thumb LDR and STR opcodes fixed.
- Arm LDR** and STR** opcodes fixed.
- Other fixes I cannot remember :P

And that in only 3 days :P

Here's an screenshot of a fix in the texturing (probably the easiest fix of all), of the nehe10 example provided with the libnds (most of the other nehe samples work, too):


Don't even ask about a release date, it'll be released when it's done. Neither about testing or something in that line.

No comments: