From f430a63312c4d28ef73397a1cef4593063cdd46d Mon Sep 17 00:00:00 2001 From: Gauvain 'GovanifY' Roussel-Tarbouriech Date: Sat, 3 Oct 2020 16:24:21 +0200 Subject: [PATCH] DEV9: initial work on merge, removing references --- PCSX2_suite.sln | 46 --- cmake/SelectPcsx2Plugins.cmake | 23 -- common/include/PS2Edefs.h | 79 +---- common/include/PluginCallbacks.h | 2 - pcsx2/Config.h | 1 - {plugins/dev9ghzdrk => pcsx2/DEV9}/Config.h | 0 {plugins/dev9ghzdrk => pcsx2/DEV9}/DEV9.cpp | 0 {plugins/dev9ghzdrk => pcsx2/DEV9}/DEV9.h | 0 .../DEV9}/Linux/Config.cpp | 0 .../dev9ghzdrk => pcsx2/DEV9}/Linux/Linux.cpp | 0 .../DEV9}/Linux/dev9ghzdrk.ui | 0 .../dev9ghzdrk => pcsx2/DEV9}/Linux/net.cpp | 0 .../dev9ghzdrk => pcsx2/DEV9}/PS2Etypes.h | 0 .../DEV9}/Win32/Config.cpp | 0 .../DEV9}/Win32/DEV9ghzdrk.def | 0 .../DEV9}/Win32/DEV9ghzdrk.rc | 0 .../DEV9}/Win32/Devioctl.h | 0 .../DEV9}/Win32/ProjectRootDir.props | 0 .../dev9ghzdrk => pcsx2/DEV9}/Win32/Win32.cpp | 0 .../DEV9}/Win32/_Ntddndis.h | 0 .../DEV9}/Win32/afxresmw.h | 0 .../dev9ghzdrk => pcsx2/DEV9}/Win32/mtfifo.h | 0 .../dev9ghzdrk => pcsx2/DEV9}/Win32/net.cpp | 0 .../DEV9}/Win32/resource.h | 0 .../dev9ghzdrk => pcsx2/DEV9}/Win32/socks.c | 0 .../dev9ghzdrk => pcsx2/DEV9}/Win32/socks.h | 0 .../DEV9}/Win32/tap-win32.cpp | 0 .../dev9ghzdrk => pcsx2/DEV9}/Win32/tap.h | 0 {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/vl.h | 0 {plugins/dev9ghzdrk => pcsx2/DEV9}/ata.h | 0 {plugins/dev9ghzdrk => pcsx2/DEV9}/flash.cpp | 0 {plugins/dev9ghzdrk => pcsx2/DEV9}/net.h | 0 .../dev9ghzdrk => pcsx2/DEV9}/pcap_io.cpp | 0 {plugins/dev9ghzdrk => pcsx2/DEV9}/pcap_io.h | 0 {plugins/dev9ghzdrk => pcsx2/DEV9}/smap.cpp | 0 {plugins/dev9ghzdrk => pcsx2/DEV9}/smap.h | 0 pcsx2/PluginManager.cpp | 71 ---- pcsx2/Plugins.h | 2 - pcsx2/gui/MainFrame.cpp | 1 - pcsx2/gui/SysState.cpp | 3 +- plugins/CMakeLists.txt | 8 - plugins/dev9ghzdrk/CMakeLists.txt | 122 ------- plugins/dev9ghzdrk/Win32/DEV9ghzdrk.vcxproj | 83 ----- plugins/dev9null/CMakeLists.txt | 59 ---- plugins/dev9null/DEV9.cpp | 332 ------------------ plugins/dev9null/DEV9.h | 42 --- plugins/dev9null/ReadMe.txt | 36 -- plugins/dev9null/Windows/DEV9null.vcxproj | 69 ---- .../dev9null/Windows/DEV9null.vcxproj.filters | 25 -- plugins/dev9null/Windows/ProjectRootDir.props | 15 - plugins/dev9null/Windows/dev9null.def | 36 -- 51 files changed, 3 insertions(+), 1052 deletions(-) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Config.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/DEV9.cpp (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/DEV9.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Linux/Config.cpp (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Linux/Linux.cpp (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Linux/dev9ghzdrk.ui (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Linux/net.cpp (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/PS2Etypes.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/Config.cpp (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/DEV9ghzdrk.def (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/DEV9ghzdrk.rc (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/Devioctl.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/ProjectRootDir.props (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/Win32.cpp (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/_Ntddndis.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/afxresmw.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/mtfifo.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/net.cpp (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/resource.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/socks.c (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/socks.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/tap-win32.cpp (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/tap.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/Win32/vl.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/ata.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/flash.cpp (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/net.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/pcap_io.cpp (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/pcap_io.h (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/smap.cpp (100%) rename {plugins/dev9ghzdrk => pcsx2/DEV9}/smap.h (100%) delete mode 100644 plugins/dev9ghzdrk/CMakeLists.txt delete mode 100644 plugins/dev9ghzdrk/Win32/DEV9ghzdrk.vcxproj delete mode 100644 plugins/dev9null/CMakeLists.txt delete mode 100644 plugins/dev9null/DEV9.cpp delete mode 100644 plugins/dev9null/DEV9.h delete mode 100644 plugins/dev9null/ReadMe.txt delete mode 100644 plugins/dev9null/Windows/DEV9null.vcxproj delete mode 100644 plugins/dev9null/Windows/DEV9null.vcxproj.filters delete mode 100644 plugins/dev9null/Windows/ProjectRootDir.props delete mode 100644 plugins/dev9null/Windows/dev9null.def diff --git a/PCSX2_suite.sln b/PCSX2_suite.sln index 6642bc9f0f..6b811d7329 100644 --- a/PCSX2_suite.sln +++ b/PCSX2_suite.sln @@ -46,8 +46,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LilyPad", "plugins\LilyPad\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "USBnull", "plugins\USBnull\Windows\USBnull.vcxproj", "{BF7B81A5-E348-4F7C-A69F-F74C8EEEAD70}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DEV9null", "plugins\dev9null\Windows\DEV9null.vcxproj", "{04439C5F-05FB-4A9C-AAD1-5388C25377DB}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x86emitter", "common\build\x86emitter\x86emitter.vcxproj", "{A51123F5-9505-4EAE-85E7-D320290A272C}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "utilities", "common\build\Utilities\utilities.vcxproj", "{4639972E-424E-4E13-8B07-CA403C481346}" @@ -58,8 +56,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "3rdparty\libjpeg EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio", "3rdparty\portaudio\build\msvc\portaudio.vcxproj", "{0A18A071-125E-442F-AFF7-A3F68ABECF99}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DEV9ghzdrk", "plugins\dev9ghzdrk\Win32\DEV9ghzdrk.vcxproj", "{BBE4E5FB-530A-4D18-A633-35AF0577B7F3}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Experimental", "Experimental", "{7A407562-D70F-4F0A-9D3E-B32506416003}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wx30_config", "3rdparty\wxwidgets3.0\build\msw\wx30_config.vcxproj", "{01F4CE10-2CFB-41A8-B41F-E54337868A1D}" @@ -216,26 +212,6 @@ Global {BF7B81A5-E348-4F7C-A69F-F74C8EEEAD70}.Release|Win32.Build.0 = Release|Win32 {BF7B81A5-E348-4F7C-A69F-F74C8EEEAD70}.Release|x64.ActiveCfg = Release|x64 {BF7B81A5-E348-4F7C-A69F-F74C8EEEAD70}.Release|x64.Build.0 = Release|x64 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Debug|Win32.ActiveCfg = Debug|Win32 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Debug|Win32.Build.0 = Debug|Win32 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Debug|x64.ActiveCfg = Debug|x64 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Debug|x64.Build.0 = Debug|x64 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Devel|Win32.ActiveCfg = Release|Win32 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Devel|Win32.Build.0 = Release|Win32 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Devel|x64.ActiveCfg = Release|x64 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Devel|x64.Build.0 = Release|x64 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release AVX2|Win32.ActiveCfg = Release|Win32 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release AVX2|Win32.Build.0 = Release|Win32 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release AVX2|x64.ActiveCfg = Release|x64 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release AVX2|x64.Build.0 = Release|x64 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release SSE4|Win32.ActiveCfg = Release|Win32 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release SSE4|Win32.Build.0 = Release|Win32 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release SSE4|x64.ActiveCfg = Release|x64 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release SSE4|x64.Build.0 = Release|x64 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release|Win32.ActiveCfg = Release|Win32 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release|Win32.Build.0 = Release|Win32 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release|x64.ActiveCfg = Release|x64 - {04439C5F-05FB-4A9C-AAD1-5388C25377DB}.Release|x64.Build.0 = Release|x64 {A51123F5-9505-4EAE-85E7-D320290A272C}.Debug|Win32.ActiveCfg = Debug|Win32 {A51123F5-9505-4EAE-85E7-D320290A272C}.Debug|Win32.Build.0 = Debug|Win32 {A51123F5-9505-4EAE-85E7-D320290A272C}.Debug|x64.ActiveCfg = Debug|x64 @@ -336,26 +312,6 @@ Global {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|Win32.Build.0 = Release (NO ASIO)|Win32 {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.ActiveCfg = Release (NO ASIO)|x64 {0A18A071-125E-442F-AFF7-A3F68ABECF99}.Release|x64.Build.0 = Release (NO ASIO)|x64 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Debug|Win32.ActiveCfg = Debug|Win32 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Debug|Win32.Build.0 = Debug|Win32 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Debug|x64.ActiveCfg = Debug|x64 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Debug|x64.Build.0 = Debug|x64 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Devel|Win32.ActiveCfg = Release|Win32 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Devel|Win32.Build.0 = Release|Win32 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Devel|x64.ActiveCfg = Release|x64 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Devel|x64.Build.0 = Release|x64 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release AVX2|Win32.ActiveCfg = Release|Win32 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release AVX2|Win32.Build.0 = Release|Win32 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release AVX2|x64.ActiveCfg = Release|x64 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release AVX2|x64.Build.0 = Release|x64 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release SSE4|Win32.ActiveCfg = Release|Win32 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release SSE4|Win32.Build.0 = Release|Win32 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release SSE4|x64.ActiveCfg = Release|x64 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release SSE4|x64.Build.0 = Release|x64 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release|Win32.ActiveCfg = Release|Win32 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release|Win32.Build.0 = Release|Win32 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release|x64.ActiveCfg = Release|x64 - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3}.Release|x64.Build.0 = Release|x64 {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug|Win32.ActiveCfg = Debug|Win32 {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug|Win32.Build.0 = Debug|Win32 {01F4CE10-2CFB-41A8-B41F-E54337868A1D}.Debug|x64.ActiveCfg = Debug|x64 @@ -569,13 +525,11 @@ Global {2F6C0388-20CB-4242-9F6C-A6EBB6A83F47} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {E4081455-398C-4610-A87C-90A8A7D72DC3} = {703FD00B-D7A0-41E3-BD03-CEC86B385DAF} {BF7B81A5-E348-4F7C-A69F-F74C8EEEAD70} = {E1828E40-2FBB-48FE-AE7F-5587755DCE0E} - {04439C5F-05FB-4A9C-AAD1-5388C25377DB} = {E1828E40-2FBB-48FE-AE7F-5587755DCE0E} {A51123F5-9505-4EAE-85E7-D320290A272C} = {88F517F9-CE1C-4005-9BDF-4481FEB55053} {4639972E-424E-4E13-8B07-CA403C481346} = {88F517F9-CE1C-4005-9BDF-4481FEB55053} {677B7D11-D5E1-40B3-88B1-9A4DF83D2213} = {2D6F0A62-A247-4CCF-947F-FCD54BE16103} {BC236261-77E8-4567-8D09-45CD02965EB6} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {0A18A071-125E-442F-AFF7-A3F68ABECF99} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3} = {7A407562-D70F-4F0A-9D3E-B32506416003} {7A407562-D70F-4F0A-9D3E-B32506416003} = {703FD00B-D7A0-41E3-BD03-CEC86B385DAF} {01F4CE10-2CFB-41A8-B41F-E54337868A1D} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} {3FCC50C2-81E9-5DB2-B8D8-2129427568B1} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38} diff --git a/cmake/SelectPcsx2Plugins.cmake b/cmake/SelectPcsx2Plugins.cmake index 4d826cedf3..c3aa573828 100644 --- a/cmake/SelectPcsx2Plugins.cmake +++ b/cmake/SelectPcsx2Plugins.cmake @@ -82,29 +82,6 @@ endif() #------------------------------------------------------------------------------- -#--------------------------------------- -# dev9null -#--------------------------------------- -if(GTKn_FOUND) - set(dev9null TRUE) -endif() - -#--------------------------------------- -# dev9ghzdrk -#--------------------------------------- -if(NOT DISABLE_DEV9GHZDRK) -if(GTKn_FOUND AND PCAP_FOUND AND LIBXML2_FOUND) - set(dev9ghzdrk TRUE) - list(APPEND CMAKE_MODULE_PATH - ${CMAKE_MODULE_PATH}/macros) - include(GlibCompileResourcesSupport) -else() - set(dev9ghzdrk FALSE) - print_dep("Skip build of dev9ghzdrk: missing dependencies" "${msg_dep_dev}") -endif() -endif() -#--------------------------------------- - #--------------------------------------- # GSnull #--------------------------------------- diff --git a/common/include/PS2Edefs.h b/common/include/PS2Edefs.h index 9c5b4093e2..559ed6e62b 100644 --- a/common/include/PS2Edefs.h +++ b/common/include/PS2Edefs.h @@ -74,21 +74,19 @@ typedef struct _keyEvent /////////////////////////////////////////////////////////////////////// #if defined(GSdefs) || defined(PADdefs) || defined(SIOdefs) || \ - defined(DEV9defs) || defined(USBdefs) + defined(USBdefs) #define COMMONdefs #endif // PS2EgetLibType returns (may be OR'd) #define PS2E_LT_GS 0x01 #define PS2E_LT_PAD 0x02 // -=[ OBSOLETE ]=- -#define PS2E_LT_DEV9 0x10 #define PS2E_LT_USB 0x20 #define PS2E_LT_SIO 0x80 // PS2EgetLibVersion2 (high 16 bits) #define PS2E_GS_VERSION 0x0006 #define PS2E_PAD_VERSION 0x0002 // -=[ OBSOLETE ]=- -#define PS2E_DEV9_VERSION 0x0003 #define PS2E_USB_VERSION 0x0003 #define PS2E_SIO_VERSION 0x0001 #ifdef COMMONdefs @@ -124,9 +122,6 @@ typedef char __keyEvent_Size__[(sizeof(keyEvent) == 8) ? 1 : -1]; typedef int(CALLBACK *SIOchangeSlotCB)(int slot); -typedef void (*DEV9callback)(int cycles); -typedef int (*DEV9handler)(void); - typedef void (*USBcallback)(int cycles); typedef int (*USBhandler)(void); @@ -245,46 +240,6 @@ s32 CALLBACK PADtest(); #endif -/* DEV9 plugin API */ - -// if this file is included with this define -// the next api will not be skipped by the compiler -#if defined(DEV9defs) || defined(BUILTIN_DEV9_PLUGIN) - -// basic funcs - -// NOTE: The read/write functions CANNOT use XMM/MMX regs -// If you want to use them, need to save and restore current ones -s32 CALLBACK DEV9init(); -s32 CALLBACK DEV9open(void *pDsp); -void CALLBACK DEV9close(); -void CALLBACK DEV9shutdown(); -void CALLBACK DEV9setSettingsDir(const char *dir); -void CALLBACK DEV9setLogDir(const char *dir); - -u8 CALLBACK DEV9read8(u32 addr); -u16 CALLBACK DEV9read16(u32 addr); -u32 CALLBACK DEV9read32(u32 addr); -void CALLBACK DEV9write8(u32 addr, u8 value); -void CALLBACK DEV9write16(u32 addr, u16 value); -void CALLBACK DEV9write32(u32 addr, u32 value); -void CALLBACK DEV9readDMA8Mem(u32 *pMem, int size); -void CALLBACK DEV9writeDMA8Mem(u32 *pMem, int size); - -// cycles = IOP cycles before calling callback, -// if callback returns 1 the irq is triggered, else not -void CALLBACK DEV9irqCallback(DEV9callback callback); -DEV9handler CALLBACK DEV9irqHandler(void); - -// extended funcs - -s32 CALLBACK DEV9freeze(int mode, freezeData *data); -void CALLBACK DEV9configure(); -void CALLBACK DEV9about(); -s32 CALLBACK DEV9test(); - -#endif - /* USB plugin API */ // if this file is included with this define @@ -375,22 +330,6 @@ typedef s32(CALLBACK *_PADsetSlot)(u8 port, u8 slot); typedef s32(CALLBACK *_PADqueryMtap)(u8 port); typedef void(CALLBACK *_PADWriteEvent)(keyEvent &evt); -// DEV9 -// NOTE: The read/write functions CANNOT use XMM/MMX regs -// If you want to use them, need to save and restore current ones -typedef s32(CALLBACK *_DEV9open)(void *pDsp); -typedef u8(CALLBACK *_DEV9read8)(u32 mem); -typedef u16(CALLBACK *_DEV9read16)(u32 mem); -typedef u32(CALLBACK *_DEV9read32)(u32 mem); -typedef void(CALLBACK *_DEV9write8)(u32 mem, u8 value); -typedef void(CALLBACK *_DEV9write16)(u32 mem, u16 value); -typedef void(CALLBACK *_DEV9write32)(u32 mem, u32 value); -typedef void(CALLBACK *_DEV9readDMA8Mem)(u32 *pMem, int size); -typedef void(CALLBACK *_DEV9writeDMA8Mem)(u32 *pMem, int size); -typedef void(CALLBACK *_DEV9irqCallback)(DEV9callback callback); -typedef DEV9handler(CALLBACK *_DEV9irqHandler)(void); -typedef void(CALLBACK *_DEV9async)(u32 cycles); - // USB // NOTE: The read/write functions CANNOT use XMM/MMX regs // If you want to use them, need to save and restore current ones @@ -455,22 +394,6 @@ extern _PADqueryMtap PADqueryMtap; extern _PADWriteEvent PADWriteEvent; #endif -// DEV9 -#ifndef BUILTIN_DEV9_PLUGIN -extern _DEV9open DEV9open; -extern _DEV9read8 DEV9read8; -extern _DEV9read16 DEV9read16; -extern _DEV9read32 DEV9read32; -extern _DEV9write8 DEV9write8; -extern _DEV9write16 DEV9write16; -extern _DEV9write32 DEV9write32; -extern _DEV9readDMA8Mem DEV9readDMA8Mem; -extern _DEV9writeDMA8Mem DEV9writeDMA8Mem; -extern _DEV9irqCallback DEV9irqCallback; -extern _DEV9irqHandler DEV9irqHandler; -extern _DEV9async DEV9async; -#endif - // USB #ifndef BUILTIN_USB_PLUGIN extern _USBopen USBopen; diff --git a/common/include/PluginCallbacks.h b/common/include/PluginCallbacks.h index 678aecb4f7..cb8c8ac6d7 100644 --- a/common/include/PluginCallbacks.h +++ b/common/include/PluginCallbacks.h @@ -177,7 +177,6 @@ extern "C" { enum PS2E_ComponentTypes { PS2E_TYPE_GS = 0, PS2E_TYPE_PAD, - PS2E_TYPE_DEV9, PS2E_TYPE_USB, PS2E_TYPE_SIO, PS2E_TYPE_Mcd, @@ -186,7 +185,6 @@ enum PS2E_ComponentTypes { enum PluginLibVersion { PS2E_VER_GS = 0x1000, PS2E_VER_PAD = 0x1000, - PS2E_VER_DEV9 = 0x1000, PS2E_VER_USB = 0x1000, PS2E_VER_SIO = 0x1000 }; diff --git a/pcsx2/Config.h b/pcsx2/Config.h index 6c61e6419e..071196bf2e 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -24,7 +24,6 @@ enum PluginsEnum_t PluginId_GS = 0, PluginId_PAD, PluginId_USB, - PluginId_DEV9, PluginId_Count, // Memorycard plugin support is preliminary, and is only hacked/hardcoded in at this diff --git a/plugins/dev9ghzdrk/Config.h b/pcsx2/DEV9/Config.h similarity index 100% rename from plugins/dev9ghzdrk/Config.h rename to pcsx2/DEV9/Config.h diff --git a/plugins/dev9ghzdrk/DEV9.cpp b/pcsx2/DEV9/DEV9.cpp similarity index 100% rename from plugins/dev9ghzdrk/DEV9.cpp rename to pcsx2/DEV9/DEV9.cpp diff --git a/plugins/dev9ghzdrk/DEV9.h b/pcsx2/DEV9/DEV9.h similarity index 100% rename from plugins/dev9ghzdrk/DEV9.h rename to pcsx2/DEV9/DEV9.h diff --git a/plugins/dev9ghzdrk/Linux/Config.cpp b/pcsx2/DEV9/Linux/Config.cpp similarity index 100% rename from plugins/dev9ghzdrk/Linux/Config.cpp rename to pcsx2/DEV9/Linux/Config.cpp diff --git a/plugins/dev9ghzdrk/Linux/Linux.cpp b/pcsx2/DEV9/Linux/Linux.cpp similarity index 100% rename from plugins/dev9ghzdrk/Linux/Linux.cpp rename to pcsx2/DEV9/Linux/Linux.cpp diff --git a/plugins/dev9ghzdrk/Linux/dev9ghzdrk.ui b/pcsx2/DEV9/Linux/dev9ghzdrk.ui similarity index 100% rename from plugins/dev9ghzdrk/Linux/dev9ghzdrk.ui rename to pcsx2/DEV9/Linux/dev9ghzdrk.ui diff --git a/plugins/dev9ghzdrk/Linux/net.cpp b/pcsx2/DEV9/Linux/net.cpp similarity index 100% rename from plugins/dev9ghzdrk/Linux/net.cpp rename to pcsx2/DEV9/Linux/net.cpp diff --git a/plugins/dev9ghzdrk/PS2Etypes.h b/pcsx2/DEV9/PS2Etypes.h similarity index 100% rename from plugins/dev9ghzdrk/PS2Etypes.h rename to pcsx2/DEV9/PS2Etypes.h diff --git a/plugins/dev9ghzdrk/Win32/Config.cpp b/pcsx2/DEV9/Win32/Config.cpp similarity index 100% rename from plugins/dev9ghzdrk/Win32/Config.cpp rename to pcsx2/DEV9/Win32/Config.cpp diff --git a/plugins/dev9ghzdrk/Win32/DEV9ghzdrk.def b/pcsx2/DEV9/Win32/DEV9ghzdrk.def similarity index 100% rename from plugins/dev9ghzdrk/Win32/DEV9ghzdrk.def rename to pcsx2/DEV9/Win32/DEV9ghzdrk.def diff --git a/plugins/dev9ghzdrk/Win32/DEV9ghzdrk.rc b/pcsx2/DEV9/Win32/DEV9ghzdrk.rc similarity index 100% rename from plugins/dev9ghzdrk/Win32/DEV9ghzdrk.rc rename to pcsx2/DEV9/Win32/DEV9ghzdrk.rc diff --git a/plugins/dev9ghzdrk/Win32/Devioctl.h b/pcsx2/DEV9/Win32/Devioctl.h similarity index 100% rename from plugins/dev9ghzdrk/Win32/Devioctl.h rename to pcsx2/DEV9/Win32/Devioctl.h diff --git a/plugins/dev9ghzdrk/Win32/ProjectRootDir.props b/pcsx2/DEV9/Win32/ProjectRootDir.props similarity index 100% rename from plugins/dev9ghzdrk/Win32/ProjectRootDir.props rename to pcsx2/DEV9/Win32/ProjectRootDir.props diff --git a/plugins/dev9ghzdrk/Win32/Win32.cpp b/pcsx2/DEV9/Win32/Win32.cpp similarity index 100% rename from plugins/dev9ghzdrk/Win32/Win32.cpp rename to pcsx2/DEV9/Win32/Win32.cpp diff --git a/plugins/dev9ghzdrk/Win32/_Ntddndis.h b/pcsx2/DEV9/Win32/_Ntddndis.h similarity index 100% rename from plugins/dev9ghzdrk/Win32/_Ntddndis.h rename to pcsx2/DEV9/Win32/_Ntddndis.h diff --git a/plugins/dev9ghzdrk/Win32/afxresmw.h b/pcsx2/DEV9/Win32/afxresmw.h similarity index 100% rename from plugins/dev9ghzdrk/Win32/afxresmw.h rename to pcsx2/DEV9/Win32/afxresmw.h diff --git a/plugins/dev9ghzdrk/Win32/mtfifo.h b/pcsx2/DEV9/Win32/mtfifo.h similarity index 100% rename from plugins/dev9ghzdrk/Win32/mtfifo.h rename to pcsx2/DEV9/Win32/mtfifo.h diff --git a/plugins/dev9ghzdrk/Win32/net.cpp b/pcsx2/DEV9/Win32/net.cpp similarity index 100% rename from plugins/dev9ghzdrk/Win32/net.cpp rename to pcsx2/DEV9/Win32/net.cpp diff --git a/plugins/dev9ghzdrk/Win32/resource.h b/pcsx2/DEV9/Win32/resource.h similarity index 100% rename from plugins/dev9ghzdrk/Win32/resource.h rename to pcsx2/DEV9/Win32/resource.h diff --git a/plugins/dev9ghzdrk/Win32/socks.c b/pcsx2/DEV9/Win32/socks.c similarity index 100% rename from plugins/dev9ghzdrk/Win32/socks.c rename to pcsx2/DEV9/Win32/socks.c diff --git a/plugins/dev9ghzdrk/Win32/socks.h b/pcsx2/DEV9/Win32/socks.h similarity index 100% rename from plugins/dev9ghzdrk/Win32/socks.h rename to pcsx2/DEV9/Win32/socks.h diff --git a/plugins/dev9ghzdrk/Win32/tap-win32.cpp b/pcsx2/DEV9/Win32/tap-win32.cpp similarity index 100% rename from plugins/dev9ghzdrk/Win32/tap-win32.cpp rename to pcsx2/DEV9/Win32/tap-win32.cpp diff --git a/plugins/dev9ghzdrk/Win32/tap.h b/pcsx2/DEV9/Win32/tap.h similarity index 100% rename from plugins/dev9ghzdrk/Win32/tap.h rename to pcsx2/DEV9/Win32/tap.h diff --git a/plugins/dev9ghzdrk/Win32/vl.h b/pcsx2/DEV9/Win32/vl.h similarity index 100% rename from plugins/dev9ghzdrk/Win32/vl.h rename to pcsx2/DEV9/Win32/vl.h diff --git a/plugins/dev9ghzdrk/ata.h b/pcsx2/DEV9/ata.h similarity index 100% rename from plugins/dev9ghzdrk/ata.h rename to pcsx2/DEV9/ata.h diff --git a/plugins/dev9ghzdrk/flash.cpp b/pcsx2/DEV9/flash.cpp similarity index 100% rename from plugins/dev9ghzdrk/flash.cpp rename to pcsx2/DEV9/flash.cpp diff --git a/plugins/dev9ghzdrk/net.h b/pcsx2/DEV9/net.h similarity index 100% rename from plugins/dev9ghzdrk/net.h rename to pcsx2/DEV9/net.h diff --git a/plugins/dev9ghzdrk/pcap_io.cpp b/pcsx2/DEV9/pcap_io.cpp similarity index 100% rename from plugins/dev9ghzdrk/pcap_io.cpp rename to pcsx2/DEV9/pcap_io.cpp diff --git a/plugins/dev9ghzdrk/pcap_io.h b/pcsx2/DEV9/pcap_io.h similarity index 100% rename from plugins/dev9ghzdrk/pcap_io.h rename to pcsx2/DEV9/pcap_io.h diff --git a/plugins/dev9ghzdrk/smap.cpp b/pcsx2/DEV9/smap.cpp similarity index 100% rename from plugins/dev9ghzdrk/smap.cpp rename to pcsx2/DEV9/smap.cpp diff --git a/plugins/dev9ghzdrk/smap.h b/pcsx2/DEV9/smap.h similarity index 100% rename from plugins/dev9ghzdrk/smap.h rename to pcsx2/DEV9/smap.h diff --git a/pcsx2/PluginManager.cpp b/pcsx2/PluginManager.cpp index f4538a1610..e42d4f0e0f 100644 --- a/pcsx2/PluginManager.cpp +++ b/pcsx2/PluginManager.cpp @@ -82,7 +82,6 @@ const PluginInfo tbl_PluginInfo[] = { "GS", PluginId_GS, PS2E_LT_GS, PS2E_GS_VERSION }, { "PAD", PluginId_PAD, PS2E_LT_PAD, PS2E_PAD_VERSION }, { "USB", PluginId_USB, PS2E_LT_USB, PS2E_USB_VERSION }, - { "DEV9", PluginId_DEV9, PS2E_LT_DEV9, PS2E_DEV9_VERSION }, { NULL }, @@ -273,24 +272,6 @@ _PADWriteEvent PADWriteEvent; static void PAD_update( u32 padslot ) { } -// DEV9 -#ifndef BUILTIN_DEV9_PLUGIN -_DEV9open DEV9open; -_DEV9read8 DEV9read8; -_DEV9read16 DEV9read16; -_DEV9read32 DEV9read32; -_DEV9write8 DEV9write8; -_DEV9write16 DEV9write16; -_DEV9write32 DEV9write32; - -_DEV9readDMA8Mem DEV9readDMA8Mem; -_DEV9writeDMA8Mem DEV9writeDMA8Mem; - -_DEV9irqCallback DEV9irqCallback; -_DEV9irqHandler DEV9irqHandler; -_DEV9async DEV9async; -#endif - // USB #ifndef BUILTIN_USB_PLUGIN _USBopen USBopen; @@ -307,7 +288,6 @@ _USBirqHandler USBirqHandler; _USBsetRAM USBsetRAM; #endif -DEV9handler dev9Handler; USBhandler usbHandler; uptr pDsp[2]; @@ -410,32 +390,6 @@ static const LegacyApi_OptMethod s_MethMessOpt_PAD[] = { NULL }, }; -// ---------------------------------------------------------------------------- -// DEV9 Mess! -// ---------------------------------------------------------------------------- -static const LegacyApi_ReqMethod s_MethMessReq_DEV9[] = -{ - { "DEV9open", (vMeth**)&DEV9open, NULL }, - { "DEV9read8", (vMeth**)&DEV9read8, NULL }, - { "DEV9read16", (vMeth**)&DEV9read16, NULL }, - { "DEV9read32", (vMeth**)&DEV9read32, NULL }, - { "DEV9write8", (vMeth**)&DEV9write8, NULL }, - { "DEV9write16", (vMeth**)&DEV9write16, NULL }, - { "DEV9write32", (vMeth**)&DEV9write32, NULL }, - { "DEV9readDMA8Mem", (vMeth**)&DEV9readDMA8Mem, NULL }, - { "DEV9writeDMA8Mem", (vMeth**)&DEV9writeDMA8Mem, NULL }, - { "DEV9irqCallback", (vMeth**)&DEV9irqCallback, NULL }, - { "DEV9irqHandler", (vMeth**)&DEV9irqHandler, NULL }, - - { NULL } -}; - -static const LegacyApi_OptMethod s_MethMessOpt_DEV9[] = -{ - { "DEV9async", (vMeth**)&DEV9async }, - { NULL } -}; - // ---------------------------------------------------------------------------- // USB Mess! // ---------------------------------------------------------------------------- @@ -465,7 +419,6 @@ static const LegacyApi_ReqMethod* const s_MethMessReq[] = s_MethMessReq_GS, s_MethMessReq_PAD, s_MethMessReq_USB, - s_MethMessReq_DEV9 }; static const LegacyApi_OptMethod* const s_MethMessOpt[] = @@ -473,7 +426,6 @@ static const LegacyApi_OptMethod* const s_MethMessOpt[] = s_MethMessOpt_GS, s_MethMessOpt_PAD, s_MethMessOpt_USB, - s_MethMessOpt_DEV9 }; SysCorePlugins *g_plugins = NULL; @@ -636,9 +588,6 @@ void* StaticLibrary::GetSymbol(const wxString &name) #ifdef BUILTIN_PAD_PLUGIN RETURN_COMMON_SYMBOL(PAD); #endif -#ifdef BUILTIN_DEV9_PLUGIN - RETURN_COMMON_SYMBOL(DEV9); -#endif #ifdef BUILTIN_USB_PLUGIN RETURN_COMMON_SYMBOL(USB); #endif @@ -697,9 +646,6 @@ SysCorePlugins::PluginStatus_t::PluginStatus_t( PluginsEnum_t _pid, const wxStri #ifdef BUILTIN_PAD_PLUGIN case PluginId_PAD: #endif -#ifdef BUILTIN_DEV9_PLUGIN - case PluginId_DEV9: -#endif #ifdef BUILTIN_USB_PLUGIN case PluginId_USB: #endif @@ -969,16 +915,6 @@ bool SysCorePlugins::OpenPlugin_PAD() return !PADopen( (void*)pDsp ); } -bool SysCorePlugins::OpenPlugin_DEV9() -{ - dev9Handler = NULL; - - if( DEV9open( (void*)pDsp ) ) return false; - DEV9irqCallback( dev9Irq ); - dev9Handler = DEV9irqHandler(); - return true; -} - bool SysCorePlugins::OpenPlugin_USB() { usbHandler = NULL; @@ -1018,7 +954,6 @@ void SysCorePlugins::Open( PluginsEnum_t pid ) case PluginId_GS: result = OpenPlugin_GS(); break; case PluginId_PAD: result = OpenPlugin_PAD(); break; case PluginId_USB: result = OpenPlugin_USB(); break; - case PluginId_DEV9: result = OpenPlugin_DEV9(); break; jNO_DEFAULT; } @@ -1090,11 +1025,6 @@ void SysCorePlugins::ClosePlugin_PAD() _generalclose( PluginId_PAD ); } -void SysCorePlugins::ClosePlugin_DEV9() -{ - _generalclose( PluginId_DEV9 ); -} - void SysCorePlugins::ClosePlugin_USB() { _generalclose( PluginId_USB ); @@ -1120,7 +1050,6 @@ void SysCorePlugins::Close( PluginsEnum_t pid ) case PluginId_GS: ClosePlugin_GS(); break; case PluginId_PAD: ClosePlugin_PAD(); break; case PluginId_USB: ClosePlugin_USB(); break; - case PluginId_DEV9: ClosePlugin_DEV9(); break; case PluginId_Mcd: ClosePlugin_Mcd(); break; jNO_DEFAULT; diff --git a/pcsx2/Plugins.h b/pcsx2/Plugins.h index 33f47382b9..d7b99f032e 100644 --- a/pcsx2/Plugins.h +++ b/pcsx2/Plugins.h @@ -402,7 +402,6 @@ protected: virtual bool OpenPlugin_GS(); virtual bool OpenPlugin_PAD(); - virtual bool OpenPlugin_DEV9(); virtual bool OpenPlugin_USB(); virtual bool OpenPlugin_Mcd(); @@ -410,7 +409,6 @@ protected: virtual void ClosePlugin_GS(); virtual void ClosePlugin_PAD(); - virtual void ClosePlugin_DEV9(); virtual void ClosePlugin_USB(); virtual void ClosePlugin_Mcd(); diff --git a/pcsx2/gui/MainFrame.cpp b/pcsx2/gui/MainFrame.cpp index d5cb5e9214..63c234d17a 100644 --- a/pcsx2/gui/MainFrame.cpp +++ b/pcsx2/gui/MainFrame.cpp @@ -444,7 +444,6 @@ void MainEmuFrame::CreateConfigMenu() m_menuConfig.Append(MenuId_Config_GS, _("&Video (GS)"), m_PluginMenuPacks[PluginId_GS]); m_menuConfig.Append(MenuId_Config_PAD, _("&Controllers (PAD)"), m_PluginMenuPacks[PluginId_PAD]); - m_menuConfig.Append(MenuId_Config_DEV9, _("&Dev9"), m_PluginMenuPacks[PluginId_DEV9]); m_menuConfig.Append(MenuId_Config_USB, _("&USB"), m_PluginMenuPacks[PluginId_USB]); m_menuConfig.AppendSeparator(); diff --git a/pcsx2/gui/SysState.cpp b/pcsx2/gui/SysState.cpp index 8683e1ea25..e122c108d4 100644 --- a/pcsx2/gui/SysState.cpp +++ b/pcsx2/gui/SysState.cpp @@ -290,7 +290,8 @@ static const std::unique_ptr SavestateEntries[] = { std::unique_ptr(new PluginSavestateEntry(PluginId_GS)), std::unique_ptr(new PluginSavestateEntry(PluginId_PAD)), std::unique_ptr(new PluginSavestateEntry(PluginId_USB)), - std::unique_ptr(new PluginSavestateEntry(PluginId_DEV9))}; +}; +>>>>>>> DEV9: initial work on merge, removing references // It's bad mojo to have savestates trying to read and write from the same file at the // same time. To prevent that we use this mutex lock, which is used by both the diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 505cddc504..095f0bdc0e 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -6,14 +6,6 @@ if(NOT TOP_CMAKE_WAS_SOURCED) endif() -if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/dev9null" AND dev9null) - add_subdirectory(dev9null) -endif() - -if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/dev9ghzdrk" AND dev9ghzdrk) - add_subdirectory(dev9ghzdrk) -endif() - if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/GSdx" AND GSdx) add_subdirectory(GSdx) endif() diff --git a/plugins/dev9ghzdrk/CMakeLists.txt b/plugins/dev9ghzdrk/CMakeLists.txt deleted file mode 100644 index 5cc1db3de6..0000000000 --- a/plugins/dev9ghzdrk/CMakeLists.txt +++ /dev/null @@ -1,122 +0,0 @@ -# Check that people use the good file -if(NOT TOP_CMAKE_WAS_SOURCED) - message(FATAL_ERROR " - You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. - It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") -endif(NOT TOP_CMAKE_WAS_SOURCED) - -# plugin name -set(Output dev9ghzdrk-0.4) - -set(CommonFlags - -fvisibility=hidden - -Wall - -Wno-parentheses - -I${LIBXML2_INCLUDE_DIR} - -I${PCAP_INCLUDE_DIR} - ) - -set(OptimizationFlags - -O2 - -DNDEBUG - ) - -# Debug - Build -if(CMAKE_BUILD_TYPE STREQUAL Debug) - # add defines - set(dev9ghzdrkFinalFlags - ${CommonFlags} -g - ) -endif(CMAKE_BUILD_TYPE STREQUAL Debug) - -# Devel - Build -if(CMAKE_BUILD_TYPE STREQUAL Devel) - # add defines - set(dev9ghzdrkFinalFlags - ${CommonFlags} ${OptimizationFlags} - ) -endif(CMAKE_BUILD_TYPE STREQUAL Devel) - -# Release - Build -if(CMAKE_BUILD_TYPE STREQUAL Release) - # add defines - set(dev9ghzdrkFinalFlags - ${CommonFlags} ${OptimizationFlags} - ) -endif(CMAKE_BUILD_TYPE STREQUAL Release) - -# dev9ghzdrk sources -set(dev9ghzdrkSources - smap.cpp - DEV9.cpp - flash.cpp - pcap_io.cpp -) - -# dev9ghzdrk headers -set(dev9ghzdrkHeaders -) - -compile_gresources( dev9ghzdrkUI_C - dev9ghzdrkUI_XML - TYPE EMBED_C - RESOURCES "Linux/dev9ghzdrk.ui" - PREFIX "/net/pcsx2/dev9ghzdrk" - COMPRESS_ALL - STRIPBLANKS_ALL -) - -compile_gresources( dev9ghzdrkUI_H - dev9ghzdrkUI_XML - TYPE EMBED_H - RESOURCES "Linux/dev9ghzdrk.ui" - PREFIX "/net/pcsx2/dev9ghzdrk" - COMPRESS_ALL - STRIPBLANKS_ALL -) - -# dev9ghzdrk Linux sources -set(dev9ghzdrkLinuxSources - Linux/Config.cpp - Linux/Linux.cpp - Linux/net.cpp - ${dev9ghzdrkUI_C} -) - -# dev9ghzdrk Linux headers -set(dev9ghzdrkLinuxHeaders - ${dev9ghzdrkUI_H} -) - -# dev9ghzdrk Windows sources -set(dev9ghzdrkWindowsSources - Win32/DEV9ghzdrk.def - Win32/Config.cpp - Win32/Win32.cpp - Win32/net.cpp - Win32/tap-win32.cpp -) - -# dev9ghzdrk Windows headers -set(dev9ghzdrkWindowsHeaders -) - -set(dev9ghzdrkFinalSources - ${dev9ghzdrkSources} - ${dev9ghzdrkHeaders} - ${dev9ghzdrkLinuxSources} - ${dev9ghzdrkLinuxHeaders} -) - -set(dev9ghzdrkFinalLibs - ${GTK2_LIBRARIES} ${PCAP_LIBRARY} ${LIBXML2_LIBRARIES} -) - -add_pcsx2_plugin(${Output} "${dev9ghzdrkFinalSources}" "${dev9ghzdrkFinalLibs}" "${dev9ghzdrkFinalFlags}") -target_compile_features(${Output} PRIVATE cxx_std_17) - -#if(PACKAGE_MODE) -# install(FILES Linux/dev9ghzdrk.ui DESTINATION bin ) -#else() -# install(FILES Linux/dev9ghzdrk.ui DESTINATION ${CMAKE_SOURCE_DIR}/bin ) -#endif() diff --git a/plugins/dev9ghzdrk/Win32/DEV9ghzdrk.vcxproj b/plugins/dev9ghzdrk/Win32/DEV9ghzdrk.vcxproj deleted file mode 100644 index 940313463d..0000000000 --- a/plugins/dev9ghzdrk/Win32/DEV9ghzdrk.vcxproj +++ /dev/null @@ -1,83 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - {BBE4E5FB-530A-4D18-A633-35AF0577B7F3} - - - - DynamicLibrary - $(DefaultPlatformToolset) - MultiByte - true - true - false - - - - - - - - - - - - - - AllRules.ruleset - - - - .\DEV9ghzdrk.def - MachineX86 - MachineX64 - ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/plugins/dev9null/CMakeLists.txt b/plugins/dev9null/CMakeLists.txt deleted file mode 100644 index 087e62cf88..0000000000 --- a/plugins/dev9null/CMakeLists.txt +++ /dev/null @@ -1,59 +0,0 @@ -# Check that people use the good file -if(NOT TOP_CMAKE_WAS_SOURCED) - message(FATAL_ERROR " - You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. - It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") -endif() - - -# plugin name -set(Output dev9null-0.5.0) - -set(dev9nullFinalFlags - -fvisibility=hidden - -Wall - -Wno-parentheses - ) - -# dev9null sources -set(dev9nullSources - DEV9.cpp) - -# dev9null headers -set(dev9nullHeaders - DEV9.h) - -# dev9null Linux sources -set(dev9nullLinuxSources -) - -# dev9null Linux headers -set(dev9nullLinuxHeaders -) - -# dev9null Windows sources -set(dev9nullWindowsSources - Windows/dev9null.def) - -# dev9null Windows headers -set(dev9nullWindowsHeaders - ) - -set(dev9nullFinalSources - ${dev9nullSources} - ${dev9nullHeaders} - ${dev9nullLinuxSources} - ${dev9nullLinuxHeaders} -) - -set(dev9nullFinalLibs - ${wxWidgets_LIBRARIES} -) - -if(BUILTIN_DEV9) - add_pcsx2_lib(${Output} "${dev9nullFinalSources}" "${dev9nullFinalLibs}" "${dev9nullFinalFlags}") -else() - add_pcsx2_plugin(${Output} "${dev9nullFinalSources}" "${dev9nullFinalLibs}" "${dev9nullFinalFlags}") -endif() - -target_compile_features(${Output} PRIVATE cxx_std_17) \ No newline at end of file diff --git a/plugins/dev9null/DEV9.cpp b/plugins/dev9null/DEV9.cpp deleted file mode 100644 index ec77d2d318..0000000000 --- a/plugins/dev9null/DEV9.cpp +++ /dev/null @@ -1,332 +0,0 @@ -/* DEV9null - * 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 . - */ - -// Note: I was using MegaDev9, dev9ghzdrk, and dev9linuz for reference on memory locations. -// The ones I included were just some of the more important ones, so you may want to look -// at the plugins I mentioned if trying to create your own dev9 plugin. - -// Additionally, there is a lot of information in the ps2drv drivers by Marcus R. Brown, so -// looking through its code would be a good starting point. - -// Look under tags/plugins in svn for any older plugins that aren't included in pcsx2 any more. -// --arcum42 - - -#include -#include -#include -#include - -#include "DEV9.h" -#include "svnrev.h" -#include "null/config.inl" - -const unsigned char version = PS2E_DEV9_VERSION; -const unsigned char revision = 0; -const unsigned char build = 5; // increase that with each version - -static char libraryName[256]; - -// Our IRQ call. -void (*DEV9irq)(int); - -__aligned16 s8 dev9regs[0x10000]; - -std::string s_strIniPath = "inis"; -std::string s_strLogPath = "logs"; - -EXPORT_C_(void) -DEV9configure() -{ - const std::string ini_path = s_strIniPath + "/Dev9null.ini"; - LoadConfig(ini_path); - ConfigureLogging(); - SaveConfig(ini_path); -} - -void LogInit() -{ - const std::string LogFile(s_strLogPath + "/dev9null.log"); - g_plugin_log.Open(LogFile); -} - -EXPORT_C_(void) -DEV9setLogDir(const char *dir) -{ - // Get the path to the log directory. - s_strLogPath = (dir == NULL) ? "logs" : dir; - - // Reload the log file after updated the path - g_plugin_log.Close(); - LogInit(); -} - -EXPORT_C_(u32) -PS2EgetLibType() -{ - return PS2E_LT_DEV9; -} - -EXPORT_C_(const char *) -PS2EgetLibName() -{ - snprintf(libraryName, 255, "DEV9null Driver %lld%s", SVN_REV, SVN_MODS ? "m" : ""); - return libraryName; -} - -EXPORT_C_(u32) -PS2EgetLibVersion2(u32 type) -{ - return (version << 16) | (revision << 8) | build; -} - -EXPORT_C_(s32) -DEV9init() -{ - LoadConfig(s_strIniPath + "/Dev9null.ini"); - LogInit(); - g_plugin_log.WriteLn("dev9null plugin version %d,%d", revision, build); - g_plugin_log.WriteLn("Initializing dev9null"); - // Initialize anything that needs to be initialized. - memset(dev9regs, 0, sizeof(dev9regs)); - return 0; -} - -EXPORT_C_(void) -DEV9shutdown() -{ - g_plugin_log.WriteLn("Shutting down Dev9null."); - g_plugin_log.Close(); -} - -EXPORT_C_(s32) -DEV9open(void *pDsp) -{ - g_plugin_log.WriteLn("Opening Dev9null."); - // Get anything ready we need to. Opening and creating hard - // drive files, for example. - return 0; -} - -EXPORT_C_(void) -DEV9close() -{ - g_plugin_log.WriteLn("Closing Dev9null."); - // Close files opened. -} - -EXPORT_C_(u8) -DEV9read8(u32 addr) -{ - u8 value = 0; - - switch (addr) { - // case 0x1F80146E: // DEV9 hardware type (0x32 for an expansion bay) - case 0x10000038: /*value = dev9Ru8(addr);*/ - break; // We need to have at least one case to avoid warnings. - default: - //value = dev9Ru8(addr); - g_plugin_log.WriteLn("*Unknown 8 bit read at address %lx", addr); - break; - } - return value; -} - -EXPORT_C_(u16) -DEV9read16(u32 addr) -{ - u16 value = 0; - - switch (addr) { - // Addresses you may want to catch here include: - // case 0x1F80146E: // DEV9 hardware type (0x32 for an expansion bay) - // case 0x10000002: // The Smart Chip revision. Should be 0x11 - // case 0x10000004: // More type info: bit 0 - smap; bit 1 - hd; bit 5 - flash - // case 0x1000000E: // Similar to the last; bit 1 should be set if a hd is hooked up. - // case 0x10000028: // intr_stat - // case 0x10000038: // hard drives seem to like reading and writing the max dma size per transfer here. - // case 0x1000002A: // intr_mask - // case 0x10000040: // pio_data - // case 0x10000044: // nsector - // case 0x10000046: // sector - // case 0x10000048: // lcyl - // case 0x1000004A: // hcyl - // case 0x1000004C: // select - // case 0x1000004E: // status - // case 0x1000005C: // status - // case 0x10000064: // if_ctrl - case 0x10000038: /*value = dev9Ru16(addr);*/ - break; - default: - //value = dev9Ru16(addr); - g_plugin_log.WriteLn("*Unknown 16 bit read at address %lx", addr); - break; - } - - return value; -} - -EXPORT_C_(u32) -DEV9read32(u32 addr) -{ - u32 value = 0; - - switch (addr) { - case 0x10000038: /*value = dev9Ru32(addr);*/ - break; - default: - //value = dev9Ru32(addr); - g_plugin_log.WriteLn("*Unknown 32 bit read at address %lx", addr); - break; - } - - return value; -} - -EXPORT_C_(void) -DEV9write8(u32 addr, u8 value) -{ - switch (addr) { - case 0x10000038: /*dev9Ru8(addr) = value;*/ - break; - default: - g_plugin_log.WriteLn("*Unknown 8 bit write; address %lx = %x", addr, value); - //dev9Ru8(addr) = value; - break; - } -} - -EXPORT_C_(void) -DEV9write16(u32 addr, u16 value) -{ - switch (addr) { - // Remember that list on DEV9read16? You'll want to write to a - // lot of them, too. - case 0x10000038: /*dev9Ru16(addr) = value;*/ - break; - default: - g_plugin_log.WriteLn("*Unknown 16 bit write; address %lx = %x", addr, value); - //dev9Ru16(addr) = value; - break; - } -} - -EXPORT_C_(void) -DEV9write32(u32 addr, u32 value) -{ - switch (addr) { - case 0x10000038: /*dev9Ru32(addr) = value;*/ - break; - default: - g_plugin_log.WriteLn("*Unknown 32 bit write; address %lx = %x", addr, value); - //dev9Ru32(addr) = value; - break; - } -} - -EXPORT_C_(s32) -DEV9dmaRead(s32 channel, u32 *data, u32 bytesLeft, u32 *bytesProcessed) -{ - // You'll want to put your own DMA8 reading code here. - // Time to interact with your fake (or real) hardware. - g_plugin_log.WriteLn("Reading DMA8 Mem."); - *bytesProcessed = bytesLeft; - return 0; -} - -EXPORT_C_(s32) -DEV9dmaWrite(s32 channel, u32 *data, u32 bytesLeft, u32 *bytesProcessed) -{ - // See above. - g_plugin_log.WriteLn("Writing DMA8 Mem."); - *bytesProcessed = bytesLeft; - return 0; -} - -EXPORT_C_(void) -DEV9dmaInterrupt(s32 channel) -{ - // See above. -} - -EXPORT_C_(void) -DEV9readDMA8Mem(u32 *pMem, int size) -{ - // You'll want to put your own DMA8 reading code here. - // Time to interact with your fake (or real) hardware. - g_plugin_log.WriteLn("Reading DMA8 Mem."); -} - -EXPORT_C_(void) -DEV9writeDMA8Mem(u32 *pMem, int size) -{ - // See above. - g_plugin_log.WriteLn("Writing DMA8 Mem."); -} - -EXPORT_C_(void) -DEV9irqCallback(DEV9callback callback) -{ - // Setting our callback. You will call it with DEV9irq(cycles), - // Where cycles is the number of cycles till the irq is triggered. - DEV9irq = callback; -} - -int _DEV9irqHandler(void) -{ - // And this gets called when the irq is triggered. - return 0; -} - -EXPORT_C_(DEV9handler) -DEV9irqHandler(void) -{ - // Pass it to pcsx2. - return (DEV9handler)_DEV9irqHandler; -} - -EXPORT_C_(void) -DEV9setSettingsDir(const char *dir) -{ - // Grab the ini directory. - s_strIniPath = (dir == NULL) ? "inis" : dir; -} - -// extended funcs - -EXPORT_C_(s32) -DEV9test() -{ - return 0; -} - -EXPORT_C_(s32) -DEV9freeze(int mode, freezeData *data) -{ - // This should store or retrieve any information, for if emulation - // gets suspended, or for savestates. - switch (mode) { - case FREEZE_LOAD: - // Load previously saved data. - break; - case FREEZE_SAVE: - // Save data. - break; - case FREEZE_SIZE: - // return the size of the data. - break; - } - return 0; -} diff --git a/plugins/dev9null/DEV9.h b/plugins/dev9null/DEV9.h deleted file mode 100644 index fc877fd780..0000000000 --- a/plugins/dev9null/DEV9.h +++ /dev/null @@ -1,42 +0,0 @@ -/* dev9null - * Copyright (C) 2002-2010 pcsx2 Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __DEV9_H__ -#define __DEV9_H__ - -#include - -#define DEV9defs -#include "PS2Edefs.h" -#include "PS2Eext.h" - -extern const unsigned char version; -extern const unsigned char revision; -extern const unsigned char build; - -extern void (*DEV9irq)(int); - -extern __aligned16 s8 dev9regs[0x10000]; -#define dev9Rs8(mem) dev9regs[(mem)&0xffff] -#define dev9Rs16(mem) (*(s16 *)&dev9regs[(mem)&0xffff]) -#define dev9Rs32(mem) (*(s32 *)&dev9regs[(mem)&0xffff]) -#define dev9Ru8(mem) (*(u8 *)&dev9regs[(mem)&0xffff]) -#define dev9Ru16(mem) (*(u16 *)&dev9regs[(mem)&0xffff]) -#define dev9Ru32(mem) (*(u32 *)&dev9regs[(mem)&0xffff]) - -#endif diff --git a/plugins/dev9null/ReadMe.txt b/plugins/dev9null/ReadMe.txt deleted file mode 100644 index bf10deb388..0000000000 --- a/plugins/dev9null/ReadMe.txt +++ /dev/null @@ -1,36 +0,0 @@ -DEV9null v0.3 -------------- - - This is an extension to use with play station2 emulators - as PCSX2 (only one right now). - The plugin is free open source code. - -Usage: ------ - Place the file "libDEV9null.so" (linux) or "DEV9null.dll" (win32) - at the Plugin directory of the Emulator to use it. - -Changes: -------- - v0.5: - *Converted over to use the "PS2Eext.h" file. - v0.4: - *Mass plugin cleanup. - v0.3: -*added vsnet2005beta1 project files. 64bit dll should work now (not tested!) - - v0.2: - *updated the specifications to 0.4.7 - - v0.1: - * First Release - * Tested with Pcsx2 - -Authors: -------- - - linuzappz - shadow - - - diff --git a/plugins/dev9null/Windows/DEV9null.vcxproj b/plugins/dev9null/Windows/DEV9null.vcxproj deleted file mode 100644 index fb865ee279..0000000000 --- a/plugins/dev9null/Windows/DEV9null.vcxproj +++ /dev/null @@ -1,69 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - {04439C5F-05FB-4A9C-AAD1-5388C25377DB} - - - - DynamicLibrary - $(DefaultPlatformToolset) - MultiByte - true - true - false - - - - - - - - - - - - - - AllRules.ruleset - - - - DEV9null.def - MachineX86 - MachineX64 - - - - - - - - - - - - - - - - - diff --git a/plugins/dev9null/Windows/DEV9null.vcxproj.filters b/plugins/dev9null/Windows/DEV9null.vcxproj.filters deleted file mode 100644 index 40525a7bab..0000000000 --- a/plugins/dev9null/Windows/DEV9null.vcxproj.filters +++ /dev/null @@ -1,25 +0,0 @@ - - - - - {60e3858c-96ba-48fb-9518-894ac152b563} - cpp;c;cxx;def;odl;idl;hpj;bat;asm - - - - - Source Files - - - - - Source Files - - - - - - - - - \ No newline at end of file diff --git a/plugins/dev9null/Windows/ProjectRootDir.props b/plugins/dev9null/Windows/ProjectRootDir.props deleted file mode 100644 index 423e907385..0000000000 --- a/plugins/dev9null/Windows/ProjectRootDir.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - $(ProjectRootDir)\..\.. - $(SvnRootDir)\common - - - <_ProjectFileVersion>10.0.30128.1 - - - - $(SvnRootDir) - - - \ No newline at end of file diff --git a/plugins/dev9null/Windows/dev9null.def b/plugins/dev9null/Windows/dev9null.def deleted file mode 100644 index 1f2c4d326b..0000000000 --- a/plugins/dev9null/Windows/dev9null.def +++ /dev/null @@ -1,36 +0,0 @@ -; DEV9null.def : Declares the module parameters for the DLL. - - -;LIBRARY "DEV9null" -;DESCRIPTION 'DEV9null Driver' - - -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 - DEV9irqCallback @20 - DEV9irqHandler @21 - DEV9dmaRead - DEV9dmaWrite - DEV9dmaInterrupt - - DEV9setSettingsDir - DEV9setLogDir