Opened 6 years ago

Closed 4 years ago

#10695 closed defect (invalid)

BACKENDS: Talos II - ppc64le incorrectly detected as big endian

Reported by: classilla Owned by: sev-
Priority: normal Component: Ports
Version: Keywords:
Cc: Game:

Description

Later Power processors such as the Talos II's POWER9 CPUs can run in little-endian mode, but this doesn't seem to be detected by ScummVM, which still thinks it's big-endian and causes graphic corruption.

These are usually listed as ppc64le or ppc64el (uname -m on this Fedora system is "ppc64le").

Change History (5)

comment:1 by digitall, 6 years ago

classilla: Since the Talos II workstation is not that common, I can't replicate your issue directly as I don't have access to the hardware.

However, assuming that you are compiling ScummVM natively with GCC (or similar), Endian is detected by the configure script which does this by testing the output of a compiled test program. See:
https://github.com/scummvm/scummvm/blob/master/configure#L2198

The normal output on my x86_64 Linux box which is little endian is:
<snip>
Running ScummVM configure...
Looking for C++ compiler... g++
...
Checking for whether C++ compiler accepts -Wno-pragma-pack... no
Checking endianness... little
</snip>

Can you confirm whether the configure script when run on your machine reports as big or little endian? Or is it reporting some kind of error to stderr?

Apart from that, you could try extracting that C++ program and manually compiling to compare the output...

comment:2 by digitall, 6 years ago

You could also try the following patch to the configure script:

diff --git a/configure b/configure
index 2f846010ac..0466a48359 100755
--- a/configure
+++ b/configure
@@ -2215,6 +2215,8 @@ elif $_strings $TMPO.o | grep LiTTleEnDian >/dev/null; then
        _endian=little
 fi
 echo $_endian;
+cp tmp_endianness_check.cpp tmp_endianness_check.cpp.bak
+cp $TMPO.o tmp_endianness_check.o.bak
 cc_check_clean tmp_endianness_check.cpp
 
 case $_endian in

This will copy the relevant source code and object file for this test to files ending in .bak so you can zip them and attach to this bug for analysis.

comment:3 by bonki, 5 years ago

@classilla Have you had a chance to test digitall's suggestions?

comment:4 by raziel-, 4 years ago

Summary: ppc64le incorrectly detected as big endianBACKENDS: Talos II - ppc64le incorrectly detected as big endian

comment:5 by sev-, 4 years ago

Owner: set to sev-
Resolution: invalid
Status: newclosed

Closing due to inactivity and lack of infomation

Note: See TracTickets for help on using tickets.