sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
cdfs_iop.h
Go to the documentation of this file.
1
5#ifndef _CDFS_IOP_H
6#define _CDFS_IOP_H
7
8#define MODNAME "cdfs_driver"
9#ifdef DEBUG
10#define DPRINTF(args...) printf(MODNAME ": "args)
11#else
12#define DPRINTF(args...) do { } while(0)
13#endif
14
15#define CDFS_FILEPROPERTY_DIR 0x02
16
17struct TocEntry {
18 u32 fileLBA;
19 u32 fileSize;
20 u8 fileProperties;
21 unsigned char dateStamp[8];
22 char filename[128 + 1];
23 u8 padding[2]; // Padding to make the structure 4 byte aligned
24} __attribute__((packed));
25
26enum Cdvd_Changed_Index {
27 CHANGED_TOC = 0,
28 CHANGED_FIO = 1,
29 CHANGED_MAX
30};
31
32extern int cdfs_prepare(void);
33extern int cdfs_start(void);
34extern int cdfs_finish(void);
35extern int cdfs_findfile(const char *fname, struct TocEntry *tocEntry);
36extern int cdfs_readSect(u32 lsn, u32 sectors, u8 *buf);
37extern int cdfs_getDir(const char *pathname, struct TocEntry tocEntry[], unsigned int req_entries);
38extern int cdfs_checkDiskChanged(enum Cdvd_Changed_Index index);
39
40#endif // _CDFS_H