VOGONS

Common searches


Pentium MMX emulation - possible?

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by OSH

User metadata
Rank Member
Rank
Member

Hi!
One simple question. Will DOSBOX have Pentium MMX emulation?

Reply 3 of 32, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Probably at the very least when Windows 9x is supported, so sometime not soon if ever.

Last edited by DosFreak on 2009-09-09, 12:28. Edited 1 time in total.

How To Ask Questions The Smart Way
Make your games work offline

Reply 10 of 32, by leileilol

User metadata
Rank l33t++
Rank
l33t++
wd wrote:

What windows based thing needs it?

Virtual On also requires MMX and it's for Windows. Rebel Moon Rising needs MMX as well. Serious Sam is also another MMX requiring game.

For DOS, I know two things that make use of MMX - Extreme Assault (For bilinear additive explosion sprite filtering) and Armored Fist 2 (not for new features, but the game does make heavy use of MMX optimizations for performance). ZSNES for DOS also uses MMX for filtered scalers and sound interpolation (huge speed boost there vs. a machine that doesn't MMX at the same clock rate)

apsosig.png
long live PCem

Reply 13 of 32, by Zorbid

User metadata
Rank Member
Rank
Member

I had been looking into this issue some time ago. The instruction set isn't that complex in itself IIRC.

The main difficulty for implementing MMX efficiently is that the MMX and FPU instructions share the same registers, which have to be cleared everytime a program switches from one to the other.

It shouldn't be too hard to add it to the interpreter (*)(using structs/union datatypes?), but mixing it with the current ASM implementation of the FPU used with the dynamic core could be tedious (unless, you decide to emulate the MMX instructions without using the actual MMX instructions of the host, but it won't probably be as fast).

(*) It would still probably take me months to get it implemented, since I would have to
1) get really familiar with the DOSBox code base
2) get my hands dirty and write some real C++ code (I can already parse most of it though I still have some issues with nested (function) pointers definitions and dereferencing. Adding some instructions to a working interpreter should be doable.)
3) fiddle with the quirks of the x86 architecture 😁

Reply 16 of 32, by Zorbid

User metadata
Rank Member
Rank
Member

IIRC, there is some overlap between MMX and SSE, but no 1 to 1 mapping. I don't think that SSE can work on short ints (and/or chars, I don't remember exactly), for example, and I think that some other MMX instructions are unique too.

i8registrations, What do you mean by "the MMX library"?

Digging back to 2007 I found this: http://sourceforge.net/projects/simd-cph/

I also found another, intel(+linux)-only MMX emulation lib here: http://www-sop.inria.fr/members/Sylvain.Pion/progs/mmx-emu/