IOP: Readd GTE now we know it exists, plus a couple of devcon outputs.

This commit is contained in:
refractionpcsx2 2016-01-20 20:29:18 +00:00
parent 6b513239f8
commit 09817b24f0
8 changed files with 3265 additions and 13 deletions

View File

@ -74,6 +74,7 @@ set(pcsx2Sources
IopBios.cpp
IopCounters.cpp
IopDma.cpp
IopGte.cpp
IopHw.cpp
IopIrq.cpp
IopMem.cpp
@ -144,7 +145,8 @@ set(pcsx2Headers
IopBios.h
IopCommon.h
IopCounters.h
IopDma.h
IopDma.h
IopGte.h
IopHw.h
IopMem.h
IopSio2.h

View File

@ -27,6 +27,7 @@
#include "IopBios.h"
#include "IopCounters.h"
#include "IopSio2.h"
#include "IopGte.h"
static const s64 PSXCLK = 36864000; /* 36.864 Mhz */
//#define PSXCLK 9216000 /* 36.864 Mhz */
//#define PSXCLK 186864000 /* 36.864 Mhz */

3161
pcsx2/IopGte.cpp Normal file

File diff suppressed because it is too large Load Diff

50
pcsx2/IopGte.h Normal file
View File

@ -0,0 +1,50 @@
#pragma once
/* 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 __GTE_H__
#define __GTE_H__
void gteMFC2();
void gteCFC2();
void gteMTC2();
void gteCTC2();
void gteLWC2();
void gteSWC2();
void gteRTPS();
void gteOP();
void gteNCLIP();
void gteDPCS();
void gteINTPL();
void gteMVMVA();
void gteNCDS();
void gteNCDT();
void gteCDP();
void gteNCCS();
void gteCC();
void gteNCS();
void gteNCT();
void gteSQR();
void gteDCPL();
void gteDPCT();
void gteAVSZ3();
void gteAVSZ4();
void gteRTPT();
void gteGPF();
void gteGPL();
void gteNCCT();
#endif /* __GTE_H__ */

View File

@ -311,20 +311,27 @@ void psxCOP0() {
psxCP0[_Rs_]();
}
void psxCOP2() {
psxCP2[_Funct_]();
}
void (*psxBSC[64])() = {
void psxBASIC() {
psxCP2BSC[_Rs_]();
}
void(*psxBSC[64])() = {
psxSPECIAL, psxREGIMM, psxJ , psxJAL , psxBEQ , psxBNE , psxBLEZ, psxBGTZ, //7
psxADDI , psxADDIU , psxSLTI, psxSLTIU, psxANDI, psxORI , psxXORI, psxLUI , //15
psxCOP0 , psxNULL , psxNULL, psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, //23
psxCOP0 , psxNULL , psxCOP2, psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, //23
psxNULL , psxNULL , psxNULL, psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, //31
psxLB , psxLH , psxLWL , psxLW , psxLBU , psxLHU , psxLWR , psxNULL, //39
psxSB , psxSH , psxSWL , psxSW , psxNULL, psxNULL, psxSWR , psxNULL, //47
psxNULL , psxNULL , psxNULL, psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, //55
psxNULL , psxNULL , psxNULL, psxNULL , psxNULL, psxNULL, psxNULL, psxNULL //63
psxNULL , psxNULL , gteLWC2, psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, //55
psxNULL , psxNULL , gteSWC2, psxNULL , psxNULL, psxNULL, psxNULL, psxNULL //63
};
void (*psxSPC[64])() = {
void(*psxSPC[64])() = {
psxSLL , psxNULL , psxSRL , psxSRA , psxSLLV , psxNULL , psxSRLV, psxSRAV,
psxJR , psxJALR , psxNULL, psxNULL, psxSYSCALL, psxBREAK, psxNULL, psxNULL,
psxMFHI, psxMTHI , psxMFLO, psxMTLO, psxNULL , psxNULL , psxNULL, psxNULL,
@ -335,16 +342,34 @@ void (*psxSPC[64])() = {
psxNULL, psxNULL , psxNULL, psxNULL, psxNULL , psxNULL , psxNULL, psxNULL
};
void (*psxREG[32])() = {
void(*psxREG[32])() = {
psxBLTZ , psxBGEZ , psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL,
psxNULL , psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL,
psxBLTZAL, psxBGEZAL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL,
psxNULL , psxNULL , psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL
};
void (*psxCP0[32])() = {
void(*psxCP0[32])() = {
psxMFC0, psxNULL, psxCFC0, psxNULL, psxMTC0, psxNULL, psxCTC0, psxNULL,
psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL,
psxRFE , psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL,
psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL
};
void(*psxCP2[64])() = {
psxBASIC, gteRTPS, psxNULL , psxNULL, psxNULL, psxNULL , gteNCLIP, psxNULL, // 00
psxNULL , psxNULL , psxNULL , psxNULL, gteOP, psxNULL , psxNULL , psxNULL, // 08
gteDPCS, gteINTPL, gteMVMVA, gteNCDS, gteCDP, psxNULL , gteNCDT, psxNULL, // 10
psxNULL , psxNULL , psxNULL , gteNCCS, gteCC, psxNULL , gteNCS, psxNULL, // 18
gteNCT, psxNULL , psxNULL , psxNULL, psxNULL, psxNULL , psxNULL , psxNULL, // 20
gteSQR, gteDCPL, gteDPCT, psxNULL, psxNULL, gteAVSZ3, gteAVSZ4, psxNULL, // 28
psxNULL , psxNULL , psxNULL , psxNULL, psxNULL, psxNULL , psxNULL , psxNULL, // 30
psxNULL , psxNULL , psxNULL , psxNULL, psxNULL, psxNULL , psxNULL , psxNULL // 38
};
void(*psxCP2BSC[32])() = {
gteMFC2, psxNULL, gteCFC2, psxNULL, gteMTC2, psxNULL, gteCTC2, psxNULL,
psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL,
psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL,
psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL, psxNULL
};

View File

@ -341,14 +341,18 @@ static __fi void _HwWrite_16or32_Page1( u32 addr, T val )
// ------------------------------------------------------------------------
//
/*
mcase(0x1f801088): // DMA0 CHCR -- MDEC IN [ignored]
DmaExec(0);
mcase(0x1f801088) : // DMA0 CHCR -- MDEC IN [ignored]
//DmaExec(0);
DevCon.Warning("MDEC IN (DMA0) Started"); //Can be disabled later, need to see when this is used.
HW_DMA0_CHCR &= ~0x01000000;
break;
mcase(0x1f801098): // DMA1 CHCR -- MDEC OUT [ignored]
DmaExec(1);
break;*/
//DmaExec(1);
DevCon.Warning("MDEC IN (DMA1) Started"); //Can be disabled later, need to see when this is used.
HW_DMA1_CHCR &= ~0x01000000;
break;
mcase(0x1f8010ac):
DevCon.Warning("SIF2 IOP TADR?? write");
psxHu(addr) = val;
@ -406,6 +410,7 @@ static __fi void _HwWrite_16or32_Page1( u32 addr, T val )
DmaExec2(10);
break;
mcase(0x1f801548): // DMA11 CHCR -- SIO2 IN
psxHu(addr) = val;
#ifdef ENABLE_NEW_IOPDMA_SIO

View File

@ -440,6 +440,7 @@
<ClCompile Include="..\..\gui\Dialogs\McdConfigDialog.cpp" />
<ClCompile Include="..\..\gui\Panels\GameDatabasePanel.cpp" />
<ClCompile Include="..\..\gui\Panels\MemoryCardListView.cpp" />
<ClCompile Include="..\..\IopGte.cpp" />
<ClCompile Include="..\..\IPU\IPUdma.cpp" />
<ClCompile Include="..\..\Linux\LnxConsolePipe.cpp">
<ExcludedFromBuild>true</ExcludedFromBuild>
@ -735,6 +736,7 @@
<ClInclude Include="..\..\gui\Debugger\DebuggerLists.h" />
<ClInclude Include="..\..\gui\Debugger\DisassemblyDialog.h" />
<ClInclude Include="..\..\gui\Panels\MemoryCardPanels.h" />
<ClInclude Include="..\..\IopGte.h" />
<ClInclude Include="..\..\IPU\IPUdma.h" />
<ClInclude Include="..\..\Patch.h" />
<ClInclude Include="..\..\PrecompiledHeader.h" />

View File

@ -877,6 +877,9 @@
<ClCompile Include="..\..\Linux\LnxConsolePipe.cpp">
<Filter>AppHost\Linux</Filter>
</ClCompile>
<ClCompile Include="..\..\IopGte.cpp">
<Filter>System\Ps2\Iop</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\Patch.h">
@ -1314,6 +1317,9 @@
<ClInclude Include="..\..\x86\R5900_Profiler.h">
<Filter>System\Include</Filter>
</ClInclude>
<ClInclude Include="..\..\IopGte.h">
<Filter>System\Ps2\Iop</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\wxResources.rc">