PDA
$threadinfo[title]
-


Mauvais
December 17th, 2002, 15:19
Hey guys,

I've been working to port Mupen64 to a Big Endian (SGI) platform, but it's turning out to be harder than I expected. I began by building/porting a version of both Mupen (0.0.90a) and TR64 (0.7.4) that compile and run fine under Linux, and am trying to migrate to the SGI.

I compiled Mupen with -D_BIG_ENDIAN and removed the byteswaps (^1 and ^3) from the hle_ucXX.h in TR64. Apparently that wasn't enough, because the triangles being drawn on the two systems are much different.

Here are the first two triangles drawn with MDrawVisualTriangle() in Mario 64 for both systems. The linux version works fine but the SGI version crashes at the end of the the frame.

Linux: DrawTriangle: 36 (14.42,-9.29,2993.15,3199.78) (17.86,-23.09,2992.99,3199.62) (1
9.11,-7.78,2993.17,3199.79)

SGI: DrawTriangle: 36 (131247.00,174996.00,-178008.69,-174996.00) (41326.12,55101.50,-56226.20,-55101.50) (209816.62,279755.50,-284417.88,-279755.50)

For someone who has made a big-endian port, what did I forget? Thanks in advance,

Mauvais

Hacktarux
December 21st, 2002, 16:44
I suggest you to contact Flea, for endianness issues, he has ported mupen64 and tr64 plugin to macosx ;)

Flea
December 23rd, 2002, 04:01
I forgot, you need a fix to pure_interp.c.

In function MTC0(), Line 1264, use this code:

reg_cop1_simple[i]=(float*)& reg_cop1_fgr_64[i>>1]+(1-(i&1));

This should fix your drawing problems.