Skip to content

Commit af0b8d7

Browse files
authored
Merge pull request #1479 from mikeyTheMichael/main
New Port: FAITH: The Unholy Trinity
2 parents 7ac7ebd + e7f18e8 commit af0b8d7

35 files changed

+2095
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
3+
XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
4+
5+
if [ -d "/opt/system/Tools/PortMaster/" ]; then
6+
controlfolder="/opt/system/Tools/PortMaster"
7+
elif [ -d "/opt/tools/PortMaster/" ]; then
8+
controlfolder="/opt/tools/PortMaster"
9+
elif [ -d "$XDG_DATA_HOME/PortMaster/" ]; then
10+
controlfolder="$XDG_DATA_HOME/PortMaster"
11+
else
12+
controlfolder="/roms/ports/PortMaster"
13+
fi
14+
15+
source $controlfolder/control.txt
16+
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"
17+
get_controls
18+
19+
# Variables
20+
GAME_NAME=faiththeunholytrinity
21+
GAMEDIR="/$directory/ports/$GAME_NAME"
22+
PATCH_MIN_TIME=5 #In Minutes
23+
PATCH_MAX_TIME=10 #In Minutes
24+
25+
# CD and set permissions
26+
cd $GAMEDIR
27+
> "$GAMEDIR/log.txt" && exec > >(tee "$GAMEDIR/log.txt") 2>&1
28+
29+
# Exports
30+
export GAME_NAME
31+
export GAMEDIR
32+
export PATCHER_FILE="$GAMEDIR/tools/patchscript"
33+
export PATCHER_GAME="$(basename "${0%.*}")" # This gets the current script filename without the extension
34+
export PATCHER_TIME="$PATCH_MIN_TIME to $PATCH_MAX_TIME minutes"
35+
export AARCH
36+
export LD_LIBRARY_PATH="/usr/lib:$GAMEDIR/lib:$GAMEDIR/tools/libs:$LD_LIBRARY_PATH"
37+
38+
# Check if patchlog.txt to skip patching
39+
if [ ! -f patchlog.txt ]; then
40+
if [ -f "$controlfolder/utils/patcher.txt" ]; then
41+
source "$controlfolder/utils/patcher.txt"
42+
$ESUDO kill -9 $(pidof gptokeyb)
43+
else
44+
echo "This port requires the latest version of PortMaster." > $CUR_TTY
45+
fi
46+
else
47+
echo "Patching process already completed. Skipping."
48+
fi
49+
50+
# Assign gptokeyb and load the game
51+
$GPTOKEYB "gmloadernext.aarch64" -c "$GAME_NAME.gptk" &
52+
pm_platform_helper "$GAMEDIR/gmloadernext.aarch64"
53+
./gmloadernext.aarch64 -c gmloader.json
54+
55+
# Cleanup by killing processes
56+
pm_finish

ports/faiththeunholytrinity/README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# FAITH The Unholy - PortMaster Modification & Wrapper
2+
This is a wrapper and xdelta modification for vanilla FAITH: The Unholy Trinity that makes the game more manageable on retro handheld systems running linux arm64.
3+
4+
## Installation
5+
Purchase the game on Steam or GOG and copy all the data to `ports/faiththeunholytrinity/assets`, important files are data.win, audiogroup1.dat through audiogroup18.dat, and UTconfigs.cvs files. On first run the game will be patched.
6+
7+
## Controls
8+
| Button | Action |
9+
|--|--|
10+
|START|Menu|
11+
|D-PAD|Move|
12+
|A|Action|
13+
14+
## Performance Notes
15+
This port features audio compression in an attempt to reduce memory usage. This is necessary in order for the port to run on the linux arm handhelds targeted. These handhelds are equipped with low-end rockchip or allwinner processors and usually 1-2GB of memory, alongside Mali blob drivers. Low processing power, low memory, and low VRAM are all major things to watch for when running ports on these devices.
16+
17+
## xDelta Patch Notes
18+
For the more technically inclined, here are specific modifications made in order to make FAITH: The Unholy Trinity run smoothly on the targeted devices:
19+
20+
- [GMTools](https://github.com/cdeletre/gmtools) by Cyril Deletre to resample audio at a lower bitrate
21+
- [UndertaleModTool](https://github.com/UnderminersTeam/UndertaleModTool) to make some specific changes to the game
22+
- Compress Textures to save memory.
23+
- (Steam Version Only) About 50% of steam api function calls did not check if steam was initialized, leading to some math with undefined values which would cause segfaults. Steam API functions are now wrapped in an if statement to verifed that steam is initialized.
24+
25+
## Thanks
26+
Airdorf -- For the amazing game
27+
- https://store.steampowered.com/app/1179080/FAITH_The_Unholy_Trinity/
28+
- https://www.gog.com/en/game/faith_the_unholy_trinity
29+
JohnnyOnFlame -- For GMLoader-Next
30+
Cyril aka kotzebuedog -- For GMTools audio patcher
31+
Jeod -- For the UFO 50 port, which was used as reference for this port
32+
Testers & Devs from the PortMaster Discord

ports/faiththeunholytrinity/cover.png

349 KB
Loading

ports/faiththeunholytrinity/faiththeunholytrinity/assets/.gitkeep

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
back = \"
2+
start = \"
3+
up = \"
4+
down = \"
5+
left = \"
6+
right = \"
7+
a = \"
8+
b = \"
9+
x = \"
10+
y = \"
11+
l1 = \"
12+
l2 = \"
13+
l3 = \"
14+
r1 = \"
15+
r2 = \"
16+
r3 = \"
17+
left_analog_up = \"
18+
left_analog_down = \"
19+
left_analog_left = \"
20+
left_analog_right = \"
21+
right_analog_up = \"
22+
right_analog_down = \"
23+
right_analog_left = \"
24+
right_analog_right = \"
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"save_dir" : "saves",
3+
"apk_path" : "faiththeunholytrinity.port",
4+
"show_cursor" : false,
5+
"disable_controller" : false,
6+
"disable_depth" : false,
7+
"force_platform" : "os_windows"
8+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)