Skip to content

Commit

Permalink
bump version, and also detect if PSP is GO
Browse files Browse the repository at this point in the history
  • Loading branch information
krazynez committed Oct 19, 2023
1 parent 605955e commit 7e7a21d
Show file tree
Hide file tree
Showing 14 changed files with 129 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SUBDIRS = user \


all: #subdirs # user kernel
$(MAKE) $@ -C libs
$(MAKE) $@ -C user
$(MAKE) $@ -C kernel
@mkdir -p $(UMDREGIONROOT)/dist/PSP/GAME/UMD_Region_Changer || true
Expand All @@ -19,7 +20,7 @@ clean:
$(MAKE) $@ -C user
$(MAKE) $@ -C kernel
@rm -rf $(UMDREGIONROOT)/dist *.zip
@find . -type f -name "*.o" -delete -o -name "*.elf" -delete -o -name "*.prx" -delete -o -name "*.PBP" -delete -o -name "*.SFO" -delete
@find . -type f -name "*.o" -delete -o -name "*.elf" -delete -o -name "*.prx" -delete -o -name "*.PBP" -delete -o -name "*.SFO" -delete -o -name "*.a" -delete
@echo CLEAN

pkg: package
Expand Down
64 changes: 64 additions & 0 deletions libs/KUBridge/KUBridge.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.set noreorder

#include "pspimport.s"

// Build files
// KUBridge_XXXX.o

#ifdef F_KUBridge_0000
IMPORT_START "KUBridge",0x40090000
#endif
#ifdef F_KUBridge_0001
IMPORT_FUNC "KUBridge",0x4C25EA72,kuKernelLoadModule
#endif
#ifdef F_KUBridge_0002
IMPORT_FUNC "KUBridge",0x8E5A4057,kuKernelInitApitype
#endif
#ifdef F_KUBridge_0003
IMPORT_FUNC "KUBridge",0x1742445F,kuKernelInitFileName
#endif
#ifdef F_KUBridge_0004
IMPORT_FUNC "KUBridge",0xB0B8824E,kuKernelInitKeyConfig
#endif
#ifdef F_KUBridge_0005
IMPORT_FUNC "KUBridge",0x60DDB4AE,kuKernelBootFrom
#endif
#ifdef F_KUBridge_0006
IMPORT_FUNC "KUBridge",0xA2ABB6D3,kuKernelGetUserLevel
#endif
#ifdef F_KUBridge_0007
IMPORT_FUNC "KUBridge",0xC4AF12AB,kuKernelSetDdrMemoryProtection
#endif
#ifdef F_KUBridge_0008
IMPORT_FUNC "KUBridge",0x24331850,kuKernelGetModel
#endif
#ifdef F_KUBridge_0009
IMPORT_FUNC "KUBridge",0x7A50075E,kuKernelPeekw
#endif
#ifdef F_KUBridge_0010
IMPORT_FUNC "KUBridge",0x0E73A39D,kuKernelPokew
#endif
#ifdef F_KUBridge_0011
IMPORT_FUNC "KUBridge",0x6B4B577F,kuKernelMemcpy
#endif
#ifdef F_KUBridge_0012
IMPORT_FUNC "KUBridge",0xD0D05A5B,kuKernelGetUmdFile
#endif
#ifdef F_KUBridge_0013
IMPORT_FUNC "KUBridge",0x1E9F0498,kuKernelLoadModuleWithApitype2
#endif
#ifdef F_KUBridge_0014
IMPORT_FUNC "KUBridge",0x4B321167,kuKernelFindModuleByName
#endif
#ifdef F_KUBridge_0015
IMPORT_FUNC "KUBridge",0x9060F69D,kuKernelCall
#endif
#ifdef F_KUBridge_0016
IMPORT_FUNC "KUBridge",0x5C6C3DBA,kuKernelCallExtendStack
#endif
#ifdef F_KUBridge_0017
IMPORT_FUNC "KUBridge",0x219DE4D2,kuKernelIcacheInvalidateAll
#endif
#ifdef F_KUBridge_0018
IMPORT_FUNC "KUBridge",0x501E983D,kuKernelInitMode
#endif
38 changes: 38 additions & 0 deletions libs/KUBridge/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
TARGET=libpspkubridge.a

