It would be nice if this board still had post-merging..
Stephane Hockenhull said:
I said toon inking.
the colorized 1 pixel outline around polygons with different polygon ID.
Your terminology is pretty new to me, but I would think there are ways to approximate this with shaders or stencils. I will have to see if DesMuME handles this in its 3D renderer, and if so, how. I think dropping this feature altogether wouldn't exactly make the emulator useless, though. Kind of like how no one cares that gpSP doesn't emulate mosaic. I have not received even a single complaint.
Actually, the feature looks very limited. How many games use it? There are only 8 available edge colors, and edge marking applies to the entire scene instead of just selected polygons. I guess one way to emulate it would be to draw wireframes using XOR combination in OpenGL, where the polygon ID is drawn. Then render the wireframes again, this time with their edge color, using the alpha (I'm assuming alpha is part of color) in the framebuffer with alpha test to draw only the indexes that had non-zero on the first pass. Since you're just drawing wireframes these passes should be pretty fast. Of course, one can see how this could be optimized with shaders. The overall polygon counts of DS games is quite low so I think the SGX could keep up.
Stephane Hockenhull said:
most of the code on DS is Thumb by default (although the ratio of what gets executed vs space is different)
the AI code is likely to be executed once per frame and/or be so large as to not fit in the cache anyway so the smaller size makes Thumb a better fit.
the type of operations for AIs also matches the Thumb instruction set well with little benefit from the full ARM instruction set.
from test I made on the actual console with actual games recompiling them in both instruction sets the overall performance difference was negligible but the code size made all the difference.
having a few selected engine looping functions compiled in ARM made a good improvement, I'm guessing most commercial games would follow this pattern.
Execution ratio is all I care about, not amount of code.
I'll have to find out for myself what games use - another person who develops on DS says he analyzed games in an emulator (don't remember his exact method) and didn't find a lot of Thumb usage. I would think the number one reason to use Thumb over ARM would be to save main RAM space, but I think that your code shouldn't take that much space to begin with. Maybe I could modify DesMuME to track this, so I can do my own checks. I know that on GBA Thumb was taking up maybe 60% of the execution time. GBA has an obvious reason to use Thumb when it has to execute a majority of its code over a 16bit bus.
At any rate, I hope you're right because Thumb that's optimized back into ARM can be as much as 20-30% fewer instructions than instructions naively converted to ARM. Thumb instructions also have lighter register pressure. Recompiled code on Pandora would have to be in ARM/Thumb-2 blocks (doing Thumb blocks even for Thumb code would be crazy), so it's easy to see how this is beneficial.
Here's an example of the optimization I mean:
http://exophase.devz...mb_optimize.txt