static void getsonginfo(char *fn, char **title, int *length) { PSFINFO *tmp; if((tmp=sexy_getpsfinfo(fn))) { *length=tmp->length; *title=MakeTitle(tmp); sexy_freepsfinfo(tmp); } }
int sexy_reload() { PSFINFO *ret; if( psxInit() < 0 ) return -1; psxReset(); sexySPUinit(); sexySPUopen(); if(!(ret=LoadPSF(save_path,0,0,save_pathDir))) { psxShutdown(); return -2; } // Taken from aosdk's eng_psf.c file ... // patch illegal Chocobo Dungeon 2 code - CaitSith2 put a jump in the delay slot from a BNE // and rely on Highly Experimental's buggy-ass CPU to rescue them. Verified on real hardware // that the initial code is wrong. if (ret->game) { if (!strcmp(ret->game, "Chocobo Dungeon 2")) { if (psxMu32(0xbc090) == (0x0802f040)) { psxMemWrite32(0xbc090, 0); psxMemWrite32(0xbc094, 0x0802f040); psxMemWrite32(0xbc098, 0); } } } if(ret->stop==~0) { ret->fade=10000; // Infinity ? limit to 3 minutes ret->stop=170000; } sexysetlength(ret->stop,ret->fade); ret->length=ret->stop+ret->fade; sexy_freepsfinfo(ret); return 0; }