VOGONS


Pentium MMX emulation - possible?

Topic actions

First post, by OSH

User metadata
Rank Member
Rank
Member

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

Reply 2 of 32, by OSH

User metadata
Rank Member
Rank
Member

It's not for DOS. rather for Windows based games. I know, DOSBOX is not intended to run Windows 9x, but simply I want to know, will be Pentium MMX emulation implemented or not. Only this 😀

Reply 4 of 32, by OSH

User metadata
Rank Member
Rank
Member

I'm patient, I can wait 😀

Reply 5 of 32, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

What windows based thing needs it?

Reply 6 of 32, by OSH

User metadata
Rank Member
Rank
Member

A game "Jane's Israeli Air Force". This game works only under Win95/98 and need MMX. I want test gulikoza's Glide addition, but this game won't install under Windows 95 while will be MMX emulation implemented.

Reply 7 of 32, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

This game works only under Win95/98 and need MMX.

What message do you get?

Reply 8 of 32, by OSH

User metadata
Rank Member
Rank
Member

"This game requires Pentium MMX" or similar...

Reply 9 of 32, by moejoe

User metadata
Rank Newbie
Rank
Newbie

I'd actually like to see that to be able to use Impulse Tracker with resonant filters (which require MMX) in DosBox.

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 11 of 32, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Nothing for what i'd implement a complex additional instruction set into the emulation,
especially not for the "for performance reasons" argument, so good luck.

Reply 12 of 32, by moejoe

User metadata
Rank Newbie
Rank
Newbie

Well in Impulse Tracker it's not "for performance reasons" but the only way to get resonant filtering working... :\

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 14 of 32, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

how about using sse registers and emulating mmx instructions with sse (I assume they are similar enough?). That would work for dynamic core. For dynrec, one would have to write C alternatives...

http://www.si-gamer.net/gulikoza

Reply 15 of 32, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

Don't have to write it, there's mmx in qemu and bochs that could be ported or use the mmx library.

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/

Reply 17 of 32, by ih8registrations

User metadata
Rank Oldbie
Rank
Oldbie

The second one. "does not run under windows" but look at the source. The code is very simple and the only thing tying it to Linux is that he's using sigcontext.h directly, which can be gotten to through glibc.