xmame 0.106 (need some help with MIPSpro)

MAME/MESS, Vice(C64), Stella(VCS2600), UAE(Amiga) and more.
gijoe77
Posts: 242
Joined: Sat Jun 21, 2003 2:20 pm
Location: NJ

xmame 0.106 (need some help with MIPSpro)

Unread postby gijoe77 » Thu Mar 19, 2015 6:48 am

Hi all,

I was able to compile xmame v0.106 with gcc, I attached it if anyone whats to give it a spin, I also included the makefile I used. It's pretty slow! I have a comparison picture of a fast xmame.36 I compiled a few years ago (that I spent a lot of time cutting stuff out in the source like audio and some other stuff - I attached it also if someone wants to give it a spin as well ) running pacman side by side.

I'm trying to compile v0.106 using MIPSpro, but I'm running into an error:

Code: Select all

Compiling src/cpu/m68000/m68kmake.c...
ld32: ERROR   146: Expecting relocatable objects: xmame.obj/cpu/m68000/m68kmake.o is IPA intermediate object; You must specify -IPA on link line.


I have -IPA in both the $CFLAGS and $LD, so there appears to be a link line somewhere and I just can't seem to find it - if someone might have an idea I would be grateful. If anyone wants to play with this the xmame .106 source can be found at http://web.archive.org/web/20090308015400/http://x.mame.net/download.html
Attachments
20150319_015236.jpg
xmame_x11_36.rar
(2.44 MiB) Downloaded 32 times
makefile.irix.cc.txt
(29.1 KiB) Downloaded 33 times
makefile.irix.gcc.txt
(29.41 KiB) Downloaded 34 times
xmame.106-gcc.rar
(8.99 MiB) Downloaded 33 times

diegel
Donor
Donor
Posts: 352
Joined: Tue Nov 17, 2009 2:08 am
Location: Hamburg, Germany

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby diegel » Thu Mar 19, 2015 10:20 am

gijoe77 wrote:I was able to compile xmame v0.106 with gcc
Nice, thank you.

Code: Select all

Compiling src/cpu/m68000/m68kmake.c...
ld32: ERROR   146: Expecting relocatable objects: xmame.obj/cpu/m68000/m68kmake.o is IPA intermediate object; You must specify -IPA on link line.
You get this type of error if you use -Ofast for optimization. In this case optimization takes place at linking stage and you need -IPA as a linker option. Often things are put together using libtool and I never figured out how you can use -IPA with libtool, also I never was able to link a shared library using -IPA. I would check for -Ofast in the make and config files and change it in -O3 .
:Tezro: :Fuel: :Octane2: :Octane: :Onyx2: :O2+: :O2: :Indy: :Indigo: :Cube:

gijoe77
Posts: 242
Joined: Sat Jun 21, 2003 2:20 pm
Location: NJ

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby gijoe77 » Thu Mar 19, 2015 5:29 pm

Thank you diegel,

I changed -Ofast to -O3 and it worked! At least it got rid of the IPA complaints - I ran into a strange error I have no idea what to make of - can you shed any light on this?

Code: Select all

Compiling src/vidhrdw/scotrsht.c ...
Compiling src/drivers/scramble.c ...
<snip warnings>
### Assertion failure at line 1387 of ../../be/lno/lwn_util.cxx:
### Compiler Error in file src/machine/scramble.c during Loop Nest Optimizer phase:
### strange parent OPC_U4CVTL: 10064e60 != 1004a238
cc INTERNAL ERROR:  /usr/lib32/cmplrs/be returned non-zero status 1
gmake: *** [xmame.obj/machine/scramble.o] Error 1
bash-4.3#

User avatar
foetz
Moderator
Moderator
Posts: 6575
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby foetz » Thu Mar 19, 2015 5:58 pm

turn on verbose make so that you can actually see the compilation line. then try the file in question with lower optimization or a different frontend as described there viewtopic.php?p=7373083#p7373083

gijoe77
Posts: 242
Joined: Sat Jun 21, 2003 2:20 pm
Location: NJ

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby gijoe77 » Thu Mar 19, 2015 11:20 pm

