commit 592f90c393b0fd3507e503d4cc088496d459cf5a Author: TheSola10 Date: Wed Mar 26 13:32:30 2025 +0100 Initial commit diff --git a/.ccls b/.ccls new file mode 100644 index 0000000..73d28c3 --- /dev/null +++ b/.ccls @@ -0,0 +1,2 @@ +gcc +-I/usr/local/pspdev/psp/sdk/include diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..6a4409c --- /dev/null +++ b/.envrc @@ -0,0 +1,5 @@ +if ! has box_direnv_version || ! box_direnv_version 0.1.0; then + source_url "https://raw.githubusercontent.com/thesola10/box-direnv/0.1.0/direnvrc" "sha256-pznp4/w7UzNAqreaLuGgq4/CTFjMedC376xnIWr5s+U=" +fi + +use distrobox diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..99c2987 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +EBOOT.PBP +PARAM.SFO +*.o +*.elf +*.prx diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d4cc1bb --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +TARGET = xdelta_umd +OBJS = main.o +LIBS = +CFLAGS = -O2 -G0 -Wall -std=c99 -DCUSTOM_PATH +# -DKPRINTF_ENABLED +CXXFLAGS = $(CFLAGS) +ASFLAGS = $(CFLAGS) + +USE_KERNEL_LIBC = 1 +USE_KERNEL_LIBS = 1 + +PSP_FW_VERSION = 500 +PSPSDK = $(shell psp-config --pspsdk-path) +include $(PSPSDK)/lib/build_prx.mak diff --git a/distrobox.ini b/distrobox.ini new file mode 100644 index 0000000..5d2146c --- /dev/null +++ b/distrobox.ini @@ -0,0 +1,5 @@ +[pspdev] +image=ghcr.io/pspdev/pspdev:latest +additional_packages="ccls" +pull=true +init_hooks="echo -e 'export PSPDEV=/usr/local/pspdev\nexport PATH=$PSPDEV/bin:$PATH' > /etc/profile.d/pspdev.sh" diff --git a/main.c b/main.c new file mode 100644 index 0000000..bb44e30 --- /dev/null +++ b/main.c @@ -0,0 +1,32 @@ +/** + * @file main.c + * @author Karim Vergnes + * @copyright GPLv2 + * @brief xdelta patch application module for UMD games + * + * This module intercepts read commands from UMD, and selectively replaces them + * with contents from a given xdelta file. + * This allows patches such as translations to be applied to physical media + * without requiring a dump. + */ + +#include +#include + +PSP_MODULE_INFO("umd_xdelta", PSP_MODULE_KERNEL, 0, 8); + +int module_found = 0; +int loader_found = 0; + +#define MAX_MODULE_NUMBER 256 + + +int module_start(SceSize argc, void *argp) +{ + kprintf("------------------\nUMD-xdelta starting...\n"); +#ifdef CUSTOM_PATH + get_plugin_path(argp); +#endif +} + +// vim: ft=c.doxygen