From ba37f31849038cc9eb100477aa68e3e182615b66 Mon Sep 17 00:00:00 2001 From: arcum42 Date: Sat, 14 Nov 2009 12:02:56 +0000 Subject: [PATCH] Trim and tweak a bunch of includes, and a few headers. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2197 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/CDVD/CDVD.cpp | 7 ++++-- pcsx2/CDVD/CDVDaccess.cpp | 7 +++--- pcsx2/CDVD/CDVDisoReader.cpp | 1 + pcsx2/CDVD/CdRom.cpp | 4 +++- pcsx2/CDVD/IsoFS/IsoFS.cpp | 18 +++++++++++++++- pcsx2/CDVD/IsoFS/IsoFSCDVD.cpp | 17 +++++++++++++++ pcsx2/CDVD/IsoFS/IsoFile.cpp | 18 +++++++++++++++- pcsx2/CDVD/IsoFileFormats.cpp | 5 ++--- pcsx2/COP0.cpp | 5 +---- pcsx2/COP2.cpp | 5 +---- pcsx2/Cache.cpp | 3 +-- pcsx2/Common.h | 20 ++++++----------- pcsx2/Counters.cpp | 4 ++-- pcsx2/Dump.cpp | 1 + pcsx2/Elfheader.cpp | 4 +--- pcsx2/FPU.cpp | 4 +--- pcsx2/FiFo.cpp | 1 - pcsx2/GS.cpp | 4 +--- pcsx2/GSState.cpp | 3 ++- pcsx2/Gif.cpp | 6 ++---- pcsx2/Hardware.h | 25 ++++++++++++++++++++++ pcsx2/Hw.cpp | 15 ++----------- pcsx2/HwRead.cpp | 13 +---------- pcsx2/HwWrite.cpp | 14 +----------- pcsx2/IPU/IPU.cpp | 4 +--- pcsx2/Interpreter.cpp | 3 +-- pcsx2/IopBios.cpp | 4 ++-- pcsx2/IopCommon.h | 12 +++++------ pcsx2/IopCounters.cpp | 2 +- pcsx2/IopDma.cpp | 2 ++ pcsx2/IopHw.cpp | 3 ++- pcsx2/IopSio2.cpp | 2 ++ pcsx2/Linux/pcsx2.cbp | 1 + pcsx2/MMI.cpp | 6 +----- pcsx2/MTGS.cpp | 12 +++++------ pcsx2/Memory.cpp | 8 ++----- pcsx2/Pcsx2Config.cpp | 5 +++-- pcsx2/PluginManager.cpp | 5 +++-- pcsx2/R3000A.cpp | 5 +++-- pcsx2/R3000AInterpreter.cpp | 2 -- pcsx2/R3000AOpcodeTables.cpp | 2 +- pcsx2/R5900.cpp | 20 +++++------------ pcsx2/R5900OpcodeImpl.cpp | 5 +++-- pcsx2/R5900OpcodeTables.cpp | 3 ++- pcsx2/RecoverySystem.cpp | 6 +++--- pcsx2/SPR.cpp | 7 +++--- pcsx2/SaveState.cpp | 11 ++-------- pcsx2/Sif.cpp | 4 +++- pcsx2/Sio.cpp | 3 ++- pcsx2/System.cpp | 13 +++-------- pcsx2/System/SysCoreThread.cpp | 6 ++---- pcsx2/VU0.cpp | 7 +----- pcsx2/VU0micro.cpp | 9 +------- pcsx2/VU0microInterp.cpp | 3 +-- pcsx2/VU1micro.cpp | 6 +----- pcsx2/VU1microInterp.cpp | 3 +-- pcsx2/VUflags.cpp | 3 ++- pcsx2/VUmicroMem.cpp | 6 ++---- pcsx2/VUops.cpp | 4 +--- pcsx2/Vif.cpp | 7 +++--- pcsx2/Vif0Dma.cpp | 7 ++++-- pcsx2/Vif1Dma.cpp | 10 +++++---- pcsx2/VifDma.cpp | 4 ++-- pcsx2/gui/MainMenuClicks.cpp | 1 + pcsx2/gui/Saveslots.cpp | 1 + pcsx2/ps2/BiosTools.cpp | 3 ++- pcsx2/ps2/Iop/IopHwRead.cpp | 3 +++ pcsx2/ps2/Iop/IopHwWrite.cpp | 3 +++ pcsx2/windows/VCprojects/pcsx2.vcxproj | 1 + pcsx2/windows/VCprojects/pcsx2_2008.vcproj | 4 ++++ 70 files changed, 220 insertions(+), 225 deletions(-) create mode 100644 pcsx2/Hardware.h diff --git a/pcsx2/CDVD/CDVD.cpp b/pcsx2/CDVD/CDVD.cpp index cca5dbde4e..0bb6e2c970 100644 --- a/pcsx2/CDVD/CDVD.cpp +++ b/pcsx2/CDVD/CDVD.cpp @@ -14,16 +14,19 @@ */ #include "PrecompiledHeader.h" +#include "IopCommon.h" +#include "AppConfig.h" #include #include -#include "IopCommon.h" +#include "CDVD.h" #include "CDVD_internal.h" #include "CDVDisoReader.h" + #include "GS.h" // for gsRegionMode +#include "Elfheader.h" #include "ps2/BiosTools.h" -#include "AppConfig.h" static cdvdStruct cdvd; diff --git a/pcsx2/CDVD/CDVDaccess.cpp b/pcsx2/CDVD/CDVDaccess.cpp index 591a17f0ba..da91b2e959 100644 --- a/pcsx2/CDVD/CDVDaccess.cpp +++ b/pcsx2/CDVD/CDVDaccess.cpp @@ -15,6 +15,7 @@ #include "PrecompiledHeader.h" +#include "IopCommon.h" #define ENABLE_TIMESTAMPS @@ -25,13 +26,11 @@ #include #include #include - -#include "IopCommon.h" -#include "CDVDisoReader.h" +#include #include "IsoFS/IsoFS.h" #include "IsoFS/IsoFSCDVD.h" -#include +#include "CDVDisoReader.h" const wxChar* CDVD_SourceLabels[] = { diff --git a/pcsx2/CDVD/CDVDisoReader.cpp b/pcsx2/CDVD/CDVDisoReader.cpp index 69cd3550a0..01cf82a1a1 100644 --- a/pcsx2/CDVD/CDVDisoReader.cpp +++ b/pcsx2/CDVD/CDVDisoReader.cpp @@ -21,6 +21,7 @@ */ #include "PrecompiledHeader.h" + #include #include #include diff --git a/pcsx2/CDVD/CdRom.cpp b/pcsx2/CDVD/CdRom.cpp index c760c437e7..fc992beace 100644 --- a/pcsx2/CDVD/CdRom.cpp +++ b/pcsx2/CDVD/CdRom.cpp @@ -15,9 +15,11 @@ #include "PrecompiledHeader.h" - #include "IopCommon.h" +#include "CdRom.h" +#include "CDVD.h" + //THIS ALL IS FOR THE CDROM REGISTERS HANDLING #define CdlSync 0 diff --git a/pcsx2/CDVD/IsoFS/IsoFS.cpp b/pcsx2/CDVD/IsoFS/IsoFS.cpp index 6542b5cb2b..dcb57f965d 100644 --- a/pcsx2/CDVD/IsoFS/IsoFS.cpp +++ b/pcsx2/CDVD/IsoFS/IsoFS.cpp @@ -1,5 +1,21 @@ - +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2009 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 . + */ + + #include "PrecompiledHeader.h" + #include "IsoFS.h" #include "IsoFile.h" diff --git a/pcsx2/CDVD/IsoFS/IsoFSCDVD.cpp b/pcsx2/CDVD/IsoFS/IsoFSCDVD.cpp index c20abdeda2..5e77b60a78 100644 --- a/pcsx2/CDVD/IsoFS/IsoFSCDVD.cpp +++ b/pcsx2/CDVD/IsoFS/IsoFSCDVD.cpp @@ -1,4 +1,21 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2009 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 . + */ + + #include "PrecompiledHeader.h" + #include "IsoFSCDVD.h" #include "../CDVDaccess.h" diff --git a/pcsx2/CDVD/IsoFS/IsoFile.cpp b/pcsx2/CDVD/IsoFS/IsoFile.cpp index 9537a7b335..702b8b16b3 100644 --- a/pcsx2/CDVD/IsoFS/IsoFile.cpp +++ b/pcsx2/CDVD/IsoFS/IsoFile.cpp @@ -1,4 +1,20 @@ -#include "PrecompiledHeader.h" +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2009 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 . + */ + + + #include "PrecompiledHeader.h" #include "IsoFS.h" #include "IsoFile.h" diff --git a/pcsx2/CDVD/IsoFileFormats.cpp b/pcsx2/CDVD/IsoFileFormats.cpp index 232ccc0ae7..1b5c3fd473 100644 --- a/pcsx2/CDVD/IsoFileFormats.cpp +++ b/pcsx2/CDVD/IsoFileFormats.cpp @@ -16,14 +16,13 @@ #include "PrecompiledHeader.h" #include "IopCommon.h" -//#include "IsoFStools.h" -//#include "IsoFSdrv.h" -#include "IsoFileFormats.h" #include #include #include +#include "IsoFileFormats.h" + int detect(isoFile *iso) { u8 buf[2448]; diff --git a/pcsx2/COP0.cpp b/pcsx2/COP0.cpp index ce30747867..fb0ddd32e0 100644 --- a/pcsx2/COP0.cpp +++ b/pcsx2/COP0.cpp @@ -15,10 +15,7 @@ #include "PrecompiledHeader.h" - #include "Common.h" -#include "R5900.h" -#include "R5900OpcodeTables.h" u32 s_iLastCOP0Cycle = 0; u32 s_iLastPERFCycle[2] = { 0, 0 }; @@ -557,4 +554,4 @@ void EI() { } } -} } } } // end namespace R5900::Interpreter::OpcodeImpl \ No newline at end of file +} } } } // end namespace R5900::Interpreter::OpcodeImpl diff --git a/pcsx2/COP2.cpp b/pcsx2/COP2.cpp index 99faa3714b..a2b846fb2c 100644 --- a/pcsx2/COP2.cpp +++ b/pcsx2/COP2.cpp @@ -15,12 +15,9 @@ #include "PrecompiledHeader.h" - #include "Common.h" -#include "DebugTools/Debug.h" -#include "R5900.h" + #include "R5900OpcodeTables.h" -#include "VUops.h" #include "VUmicro.h" using namespace R5900; diff --git a/pcsx2/Cache.cpp b/pcsx2/Cache.cpp index ed22c2a259..03d598b579 100644 --- a/pcsx2/Cache.cpp +++ b/pcsx2/Cache.cpp @@ -15,7 +15,6 @@ #include "PrecompiledHeader.h" - #include "Common.h" #include "Cache.h" @@ -396,4 +395,4 @@ void CACHE() { #endif -}} \ No newline at end of file +}} diff --git a/pcsx2/Common.h b/pcsx2/Common.h index c2d0dd7e18..02f3c8176f 100644 --- a/pcsx2/Common.h +++ b/pcsx2/Common.h @@ -17,23 +17,17 @@ #include "Pcsx2Defs.h" -#define BIAS 2 // Bus is half of the actual ps2 speed -//#define PS2CLK 36864000 /* 294.912 mhz */ -//#define PSXCLK 9216000 /* 36.864 Mhz */ -//#define PSXCLK 186864000 /* 36.864 Mhz */ -#define PS2CLK 294912000 //hz /* 294.912 mhz */ - #include "System.h" - -#include "Plugins.h" -#include "SaveState.h" - -#include "DebugTools/Debug.h" #include "Memory.h" #include "Hw.h" - #include "R5900.h" -#include "Elfheader.h" + +#include "SaveState.h" +#include "DebugTools/Debug.h" + +static const u32 BIAS = 2; // Bus is half of the actual ps2 speed +static const u32 PS2CLK = 294912000; //hz /* 294.912 mhz */ +//#define PS2CLK 36864000 /* 294.912 mhz */ static const ConsoleColors ConColor_IOP = Color_Yellow; static const ConsoleColors ConColor_EE = Color_Cyan; diff --git a/pcsx2/Counters.cpp b/pcsx2/Counters.cpp index b41a3efc9d..fe44142b59 100644 --- a/pcsx2/Counters.cpp +++ b/pcsx2/Counters.cpp @@ -15,13 +15,13 @@ #include "PrecompiledHeader.h" +#include "Common.h" #include #include -#include "Common.h" -#include "Counters.h" #include "R3000A.h" +#include "Counters.h" #include "IopCounters.h" #include "GS.h" diff --git a/pcsx2/Dump.cpp b/pcsx2/Dump.cpp index 00fd8935e0..1efdc064af 100644 --- a/pcsx2/Dump.cpp +++ b/pcsx2/Dump.cpp @@ -15,6 +15,7 @@ #include "PrecompiledHeader.h" #include "IopCommon.h" + #include "Counters.h" #include "iCore.h" #include "iR5900.h" diff --git a/pcsx2/Elfheader.cpp b/pcsx2/Elfheader.cpp index b0b274e5a4..6c4d17c1b8 100644 --- a/pcsx2/Elfheader.cpp +++ b/pcsx2/Elfheader.cpp @@ -14,10 +14,8 @@ */ #include "PrecompiledHeader.h" - #include "Common.h" -//#include "CDVD/IsoFSdrv.h" -#include "DebugTools/Debug.h" + #include "GS.h" // for sending game crc to mtgs #include "CDVD/IsoFS/IsoFSCDVD.h" diff --git a/pcsx2/FPU.cpp b/pcsx2/FPU.cpp index 276d9f28cd..aadcb60b81 100644 --- a/pcsx2/FPU.cpp +++ b/pcsx2/FPU.cpp @@ -14,11 +14,9 @@ */ #include "PrecompiledHeader.h" +#include "Common.h" #include -#include "Common.h" -#include "R5900.h" -#include "R5900OpcodeTables.h" // Helper Macros //**************************************************************** diff --git a/pcsx2/FiFo.cpp b/pcsx2/FiFo.cpp index a9a22f5b0f..823f36f558 100644 --- a/pcsx2/FiFo.cpp +++ b/pcsx2/FiFo.cpp @@ -19,7 +19,6 @@ #include "GS.h" #include "Vif.h" -#include "VifDma.h" #include "IPU/IPU.h" ////////////////////////////////////////////////////////////////////////// diff --git a/pcsx2/GS.cpp b/pcsx2/GS.cpp index 806009f9a0..fa6e1f0d34 100644 --- a/pcsx2/GS.cpp +++ b/pcsx2/GS.cpp @@ -14,15 +14,13 @@ */ #include "PrecompiledHeader.h" +#include "Common.h" #include -#include "Common.h" #include "GS.h" #include "Gif.h" -#include "iR5900.h" #include "Counters.h" -#include "VifDma.h" using namespace Threading; using namespace R5900; diff --git a/pcsx2/GSState.cpp b/pcsx2/GSState.cpp index b6673da885..9ee56559a8 100644 --- a/pcsx2/GSState.cpp +++ b/pcsx2/GSState.cpp @@ -15,9 +15,10 @@ #include "PrecompiledHeader.h" -#include "GS.h" #include +#include "GS.h" + #ifdef PCSX2_DEVBUILD // GS Playback diff --git a/pcsx2/Gif.cpp b/pcsx2/Gif.cpp index de46b9b4d0..cba6b211c4 100644 --- a/pcsx2/Gif.cpp +++ b/pcsx2/Gif.cpp @@ -14,16 +14,14 @@ */ #include "PrecompiledHeader.h" - #include "Common.h" -#include "VU.h" +#include "Tags.h" + #include "GS.h" #include "Gif.h" #include "VifDma.h" #include "iR5900.h" -#include "Counters.h" -#include "Tags.h" using std::min; diff --git a/pcsx2/Hardware.h b/pcsx2/Hardware.h new file mode 100644 index 0000000000..1867233f4b --- /dev/null +++ b/pcsx2/Hardware.h @@ -0,0 +1,25 @@ +/* PCSX2 - PS2 Emulator for PCs + * Copyright (C) 2002-2009 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 . + */ + +// The full suite of hardware APIs: +#include "Counters.h" +#include "GS.h" +#include "Hw.h" +#include "IPU/IPU.h" +#include "SPR.h" +#include "Gif.h" +#include "Sif.h" +#include "Vif.h" +#include "VifDma.h" diff --git a/pcsx2/Hw.cpp b/pcsx2/Hw.cpp index 3fbcfae217..1f29d44b89 100644 --- a/pcsx2/Hw.cpp +++ b/pcsx2/Hw.cpp @@ -15,22 +15,11 @@ #include "PrecompiledHeader.h" - #include "Common.h" -#include "iR5900.h" -#include "VUmicro.h" -#include "IopMem.h" - -// The full suite of hardware APIs: -#include "IPU/IPU.h" -#include "GS.h" -#include "Counters.h" -#include "Vif.h" -#include "VifDma.h" -#include "SPR.h" -#include "Sif.h" #include "Tags.h" +#include "Hardware.h" + using namespace R5900; u8 *psH; // hw mem diff --git a/pcsx2/HwRead.cpp b/pcsx2/HwRead.cpp index ec509f737d..254505a929 100644 --- a/pcsx2/HwRead.cpp +++ b/pcsx2/HwRead.cpp @@ -15,20 +15,9 @@ #include "PrecompiledHeader.h" - #include "Common.h" -#include "iR5900.h" -#include "VUmicro.h" -#include "IopMem.h" -// The full suite of hardware APIs: -#include "IPU/IPU.h" -#include "GS.h" -#include "Counters.h" -#include "Vif.h" -#include "VifDma.h" -#include "SPR.h" -#include "Sif.h" +#include "Hardware.h" using namespace R5900; diff --git a/pcsx2/HwWrite.cpp b/pcsx2/HwWrite.cpp index 17bda439f4..5ffbd881a4 100644 --- a/pcsx2/HwWrite.cpp +++ b/pcsx2/HwWrite.cpp @@ -15,21 +15,9 @@ #include "PrecompiledHeader.h" - #include "Common.h" -#include "iR5900.h" -#include "VUmicro.h" -#include "IopMem.h" -// The full suite of hardware APIs: -#include "IPU/IPU.h" -#include "GS.h" -#include "Gif.h" -#include "Counters.h" -#include "Vif.h" -#include "VifDma.h" -#include "SPR.h" -#include "Sif.h" +#include "Hardware.h" using namespace R5900; diff --git a/pcsx2/IPU/IPU.cpp b/pcsx2/IPU/IPU.cpp index 3365d0a6d8..56f6709085 100644 --- a/pcsx2/IPU/IPU.cpp +++ b/pcsx2/IPU/IPU.cpp @@ -14,14 +14,12 @@ */ #include "PrecompiledHeader.h" - #include "Common.h" +#include "Tags.h" #include "IPU.h" #include "yuv2rgb.h" - #include "Vif.h" -#include "Tags.h" // Zero cycle IRQ schedules aren't really good, but the IPU uses them. // Better to throw the IRQ inline: diff --git a/pcsx2/Interpreter.cpp b/pcsx2/Interpreter.cpp index 9b79096f0e..5ae3f2d33a 100644 --- a/pcsx2/Interpreter.cpp +++ b/pcsx2/Interpreter.cpp @@ -15,9 +15,8 @@ #include "PrecompiledHeader.h" - #include "Common.h" -#include "R5900.h" + #include "R5900OpcodeTables.h" #include "System/SysThreads.h" diff --git a/pcsx2/IopBios.cpp b/pcsx2/IopBios.cpp index e7da2c291c..6f1aea234c 100644 --- a/pcsx2/IopBios.cpp +++ b/pcsx2/IopBios.cpp @@ -15,9 +15,9 @@ #include "PrecompiledHeader.h" +#include "IopCommon.h" #include -#include "IopCommon.h" namespace R3000A { @@ -331,4 +331,4 @@ void psxBiosShutdown() { } -} // end namespace R3000A \ No newline at end of file +} // end namespace R3000A diff --git a/pcsx2/IopCommon.h b/pcsx2/IopCommon.h index f525eb67c1..4c10164b75 100644 --- a/pcsx2/IopCommon.h +++ b/pcsx2/IopCommon.h @@ -15,16 +15,11 @@ #pragma once -static const s64 PSXCLK = 36864000; /* 36.864 Mhz */ - #include "R3000A.h" #include "Common.h" -#include "CDVD/CdRom.h" #include "CDVD/CDVD.h" - -#include "Sio.h" -#include "Sif.h" +#include "CDVD/CdRom.h" #include "IopDma.h" #include "IopMem.h" @@ -32,3 +27,8 @@ static const s64 PSXCLK = 36864000; /* 36.864 Mhz */ #include "IopBios.h" #include "IopCounters.h" #include "IopSio2.h" + +static const s64 PSXCLK = 36864000; /* 36.864 Mhz */ +//#define PSXCLK 9216000 /* 36.864 Mhz */ +//#define PSXCLK 186864000 /* 36.864 Mhz */ + diff --git a/pcsx2/IopCounters.cpp b/pcsx2/IopCounters.cpp index 4eaf82ed1d..e5e9e84aa0 100644 --- a/pcsx2/IopCounters.cpp +++ b/pcsx2/IopCounters.cpp @@ -19,9 +19,9 @@ // The EventText function will pick it up. #include "PrecompiledHeader.h" +#include "IopCommon.h" #include -#include "IopCommon.h" /* Config.PsxType == 1: PAL: VBlank interlaced 50.00 Hz diff --git a/pcsx2/IopDma.cpp b/pcsx2/IopDma.cpp index 20bab35696..4727a10f90 100644 --- a/pcsx2/IopDma.cpp +++ b/pcsx2/IopDma.cpp @@ -16,6 +16,8 @@ #include "PrecompiledHeader.h" #include "IopCommon.h" +#include "Sif.h" + using namespace R3000A; // Dma0/1 in Mdec.c diff --git a/pcsx2/IopHw.cpp b/pcsx2/IopHw.cpp index 9ce00fad21..39a90657a0 100644 --- a/pcsx2/IopHw.cpp +++ b/pcsx2/IopHw.cpp @@ -15,9 +15,10 @@ #include "PrecompiledHeader.h" - #include "IopCommon.h" + #include "iR5900.h" +#include "Sio.h" // NOTE: Any modifications to read/write fns should also go into their const counterparts // found in iPsxHw.cpp. diff --git a/pcsx2/IopSio2.cpp b/pcsx2/IopSio2.cpp index 52c86e4796..68da425925 100644 --- a/pcsx2/IopSio2.cpp +++ b/pcsx2/IopSio2.cpp @@ -16,6 +16,8 @@ #include "PrecompiledHeader.h" #include "IopCommon.h" + +#include "Sio.h" #include "sio_internal.h" sio2Struct sio2; diff --git a/pcsx2/Linux/pcsx2.cbp b/pcsx2/Linux/pcsx2.cbp index 321f4e3260..8164e95255 100644 --- a/pcsx2/Linux/pcsx2.cbp +++ b/pcsx2/Linux/pcsx2.cbp @@ -166,6 +166,7 @@ + diff --git a/pcsx2/MMI.cpp b/pcsx2/MMI.cpp index bfa4a4ef5f..93cc27ee70 100644 --- a/pcsx2/MMI.cpp +++ b/pcsx2/MMI.cpp @@ -15,11 +15,7 @@ #include "PrecompiledHeader.h" - #include "Common.h" -#include "DebugTools/Debug.h" -#include "R5900.h" -#include "R5900OpcodeTables.h" namespace R5900 { namespace Interpreter { @@ -1627,4 +1623,4 @@ void PEXCW() { // obs: // QFSRV not verified -}}} } // end namespace R5900::Interpreter::OpcodeImpl::MMI \ No newline at end of file +}}} } // end namespace R5900::Interpreter::OpcodeImpl::MMI diff --git a/pcsx2/MTGS.cpp b/pcsx2/MTGS.cpp index 28f893b971..b9845addf9 100644 --- a/pcsx2/MTGS.cpp +++ b/pcsx2/MTGS.cpp @@ -15,17 +15,15 @@ #include "PrecompiledHeader.h" #include "Common.h" -#include "GS.h" - -#include "VU.h" -#include "iR5900.h" -#include "VifDma.h" - -#include "SamplProf.h" #include #include +#include "GS.h" +#include "Elfheader.h" +#include "SamplProf.h" + + // Uncomment this to enable profiling of the GS RingBufferCopy function. //#define PCSX2_GSRING_SAMPLING_STATS diff --git a/pcsx2/Memory.cpp b/pcsx2/Memory.cpp index 442d74c166..7d09930586 100644 --- a/pcsx2/Memory.cpp +++ b/pcsx2/Memory.cpp @@ -35,21 +35,17 @@ BIOS */ #include "PrecompiledHeader.h" +#include "IopCommon.h" #pragma warning(disable:4799) // No EMMS at end of function #include #include -#include "IopCommon.h" -#include "iR5900.h" -#include "ps2/BiosTools.h" - #include "VUmicro.h" #include "GS.h" -#include "IPU/IPU.h" #include "System/PageFaultSource.h" - +#include "ps2/BiosTools.h" #ifdef ENABLECACHE #include "Cache.h" diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index 5362d3a48a..dfc52ba000 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -14,12 +14,13 @@ */ #include "PrecompiledHeader.h" + +#include + #include "IniInterface.h" #include "Config.h" #include "GS.h" -#include - void TraceLogFilters::LoadSave( IniInterface& ini ) { TraceLogFilters defaults; diff --git a/pcsx2/PluginManager.cpp b/pcsx2/PluginManager.cpp index 30e182dd82..b251b501ab 100644 --- a/pcsx2/PluginManager.cpp +++ b/pcsx2/PluginManager.cpp @@ -14,16 +14,17 @@ */ #include "PrecompiledHeader.h" -#include "Utilities/ScopedPtr.h" +#include "IopCommon.h" #include #include -#include "IopCommon.h" #include "GS.h" #include "HostGui.h" #include "CDVD/CDVDisoReader.h" +#include "Utilities/ScopedPtr.h" + #if _MSC_VER # include "svnrev.h" #endif diff --git a/pcsx2/R3000A.cpp b/pcsx2/R3000A.cpp index 162a7695dd..e7381bc2a1 100644 --- a/pcsx2/R3000A.cpp +++ b/pcsx2/R3000A.cpp @@ -15,9 +15,10 @@ #include "PrecompiledHeader.h" - #include "IopCommon.h" -#include "R5900.h" + +#include "Sio.h" +#include "Sif.h" using namespace R3000A; diff --git a/pcsx2/R3000AInterpreter.cpp b/pcsx2/R3000AInterpreter.cpp index 7c34811e5d..63e8fd0b15 100644 --- a/pcsx2/R3000AInterpreter.cpp +++ b/pcsx2/R3000AInterpreter.cpp @@ -14,9 +14,7 @@ */ - #include "PrecompiledHeader.h" - #include "IopCommon.h" using namespace R3000A; diff --git a/pcsx2/R3000AOpcodeTables.cpp b/pcsx2/R3000AOpcodeTables.cpp index a6236e25a0..e4b9336b6f 100644 --- a/pcsx2/R3000AOpcodeTables.cpp +++ b/pcsx2/R3000AOpcodeTables.cpp @@ -13,8 +13,8 @@ * If not, see . */ -#include "PrecompiledHeader.h" +#include "PrecompiledHeader.h" #include "IopCommon.h" extern void zeroEx(); diff --git a/pcsx2/R5900.cpp b/pcsx2/R5900.cpp index 77e8061e0c..a7b9d58732 100644 --- a/pcsx2/R5900.cpp +++ b/pcsx2/R5900.cpp @@ -15,29 +15,18 @@ #include "PrecompiledHeader.h" - #include "Common.h" -#include "Counters.h" -#include "Memory.h" -#include "Hw.h" -#include "DebugTools/Debug.h" +#include "R5900.h" #include "R3000A.h" #include "VUmicro.h" #include "COP0.h" -#include "GS.h" -#include "Gif.h" -#include "IPU/IPU.h" -#include "Vif.h" -#include "VifDma.h" -#include "SPR.h" -#include "Sif.h" - #include "System/SysThreads.h" - #include "R5900Exceptions.h" +#include "Hardware.h" + using namespace R5900; // for R5900 disasm tools s32 EEsCycle; // used to sync the IOP to the EE @@ -95,9 +84,10 @@ void cpuReset() __releaseinline void cpuException(u32 code, u32 bd) { - cpuRegs.branch = 0; // Tells the interpreter that an exception occurred during a branch. bool errLevel2, checkStatus; u32 offset; + + cpuRegs.branch = 0; // Tells the interpreter that an exception occurred during a branch. cpuRegs.CP0.n.Cause = code & 0xffff; if(cpuRegs.CP0.n.Status.b.ERL == 0) diff --git a/pcsx2/R5900OpcodeImpl.cpp b/pcsx2/R5900OpcodeImpl.cpp index f16bc5e425..4ce2e5e6e2 100644 --- a/pcsx2/R5900OpcodeImpl.cpp +++ b/pcsx2/R5900OpcodeImpl.cpp @@ -15,13 +15,14 @@ #include "PrecompiledHeader.h" - #include "Common.h" + +#include + #include "R5900.h" #include "R5900OpcodeTables.h" #include "R5900Exceptions.h" -#include static __forceinline s64 _add64_Overflow( s64 x, s64 y ) { diff --git a/pcsx2/R5900OpcodeTables.cpp b/pcsx2/R5900OpcodeTables.cpp index ee961d90d3..0bc87b7a48 100644 --- a/pcsx2/R5900OpcodeTables.cpp +++ b/pcsx2/R5900OpcodeTables.cpp @@ -17,6 +17,7 @@ //all tables for R5900 are define here.. #include "PrecompiledHeader.h" + #include "R5900OpcodeTables.h" #include "R5900.h" @@ -688,4 +689,4 @@ void (*Int_COP2SPECIAL2PrintTable[128])() = COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown, COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown, COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown,COP2_Unknown, -}; \ No newline at end of file +}; diff --git a/pcsx2/RecoverySystem.cpp b/pcsx2/RecoverySystem.cpp index c188205f75..dbd731ba14 100644 --- a/pcsx2/RecoverySystem.cpp +++ b/pcsx2/RecoverySystem.cpp @@ -15,11 +15,11 @@ #include "PrecompiledHeader.h" +#include "zlib/zlib.h" + #include "App.h" #include "HostGui.h" -#include "zlib/zlib.h" - class _BaseStateThread; static SafeArray state_buffer; @@ -438,4 +438,4 @@ void StateCopy_Clear() bool StateCopy_IsBusy() { return state_buffer_lock.IsLocked(); -} \ No newline at end of file +} diff --git a/pcsx2/SPR.cpp b/pcsx2/SPR.cpp index 0e1b7d7b93..3267a71408 100644 --- a/pcsx2/SPR.cpp +++ b/pcsx2/SPR.cpp @@ -14,13 +14,12 @@ */ #include "PrecompiledHeader.h" - #include "Common.h" -#include "SPR.h" -#include "iR5900.h" -#include "VUmicro.h" #include "Tags.h" +#include "SPR.h" +#include "VUmicro.h" + extern void mfifoGIFtransfer(int); static bool spr0finished = false; diff --git a/pcsx2/SaveState.cpp b/pcsx2/SaveState.cpp index ed181034bd..ef20c706ec 100644 --- a/pcsx2/SaveState.cpp +++ b/pcsx2/SaveState.cpp @@ -15,23 +15,16 @@ #include "PrecompiledHeader.h" - #include "IopCommon.h" #include "SaveState.h" -//#include "CDVD/IsoFSdrv.h" #include "ps2/BiosTools.h" - -#include "VUmicro.h" -#include "VU.h" -#include "iCore.h" -#include "sVU_zerorec.h" - -#include "GS.h" #include "COP0.h" #include "Cache.h" #include "AppConfig.h" +#include "Elfheader.h" + using namespace R5900; static void PreLoadPrep() diff --git a/pcsx2/Sif.cpp b/pcsx2/Sif.cpp index 98eb962d78..b8a532e48d 100644 --- a/pcsx2/Sif.cpp +++ b/pcsx2/Sif.cpp @@ -18,9 +18,11 @@ #define _PC_ // disables MIPS opcode macros. #include "IopCommon.h" -#include "Sifcmd.h" #include "Tags.h" +#include "Sif.h" +#include "Sifcmd.h" + DMACh *sif0ch; DMACh *sif1ch; DMACh *sif2ch; diff --git a/pcsx2/Sio.cpp b/pcsx2/Sio.cpp index 61f4774f80..55874f2f0b 100644 --- a/pcsx2/Sio.cpp +++ b/pcsx2/Sio.cpp @@ -14,8 +14,9 @@ */ #include "PrecompiledHeader.h" - #include "IopCommon.h" + +#include "Sio.h" #include "sio_internal.h" _sio sio; diff --git a/pcsx2/System.cpp b/pcsx2/System.cpp index a04896db64..b1e9f2f06a 100644 --- a/pcsx2/System.cpp +++ b/pcsx2/System.cpp @@ -14,21 +14,14 @@ */ #include "PrecompiledHeader.h" - +#include "Common.h" #include "HostGui.h" -#include "Common.h" -#include "VUmicro.h" -#include "iR5900.h" -#include "R3000A.h" -#include "IopMem.h" -#include "sVU_zerorec.h" // for SuperVUReset +#include "sVU_zerorec.h" // for SuperVUDestroy -#include "R5900Exceptions.h" -#include "CDVD/CDVD.h" #include "System/PageFaultSource.h" - #include "Utilities/EventSource.inl" + EventSource_ImplementType( PageFaultInfo ); SrcType_PageFault Source_PageFault; diff --git a/pcsx2/System/SysCoreThread.cpp b/pcsx2/System/SysCoreThread.cpp index 81faf7941d..f9810805ef 100644 --- a/pcsx2/System/SysCoreThread.cpp +++ b/pcsx2/System/SysCoreThread.cpp @@ -16,13 +16,11 @@ #include "PrecompiledHeader.h" #include "Common.h" -#include "System.h" +#include "GS.h" +#include "Elfheader.h" #include "PageFaultSource.h" #include "SysThreads.h" -#include "SaveState.h" -#include "VUmicro.h" -#include "GS.h" #ifdef __WXMSW__ # include diff --git a/pcsx2/VU0.cpp b/pcsx2/VU0.cpp index 34fd4f439b..ddb120c3df 100644 --- a/pcsx2/VU0.cpp +++ b/pcsx2/VU0.cpp @@ -23,14 +23,11 @@ */ #include "PrecompiledHeader.h" +#include "Common.h" #include -#include "Common.h" -#include "DebugTools/Debug.h" -#include "R5900.h" #include "R5900OpcodeTables.h" -#include "VUops.h" #include "VUmicro.h" #define _Ft_ _Rt_ @@ -45,8 +42,6 @@ #define _Fsf_ ((cpuRegs.code >> 21) & 0x03) #define _Ftf_ ((cpuRegs.code >> 23) & 0x03) -#include "VUflags.h" - using namespace R5900; __aligned16 VURegs VU0; diff --git a/pcsx2/VU0micro.cpp b/pcsx2/VU0micro.cpp index ec0dea8f2a..127c540bfa 100644 --- a/pcsx2/VU0micro.cpp +++ b/pcsx2/VU0micro.cpp @@ -19,18 +19,11 @@ #include "PrecompiledHeader.h" +#include "Common.h" #include -#include "Common.h" -#include "DebugTools/Debug.h" -#include "R5900.h" -#include "iR5900.h" #include "VUmicro.h" -#include "VUflags.h" -#include "VUops.h" - -#include "sVU_zerorec.h" using namespace R5900; diff --git a/pcsx2/VU0microInterp.cpp b/pcsx2/VU0microInterp.cpp index c7ef1c677a..2744cd3ad4 100644 --- a/pcsx2/VU0microInterp.cpp +++ b/pcsx2/VU0microInterp.cpp @@ -15,9 +15,8 @@ #include "PrecompiledHeader.h" - #include "Common.h" -#include "DebugTools/Debug.h" + #include "VUmicro.h" extern void _vuFlushAll(VURegs* VU); diff --git a/pcsx2/VU1micro.cpp b/pcsx2/VU1micro.cpp index 401b510210..3c3d1fa911 100644 --- a/pcsx2/VU1micro.cpp +++ b/pcsx2/VU1micro.cpp @@ -18,15 +18,11 @@ // of the VU0 micro. #include "PrecompiledHeader.h" +#include "Common.h" #include -#include "Common.h" -#include "VU.h" -#include "VUops.h" #include "VUmicro.h" -#include "sVU_Micro.h" -#include "sVU_zerorec.h" VURegs* g_pVU1; diff --git a/pcsx2/VU1microInterp.cpp b/pcsx2/VU1microInterp.cpp index 890e7a8799..d530f58363 100644 --- a/pcsx2/VU1microInterp.cpp +++ b/pcsx2/VU1microInterp.cpp @@ -15,9 +15,8 @@ #include "PrecompiledHeader.h" - #include "Common.h" -#include "DebugTools/Debug.h" + #include "VUmicro.h" extern void _vuFlushAll(VURegs* VU); diff --git a/pcsx2/VUflags.cpp b/pcsx2/VUflags.cpp index 270df38c9a..72a10dca3d 100644 --- a/pcsx2/VUflags.cpp +++ b/pcsx2/VUflags.cpp @@ -14,12 +14,13 @@ */ #include "PrecompiledHeader.h" +#include "Common.h" #include #include -#include "Common.h" #include "VUmicro.h" + /*****************************************/ /* NEW FLAGS */ //By asadr. Thnkx F|RES :p /*****************************************/ diff --git a/pcsx2/VUmicroMem.cpp b/pcsx2/VUmicroMem.cpp index 558d828130..c41deb95da 100644 --- a/pcsx2/VUmicroMem.cpp +++ b/pcsx2/VUmicroMem.cpp @@ -15,11 +15,9 @@ #include "PrecompiledHeader.h" - #include "Common.h" -#include "R5900.h" -#include "VUmicro.h" -#include "sVU_zerorec.h" + +#include "sVU_zerorec.h" // SuperVUReset // The following CpuVU objects are value types instead of handles or pointers because they are // modified on the fly to implement VU1 Skip. diff --git a/pcsx2/VUops.cpp b/pcsx2/VUops.cpp index 610dbf87c8..9beb8824c5 100644 --- a/pcsx2/VUops.cpp +++ b/pcsx2/VUops.cpp @@ -14,12 +14,10 @@ */ #include "PrecompiledHeader.h" +#include "Common.h" #include -#include "Common.h" -#include "VUmicro.h" -#include "VUflags.h" #include "VUops.h" #include "GS.h" diff --git a/pcsx2/Vif.cpp b/pcsx2/Vif.cpp index ef1c8212d8..b6325b9f4a 100644 --- a/pcsx2/Vif.cpp +++ b/pcsx2/Vif.cpp @@ -13,15 +13,16 @@ * If not, see . */ + #include "PrecompiledHeader.h" +#include "Common.h" +#include "Tags.h" + #include #include -#include "Common.h" -#include "VUmicro.h" #include "Vif.h" #include "VifDma.h" -#include "Tags.h" VIFregisters *vifRegs; u32* vifRow = NULL; diff --git a/pcsx2/Vif0Dma.cpp b/pcsx2/Vif0Dma.cpp index 3dd1f34c82..65a1025709 100644 --- a/pcsx2/Vif0Dma.cpp +++ b/pcsx2/Vif0Dma.cpp @@ -13,13 +13,15 @@ * If not, see . */ -#include "PrecompiledHeader.h" +#include "PrecompiledHeader.h" #include "Common.h" +#include "Tags.h" + #include "VifDma.h" #include "VifDma_internal.h" + #include "VUmicro.h" -#include "Tags.h" __aligned16 u32 g_vif0Masks[64]; u32 g_vif0HasMask3[4] = {0}; @@ -29,6 +31,7 @@ extern void (*Vif0CMDTLB[75])(); vifStruct vif0; u32 *vif0ptag; + __forceinline void vif0FLUSH() { int _cycles = VU0.cycle; diff --git a/pcsx2/Vif1Dma.cpp b/pcsx2/Vif1Dma.cpp index 643d6a63f3..4d0619d029 100644 --- a/pcsx2/Vif1Dma.cpp +++ b/pcsx2/Vif1Dma.cpp @@ -13,15 +13,17 @@ * If not, see . */ -#include "PrecompiledHeader.h" +#include "PrecompiledHeader.h" #include "Common.h" -#include "GS.h" -#include "Gif.h" +#include "Tags.h" + #include "VifDma.h" #include "VifDma_internal.h" + +#include "GS.h" +#include "Gif.h" #include "VUmicro.h" -#include "Tags.h" __aligned16 u32 g_vif1Masks[64]; u32 g_vif1HasMask3[4] = {0}; diff --git a/pcsx2/VifDma.cpp b/pcsx2/VifDma.cpp index e2f777d064..1e83cdabed 100644 --- a/pcsx2/VifDma.cpp +++ b/pcsx2/VifDma.cpp @@ -14,12 +14,12 @@ */ #include "PrecompiledHeader.h" - #include "Common.h" +#include "Tags.h" + #include "VifDma.h" #include "VifDma_internal.h" #include "VUmicro.h" -#include "Tags.h" #include #include diff --git a/pcsx2/gui/MainMenuClicks.cpp b/pcsx2/gui/MainMenuClicks.cpp index 4efa648253..51a4ff6356 100644 --- a/pcsx2/gui/MainMenuClicks.cpp +++ b/pcsx2/gui/MainMenuClicks.cpp @@ -15,6 +15,7 @@ #include "PrecompiledHeader.h" #include "HostGui.h" + #include "CDVD/CDVD.h" #include "GS.h" diff --git a/pcsx2/gui/Saveslots.cpp b/pcsx2/gui/Saveslots.cpp index 1f4b25e007..fd68a85fc6 100644 --- a/pcsx2/gui/Saveslots.cpp +++ b/pcsx2/gui/Saveslots.cpp @@ -20,6 +20,7 @@ #include "HostGui.h" #include "GS.h" +#include "Elfheader.h" StartupParams g_Startup; diff --git a/pcsx2/ps2/BiosTools.cpp b/pcsx2/ps2/BiosTools.cpp index 1bcf0b9e28..bfd20f6c07 100644 --- a/pcsx2/ps2/BiosTools.cpp +++ b/pcsx2/ps2/BiosTools.cpp @@ -14,12 +14,13 @@ */ #include "PrecompiledHeader.h" -#include "AppConfig.h" #include "Common.h" #include "BiosTools.h" #include "wx/file.h" +#include "AppConfig.h" + #define DIRENTRY_SIZE 16 ////////////////////////////////////////////////////////////////////////////////////////// diff --git a/pcsx2/ps2/Iop/IopHwRead.cpp b/pcsx2/ps2/Iop/IopHwRead.cpp index 203f057da9..085d089716 100644 --- a/pcsx2/ps2/Iop/IopHwRead.cpp +++ b/pcsx2/ps2/Iop/IopHwRead.cpp @@ -17,6 +17,9 @@ #include "PrecompiledHeader.h" #include "IopHw_Internal.h" +#include "Sio.h" +#include "CDVD/CdRom.h" + namespace IopMemory { using namespace Internal; diff --git a/pcsx2/ps2/Iop/IopHwWrite.cpp b/pcsx2/ps2/Iop/IopHwWrite.cpp index aaa7065327..5deafa5208 100644 --- a/pcsx2/ps2/Iop/IopHwWrite.cpp +++ b/pcsx2/ps2/Iop/IopHwWrite.cpp @@ -16,6 +16,9 @@ #include "PrecompiledHeader.h" #include "IopHw_Internal.h" +#include "Sio.h" +#include "CDVD/CdRom.h" + namespace IopMemory { using namespace Internal; diff --git a/pcsx2/windows/VCprojects/pcsx2.vcxproj b/pcsx2/windows/VCprojects/pcsx2.vcxproj index 324794735b..e4e5437c68 100644 --- a/pcsx2/windows/VCprojects/pcsx2.vcxproj +++ b/pcsx2/windows/VCprojects/pcsx2.vcxproj @@ -598,6 +598,7 @@ + diff --git a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj index dcf8626c2e..1d93fcf256 100644 --- a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj +++ b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj @@ -564,6 +564,10 @@ RelativePath="..\..\Hw.h" > + +