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