Slightly OT: Mame compiler questions
Moderator: BigEvilCorporation
Slightly OT: Mame compiler questions
While testing Regen for AMD compatibility with Aamir I remembered something I thought about last year with MAME. There are compilers out there, and optimization tutorials for AMD processors. This would be a significant learning curve for me, as I've never compiled anything outside of a basic C or C++ file. Does anybody in here have experience or advice as to whether a MAME executable optimized for Athlon 64s would be of any benefit?
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Probably not. If there really is an AMD issue with Regen, it's almost certainly in any assembly language sections he has. There are subtle differences between AMD and Intel that systems and compiler writers need to be aware of, and a good set of the manuals is more helpful. For example, AMD can have some issues with SSE instructions on improperly aligned data. That would be the first place I'd check for AMD issues - assembly functions using SSE. You see the same issues in video codecs, which usually have lots of hand-tuned assembly for best speed.
I will be sending a profiler-enabled build to him to see where the problem is.
For MAME, I don't think so. Thats because MAME is a accuracy oriented emulator that employs accurate but slower techniques to emulate. Optimizing like you said would only make a little effect.Does anybody in here have experience or advice as to whether a MAME executable optimized for Athlon 64s would be of any benefit?
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
I think he's talking about MAME's "universal" dynamic recompiler. It's an effort to try to make the emulation faster since a lot of the "newer" arcades they are emulating are at PSX or better levels, which means the old interpretive CPU cores don't cut it.
The problem with looking at MAME's DR is that DR is composed of very limited instruction sets - things like load, store, logical op, arithmetic op, branch... it's kept limited to make it more simple than most assembly languages which makes it easier to debug.
The problem with looking at MAME's DR is that DR is composed of very limited instruction sets - things like load, store, logical op, arithmetic op, branch... it's kept limited to make it more simple than most assembly languages which makes it easier to debug.