Common: Remove obsolete/unused code

This commit is contained in:
Christian Kenny 2021-02-20 16:15:49 -05:00 committed by refractionpcsx2
parent e703a7b5b7
commit e9e7974b15
9 changed files with 0 additions and 445 deletions

View File

@ -18,17 +18,11 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Include", "Include", "{0FADC26C-0E9D-4DD7-84B1-BF4F7754E90C}"
ProjectSection(SolutionItems) = preProject
common\include\afxresmw.h = common\include\afxresmw.h
common\include\Pcsx2Api.h = common\include\Pcsx2Api.h
common\include\Pcsx2Defs.h = common\include\Pcsx2Defs.h
common\include\Pcsx2Types.h = common\include\Pcsx2Types.h
common\include\PluginCallbacks.h = common\include\PluginCallbacks.h
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "wx", "wx", "{62BF822E-6A12-49A8-BE8C-C55A9BCA24DA}"
ProjectSection(SolutionItems) = preProject
common\include\wx\folderdesc.txt = common\include\wx\folderdesc.txt
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{2D6F0A62-A247-4CCF-947F-FCD54BE16103}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pcsx2", "pcsx2\windows\VCprojects\pcsx2.vcxproj", "{1CEFD830-2B76-4596-A4EE-BCD7280A60BD}"
@ -513,7 +507,6 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{0FADC26C-0E9D-4DD7-84B1-BF4F7754E90C} = {88F517F9-CE1C-4005-9BDF-4481FEB55053}
{62BF822E-6A12-49A8-BE8C-C55A9BCA24DA} = {0FADC26C-0E9D-4DD7-84B1-BF4F7754E90C}
{18E42F6F-3A62-41EE-B42F-79366C4F1E95} = {703FD00B-D7A0-41E3-BD03-CEC86B385DAF}
{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}

View File

@ -73,32 +73,11 @@ typedef struct _keyEvent
///////////////////////////////////////////////////////////////////////
#if defined(GSdefs) || defined(SIOdefs)
#define COMMONdefs
#endif
// PS2EgetLibType returns (may be OR'd)
#define PS2E_LT_GS 0x01
#define PS2E_LT_SIO 0x80
// PS2EgetLibVersion2 (high 16 bits)
#define PS2E_GS_VERSION 0x0006
#define PS2E_SIO_VERSION 0x0001
#ifdef COMMONdefs
#ifdef __cplusplus
extern "C" {
#endif
u32 CALLBACK PS2EgetLibType(void);
u32 CALLBACK PS2EgetLibVersion2(u32 type);
const char *CALLBACK PS2EgetLibName(void);
#ifdef __cplusplus
}
#endif
#endif
// key values:
/* key values must be OS dependant:
@ -109,19 +88,6 @@ const char *CALLBACK PS2EgetLibName(void);
// for 64bit compilers
typedef char __keyEvent_Size__[(sizeof(keyEvent) == 8) ? 1 : -1];
// plugin types
#define SIO_TYPE_MTAP 0x00000004
#define SIO_TYPE_RM 0x00000040
#define SIO_TYPE_MC 0x00000100
typedef int(CALLBACK *SIOchangeSlotCB)(int slot);
typedef struct _GSdriverInfo
{
char name[8];
void *common;
} GSdriverInfo;
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -1,106 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* 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/>.
*/
#ifndef __PCSX2API_H__
#define __PCSX2API_H__
// Note; this header is experimental, and will be a shifting target. Only use this if you are willing to repeatedly fix breakage.
/*
* Based on PS2E Definitions by
linuzappz@hotmail.com,
* shadowpcsx2@yahoo.gr,
* and florinsasu@hotmail.com
*/
#include "Pcsx2Types.h"
#include "Pcsx2Defs.h"
// Indicate to use the new versions.
#define NEW_PLUGIN_APIS
#ifdef _MSC_VER
#define EXPORT_C(type) extern "C" type CALLBACK
#else
#define EXPORT_C(type) extern "C" __attribute__((externally_visible, visibility("default"))) type
#endif
EXPORT_C(u32)
PS2EgetLibType(void);
EXPORT_C(u32)
PS2EgetLibVersion2(u32 type);
EXPORT_C(char *)
PS2EgetLibName(void);
// Extended functions.
// allows the plugin to see the whole configuration when started up.
// Intended for them to get the ini and plugin paths, but could allow for other things as well.
EXPORT_C_(void)
PS2EpassConfig(PcsxConfig Config);
// Alternately, this function serves the same purpose, but would work for emulators outside
// of pcsx2.
EXPORT_C_(void)
PS2EpassIniPath(const char *path);
// PS2EgetLibType returns (may be OR'd)
enum {
PS2E_LT_GS = 0x01,
PS2E_LT_PAD = 0x02, // -=[ OBSOLETE ]=-
PS2E_LT_SPU2 = 0x04,
PS2E_LT_CDVD = 0x08,
PS2E_LT_DEV9 = 0x10,
PS2E_LT_USB = 0x20,
PS2E_LT_FW = 0x40,
PS2E_LT_SIO = 0x80
} PluginLibType;
// PS2EgetLibVersion2 (high 16 bits)
enum {
PS2E_GS_VERSION = 0x0006,
PS2E_PAD_VERSION = 0x0002, // -=[ OBSOLETE ]=-
PS2E_SPU2_VERSION = 0x0005,
PS2E_CDVD_VERSION = 0x0005,
PS2E_DEV9_VERSION = 0x0003,
PS2E_USB_VERSION = 0x0003,
PS2E_FW_VERSION = 0x0002,
PS2E_SIO_VERSION = 0x0001
} PluginLibVersion;
// freeze modes:
enum {
FREEZE_LOAD = 0,
FREEZE_SAVE = 1,
FREEZE_SIZE = 2
} FreezeModes;
typedef struct _GSdriverInfo
{
char name[8];
void *common;
} GSdriverInfo;
#ifdef _MSC_VER
typedef struct _winInfo
{ // unsupported values must be set to zero
HWND hWnd;
HMENU hMenu;
HWND hStatusWnd;
} winInfo;
#endif
#endif // __PCSX2API_H__

