Installing exception handler
Installing exception handler
I've tried but can't get it work...
Tried the sample coming with the PSPSDK, tranformed it into a kernel mode PRX and used it as a plugin. It kind of worked as the regdump appeared. Back to VSH I ran a homebrew with an exception (using _sw(0,0)). Nothing, PSP just froze and shut down.
I've used an EBOOT that loads a kernel mode PRX that also uses pspDebugInstallErrorHandler, then generate an exception from the EBOOT. Just freezes and reboots.
Tried generating the exception from the PRX... Same thing...
Can somebody explain me what I'm doing wrong here?
Tried the sample coming with the PSPSDK, tranformed it into a kernel mode PRX and used it as a plugin. It kind of worked as the regdump appeared. Back to VSH I ran a homebrew with an exception (using _sw(0,0)). Nothing, PSP just froze and shut down.
I've used an EBOOT that loads a kernel mode PRX that also uses pspDebugInstallErrorHandler, then generate an exception from the EBOOT. Just freezes and reboots.
Tried generating the exception from the PRX... Same thing...
Can somebody explain me what I'm doing wrong here?
The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
The exception handler in the sdk is abit old now, it doesn't really work in most scenarios, it only worked before because of the fact that kernel ELFs were loaded into user memory regions.
You should use psplink unless you have a good reason not to, otherwise you might need to use psplink's exception code instead and use that in a kernel prx.
You should use psplink unless you have a good reason not to, otherwise you might need to use psplink's exception code instead and use that in a kernel prx.
Thanks for the replies, guys.
@Tyranid: I've tried using psplink ([offtopic]the best homebrew ever in my opinion, with prxtool; excellent job, man[/offtopic]) several times, both in Linux (Ubuntu 9.04) and Windows (XP Pro SP2), with the same result: errors xD
I got a ta88v3 with CFW Enabler, and that's how I proceed:
I run usbhostfs_pc y pspsh in different terminals
$ ./usbhostfs_pc
$ ./pspsh
Shows in usbhostfs_pc terminal:
I run PSPLink 3.0 OE on PSP, with USB cable plugged in, and it runs. But when gameboot fades, below the psplink bootstrap message I get:
and back to XMB with "The game could not be started (8002014E)".
Seems like a module in the plugins is corrupted... :P
@J.F: thanks I think I saw it before. Isn't it the thread that Tyranid replies saying to better use pspDebugInstallErrorHandler?
@Tyranid: I've tried using psplink ([offtopic]the best homebrew ever in my opinion, with prxtool; excellent job, man[/offtopic]) several times, both in Linux (Ubuntu 9.04) and Windows (XP Pro SP2), with the same result: errors xD
I got a ta88v3 with CFW Enabler, and that's how I proceed:
I run usbhostfs_pc y pspsh in different terminals
$ ./usbhostfs_pc
Code: Select all
USBHostFS (c) TyRaNiD 2k6
Built Jul 4 2009 02:25:47 - $Revision: 2368 $
Connected to device
Shows in usbhostfs_pc terminal:
Code: Select all
Accepting async connection (0) from 127.0.0.1
Accepting async connection (2) from 127.0.0.1
Accepting async connection (3) from 127.0.0.1
Code: Select all
Error 8002013B starting module
Seems like a module in the plugins is corrupted... :P
@J.F: thanks I think I saw it before. Isn't it the thread that Tyranid replies saying to better use pspDebugInstallErrorHandler?
The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
Odd that, never seen that before. You aren't already running the psplink prx as a plugin or something strange are you as that error code kind of implies the library is already there.
Then again I have never tried it with CF Enabler, people have said they have had psplinkusb running on a PSP-3000 before now so I guess it might work, maybe.
Then again I have never tried it with CF Enabler, people have said they have had psplinkusb running on a PSP-3000 before now so I guess it might work, maybe.
I mean this: http://forums.ps2dev.org/viewtopic.php?t=9591
That thread links to the post where crazyc first posted the exception prx that people like DX64 are using. It also has the prx and related files in a rar as well.
That thread links to the post where crazyc first posted the exception prx that people like DX64 are using. It also has the prx and related files in a rar as well.
@TyRaNiD: I'm running both prxes as plugins; that's what CFE says anyway. The library is already there? How could that be? :P
And yeah, people use psplink on 3K, I know a few. But man, I can't... :P
@J.F.: yeah, just the post I told you about. I downloaded and tried the exception.prx file, but no way, same behaviour :( Tried as plugin, and as a kernel module loaded by an EBOOT. Here's the code I'm using (maybe I'm missing something here...):
And yeah, people use psplink on 3K, I know a few. But man, I can't... :P
@J.F.: yeah, just the post I told you about. I downloaded and tried the exception.prx file, but no way, same behaviour :( Tried as plugin, and as a kernel module loaded by an EBOOT. Here's the code I'm using (maybe I'm missing something here...):
Code: Select all
#include <pspsdk.h>
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#define PRX_PATH "excephandler.prx"
PSP_MODULE_INFO("ExcepTrigger",0,0,1);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
/* The exception xD */
int exception()
{
_sw(0,0);
}
/* Loop until a key is pressed */
void wait_for_key_press(int button)
{
SceCtrlData pad;
do
{
sceCtrlReadBufferPositive(&pad,1);
}
while(!(pad.Buttons & button));
}
int main(int argc, char *argv[])
{
SceUID modid;
pspDebugScreenInit();
modid = sceKernelLoadModule(PRX_PATH, 0, NULL);
if (modid <= 0)
pspDebugScreenPrintf("No se pudo cargar el modulo\n");
else
{
pspDebugScreenPrintf("Arrancando manejador de excepciones...\n");
sceKernelStartModule(modid, 0, NULL, NULL, NULL);
}
sceKernelDelayThread(1000000);
pspDebugScreenPrintf("Cargado con exito. ");
pspDebugScreenPrintf("Pulsa X para ejecutar la excepcion\n");
wait_for_key_press(PSP_CTRL_CROSS);
exception();
/* No llegamos a ejecutar esto */
sceKernelExitGame();
return 0;
}
The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
Ok then it should load in kernel mode. I've tried other kernel modules (such as a kernel memory dumper) and they worked just fine...
I don't know what the hell is going on here... But I'm getting a hackable PSP this same week xD
And also, how would I recompile PSPLink? Can't find the sources for the plugins.
I don't know what the hell is going on here... But I'm getting a hackable PSP this same week xD
And also, how would I recompile PSPLink? Can't find the sources for the plugins.
The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
I've finally managed to make my own exception hanlder, but it lacks some functionality I would be happy someone enlightens me about it.
I used the pspsdk exception sample and transformed it into a PRX, then used it as a game plugin with CFW Enabler. But the problem is that when a load an EBOOT with an exception trigger such as _sw(0,0) or asm("break"), the PSP keeps freezing, just like the plugin wasn't loaded or something. But when the exception is called inside the plugin, the exception handler is called perfectly.
So how can this be? :P
Thanks again!
I used the pspsdk exception sample and transformed it into a PRX, then used it as a game plugin with CFW Enabler. But the problem is that when a load an EBOOT with an exception trigger such as _sw(0,0) or asm("break"), the PSP keeps freezing, just like the plugin wasn't loaded or something. But when the exception is called inside the plugin, the exception handler is called perfectly.
So how can this be? :P
Thanks again!
The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
Well I don't have such problem, I use pspDebugScreenPrintf() (which is user mode, right?) and it works perfectly.JF wrote:It's a huge pain to do things like printing at the exception level
But my question is why the exception, when triggered inside the PRX, is caught by the exception handler, but when triggered outside it (even if the exception handler PRX is loaded) it is not.
The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.