Files
PS5_RetroArch/tools/build-beetle-pce.sh
T
Mihawk 7414eba5cf Thirteen cores: 32X, PC Engine, PC-FX, Virtual Boy, Neo Geo Pocket, WonderSwan, Pokemon Mini, Lynx, Jaguar, 2600, 5200, 7800, MS-DOS
Each from my fork beside this repository (all local, not yet on GitHub),
upstream plus a PS5 platform commit (no --no-undefined, no LTO, zstd without
trace hooks), built through tools/core-fork.sh:
- PicoDrive (PS5_PicoDrive): the 32X SH-2s on the interpreter (the
  recompiler's static read-write-execute buffer faults on the PS5); frames
  go out as XRGB8888. Non-commercial licence, like Snes9x and FBNeo.
- Beetle PCE (mednafen_pce, with SuperGrafx and CD), Beetle PC-FX, Beetle
  VB, Beetle NeoPop, Beetle Cygne: GPL-2.0-or-later.
- PokeMini (GPL-3.0-or-later), Handy (zlib; its text is in the source
  headers, tooling/notices/texts/handy-zlib.txt), Virtual Jaguar
  (GPL-3.0-or-later), Stella 7.0c, a5200 (built-in Altirra BIOS; its
  Makefile empties LDFLAGS, so the link flags go in as PS5_LDFLAGS),
  ProSystem: GPL-2.0-or-later unless noted.
- DOSBox Pure 1.0-preview7 (now on Codeberg): the dynamic x86 core's code
  cache is ps5_exec_allocate memory, and stdio replaces the VFS wrapper,
  whose funopen the console lacks.
build-title.sh stages all thirteen; the notices list each; README: the
systems, forks, credits and licences (twenty-nine cores). On the console the
owner's BIOS files were moved where the cores look: system/pcfx.rom,
system/lynxboot.img, system/bios.min.

Verified on the base PS5 (13.40), one game per core with
tests/pad/boot-and-start.txt (runs 212433-220552): every core loads, runs at
its system's rate (Virtual Boy 50.3, Pokemon Mini 72, the rest 60 frames a
second) and exits with 0; pictures inspected
(evidence/new-cores-2026-10-06). tools/verify.sh format, unit and evidence
PASS (90 captures, 0 failed); build and integration not rerun this step.
Before a release: publish the thirteen forks the notices and README name.
2026-10-06 22:11:05 -04:00

29 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
# Cross-build Beetle PCE (mednafen_pce), Mednafen's PC Engine core (PC Engine,
# TurboGrafx-16, PC Engine CD and SuperGrafx), from my fork ../PS5_BeetlePCE
# (github.com/mihawk-99/PS5_BeetlePCE) at its pinned revision (tools/core-fork.sh).
#
# Output: build/cores/stage/{cores,info}/mednafen_pce_libretro.{so,info};
# build-title.sh stages those in /app0. It renders in software. CD games need a
# System Card image in system/ (syscard3.pce); HuCard and SuperGrafx games need none.
set -euo pipefail
root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
cd "$root"
core_name=beetle-pce
source "$root/tools/core-stamp.sh"
source "$root/tools/core-fork.sh"
core_stamp_skip beetle-pce \
"$root/build/cores/stage/cores/mednafen_pce_libretro.so" \
"$root/build/cores/stage/info/mednafen_pce_libretro.info" \
-- "$root/tools/build-beetle-pce.sh" "$root/tools/core-fork.sh"
[[ $# == 0 ]] || { echo "usage: ${0##*/}" >&2; exit 2; }
revision=0a69bec30dfb503cfefdf6bf8dd0d2cd3b330060 # ../PS5_BeetlePCE main
core_fork_setup
core_fork_checkout PS5_BeetlePCE "$revision"
core_fork_info mednafen_pce_libretro.info ec52873e28177fb250108ec69ae889a7a258dc352c9d946c051345cc69fbe1db
# LDFLAGS goes in the environment: the makefiles add their own to it.
LDFLAGS="$core_ldflags $core_libs" make -C "$source_dir" -j"${JOBS:-16}" platform=ps5 CC="$core_cc" CXX="$core_cxx" AR="$AR"
core_fork_stage "$source_dir/mednafen_pce_libretro.so" "$core_info" "$revision" tools/build-beetle-pce.sh