View File

@ -16,9 +16,6 @@
#ifndef __PCSX2DEFS_H__
#define __PCSX2DEFS_H__
// Indicate that this is the wx port to the plugins.
#define WX_PCSX2
#ifdef __CYGWIN__
#define __linux__
#endif
@ -119,30 +116,6 @@ static const u8 IsDebugBuild = 0;
#define PCSX2_PAGESIZE 0x1000
static const int __pagesize = PCSX2_PAGESIZE;
// --------------------------------------------------------------------------------------
// Structure Packing (__packed)
// --------------------------------------------------------------------------------------
// Current Method:
// Use a combination of embedded compiler-specific #pragma mess in conjunction with a
// __packed macro. The former appeases the MSVC gods, the latter appeases the GCC gods.
// The end result looks something like this:
//
// #ifdef _MSC_VER
// # pragma pack(1)
// #endif
//
// struct SomeKindaFail {
// u8 neat;
// u32 unaligned32;
// } __packed;
//
// MSVC 2008 and better support __pragma, however there's no way to support that in
// a way that's backwards compatible to VS 2005, without still including the old-style
// #pragma mess. So there's really not much point (yet) in using it. I've included macros
// that utilize __pragma (commented out below) which can be deployed at a time when we
// are ok with the idea of completely breaking backwards compat with VC2005/prior.
//
// --------------------------------------------------------------------------------------
// Microsoft Visual Studio
// --------------------------------------------------------------------------------------
@ -161,12 +134,6 @@ static const int __pagesize = PCSX2_PAGESIZE;
#define __aligned32 __declspec(align(32))
#define __pagealigned __declspec(align(PCSX2_PAGESIZE))
// Deprecated; use __align instead.
#define PCSX2_ALIGNED(alig, x) __declspec(align(alig)) x
#define PCSX2_ALIGNED_EXTERN(alig, x) extern __declspec(align(alig)) x
#define PCSX2_ALIGNED16(x) __declspec(align(16)) x
#define PCSX2_ALIGNED16_EXTERN(x) extern __declspec(align(16)) x
#define __noinline __declspec(noinline)
// Don't know if there are Visual C++ equivalents of these.
@ -190,11 +157,6 @@ static const int __pagesize = PCSX2_PAGESIZE;
#define __aligned16 __attribute__((aligned(16)))
#define __aligned32 __attribute__((aligned(32)))
#define __pagealigned __attribute__((aligned(PCSX2_PAGESIZE)))
// Deprecated; use __align instead.
#define PCSX2_ALIGNED(alig, x) x __attribute((aligned(alig)))
#define PCSX2_ALIGNED16(x) x __attribute((aligned(16)))
#define PCSX2_ALIGNED_EXTERN(alig, x) extern x __attribute((aligned(alig)))
#define PCSX2_ALIGNED16_EXTERN(x) extern x __attribute((aligned(16)))
#define __assume(cond) ((void)0) // GCC has no equivalent for __assume
#define CALLBACK __attribute__((stdcall))

View File

