You are not logged in.

Read the FAQ and Knowledge Base before posting.
We won't make a 3DS/2DS emulator.



#1 2010-05-23 21:04:36

lig
Member
Registered: 2010-04-24
Posts: 20

Has anyone considered a Dynamic Recompiler?

I was curious about whether anyone has thought about making a dynamic recompiler for desmume.  I was thinking that there could be a hash table that could use the program counter of each instruction as the key and the translated instructions as the buckets. Seems pretty simple to do I was just wondering if someone could point me in the right direction. Is there a spot in the code where the instruction is all the way translated where it could be stored into the hash table or is it not that simple?

Offline

#2 2010-05-24 00:05:04

shash
Administrator
Registered: 2007-03-17
Posts: 897

Re: Has anyone considered a Dynamic Recompiler?

I'm heavily afraid of what kind of mess you can make writing a dynarec if you can't find where the instructions are decoded.

Offline

#3 2010-05-24 00:39:50

lig
Member
Registered: 2010-04-24
Posts: 20

Re: Has anyone considered a Dynamic Recompiler?

I like how when you ask a question on this forum instead of some just giving you a hint they say something negative. Its like you guys never learned any social skills, but thats okay I'll just keep talking until someone answers me. So is it in NDSSystem.cpp?

Offline

#4 2010-05-24 02:29:36

Manivo
Awesome Possum
Registered: 2009-02-15
Posts: 655

Re: Has anyone considered a Dynamic Recompiler?

That's programmers for ya.

Offline

#5 2010-05-24 03:03:40

zeromus
Radical Ninja
Registered: 2009-01-05
Posts: 6,209

Re: Has anyone considered a Dynamic Recompiler?

It's a test to keep you from wasting our precious time. This is standard practice. Learn to love it.

If you can't answer this then you can't answer the next 1000 things you can't figure out and nobody here wants to give you a tutorial. Not in this forum.

Offline

#6 2010-05-24 13:04:19

shash
Administrator
Registered: 2007-03-17
Posts: 897

Re: Has anyone considered a Dynamic Recompiler?

lig wrote:

I like how when you ask a question on this forum instead of some just giving you a hint they say something negative. Its like you guys never learned any social skills, but thats okay I'll just keep talking until someone answers me. So is it in NDSSystem.cpp?

OK, let me re-phrase it! Writing a dynarec is an extremely complicated process. I'm a quite seasoned C++/asm coder, which also worked on several emulators, and see it as a titanic project. I consider that, if finding the cpu decoding is hard for you, writing a dynarec will be impossible, with your current emulation knowledge. Still, I never say something can't be done by someone, as I consider everyone can, eventually, do whatever they wish as long as they stick working on it long enough.

Offline

Board footer

Powered by FluxBB