Skip to content

Commit

Permalink
Here ya go Meetpatty
Browse files Browse the repository at this point in the history
  • Loading branch information
krazynez committed Jan 2, 2025
1 parent 14ff18f commit 1d7dd64
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 16 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ SUBDIRS = libs \
extras/150kernel/systemctrl150 \
extras/150kernel/vshctrl150 \
extras/150kernel/tmctrl150 \
extras/150kernel/installer
extras/150kernel/vshmenu150 \
extras/150kernel/installer

.PHONY: subdirs $(SUBDIRS) cleanobj clean cleanobj copy-bin mkdir-dist encrypt-prx copy-dcark pack-flash0

Expand Down Expand Up @@ -312,6 +313,8 @@ clean:
$(Q)$(MAKE) $@ -C extras/150kernel/systemctrl150
$(Q)$(MAKE) $@ -C extras/150kernel/vshctrl150
$(Q)$(MAKE) $@ -C extras/150kernel/tmctrl150
$(Q)$(MAKE) $@ -C extras/150kernel/vshmenu150
$(Q)$(MAKE) $@ -C extras/150kernel/vshctrl150
$(Q)$(MAKE) $@ -C extras/150kernel/installer
$(Q)$(MAKE) $@ -C loader/live/FinalSpeed
$(Q)$(MAKE) $@ -C loader/live/user/linkless_payload
Expand Down
2 changes: 1 addition & 1 deletion extras/150kernel/btcnf/pspbtcnf.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
/kd/utility.prx
/kd/chkreg.prx
/kd/impose.prx
/kd/vshbridge.prx
/kd/ark_vshctrl150.prx
/kd/vshbridge.prx

#for savedata
/vsh/module/chnnlsv.prx
Expand Down
8 changes: 8 additions & 0 deletions extras/150kernel/installer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ OBJS = \
reboot150.h \
systemctrl150.h \
tmctrl150.h \
ark_vshctrl150.h \
ark_satelite150.h \
main.o \
pspDecrypt.o \
pspPSAR.o \
Expand Down Expand Up @@ -33,6 +35,12 @@ pspbtcnf_game.h:
pspbtcnf.h:
$(Q)bin2c ../btcnf/pspbtcnf.txt pspbtcnf.h pspbtcnf

ark_vshctrl150.h:
$(Q)bin2c ../vshctrl150/vshctrl150.prx ark_vshctrl150.h ark_vshctrl150

ark_satelite150.h:
$(Q)bin2c ../vshmenu150/satelite.prx ark_satelite150.h ark_satelite150

reboot150.h:
$(Q)bin2c $(ARKROOT)/extras/150kernel/reboot150/reboot150.prx reboot150.h reboot150

Expand Down
4 changes: 4 additions & 0 deletions extras/150kernel/installer/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "reboot150.h"
#include "systemctrl150.h"
#include "tmctrl150.h"
#include "ark_vshctrl150.h"
#include "ark_satelite150.h"

#include "../common/include/rebootbin.h"

Expand All @@ -49,6 +51,8 @@ ARKFile arkfiles[N_FILES] =
{ ARK_DC_PATH "/150/reboot150.prx", reboot150, sizeof(reboot150) },
{ ARK_DC_PATH "/150/kd/ark_systemctrl150.prx", systemctrl150, sizeof(systemctrl150) },
{ ARK_DC_PATH "/150/tmctrl150.prx", tmctrl150, sizeof(tmctrl150) },
{ ARK_DC_PATH "/150/kd/ark_vshctrl150.prx", ark_vshctrl150, sizeof(ark_vshctrl150) },
{ ARK_DC_PATH "/150/vsh/module/ark_satelite150.prx", ark_satelite150, sizeof(ark_satelite150) },
{ ARK_DC_PATH "/150/kd/pspbtcnf_game.txt", pspbtcnf_game, sizeof(pspbtcnf_game) },
{ ARK_DC_PATH "/150/kd/pspbtcnf.txt", pspbtcnf, sizeof(pspbtcnf) },
};
Expand Down
4 changes: 2 additions & 2 deletions extras/150kernel/vshctrl150/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
TARGET = vshctrl150