@ -1,130 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2018 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 "PS2Eext.h"
#if defined(_WIN32)
#include <windows.h>
#include "resource.h"
#elif defined(__unix__) || defined(__APPLE__)
#include <wx/wx.h>
#endif
#include <string>
PluginLog g_plugin_log;
#if defined(_WIN32)
static HINSTANCE s_hinstance;
BOOL APIENTRY DllMain(HINSTANCE hinstance, DWORD reason, LPVOID /* reserved */)
{
if (reason == DLL_PROCESS_ATTACH)
s_hinstance = hinstance;
return TRUE;
}
static INT_PTR CALLBACK ConfigureDialogProc(HWND dialog, UINT message, WPARAM wparam, LPARAM lparam)
{
switch (message) {
case WM_INITDIALOG:
CheckDlgButton(dialog, IDC_LOG_TO_CONSOLE, g_plugin_log.WriteToConsole);
CheckDlgButton(dialog, IDC_LOG_TO_FILE, g_plugin_log.WriteToFile);
return TRUE;
case WM_COMMAND:
switch (LOWORD(wparam)) {
case IDOK:
g_plugin_log.WriteToConsole = IsDlgButtonChecked(dialog, IDC_LOG_TO_CONSOLE) == BST_CHECKED;
g_plugin_log.WriteToFile = IsDlgButtonChecked(dialog, IDC_LOG_TO_FILE) == BST_CHECKED;
EndDialog(dialog, 0);
return TRUE;
case IDCANCEL:
EndDialog(dialog, 0);
return TRUE;
default:
return FALSE;
}
default:
return FALSE;
}
}
void ConfigureLogging()
{
DialogBox(s_hinstance, MAKEINTRESOURCE(IDD_DIALOG), GetActiveWindow(), ConfigureDialogProc);
}
#elif defined(__unix__) || defined(__APPLE__)
void ConfigureLogging()
{
auto *dialog = new wxDialog;
dialog->Create(nullptr, wxID_ANY, "Config", wxDefaultPosition, wxDefaultSize, wxCAPTION | wxCLOSE_BOX);
auto *main_sizer = new wxBoxSizer(wxVERTICAL);
auto *sizer = dialog->CreateButtonSizer(wxOK | wxCANCEL);
auto *log_check = new wxCheckBox(dialog, wxID_ANY, "Log to Console");
auto *file_check = new wxCheckBox(dialog, wxID_ANY, "Log to File");
log_check->SetValue(g_plugin_log.WriteToConsole);
file_check->SetValue(g_plugin_log.WriteToFile);
main_sizer->Add(log_check);
main_sizer->Add(file_check);
main_sizer->Add(sizer);
dialog->SetSizerAndFit(main_sizer);
if ( dialog->ShowModal() == wxID_OK )
{
g_plugin_log.WriteToConsole = log_check->GetValue();
g_plugin_log.WriteToFile = file_check->GetValue();
}
wxDELETE(dialog);
}
#else
void ConfigureLogging()
{
}
#endif
void SaveConfig(const std::string &pathname)
{
PluginConf ini;
if (!ini.Open(pathname, WRITE_FILE)) {
g_plugin_log.WriteLn("Failed to open %s", pathname.c_str());
return;
}
ini.WriteInt("write_to_console", g_plugin_log.WriteToConsole);
ini.WriteInt("write_to_file", g_plugin_log.WriteToFile);
ini.Close();
}
void LoadConfig(const std::string &pathname)
{
PluginConf ini;
if (!ini.Open(pathname, READ_FILE)) {
g_plugin_log.WriteLn("Failed to open %s", pathname.c_str());
SaveConfig(pathname);
return;
}
g_plugin_log.WriteToConsole = ini.ReadInt("write_to_console", 0) != 0;
g_plugin_log.WriteToFile = ini.ReadInt("write_to_file", 0) != 0;
ini.Close();
}

View File

@ -1,106 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United Kingdom) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_DIALOG DIALOGEX 0, 0, 123, 53
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Config"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,7,32,50,14
PUSHBUTTON "Cancel",IDCANCEL,66,32,50,14
CONTROL "Log to console",IDC_LOG_TO_CONSOLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,62,10
CONTROL "Log to file",IDC_LOG_TO_FILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,19,47,10
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 116
TOPMARGIN, 7
BOTTOMMARGIN, 46
END
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// AFX_DIALOG_LAYOUT
//
IDD_DIALOG AFX_DIALOG_LAYOUT
BEGIN
0
END
#endif // English (United Kingdom) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -1,18 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by null.rc
//
#define IDD_DIALOG 101
#define IDC_LOG_TO_CONSOLE 1001
#define IDC_LOG_TO_FILE 1002
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 103
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1002
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@ -327,8 +327,6 @@ void recMOVZtemp_const()
g_cpuConstRegs[_Rd_].UD[0] = g_cpuConstRegs[_Rs_].UD[0];
}
//static PCSX2_ALIGNED16(u32 s_zero[4]) = {0,0,0xffffffff, 0xffffffff};
void recMOVZtemp_consts(int info)
{
xMOV(eax, ptr[&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] ]);

View File

@ -555,8 +555,6 @@ void recMADD()
xMOV(ptr[&cpuRegs.HI.UL[1]], edx);
}
//static PCSX2_ALIGNED16(u32 s_MaddMask[]) = { 0x80000000, 0, 0x80000000, 0 };
void recMADDU()
{
if( GPR_IS_CONST2(_Rs_, _Rt_) ) {
@ -693,8 +691,6 @@ void recMADD1()
xMOV(ptr[&cpuRegs.HI.UL[3]], edx);
}
//static PCSX2_ALIGNED16(u32 s_MaddMask[]) = { 0x80000000, 0, 0x80000000, 0 };
void recMADDU1()
{
if( GPR_IS_CONST2(_Rs_, _Rt_) ) {