What's new

powerpc linux

rhetoric

New member
I've searched far and wide and found no information on compiling mupen64 for powerpc linux. I've tried to compile, and I get this from sudo ./configure (ubuntu feisty fawn):

Found a working C compiler (gcc).
Checking SDL...
./config.temp: 3: Syntax error: "(" unexpected
*** Couldn't find a working SDL library!

Prior to this, I got errors telling me to install libsdl, so I installed every libsdl related package I could find.

Does anyone reading this have any experience compiling/using mupen64 on a powerpc linux machine?

edit: for clarity, this refers to 32bit ppc, and this is the error I got trying to compile mupen64 0.5
 
Last edited:

sultanoswing

New member
I got this same error when trying to compile a recent (as in a week or two ago) SVN build on Ubuntu Gusty (32-bit x86). Same as you, I tried adding various sdl-dev packages, but to no avail.
 

Richard42

Emulator Developer
I got this same error when trying to compile a recent (as in a week or two ago) SVN build on Ubuntu Gusty (32-bit x86). Same as you, I tried adding various sdl-dev packages, but to no avail.

You may be talking about 2 different things here. Rhetoric, are you trying to compile from the 0.5 source or my SVN build? Because I removed the 'configure' script from my SVN build - it's not there anymore. If you try to compile the mupen 0.5 source I'm pretty sure that you'll have major problems. That's the reason why I started my own branch -- to port it to 64-bit architectures. You can download the source for mupen64-amd64 v1.1 in another thread on this forum and give it a shot with 'make'. Let me know how it turns out.
 
OP
R

rhetoric

New member
You may be talking about 2 different things here. Rhetoric, are you trying to compile from the 0.5 source or my SVN build? Because I removed the 'configure' script from my SVN build - it's not there anymore. If you try to compile the mupen 0.5 source I'm pretty sure that you'll have major problems. That's the reason why I started my own branch -- to port it to 64-bit architectures. You can download the source for mupen64-amd64 v1.1 in another thread on this forum and give it a shot with 'make'. Let me know how it turns out.

I was trying to compile the 0.5 source. Why would I use source designed for amd64 for a powerpc box?
 

Richard42

Emulator Developer
I was trying to compile the 0.5 source. Why would I use source designed for amd64 for a powerpc box?

This branch should be able to build and run on your powerpc box, or at least get closer than the vanilla 0.5 source. The reason it's called -amd64 is that I needed to have something which designated that this is for 64-bit machines (as opposed to Win32 or Linux 32), and it would be kind of ridiculous to call it Mupen64-64 so I settled on -amd64. The C code in Mupen 0.5 will not compile properly on your powerpc 64 with GCC, but the C code in my branch should. There may be some problems with the inline assembly code; I don't know because it hasn't been tested on a powerpc yet.
 
OP
R

rhetoric

New member
This branch should be able to build and run on your powerpc box, or at least get closer than the vanilla 0.5 source. The reason it's called -amd64 is that I needed to have something which designated that this is for 64-bit machines (as opposed to Win32 or Linux 32), and it would be kind of ridiculous to call it Mupen64-64 so I settled on -amd64. The C code in Mupen 0.5 will not compile properly on your powerpc 64 with GCC, but the C code in my branch should. There may be some problems with the inline assembly code; I don't know because it hasn't been tested on a powerpc yet.

I should have been more specific. As far as I know, I'm using 32bit ppc. . .
 

nmn

