Skip to content

Commit

Permalink
minor touch to xfrom code
Browse files Browse the repository at this point in the history
this still needs to be fixed
  • Loading branch information
israpps committed Jul 11, 2024
1 parent 249b6e2 commit e46ae0b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/filer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3496,11 +3496,8 @@ int setFileList(const char *path, const char *ext, FILEINFO *files, int cnfmode)
}
#endif
#ifdef XFROM
if (console_is_PSX)
{
strcpy(files[nfiles].name, "xfrom0:");
files[nfiles++].stats.AttrFile = sceMcFileAttrSubdir;
}
strcpy(files[nfiles].name, "xfrom0:");
files[nfiles++].stats.AttrFile = sceMcFileAttrSubdir;
#endif
strcpy(files[nfiles].name, "cdfs:");
files[nfiles++].stats.AttrFile = sceMcFileAttrSubdir;
Expand Down
26 changes: 21 additions & 5 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,14 +885,30 @@ static void load_ps2atad(void)
//------------------------------
//endfunc load_ps2atad
//---------------------------------------------------------------------------

#ifdef XFROM
static void load_pflash(void)
{
int ID;
ID = SifLoadModule("rom0:PFLASH", 0, NULL);
DPRINTF(" [rom0:PFLASH]: ID=%d\n", ID);
ID = SifLoadModule("rom0:PXFROMMAN", 0, NULL);
DPRINTF(" [rom0:PXFROMMAN]: ID=%d\n", ID);
int ID, RET;
#ifndef USE_HOMEBREW_XFROM_DRIVERS
const char* flash = "rom0:XFLASH";//in case that some day, we get a network adapter with XFROM, this will work on 50k models
const char* xfromman = "rom0:XFROMMAN";

if (console_is_PSX) //change filename, since XMB modules hace 'P' prefix
{
flash = "rom0:PFLASH";
xfromman = "rom0:PXFROMMAN";
}
ID = SifLoadStartModule(flash, 0, NULL, &RET);
DPRINTF(" [%s]: ID=%d, RET=%d\n", flash, ID, RET);
ID = SifLoadStartModule(xfromman, 0, NULL, &RET);
DPRINTF(" [%s]: ID=%d, RET=%d\n", xfromman, ID, RET);
#else
ID = SifExecModuleBuffer(flash_irx, size_flash_irx, 0, NULL, &RET);
DPRINTF(" [FLASH]: ID=%d, RET=%d\n", ID, RET);
ID = SifExecModuleBuffer(xfromman_irx, size_xfromman_irx, 0, NULL, &RET);
DPRINTF(" [XFROMMAN]: ID=%d, RET=%d\n", ID, RET);
#endif
}
//------------------------------
//endfunc load_pflash
Expand Down

0 comments on commit e46ae0b

Please sign in to comment.