Looking for help to port PCSX-R's OpenGL renderer to SDL2

I’m looking for some developers with some experience in C and SDL2 to help me modernize the OpenGL renderer for PCSX-R. The current implementation uses X11 and does not work well. I have very little experience with SDL2 but I’m willing to work on that issue if someone with more experience on that matter would point me in the right direction.
If you do not have experience with SDL2 but have a CodePlex account, please vote for this issue :wink:

Latest version of RetroArch comes with Mednafen and Rustation Playstation emulator support:

While porting PCSX-R to SDL2 is a worthy effort, might be easier to team up with the libretro crew.

The next version of Lutris will support Playstation emulation with Mednafen but bear in mind that it is a much less advanced emulator compared to PCSX-R (ie. it has no HD scaling and some other stuff might be missing).
The Mednafen core from Retroarch might be able to solve some of those issues.

I had a quick look at Rustation and while it looks promising, it’s still a work in progress and not something we would want to make available to play games. It might be worth having another look at it in a year or two.

I see. PCSX-R has more features, which would be nice to bring fully over to SDL2, rather the DirectX stuff in there. Don’t know much of DirectX, or how to port it over. Had a look through some of the code, and it doesn’t look that complicated. May be a good idea to bring some of the PCSX-R features over to Mednafen too, if porting doesn’t turn out fruitful.

My initial post was poorly worded and forgot to correct my mistake. When I said “uses direct X11” I actually meant “uses direct X11 calls” or “uses X11 directly”. This has absolutely nothing to do with DirectX 11 but is related to X11 / Xorg / Xlib.

That said, I started reading (and cleaning up) the code in gpu.c, there are create display, destroy display and update display functions, which is basically all I need for the SDL2 migration.

Work has started here: https://github.com/lutris/pcsxr/tree/sdl2

A thing to note is that, while PCSX-R has some more “advanced” features, it is also far less accurate than Mednafen, as evidenced by these tests: http://emulation.gametechwiki.com/index.php/PS1_Tests

As an aside, note that ePSXe is, in fact, not more accurate in its standard configuration, as noted on the wiki page: “ePSXe in particular seems to deliberately target these tests(partly by using the Amidog software GPU plugin), at the expense of accuracy, rather than for the sake of it, as using the plugins and settings that would get these results causes serious bugs in actual games.”

Mednafen, while providing a more “barebones” (Some would say “accurate” :stuck_out_tongue: ) graphical representation of the games, also has a far wider compatibility list and relies a lot less on hacks to make the games work.

A better option than “modernizing” a mediocre (imho) emulator such as PCSX-R would be to send patches upstream to Mednafen to add the desired functions.

I don’t think mednafen would accept patches for upscaling game graphics as their goal is to provide pristine emulation. I consider this a good thing and we are providing PSX emulation with Mednafen in the next version but given the choice, I’ll run Playstation games with PCSX-R any day. I haven’t had any particular issue with the games I’ve tried and the visual quality offered by upscaled graphics do make a huge difference!

Also, bringing HD graphics to Mednafen is a huge task compared to porting Xlib code to SDL2! I’m already having a hard time with a simple task so I think that improving Mednafen’s renderer is way out of my league!

Oh, if you do indeed plan to provide multiple runners for a same platform, consider this a non-issue :slight_smile:
Having both an accurate and a more “modernized” runners are most likely the best solution for everyone (An idea here would be to try to make the install scripts “per platform”, then, to prevent one runner for a platform from falling behind another in terms of the number of scripts available, if that’s possible)

Playstation scripts will be automatically generated like SNES games are at the moment so all playstation games should have both installers no matter what.