/[pcsx2_0.9.7]/trunk/plugins/CDVDpeops/libiso.h
ViewVC logotype

Contents of /trunk/plugins/CDVDpeops/libiso.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 11 months ago) by william
File MIME type: text/plain
File size: 1405 byte(s)
committing r3113 initial commit again...
1 #ifndef __LIBISO_H__
2 #define __LIBISO_H__
3
4 #ifdef __MSCW32__
5 #pragma warning(disable:4018)
6 #endif
7
8 #define CDVDdefs
9 #include "PS2Etypes.h"
10 #include "PS2Edefs.h"
11
12 #define ISOTYPE_ILLEGAL 0
13 #define ISOTYPE_CD 1
14 #define ISOTYPE_DVD 2
15 #define ISOTYPE_AUDIO 3
16
17 #define ISOFLAGS_Z 0x1
18 #define ISOFLAGS_Z2 0x2
19 #define ISOFLAGS_BLOCKDUMP 0x4
20
21 #define CD_FRAMESIZE_RAW 2352
22 #define DATA_SIZE (CD_FRAMESIZE_RAW-12)
23
24 #define itob(i) ((i)/10*16 + (i)%10) /* u_char to BCD */
25 #define btoi(b) ((b)/16*10 + (b)%16) /* BCD to u_char */
26
27 typedef struct {
28 char filename[256];
29 u32 type;
30 u32 flags;
31 u32 offset;
32 u32 blockofs;
33 u32 blocksize;
34 u32 blocks;
35 void *handle;
36 void *htable;
37 char *Ztable;
38 u32 *dtable;
39 int dtablesize;
40 char buffer[CD_FRAMESIZE_RAW * 10];
41 } isoFile;
42
43
44 isoFile *isoOpen(const char *filename);
45 isoFile *isoCreate(const char *filename, int mode);
46 int isoSetFormat(isoFile *iso, int blockofs, int blocksize, int blocks);
47 int isoDetect(isoFile *iso);
48 int isoReadBlock(isoFile *iso, char *dst, int lsn);
49 int isoWriteBlock(isoFile *iso, char *src, int lsn);
50 void isoClose(isoFile *iso);
51
52 void *_openfile(const char *filename, int flags);
53 u64 _tellfile(void *handle);
54 int _seekfile(void *handle, u64 offset, int whence);
55 int _readfile(void *handle, void *dst, int size);
56 int _writefile(void *handle, void *src, int size);
57 void _closefile(void *handle);
58
59 #endif /* __LIBISO_H__ */

  ViewVC Help
Powered by ViewVC 1.1.22