Skip to content

Commit

Permalink
FREEEEEEEEDDDDDDDOOOOOOOOOMMMMMMMMMMMM:
Browse files Browse the repository at this point in the history
Version 1.5: Massive code cleanup, background icons, font support and a special something with
exiting ;-)
  • Loading branch information
krazynez committed Oct 23, 2023
1 parent 168aef6 commit 14f35a7
Show file tree
Hide file tree
Showing 60 changed files with 25,199 additions and 490 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ all: #subdirs # user kernel
@cp $(UMDREGIONROOT)/user/EBOOT.PBP $(UMDREGIONROOT)/dist/PSP/GAME/UMD_Region_Changer/
@cp $(UMDREGIONROOT)/kernel/*.prx $(UMDREGIONROOT)/dist/PSP/GAME/UMD_Region_Changer/
@cp $(UMDREGIONROOT)/IDSREG.PRX $(UMDREGIONROOT)/dist/PSP/GAME/UMD_Region_Changer/
@cp $(UMDREGIONROOT)/res/matrix_new.png $(UMDREGIONROOT)/dist/PSP/GAME/UMD_Region_Changer/BG.PNG
@cp $(UMDREGIONROOT)/res/EXIT.MP3 $(UMDREGIONROOT)/dist/PSP/GAME/UMD_Region_Changer/EXIT.MP3
@echo "Build Done"

clean:
Expand Down
18 changes: 18 additions & 0 deletions common/include/globals.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef _COMMON_H_
#define _COMMON_H_

#define UMD_REGION_NAME "UMD_Region_Changer"

#define UMD_REGION_PATH_SIZE 256

#define MS_ROOT "ms0:/"

#define GAME_PATH "PSP/GAME/"

#define UMD_REGION_PATH MS_ROOT GAME_PATH UMD_REGION_NAME "/"
#define UMD_REGION_FILE "region.txt"
#define UMD_REGION_TYPE UMD_REGION_PATH UMD_REGION_FILE



#endif
13 changes: 0 additions & 13 deletions kernel/include/kern_common.h
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
#ifndef KERN_COMMON_H
#define KERN_COMMON_H

#define UMD_REGION_NAME "UMD_Region_Changer"

#define UMD_REGION_PATH_SIZE 256

#define GO_ROOT "ef0:/"
#define MS_ROOT "ms0:/"

#define GAME_PATH "PSP/GAME/"

#define CONCAT(a, b) a ## b
#define EXPAND_CONCAT(a, b) CONCAT(a, b)


#define UMD_REGION_PATH MS_ROOT GAME_PATH UMD_REGION_NAME "/"
#define UMD_REGION_FILE "region.txt"
#define UMD_REGION_TYPE UMD_REGION_PATH UMD_REGION_FILE



#define JR_RA 0x03E00008
Expand Down
24 changes: 20 additions & 4 deletions kernel/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@
#include <model.h>
#include <kern_common.h>
#include <systemctrl.h>
#include <globals.h>

#include <stdio.h>
#include <string.h>

#define NOP 0
#define JUMP(f) (0x08000000 | (((unsigned int)(f) >> 2) & 0x03ffffff))

PSP_MODULE_INFO("UMDREGION_Module", 0x3007, 1, 0);
PSP_MODULE_INFO("UMDREGION_Module", 0x3007, 1, 5);

STMOD_HANDLER previous;
static STMOD_HANDLER previous = NULL;

enum {
REGION_DEFAULT = 0, // default
Expand Down Expand Up @@ -156,13 +157,14 @@ void PSPOnModuleStart(SceModule2 * mod){
sceKernelStartThread(kthreadID, 0, NULL);
}
goto flush;

}

flush:
flushCache();

// Forward to previous Handler
if(previous) previous(mod);
return previous;
}


Expand Down Expand Up @@ -400,10 +402,24 @@ int patch_umd_thread(SceSize args, void *argp){
}


int module_start(SceSize args, void *argp) {
int thread_start(SceSize args, void *argp) {

previous = sctrlHENSetStartModuleHandler(PSPOnModuleStart);


return sceKernelExitDeleteThread(0);
}

int module_start(SceSize args, void *argp) {

SceUID thid = sceKernelCreateThread("UMD_RF", thread_start, 0x22, 0x2000, 0 , NULL);

if(thid >= 0)
sceKernelStartThread(thid, args, argp);
return 0;
}

int module_stop(SceSize args, void *argp) {
return 0;
}

3 changes: 3 additions & 0 deletions libs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,21 @@ all: subdirs
$(MAKE) -C colordebugger
$(MAKE) -C libpng
$(MAKE) -C KUBridge
$(MAKE) -C libmad
cp SystemCtrlForUser/*.a .
cp SystemCtrlForKernel/*.a .
cp colordebugger/*.a .
cp libpng/*.a .
cp KUBridge/*.a .
cp libmad/lib/*.a .

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



Expand Down
Loading

0 comments on commit 14f35a7

Please sign in to comment.