/[pcsx2_0.9.7]/trunk/pcsx2/CDVD/CdRom.h
ViewVC logotype

Contents of /trunk/pcsx2/CDVD/CdRom.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (10 years, 5 months ago) by william
File MIME type: text/plain
File size: 1865 byte(s)
committing r3113 initial commit again...
1 /* PCSX2 - PS2 Emulator for PCs
2 * Copyright (C) 2002-2010 PCSX2 Dev Team
3 *
4 * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5 * of the GNU Lesser General Public License as published by the Free Software Found-
6 * ation, either version 3 of the License, or (at your option) any later version.
7 *
8 * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * PURPOSE. See the GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License along with PCSX2.
13 * If not, see <http://www.gnu.org/licenses/>.
14 */
15
16 #ifndef __CDROM_H__
17 #define __CDROM_H__
18
19 #include "IopCommon.h"
20 #include "PS2Edefs.h"
21
22 // Not used.
23 typedef struct {
24 s32 y0, y1;
25 } ADPCM_Decode_t;
26
27 // Not used.
28 typedef struct {
29 s32 freq;
30 s32 nbits;
31 s32 stereo;
32 s32 nsamples;
33 ADPCM_Decode_t left, right;
34 s16 pcm[16384];
35 } xa_decode_t;
36
37 struct cdrStruct
38 {
39 u8 OCUP;
40 u8 Reg1Mode;
41 u8 Reg2;
42 u8 CmdProcess;
43 u8 Ctrl;
44 u8 Stat;
45
46 u8 StatP;
47
48 u8 Transfer[2352];
49 u8 *pTransfer;
50
51 u8 Prev[4];
52 u8 Param[8];
53 u8 Result[8];
54
55 u8 ParamC;
56 u8 ParamP;
57 u8 ResultC;
58 u8 ResultP;
59 u8 ResultReady;
60 u8 Cmd;
61 u8 Readed;
62 u32 Reading;
63
64 cdvdTN ResultTN;
65 u8 ResultTD[4];
66 u8 SetSector[4];
67 u8 SetSectorSeek[4];
68 u8 Track;
69 int Play;
70 int CurTrack;
71 int Mode, File, Channel, Muted;
72 int Reset;
73 int RErr;
74 int FirstSector;
75
76 xa_decode_t Xa;
77
78 int Init;
79
80 u8 Irq;
81 u32 eCycle;
82
83 char Unused[4087];
84 };
85
86 extern cdrStruct cdr;
87
88 void cdrReset();
89 void cdrInterrupt();
90 void cdrReadInterrupt();
91 u8 cdrRead0(void);
92 u8 cdrRead1(void);
93 u8 cdrRead2(void);
94 u8 cdrRead3(void);
95 void cdrWrite0(u8 rt);
96 void cdrWrite1(u8 rt);
97 void cdrWrite2(u8 rt);
98 void cdrWrite3(u8 rt);
99
100 #endif /* __CDROM_H__ */

  ViewVC Help
Powered by ViewVC 1.1.22