From 0914c760a1ec53b50f04b4843fb0bc8cc4595cf4 Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Tue, 19 Dec 2023 21:52:26 -0600 Subject: [PATCH] 64 bit Raspberry Pi builds working. --- CHANGELOG | 140 +++++++++++++++++++++++++++++++++++++++++++++ assets/Manual.docx | 3 - assets/Manual.lyx | 90 ++++++++++++++++++++++++++++- build-all.sh | 31 +++++++--- src/singe.c | 2 +- 5 files changed, 254 insertions(+), 12 deletions(-) delete mode 100644 assets/Manual.docx diff --git a/CHANGELOG b/CHANGELOG index 1a2082f07..8ae3182d0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -84,3 +84,143 @@ Fixes - Building Singe depended on a lot of undocumented software cobbled together from other projects. This has been vastly improved and should be usable by actual humans now. Humans running Linux anyway. + + +------------------------------------------------------------------------------ + + +SINGE 2.00 +========== + + Released October 25th, 2020 + + +New Features +------------ + +- Complete rewrite! No more dependency on Daphne. + +- Support for almost every (non-patent encumbered) video and audio format + that can be played by FFMPEG. + +- High definition video. + +- 32 bit color. + +- Additional videos can be played on top the laserdisc video. + +- Scaled sprites. + +- Graphics overlay resolution no longer dependent on video resolution. + +- Analog controllers. + +- LuaSocket and LuaFileSystem added to runtime. + +- Ability to chain scripts together for menus or launchers. + +- Specify if you want gun games to display on-screen crosshairs or not. + +- Menu for launching games included. + +- Many updates to Framework.singe to support the new APIs. + +- New APIs: + - controllerGetAxis + - discGetHeight + - discGetWidth + - fontUnload + - mouseGetPosition + - mouseSetCaptured + - overlayBox + - overlayCircle + - overlayEllipse + - overlayLine + - overlayPlot + - overlaySetResolution + - scriptExecute + - scriptPush + - singeWantsCrosshairs + - soundUnload + - spriteGetHeight + - spriteGetWidth + - spriteUnload + - videoDraw + - videoGetFrame + - videoGetFrameCount + - videoGetHeight + - videoGetVolume + - videoGetWidth + - videoIsPlaying + - videoLoad + - videoPause + - videoPlay + - videoSeek + - videoSetVolume + - videoUnload + + +------------------------------------------------------------------------------ + + +SINGE 1.14 - 1.19 +================= + + Released ? + + +Notes +----- + +- Unofficial fan builds. +- Stand-alone releases. + + +New Features +------------ + +- New API functions: + - discPauseAtFrame + - mouseEnable + - mouseDisable + - mouseHowMany + - mouseSetMode + - singeDisablePauseKey + - singeEnablePauseKey + - singeGetScriptPath + - singeSetGameName + - soundFullStop + - soundGetVolume + - soundIsPlaying + - soundPause + - soundResume + + +------------------------------------------------------------------------------ + + +SINGE 1.10 - 1.14 +================= + + Released ? + + +Notes +----- + +- Unofficial fan builds. +- DLL releases for Daphne. + + +New Features +------------ + +- New API functions: + - discGetState + - keyboardGetMode + - keyboardSetMode + - singeGetPauseFlag + - singeSetPauseFlag + - singeQuit + - singeVersion + - soundStop diff --git a/assets/Manual.docx b/assets/Manual.docx deleted file mode 100644 index 6dbcd7aee..000000000 --- a/assets/Manual.docx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4dc30931aacb9f0c48c357046b94ca3f1aaaf6b5c8d5e1b3157d869e1c8b7608 -size 57435 diff --git a/assets/Manual.lyx b/assets/Manual.lyx index 7c2800f4a..c2eb44249 100644 --- a/assets/Manual.lyx +++ b/assets/Manual.lyx @@ -157,12 +157,18 @@ Analog and Digital Input Device Support Wide Support for Video and Audio Formats \end_layout +\begin_layout Standard +For players, Singe allows many unemulated and new games to be enjoyed using + any desired front end or via the included menu system. + +\end_layout + \begin_layout Standard Since the original release of Singe back in 2006, several revisions have been released, both officially and unofficially. In 2020, Singe 2.00 was released. This was a total rewrite from the ground up adding numerous features while - staying compatible with existing 1.x games. + staying compatible with existing 1.xx games. As of the writing of this manual, the latest release is 2.10. \end_layout @@ -170,6 +176,34 @@ Since the original release of Singe back in 2006, several revisions have Installation and Upgrading \end_layout +\begin_layout Section +Installing Singe +\end_layout + +\begin_layout Standard +To install Singe, simply download the appropriate binary for your system. + Place it in a new folder by itself and run it. + On the first run, Singe will create all the necessary directories and support + files needed. + You’re now ready to install some games! +\end_layout + +\begin_layout Section +Upgrading Singe +\end_layout + +\begin_layout Standard +To upgrade Singe to a newer version, place the new binary in the installation + folder and rename (or delete) the existing /Singe folder. + As with the initial installation, run the new binary with no command line + arguments to generate the new support files. + DO NOT run a new Singe binary with an out-of-date set of support files! +\end_layout + +\begin_layout Section +Things to Know +\end_layout + \begin_layout Standard Don't touch the Singe/ folder! \end_layout @@ -182,10 +216,56 @@ Usage Installing Games \end_layout +\begin_layout Standard +Games designed for Singe 2.x and later simply need to be unpacked and copied + into the same folder where you placed the Singe binary. + The included menu system will automatically detect them and add them to + the menu. +\end_layout + \begin_layout Section Customizing the Controls \end_layout +\begin_layout Standard +By default, Singe maps controllers as if they were Xbox 360 gamepads. + If your controller is not recognized or you wish to change the default + mappings as they appear to Singe, you can use the free SDL2 Gamepad Tool + from http://generalarcade.com/gamepadtool/. + +\end_layout + +\begin_layout Standard +In addition to configuring your controller, you can remap all the input + options for Singe as a whole or for any individual game by using controls.cfg + files. + When determining how inputs are mapped, Singe begins with the default settings + and then applies changes specified in controls.cfg files in the following + order: +\end_layout + +\begin_layout Enumerate +1. + The main data directory +\end_layout + +\begin_layout Enumerate +2. + The per-game data directory +\end_layout + +\begin_layout Enumerate +3. + The game script directory +\end_layout + +\begin_layout Standard +After installing Singe, you can find a sample input configuration file at + /Singe/controls.cfg.example. + To see the available configuration options available to be used in this + file, read through /Singe/Framework.singe. +\end_layout + \begin_layout Part Frequently Asked Questions \end_layout @@ -313,6 +393,10 @@ You should have sound again. Load up Singe, and your audio will be working and lag free! \end_layout +\begin_layout Part +History +\end_layout + \begin_layout Part Game Development \end_layout @@ -1629,6 +1713,10 @@ GAMES = { \end_layout +\begin_layout Section +Included Libraries +\end_layout + \begin_layout Section API \end_layout diff --git a/build-all.sh b/build-all.sh index a9e8ac48b..3563a378d 100755 --- a/build-all.sh +++ b/build-all.sh @@ -38,8 +38,7 @@ function buildAll() { G_TARGET=${G_BUILDROOT}/${G_BUILDDIR}/${OS}/${ARCH} G_GENERATED=${G_TARGET}/generated - COMMON="-DCMAKE_INSTALL_PREFIX=${G_TARGET} -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}" - # Add CMAKE_BUILD_TYPE to COMMON + COMMON="-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${G_TARGET} -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}" export LDFLAGS="-L${G_TARGET}/lib ${LDFLAGS}" export CFLAGS="-I${G_TARGET}/include ${CFLAGS}" @@ -49,7 +48,14 @@ function buildAll() { mkdir -p ${G_GENERATED} -if [[ 0 == 1 ]]; then + # Needed for Pi sysroot. + if [[ "${OS}" == "pi" ]]; then + export CFLAGS="--sysroot=${SYSROOT} ${CFLAGS}" + export CXXFLAGS="--sysroot=${SYSROOT} ${CXXFLAGS}" + sudo chroot ${SYSROOT} apt-get -y install libasound-dev libxi-dev libvdpau-dev + fi + +if [[ 1 == 1 ]]; then pushd thirdparty/bzip2 clearAndEnterBuild cmake ${COMMON} \ @@ -205,7 +211,13 @@ if [[ 0 == 1 ]]; then else OPT1="" fi - # --cross-compile-prefix="${TRIPLE}-" \ + if [[ "${OS}" == "pi" ]]; then + if [[ "${ARCH}" == "aarch64" ]]; then + OPT1="linux-aarch64" + else + OPT1="linux-arm4" + fi + fi ../Configure ${OPT1} \ --prefix="${G_TARGET}" \ --libdir=lib \ @@ -231,6 +243,11 @@ if [[ 0 == 1 ]]; then thirdparty/luasocket/src/*.h \ "${G_TARGET}/include/luasocket/." + if [[ "${OS}" == "pi" ]]; then + # Hack to make ffmpeg compile. + mkdir -p "${G_TARGET}/include/sys" + echo "/* File no longer used */" > "${G_TARGET}/include/sys/sysctl.h" + fi pushd thirdparty/ffmpeg clearAndEnterBuild # https://trac.ffmpeg.org/wiki/CompilationGuide/CrossCompilingForWindows @@ -526,9 +543,9 @@ sudo apt-get install -y \ libvdpau-dev \ upx-ucl - -buildAll linux x86_64 2>&1 | tee ${G_BUILDDIR}/linux-x86_64.log -#buildAll windows x86_64 2>&1 | tee ${G_BUILDDIR}/windows-x86_64.log +#buildAll linux x86_64 2>&1 | tee ${G_BUILDDIR}/linux-x86_64.log +buildAll windows x86_64 2>&1 | tee ${G_BUILDDIR}/windows-x86_64.log +#buildAll pi aarch64 2>&1 | tee ${G_BUILDDIR}/pi-aarch64.log #buildAll linux x86 #buildAll macos aarch64 diff --git a/src/singe.c b/src/singe.c index d2f2113e5..a139cc618 100644 --- a/src/singe.c +++ b/src/singe.c @@ -4744,7 +4744,7 @@ void singe(SDL_Window *window, SDL_Renderer *renderer, ConfigT *conf) { lua_register(_global.luaContext, "fontQuality", apiFontQuality); // 1.xx lua_register(_global.luaContext, "fontSelect", apiFontSelect); // 1.xx lua_register(_global.luaContext, "fontToSprite", apiFontToSprite); // 1.xx - lua_register(_global.luaContext, "fontUnload", apiFontUnload); + lua_register(_global.luaContext, "fontUnload", apiFontUnload); // 2.00 lua_register(_global.luaContext, "keyboardGetLastDown", apiKeyboardGetLastDown); // 2.10 lua_register(_global.luaContext, "keyboardGetLastUp", apiKeyboardGetLastUp); // 2.10