yifanlu / taiHEN

CFW framework for PS Vita
MIT License
310 stars 46 forks source link

Crash Cart #41

Open Rezasdemon opened 8 years ago

Rezasdemon commented 8 years ago

All games are loaded from cartridges which might be my problem as it works perfect on all dumps I've tried. I used _start for eboot.bin vitamin / maidump calls but while testing i renamed the ux0:/plugins/game.txt -> ux0:/plugins/game.txtbak so any dump game tests were not interfering

GRAVITYRUSH (US)

*PCSA00011 ux0:tai/REZAPEEK.skprx #crashed ux0:plugins/REZAPEEK.suprx #crashed

FREEDOMWARS (US)

*PCSA00147 ux0:tai/REZAPEEK.skprx #crashed ux0:plugins/REZAPEEK.suprx #crashed

LBP (US)

*PCSA00017 ux0:tai/REZAPEEK.skprx #success ux0:plugins/REZAPEEK.suprx #success

When I tested the following code and replaced my plugin rezapeek with this test dummy build the folder was not created in any case and all games crashed again except lbp. Lbp did not successfully call the sceiomkdir but it did not crash either. when I loaded my plugin into lbp it was successful and loaded the bliter menu and handled my menu variables nicely, but it still did not create the directories my plugin tried to make. are these functions deprecated ? am i not building the skprx correctly ? I made a skprx file but its just a suprx file renamed to skprx.

#include <psp2/kernel/modulemgr.h>
#include <psp2/kernel/processmgr.h>
#include <psp2/io/stat.h>

#include <taihen.h>

int main_thread(SceSize args, void *argp) {

    //sceKernelDelayThread(5 * 1000 * 1000);
    sceIoMkdir("ux0:/data/plugtest", 0777);

    return 0;
}

//vitamin / maidump entry
int _start(SceSize args,const void *argp) {
    SceUID thid = sceKernelCreateThread("REZAPEEK", main_thread, 0x40, 0x600000, 0, 0, NULL);
    if (thid >= 0)
        sceKernelStartThread(thid, 0, NULL);
    return 0;
}

// taihen entry
int module_start(SceSize argc, const void *args) {
    //sceKernelExitProcess(0);
    _start(argc,args);
    return 0;
}

int module_stop(SceSize argc, const void *args) {
  return SCE_KERNEL_STOP_SUCCESS;
}
Rezasdemon commented 8 years ago

42 might be semi-related because I noticed because my carts are not updated except the lbp

so I noticed I only have one folder in patches "pcsa00017" the only game I cared to play online. ux0:/patch/pcsa00017/eboot.bin is being launched instead of the gro0:/pathtogamecart/eboot.bin but for my other games it doesnt have patches so only lbp loads from the patch files and since this occurs the other games automatically shut down wifi since i didnt update them creating the patch folder for them so they launch from the cart causing the crash since wifi gets disabled on start with a message saying online features might be limited by this game so its possible the wifi is being turned off causing the crash, funny thing is when i wrote this issue i thought it had something to do with the fact my lbp is patched, maybe if i turn wifi off first from ps button ? or maybe if i goto go.henkaku.xyz and then install updates for all my game carts then go back to beta and try again but ima go test that now.

Rezasdemon commented 8 years ago

So two bugs in my post I think are:

  1. Wifi off crash 2.Cant update cart when loaded taihen
  2. sceiomkdir("ux0:/data/plugintest", 0777 ); doesn't execute successfully ?

my plugin does

sceiomkdir(); while(cont) { if pressed select + start show menu; } the menu works so the sceiomkdir must have been passed and at least returned from the function to continue to the menu.

when used maidump/vitamin games and the exact same file i use for taihen as i added _start and _modulestart for support of both but as i load the plugin from their eboot patch in games.txt it is successfull and all commands are executed same plugin. is this a possible permissions error ? do i need any special things for a skprx ?