2009-05-02 04:12:29 +00:00
|
|
|
/* CDVDnull
|
2010-05-03 14:08:02 +00:00
|
|
|
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
2010-04-25 00:31:27 +00:00
|
|
|
*
|
2009-09-08 16:39:37 +00:00
|
|
|
* 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/>.
|
|
|
|
*/
|
2010-04-25 00:31:27 +00:00
|
|
|
|
|
|
|
|
2009-05-02 04:12:29 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include "CDVD.h"
|
2013-06-28 10:43:50 +00:00
|
|
|
#include "svnrev.h"
|
2009-05-02 04:12:29 +00:00
|
|
|
|
2013-06-28 17:11:16 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#define snprintf sprintf_s
|
|
|
|
#endif
|
2012-06-18 21:16:25 +00:00
|
|
|
static char libraryName[256];
|
2009-05-02 04:12:29 +00:00
|
|
|
|
|
|
|
const unsigned char version = PS2E_CDVD_VERSION;
|
|
|
|
const unsigned char revision = 0;
|
|
|
|
const unsigned char build = 6;
|
|
|
|
|
2016-08-28 16:14:07 +00:00
|
|
|
EXPORT_C_(char *)
|
2016-08-24 21:18:08 +00:00
|
|
|
PS2EgetLibName()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
snprintf(libraryName, 255, "CDVDnull Driver %lld%s", SVN_REV, SVN_MODS ? "m" : "");
|
|
|
|
return libraryName;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(u32)
|
|
|
|
PS2EgetLibType()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return PS2E_LT_CDVD;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(u32)
|
|
|
|
CALLBACK PS2EgetLibVersion2(u32 type)
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return (version << 16) | (revision << 8) | build;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
|
|
|
CDVDinit()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return 0;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
2016-08-28 16:14:07 +00:00
|
|
|
CDVDopen(const char *pTitle)
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return 0;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(void)
|
|
|
|
CDVDclose()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(void)
|
|
|
|
CDVDshutdown()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
|
|
|
CDVDreadTrack(u32 lsn, int mode)
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return -1;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// return can be NULL (for async modes)
|
2016-08-28 16:14:07 +00:00
|
|
|
EXPORT_C_(u8 *)
|
2016-08-24 21:18:08 +00:00
|
|
|
CDVDgetBuffer()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return NULL;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
2016-08-28 16:14:07 +00:00
|
|
|
CDVDreadSubQ(u32 lsn, cdvdSubQ *subq)
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return -1;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
2016-08-28 16:14:07 +00:00
|
|
|
CDVDgetTN(cdvdTN *Buffer)
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return -1;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
2016-08-28 16:14:07 +00:00
|
|
|
CDVDgetTD(u8 Track, cdvdTD *Buffer)
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return -1;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
2016-08-28 16:14:07 +00:00
|
|
|
CDVDgetTOC(void *toc)
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return -1;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
|
|
|
CDVDgetDiskType()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return CDVD_TYPE_NODISC;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
|
|
|
CDVDgetTrayStatus()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return CDVD_TRAY_CLOSE;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
|
|
|
CDVDctrlTrayOpen()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return 0;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
|
|
|
CDVDctrlTrayClose()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return 0;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(void)
|
|
|
|
CDVDconfigure()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
SysMessage("Nothing to Configure");
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(void)
|
|
|
|
CDVDabout()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
SysMessage("%s %d.%d", "CDVDnull Driver", revision, build);
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|
|
|
|
|
2016-08-24 21:18:08 +00:00
|
|
|
EXPORT_C_(s32)
|
|
|
|
CDVDtest()
|
2009-05-02 04:12:29 +00:00
|
|
|
{
|
2016-08-24 21:18:08 +00:00
|
|
|
return 0;
|
2009-05-02 04:12:29 +00:00
|
|
|
}
|