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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (10 years ago) by william
File MIME type: text/plain
File size: 5308 byte(s)
committing r3113 initial commit again...
1 /***************************************************************************
2 defines.h - description
3 -------------------
4 begin : Wed Sep 18 2002
5 copyright : (C) 2002 by Pete Bernert
6 email : BlackDove@addcom.de
7 ***************************************************************************/
8
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. See also the license.txt file for *
15 * additional informations. *
16 * *
17 ***************************************************************************/
18
19 //*************************************************************************//
20 // History of changes:
21 //
22 // 2002/09/19 - Pete
23 // - generic cleanup for the Peops release
24 //
25 //*************************************************************************//
26
27 /////////////////////////////////////////////////////////
28
29 // general buffer for reading several frames
30
31 #pragma pack(1)
32
33 typedef struct _FRAMEBUF
34 {
35 DWORD dwFrame;
36 DWORD dwFrameCnt;
37 DWORD dwBufLen;
38 unsigned char BufData[1024*1024];
39 } FRAMEBUF;
40
41 #pragma pack()
42
43 // raw ioctl structs:
44
45 typedef enum _TRACK_MODE_TYPE
46 {
47 YellowMode2,
48 XAForm2,
49 CDDA
50 } TRACK_MODE_TYPE, *PTRACK_MODE_TYPE;
51
52 typedef struct _RAW_READ_INFO
53 {
54 LARGE_INTEGER DiskOffset;
55 ULONG SectorCount;
56 TRACK_MODE_TYPE TrackMode;
57 } RAW_READ_INFO, *PRAW_READ_INFO;
58
59 // sub cache:
60
61 typedef struct
62 {
63 long addr;
64 void * pNext;
65 unsigned char subq[10];
66 } SUB_DATA;
67
68 typedef struct
69 {
70 long addr;
71 void * pNext;
72 } SUB_CACHE;
73
74 // ppf cache:
75
76 typedef struct
77 {
78 long addr;
79 void * pNext;
80 long pos;
81 long anz;
82 // memdata
83 } PPF_DATA;
84
85 typedef struct
86 {
87 long addr;
88 void * pNext;
89 } PPF_CACHE;
90
91 /////////////////////////////////////////////////////////
92
93 #define MODE_BE_1 1
94 #define MODE_BE_2 2
95 #define MODE_28_1 3
96 #define MODE_28_2 4
97 #define MODE_28_2048 5
98 #define MODE_28_2048_Ex 6
99
100 #define itob(i) ((i)/10*16 + (i)%10)
101 #define btoi(b) ((b)/16*10 + (b)%16)
102 #define itod(i) ((((i)/10)<<4) + ((i)%10))
103 #define dtoi(b) ((((b)>>4)&0xf)*10 + (((b)&0xf)%10))
104
105 /////////////////////////////////////////////////////////
106
107 void addr2time(unsigned long addr, unsigned char *time);
108 void addr2timeB(unsigned long addr, unsigned char *time);
109 unsigned long time2addr(unsigned char *time);
110 unsigned long time2addrB(unsigned char *time);
111 #ifdef _GCC
112 #define reOrder i386_reOrder
113 #endif
114 unsigned long reOrder(unsigned long value);
115
116 /////////////////////////////////////////////////////////
117 // debug helper
118
119 #ifndef _IN_CDR
120 #ifdef DBGOUT
121 void auxprintf (LPCTSTR pFormat, ...);
122 #endif
123 #endif
124
125 /////////////////////////////////////////////////////////
126
127 typedef DWORD (*READFUNC)(BOOL bWait,FRAMEBUF * f);
128 typedef DWORD (*DEINITFUNC)(void);
129 typedef BOOL (*READTRACKFUNC)(unsigned long addr);
130 typedef void (*GETPTRFUNC)(void);
131
132 /////////////////////////////////////////////////////////
133
134 #define WAITFOREVER 0xFFFFFFFF
135 #define WAITSUB 10000
136 #define FRAMEBUFEXTRA 12
137 #define CDSECTOR 2352
138 #define MAXCACHEBLOCK 26
139 #define MAXCDBUFFER (((MAXCACHEBLOCK+1)*(CDSECTOR+16))+240)
140
141 /////////////////////////////////////////////////////////
142
143 /* some structs from libcdvd by Hiryu & Sjeep (C) 2002 */
144
145 #pragma pack(1)
146
147 struct rootDirTocHeader
148 {
149 u16 length; //+00
150 u32 tocLBA; //+02
151 u32 tocLBA_bigend; //+06
152 u32 tocSize; //+0A
153 u32 tocSize_bigend; //+0E
154 u8 dateStamp[8]; //+12
155 u8 reserved[6]; //+1A
156 u8 reserved2; //+20
157 u8 reserved3; //+21
158 }; //+22
159
160 struct asciiDate
161 {
162 char year[4];
163 char month[2];
164 char day[2];
165 char hours[2];
166 char minutes[2];
167 char seconds[2];
168 char hundreths[2];
169 char terminator[1];
170 };
171
172 struct cdVolDesc
173 {
174 u8 filesystemType; // 0x01 = ISO9660, 0x02 = Joliet, 0xFF = NULL
175 u8 volID[5]; // "CD001"
176 u8 reserved2;
177 u8 reserved3;
178 u8 sysIdName[32];
179 u8 volName[32]; // The ISO9660 Volume Name
180 u8 reserved5[8];
181 u32 volSize; // Volume Size
182 u32 volSizeBig; // Volume Size Big-Endian
183 u8 reserved6[32];
184 u32 unknown1;
185 u32 unknown1_bigend;
186 u16 volDescSize; //+80
187 u16 volDescSize_bigend; //+82
188 u32 unknown3; //+84
189 u32 unknown3_bigend; //+88
190 u32 priDirTableLBA; // LBA of Primary Dir Table //+8C
191 u32 reserved7; //+90
192 u32 secDirTableLBA; // LBA of Secondary Dir Table //+94
193 u32 reserved8; //+98
194 struct rootDirTocHeader rootToc;
195 u8 volSetName[128];
196 u8 publisherName[128];
197 u8 preparerName[128];
198 u8 applicationName[128];
199 u8 copyrightFileName[37];
200 u8 abstractFileName[37];
201 u8 bibliographyFileName[37];
202 struct asciiDate creationDate;
203 struct asciiDate modificationDate;
204 struct asciiDate effectiveDate;
205 struct asciiDate expirationDate;
206 u8 reserved10;
207 u8 reserved11[1166];
208 };
209
210 #pragma pack()
211
212

  ViewVC Help
Powered by ViewVC 1.1.22