Mupen64Plus Dev.
Honestly we really shouldn't be naming Mupen64-AMD64 special to 64-bit. Really it doesn't do anything specific to AMD64. Well, OK, some of the code may be specifically there for AMD64 and will only work on AMD64 architectures but that code is not needed for compiling the emulator on other architectures. For example, Mupen64-AMD64 compiles to i386 Linux without any modifications whatsoever. The only real thing you should be worried about with the AMD64 branch (besides if it doesn't compile properly) is that it is not specifically set up to handle the endianness of the PowerPC (Which is backwords of Intel >_<)
 
OP
R

rhetoric

New member
I don't know how to compile this source.. (64 1.1) I'm a bit of a noob, but I know the default CFLAGS are very wrong (i686 for one). I have no idea what to set though. the file pre.mk seems to be some sort of configure script but it doesn't have ppc included so...

edit: I want to thank you all for your help and attention. I've also been talking with the current developer of pcsx-df about my problems compiling and running that psx emulator. I have fceu working for NES, and snes9x working for SNES on my powerpc linux box so far, and I intend to create a thread on the Ubuntu Forums ppc section dedicated to emulation in ppc linux. The thread will document my experiences with each system and collect input from others. So.. don't think I'm just out to have someone hold my hand I'm trying to make things possible for all ppc linux users, especially idiot noobs like myself :)
 
Last edited:

nmn

Mupen64Plus Dev.
No problem :) In the meantime, i have a PPC Mac OSX 10.4 working now. I'll install Linux on a seperate partition, and see if i can add a true port of Mupen64. I may or may not be able to test 3D graphics.

Oh, About the compilation - its pretty straight forward if you have GNU Make, GTK 2.0, and anything else that i forgot. Just enter a terminal, go to the Mupen64-AMD64 source directory, and run "make". Then all you need to do is read the output so you can enter the correct parameters for make the next time.
 
Last edited:
OP
R

rhetoric

New member
make results

Here's what happens. Remember I'm a big noob so.. sorry if I'm missing things that are obvious.

Code:
rhetoric@wintermute:/usr/local/src/Mupen64-amd64-1-1-src$ sudo make
Mupen64-amd64 makefile. 
  Targets:
    all      == Build Mupen64 and all plugins
    clean    == remove object files
    rebuild  == clean and re-build all
  Options:
    BITS=32  == build 32-bit binaries on 64-bit machine
    DBG=1    == turn on debugging functions
    DBGSYM=1 == add debugging symbols to binaries
    VCR=1    == enable video recording
rhetoric@wintermute:/usr/local/src/Mupen64-amd64-1-1-src$ sudo make all
gcc -o main/adler32.o -Wall -pipe -O3 -march=i686 -mtune=pentium-m -mmmx -msse -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations -fno-strict-aliasing `sdl-config --cflags` `pkg-config gtk+-2.0 --cflags` -D_GTK2 -c main/adler32.c
cc1: error: unrecognized command line option "-march=i686"
cc1: error: unrecognized command line option "-mmmx"
cc1: error: unrecognized command line option "-msse"
main/adler32.c:1: error: bad value (pentium-m) for -mtune= switch
make: *** [main/adler32.o] Error 1
 

Richard42

Emulator Developer
Here's what happens. Remember I'm a big noob so.. sorry if I'm missing things that are obvious.

I got it to compile this morning on a PS3 with just a few small changes. I'll do a proper fix to the makefiles tonight and post a new source package in this thread for you to try. One thing that would help me is if you could post the output of the command 'uname -m' here.
 
OP
R

rhetoric

New member
I got it to compile this morning on a PS3 with just a few small changes. I'll do a proper fix to the makefiles tonight and post a new source package in this thread for you to try. One thing that would help me is if you could post the output of the command 'uname -m' here.

sure.

Code:
rhetoric@wintermute:~$ uname -m
ppc
 

nmn

Mupen64Plus Dev.
Well, Generally i'd say change -march="i686" to -march="ppc" and remove -mmmx -msse. I think if we ever did any real port (e.g. one with a recompiler of its own possibly) it would be nice to have altivec support so that we could take advantage of the extensions in PowerPC processors.
 
OP
R

rhetoric

New member
Well, Generally i'd say change -march="i686" to -march="ppc" and remove -mmmx -msse. I think if we ever did any real port (e.g. one with a recompiler of its own possibly) it would be nice to have altivec support so that we could take advantage of the extensions in PowerPC processors.

