How to add Kernel access under FW2.50/2.60 VSH (eLoader-TIFF)
By 0okm @ http://0okm.blogspot.com/2006/09/howto-add-kernel-access-under-fw250260.html
sample Download-Link: http://www.eurasia.nu/modules.php?name=Downloads&d_op=viewdownloaddetails&lid=3651&ttitle=Kernel_access_under_FW2.50/2.60_VSH
main.c
add line extern void kernel_ent(u32 Temp);
and write Kernel access in a function
use kernel_ent((u32) &your_function) to call it
// -------------------------------------------
// Kernel access under FW2.50/2.60 VSH
// use Noobz's eLoader(TIFF) 0.9.8
// -------------------------------------------
// Game mode Kernel access by hitchhikr / Neural.
// VSH mode Kernel access by moonlight
// Mod. by 0okm
// -------------------------------------------
// -------------------------------------------
// Include
#include <pspkernel.h>
#include <pspdisplay.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
PSP_MODULE_INFO("25_26_VSH_KA", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER);
#define printf pspDebugScreenPrintf
extern void kernel_ent(u32 Temp);
void Dump_kmem(void)
{
int handle;
handle = sceIoOpen("ms0:/0x88000000-kmem.BIN", PSP_O_WRONLY || PSP_O_CREAT || PSP_O_TRUNC, 0777);
sceIoWrite(handle, (void*) 0x88000000 , 0x400000);
sceIoClose(handle);
}
void Dump_klib(void)
{
int handle;
handle = sceIoOpen("ms0:/0x88800000-klib.BIN", PSP_O_WRONLY || PSP_O_CREAT || PSP_O_TRUNC, 0777);
sceIoWrite(handle, (void*) 0x88800000 , 0x100000);
sceIoClose(handle);
}
void Dump_boot(void)
{
int handle;
handle = sceIoOpen("ms0:/0xBFC00000-boot.BIN", PSP_O_WRONLY || PSP_O_CREAT || PSP_O_TRUNC, 0777);
sceIoWrite(handle, (void*) 0xBFC00000 , 0x100000);
sceIoClose(handle);
}
int main(int argc, char* argv[[]])
{
pspDebugScreenInit();
printf("
");
printf(" Kernel access under FW2.50/2.60 VSH
");
printf(" use Noobz's eLoader(TIFF) 0.9.8
");
printf(" Game mode Kernel access by hitchhikr / Neural.
");
printf(" VSH mode Kernel access by moonlight
");
printf(" Mod. by 0okm
");
printf(" FW ver is 0x%.8X
", sceKernelDevkitVersion());
SceCtrlData pad;
sceCtrlSetSamplingCycle(0);
sceCtrlSetSamplingMode(0);
u32 oldButtons = 0;
printf(" Pass [[TRIANGLE]] to Kernel mem. Dump
");
printf(" Pass [[SQUARE]] to Kernel lib. Dump
");
printf(" Pass [[CIRCLE]] to Kernel boot Dump
");
printf(" Pass [[CROSS]] to EXIT
");
while (1)
{
sceCtrlReadBufferPositive(&pad, 1);
if (oldButtons == pad.Buttons)=
{
oldButtons = pad.Buttons;
if (pad.Buttons & PSP_CTRL_TRIANGLE)
{
kernel_ent((u32) &Dump_kmem);
pspDebugScreenSetTextColor(0xFFFF0000);
printf(" Kernel mem. Dump Finish
");
}
if (pad.Buttons & PSP_CTRL_SQUARE)
{
kernel_ent((u32) &Dump_klib);
pspDebugScreenSetTextColor(0xFF00FF00);
printf(" Kernel lib. Dump Finish
");
}
if (pad.Buttons & PSP_CTRL_CIRCLE)
{
kernel_ent((u32) &Dump_boot);
pspDebugScreenSetTextColor(0xFF0000FF);
printf(" Kernel boot Dump Finish
");
}
if (pad.Buttons & PSP_CTRL_CROSS)
{
sceKernelExitGame();
}
sceDisplayWaitVblankStart();
}
}
return(0);
}
Makefile
in line OBJS add kernel_ex.o
in line LIBS add -lpspvshbridge
TARGET = 25_26_VSH_KA OBJS = main.o kernel_ex.o INCDIR = CFLAGS = -G0 -Wall -O2 CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) LIBDIR = LDFLAGS = LIBS= -lpspvshbridge EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = FW2.50/2.60 VSH Kernel access PSP_EBOOT_ICON = ICON0.PNG PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak
![[Main Page]](http://www.eurasia.nu/images/svico_t.gif)