mirror of https://github.com/PCSX2/pcsx2.git
DEV9: implement lifecycle callbacks
This commit is contained in:
parent
a2e2ed1ecf
commit
ab22d56735
|
@ -638,6 +638,10 @@ static flash_info_t devices[] = {
|
||||||
extern void dev9Irq(int cycles);
|
extern void dev9Irq(int cycles);
|
||||||
|
|
||||||
void FLASHinit();
|
void FLASHinit();
|
||||||
|
s32 DEV9init();
|
||||||
|
void DEV9close();
|
||||||
|
s32 DEV9open(void *pDsp);
|
||||||
|
void DEV9shutdown();
|
||||||
u32 FLASHread32(u32 addr, int size);
|
u32 FLASHread32(u32 addr, int size);
|
||||||
void FLASHwrite32(u32 addr, u32 value, int size);
|
void FLASHwrite32(u32 addr, u32 value, int size);
|
||||||
void _DEV9irq(int cause, int cycles);
|
void _DEV9irq(int cause, int cycles);
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
/* PCSX2 - PS2 Emulator for PCs
|
|
||||||
* Copyright (C) 2002-2014 David Quintana [gigaherz]
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __PS2ETYPES_H__
|
|
||||||
#define __PS2ETYPES_H__
|
|
||||||
|
|
||||||
// Basic types
|
|
||||||
#if defined(_WIN32)
|
|
||||||
|
|
||||||
typedef __int8 s8;
|
|
||||||
typedef __int16 s16;
|
|
||||||
typedef __int32 s32;
|
|
||||||
typedef __int64 s64;
|
|
||||||
|
|
||||||
typedef unsigned __int8 u8;
|
|
||||||
typedef unsigned __int16 u16;
|
|
||||||
typedef unsigned __int32 u32;
|
|
||||||
typedef unsigned __int64 u64;
|
|
||||||
|
|
||||||
#elif defined(__linux__)
|
|
||||||
|
|
||||||
typedef char s8;
|
|
||||||
typedef short s16;
|
|
||||||
typedef long s32;
|
|
||||||
typedef long long s64;
|
|
||||||
|
|
||||||
typedef unsigned char u8;
|
|
||||||
typedef unsigned short u16;
|
|
||||||
typedef unsigned long u32;
|
|
||||||
typedef unsigned long long u64;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __PS2ETYPES_H__ */
|
|
|
@ -1,30 +0,0 @@
|
||||||
; DEV9ghzdrk.def : Declares the module parameters for the DLL.
|
|
||||||
|
|
||||||
EXPORTS
|
|
||||||
|
|
||||||
; Explicit exports can go here
|
|
||||||
|
|
||||||
PS2EgetLibType @2
|
|
||||||
PS2EgetLibName @3
|
|
||||||
PS2EgetLibVersion2 @4
|
|
||||||
DEV9init @5
|
|
||||||
DEV9shutdown @6
|
|
||||||
DEV9open @7
|
|
||||||
DEV9close @8
|
|
||||||
DEV9read8 @9
|
|
||||||
DEV9read16 @10
|
|
||||||
DEV9read32 @11
|
|
||||||
DEV9write8 @12
|
|
||||||
DEV9write16 @13
|
|
||||||
DEV9write32 @14
|
|
||||||
DEV9readDMA8Mem @15
|
|
||||||
DEV9writeDMA8Mem @16
|
|
||||||
DEV9configure @17
|
|
||||||
DEV9test @18
|
|
||||||
DEV9about @19
|
|
||||||
DEV9irqCallback @20
|
|
||||||
DEV9irqHandler @21
|
|
||||||
DEV9async @22
|
|
||||||
|
|
||||||
DEV9setSettingsDir
|
|
||||||
DEV9setLogDir
|
|
|
@ -1,15 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup Label="UserMacros">
|
|
||||||
<SvnRootDir>$(ProjectRootDir)\..\..</SvnRootDir>
|
|
||||||
<SvnCommonDir>$(SvnRootDir)\common</SvnCommonDir>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup>
|
|
||||||
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<BuildMacro Include="SvnRootDir">
|
|
||||||
<Value>$(SvnRootDir)</Value>
|
|
||||||
</BuildMacro>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "IPC.h"
|
#include "IPC.h"
|
||||||
#include "FW.h"
|
#include "FW.h"
|
||||||
#include "SPU2/spu2.h"
|
#include "SPU2/spu2.h"
|
||||||
|
#include "DEV9/DEV9.h"
|
||||||
|
|
||||||
#include "../DebugTools/MIPSAnalyst.h"
|
#include "../DebugTools/MIPSAnalyst.h"
|
||||||
#include "../DebugTools/SymbolMap.h"
|
#include "../DebugTools/SymbolMap.h"
|
||||||
|
@ -94,6 +95,7 @@ void SysCoreThread::Start()
|
||||||
return;
|
return;
|
||||||
GetCorePlugins().Init();
|
GetCorePlugins().Init();
|
||||||
SPU2init();
|
SPU2init();
|
||||||
|
DEV9init();
|
||||||
_parent::Start();
|
_parent::Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,6 +303,7 @@ void SysCoreThread::ExecuteTaskInThread()
|
||||||
void SysCoreThread::OnSuspendInThread()
|
void SysCoreThread::OnSuspendInThread()
|
||||||
{
|
{
|
||||||
GetCorePlugins().Close();
|
GetCorePlugins().Close();
|
||||||
|
DEV9close();
|
||||||
DoCDVDclose();
|
DoCDVDclose();
|
||||||
FWclose();
|
FWclose();
|
||||||
SPU2close();
|
SPU2close();
|
||||||
|
@ -313,6 +316,7 @@ void SysCoreThread::OnResumeInThread(bool isSuspended)
|
||||||
DoCDVDopen();
|
DoCDVDopen();
|
||||||
FWopen();
|
FWopen();
|
||||||
SPU2open((void*)pDsp);
|
SPU2open((void*)pDsp);
|
||||||
|
DEV9open((void*)pDsp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -328,11 +332,13 @@ void SysCoreThread::OnCleanupInThread()
|
||||||
// FIXME: temporary workaround for deadlock on exit, which actually should be a crash
|
// FIXME: temporary workaround for deadlock on exit, which actually should be a crash
|
||||||
vu1Thread.WaitVU();
|
vu1Thread.WaitVU();
|
||||||
SPU2close();
|
SPU2close();
|
||||||
|
DEV9close();
|
||||||
DoCDVDclose();
|
DoCDVDclose();
|
||||||
FWclose();
|
FWclose();
|
||||||
GetCorePlugins().Close();
|
GetCorePlugins().Close();
|
||||||
GetCorePlugins().Shutdown();
|
GetCorePlugins().Shutdown();
|
||||||
SPU2shutdown();
|
SPU2shutdown();
|
||||||
|
DEV9shutdown();
|
||||||
|
|
||||||
_mm_setcsr(m_mxcsr_saved.bitmask);
|
_mm_setcsr(m_mxcsr_saved.bitmask);
|
||||||
Threading::DisableHiresScheduler();
|
Threading::DisableHiresScheduler();
|
||||||
|
|
Loading…
Reference in New Issue