Where do I change those in the Makefile? Another file?

BTW I'm just using a ppc laptop, but I'm sure a real ppc linux port would make alot of ps3 users happy as well :)
 

Richard42

Emulator Developer
Rhetoric, Here is are new source packages with updated makefiles. I haven't tested the RiceVideo one so there may be unforeseen issues but the Mupen64 one should build. If not, post the error messages here.

Building and running are 2 different things, however. :) I believe that the earlier Mupen releases were supposed to run on big-endian machines. And I don't think that any of our recent changes and fixes should have broken this. But the only way to find out for sure is to try. Let us know how it goes.
 

nmn

Mupen64Plus Dev.
Earlier i found a PPC port of Mupen64. I think I remember a byte order issue of some sort going on with the RSP plugin on PPCs.
 
OP
R

rhetoric

New member
I was able to build it, but the RSP settings will indeed not load. I've yet to try building the ricevideo. Where do I put it if I can build it?

Edit: also can't load controller plugin config, only the "about" button works (same as RSP) :( cant load any settings for mupen64 video plugin, but can get settings for glN64. As for sound, I can't load settings for JttL's plugin but the "test" button returns results in the terminal. I can load setting(s) for the mupen64 sound but test does nothing.

I'll try a ROM I guess and let you know. Any especially friendly games people could recommend (so I can hopefully rule out game-related issues)?

Edit2: I think this output in the terminal which appears immediately upon launch of mupen is important:
Code:
Couldn't load plugin '/usr/local/src/Mupen64-amd64-1-1-development-src/./plugins/blight_input.so': /usr/local/src/Mupen64-amd64-1-1-development-src/./plugins/blight_input.so: undefined symbol: TTF_WasInit

Edit3: Tried to run Mario Golf, here's the terminal output (the emulation window vanishes when the output stops):

Code:
rom size: 25165824 bytes (or 24 Mb or 192 Megabits)
rom loaded succesfully
80 37 12 40
ClockRate=f
Version:1449
CRC: 664ba3d4 678a80b7
name: MarioGolf64         
Manufacturer: Nintendo
Cartridge_ID: 4d46
Country Code : 4500
size: 4096
PC= 80025c00
md5 code:7A5D0D77A462B5A7C372FB19EFDE1A5F
eeprom type:0
init timer!
memory initialized
[glN64]: (II) Initializing SDL video subsystem...
[glN64]: (II) Getting video info...
[glN64]: (II) Setting video mode 640x480...
(II) JttL's sound plugin version 1.3
(II) Initializing SDL audio subsystem...
(II) Allocating memory for audio buffer: 65536 bytes.
demarrage r4300
R4300 Core mode: Dynamic Recompiler
PC=a4000044:0
reg[ 0]:       0       0        reg[16]:       0       0
reg[ 1]:       0       1        reg[17]:       0       0
reg[ 2]:       0 ebda536        reg[18]:       0       0
reg[ 3]:       0 ebda536        reg[19]:       0       0
reg[ 4]:       0    a536        reg[20]:       0       1
reg[ 5]:ffffffffc95973d5        reg[21]:       0       0
reg[ 6]:ffffffffa4001f0c        reg[22]:       0      3f
reg[ 7]:ffffffffa4001f08        reg[23]:       0       0
reg[ 8]:       0      c0        reg[24]:       0       3
reg[ 9]:       0       0        reg[25]:ffffffff9debb54f
reg[10]:       0      40        reg[26]:       0       0
reg[11]:ffffffffa4000040        reg[27]:       0       0
reg[12]:ffffffffed10d0b3        reg[28]:       0       0
reg[13]:       01402a4cc        reg[29]:ffffffffa4001ff0
reg[14]:       02449a366        reg[30]:       0       0
reg[15]:       03103e121        reg[31]:ffffffffa4001550
hi:       0       0        lo:       0       0
apr�s 20480 instructions soit 5000
(II) Cleaning up SDL sound plugin...
 
Last edited:

Top