Laurent said:
Oh I see why we don't agree: you took my original statement that CPU emulation was the easy part, as writing a dynarec is easy.
That's not what I meant, and my previous answer made it clear when I said that this can be made as complex as one wants
Oh, okay, then I guess we agree ;D
Laurent said:
I agree on all the points you made (except that if your GBA emulator is able to run ARMWrestler emulator checker, then you have implemented at least one UNPREDICTABLE behaviour
).
Which behavior? gpSP passes ARMWrestler fine.
Laurent said:
But I still stand to my claim: not all emulators fit everyone needs.
Of course. Some users will even prefer more accuracy so that the emulator is a good gauge of speed or helps them bugtest more against the real machine. Emulators are usually more permissive than the real hardware; this isn't a problem for working software but for broken software.. Fortunately, handheld devices really don't ever have to be useful as homebrew development aids.
Laurent said:
I will give a simple example: I applied static recompilation to an Atari ST program; I did that to see what could be gained. The end result was a program more than a thousand faster than the original Atari when run on an AMD 3500+. But my "emulator" will only run *one* ST program
I've actually never been a strong supporter of static recompilation for the inherent problems it has. I'd be very interested in seeing your code though, if that's possible. Was the ST program that it runs written specifically for it?
Laurent said:
Now take Aranym (a dynarec) for Atari, it doesn't run any demo (at least that's my understanding).
I've never heard of it, but I'll see what information I can find. Naturally, dynamic recompilation in its most typical, pure form is not good for older machines (and usually not nearly as useful either). I wouldn't implement a straight dynarec in my PC-Engine emulator, although I desperately want to implement a hybrid one that falls back on the interpreter for providing the proper block cycle granularity (and executing code in RAM to some extent, perhaps). Of course, we both know that the more a CPU needs cycle accuracy the less it probably needs a dynarec for performance reasons anyway, and the other components in the platform will tend to demand more to emulate.
Laurent said:
And then you have Hatari which runs many (most?) demos.
Is this a run of the mill interpreter? I'll have to look at it too.
You'll have to excuse my attitude against what I've seen as kind of an accuracy obsession amongst many these days, let me try to explain where I'm coming from a little more...
Naturally there's a huge difference between an emulator that runs only a small fraction of software and one that runs over 90%. Both could be useful, but most will not settle for the former. My problem is that accuracy has basically been idealized to the point where to many an emulator with 95% compatibility is considered trash, even if the games it doesn't play are ones no one cares about. Or if it only has very minor glitches in a few games (like a junk scanline at the top or bottom). I constantly see a push to make a "more accurate" emulator for some platform. I suppose that this is done more these days because really the platforms have been emulated well ages ago, and you can afford more now to write a slow emulator.
It really goes along with a trend in general in programming, where efficiency is ignored because it cannot be noticed on the average user's machine anymore (to an extent), and instead other things are praised. Sometimes there are really no compatibility problems at all with existing emulators, and attempts at "accuracy" are merely praised for being something new, rather than addressing what problems the original emulator might actually have.
In the mean time, open source emulators caring less and less about efficiency has meant that a lot of code has had to be rewritten and rethought when ported to handhelds, if not abandoned for new emulators entirely. Handhelds will continue to grow more powerful, but efficiency for the sake of battery life will always be important.
At any rate, I don't really like the connotation that just because an emulator is faster it necessarily must be less compatible or even accurate than the competition, or that it must be. Another emu author once said about gpSP in response to a compatibility question someone had, that because of how gpSP is written it won't run some games. This really isn't true (and it was an assumption he made), and I find it rather insulting, as it seems to suggest that the only way higher performance can be achieved is by reducing accuracy, rather than thinking of more clever ways to write the code. It's probably the sentiments from the opposite side that prompts this - emulator authors that insist that their slow emulators must be as slow as they are due to high accuracy (byuu once suggested that BSNES could not be made 2x faster while retaining the same accuracy - I've seen enough of the source code to think that it very well probably could be).