PCSX2 / pcsx2

PCSX2 - The Playstation 2 Emulator
https://pcsx2.net
GNU General Public License v3.0
11.81k stars 1.63k forks source link

Extended portability support? #58

Closed x9RenJo closed 10 years ago

x9RenJo commented 10 years ago

As it stands PCSX2 is heavily-targeted to x86, which immediately locks off all capabilities to other architectures if the dynarec is recompiling to x86 assembly code on the fly.

I wanted to try and work on a port, but it's so x86-confined that I can't fathom any non-psychotic way of enabling multi-architecture support (ARM, ARM64, Power Architecture, MIPS, etc.). Was there any initial plans to have PCSX2 multi-architecture supported?

From what I can see it's a very deep web of x86 restrictions, making it extremely painful to port without having to rewrite almost everything for the dynarecs of EE, VUs, etc.

I opened this issue to genuinely ask if PCSX2 devs ever plan on easing multi-platform support by refactoring some of the dynarec code to enable more ease of access and enable a better UI of the code with separation of concerns so others can make PCSX2 have a chance outside of x86 alone. There are at least two other viable markets that would love to see a full port of this program (ARM, ARM64, notably for Android-like devices, Blackberry, iOS, etc.).

As it stands the current factoring of the dynarecs is insanely difficult to separate concerns, requiring entire rewrites rather than a higher degree of code re-modification that can be done to easier get support on other platforms.

VaxyneNiscx commented 10 years ago

I'm just taking a shot in the dark at this, but I think it was called PC SX2 for a reason

x9RenJo notifications@github.com wrote:

As it stands PCSX2 is heavily-targeted to x86, which immediately locks off all capabilities to other architectures if the dynarec is recompiling to x86 assembly code on the fly.

I wanted to try and work on a port, but it's so x86-confined that I can't fathom any non-psychotic way of enabling multi-architecture support (ARM, ARM64, Power Architecture, MIPS, etc.). Was there any initial plans to have PCSX2 multi-architecture supported?

From what I can see it's a very deep web of x86 restrictions, making it extremely painful to port without having to rewrite almost everything for the dynarecs of EE, VUs, etc.

I opened this issue to genuinely ask if PCSX2 devs ever plan on easing multi-platform support by refactoring some of the dynarec code to enable more ease of access and enable a better UI of the code with separation of concerns so others can make PCSX2 have a chance outside of x86 alone. There are at least two other viable markets that would love to see a full port of this program (ARM, ARM64, notably for Android-like devices, Blackberry, iOS, etc.).

As it stands the current factoring of the dynarecs is insanely difficult to separate concerns, requiring entire rewrites rather than a higher degree of code re-modification that can be done to easier get support on other platforms.


Reply to this email directly or view it on GitHub: https://github.com/PCSX2/pcsx2/issues/58

gigaherz commented 10 years ago

The fact is, the PS2 is very complex. When PCSX2 was written, portability wasn't of any kind of interest. It worked on Windows and Linux, using x86. It was complex enough with just that. Many years have passed, but the same still applies: all the devs have x86 cpus, and the code is too complex to just "port" to any other architecture.

We had many active developers back then, a lot more free time in our hands, but even then, we'd have said the same: it's too hard to maintain. And nowadays, as you have already seen, it's not any better.

All we can do at this point is say: if you want to achieve it, we'll try to answer any question you may have, but we don't have the time to actively support or maintain such a port.

LasagnaPie commented 10 years ago

Majority of PCs are x86, with processors designed for High Performance needed for PS2 Emulation where as ARM Processors are designed for Power-Efficiency, Stick with x86.

uyjulian commented 10 years ago

There's very few people who is working on the code. However, if you want to clean up the code, that would be great, that will also make x64 easier.

gregory38 commented 10 years ago

So in which camp are you, x86-64 or ARM?

For later it would be a better idea to improve the linux port (opengl) first and to replace as much code as possible with cross-platform equivalent. Port PCSX2 to wx3.0, better separate gui and the core and so on.

uyjulian commented 10 years ago

Yeah pcsx2 code needs to be cleaned up. a lot.

x9RenJo commented 10 years ago

@gregory38 WxWidgets would be trouble on some operating systems ... something like Qt would work on all of the top OSes (Windows, Linux, OS X, Android, iOS, etc.). Qt is also really easy to work with and most everything of PCSX2's GUI would be pretty simple to get on Qt. Even SDL would work well enough ... isn't PPSSPP's GUI SDL based?

uyjulian commented 10 years ago

@x9RenJo Dolphin is based on wxWidgets. Well, only the GUI. PCSX2 most of it is based on wxWidgets Rest of Dolphin doesn't use wxWidgets. And there's a std::thread wrapper for pthreads/windows threads in dolphin, and other things.

x9RenJo commented 10 years ago

