dosbox-pure icon indicating copy to clipboard operation
dosbox-pure copied to clipboard

[Feature Request] MMX Instruction Set Support

Open ryz opened this issue 2 years ago • 10 comments

Hello,

I've set up my Windows 98 installation, and a few games run very well (Age of Empires 1, Trespasser for example).

I've just installed the game Nocturne (1999) to a D drive SAV file (had to increase the max capacity to 2GB, fyi).

When trying to start the game, the following error message appears:

image

"This CPU does not have an MMX unit."

Is there a way to enable MMX support?

ryz avatar Jul 08 '22 15:07 ryz

As of now, DOSBox and DOSBox Pure emulate just the basic Pentium CPU without MMX. DOSBox-X has implemented all kinds of CPU extensions on top of that, including MMX and Pentium 2 and 3 architectures. While incorporating these improvements into this project is certainly possible, it's not a simple task. It's also a case-by-case thing where because DOSBox-X in its entirety is overall very different from the original DOSBox.

schellingb avatar Jul 08 '22 16:07 schellingb

Thanks for the answer. Bummer! Wasn't aware of that. Thank you again for your outstanding work on this core!

ryz avatar Jul 08 '22 19:07 ryz

As of now, DOSBox and DOSBox Pure emulate just the basic Pentium CPU without MMX. DOSBox-X has implemented all kinds of CPU extensions on top of that, including MMX and Pentium 2 and 3 architectures. While incorporating these improvements into this project is certainly possible, it's not a simple task. It's also a case-by-case thing where because DOSBox-X in its entirety is overall very different from the original DOSBox.

WOAW i discover this ... thanks for the information. For sure, in the future if you can take from DosBox-x the code to emulate MMX, Pentieum 2 and 3 ... it will help a lot for many Windows games ... maybe with a core option like on AMIGA or other computers, to choose the Proc we want to emulate for each game :)

Darknior avatar Jul 09 '22 10:07 Darknior

There already is a core option to control the emulated CPU instruction set (System > CPU Type). But when running an installed operating system it automatically gets bumped to the highest setting (which is the mentioned Pentium 1 without MMX) because otherwise Windows 9x doesn't really run.

Also it sometimes isn't just a case where adding more features is without downsides. Sometimes expanding the features of the CPU emulation can also incur a performance loss throughout the emulation because now there's more things to consider etc. That's what I mean it being a case-by-case thing for incorporating such expansions.

Though if we're looking at the list of things:

  • Pentium MMX instructions
  • Pentium Pro instructions
  • Pentium 2 instructions
  • Pentium 3 instructions
  • Pentium 3 SSE instructions

MMX certainly would be the next on the list to incorporate. We can't go to Pentium 2 without doing the stuff above anyway. Though I'm not sure if at some point a DOSBox-X libretro core wouldn't make more sense. DOSBox-X has a few more people maintaining it than just me here on this project :-)

Also as I have mentioned in #300, this core is intended to run games. So unless there's games which can be emulated at a playable speed it really isn't very useful in my opinion. For example putting all the work in just so it's possible to run Windows XP and a game from 2004 at 1 FPS doesn't really accomplish anything.

schellingb avatar Jul 09 '22 12:07 schellingb

MMX certainly would be the next on the list to incorporate. We can't go to Pentium 2 without doing the stuff above anyway. Though I'm not sure if at some point a DOSBox-X libretro core wouldn't make more sense. DOSBox-X has a few more people maintaining it than just me here on this project :-)

For sure MMX will help for some games :) Dosbox-x is a fine project but i'm not using it, i don't really like. Your PURE one is really better. And designed to play games easily. I prefer stand that you add this option :)

Also as I have mentioned in #300, this core is intended to run games. So unless there's games which can be emulated at a playable speed it really isn't very useful in my opinion. For example putting all the work in just so it's possible to run Windows XP and a game from 2004 at 1 FPS doesn't really accomplish anything.

For sure i'm really agree with you, i only want to play games i've played 25 years before when i was young lol Make something not playable is not an accomplishment :( But for sure i wish one day it will be possible to launch and plays XP games ... some were so excellent in my mind :)

Darknior avatar Jul 09 '22 12:07 Darknior

There already is a core option to control the emulated CPU instruction set (System > CPU Type). But when running an installed operating system it automatically gets bumped to the highest setting (which is the mentioned Pentium 1 without MMX) because otherwise Windows 9x doesn't really run.

Also it sometimes isn't just a case where adding more features is without downsides. Sometimes expanding the features of the CPU emulation can also incur a performance loss throughout the emulation because now there's more things to consider etc. That's what I mean it being a case-by-case thing for incorporating such expansions.

Though if we're looking at the list of things:

* Pentium MMX instructions

* Pentium Pro instructions

* Pentium 2 instructions

* Pentium 3 instructions

* Pentium 3 SSE instructions

MMX certainly would be the next on the list to incorporate. We can't go to Pentium 2 without doing the stuff above anyway. Though I'm not sure if at some point a DOSBox-X libretro core wouldn't make more sense. DOSBox-X has a few more people maintaining it than just me here on this project :-)

Also as I have mentioned in #300, this core is intended to run games. So unless there's games which can be emulated at a playable speed it really isn't very useful in my opinion. For example putting all the work in just so it's possible to run Windows XP and a game from 2004 at 1 FPS doesn't really accomplish anything.

Great notice, MMX support will make work games like Delta Foce or Nocturne, ¿do you know when dosbox pure will have mxx?.

Thank you again schellingb

gordon81-afk avatar Jul 10 '22 12:07 gordon81-afk

Settlers IV would benefit from MMX support too

S4

Kupo91 avatar Dec 16 '23 04:12 Kupo91

Related:

  • https://github.com/joncampbell123/dosbox-x/issues/1687
  • https://github.com/dosbox-staging/dosbox-staging/pull/3426 - benchmarks show order of magnitude improvement and some games benefit a lot from that. Also there you can see a synthetic benchmark showing emulation performance exceeding P4 1.5GHz when run on a modern desktop host.

Torinde avatar Feb 28 '24 09:02 Torinde