mirror of
https://github.com/lowbit/ps5-doom.git
synced 2026-10-06 06:00:23 +02:00
Launcher with game import; ship the shareware episode instead of Freedoom
DOOM now opens on a game list. The package bundles id's freely distributable shareware DOOM1.WAD; players add The Ultimate DOOM, DOOM II, TNT and Plutonia (or Freedoom) from their own files: - copied into /data/homebrew/PPSA99666/wads, as WADs or inside ZIP, 7Z or RAR archives, which are imported once at the next start; - downloaded from an http:// or https:// link typed on the system keyboard: a WAD, an archive, or a folder listing to pick from. Archives are read in place over HTTP range requests, so a large solid 7Z needs no room on the console beyond the game WADs it holds. The console uses sceHttp/sceSsl and the IME dialog; the PC build uses libcurl. Archives go through libarchive, liblzma and zlib, fetched pinned and built for both targets, with large allocations taken from mmap. Engine fixes that came with it: IdentifyVersion takes the launcher's choice and sets gamemission, so TNT and Plutonia get their own level names and finale texts; the sky check no longer gives The Ultimate DOOM the DOOM II skies; saves are per game; widescreen full-screen pictures from the 2024 re-release are drawn centred instead of rejected. The console test runner receives doom.log over the capture connection instead of reading the kernel log.
This commit is contained in:
1 parent
9a0c226c42
commit
674f88487d
54 files changed
+3270
-362
No files matched your search
@@ -1,9 +1,12 @@
|
||||
DOOM_SRC := $(wildcard src/doom/*.c)
|
||||
PORT_SRC := $(wildcard src/port/*.c) $(wildcard src/audio/*.c) $(wildcard src/platform/*.c)
|
||||
PORT_SRC := $(wildcard src/port/*.c) $(wildcard src/audio/*.c) $(wildcard src/platform/*.c) \
|
||||
$(wildcard src/launcher/*.c)
|
||||
HOST_SRC := $(wildcard src/host/*.c)
|
||||
PS5_SRC := $(wildcard src/ps5/*.c)
|
||||
|
||||
INCLUDES := -Isrc/doom -Isrc/port -Isrc/platform -Isrc/audio
|
||||
include third_party/third_party.mk
|
||||
|
||||
INCLUDES := -Isrc/doom -Isrc/port -Isrc/platform -Isrc/audio -Isrc/launcher $(ARCHIVE_INCLUDES)
|
||||
DOOM_WARNINGS := -Wall -Wno-unused-const-variable -Wno-unused-but-set-variable \
|
||||
-Wno-unused-variable -Wno-logical-not-parentheses -Wno-missing-braces
|
||||
OWN_WARNINGS := -Wall -Wextra -Wno-unused-parameter
|
||||
@@ -12,7 +15,8 @@ HOST_CC := clang
|
||||
HOST_FLAGS := -O2 -g -fno-strict-aliasing -MMD -MP
|
||||
|
||||
HOST_DIR := build/host
|
||||
HOST_OBJ := $(patsubst src/%.c,$(HOST_DIR)/%.o,$(DOOM_SRC) $(PORT_SRC) $(HOST_SRC))
|
||||
HOST_OWN_OBJ := $(patsubst src/%.c,$(HOST_DIR)/%.o,$(DOOM_SRC) $(PORT_SRC) $(HOST_SRC))
|
||||
HOST_OBJ := $(HOST_OWN_OBJ) $(call third_obj,$(HOST_DIR))
|
||||
|
||||
TITLE := PPSA99666
|
||||
NATIVE := .deps/native-app
|
||||
@@ -23,7 +27,8 @@ RUNTIME := $(NATIVE)/runtime/libc.prx
|
||||
PS5_DIR := build/ps5
|
||||
PS5_GEN := $(PS5_DIR)/gen
|
||||
PS5_STUBS := $(PS5_DIR)/stubs
|
||||
PS5_OBJ := $(patsubst src/%.c,$(PS5_DIR)/%.o,$(DOOM_SRC) $(PORT_SRC) $(PS5_SRC))
|
||||
PS5_OWN_OBJ := $(patsubst src/%.c,$(PS5_DIR)/%.o,$(DOOM_SRC) $(PORT_SRC) $(PS5_SRC))
|
||||
PS5_OBJ := $(PS5_OWN_OBJ) $(call third_obj,$(PS5_DIR))
|
||||
AGC_STUBS := $(patsubst src/ps5/stubs/%.txt,$(PS5_STUBS)/%.so,$(wildcard src/ps5/stubs/*.txt))
|
||||
PS5_CC := clang -target x86_64-sie-ps5 -fvisibility-nodllstorageclass=default \
|
||||
-isysroot $(SDK) -isystem $(SDK)/target/include \
|
||||
@@ -37,7 +42,7 @@ host: $(HOST_DIR)/bin/doom
|
||||
|
||||
$(HOST_DIR)/bin/doom: $(HOST_OBJ)
|
||||
@mkdir -p $(dir $@)
|
||||
$(HOST_CC) -o $@ $^ -lm -lpthread
|
||||
$(HOST_CC) -o $@ $^ -lm -lpthread -lcurl
|
||||
|
||||
$(HOST_DIR)/doom/%.o: src/doom/%.c
|
||||
@mkdir -p $(dir $@)
|
||||
@@ -47,6 +52,12 @@ $(HOST_DIR)/%.o: src/%.c
|
||||
@mkdir -p $(dir $@)
|
||||
$(HOST_CC) -std=gnu11 $(HOST_FLAGS) $(OWN_WARNINGS) $(INCLUDES) -c $< -o $@
|
||||
|
||||
$(HOST_DIR)/third_party/%.o: $(ARCHIVE_DEPS)/%.c
|
||||
@mkdir -p $(dir $@)
|
||||
$(HOST_CC) $(THIRD_FLAGS) -g -MMD -MP $(call third_flags,$<) -c $< -o $@
|
||||
|
||||
$(HOST_OWN_OBJ): | $(ARCHIVE_STAMP)
|
||||
|
||||
tools: $(NATIVE_TOOL)
|
||||
|
||||
$(NATIVE_TOOL) $(RUNTIME) $(SDK)/target/lib/libkernel.so:
|
||||
@@ -55,9 +66,6 @@ $(NATIVE_TOOL) $(RUNTIME) $(SDK)/target/lib/libkernel.so:
|
||||
wads/DOOM1.WAD:
|
||||
bash tools/fetch-shareware.sh $@
|
||||
|
||||
wads/freedoom2.wad:
|
||||
bash tools/fetch-freedoom.sh wads
|
||||
|
||||
ps5: $(APP)/eboot.bin
|
||||
|
||||
$(PS5_STUBS)/.sdk: $(SDK)/target/lib/libkernel.so
|
||||
@@ -87,6 +95,12 @@ $(PS5_DIR)/%.o: src/%.c $(SDK)/target/lib/libkernel.so
|
||||
@mkdir -p $(dir $@)
|
||||
$(PS5_CC) -std=gnu11 $(PS5_FLAGS) $(OWN_WARNINGS) $(INCLUDES) -I$(PS5_GEN) -c $< -o $@
|
||||
|
||||
$(PS5_DIR)/third_party/%.o: $(ARCHIVE_DEPS)/%.c $(SDK)/target/lib/libkernel.so
|
||||
@mkdir -p $(dir $@)
|
||||
$(PS5_CC) $(THIRD_FLAGS) -MMD -MP $(call third_flags,$<) -c $< -o $@
|
||||
|
||||
$(PS5_OWN_OBJ): | $(ARCHIVE_STAMP)
|
||||
|
||||
$(PS5_DIR)/llvm-pie.elf: $(PS5_OBJ) $(AGC_STUBS) src/ps5/symbols.map
|
||||
$(SDK)/bin/prospero-lld -T $(NATIVE)/tooling/native/ps5-pie.ld --eh-frame-hdr --gc-sections \
|
||||
--version-script src/ps5/symbols.map -e _start -o $@ $(PS5_OBJ) \
|
||||
@@ -96,13 +110,20 @@ $(PS5_DIR)/eboot.elf: $(PS5_DIR)/llvm-pie.elf $(NATIVE_TOOL)
|
||||
$(NATIVE_TOOL) link --in $< --out $@ --stub-dir $(PS5_STUBS) \
|
||||
--module-sdk 0x02000009 --companion-sdk 0x08050001 --file-name eboot.elf
|
||||
|
||||
$(APP)/eboot.bin: $(PS5_DIR)/eboot.elf $(RUNTIME) title/param.json title/icon0.png wads/freedoom2.wad
|
||||
$(APP)/eboot.bin: $(PS5_DIR)/eboot.elf $(RUNTIME) title/param.json title/icon0.png wads/DOOM1.WAD
|
||||
rm -rf $(APP)
|
||||
mkdir -p $(APP)/sce_sys $(APP)/sce_module $(APP)/wads
|
||||
$(NATIVE_TOOL) self --sign --in $< --out $@ --magic 0x1D3D154F
|
||||
cp $(RUNTIME) $(APP)/sce_module/libc.prx
|
||||
cp title/param.json title/icon0.png $(APP)/sce_sys/
|
||||
cp wads/freedoom1.wad wads/freedoom2.wad wads/FREEDOOM-COPYING.txt wads/FREEDOOM-CREDITS.txt $(APP)/wads/
|
||||
cp wads/DOOM1.WAD $(APP)/wads/doom1.wad
|
||||
mkdir -p $(APP)/licenses
|
||||
cp LICENSE $(APP)/licenses/DOOM-GPL-2.0.txt
|
||||
cp THIRD_PARTY_NOTICES.md $(APP)/licenses/
|
||||
cp $(NATIVE)/LICENSE $(APP)/licenses/libc-prx-GPL-3.0.txt
|
||||
cp $(LA_DIR)/../COPYING $(APP)/licenses/libarchive.txt
|
||||
cp $(XZ_DIR)/../../COPYING.0BSD $(APP)/licenses/liblzma.txt
|
||||
cp $(ZL_DIR)/LICENSE $(APP)/licenses/zlib.txt
|
||||
$(NATIVE_TOOL) self --inspect --file $@
|
||||
$(NATIVE_TOOL) self --inspect --file $(APP)/sce_module/libc.prx
|
||||
|
||||
|
||||
Reference in new issue
Block a user