/[pcsx2_0.9.7]/trunk/plugins/CDVDnull/CDVD.cpp
ViewVC logotype

Contents of /trunk/plugins/CDVDnull/CDVD.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (10 years, 10 months ago) by william
File size: 2373 byte(s)
committing r3113 initial commit again...
1 /* CDVDnull
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
17 #include <stdio.h>
18 #include "CDVD.h"
19
20 const char *LibName = "CDVDnull Driver";
21
22 const unsigned char version = PS2E_CDVD_VERSION;
23 const unsigned char revision = 0;
24 const unsigned char build = 6;
25
26 EXPORT_C_(char*) PS2EgetLibName()
27 {
28 return (char *)LibName;
29 }
30
31 EXPORT_C_(u32) PS2EgetLibType()
32 {
33 return PS2E_LT_CDVD;
34 }
35
36 EXPORT_C_(u32) CALLBACK PS2EgetLibVersion2(u32 type)
37 {
38 return (version << 16) | (revision << 8) | build;
39 }
40
41 #ifdef _WIN32
42 void SysMessage(const char *fmt, ...)
43 {
44 va_list list;
45 char tmp[512];
46
47 va_start(list, fmt);
48 vsprintf(tmp, fmt, list);
49 va_end(list);
50
51 MessageBox(GetActiveWindow(), tmp, "CDVDnull Msg", MB_SETFOREGROUND | MB_OK);
52 }
53 #endif
54
55 EXPORT_C_(s32) CDVDinit()
56 {
57 return 0;
58 }
59
60 EXPORT_C_(s32) CDVDopen(const char* pTitle)
61 {
62 return 0;
63 }
64
65 EXPORT_C_(void) CDVDclose()
66 {
67 }
68
69 EXPORT_C_(void) CDVDshutdown()
70 {
71 }
72
73 EXPORT_C_(s32) CDVDreadTrack(u32 lsn, int mode)
74 {
75 return -1;
76 }
77
78 // return can be NULL (for async modes)
79 EXPORT_C_(u8*) CDVDgetBuffer()
80 {
81 return NULL;
82 }
83
84 EXPORT_C_(s32) CDVDreadSubQ(u32 lsn, cdvdSubQ* subq)
85 {
86 return -1;
87 }
88
89 EXPORT_C_(s32) CDVDgetTN(cdvdTN *Buffer)
90 {
91 return -1;
92 }
93
94 EXPORT_C_(s32) CDVDgetTD(u8 Track, cdvdTD *Buffer)
95 {
96 return -1;
97 }
98
99 EXPORT_C_(s32) CDVDgetTOC(void* toc)
100 {
101 return -1;
102 }
103
104 EXPORT_C_(s32) CDVDgetDiskType()
105 {
106 return CDVD_TYPE_NODISC;
107 }
108
109 EXPORT_C_(s32) CDVDgetTrayStatus()
110 {
111 return CDVD_TRAY_CLOSE;
112 }
113
114 EXPORT_C_(s32) CDVDctrlTrayOpen()
115 {
116 return 0;
117 }
118
119 EXPORT_C_(s32) CDVDctrlTrayClose()
120 {
121 return 0;
122 }
123
124 EXPORT_C_(void) CDVDconfigure()
125 {
126 SysMessage("Nothing to Configure");
127 }
128
129 EXPORT_C_(void) CDVDabout()
130 {
131 SysMessage("%s %d.%d", LibName, revision, build);
132 }
133
134 EXPORT_C_(s32) CDVDtest()
135 {
136 return 0;
137 }

  ViewVC Help
Powered by ViewVC 1.1.22