9/19/2006

HowTo add Kernel access under FW2.50/2.60 VSH (eLoader-TIFF)

sample
Download-Link : 25_26_VSH_KA.zip

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("\n");
    printf(" Kernel access under FW2.50/2.60 VSH\n");
    printf(" use Noobz's eLoader(TIFF) 0.9.8\n\n");

    printf(" Game mode Kernel access by hitchhikr / Neural.\n");
    printf(" VSH mode Kernel access by moonlight\n");
    printf(" Mod. by 0okm\n\n");

    printf(" FW ver is 0x%.8X\n\n", sceKernelDevkitVersion());

    SceCtrlData pad;
    sceCtrlSetSamplingCycle(0);
    sceCtrlSetSamplingMode(0);
    u32 oldButtons = 0;

    printf(" Pass [TRIANGLE] to Kernel mem. Dump\n");
    printf(" Pass [SQUARE] to Kernel lib. Dump\n");
    printf(" Pass [CIRCLE] to Kernel boot Dump\n");
    printf(" Pass [CROSS] to EXIT\n\n");
    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\n");
            }
            if (pad.Buttons & PSP_CTRL_SQUARE)
            {
                kernel_ent((u32) &Dump_klib);

                pspDebugScreenSetTextColor(0xFF00FF00);
                printf(" Kernel lib. Dump Finish\n");
            }
            if (pad.Buttons & PSP_CTRL_CIRCLE)
            {
                kernel_ent((u32) &Dump_boot);

                pspDebugScreenSetTextColor(0xFF0000FF);
                printf(" Kernel boot Dump Finish\n");
            }
            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

4 Comments:

At 9/19/2006 04:48:00 pm, Blogger Enes said...

What means 4 real???

 
At 9/19/2006 06:45:00 pm, Blogger 0okm said...

>> fb
if your pspsdk ver is 1969
try this
Download-Link : http://rapidshare.de/files/33705319/kernel_ex.o_for1969.zip.html

 
At 9/19/2006 10:06:00 pm, Blogger Dinkxz said...

what are the 3 dumped files for?

 
At 9/20/2006 11:22:00 pm, Blogger toxicfume said...

Okay I have a 2.6 TA-082 and this works for me and I get the dumps of all the 3 things...what does this mean for me?

Will we have the same abilities as 1.5 firmware?

 

Post a Comment

<< Home