I'd hook the function that loads the gameboot and replace it with a function that loads a dummy gameboot (0 bytes)
Printable View
I'd hook the function that loads the gameboot and replace it with a function that loads a dummy gameboot (0 bytes)
Don't want to be insistent mcuh, but can somebody help me with my problem on the previous page?
http://forums.qj.net/showthread.php?...=1#post2141464
Link to the post.
sendspace.com, just print out the results i'll give u the results from my 2 phats
Fix It PSP = http://www.sendspace.com/file/9gu8vg
Still in early stages :-)
!~SlasheR~!
Or patch the fileIoOpen function and check if it loads gameboot.pmf, like this:
Look at hellcats wallpaper changer source for patching functions.Code:patchedFileIoOpen(char[500] fileName) {
char[500] file;
if(fileName == "flash0:/resources/bla/bla/gameboot.pmf") {
file = "ms0:/gameboot.pmf";
originalFileIoOpen(file);
} else {
originalFileIoOpen(fileName);
}
}
Currently playing around with .mp3 loading/playing using pspmp3.h. Most of my .mp3's play fine however sceMp3Decode returns 0x80671103 when playing some. Anyone know of the cause of this?
i dont know, try to look in the sdk docs to see if its listed there :)
-=Double Post Merge =-
is there a function to get the tachyon, pommel and the rest of the things??
the guys at ps2dev.org = :Argh:
!~SlasheR~!
slasher, i keep getting an error saying that it can't find the idstorage.prx, u seem to want it on the ms so i pulled it out of flash and placed it where your program said to place it, but it still wouldn't load
srry need to fix that
place fixitpsp.prx in ms0:/seplugins/
then it will work,
thx for testing it =)
!~SlasheR~!
i did do that, and it wasn't asking for fixitpsp.prx, but for idstorage.prx to be in ms0:/seplugins/, even after placing idstorage.prx in their it still failed
I'm begining to get a tad annoyed at some code I've written, I'm trying to compile a prx but it fails with an error which doesn't make sense:
Code:int module_start(SceSize args, void *argp)
{
...
return 0;
}
int module_stop(void)
{
return 0;
}
Code:# Define the exports for the prx
PSP_BEGIN_EXPORTS
# These four lines are mandatory (although you can add other functions like module_stop)
# syslib is a psynonym for the single mandatory export.
PSP_EXPORT_START(syslib, 0, 0x8000)
PSP_EXPORT_FUNC_HASH(module_start)
PSP_EXPORT_VAR_HASH(module_info)
PSP_EXPORT_END
PSP_EXPORT_START(flashPatch, 0, 0x0)
PSP_EXPORT_END
PSP_END_EXPORTS
The error is:Code:TARGET = patch
OBJS = main.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
BUILD_PRX = 1
PRX_EXPORTS = exports.exp
USE_KERNEL_LIBC=0
USE_KERNEL_LIBS=0
LIBDIR =
LDFLAGS = -mno-crt0 -nostartfiles
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
I've had this before, but whats really strange is I copied the exports, makefile and removed the functions from a compiling prx to test, I got the same error, yet I can compile prxs fine without that error in other cases. Is there something simple I'm missing?Zitat:
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/bin/ld: warning: cannot find
entry symbol module_start; defaulting to 0000000000000000
exports.o:(.rodata.sceRes ident+0x8): undefined reference to `module_start'
collect2: ld returned 1 exit status
-Aura
@slicer i know it asks for idstorage.prx but you have to place fixitpsp.prx ~NOT~ idstorage, if it still doesnt work it cant load it for some reason
!~SlasheR~!
i know, i've done both in that folder, but it won't load, sorry, your probably going to need to borrow your friend's phat and see if this well even work for phats(don't see why not, but you never know)
yep ok =),
ive been playing around a bit and found this peice of code compiles but...
nothing gets shown on screen at runtime
plz help :tup:Code:// Hello World - My First App for the PSP
/*
This program was created by (Your Name Here) on (Date Here)
It is a simple "Hello World" Application.
*/
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#define printf pspDebugScreenPrintf
#define settextcolor pspDebugScreenSetTextColor
#define setbackcolor pspDebugScreenSetBackColor
#define clearscreen pspDebugScreenClear
PSP_MODULE_INFO("Scroller", 0, 1, 5);
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
sceKernelExitGame();
return 0;
}
/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
int cbid;
cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
sceKernelRegisterExitCallback(cbid);
sceKernelSleepThreadCB();
return 0;
}
/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
int thid = 0;
thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
if(thid >= 0) {
sceKernelStartThread(thid, 0, 0);
}
return thid;
}
void fixtext(int at)
{
pspDebugScreenClear();
if(at==1)
{
settextcolor(0x00FF0000);
printf("1\n");
settextcolor(0x000000FF);
printf("2\n3");
} else if(at==2)
{
settextcolor(0x000000FF);
printf("1\n");
settextcolor(0x00FF0000);
printf("2\n");
settextcolor(0x000000FF);
printf("3");
} else if (at==3)
{
settextcolor(0x000000FF);
printf("1\n2\n");
settextcolor(0x00FF0000);
printf("3");
}
}
int main() {
pspDebugScreenInit();
SetupCallbacks();
SceCtrlData pad;
int at = 1;
sceCtrlReadBufferPositive(&pad, 1);
pspDebugScreenSetTextColor(0x00FF0000);
while(1)
{
if(pad.Buttons & PSP_CTRL_UP) {
at += 1;
fixtext(at);
}
if(pad.Buttons & PSP_CTRL_DOWN) {
at -= 1;
fixtext(at);
}
}
sceKernelSleepThread();
return 0;
}
!~SlasheR~!
No delays, you're running through that loop probably 200 times before you remove your finger, thus thats + or - 200. You have no delay/checks to allow you to stop pressing the button, nor do you have any limits (I.E. at = 4 which isn't supported).
-Aura
EDIT:
Also, your method is going to get you seriously bogged down with code if you add lots of possibilities, something like this would be preferable:
notice how the code would be significantly smaller? It makes stuff like this easier to search through, because believe me, when you have files with over 5000 lines of code seeing a function like yours becomes annoying :pCode:void fixtext(int at)
{
for(int loop = AT_MIN; loop < AT_MAX; loop++)
{
if(loop == at)
{
settextcolor(0x00FF0000);
}
else
{
settextcolor(0x000000FF);
}
printf("%i"\n, loop);
/*
or if you are using non-integer values as options
use if statements or switches (although I dislike switches as
people commonly forget the break and mess up their code)
if(loop == 1)
{
printf("option 1\n");
}
if(loop == 2)
{
printf("option 2\n");
}
*/
}
}
-Aura
thanks and how would i fix it?
and as for your prob
Code:PSP_EXPORT_START(flashPatch, 0, 0x0)
PSP_EXPORT_FUNC(something_HERE)
PSP_EXPORT_END
Check my post for some shortening code bits...
Search on here for lastpad methods, or you could use sceKernelDelayThread(int delay); although that method still leaves chance for an exceptionally slooooooow person to still hit the button.
My question was about a function defined already, its asking for module_start which is define in both the source and the exports already. Re-read the post to see my problem.
-Aura
yea but then how would i accept input? :Cry:
As I said, search the forums for the lastpad method, it covers everything you need here.
-Aura
When I call sceMp3InitResource()
it returns error: 0x8002013A
how can I fix that? what's the problem?
Check the SDK documentation, its on there what the problem is:
SCE_KERNEL_ERROR_LIBRARY_ NOT_YET_LINKED = 0x8002013a
You've not loaded the module needed to access the function.
-Aura
Code:sceUtilityLoadModule(PSP_MODULE_AV_AVCODEC);
sceUtilityLoadModule(PSP_MODULE_AV_MP3);
ive been looking at lua lately,
where EXACTLY is the IDStorage held in?
i know its in the nand "SomeWhere" but i dont know where?
and exact answer would be much apprechiated!
:tup:
~!SlasheR~!
Ok, I'm looking for somebody who can help me over MSN with patching functions.
So, if I have questions I can ask.
What firmware are you trying to run this on?
5.00 M33
I'm using dark alex sdk for his custom firmware
Code:sceKernelLoadModuleByID(PSP_MODULE_AV_AVCODEC , 0 , NULL);
and
sceKernelLoadModule("flash0:/kd/avcode.prx" , 0 , NULL);
return both the error code 0x80020149 , module manager is bussy
Can someone help me? I follow Tutorial 4 of PSP-Programming; image processing,
and when I compile the code it compiles with no errors, but if I want to
start the eboot on my PSP my screen stays black and my PSP crashes.
I deleted the code a while ago so i don't have it on my computer but does
somebody know where to find another sample or a tutorial about loading
a background?
look into oslib, or tri engine, or learn the pspgu, the tutorial's on psp-programming that your referring to are fairly out of date, and the reason why it isn't working, i'd suggest would be because it didn't contain:
PSP_HEAP_SIZE_KB(20480);
however from what i understand an fully updated toolchain would be:
PSP_HEAP_SIZE_KB(-1024);
slicer is correct. Those tutorials are both old and designed for compiling elfs which have access to all the memory (check online there a good description of the difference between elfs and prxs memory allocation). When that guide was written people were still developing 1.50 applications and thus used elfs in their pbps, you can't load elfs on 2.00+ firmwares correctly, so prxs are used, but the default allocation to a prx is 32kb I believe.
-Aura
where abouts is the idstorage kept in the nand??
~!SlasheR~!
If you still get the errors you're doing something weird that you're not telling us about.Code:sceUtilityLoadModule(PSP_MODULE_AV_AVCODEC);
sceUtilityLoadModule(PSP_MODULE_AV_MP3);
i know about the sample my question is not "how can i use the idstorage?"
its "WHERE is the idstorage kept?"
~!SlasheR~!