143 lines
6.1 KiB
Text
143 lines
6.1 KiB
Text
SINGE 3.00
|
|
==========
|
|
|
|
(For the latest version of this document, visit https://kangaroopunch.com!
|
|
The full manual is extracted to Singe/Manual.pdf on first run.)
|
|
|
|
Welcome to Singe! SINGE Is Not a Game Emulator!
|
|
|
|
|
|
INSTALLATION & UPGRADE
|
|
======================
|
|
|
|
For the initial installation, create an empty directory and place the Singe
|
|
binary inside it. Run the binary with no command line options to cause it
|
|
to generate all the files needed to make Singe work properly. For example:
|
|
|
|
C:\Singe2\
|
|
C:\Singe2\Singe.exe
|
|
|
|
Once you run Singe.exe you'll see additional files and directories:
|
|
|
|
C:\Singe2\Singe\ (Several files created in this folder.)
|
|
C:\Singe2\Menu.bat (Or .sh on UNIX-ish OSs.)
|
|
|
|
To install games, simply unpack them and place their directory inside the
|
|
directory you created. For example, ActionMax.7z contains a folder named
|
|
"ActionMax". Place it here:
|
|
|
|
C:\Singe2\ActionMax\
|
|
|
|
For all Singe 2 and later games, it will automatically appear in the menu.
|
|
|
|
To upgrade, back up any changes you may have made to files inside the Singe
|
|
subdirectory that was generated during installation. (You really shouldn't
|
|
be changing things in there!) Delete the Singe subdirectory, Menu.bat (or
|
|
.sh) and run the new Singe binary with no command line arguments to generate
|
|
the new files.
|
|
|
|
|
|
COMMAND LINE
|
|
============
|
|
|
|
Run the binary with -h (or --help) for the option summary. Every option is
|
|
described in the "Command Line Options" chapter of Singe/Manual.pdf, which
|
|
is extracted on first run.
|
|
|
|
|
|
BUILDING FROM SOURCE
|
|
====================
|
|
|
|
On a Debian based system a checkout builds with one command:
|
|
|
|
./build-all.sh linux x86_64
|
|
|
|
It installs the host packages it needs with apt (asks for your sudo
|
|
password once), then runs the CMake superbuild, which builds every vendored
|
|
library (zlib, zstd, SDL3 and its satellites, OpenSSL, FFmpeg) into
|
|
.builddir/<os>/<arch> and then Singe against them. The finished binary is
|
|
copied to .builddir/Singe-v<version>-<Os>-<arch>.
|
|
|
|
Host packages (what build-all.sh installs): build-essential cmake
|
|
git-lfs pkg-config perl nasm llvm autoconf automake libtool meson
|
|
ninja-build imagemagick ffmpeg lua5.4 asciidoctor ruby-asciidoctor-pdf
|
|
libva-dev libvdpau-dev libdrm-dev libgl-dev libegl-dev libgles-dev
|
|
libgbm-dev libasound2-dev libpulse-dev libpipewire-0.3-dev
|
|
libjack-jackd2-dev libsndio-dev libudev-dev libdbus-1-dev
|
|
libibus-1.0-dev libxkbcommon-dev libx11-dev libxext-dev libxfixes-dev
|
|
libxi-dev libxcursor-dev libxrandr-dev libxss-dev libxtst-dev
|
|
libwayland-dev wayland-protocols libdecor-0-dev.
|
|
|
|
The artwork, the font and the menu video in assets/ are stored with Git
|
|
LFS. Clone with git-lfs present, or those files arrive as small text
|
|
pointers and the build embeds the pointers instead of the assets; a
|
|
checkout already made without it is repaired with "git lfs install &&
|
|
git lfs pull". build-all.sh stops with an error rather than build a
|
|
binary around them.
|
|
|
|
The Linux release build and the Windows build use zig as the compiler:
|
|
the build fetches a pinned zig release (version and SHA-256 in
|
|
cmake/zig/zig.cmake) into .builddir/toolchains on first use. For Linux it
|
|
targets glibc 2.28, so the binary runs on distributions back to Debian 10
|
|
and Ubuntu 18.04 while linking the host's platform libraries (X11, ALSA,
|
|
VA-API, VDPAU, DRM); for Windows zig carries the headers and import
|
|
libraries itself, so nothing else is installed:
|
|
|
|
./build-all.sh windows x86_64
|
|
|
|
A developer build with the host's own gcc, glibc and symbols is the
|
|
linux-x86_64-gcc preset (binary Singe-v3.00-Linux-x86_64-gcc).
|
|
|
|
macOS (Apple silicon, macOS 13 or newer) builds with zig too, but needs
|
|
an Apple SDK for the frameworks.
|
|
Apple only ships it inside Xcode, so by default the build fetches the
|
|
MacOSX15.5 SDK tarball from the community mirror osxcross users share
|
|
(github.com/joseluisq/macosx-sdks), checks its SHA-256, and unpacks it to
|
|
.builddir/toolchains/MacOSX.sdk on first use. To avoid the download,
|
|
put a tarball holding a single MacOSX*.sdk directory at
|
|
|
|
.builddir/toolchains/MacOSX.sdk.tar.xz
|
|
|
|
(on a Mac with Xcode, osxcross's tools/gen_sdk_package.sh makes exactly
|
|
that), or point SINGE_MACOS_SDK at an unpacked SDK. SINGE_MACOS_SDK_URL
|
|
and SINGE_MACOS_SDK_SHA256 pick a different mirror. Then:
|
|
|
|
./build-all.sh macos universal
|
|
|
|
builds the Apple silicon and Intel presets (macos-aarch64, macos-x86_64)
|
|
and joins them with llvm-lipo into Singe-v3.00-Macos-universal. Either
|
|
architecture alone is ./build-all.sh macos aarch64 or x86_64.
|
|
|
|
The 3D scene's shaders are HLSL, compiled when Singe is built. The
|
|
superbuild builds SDL_shadercross and SPIRV-Cross for the host machine
|
|
once (into .builddir/toolchains/host, shared by every preset) and fetches
|
|
Microsoft's prebuilt DirectX Shader Compiler, which SDL_shadercross
|
|
drives, into .builddir/toolchains/dxc. That prebuilt package exists for
|
|
x86_64 Linux hosts; on another host, unpack a DirectX Shader Compiler
|
|
release (lib/libdxcompiler.so, lib/libdxil.so, include/dxc/dxcapi.h) at
|
|
that path yourself, or build it from source there.
|
|
|
|
The ARM64 Linux build targets any ARM64 Linux system with glibc 2.31 or
|
|
newer, the 64-bit Raspberry Pi OS among them. It is not Pi specific: the
|
|
decoder it builds talks to any V4L2 memory-to-memory device, so one binary
|
|
also serves Amlogic, Exynos, Qualcomm and other boards whose kernel offers
|
|
one, and it carries Rockchip's own decoders besides. 3D games need a Pi 4
|
|
or later; the Pi 3 has no Vulkan driver and plays 2D games only. The build
|
|
uses zig. The platform headers and libraries it links against are Debian
|
|
bookworm arm64 packages listed in cmake/zig/arm64Packages.cmake, fetched
|
|
from snapshot.debian.org and unpacked with dpkg-deb into
|
|
.builddir/toolchains/sysroot-aarch64-linux-gnu on first use:
|
|
|
|
./build-all.sh linux aarch64
|
|
|
|
Useful forms (anything after the platform goes to cmake --build):
|
|
|
|
./build-all.sh linux x86_64 --target singe Singe alone
|
|
./build-all.sh linux x86_64 --target rebuild-ffmpeg redo one library
|
|
|
|
Without the wrapper:
|
|
|
|
cmake --preset linux-x86_64 && cmake --build --preset linux-x86_64
|
|
|
|
Presets: linux-x86_64, linux-x86_64-gcc, windows-x86_64, linux-aarch64,
|
|
macos-aarch64 (CMakePresets.json).
|