pcsx2/plugins/CDVDnull/CDVD.cpp

149 lines
2.3 KiB
C++
Raw Normal View History

/* CDVDnull
* Copyright (C) 2002-2010 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdio.h>
#include "CDVD.h"
#include "svnrev.h"
#ifdef _MSC_VER
#define snprintf sprintf_s
#endif
static char libraryName[256];
const unsigned char version = PS2E_CDVD_VERSION;
const unsigned char revision = 0;
const unsigned char build = 6;
EXPORT_C_(char *)
2016-08-24 21:18:08 +00:00
PS2EgetLibName()
{
2016-08-24 21:18:08 +00:00
snprintf(libraryName, 255, "CDVDnull Driver %lld%s", SVN_REV, SVN_MODS ? "m" : "");
return libraryName;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(u32)
PS2EgetLibType()
{
2016-08-24 21:18:08 +00:00
return PS2E_LT_CDVD;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(u32)
CALLBACK PS2EgetLibVersion2(u32 type)
{
2016-08-24 21:18:08 +00:00
return (version << 16) | (revision << 8) | build;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDinit()
{
2016-08-24 21:18:08 +00:00
return 0;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDopen(const char *pTitle)
{
2016-08-24 21:18:08 +00:00
return 0;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(void)
CDVDclose()
{
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(void)
CDVDshutdown()
{
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDreadTrack(u32 lsn, int mode)
{
2016-08-24 21:18:08 +00:00
return -1;
}
// return can be NULL (for async modes)
EXPORT_C_(u8 *)
2016-08-24 21:18:08 +00:00
CDVDgetBuffer()
{
2016-08-24 21:18:08 +00:00
return NULL;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDreadSubQ(u32 lsn, cdvdSubQ *subq)
{
2016-08-24 21:18:08 +00:00
return -1;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDgetTN(cdvdTN *Buffer)
{
2016-08-24 21:18:08 +00:00
return -1;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDgetTD(u8 Track, cdvdTD *Buffer)
{
2016-08-24 21:18:08 +00:00
return -1;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDgetTOC(void *toc)
{
2016-08-24 21:18:08 +00:00
return -1;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDgetDiskType()
{
2016-08-24 21:18:08 +00:00
return CDVD_TYPE_NODISC;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDgetTrayStatus()
{
2016-08-24 21:18:08 +00:00
return CDVD_TRAY_CLOSE;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDctrlTrayOpen()
{
2016-08-24 21:18:08 +00:00
return 0;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDctrlTrayClose()
{
2016-08-24 21:18:08 +00:00
return 0;
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(void)
CDVDconfigure()
{
2016-08-24 21:18:08 +00:00
SysMessage("Nothing to Configure");
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(void)
CDVDabout()
{
2016-08-24 21:18:08 +00:00
SysMessage("%s %d.%d", "CDVDnull Driver", revision, build);
}
2016-08-24 21:18:08 +00:00
EXPORT_C_(s32)
CDVDtest()
{
2016-08-24 21:18:08 +00:00
return 0;
}