[Bug 27594] Indiana Jones and the Emperor's Tomb: error message "invalid floating point camera matrix" (SSE2 control word handling in msvcrt __control87)

WineHQ Bugzilla wine-bugs at winehq.org
Thu Jul 2 17:13:01 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=27594

qsniyg <qsniyg at mail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |qsniyg at mail.com

--- Comment #38 from qsniyg <qsniyg at mail.com> ---
I've sent https://source.winehq.org/patches/data/188278

The issue appears to be that _control87 doesn't actually send the sse2_cw
parameter to __control87_2.

I created the following test, mimicking the game's behavior:

  unsigned long x86_fpword = 0x0031047f;
  unsigned long sse_fpword = 0x3fa1;

  __asm__ __volatile__( "fldcw %0" : : "m" (x86_fpword) ); // load
  __asm__ __volatile__( "ldmxcsr %0" : : "m" (sse_fpword) ); // load

  _control87(0x100, 0x300);

  __asm__ __volatile__( "fstcw %0" : "=m" (x86_fpword) ); // store
  __asm__ __volatile__( "stmxcsr %0" : "=m" (sse_fpword) ); // store

  printf("Modified: x86=%08x sse=%08x\n", x86_fpword, sse_fpword);

This returns:

  Modified: x86=0031047f sse=00003fa1

Under native msvcrt, but the wine's version (before the patch) returned this:

  Modified: x86=0031047f sse=00003f80

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list