Download raw body.
NEW WIP: emulators/pcsx2
Hi,
Here is a WIP port of PCSX2 2.6.3. It runs well with the few games
I've tested on my machine (with Intel graphics) using OpenGL as the
renderer. Testers, tips, and corrections are appreciated.
I am also attaching the update diff for emulators/libchdr and the
port for graphics/plutosvg that I sent before since they are needed
for this port.
A few notes:
- I followed FreeBSD's example and added a system wide resources path.
Game patches can be added by downloading patches.zip and placing it
in the resources directory (see the pkg-readme).
- In cmake/SearchForStuff.cmake, I replaced the included third party
packages with using the existing ports of fast_float, libchdr,
soundtouch, simpleini, libzip, RapidJSON, and fmt. (This requres
libchdr be updated)
- A core dump can be triggered when using Vulkan on Intel integrated
graphics while running a game (specifically Sly Cooper). No coredumps
found with OpenGL yet though. (backtrace and part of dmesg below)
Patches for these files were more involved and could use attention:
common/Linux/LnxHostSys.cpp:
- Replaced MAP_FIXED_NOREPLACE by unmapping and returning nullptr if
mmap didn't return a pointer where it was requested.
- Added OpenBSD exception information for the page fault handler for
x86. I believe this could also be done for arm64. It would be nice to
have someone who knows more about sigcontext/ucontext take a look at
this.
common/Linux/LnxMisc.cpp:
- Replaced clock_nanosleep with nanosleep(2) and subtraction.
- Changed to get available memory using sysconf rather than
/proc/meminfo.
3rdparty/cpuinfo/src/x86/openbsd/init.c:
- This is a cpuinfo init for OpenBSD made with the FreeBSD init and
lscpu.c from sysutils/lscpu. This probably could use more trimming
and someone more knowledgeable about getting cpu info (number of
cpus, cores, threads, core clusters, etc). I wasn't sure how to
figure out the number of physical core clusters, so right now I
have it assigned to be the same as the number of cores, which I
am sure is not right.
Thanks,
Matthew
---
Information for inst:pcsx2-2.6.3
Comment:
Playstation 2 emulator
Description:
PCSX2 is a free and open-source PlayStation 2 (PS2) emulator.
Its purpose is to emulate the PS2's hardware, using a combination
of MIPS CPU Interpreters, Recompilers and a Virtual Machine which
manages hardware states and PS2 system memory.
Maintainer: The OpenBSD ports mailing-list <ports@openbsd.org>
WWW: https://pcsx2.net
---
Backtrace for coredump when using Vulkan:
-----------------------------------------
#0 thrkill () at /tmp/-:2
#1 0x5b145a028cc1fb70 in ?? ()
#2 0x000008f95538162b in _libc_abort () at /usr/src/lib/libc/stdlib/abort.c:51
#3 0x000008f684afbcbd in AbortWithMessage(char const*) ()
#4 0x000008f684aefdd4 in pxOnAssertFail(char const*, int, char const*, char const*) ()
#5 0x000008f6843df97f in GSRenderer::BeginPresentFrame(bool) ()
#6 0x000008f6843e0661 in GSRenderer::VSync(unsigned int, bool, bool) ()
#7 0x000008f6843e8d92 in GSRendererHW::VSync(unsigned int, bool, bool) ()
#8 0x000008f68424ed4c in MTGS::ThreadEntryPoint() ()
#9 0x000008f684b19d99 in Threading::Thread::ThreadProc(void*) ()
#10 0x000008f8ea8b00d2 in _rthread_start (v=0x0) at /usr/src/lib/librthread/rthread.c:99
#11 0x000008f9553aeb2a in __tfork_thread () at /usr/src/lib/libc/arch/amd64/sys/tfork_thread.S:87
Relevant parts of dmesg:
------------------------
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 630" rev 0x04
drm0 at inteldrm0
inteldrm0: msi, KABYLAKE, gen 9
drm : [drm] Not enough lanes (0) for DP on [ENCODER:117:DDI E/PHY E]
inteldrm0: 1920x1080, 32bpp
drm:pid85269:__intel_engine_reset_bh *NOTICE* [drm] Resetting rcs0 for preemption time out
drm:pid85269:mark_guilty *NOTICE* [drm] pcsx2-qt[96890] context reset due to GPU hang
intel_pool_init: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_create: stub
i915_vma_coredump_free: stub
err_free_sgl: stub
commit - 04f87ba1101d5bc5a2ab0fc67685e47ab9c11919
blob - c80d172d35bc8dd7d3fc80b213c16ba36033be18
file + emulators/libchdr/Makefile
--- emulators/libchdr/Makefile
+++ emulators/libchdr/Makefile
@@ -2,12 +2,12 @@ BROKEN-aarch64 = looks for sys/auxv.h
COMMENT = library for reading MAME's CHDv1-v5 formats
-V = 1.0pl20230220
+V = 1.0pl20251226
DISTNAME = libchdr-$V
GH_ACCOUNT = rtissera
GH_PROJECT = libchdr
-GH_COMMIT = fec8ab94212cc65d9d9a62cb3da924f5830c04b0
+GH_COMMIT = 07a7dad23378b001f4ab174ef51bd6553f883edd
SHARED_LIBS += chdr 1.0 # 0.1
commit - 04f87ba1101d5bc5a2ab0fc67685e47ab9c11919
blob - d53067a351af193b6c0a50c35ce9831ba89b0867
file + emulators/libchdr/distinfo
--- emulators/libchdr/distinfo
+++ emulators/libchdr/distinfo
@@ -1,2 +1,2 @@
-SHA256 (libchdr-1.0pl20230220-fec8ab94.tar.gz) = i4fxorIt44yfsWdRN8jxl0MQW4NzrYynDs8DpjngT88=
-SIZE (libchdr-1.0pl20230220-fec8ab94.tar.gz) = 1748513
+SHA256 (libchdr-1.0pl20251226-07a7dad2.tar.gz) = j6dteAW0Ba3jbkpFHkBl17fDX1AcjsbrGerAls/5X+o=
+SIZE (libchdr-1.0pl20251226-07a7dad2.tar.gz) = 4223733
commit - 04f87ba1101d5bc5a2ab0fc67685e47ab9c11919
blob - d67f987ae74955c780c0027dab9126b3af7f5a4c
file + /dev/null
--- emulators/libchdr/patches/patch-CMakeLists_txt
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: CMakeLists.txt
---- CMakeLists.txt.orig
-+++ CMakeLists.txt
-@@ -79,7 +79,7 @@ if (BUILD_SHARED_LIBS)
- elseif(APPLE)
- target_link_libraries(chdr PRIVATE -Wl,-dead_strip -Wl,-exported_symbol,_chd_*)
- else()
-- target_link_libraries(chdr PRIVATE -Wl,--version-script ${CMAKE_CURRENT_SOURCE_DIR}/src/link.T -Wl,--no-undefined)
-+ target_link_libraries(chdr PRIVATE -Wl,--version-script ${CMAKE_CURRENT_SOURCE_DIR}/src/link.T)
- endif()
-
- set_target_properties(chdr PROPERTIES C_VISIBILITY_PRESET hidden)
NEW WIP: emulators/pcsx2