looking over the MIPSpro books (I'm slowly trying to un-newb myself) it looks like maybe tuning the LNO options might be something I will double back on since that seems to be the failure here.

For now I'm just trying to get this to compile and so I changed -O3 to -O2 and it got passed the issue, but there was an error while linking xmame.obj (something about -lexpat), I had to go to work though so I will trying to figure out what the error means when I get back home.

User avatar
foetz
Moderator
Moderator
Posts: 6575
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby foetz » Fri Mar 20, 2015 12:20 am

gijoe77 wrote:there was an error while linking xmame.obj (something about -lexpat)

then you either have no expat or the linker can't find it

gijoe77
Posts: 242
Joined: Sat Jun 21, 2003 2:20 pm
Location: NJ

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby gijoe77 » Fri Mar 20, 2015 1:17 am

I had to add

Code: Select all

INCLUDES = -I/usr/nekoware/include


to the makefile because the compilier was bombing on not finding expat.h at some point, which seemed to fix the issue up until the final linking. I did verify expat was installed when I first ran into the expat.h issue. so now the trick for me will be how to make the linker find it :)

User avatar
foetz
Moderator
Moderator
Posts: 6575
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby foetz » Fri Mar 20, 2015 1:30 am

gijoe77 wrote:I had to add

Code: Select all

INCLUDES = -I/usr/nekoware/include


to the makefile because the compilier was bombing on not finding expat.h at some point, which seemed to fix the issue up until the final linking. I did verify expat was installed when I first ran into the expat.h issue. so now the trick for me will be how to make the linker find it :)

since you seem to use the nekoware expat add -L/usr/nekoware/lib to the LDFLAGS.

btw that's general stuff not related to a specific compiler. you said you compiled it with gcc so the same would have applied there, too

gijoe77
Posts: 242
Joined: Sat Jun 21, 2003 2:20 pm
Location: NJ

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby gijoe77 » Fri Mar 20, 2015 4:17 am

ok thanks, I missed that detail (working with two makefiles, I think they are both blurring together in my head).

That worked, although I'm surprised the gcc build runs a few frames faster then the MIPspro build! both were basically built with -O2 and that's about it with the fancy stuff. I'll be playing with the MIPSpro options and seeing if I can give it any speed boosts

User avatar
foetz
Moderator
Moderator
Posts: 6575
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby foetz » Fri Mar 20, 2015 5:10 am

gijoe77 wrote:I'm surprised the gcc build runs a few frames faster then the MIPspro build! both were basically built with -O2

basically? that doesn't help :P
have a look at a full compile line of each and compare all options. also keep in mind that the vast majority of all freeware is made for gcc hence the makefiles as well as the source code often contain additional "tunings" if gcc is detected. only after finding such stuff and making the appropriate changes a fair comparison can be done.
either way the main goal here is to use -O3, no matter which compiler

gijoe77
Posts: 242
Joined: Sat Jun 21, 2003 2:20 pm
Location: NJ

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby gijoe77 » Fri Mar 20, 2015 5:51 am

so whats the main difference between -O3 and -Ofast ? is -Ofast > -O3?

How exactly does -OPT:Olimit=0 come into play? Can that be used with either -O3 and/or -Ofast?

User avatar
foetz
Moderator
Moderator
Posts: 6575
Joined: Mon Apr 14, 2003 4:34 am
Contact:

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby foetz » Fri Mar 20, 2015 6:17 am

gijoe77 wrote:so whats the main difference between -O3 and -Ofast ? is -Ofast > -O3?

How exactly does -OPT:Olimit=0 come into play? Can that be used with either -O3 and/or -Ofast?

Code: Select all

man cc

;)

gijoe77
Posts: 242
Joined: Sat Jun 21, 2003 2:20 pm
Location: NJ

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby gijoe77 » Fri Mar 20, 2015 5:41 pm

man cc


I knew that was coming ;) I was trying to lob as many questions as I could before the dreaded RTM came into play ^_^

diegel
Donor
Donor
Posts: 352
Joined: Tue Nov 17, 2009 2:08 am
Location: Hamburg, Germany

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby diegel » Sat Mar 21, 2015 2:31 am

These are my preferred mipspro optimization options:

Code: Select all

-O3 -mips4 -TARG:platform=IP35:proc=r16000 -OPT:Olimit=0:roundoff=3:alias=TYPED -INLINE
:Tezro: :Fuel: :Octane2: :Octane: :Onyx2: :O2+: :O2: :Indy: :Indigo: :Cube:

gijoe77
Posts: 242
Joined: Sat Jun 21, 2003 2:20 pm
Location: NJ

Re: xmame 0.106 (need some help with MIPSpro)

Unread postby gijoe77 » Sat Mar 21, 2015 2:37 am

I compiled a frontend (gxmame version 0.34b) if anyone wants to give it a spin, works good for me for older version of xmame (v .58). not so much for my current .106 but its a work in progress...
Attachments
pulstar.jpg
gxmame.jpg
gxmame.0.34b-older.tar.gz
(191.49 KiB) Downloaded 32 times


Return to “Emulation”

Who is online

Users browsing this forum: No registered users and 1 guest