På torsdag 5. februar 2026 kl. 19:49, skrev Matthew
<[email protected]>:

>
>
> 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 Id
> am sure is not right.
>


Built/tested on current/amd64:

Under separate user with privsep:
cd /usr/ports/ && patch -l -p0 -E < /tmp/libchdr.diff
cd /usr/ports/emulators/libchdr/ && make test package clean

Under root:
pkg_add -Dsnap -Dunsigned -aa 
/usr/ports/packages/amd64/all/libchdr-1.0pl20251226.tgz

Under separate user with privsep:
cd /usr/ports/distfiles/ && cp -v pcsx2-2.6.3.tar.gz PCSX2-pcsx2-v2.6.3.tar.gz
cd /usr/ports/emulators/pcsx2/ && make clean=all clean && make test package 
clean

Under root:
pkg_add -Dsnap -Dunsigned -Dinstalled -r 
/usr/ports/packages/amd64/all/pcsx2-2.6.3.tgz

There is a nitpit on space formatting in the WANTLIB where there are
spaces rather than tabs. Otherwise formatting and grammer looks fine.

It runs fine under sway in xwayland(pcsx2-qt --platform xcb). Games
play, network worked-ish with a fan patch .hack//frägment, save states,
looked fine. This is with an older intel apu i5-3340M that has vulkan
incomplete in mesa or broken, opengl only. Don't have a controller to
test with unfortunately.

MESA-INTEL: warning: Ivy Bridge Vulkan support is incomplete

I tried this libchdr and the now in ports-cvs, and the sdl3 in ports-cvs
and the 3.4.0 update. I also tried qt6 in ports-cvs and the upcoming
6.10.2 update that takes a while to compile on my machine. And again
with boost and cmake4 update.

I tried pcsx2 under wayland natively as is and also without wayland
explicitly disabled by removing '-DWAYLAND_API=OFF \' as sdl3 and
qt6-base have wayland as their dependencies anyway.

Games report issues with graphics with the build as is. With the removed
argument running a game full crashes pcsx2. It runs with hardware
acceleration in sway/xwayland with '--platform xcb' just fine though on
either patch.


Arianna has similar problems. I thought it was a problem with qt6 or
something missing from kde, but sdl3 has problems in displaying natively
and has issues with hardware acceleration even with wayland enabled. I
have had trouble getting sdl2 reverse dependencies to run natively in
wayland while building/testing with wayland not explicitly disabled that
I was trying to partial bulk for the maintainer so as to put forth on
ports for submission. Instead they run in Xwayland or run with
acceleration if running with some option to use the Xwayland code path.

I wonder if Landry's patch to mesa makefiles would fix these crashes.

https://marc.info/?l=openbsd-tech&m=176304756414309

The plus being getting mpv to use acceleration on wayland and maybe
getting vaapi to support wayland natively. Though size increases are of
possible concern and more packages [wayland{,-protocols}] from ports
needed to build or included in base. Either way it looks like having
part of the stack with wayland explicitly disabled is causing problems
maybe. Out of scope for this review for now, I think?

So I would recommend these for at least cvs commit and linked and have
any subsequent changes in cvs. Thank you for all this work, I have
enjoyed this even with all the recompiling I did.

Hope this helps. Thanks Matthew and everyone else. I have enjoyed
playing with this and look forward to seeing this in ports and
extending compatibility in openbsd-gaming.

--
yaydn


> 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 [email protected]
>
>
> 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

Reply via email to