Skip to content

[Core] Flycast Redo 1#2369

Draft
JoeMatt wants to merge 14 commits into
developfrom
feature/flycastRedo
Draft

[Core] Flycast Redo 1#2369
JoeMatt wants to merge 14 commits into
developfrom
feature/flycastRedo

Conversation

@JoeMatt

@JoeMatt JoeMatt commented Dec 31, 2024

Copy link
Copy Markdown
Member

What does this PR do

  • add a libretro fork of dreamcast

Status

  • builds, links and runs but no video.
  • Logs show that the game is loading, you may even hear audio but no video yet

@JoeMatt JoeMatt self-assigned this Dec 31, 2024
@JoeMatt JoeMatt added core: Reicast isolated to Sega Dreamcast core: Reicast (unless paired) system-DC regarding Sega Dreamcast [non-core specific] WIP new-core 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>
needs to be built for no dynarec though

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/flycastRedo branch from 4cf85dc to 46f7e88 Compare December 31, 2024 01:51
@github-actions

github-actions Bot commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

Status Update from PR #2373 Analysis

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

What PR #2373 added to Flycast

The PR introduced a dual-mode approach — wrapping Flycast as a libretro core via #ifdef LIBRETRO guards:

  • PVFlycastCore.h: Changed base class from PVLibRetroGLESCore to PVLibRetroGLESCoreBridge, removed upstream Flycast headers (commented out), added extern declarations for kcode, rt, lt, vks, joyx/joyy arrays under #ifdef LIBRETRO
  • PVFlycastCore.mm: Removed direct Flycast includes, added #ifdef LIBRETRO init path, added getVariable: for core options (oddly references MelonDS vars — likely copy-paste placeholder)
  • PVFlycastEmuCore.swift: Fixed _bridge type from PVFlycastEmuCoreBridge to PVFlycastCoreBridge, added didMoveJoystick forwarding (previously only button press/release were forwarded), commented out keyDown/keyUp
  • PVFlycastCore+Controls.mm: Added #ifdef LIBRETRO extern declarations for controller arrays

Status as of PR

  • Builds and links
  • Game loads, audio may play
  • No video output — the video/GL render path for libretro mode was not completed

What's been done on develop since then

  • supportsVirtualKeyboard/supportsVirtualMouse API added to PVEmulatorCore
  • Full virtual keyboard + mouse overlay system merged
  • libretro GL pipeline improvements (DosBox GL fixes, pixel format fixes)
  • RA core allow 3d gles cores now — RetroArch wrapper now supports 3D GLES/GL cores
  • VecX hardware rendering enabled (was forced to software before)

What still needs doing for native Flycast (non-RetroArch)

  1. Video/GL render path: The retro_hw_render_callback setup for OpenGL/Vulkan is not wired to the Metal/MoltenVK layer. This is the same blocker as BeetlePSX ([Core] Beetle PSX #2368) — the hw_render environment callback needs to provide a real OpenGL or Vulkan context.
  2. getVariable: placeholders: The core options in PVFlycastCore.mm reference MelonDS variables — needs actual Flycast-specific options.
  3. Joystick forwarding from PR is good and should be preserved when this is revived.

Path forward

Option A: Via RetroArch wrapper — Flycast is already available as a RetroArch core with full GL support. The RA core allow 3d gles cores now change on develop means this should work via the RA path without a native core.

Option B: Native libretro mode — Requires completing the retro_hw_render_callback → Metal/MoltenVK bridge, similar to what DuckStation has done.

Related: #2373 (parent PR), #2482 (Core Updates epic)

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

Labels

core: Reicast isolated to Sega Dreamcast core: Reicast (unless paired) new-core system-DC regarding Sega Dreamcast [non-core specific] WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant