Skip to content

[Core] Beetle PSX#2368

Draft
JoeMatt wants to merge 23 commits intodevelopfrom
feature/CorePVBeetlePSX
Draft

[Core] Beetle PSX#2368
JoeMatt wants to merge 23 commits intodevelopfrom
feature/CorePVBeetlePSX

Conversation

@JoeMatt
Copy link
Member

@JoeMatt JoeMatt commented Dec 31, 2024

What does this PR do

  • Adds a native core for Beetle PSX

Status

  • Builds with vulkan and opengl but video doesn't render, audio starts to render until semaphore locks

@JoeMatt JoeMatt self-assigned this Dec 31, 2024
@JoeMatt JoeMatt added system-PSX regarding Sony Playstation [non-core specific] new-core WIP labels Dec 31, 2024
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
@JoeMatt JoeMatt force-pushed the feature/CorePVBeetlePSX branch from 5d0aabe to cf678c0 Compare December 31, 2024 01:52
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
@github-actions github-actions bot mentioned this pull request Mar 7, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

Status Update from PR #2373 Analysis

Audited the feature/new-cores/libretrogles branch (PR #2373) vs current develop.

What PR #2373 added to BeetlePSX

The PR scaffolded several new Swift/ObjC files for the native BeetlePSX core:

New files added (not yet in develop):

  • PVBeetlePSXCore/CoreOptions.swift — 101 lines of core option definitions
  • PVBeetlePSXCore/CorePlist-Generated.swift — 39 lines (generated plist bridge)
  • PVBeetlePSXCore/CorePlist.swift — 71 lines (plist configuration)
  • PVBeetlePSXCore/PVBeetlePSXCore.swift — 43 lines (Swift wrapper class)
  • PVBeetlePSXCore/PVBeetlePSXCoreBridge.mm — 270 lines (ObjC++ bridge, mostly commented-out skeleton)
  • BuildFlags.xcconfig — major expansion (48 additions) adding Vulkan/OpenGL build flags

Renamed:

  • PVBeetlePSXCore.hPVBeetlePSXCoreBridge.h
  • PVBeetlePSXCore.mmPVBeetlePSXCoreBridge.mm

Status as of PR

  • Builds with Vulkan and OpenGL options
  • Video doesn't render
  • Audio starts but semaphore locks

What's been done on develop since then

  • 3e7884b2e — Updated Cores/BeetlePSX/PVBeetlePSXCore/PVBeetlePSXCore.mm (some updates landed)
  • db114e481 — "fix(cheats): disable Stella cheats (no-op hooks) and fix BeetlePSX comment"
  • 3e0ba0578 — "pvbeetlepsx start to support building"

Key blocker

Same as Flycast (#2369): the retro_hw_render_callback is not wired to provide a real Metal/OpenGL/Vulkan context. The semaphore lock on audio likely stems from the render thread waiting for a frame that never arrives because the GL context setup is incomplete.

The build method approach (interesting)

The PR explored building beetle-psx-libretro as a .dylib + dummy .framework (using makefile instead of Xcode), which differs from how most native cores are built. This is noted in #2482 as "left off moving to makefile build with dylib linking + dummy .framework". This approach is worth revisiting as an alternative build path for libretro cores that are hard to integrate into Xcode directly.

What the Swift scaffold gives us

The CoreOptions.swift, CorePlist.swift, and PVBeetlePSXCore.swift files provide the framework structure needed. Once the GL/Vulkan context bridge is solved (likely a shared solution across Flycast, BeetlePSX, and other hw-render cores), plugging in BeetlePSX should be relatively straightforward.

Related: #2373 (parent PR), #2482 (Core Updates epic), #2369 (Flycast, same GL blocker)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-core system-PSX regarding Sony Playstation [non-core specific] WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant