Initial commit

This commit is contained in:
TheSola10 2025-03-26 13:32:30 +01:00
commit 592f90c393
Signed by: thesola10
GPG Key ID: 89245619BEBB95BA
6 changed files with 63 additions and 0 deletions

2
.ccls Normal file
View File

@ -0,0 +1,2 @@
gcc
-I/usr/local/pspdev/psp/sdk/include

5
.envrc Normal file
View File

@ -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

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
EBOOT.PBP
PARAM.SFO
*.o
*.elf
*.prx

14
Makefile Normal file
View File

@ -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

5
distrobox.ini Normal file
View File

@ -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"

32
main.c Normal file
View File

@ -0,0 +1,32 @@
/**
* @file main.c
* @author Karim Vergnes <me@thesola.io>
* @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 <pspkernel.h>
#include <string.h>
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