Please, understand that this post is not begging for a new feature, but asking about an opinion of the feasibility of doing something that we are considering to do. I know that performance is not the priority of the Desmume project, and I will never ask for features related to that matter
The thing is that we have a Desmume version ported to the original Xbox, and now we are studying ways to try to optimize the performance on our own (because using an old hardware, performance is a real deal for us). We have done profile analysis, and we have seen that in Xbox, a big amount of the execution time is spent emulating the DS CPUs. The dynamic recompiler helped a lot, and using JIT the speed is noticeably increased, but we still need a bit more, so we are looking for ways to try to optimize it.
We have seen that a couple of projects made for mobile devices (NDS4droid for Android, and Nitrogen for IOS, both based on Desmume) have included a different dynamic recompiler named "lightning", based on the GNU Lightning one, and as we have read some comments saying that they got a boost of around 15% when they used it, we are considering to include a lightning branch in our port too. In fact, we have done a quick proof of concept, that of course didn't work
My question is: has the use of Lightning been ever considered in the main Desmume project? I am asking this because we are considering to begin a project to do this, and we will spend a huge amount of time to do it... but it would be a pity to do that, if Lightning has already been analyzed and/or discarded by the Desmume experts for any reason!
So, considering that an Xbox has a normal x86 processor (similar to an old PC one), could you tell us your opinion about the possibility of using Lightning and the pros/contras that we could face? The fact that we have not found any Desmume branch or variant with Lightning for PC, even though several versions for mobile devices use it, makes us suspect that maybe we are missing something, and maybe Lightning is not a good idea... That is why I would like to hear your opinion, that I'm sure that it would be very helpful. Thanks in advance!
Last edited by hcf (2015-09-02 13:03:42)
its never been considered. youre missing nothing, except that PC users arent as badly in need of a 15% speedup as mobile users and so nobody ever cared to do more work to earn that speedup.
Thank you very much for your answer. If that is the case, I think that we will try to do it (some famous games like "New Super Mario Bros" work now at 40-45 FPS, and maybe that change can make the difference).
If we finally manage to make it work, of course I will inform about this point here.
Well, in my desperated attempt to get more FPS in the Xbox port, I have finally managed to add Lightning Jit to our port of Desmume... but the results have been disapointing. I just write this to prevent anyone who may read this thread in the future and is maybe considering to add Lightning to the Xbox sources: I have tried it, and it is slower
It has been very disapointing for me, as it has required a lot of work, and also the developer who made NDS4droid said that Lighting made the emulator 15% faster in Android devices, so I expected the same in Xbox!!
Unfortunately, after managing to make Lightning work in Xbox and comparing the current DesmumeX version with the Lightning one... it results that the Lightning one is SLOWER (around 5% slower).
I don't know why in Android devices Lightning was faster, while in Xbox it is slower...
It's true that Lighting has an advantage: its memory management seems to be better, so we have around 5 extra MB of free RAM... but being slower, and keeping in mind that it has some random crashes that don't happen with the classical AsmJit, I have decided to discard Lightning.
Well, it seems that now, the only path that we have to improve the performance in the Xbox port, should be working in the 3D functionality. At least, in Xbox it seems that almost all the CPU time is spent in CPU emulation, and 3D emulation; I have tried to improve CPU emulation with this JIT replacement, without success... so it seems that now the path to follow is optimizing the 3D, maybe doing a Direct3D renderer...