mirror of
https://github.com/mihawk-99/PS5_RetroArch.git
synced 2026-10-18 23:09:29 -05:00
Beetle PSX HW, Mupen64Plus-Next, Beetle Saturn, VICE x64sc, MAME 0.289, DeSmuME and Azahar, each built from my fork of it at a pinned revision (tools/core-fork.sh, tools/build-<core>.sh), with the PS5 defaults at the most each offers that holds full speed. The loader grew to fit them. A core's file and image come from direct memory, up to 1 GiB (MAME's image is 413 MB), and each image is zeroed when it is reserved: direct memory is not, and a reloaded core's .bss held its predecessor's bytes, which faulted every core on a reload. Each image's .eh_frame is registered with the title's unwinder, for the cores that throw. Initializers are capped at 65,536 (Azahar has 2,476). A load that misses imports lists all of them. Aligned operator new comes from the core heap, a core's atexit belongs to the core, and the imports the new cores need are bound to the platform layer's getcwd, tmpfile, mkstemp and the rest (SDK fork ebd0fe2).
31 lines
1.6 KiB
Bash
31 lines
1.6 KiB
Bash
#!/usr/bin/env bash
|
|
# Cross-build Beetle PSX HW (mednafen_psx_hw), Mednafen's PlayStation core with its Vulkan
|
|
# renderer, from my fork ../PS5_BeetlePSX
|
|
# (github.com/mihawk-99/PS5_BeetlePSX) at its pinned revision (tools/core-fork.sh).
|
|
#
|
|
# Output: build/cores/stage/{cores,info}/mednafen_psx_hw_libretro.{so,info};
|
|
# build-title.sh stages those in /app0.
|
|
# The fork's platform=ps5 builds the Vulkan renderer alone and renders at 16x
|
|
# internal resolution with 8x MSAA by default. PlayStation games need a BIOS in
|
|
# system/ (scph5501.bin and the others the core info names).
|
|
set -euo pipefail
|
|
root=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
|
|
cd "$root"
|
|
core_name=beetle-psx
|
|
source "$root/tools/core-stamp.sh"
|
|
source "$root/tools/core-fork.sh"
|
|
core_stamp_skip beetle-psx \
|
|
"$root/build/cores/stage/cores/mednafen_psx_hw_libretro.so" \
|
|
"$root/build/cores/stage/info/mednafen_psx_hw_libretro.info" \
|
|
-- "$root/tools/build-beetle-psx.sh" "$root/tools/core-fork.sh"
|
|
[[ $# == 0 ]] || { echo "usage: ${0##*/}" >&2; exit 2; }
|
|
|
|
revision=e43b3980e031c47066917c941be6ace6f51ed24f # ../PS5_BeetlePSX main
|
|
core_fork_setup
|
|
core_fork_checkout PS5_BeetlePSX "$revision"
|
|
core_fork_info mednafen_psx_hw_libretro.info 0790f04425488765bf3c199755036501f0ef09bc4af6b00cd516c209b4358940
|
|
|
|
# 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_psx_hw_libretro.so" "$core_info" "$revision" tools/build-beetle-psx.sh
|