Hi, i thought it is impossible to make pcsx2 to work in my ubuntu 64-bit system but searching a little i read something about the possibility of compiling a 32-bit app in a 64 bit system by using the -m32 option of gcc.. also i know that there are ways to run 32 bit app in a 64 bit linux system.. the problem is that i don't know exactly how to do this 2 things, can anybody help me? i need the basic steps, my CPU is a core 2 duo.
02-28-2009, 12:08 PM
(This post was last modified: 03-01-2009, 03:46 AM by arcum42.)
And, for reference, I've looked at the -m32 option. It works for C++ files, but the compilation fails the moment it encounters one of several .S files in the project, which are straight assembly.
If those assembly files were inlined in the C code like the Windows equivalent, -m32 might be an option, and it's possible there are ways around this that I am not aware of.
The reason they aren't inlined is because having the assembly in question inlined would require the function to be naked (starting with __declspec(naked)), and the gcc programmers refuse to implement nudity in x86. Basically, gcc has an enforced dress code.
So, yes, you'd need to set up a 32 bit chroot. By it's nature, the steps to do so are distribution specific, because when you create a chroot, you're basically installing Linux in minature in a folder on your system (only a 32 bit version, in this case). Some distributions in Linux make it easier then others.
The process should be easy to find with google; I know I've seen instructions for Gentoo and Ubuntu in searches before.
03-01-2009, 04:26 AM
(This post was last modified: 03-01-2009, 04:27 AM by Air.)
The problem isn't even the .S files so much.
For 64 bit to work, you need a completely new JIT recompiler. Yes, Pcsx2 has a JIT recompiler inside, and yes it generates fancified x86-translated versions of your favorite game's executing code, while you play. Simply flipping a compiler switch does nothing for this. It's 10-15 thousand lines of code, most of which needs at least slight modifications to work at all in an x64 environment, and some of which needs fairly extensive modifications to have a reasonable performance profile.
Jake Stine (Air) - Programmer - PCSX2 Dev Team
Oh, I wasn't talking about 64 bit working, Jake.
I was just talking about forcing gcc to compile pcsx2 as 32 bits inside a 64 bit environment; crosscompiling, basically. For that, the .S files are a sticking point, though I'm sure there are ways around that (Which I don't know).