Dynarec Completed For Psx4all Project.


I believe the dynamic recompiler takes over the part of the CPU-emulation (which is of course very important part, but not the 'whole' emulator).
And the old version was an interpreter if I'm correct.
 
STTrife posted on Aug 22 2006 at 01:20 PM said:
I believe the dynamic recompiler takes over the part of the CPU-emulation (which is of course very important part, but not the 'whole' emulator).
And the old version was an interpreter if I'm correct.


you may be right, but in any event Zodttd wouldn't have bothered coding a dynamic recompiler if it hadn't been better than the old interpreter, so my question was quite useless :)

BTW, what's the difference between static recompiler and dynamic recompiler?
 
Last edited by a moderator:
reiboul posted on Aug 22 2006 at 03:09 PM said:
STTrife posted on Aug 22 2006 at 01:20 PM said:
I believe the dynamic recompiler takes over the part of the CPU-emulation (which is of course very important part, but not the 'whole' emulator).
And the old version was an interpreter if I'm correct.


you may be right, but in any event Zodttd wouldn't have bothered coding a dynamic recompiler if it hadn't been better than the old interpreter, so my question was quite useless :)

BTW, what's the difference between static recompiler and dynamic recompiler?

static recompiler: recompile the whole code before execution (the whole recompiled program must fit the ram)

dynamic recompiler: recompile during the execution
 
Last edited by a moderator:
Nr.56 posted on Aug 22 2006 at 03:24 PM said:
static recompiler: recompile the whole code before execution

dynamic recompiler: recompile during the execution


Sounds good...but what is the interpreter? :)
 
Last edited by a moderator:
reiboul posted on Aug 22 2006 at 04:30 PM said:
Nr.56 posted on Aug 22 2006 at 03:24 PM said:
static recompiler: recompile the whole code before execution

dynamic recompiler: recompile during the execution


Sounds good...but what is the interpreter? :)


As far as I remember (correct me please if am wrong) an interpreter is much slower, it executes a function/small chunk at a time, goes back to memory to fetch the next chunk and so on, an example for an interpreter is the Java Virtual Machine.
 
Last edited by a moderator:
An interpretter is a program that read
every byte of the other cpu program and execute
each opcode one after another.
 
paxl13 posted on Aug 22 2006 at 05:50 PM said:
An interpretter is a program that read
every byte of the other cpu program and execute
each opcode one after another.


OK, guess i'm gonna learn it when time will come because right now i don't really see the difference, as every method is, taking code, and executing it on the ARM, by one way or another ;)
In a few week I will sit in a chair, learning programming languages ;) but for now I only know a few about C and Basic :unsure:

Back to the GP2X, a friend of mine got impressed, seeing NeoGeo emulation running on the FP2X :p they will get even more when they will see PSX emulation!!
 
Last edited by a moderator:
sehs33 posted on Aug 22 2006 at 04:59 PM said:
As far as I remember (correct me please if am wrong) an interpreter is much slower, it executes a function/small chunk at a time, goes back to memory to fetch the next chunk and so on, an example for an interpreter is the Java Virtual Machine.
Java is a very bad example, because the Just-In-Time compiler translates the Java bytecode into bytecode for the machine (call it dynamic recompilation if you want :)).
Better examples for a interpreter are BASIC, Perl, Python, Ruby, PHP or JavaScript. Btw, the ScummVM is an interpreter, too.
 
Last edited by a moderator:
Static recompilation: read the whole program, translate everything into native code and execute it, the main limitation is code-morphing programs

Interpreter: read a instruction, translate to native code and execute it

Dynamic recompilation: keep it like an interpreter, but keep the recompiled code in a cache, so when in a loop you don't have to translate the same code over and over, just call the cache
 
Stop asking stupid questions and cluttering up this thread... all your answers are on wikipedia... i researched what a dyneric was before i decided to place my first post, so stop being so lazy and start searching... tha way you won't have such simple questions.
 
X-Code posted on Aug 22 2006 at 03:37 AM said:
Getting at it right away Mr.zodttd B)


* Gets gaming gloves on :lol:

av-1411.gif
 
Last edited by a moderator:
@ do.me.nice

Community means people talking to each other and helping each other out, not flaming people with RTFM due to your intellectual snobbery. The threads slack at them moment, a bit of conversation doesn't hurt - besides no-one else seems to mind answering the question...
 
Shikaku posted on Aug 22 2006 at 08:02 PM said:
X-Code posted on Aug 22 2006 at 03:37 AM said:
Getting at it right away Mr.zodttd B)


* Gets gaming gloves on :lol:

av-1411.gif


Now you are playing with POWER B)
 
Last edited by a moderator:
Mr_Munk posted on Aug 22 2006 at 10:34 PM said:
@ do.me.nice

Community means people talking to each other and helping each other out, not flaming people with RTFM due to your intellectual snobbery. The threads slack at them moment, a bit of conversation doesn't hurt - besides no-one else seems to mind answering the question...

thank you :D (but I must admit do.me.nice wasn't that false... maybe his way of saying it? ;) )

we have nothing else to do until Zodttd or X-Code bring us news ;)
 
Last edited by a moderator:
News? Did I hear news? :p

Oh yeah thats right, news...The build sent to X-Code wouldn't work on his GP2X due to the way I linked to SDL. I decided to just remove SDL and go back to the old toolchain and "minimal" type GP2X wrapper.

Note to developers, if you're executing a malloc'd chunk of memory as a function such as I do when running my dynarec, be aware that Squidge's MMU patch affected things for me. Enough to make it crash at predictable times, but oddly when it's in cache and has already run a few times. Removing the patch fixed things.

X-Code should be only a few beers away from posting as he has been sent the new build. I have a feeling most games won't perform faster than the interpreter at this point on the GP2X, but I'm not sure why yet. If it is the dynarec's fault and something else slowing things down, then there's still plenty of optimizing to be done. Let's hope X-Code has better results than my initial one.
 
do me nice: have you seen that your flame took about half of the time I've spent to just answer the fu***ng question?
there should be a rule: one can only flame other if the answer for the question is longer than 1 minute spent answering

people should get sick of this RTFM bad-will to help...


so, zodttd, you entirely removed squidge's patch??

ain't possible to just flush the cache before executing or something like that? (worked with DrMD once..)

I think it's even weirder (does this term exist?) that this happen, as the cpu itself handles everything (the execution AND the cache) so there should be no problem, right?
I don't get why it would hang by executing code on malloc'ed mem...

but hey, at least it's running! :ph34r:
 
I found some weirdness in the dynarec as well...

Here's my top reasons my dynarec is weird:
#1 Squidges MMU patch affects the way code in the translation cache is executed.
#2 Even though I align the recompiled function in the cache on a 32bit boundry, I still need to pad at least 512 bytes between functions in the single malloc'd cache buffer.
#3 The dynarec is brutally slow without caching. I wonder why it's not at least near as fast as the interpreter without caching, and then faster than the interpreter with caching. I know I have a lot of optimizing to do, but I'd still expect more speed. Sometimes truth is stranger than fiction. ;P
 
do.me.nice posted on Aug 22 2006 at 12:53 PM said:
Stop asking stupid questions

Stop being a stupid noob. Hope you fix that problem Zodttd.
 
Last edited by a moderator:
Back
Top