(05-15-2010, 03:57 PM)tommy87 Wrote: (05-14-2010, 10:04 PM)cottonvibes Wrote: Basically the static recompiled resulting program will still have to use a lot of dynamic recompilation since many things won't be known at the time at static recompilation.
Thats not exaktly the truth. You can know EVERYTHING about the programm when you make static recompilation BUT its the question how much work and time you want to put in static recompiling.
Edit: Perhaps I should limit my statement. There are some things like Keystrokes and random numbers which can only be known during runtime.
There's a bunch of things that can't be known at recompile time.
Indirect jumps for example.
If you have a jump based on the value of a 32bit non-constant register, that means there 2^32 possible destinations it can jump to.
That means you can't compile the destination code because its not known.
You either have to use dynamic recompilation techniques at that point, or you need to have coded your static recompiler to interpret such code blocks with an internal interpreter.
(05-15-2010, 03:57 PM)tommy87 Wrote: (05-14-2010, 10:04 PM)cottonvibes Wrote: The more vigerous you want the static recompilation to be, the more you have to make assumptions about the game's code.
This effectively means worse and worse compatibility.
Yes you need to make assumptions about the game's code, but there is no need to make assumptions which can not be proved.
well for example, psuedonym says games do not use SMC.
They probably don't, but that is an assumption he's making that is not proven.
If you code a static recompiler with the pretense that nothing uses SMC, then that means anything that actually does use it will not work correctly.
You can make more and more assumptions like this, and with each assumption you're limiting the amount of stuff you can run.
pcsx2 is not a simulator for running games, it is an emulator which attempts to emulate the hardware.
this means its not just about what games do, but rather what can be done on the ps2 system.