Bug 252191 - [NEW PORT] emulators/libretro-pcsx2: Standalone port of pcsx2 to libretro emulator
Summary: [NEW PORT] emulators/libretro-pcsx2: Standalone port of pcsx2 to libretro emu...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Neel Chauhan
Depends on:
Reported: 2020-12-27 06:45 UTC by Timothy Beyer
Modified: 2022-09-19 15:02 UTC (History)
4 users (show)

See Also:

emulators_libretro-pcsx2.shar (22.36 KB, text/plain)
2020-12-27 06:45 UTC, Timothy Beyer
no flags Details
[PATCH / NEW PORT] emulators_libretro-pcsx2.diff (tested with poudriere) (23.45 KB, patch)
2022-05-17 05:11 UTC, Timothy Beyer
beyert: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Beyer 2020-12-27 06:45:29 UTC
Created attachment 220984 [details]

Created new port for the PCSX2 libretro core, which turned out to be much easier to port than the native version of PCSX2 (I'll try porting it later, but this useful to have a working PlayStation 2 emulator on FreeBSD).

So far, I've tested it with Romance of the Three Kingdoms IX, which seems playable.

Sorry to just sit on this port for well over a month, but I wanted to test it carefully.

Tested with Retroarch 1.9.0 on FreeBSD 12.1-RELEASE:
Comment 1 Daniel Menelkir 2021-07-07 12:28:42 UTC
I'm very interested on this, any progress?
Comment 2 Timothy Beyer 2021-07-14 04:20:15 UTC
(In reply to Daniel Menelkir from comment #1)
Thanks for your interest! I have a lot more emulators coming that aren't yet available on FreeBSD, so stay posted for PRs.

I have been running this same version on FreeBSD 13.0-RELEASE, and it still compiles and works very well, but if you are having any issues setting it up, send me an email, and I can help you, as many of these emulators have a very steep learning curve.

basically, you will need BIOS files installed in the path ~/.config/retroarch/system/pcsx2/bios/

(likely scph10000.bin, scph10000.mec, scph10000.nvm, and scph39001.bin).

I'll add a pkg-message for instructions for proper installation of BIOS at some point, and I intend to also add i386 patches if needed, although I didn't have easy access to an i386 jail at the time when I prepared it.

I've tested more games on it as well, like Digital Devil Saga, and it works at full speed on my machine at 720p resolution with shaders, although my Intel Graphics and 3.8 Ghz 8 core CPU isn't powerful enough to do 1080p without going below 30 FPS.  You might be able to get away with a much slower machine with a better GPU or if they improved multi core support in later versions.
Comment 3 Timothy Beyer 2021-07-14 04:22:30 UTC
(In reply to Timothy Beyer from comment #2)
The accuracy is probably better in newer versions, so at some point I would like to upgrade to the latest version, but I really need to do a detailed comparison against my real PS2 to see where it needs improvement.  I know that Romance of the Three Kingdoms IX had a lot of menu issues, but that's mostly because it's a pretty obscure game.
Comment 4 Max Brazhnikov freebsd_committer 2021-07-15 09:16:09 UTC
Back to the pool.
Comment 5 Timothy Beyer 2022-05-17 05:11:14 UTC
Created attachment 233991 [details]
[PATCH / NEW PORT] emulators_libretro-pcsx2.diff (tested with poudriere)

Updated to be git-formatted patch that was tested with poudriere.  Not sure if there was anything wrong with the prior version, and I don't believe there were any issues, but just in case, this version has been extensively tested.
Comment 6 Neel Chauhan freebsd_committer 2022-05-19 17:49:04 UTC
Comment 7 commit-hook freebsd_committer 2022-05-19 17:50:11 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b8b789478ef4616e10614abc1ed1488425aa8336

commit b8b789478ef4616e10614abc1ed1488425aa8336
Author:     Timothy Beyer <beyert_freebsd@fastmail.net>
AuthorDate: 2022-05-17 03:53:46 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2022-05-19 17:49:22 +0000

    emulators/libretro-pcsx2: New port: Standalone port of pcsx2 to libretro emulator

    PR:     252191

 emulators/Makefile                                 |   1 +
 emulators/libretro-pcsx2/Makefile (new)            |  65 +++
 emulators/libretro-pcsx2/distinfo (new)            |   3 +
 ...widgets3.0_src_unix_fswatcher__kqueue.cpp (new) | 459 +++++++++++++++++++++
 ...atch-3rdparty_wxwidgets3.0_CMakeLists.txt (new) |  14 +
 ...-3rdparty_wxwidgets3.0_UsewxWidgets.cmake (new) |  11 +
 ...rty_wxwidgets3.0_include_nogui_wx_setup.h (new) |  11 +
 .../files/patch-CMakeLists.txt (new)               |  14 +
 .../patch-common_include_Utilities_General.h (new) |  11 +
 .../files/patch-pcsx2_SPU2_spu2.cpp (new)          |  14 +
 emulators/libretro-pcsx2/pkg-descr (new)           |   9 +
 11 files changed, 612 insertions(+)
Comment 8 Ganael LAPLANCHE freebsd_committer 2022-09-19 14:31:00 UTC

For those interested, a standalone version of pcsx2 is now also available as emulators/pcsx2.

Best regards,