Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
bdmstuff: ["EXFAT=0", "EXFAT=1", "EXFAT=1 MX4SIO=1"]
ds34: ["DS34=0", "DS34=1"]
mmce: ["MMCE=0", "MMCE=1"]
xfrom: ["XFROM=0", "XFROM=1"]
exclude:
- bdmstuff: "EXFAT=1 MX4SIO=1"
mmce: "MMCE=1"
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ endif
ifeq ($(XFROM),1)
HAS_XFROM = -XFROM
EE_CFLAGS += -DXFROM
EE_OBJS += xfromman_irx.o extflash_irx.o
endif

ifeq ($(DS34),1)
Expand Down
12 changes: 9 additions & 3 deletions embed.make
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@ $(EE_ASM_DIR)mx4sio_bd.s: iop/__precompiled/mx4sio_bd.irx | $(EE_ASM_DIR)

$(EE_ASM_DIR)mmceman_irx.s: iop/__precompiled/mmceman.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ mmceman_irx

$(EE_ASM_DIR)extflash_irx.s: iop/__precompiled/extflash.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ extflash_irx

$(EE_ASM_DIR)xfromman_irx.s: iop/__precompiled/xfromman.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ xfromman_irx

#---{ USB }---#

$(EE_ASM_DIR)usbd_irx.s: $(PS2SDK)/iop/irx/usbd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ usbd_irx

ifeq ($(EXFAT),1)
$(EE_ASM_DIR)bdm_irx.s:iop/__precompiled/bdm.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ bdm_irx
Expand Down Expand Up @@ -61,10 +67,10 @@ $(EE_ASM_DIR)ioptrap_irx.s: $(PS2SDK)/iop/irx/ioptrap.irx | $(EE_ASM_DIR)
$(EE_ASM_DIR)poweroff_irx.s: $(PS2SDK)/iop/irx/poweroff.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ poweroff_irx

$(EE_ASM_DIR)iomanx_irx.s: $(PS2SDK)/iop/irx/iomanX.irx | $(EE_ASM_DIR)
$(EE_ASM_DIR)iomanx_irx.s: iop/__precompiled/iomanX.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ iomanx_irx

$(EE_ASM_DIR)filexio_irx.s: $(PS2SDK)/iop/irx/fileXio.irx | $(EE_ASM_DIR)
$(EE_ASM_DIR)filexio_irx.s: iop/__precompiled/fileXio.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ filexio_irx

$(EE_ASM_DIR)ps2dev9_irx.s: $(PS2SDK)/iop/irx/ps2dev9.irx | $(EE_ASM_DIR)
Expand Down
Binary file added iop/__precompiled/extflash.irx
Binary file not shown.
Binary file added iop/__precompiled/fileXio.irx
Binary file not shown.
Binary file added iop/__precompiled/iomanX.irx
Binary file not shown.
Binary file added iop/__precompiled/xfromman.irx
Binary file not shown.
67 changes: 7 additions & 60 deletions src/filer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1236,60 +1236,7 @@ int readHDDDVRP(const char *path, FILEINFO *info, int max)
//endfunc readHDDDVRP
//--------------------------------------------------------------
#endif
#ifdef XFROM
int readXFROM(const char *path, FILEINFO *info, int max)
{
iox_dirent_t dirbuf;
char dir[MAX_PATH];
int i = 0, fd;
//volatile int j;

loadFlashModules();

strcpy(dir, path);
if ((fd = fileXioDopen(path)) < 0)
{
DPRINTF("ERROR: Cannot open path '%s'\n", path);
return 0;
}

while (fileXioDread(fd, &dirbuf) > 0) {
if (dirbuf.stat.mode & FIO_S_IFDIR &&
(!strcmp(dirbuf.name, ".") || !strcmp(dirbuf.name, "..")))
continue; //Skip pseudopaths "." and ".."

strcpy(info[i].name, dirbuf.name);
clear_mcTable(&info[i].stats);
if (dirbuf.stat.mode & FIO_S_IFDIR) {
info[i].stats.AttrFile = MC_ATTR_norm_folder;
} else if (dirbuf.stat.mode & FIO_S_IFREG) {
info[i].stats.AttrFile = MC_ATTR_norm_file;
info[i].stats.FileSizeByte = dirbuf.stat.size;
info[i].stats.Reserve2 = dirbuf.stat.hisize;
} else
{
DPRINTF("ERROR: Skipping entry wich is neither file or folder '%s'\n", path);
continue; //Skip entry which is neither a file nor a folder
}
strncpy((char *)info[i].stats.EntryName, info[i].name, 32);
memcpy((void *)&info[i].stats._Create, dirbuf.stat.ctime, 8);
memcpy((void *)&info[i].stats._Modify, dirbuf.stat.mtime, 8);
i++;
if (i == max)
break;
}

fileXioDclose(fd);

size_valid = 1;
time_valid = 1;

return i;
}
#endif
//------------------------------
//endfunc readXFROM
//--------------------------------------------------------------
#ifndef USBMASS_IOCTL_GET_DRIVERNAME
#define USBMASS_IOCTL_GET_DRIVERNAME 0x0003
#endif
Expand Down Expand Up @@ -1551,8 +1498,11 @@ int getDir(const char *path, FILEINFO *info)
n = readGENERIC(path, info, max);
#endif
#ifdef XFROM
else if (!strncmp(path, "xfrom", 5))
n = readXFROM(path, info, max);
else if (!strncmp(path, "xfrom", 5)) {

loadFlashModules();
n = readGENERIC(path, info, max);
}
#endif
else if (!strncmp(path, "vmc", 3))
n = readVMC(path, info, max);
Expand Down Expand Up @@ -3539,11 +3489,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
12 changes: 7 additions & 5 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,13 +904,15 @@ static void load_ps2atad(void)
//endfunc load_ps2atad
//---------------------------------------------------------------------------
#ifdef XFROM
IMPORT_BIN2C(extflash_irx);
IMPORT_BIN2C(xfromman_irx);
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;
ID = SifExecModuleBuffer(extflash_irx, size_extflash_irx, NULL, 0, &ret);
DPRINTF(" [PFLASH]: ID=%d, ret=%d\n", ID, ret);
ID = SifExecModuleBuffer(xfromman_irx, size_xfromman_irx, NULL, 0, &ret);
DPRINTF(" [XFROMMAN]: ID=%d, ret=%d\n", ID, ret);
}
//------------------------------
//endfunc load_pflash
Expand Down