Files
PS5_RetroArch/tools/build-a5200.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.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Cross-build a5200's libretro core (Atari 5200), from my fork ../PS5_A5200 (github.com/mihawk-99/PS5_A5200)
# at its pinned revision (tools/core-fork.sh).
#
# Output: build/cores/stage/{cores,info}/a5200_libretro.{so,info}; build-title.sh
# stages those in /app0. It renders in software.
set -euo pipefail
root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
cd "$root"
core_name=a5200
source "$root/tools/core-stamp.sh"
source "$root/tools/core-fork.sh"
core_stamp_skip a5200 \
"$root/build/cores/stage/cores/a5200_libretro.so" \
"$root/build/cores/stage/info/a5200_libretro.info" \
-- "$root/tools/build-a5200.sh" "$root/tools/core-fork.sh"
[[ $# == 0 ]] || { echo "usage: ${0##*/}" >&2; exit 2; }
revision=c21e2ef8c63300890cdaf02363543872660ccd33 # ../PS5_A5200 main
core_fork_setup
core_fork_checkout PS5_A5200 "$revision"
core_fork_info a5200_libretro.info e707b742d0c12e87483986742e316ea530b2592ce74aaa74f5617267a9abafab
# a5200's Makefile empties LDFLAGS first, so the title's link flags go in as
# PS5_LDFLAGS, which the fork's ps5 platform adds.
make -C "$source_dir" -j"${JOBS:-16}" platform=ps5 \
CC="$core_cc" CXX="$core_cxx" AR="$AR" PS5_LDFLAGS="$core_ldflags $core_libs"
core_fork_stage "$source_dir/a5200_libretro.so" "$core_info" "$revision" tools/build-a5200.sh