xan1242 / hp2wsfix

Need for Speed: Hot Pursuit 2 PC - Widescreen fix
MIT License
43 stars 2 forks source link

SSE2 Support (non)requirement? #12

Open xan1242 opened 4 years ago

xan1242 commented 4 years ago

A potential non-requirement.

Depending on how many people ask, I might make a special compatibility version for even older CPUs (Pentium 3 & Athlon/Sempron XP and older)

As this is an older game I'd imagine a lot of players would be playing it on those kinds of rigs, but then again, how many are running those kinds of computers with widescreen monitors?

I've tested on Windows 7 on a Compaq Evo N600c with a Pentium 3. (not XP, I know, the new ASI loader I made was compiled with VS2019 so it requires SSE2, also the laptop itself has no widescreen monitor so yay) Barely got it to run with the Ultimate ASI Loader v3.4, as newer ones require SSE2 on the ASI loader side.

Currently the fix crashes in the GetDesktopRes() function, the error being (excerpt from IDA): An attempt was made to execute an illegal instruction (exc.code c000001d, tid 3480)

The instruction itself: movq qword ptr [esp+28h], xmm0

Pentium 3 doesn't have movq instruction indeed. A workaround would be to compile with something older like MSVC 2010 to get it going (or maybe even older)

CookiePLMonster commented 3 years ago

A workaround would be to compile with something older like MSVC 2010 to get it going (or maybe even older)

This is not needed though, you can just opt for /arch:IA32 (or Extended Instruction Set: None) and the compiler will not emit SSE instructions in normal code.

mirh commented 2 years ago

You also don't need any particularly special old version to target XP. Using the v141_xp toolset (even in VS2019) is still perfectly viable.. 13AG whims allowing.

MSVC 2010 may instead be needed if you want to target windows 98 (or maybe not, I'm not sure about the power of kernelex)