ReadUMD Sample for UMDeM4eLoaderGTA Released
with "UMD Emulator for FW2.60 w/ eLoader(GTA)"
you can Open and Read file inside ISO :)
main.c
/*
* ReadUMD Sample for UMDeM4eLoaderGTA v0.03 by 0okm
* Thanks moonlight, Humma Kavula, hitchhikr, Ditlew, Fanjita and PSPDEV
*/
#include <pspkernel.h>
#include <pspdisplay.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <pspumd.h>
#include <string.h>
PSP_MODULE_INFO("ReadUMD", 0, 1, 1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER);
int main(int argc, char* argv[])
{
sceUmdActivate(1, "disc0:");
sceUmdWaitDriveStat(UMD_WAITFORINIT);
SceUID fd1;
SceUID fd2;
int readSize;
char filebuf[0x8000];
pspDebugScreenInit();
pspDebugScreenPrintf("ReadUMD Sample for UMDeM4eLoaderGTA v0.03 by 0okm\n");
pspDebugScreenPrintf("Thanks moonlight, Humma Kavula, hitchhikr, Ditlew, Fanjita and PSPDEV\n");
pspDebugScreenPrintf("\n");
pspDebugScreenPrintf(" press [TRIANGLE] - Copy disc0:/UMD_DATA.BIN to ms0:/UMD_DATA.BIN\n");
pspDebugScreenPrintf(" press [SQUARE] - Copy disc0:/PSP_GAME/ICON0.PNG to ms0:/ICON0.PNG\n");
pspDebugScreenPrintf(" press [CIRCLE] - Copy disc0:/PSP_GAME/PARAM.SFO to ms0:/PARAM.SFO\n");
pspDebugScreenPrintf(" press [CROSS] to EXIT\n\n");
SceCtrlData pad;
sceCtrlSetSamplingCycle(0);
sceCtrlSetSamplingMode(0);
while (1)
{
sceCtrlReadBufferPositive(&pad, 1);
if (pad.Buttons & PSP_CTRL_TRIANGLE)
{
fd1 = sceIoOpen("disc0:/UMD_DATA.BIN", PSP_O_RDONLY, 0777);
fd2 = sceIoOpen("ms0:/UMD_DATA.BIN", PSP_O_WRONLY | PSP_O_CREAT | PSP_O_TRUNC, 0777);
while ((readSize = sceIoRead(fd1, filebuf, 0x08000)) > 0)
{
sceIoWrite(fd2, filebuf, readSize);
}
sceIoClose(fd2);
sceIoClose(fd1);
}
if (pad.Buttons & PSP_CTRL_SQUARE)
{
fd1 = sceIoOpen("disc0:/PSP_GAME/ICON0.PNG", PSP_O_RDONLY, 0777);
fd2 = sceIoOpen("ms0:/ICON0.PNG", PSP_O_WRONLY | PSP_O_CREAT | PSP_O_TRUNC, 0777);
while ((readSize = sceIoRead(fd1, filebuf, 0x08000)) > 0)
{
sceIoWrite(fd2, filebuf, readSize);
}
sceIoClose(fd2);
sceIoClose(fd1);
}
if (pad.Buttons & PSP_CTRL_CIRCLE)
{
fd1 = sceIoOpen("disc0:/PSP_GAME/PARAM.SFO", PSP_O_RDONLY, 0777);
fd2 = sceIoOpen("ms0:/PARAM.SFO", PSP_O_WRONLY | PSP_O_CREAT | PSP_O_TRUNC, 0777);
while ((readSize = sceIoRead(fd1, filebuf, 0x08000)) > 0)
{
sceIoWrite(fd2, filebuf, readSize);
}
sceIoClose(fd2);
sceIoClose(fd1);
}
if (pad.Buttons & PSP_CTRL_CROSS)
{
sceKernelExitGame();
}
sceKernelDelayThread(200*1000);
}
return 0;
}
Makefile
TARGET = ReadUMD
OBJS = main.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
LIBS = -lpspumd
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = ReadUMD Sample
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
2 Comments:
Hi I own a V2.6 TA-082 psp
I dun own GTA yet but am planning on bidding for a UK GTA LCS ULES 00151# unpatched version.
Will I continue to need the GTA after I apply the eloader once?
I'm a newbie please don't flame me.
Good thing I won the GTA LCS ULES-00151# unpatched psp game then.
Hey sure sucks to be in a country where the game is banned and whatever stocks the shops bring in happen to be patched versions.
Er about the QJ link I didn't really understand the coding so I didn't know what was going on with all the flaming about piracy comments.
I just want to be able to stream videos to my psp with this via the homebrew PSPPIMP iso once this UMD Emulator gets updated in later versions.
Post a Comment
<< Home