mirror of https://github.com/PCSX2/pcsx2.git
Now that having internal CDVD interfaces is easy, I added a NODISC interface, with a menu option to run the BIOS with no disc.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1513 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
89c239d443
commit
e2c31ae72a
|
@ -846,8 +846,6 @@ struct CDVDplugin {
|
|||
int* initCount;
|
||||
};
|
||||
extern CDVDplugin CDVD_plugin; // _plugin because of
|
||||
extern CDVDplugin CDVD;
|
||||
extern CDVDplugin ISO;
|
||||
|
||||
// DEV9
|
||||
extern _DEV9init DEV9init;
|
||||
|
|
|
@ -108,4 +108,9 @@ extern void cdvdWrite(u8 key, u8 rt);
|
|||
// Platform dependent system time assignment (see WinMisc / LnxMisc)
|
||||
extern void cdvdSetSystemTime(cdvdStruct& setme);
|
||||
|
||||
extern CDVDplugin CDVD;
|
||||
extern CDVDplugin ISO;
|
||||
extern CDVDplugin NODISC;
|
||||
|
||||
|
||||
#endif /* __CDVD_H__ */
|
||||
|
|
|
@ -389,3 +389,123 @@ void DoCDVDresetDiskTypeCache()
|
|||
{
|
||||
diskTypeCached = -1;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
//
|
||||
// CDVD null interface for Run BIOS menu
|
||||
|
||||
|
||||
s32 CALLBACK NODISCinit()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCopen(const char* pTitle)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CALLBACK NODISCclose()
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK NODISCshutdown()
|
||||
{
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCreadTrack(u32 lsn, int mode)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
// return can be NULL (for async modes)
|
||||
u8* CALLBACK NODISCgetBuffer()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCreadSubQ(u32 lsn, cdvdSubQ* subq)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCgetTN(cdvdTN *Buffer)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCgetTD(u8 Track, cdvdTD *Buffer)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCgetTOC(void* toc)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCgetDiskType()
|
||||
{
|
||||
return CDVD_TYPE_NODISC;
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCgetTrayStatus()
|
||||
{
|
||||
return CDVD_TRAY_CLOSE;
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCdummyS32()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CALLBACK NODISCdummyVOID()
|
||||
{
|
||||
}
|
||||
|
||||
void CALLBACK NODISCnewDiskCB(void(CALLBACK*)())
|
||||
{
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCreadSector(u8* tempbuffer, u32 lsn, int mode)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCgetBuffer2(u8* buffer)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 CALLBACK NODISCgetDualInfo(s32* dualType, u32* _layer1start)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
CDVDplugin NODISC = {
|
||||
NODISCinit,
|
||||
NODISCopen,
|
||||
NODISCclose,
|
||||
NODISCshutdown,
|
||||
NODISCreadTrack,
|
||||
NODISCgetBuffer,
|
||||
NODISCreadSubQ,
|
||||
NODISCgetTN,
|
||||
NODISCgetTD,
|
||||
NODISCgetTOC,
|
||||
NODISCgetDiskType,
|
||||
NODISCgetTrayStatus,
|
||||
NODISCdummyS32,
|
||||
NODISCdummyS32,
|
||||
|
||||
NODISCdummyVOID,
|
||||
NODISCdummyS32,
|
||||
NODISCdummyVOID,
|
||||
NODISCnewDiskCB,
|
||||
|
||||
NODISCreadSector,
|
||||
NODISCgetBuffer2,
|
||||
NODISCgetDualInfo,
|
||||
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
#include "R5900Exceptions.h"
|
||||
|
||||
#include "CDVD/CDVD.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace Console;
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "implement.h" // pthreads-win32 defines for startup/shutdown
|
||||
|
||||
#include "CDVD/CDVDisoReader.h"
|
||||
#include "CDVD/CDVD.h"
|
||||
|
||||
unsigned int langsMax;
|
||||
static bool m_RestartGui = false; // used to signal a GUI restart after DestroyWindow()
|
||||
|
@ -686,6 +687,12 @@ LRESULT WINAPI MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
}
|
||||
break;
|
||||
|
||||
case ID_FILE_RUNBIOS:
|
||||
CDVD = NODISC;
|
||||
SysReset();
|
||||
SysPrepareExecution( NULL, true );
|
||||
break;
|
||||
|
||||
case ID_RUN_EXECUTE:
|
||||
// Execute without reset -- resumes existing states or runs the BIOS if
|
||||
// the state is cleared/reset.
|
||||
|
@ -990,8 +997,9 @@ void CreateMainMenu() {
|
|||
ADDSEPARATOR(0);
|
||||
ADDSUBMENUS(0, 1, _("&States"));
|
||||
ADDSEPARATOR(0);
|
||||
ADDMENUITEM(0, _("&Open ELF File"), ID_FILEOPEN);
|
||||
ADDMENUITEM(0, _("Run from &ISO Image"), ID_FILE_RUNISO);
|
||||
ADDMENUITEM(0, _("&Open ELF File..."), ID_FILEOPEN);
|
||||
ADDMENUITEM(0, _("Run &ISO Image..."), ID_FILE_RUNISO);
|
||||
ADDMENUITEM(0, _("Run &BIOS (No Disc)"), ID_FILE_RUNBIOS);
|
||||
ADDMENUITEM(0, _("&Run CD/DVD"), ID_FILE_RUNCD);
|
||||
ADDSUBMENUS(1, 3, _("&Save"));
|
||||
ADDSUBMENUS(1, 2, _("&Load"));
|
||||
|
|
|
@ -412,6 +412,7 @@
|
|||
#define ID_ADVANCED_OPTIONS 40104
|
||||
#define ID_FILE_RUNISO 40105
|
||||
#define ID_BLOCKDUMP 40106
|
||||
#define ID_FILE_RUNBIOS 40107
|
||||
#define ID_LANGS 50000
|
||||
|
||||
// Next default values for new objects
|
||||
|
@ -419,7 +420,7 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 182
|
||||
#define _APS_NEXT_COMMAND_VALUE 40107
|
||||
#define _APS_NEXT_COMMAND_VALUE 40108
|
||||
#define _APS_NEXT_CONTROL_VALUE 1331
|
||||
#define _APS_NEXT_SYMED_VALUE 104
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue