Skip to content

Commit

Permalink
real hooking
Browse files Browse the repository at this point in the history
  • Loading branch information
Kethen committed Apr 28, 2024
1 parent 3e0e6a6 commit 47d4bb4
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 207 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ubuntu:22.04
RUN export noninteractive; apt update; apt install -y wget libreadline8 libusb-0.1-4 tmux make libmpc3
RUN wget https://github.com/pspdev/pspdev/releases/download/latest/pspdev-ubuntu-latest.tar.gz -O - | gzip -d | tar -C /usr/local -x
RUN echo 'export PATH="/usr/local/pspdev/bin:$PATH"' > /etc/profile.d/pspsdk.sh
RUN echo 'export LD_LIBRARY_PATH="/usr/local/pspsdk/lib:$LD_LIBRARY_PATH"' >> /etc/profile.d/pspsdk.sh
ENTRYPOINT ["/bin/bash", "-l"]
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
TARGET = GTRemastered
OBJS = main.o exports.o

CFLAGS = -O2 -Os -G0 -Wall -fshort-wchar -fno-pic -mno-check-zero-division
CFLAGS = -O2 -Os -G0 -Wall -fshort-wchar -fno-pic -mno-check-zero-division -DDEBUG_LOG=1
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

BUILD_PRX = 1
PRX_EXPORTS = exports.exp

# these do not seem to be available anymore..?
#USE_KERNEL_LIBC = 0
#USE_PSPSDK_LIBC = 1
#USE_KERNEL_LIBS = 1
# use kernel "libc"
USE_KERNEL_LIBS = 1

# use built-in libc to supply sprintf for ppsspp and atoi in general
LIBS = -lc -lpspsystemctrl_kernel
LIBS = -lpspsystemctrl_kernel

PSP_FW_VERSION=661

PSPSDK = $(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build_prx.mak
8 changes: 6 additions & 2 deletions build_podman.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
IMAGE_NAME="pspsdk"

if [ "$REBUILD_IMAGE" == "true" ] && podman image exists $IMAGE_NAME
then
podman image rm -f $IMAGE_NAME
fi

if ! podman image exists $IMAGE_NAME
then
podman pull ghcr.io/pspdev/pspsdk:latest
podman image build -f Dockerfile -t $IMAGE_NAME
fi

podman run \
Expand All @@ -12,6 +17,5 @@ podman run \
-v ./build_podman.sh:/workdir/build_podman.sh:ro \
-v ./script:/workdir/script:ro \
-w /workdir \
--entrypoint /bin/bash \
$IMAGE_NAME \
/workdir/script
2 changes: 2 additions & 0 deletions exports.exp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ PSP_BEGIN_EXPORTS

PSP_EXPORT_START(syslib, 0, 0x8000)
PSP_EXPORT_FUNC(module_start)
PSP_EXPORT_FUNC(module_start)
PSP_EXPORT_FUNC(module_stop)
PSP_EXPORT_VAR(module_info)
PSP_EXPORT_END

Expand Down
Loading

0 comments on commit 47d4bb4

Please sign in to comment.