OBJS = \
main.o \
vshmenu.o \
main.o \
$(ARKROOT)/libs/ansi-c/strcasecmp.o

all: $(TARGET).prx
Expand All @@ -22,7 +22,7 @@ USE_KERNEL_LIBS=1

LIBDIR = $(ARKROOT)/libs lib
LDFLAGS = -nostartfiles
LIBS = -lpspsystemctrl_kernel
LIBS = -lpspsystemctrl_kernel -lcolordebugger

PSP_FW_VERSION = 150

Expand Down
18 changes: 8 additions & 10 deletions extras/150kernel/vshctrl150/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
PSP_MODULE_INFO("VshCtrl", 0x1007, 1, 2);

#define GAME150_PATCH "__150"

static STMOD_HANDLER previous;

extern int _sceCtrlReadBufferPositive(SceCtrlData *ctrl, int count);
extern int (*g_sceCtrlReadBufferPositive) (SceCtrlData *, int);
extern int (*g_sceCtrlReadBufferPositive) (SceCtrlData *, int count);

// Flush Instruction and Data Cache
void sync_cache()
Expand All @@ -32,13 +31,13 @@ void sync_cache()
sceKernelDcacheWritebackInvalidateAll();
}

static void patch_vsh_module(SceModule2* vshmain)
static void patch_sceCtrlReadBufferPositive(void)
{
SceModule* mod;

mod = sceKernelFindModuleByName("sceVshBridge_Driver");
mod = sceKernelFindModuleByName("sceVshBridge_Driver");
hookImportByNID(mod, "sceCtrl_driver", 0x1F803938, _sceCtrlReadBufferPositive);
g_sceCtrlReadBufferPositive = (void *) sctrlHENFindFunction("sceController_Service", "sceCtrl", 0x1F803938);
g_sceCtrlReadBufferPositive = (void*)sctrlHENFindFunction("sceController_Service", "sceCtrl", 0x1F803938);
sctrlHENPatchSyscall(g_sceCtrlReadBufferPositive, _sceCtrlReadBufferPositive);
}

Expand Down Expand Up @@ -134,11 +133,10 @@ static int vshpatch_module_chain(SceModule2 *mod)
u32 text_addr = mod->text_addr;

if(0 == strcmp(mod->modname, "vsh_module")) {
patch_vsh_module(mod);
patch_sceCtrlReadBufferPositive();
goto exit;
}

exit:
exit:
sync_cache();
if (previous) previous(mod);
}
Expand All @@ -147,8 +145,8 @@ static int vshpatch_module_chain(SceModule2 *mod)
int module_start(SceSize args, void* argp)
{

previous = sctrlHENSetStartModuleHandler(&vshpatch_module_chain);
previous = sctrlHENSetStartModuleHandler(vshpatch_module_chain);
hook_directory_io();

return 0;
}
}
4 changes: 2 additions & 2 deletions extras/150kernel/vshctrl150/vshmenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int vctrlVSHExitVSHMenu(SEConfig *config, char *videoiso, int disctype)
return 0;
}

static SceUID load_satelite(void)
int load_satelite(void)
{
SceUID modid;

Expand Down Expand Up @@ -107,6 +107,7 @@ SceUID get_thread_id(const char *name)
return -2;
}


int _sceCtrlReadBufferPositive(SceCtrlData *ctrl, int count)
{
int ret;
Expand Down Expand Up @@ -136,7 +137,6 @@ int _sceCtrlReadBufferPositive(SceCtrlData *ctrl, int count)
if ((ctrl->Buttons & ALL_CTRL) != PSP_CTRL_SELECT) {
goto exit;
}

// Block Satellite Menu in OSK
if (sceKernelFindModuleByName("sceVshOSK_Module"))
goto exit;
Expand Down

0 comments on commit 1d7dd64

Please sign in to comment.