Views: 1,268,918 Homepage | Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 12-01-20 07:36 AM
Guest:

Main - Posts by hcf


hcf
Posted on 10-01-20 10:55 AM, in Original Xbox port and JIT Link | #2499
Hi, and thank you very much for your work in this emulator!

I'm part of the original Xbox scene coders, and we would love to make a port of melonDS for this console. We are aware that performance will be different in each game, and many of them will not run at full speed (as an example, we have a port of Desmume and it runs well in many 2D games like Zoo Keeper, but it is really slow in many 3D games likke Diddy Kong Racing DS).

I am writing here because we have studied a bit the source code, and understood that you are not supporting any 32 bits build. The original Xbox has an Intel processor of 32 bits (the same that in some old PCs). We think that a lot of your code could be compiled indeed for 32 bits without any change, but we are worried about the dynamic recompiler, as it seems to be made with the 64bit architecture in mind.

Do you think that you could point us to any advice to have this JIT for a 32bit machine? (maybe there is a version of this recompiler for 32 bits that you don't merged in this project... or maybe adapting the 64bit recompiler to 32 bits could be done...). Of course, we know that we could simply avoid JIT, but being the Xbox a limited machine, JIT is really mandatory if we want to have a decent performance.

Besides, if you could give us any other information that you know, related to obstacles that we would face in our adventure to port melonDS to a 32bit machine, it would be very useful.
Thank you very much!

HCF

hcf
Posted on 10-01-20 12:45 PM, in Original Xbox port and JIT Link | #2511
Thank you very much for the quick answer! It's very good to confirm that the main part of the code will work.

As far as the JIT is related... it is what we thought and our main concern :(

I guess that converting your 64bit dynamic recompiler into that 32bit x86 one, is not an easy task, right? I'm not sure if there is anyone in our team who is able to create a recompiler from scratch. And running the emulator in interpreter mode will be slow for sure.

We already saw the OpenGL renderer, but we saw this as a secondary task. In a first stage we were thinking about using the software renderer. The port of Desmume is also using the software renderer, because in fact we did the huge effort to convert it to Direct3D 8 (supported by Xbox) but the emulator performed the same and with more artifacts... So in this project, converting the OpenGL code to Direct3D will be done, but not with high priority. Unless melonDS is taking more advantage of the hardware than Desmume!

Thank you very much again for your work and your help. By the way, you seem to know the Xbox architecture very well! You are right, multithreaded solutions are not useful for us, as our processor only has one core :D




hcf
Posted on 10-02-20 05:39 AM, in Original Xbox port and JIT Link | #2518
Posted by Generic aka RSDuck
in theory most of the code could be reused between the 64 bit and a potiental 32 bit x86 JIT. We use the code emitter from Dolphin, they dropped 32-bit support a long time ago, though ppsspp uses it too and it still supports 32-bit so maybe you could take it from there.


I didn't know that you used the same code than PPSSPP and Dolphin! In that case, maybe we could try to use the JIT of PPSSPP, and hopefully it may work.


Posted by Generic aka RSDuck
Speaking as the developer of the Switch port, though tbh I doubt you will get that far. The Switch's processor is not only from the raw numbers superior and it's ISA is more similar to the DS's so the recompiler which doesn't do any crazy optimisations outputs better code. And still it took some additional GPU2D optimisations to get 2D games to fullspeed. Games which use 3D graphics are even with the threaded renderer not fullspeed with the current software renderer (though I plan on writing a more optimised one which makes use of arm neon simd instructions which hopefully changes this).


Thank you very much for sharing your experience. It is very useful to know that! If the Switch can't do it, I'm afraid that the original Xbox would have a very hard time trying to emulate it at a decent speed. I still have a bit of hope though; I don't know the reason, but the Xbox processor performs surprisingly well if we look at raw numbers. For example, the port of Desmume works faster in the Xbox than in the Wii, and both machines have a 733 MHz processor (and we did no special optimization in this port, other than using frameskip that I guess that every port also uses). Maybe endian magic? Although in this case, we are comparing consoles with a difference of 2 generations, and obviously the old black box is not even in the same league than the Switch... :(

Thank you very much!

hcf
Posted on 10-05-20 11:35 AM, in Original Xbox port and JIT Link | #2547
Posted by Generic aka RSDuck
I'm only talking about the code emitter, which is basically the piece of code we use to generate x64 or aarch64 code. The code which does the actual ARM->target architecture is ours.


I understand. Thanks for clarifying and for your help :)


Main - Posts by hcf

Page rendered in 0.024 seconds. (2048KB of memory used)
MySQL - queries: 22, rows: 71/71, time: 0.021 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2018-07-20)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.