all: $(TARGET)
STUBSRC = KUBridge.S
OBJS = \
KUBridge_0000.o \
KUBridge_0001.o \
KUBridge_0002.o \
KUBridge_0003.o \
KUBridge_0004.o \
KUBridge_0005.o \
KUBridge_0006.o \
KUBridge_0007.o \
KUBridge_0008.o \
KUBridge_0009.o \
KUBridge_0010.o \
KUBridge_0011.o \
KUBridge_0012.o \
KUBridge_0013.o \
KUBridge_0014.o \
KUBridge_0015.o \
KUBridge_0016.o \
KUBridge_0017.o \
KUBridge_0018.o \

PSPSDK=$(shell psp-config --pspsdk-path)

CC=psp-gcc
INCDIR =
CFLAGS = -std=c99 -Os -G0 -Wall -fno-builtin-printf -I$(PSPSDK)/include
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LDFLAGS=-nodefaultlibs

LIBDIR =

include $(UMDREGIONROOT)/common/make/global.mak
include $(UMDREGIONROOT)/common/make/beauty_stub.mak
4 changes: 4 additions & 0 deletions libs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ all: subdirs
$(MAKE) -C SystemCtrlForKernel
$(MAKE) -C colordebugger
$(MAKE) -C libpng
$(MAKE) -C KUBridge
cp SystemCtrlForUser/*.a .
cp SystemCtrlForKernel/*.a .
cp colordebugger/*.a .
cp libpng/*.a .
cp KUBridge/*.a .

distclean clean:
$(MAKE) $@ -C SystemCtrlForUser $(OPT)
$(MAKE) $@ -C SystemCtrlForKernel $(OPT)
$(MAKE) $@ -C colordebugger $(OPT)
$(MAKE) $@ -C libpng $(OPT)
$(MAKE) $@ -C KUBridge $(OPT)



Expand Down
Binary file removed libs/SystemCtrlForKernel/libpspsystemctrl_kernel.a
Binary file not shown.
Binary file removed libs/SystemCtrlForUser/libpspsystemctrl_user.a
Binary file not shown.
Binary file removed libs/colordebugger/libcolordebugger.a
Binary file not shown.
Binary file removed libs/libcolordebugger.a
Binary file not shown.
Binary file removed libs/libpng.a
Binary file not shown.
Binary file removed libs/libpng/libpng.a
Binary file not shown.
Binary file removed libs/libpspsystemctrl_kernel.a
Binary file not shown.
Binary file removed libs/libpspsystemctrl_user.a
Binary file not shown.
2 changes: 1 addition & 1 deletion user/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BUILD_PRX = 1

OBJS = main.o graphics.o

LIBS = -lpng -lz -lc -lm -lpspgu -lpspgum -lpspdebug -lpspsystemctrl_user
LIBS = -lpng -lz -lc -lm -lpspgu -lpspgum -lpspdebug -lpspsystemctrl_user -lpspkubridge

LIBDIR=$(UMDREGIONROOT)/libs

Expand Down
26 changes: 20 additions & 6 deletions user/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "graphics.h"


PSP_MODULE_INFO("UMD_REGION_CHANGER", 0, 1, 0);
PSP_MODULE_INFO("UMD_REGION_CHANGER", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
PSP_HEAP_SIZE_KB(4096);

Expand All @@ -34,19 +34,33 @@ int main(int argc, char *args[]) {

sceDisplayWaitVblankStart();

pspDebugScreenSetXY(17, 17);
pspDebugScreenSetXY(17, 5);

pspDebugScreenSetTextColor(0xFF0000FF);
printf("Presented by ARK-4 Team (c)2023");
pspDebugScreenSetXY(26, 20);
pspDebugScreenSetXY(26, 10);
pspDebugScreenSetTextColor(0xFF00FF00);
printf("Version 1.0");
printf("Version 1.1");

sceDisplayWaitVblank();

sceKernelDelayThread(3000000);

if(kuKernelGetModel() == 4) {
pspDebugScreenClear();
sceDisplayWaitVblank();
pspDebugScreenSetTextColor(0xFF0000FF);
pspDebugScreenSetXY(25, 10);
printf("GO home your drunk.");
pspDebugScreenSetXY(10, 20);
printf("This is for UMD Movies... UMD does your GO have a UMD?");
sceDisplayWaitVblank();

sceKernelDelayThread(5000000);
sceKernelExitGame();
}


sceDisplayWaitVblank();

pspDebugScreenClear();
SceCtrlData pad;

Expand Down

0 comments on commit 7e7a21d

Please sign in to comment.