forked from ps2homebrew/wLaunchELF
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update
cdfs.irx
to support browsing FreeDVDBoot disc images (#72)
* use latest sdk `cdfs.irx` In hopes of fixing FreeDVDBoot support * use sce libcdvd only * fix makefile
- Loading branch information
Showing
10 changed files
with
124 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#ifndef __CDVD_COMPAT_MACRO | ||
#define __CDVD_COMPAT_MACRO | ||
|
||
#ifdef LIBCDVD_LEGACY | ||
#define CDVD_INIT() CDVD_Init() | ||
#define CDVD_STOP() CDVD_Stop() | ||
#define CDVD_DISKREADY(x) CDVD_DiskReady(x) | ||
#else | ||
#define CDVD_INIT() // does not exist on sdk libcdvd | ||
#define CDVD_STOP() sceCdStop() | ||
#define CDVD_DISKREADY(x) sceCdDiskReady(x) | ||
#endif | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#ifndef LIBCDVD_LEGACY | ||
#error LIBCDVD_LEGACY not defined, but legacy readCD() included | ||
#endif | ||
int readCD(const char *path, FILEINFO *info, int max) | ||
{ | ||
static struct TocEntry TocEntryList[MAX_ENTRY]; | ||
char dir[MAX_PATH]; | ||
int i, j, n; | ||
u64 wait_start; | ||
|
||
if (sceCdGetDiskType() <= SCECdUNKNOWN) { | ||
wait_start = Timer(); | ||
while ((Timer() < wait_start + 500) && !uLE_cdDiscValid()) { | ||
if (cdmode == SCECdNODISC) | ||
return 0; | ||
} | ||
if (cdmode == SCECdNODISC) | ||
return 0; | ||
if ((cdmode < SCECdPSCD) || (cdmode > SCECdPS2DVD)) { | ||
uLE_cdStop(); | ||
return 0; | ||
} | ||
} | ||
|
||
strcpy(dir, &path[5]); | ||
CDVD_FlushCache(); | ||
n = CDVD_GetDir(dir, NULL, CDVD_GET_FILES_AND_DIRS, TocEntryList, MAX_ENTRY, dir); | ||
|
||
for (i = j = 0; i < n; i++) { | ||
if (TocEntryList[i].fileProperties & 0x02 && | ||
(!strcmp(TocEntryList[i].filename, ".") || | ||
!strcmp(TocEntryList[i].filename, ".."))) | ||
continue; //Skip pseudopaths "." and ".." | ||
strcpy(info[j].name, TocEntryList[i].filename); | ||
clear_mcTable(&info[j].stats); | ||
if (TocEntryList[i].fileProperties & 0x02) { | ||
info[j].stats.AttrFile = MC_ATTR_norm_folder; | ||
} else { | ||
info[j].stats.AttrFile = MC_ATTR_norm_file; | ||
info[j].stats.FileSizeByte = TocEntryList[i].fileSize; | ||
info[j].stats.Reserve2 = 0; //Assuming a CD can't have a single 4GB file | ||
} | ||
j++; | ||
} | ||
|
||
size_valid = 1; | ||
|
||
return j; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters