Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions homebrew/Wolf4SDL/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/env bash
# Copyright (C) 2026 John Törnblom
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program 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
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; see the file COPYING. If not see
# <http://www.gnu.org/licenses/>.

SCRIPT_PATH="$(realpath "${BASH_SOURCE[0]}")"
SCRIPT_DIR="$(dirname "${SCRIPT_PATH}")"

if [[ -z "$PS5_PAYLOAD_SDK" ]]; then
if [ -z "${PS5_PAYLOAD_SDK}" ]; then
export PS5_PAYLOAD_SDK=/opt/ps5-payload-sdk
fi
fi

source "${PS5_PAYLOAD_SDK}/toolchain/prospero.sh" || exit 1

cd "${SCRIPT_DIR}"
rm -rf shareware registered payloads

if [[ "$1" == "clean" ]]; then
exit 0
fi

set -e

mkdir shareware
mkdir registered
mkdir payloads

# Shareware site: https://beta.wolf3d.net/games/29/downloads/4477.

cp -v ${PS5_SYSROOT}/${PS5_HBROOT}/bin/wolf3d-registered payloads/wolf3d-registered.elf
cp -v ${PS5_SYSROOT}/${PS5_HBROOT}/bin/wolf3d-shareware payloads/wolf3d-shareware.elf

# Wolfenstien 3D v1.4 shareware.
mkdir tmp
wget -O tmp/shareware.zip "https://beta.wolf3d.net/file-download/download/private/4457"
unzip tmp/shareware.zip -d tmp
mv tmp/*.WL1 shareware
rm -rf tmp
64 changes: 64 additions & 0 deletions homebrew/Wolf4SDL/homebrew.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/* Copyright (C) 2026 John Törnblom

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3, or (at your option) any
later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, see
<http://www.gnu.org/licenses/>. */


async function main() {
const CWD = window.workingDir;

return {
mainText: "Wolf4SDL",
secondaryText: 'Source port for Wolfenstein 3D',
onclick: async () => {
// Assemble payloads path, so it's not cluttered with other stuff confusing the end user.
const payloads_path = CWD + '/' + 'payloads';

// Select elf.
let payload_full_path = await pickFile(payloads_path, 'Select ELF...', true);
// 2 sanity checks.
if(!payload_full_path) {
return;
}

if(!payload_full_path.startsWith('/')) {
payload_full_path = ApiClient.getNetworkShareHttpProxyUrl(payload_full_path);
}

// Extract the basename of payload at / for detection.
const payload_basename = payload_full_path.split('/').pop();

let game_basename = '';

if (payload_basename === 'wolf3d-registered.elf') {
game_basename = 'registered';
} else if (payload_basename === 'wolf3d-shareware.elf') {
game_basename = 'shareware';
}

// Assemble full path to be used for saves and configs, in a self contained manner.
const game_full_path = window.workingDir + '/' + game_basename;

const ARGS = [ '--configdir', `${game_full_path}`,
'--datadir', `${game_full_path}`,
];

return {
path: payload_full_path,
cwd: CWD,
args: ARGS,
};
},
};
}
Binary file added homebrew/Wolf4SDL/sce_sys/icon0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading