diff --git a/ports/frogger2/Frogger 2.sh b/ports/frogger2/Frogger 2.sh new file mode 100644 index 0000000000..974d64caf5 --- /dev/null +++ b/ports/frogger2/Frogger 2.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} + +if [ -d "/opt/system/Tools/PortMaster/" ]; then + controlfolder="/opt/system/Tools/PortMaster" +elif [ -d "/opt/tools/PortMaster/" ]; then + controlfolder="/opt/tools/PortMaster" +elif [ -d "$XDG_DATA_HOME/PortMaster/" ]; then + controlfolder="$XDG_DATA_HOME/PortMaster" +else + controlfolder="/roms/ports/PortMaster" +fi + +source $controlfolder/control.txt +export PORT_32BIT="Y" +[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt" +get_controls + +GAMEDIR="/$directory/ports/frogger2" + +export LD_LIBRARY_PATH="/usr/lib32:$GAMEDIR/libs:$LD_LIBRARY_PATH" +export GMLOADER_DEPTH_DISABLE=1 +export GMLOADER_SAVEDIR="$GAMEDIR/gamedata/" +export GMLOADER_PLATFORM="os_linux" + +cd "$GAMEDIR" +> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1 + +# Check if .exe exists +if [ -f "./gamedata/Frogger 2 (GMS).exe" ]; then + # Extract its contents in place using 7zzs + ./libs/7zzs x "./gamedata/Frogger 2 (GMS).exe" -o"./gamedata/" +fi + +# Array of files to remove +files_to_remove=("./gamedata/Frogger2FinalgmkPC.exe" +"./gamedata/Frogger 2 (GMS).exe" +"./gamedata/D3DX9_43.dll" +"./gamedata/options.ini" +"./gamedata/gmsched.dll") + +# Loop through each file and remove it +for file in "${files_to_remove[@]}"; do rm -f "$file" +done + +# Check if "data.win" exists and its MD5 checksum matches the specified value then apply patch +if [ -f "gamedata/data.win" ]; then + checksum=$(md5sum "gamedata/data.win" | awk '{print $1}') + if [ "$checksum" = "2c5167c1a7e603e36e937e2218580802" ]; then + $ESUDO $controlfolder/xdelta3 -d -s "gamedata/data.win" -f "./patch/patch.xdelta3" "gamedata/game.droid" && \ + rm "gamedata/data.win" + fi +fi +[ -f "./gamedata/data.win" ] && mv gamedata/data.win gamedata/game.droid + +$GPTOKEYB "gmloader" -c "./frogger2.gptk" & +echo "Loading, please wait... " > /dev/tty0 + +$ESUDO chmod +x "$GAMEDIR/gmloader" +pm_platform_helper "$GAMEDIR/gmloader" +./gmloader frogger2.apk + +pm_finish diff --git a/ports/frogger2/README.md b/ports/frogger2/README.md new file mode 100644 index 0000000000..2cf40b80f5 --- /dev/null +++ b/ports/frogger2/README.md @@ -0,0 +1,15 @@ +## Notes + +Huge thank you to [Ryan Silberman](https://ryan-silberman.itch.io/frogger2) for creating this fantastic fan re-make of a childhood classic that we all know and love! Special thanks to each person who tested this port! + +## Controls + +| Button | Action | +|--|--| +|dpad|move player1| +|left analog|move player1| +|right analog|move player1 or player2 if co-op| +|A button|Start/select options| +|Start button|Start/select options| + + diff --git a/ports/frogger2/cover.jpg b/ports/frogger2/cover.jpg new file mode 100644 index 0000000000..71fbef508b Binary files /dev/null and b/ports/frogger2/cover.jpg differ diff --git a/ports/frogger2/frogger2/LICENSE.7zzs.txt b/ports/frogger2/frogger2/LICENSE.7zzs.txt new file mode 100644 index 0000000000..bbb9979f02 --- /dev/null +++ b/ports/frogger2/frogger2/LICENSE.7zzs.txt @@ -0,0 +1,144 @@ + 7-Zip for Linux and macOS + ~~~~~~~~~~~~~~~~~~~~~~~~~ + License for use and distribution + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + 7-Zip Copyright (C) 1999-2024 Igor Pavlov. + + The licenses for 7zz and 7zzs files are: + + - The "GNU LGPL" as main license for most of the code + - The "GNU LGPL" with "unRAR license restriction" for some code + - The "BSD 3-clause License" for some code + - The "BSD 2-clause License" for some code + + Redistributions in binary form must reproduce related license information from this file. + + Note: + You can use 7-Zip on any computer, including a computer in a commercial + organization. You don't need to register or pay for 7-Zip. + + +GNU LGPL information +-------------------- + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You can receive a copy of the GNU Lesser General Public License from + http://www.gnu.org/ + + + + +BSD 3-clause License in 7-Zip code +---------------------------------- + + The "BSD 3-clause License" is used for the following code in 7z.dll + 1) LZFSE data decompression. + That code was derived from the code in the "LZFSE compression library" developed by Apple Inc, + that also uses the "BSD 3-clause License". + 2) ZSTD data decompression. + that code was developed using original zstd decoder code as reference code. + The original zstd decoder code was developed by Facebook Inc, + that also uses the "BSD 3-clause License". + + Copyright (c) 2015-2016, Apple Inc. All rights reserved. + Copyright (c) Facebook, Inc. All rights reserved. + Copyright (c) 2023-2024 Igor Pavlov. + +Text of the "BSD 3-clause License" +---------------------------------- + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + + + + +BSD 2-clause License in 7-Zip code +---------------------------------- + + The "BSD 2-clause License" is used for the XXH64 code in 7-Zip. + + XXH64 code in 7-Zip was derived from the original XXH64 code developed by Yann Collet. + + Copyright (c) 2012-2021 Yann Collet. + Copyright (c) 2023-2024 Igor Pavlov. + +Text of the "BSD 2-clause License" +---------------------------------- + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- + + + + +unRAR license restriction +------------------------- + +The decompression engine for RAR archives was developed using source +code of unRAR program. +All copyrights to original unRAR code are owned by Alexander Roshal. + +The license for original unRAR code has the following restriction: + + The unRAR sources cannot be used to re-create the RAR compression algorithm, + which is proprietary. Distribution of modified unRAR sources in separate form + or as a part of other software is permitted, provided that it is clearly + stated in the documentation and source comments that the code may + not be used to develop a RAR (WinRAR) compatible archiver. + +-- diff --git a/ports/frogger2/frogger2/frogger2.apk b/ports/frogger2/frogger2/frogger2.apk new file mode 100644 index 0000000000..2c5eea67d7 Binary files /dev/null and b/ports/frogger2/frogger2/frogger2.apk differ diff --git a/ports/frogger2/frogger2/frogger2.gptk b/ports/frogger2/frogger2/frogger2.gptk new file mode 100644 index 0000000000..235c74ae0f --- /dev/null +++ b/ports/frogger2/frogger2/frogger2.gptk @@ -0,0 +1,14 @@ +start = enter + +up = up +down = down +left = left +right = right + +right_analog_up = up +right_analog_down = down + +a = enter +b = \" +x = \" +y = \" \ No newline at end of file diff --git a/ports/frogger2/frogger2/gamedata/splash.png b/ports/frogger2/frogger2/gamedata/splash.png new file mode 100644 index 0000000000..e50815090a Binary files /dev/null and b/ports/frogger2/frogger2/gamedata/splash.png differ diff --git a/ports/frogger2/frogger2/gmloader b/ports/frogger2/frogger2/gmloader new file mode 100644 index 0000000000..f953f12dd3 Binary files /dev/null and b/ports/frogger2/frogger2/gmloader differ diff --git a/ports/frogger2/frogger2/libc++_shared.so b/ports/frogger2/frogger2/libc++_shared.so new file mode 100644 index 0000000000..fb45ef9052 Binary files /dev/null and b/ports/frogger2/frogger2/libc++_shared.so differ diff --git a/ports/frogger2/frogger2/libs/7zzs b/ports/frogger2/frogger2/libs/7zzs new file mode 100644 index 0000000000..2d206feb26 Binary files /dev/null and b/ports/frogger2/frogger2/libs/7zzs differ diff --git a/ports/frogger2/frogger2/libs/libcrypto.so.1.1 b/ports/frogger2/frogger2/libs/libcrypto.so.1.1 new file mode 100644 index 0000000000..12578440aa Binary files /dev/null and b/ports/frogger2/frogger2/libs/libcrypto.so.1.1 differ diff --git a/ports/frogger2/frogger2/libs/libzip.so.5 b/ports/frogger2/frogger2/libs/libzip.so.5 new file mode 100644 index 0000000000..0908c68657 Binary files /dev/null and b/ports/frogger2/frogger2/libs/libzip.so.5 differ diff --git a/ports/frogger2/frogger2/patch/patch.xdelta3 b/ports/frogger2/frogger2/patch/patch.xdelta3 new file mode 100644 index 0000000000..81953555e3 Binary files /dev/null and b/ports/frogger2/frogger2/patch/patch.xdelta3 differ diff --git a/ports/frogger2/gameinfo.xml b/ports/frogger2/gameinfo.xml new file mode 100644 index 0000000000..bce61f92c2 --- /dev/null +++ b/ports/frogger2/gameinfo.xml @@ -0,0 +1,13 @@ + + + + ./Frogger 2.sh + Frogger 2 + Play as Frogger or Lillie Frog as they conquer 32 stages to rescue the missing frog children. A full-blown fan remake of the Game Boy Color version of Frogger 2! + 20220707T000000 + Ryan Silberman + Ryan Silberman + Arcade + ./frogger2/cover.jpg + + diff --git a/ports/frogger2/port.json b/ports/frogger2/port.json new file mode 100644 index 0000000000..3f75c65330 --- /dev/null +++ b/ports/frogger2/port.json @@ -0,0 +1,30 @@ +{ + "version": 3, + "name": "frogger2.zip", + "items": [ + "Frogger 2.sh", + "frogger2" + ], + "items_opt": [], + "attr": { + "title": "Frogger 2", + "porter": [ + "MadShmupper" + ], + "desc": "A full-blown fan remake of the Game Boy Color version of Frogger 2! Play as Frogger or Lillie Frog as they conquer 32 stages to rescue the missing frog children.", + "desc_md": null, + "inst": "Download at itch.io https://ryan-silberman.itch.io/frogger2 and place the Frogger 2 (GMS).exe into the gamedata folder.", + "inst_md": "Download at [itch.io](https://ryan-silberman.itch.io/frogger2) and place the Frogger 2 (GMS).exe into the gamedata folder.", + "genres": [ + "arcade" + ], + "image": null, + "rtr": false, + "exp": false, + "runtime": null, + "reqs": [], + "arch": [ + "armhf" + ] + } +} \ No newline at end of file diff --git a/ports/frogger2/screenshot.png b/ports/frogger2/screenshot.png new file mode 100644 index 0000000000..23359b03e6 Binary files /dev/null and b/ports/frogger2/screenshot.png differ