From d21c01f8d19540cee2320e5449ba8dc738572157 Mon Sep 17 00:00:00 2001 From: Christian Kenny Date: Sat, 14 May 2022 21:57:00 -0400 Subject: [PATCH] Core: Remove unused code/includes. --- pcsx2/CDVD/CDVD.cpp | 2 +- pcsx2/CDVD/CDVD.h | 1 - pcsx2/CDVD/CDVDaccess.cpp | 2 +- pcsx2/CDVD/CDVDisoReader.cpp | 3 +- pcsx2/CDVD/CDVDisoReader.h | 23 ----- pcsx2/CMakeLists.txt | 1 - pcsx2/FiFo.cpp | 3 - pcsx2/Gif.h | 1 - pcsx2/IopHw.h | 2 - pcsx2/R5900.h | 2 - pcsx2/SPU2/defs.h | 5 - pcsx2/SPU2/spu2sys.cpp | 13 --- pcsx2/Sif.h | 3 - pcsx2/Sifcmd.h | 166 -------------------------------- pcsx2/pcsx2core.vcxproj | 1 - pcsx2/pcsx2core.vcxproj.filters | 3 - 16 files changed, 3 insertions(+), 228 deletions(-) delete mode 100644 pcsx2/CDVD/CDVDisoReader.h diff --git a/pcsx2/CDVD/CDVD.cpp b/pcsx2/CDVD/CDVD.cpp index 14cccd09fa..098a89ad9d 100644 --- a/pcsx2/CDVD/CDVD.cpp +++ b/pcsx2/CDVD/CDVD.cpp @@ -30,7 +30,7 @@ #include "Ps1CD.h" #include "CDVD.h" #include "CDVD_internal.h" -#include "CDVDisoReader.h" +#include "IsoFileFormats.h" #include "GS.h" // for gsVideoMode #include "Elfheader.h" diff --git a/pcsx2/CDVD/CDVD.h b/pcsx2/CDVD/CDVD.h index f6514defed..d02f668e99 100644 --- a/pcsx2/CDVD/CDVD.h +++ b/pcsx2/CDVD/CDVD.h @@ -169,7 +169,6 @@ extern void cdvdVsync(); extern void cdvdActionInterrupt(); extern void cdvdSectorReady(); extern void cdvdReadInterrupt(); -extern void cdvdDMAInterrupt(); // We really should not have a function with the exact same name as a callback except for case! extern void cdvdNewDiskCB(); diff --git a/pcsx2/CDVD/CDVDaccess.cpp b/pcsx2/CDVD/CDVDaccess.cpp index a25bcddc26..1ca491682f 100644 --- a/pcsx2/CDVD/CDVDaccess.cpp +++ b/pcsx2/CDVD/CDVDaccess.cpp @@ -30,7 +30,7 @@ #include "IsoFS/IsoFS.h" #include "IsoFS/IsoFSCDVD.h" -#include "CDVDisoReader.h" +#include "IsoFileFormats.h" #include "common/FileSystem.h" #include "common/StringUtil.h" diff --git a/pcsx2/CDVD/CDVDisoReader.cpp b/pcsx2/CDVD/CDVDisoReader.cpp index 8461141fea..af2ed852a2 100644 --- a/pcsx2/CDVD/CDVDisoReader.cpp +++ b/pcsx2/CDVD/CDVDisoReader.cpp @@ -21,8 +21,7 @@ */ #include "PrecompiledHeader.h" - -#include "CDVDisoReader.h" +#include "IsoFileFormats.h" #include "AsyncFileReader.h" #include "CDVD/CDVD.h" diff --git a/pcsx2/CDVD/CDVDisoReader.h b/pcsx2/CDVD/CDVDisoReader.h deleted file mode 100644 index aed8ab21ea..0000000000 --- a/pcsx2/CDVD/CDVDisoReader.h +++ /dev/null @@ -1,23 +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 . - */ - -#ifndef __CDVD_ISO_READER_H__ -#define __CDVD_ISO_READER_H__ - -#include - -#include "IsoFileFormats.h" - -#endif diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index d81fc0a0ba..c0128ada25 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -281,7 +281,6 @@ set(pcsx2CDVDHeaders CDVD/CDVD.h CDVD/CDVD_internal.h CDVD/CDVDdiscReader.h - CDVD/CDVDisoReader.h CDVD/ChunksCache.h CDVD/CompressedFileReader.h CDVD/ChdFileReader.h diff --git a/pcsx2/FiFo.cpp b/pcsx2/FiFo.cpp index 522cb56dc6..23211e5568 100644 --- a/pcsx2/FiFo.cpp +++ b/pcsx2/FiFo.cpp @@ -17,13 +17,10 @@ #include "PrecompiledHeader.h" #include "Common.h" -#include "GS.h" #include "Gif.h" #include "Gif_Unit.h" #include "Vif.h" #include "Vif_Dma.h" -#include "IPU/IPU.h" -#include "IPU/IPU_Fifo.h" ////////////////////////////////////////////////////////////////////////// /////////////////////////// Quick & dirty FIFO :D //////////////////////// diff --git a/pcsx2/Gif.h b/pcsx2/Gif.h index 4873cdfdc6..51d4ce0404 100644 --- a/pcsx2/Gif.h +++ b/pcsx2/Gif.h @@ -283,7 +283,6 @@ struct GIFregisters static GIFregisters& gifRegs = (GIFregisters&)eeHw[0x3000]; extern void gifInterrupt(); -extern int _GIFchain(); extern void GIFdma(); extern void dmaGIF(); extern void mfifoGIFtransfer(); diff --git a/pcsx2/IopHw.h b/pcsx2/IopHw.h index 7b434fddab..03d0d6b0b4 100644 --- a/pcsx2/IopHw.h +++ b/pcsx2/IopHw.h @@ -329,8 +329,6 @@ extern void PSX_INT( IopEventId n, s32 ecycle); extern void psxSetNextBranch( u32 startCycle, s32 delta ); extern void psxSetNextBranchDelta( s32 delta ); -extern int iopTestCycle( u32 startCycle, s32 delta ); -extern void _iopTestInterrupts(); extern void psxHwReset(); extern u8 psxHw4Read8 (u32 add); diff --git a/pcsx2/R5900.h b/pcsx2/R5900.h index 208e2b29c9..fbed6daa60 100644 --- a/pcsx2/R5900.h +++ b/pcsx2/R5900.h @@ -418,8 +418,6 @@ extern void CPU_INT( EE_EventType n, s32 ecycle ); extern uint intcInterrupt(); extern uint dmacInterrupt(); - -extern void cpuInit(); extern void cpuReset(); // can throw Exception::FileNotFound. extern void cpuException(u32 code, u32 bd); extern void cpuTlbMissR(u32 addr, u32 bd); diff --git a/pcsx2/SPU2/defs.h b/pcsx2/SPU2/defs.h index 6f9512ef20..5d8605de8a 100644 --- a/pcsx2/SPU2/defs.h +++ b/pcsx2/SPU2/defs.h @@ -535,11 +535,6 @@ struct V_Core void LogAutoDMA(FILE* fp); - s32 NewDmaRead(u32* data, u32 bytesLeft, u32* bytesProcessed); - s32 NewDmaWrite(u32* data, u32 bytesLeft, u32* bytesProcessed); - void NewDmaInterrupt(); - - // old dma only void DoDMAwrite(u16* pMem, u32 size); void DoDMAread(u16* pMem, u32 size); void FinishDMAread(); diff --git a/pcsx2/SPU2/spu2sys.cpp b/pcsx2/SPU2/spu2sys.cpp index 4f984db5ae..27006a06ad 100644 --- a/pcsx2/SPU2/spu2sys.cpp +++ b/pcsx2/SPU2/spu2sys.cpp @@ -214,9 +214,7 @@ void V_Core::Init(int index) } DMAICounter = 0; - AutoDmaFree = 0; AdmaInProgress = false; - DmaStarted = false; Regs.STATX = 0x80; Regs.ENDX = 0xffffff; // PS2 confirmed @@ -282,17 +280,6 @@ void V_Core::UpdateEffectsBufferSize() { const s32 newbufsize = EffectsEndA - EffectsStartA + 1; - if ((newbufsize * 2) > 0x20000) // max 128kb per core - { - //printf("too big, returning\n"); - //return; - } - - // bad optimization? - //if (newbufsize == EffectsBufferSize && EffectsStartA == EffectsBufferStart) return; - - //printf("Rvb Area change: ESA = %x, EEA = %x, Size(dec) = %d, Size(hex) = %x FxEnable = %d\n", EffectsStartA, EffectsEndA, newbufsize * 2, newbufsize * 2, FxEnable); - RevBuffers.NeedsUpdated = false; EffectsBufferSize = newbufsize; EffectsBufferStart = EffectsStartA; diff --git a/pcsx2/Sif.h b/pcsx2/Sif.h index 227deea45a..010b5e2915 100644 --- a/pcsx2/Sif.h +++ b/pcsx2/Sif.h @@ -18,9 +18,6 @@ static const int FIFO_SIF_W = 128; -// psxdev: was here on the initial psx merge -//static u32 sif2fifostat = (u32&)eeHw[0xf380]; - // Despite its name, this is actually the IOP's DMAtag, which itself also contains // the EE's DMAtag in its upper 64 bits. Note that only the lower 24 bits of 'data' is // the IOP's chain transfer address (loaded into MADR). Bits 30 and 31 are transfer stop diff --git a/pcsx2/Sifcmd.h b/pcsx2/Sifcmd.h index 461a0624cb..ebb1f96866 100644 --- a/pcsx2/Sifcmd.h +++ b/pcsx2/Sifcmd.h @@ -16,18 +16,6 @@ #ifndef __SIFCMD_H__ #define __SIFCMD_H__ -/* from sifcmd.h */ - -//#define SYSTEM_CMD 0x80000000 -// -//struct t_sif_cmd_header -//{ -// u32 size; -// void *dest; -// s32 command; -// u32 unknown; -//}; - struct t_sif_dma_transfer { void *src; @@ -35,159 +23,5 @@ struct t_sif_dma_transfer s32 size; s32 attr; }; -// -//struct t_sif_handler -//{ -// void (*handler)(void *a, void *b); -// void *buff; -//}; -// -//#define SYSTEM_CMD_CHANGE_SADDR 0x80000000 -//#define SYSTEM_CMD_INIT_CMD 0x80000002 -//struct t_sif_saddr -//{ -// struct t_sif_cmd_header hdr; //+00 -// void *newaddr; //+10 -//}; //=14 -// -//#define SYSTEM_CMD_SET_SREG 0x80000001 -//struct t_sif_sreg -//{ -// struct t_sif_cmd_header hdr; //+00 -// s32 index; //+10 -// u32 value; //+14 -//}; //=18 -// -//#define SYSTEM_CMD_RESET 0x80000003 -//struct t_sif_reset -//{ -// struct t_sif_cmd_header hdr; //+00 -// s32 size; //+10 -// s32 flag; //+14 -// char data[80]; //+18 -//}; //=68 - -/* end of sifcmd.h */ - -/* from sifsrpc.h */ - -//struct t_sif_rpc_rend -//{ -// struct t_sif_cmd_header sifcmd; -// s32 rec_id; /* 04 */ -// void *pkt_addr; /* 05 */ -// s32 rpc_id; /* 06 */ -// -// struct t_rpc_client_data *client; /* 7 */ -// u32 command; /* 8 */ -// struct t_rpc_server_data *server; /* 9 */ -// void *buff; /* 10 */ -// void *buff2; /* 11 */ -//}; -// -//struct t_sif_rpc_other_data -//{ -// struct t_sif_cmd_header sifcmd; -// s32 rec_id; /* 04 */ -// void *pkt_addr; /* 05 */ -// s32 rpc_id; /* 06 */ -// -// struct t_rpc_receive_data *receive; /* 07 */ -// void *src; /* 08 */ -// void *dest; /* 09 */ -// s32 size; /* 10 */ -//}; -// -//struct t_sif_rpc_bind -//{ -// struct t_sif_cmd_header sifcmd; -// s32 rec_id; /* 04 */ -// void *pkt_addr; /* 05 */ -// s32 rpc_id; /* 06 */ -// struct t_rpc_client_data *client; /* 07 */ -// s32 rpc_number; /* 08 */ -//}; -// -//struct t_sif_rpc_call -//{ -// struct t_sif_cmd_header sifcmd; -// s32 rec_id; /* 04 */ -// void *pkt_addr; /* 05 */ -// s32 rpc_id; /* 06 */ -// struct t_rpc_client_data *client; /* 07 */ -// s32 rpc_number; /* 08 */ -// s32 send_size; /* 09 */ -// void *receive; /* 10 */ -// s32 rec_size; /* 11 */ -// s32 has_async_ef; /* 12 */ -// struct t_rpc_server_data *server; /* 13 */ -//}; -// -//struct t_rpc_server_data -//{ -// s32 command; /* 04 00 */ -// -// void *(*func)(u32, void *, int); /* 05 01 */ -// void *buff; /* 06 02 */ -// s32 size; /* 07 03 */ -// -// void *(*func2)(u32, void *, int); /* 08 04 */ -// void *buff2; /* 09 05 */ -// s32 size2; /* 10 06 */ -// -// struct t_rpc_client_data *client; /* 11 07 */ -// void *pkt_addr; /* 12 08 */ -// s32 rpc_number; /* 13 09 */ -// -// void *receive; /* 14 10 */ -// s32 rec_size; /* 15 11 */ -// s32 has_async_ef; /* 16 12 */ -// s32 rec_id; /* 17 13 */ -// -// struct t_rpc_server_data *link; /* 18 14 */ -// struct r_rpc_server_data *next; /* 19 15 */ -// struct t_rpc_data_queue *queued_object; /* 20 16 */ -//}; -// -// -//struct t_rpc_header -//{ -// void *pkt_addr; /* 04 00 */ -// u32 rpc_id; /* 05 01 */ -// s32 sema_id; /* 06 02 */ -// u32 mode; /* 07 03 */ -//}; -// -// -//struct t_rpc_client_data -//{ -// struct t_rpc_header hdr; -// u32 command; /* 04 08 */ -// void *buff; /* 05 09 */ -// void *buff2; /* 06 10 */ -// void (*end_function)(void *); /* 07 11 */ -// void *end_param; /* 08 12*/ -// struct t_rpc_server_data *server; /* 09 13 */ -//}; -// -//struct t_rpc_receive_data -//{ -// struct t_rpc_header hdr; -// void *src; /* 04 */ -// void *dest; /* 05 */ -// s32 size; /* 06 */ -//}; -// -//struct t_rpc_data_queue -//{ -// s32 thread_id; /* 00 */ -// s32 active; /* 01 */ -// struct t_rpc_server_data *svdata_ref; /* 02 */ -// struct t_rpc_server_data *start; /* 03 */ -// struct t_rpc_server_data *end; /* 04 */ -// struct t_rpc_data_queue *next; /* 05 */ -//}; - -/* end of sifrpc.h */ #endif//__SIFCMD_H__ diff --git a/pcsx2/pcsx2core.vcxproj b/pcsx2/pcsx2core.vcxproj index ae4d72c49a..a46816549f 100644 --- a/pcsx2/pcsx2core.vcxproj +++ b/pcsx2/pcsx2core.vcxproj @@ -701,7 +701,6 @@ - diff --git a/pcsx2/pcsx2core.vcxproj.filters b/pcsx2/pcsx2core.vcxproj.filters index 08cc889df0..ae318a025c 100644 --- a/pcsx2/pcsx2core.vcxproj.filters +++ b/pcsx2/pcsx2core.vcxproj.filters @@ -1472,9 +1472,6 @@ System\Ps2\Iop\CDVD - - System\Ps2\Iop\CDVD - System\Ps2\IPU