@uyjulian That wouldn't be good ... the best way to clean the code up would be to make it as little dependent on the target platform/library on the platform/etc. as possible. PCSX2 will be dying alone with x86-64 if the code never gets a little core refactoring, but that's what I was intending on doing with some stuff.

uyjulian commented 10 years ago

Yeah, I was going to change the Common code to Dolphin's then add compatibility headers for PCSX2. Other parts will still be need to work on.

LasagnaPie commented 10 years ago

The main platforms aught to be Windows and Steam OS

uyjulian commented 10 years ago

Windows -> Already supported Steam OS -> Already supported via Linux

LasagnaPie commented 10 years ago

The main focus aught to be the Graphics backends, OpenGL is way too glitchy to be usable and Gabest as not maintained his DirectX backend in a long time.

Way too much focus on gimmicky post-processing effects.

uyjulian commented 10 years ago

Are you sure you are commenting in the right issue?

xsacha commented 10 years ago

Pretty sure you guys starting making the x86 (original) version of this emulator long before x86 was capable of emulating the PS2.

Well, here's the thing. We have aarch64 and mips processors, today or in the next couple of months, that are capable of emulating PS2. Not only is there no pcsx2 version to deal with this but there is not even any work on attempting to do this. Yes, porting takes time which is why you should have started earlier. That's why the x86 version was started so early. Worse, there's not even a pathway to porting to other archs. Everything depends on x86. That's something that could easily have been fixed in the past year without requiring any special chips or hardware.

ramapcsx2 commented 10 years ago

There's no need to convince us of the benefits of portability. The work that needs to be done is well known and people are already committing patches in that regard. Closing this.

xsacha commented 10 years ago

Seemed like the benefits weren't known as it was pretty much said in here that no other arch can handle pcsx2 and then it was marked 'Low Priority'. Obviously portability is something you'd want all contributors to be mindful of. Not just the few of us trying to get x86-64 compiling.

sudonim1 commented 10 years ago

Notice that the majority of comments in here are from random people who have nothing to do with the project. All that us actual developers have said is "yes, portability would be nice but we can't just wave a wand and make it happen". You seem to be referring to the comment by @LasagnaPie? I don't even know who that is and his opinion certainly does not matter.

xsacha commented 10 years ago

No, @LasagnaPie Wasn't even talking about portability. Was referring to gigaherz.

Just because people commenting haven't contributed to pcsx2 doesn't mean they aren't 'actual developers'. The actual developers are ready to jump in and clean some of this up but it does require a focus on portability. It is as simple as waving a wand actually. Just announce that care should be taken not to introduce code that would only work on x86 and that there is a focus (read: not 'low priority') on portability. That starts with not closing the relevant issue. Perhaps putting up some project rules/focus. An autobuild for x86-64 or a generic arch wouldn't hurt either.

sudonim1 commented 10 years ago

Gigaherz didn't say anything about other archs not being able to "handle" PCSX2. If PCSX2 were to be ported many systems would be able to run a wide variety of PS2 software at full speed. That, however, is a lot of work and even more work to do without compromising the performance or code quality (yes it can get worse) of x86-32 PCSX2.

sudonim1 commented 10 years ago

And no, it is absolutely not going to be our focus at the minute, the emulator is still in far too poor a state to focus on portability over improving emulation, performance and features on the existing supported platforms.

xsacha commented 10 years ago

The code as it is, is in a rubbish state. The emulators poor state, lack of contributors and lack of portability is mainly a reflection on this. The 'a lot of work' does not have to be done by you or any other regular pcsx2 contributors. In fact I'm not sure if that would even be a good thing. All we ask for is some rules or at least guidelines. Otherwise it may be easier to start from scratch.

sudonim1 commented 10 years ago

EDIT: It's hot and I'm irritated and would rather not go into outright flame war territory. Just locking this.

sudonim1 commented 10 years ago

To anyone who read the original version of my comment yesterday, I apologise. I misunderstood the comment I was responding to on first glance and got emotional. I've been very sensitive recently about the many recent slights on the competency of PCSX2 developers and am starting to see them where they do not exist (at least I hope I'm not being too generous in my second reading). This is partly because many of the criticisms are absolutely true.

We are a motley crew without a captain ever since Jake was hired by Sony. I don't think there's anyone working on PCSX2 currently who is capable enough to lead the project, and if PCSX2 was a company and I was CEO I would fire everyone except gregory, who has been quietly doing good work on Linux portability, myself included. But we are not employees and PCSX2 is not a company, we are amateurs working on an open source project and we can only do what we can do.

sudonim1 commented 10 years ago

To clarify on the company analogy, I meant if everyone was employed as programmers.

And this issue is staying locked, it was obviously unproductive whining and entitlement from the start. Get over it, the code is what it is, if you want to help then help.