Tryied with this:
Code: Select all
static char data[20];
char* GetBarraInf(void)
{
k1 = pspSdkSetK1(0);
strcpy(data, "Hello world!");
pspSdkSetK1(k1);
return data;
}
And it doesn't work, crash!
I've also tryied to make it a user prx but it crash!
Get the same exception:
Code: Select all
Exception - Address load/inst fetch
EPC - 0889A07C
Location - ra.text + 0009607C
Cause - 10000010
Status - 20008613
BadVAddr - 8002013A
zr:00000000 at:00000000 v0:8002013B v1:0889CB38
a0:8002013A a1:0BBBFE44 a2:00000073 a3:0BBBFE40
t0:00000068 t1:0000002B t2:00000020 t3:88065244
t4:A8028454 t5:00003E0C t6:000000FC t7:880161C8
s0:00000000 s1:FFFFFFFF s2:0BBBF63C s3:0BBBF600
s4:08930000 s5:08930000 s6:088ABA06 s7:08930000
t8:00000000 t9:00000000 k0:0BBBFF00 k1:00000000
gp:08939250 sp:0BBBF5D0 fp:8002013A ra:0889D7C4
just look at registers, some registers have kernel addresses when you are running a user code...
Sorry, doesn't know what mean the content of registers!
Never studied it! ( Have you a tuto about the content of this? )
So kernel address are 0x80000000 like, and user 0x40000000 like this, right?
replace 0x40000000 into 0x80000000 of course...
Sorry, but I've to change the a0 reg value?
EDIT:
nop, maybe I've understand!