mirror of https://github.com/PCSX2/pcsx2.git
sVU: add an option to remove it
The goal is to reduce the burden for new architecture port. Patch is mostly inspired from 3kinox initial patch. The diff are */ used ifdef instead of raw removal */ gui don't rely on UseMicroVU* option */ completely remove sVU_micro.* file
This commit is contained in:
parent
3f521cc7a0
commit
b03162747c
|
@ -17,6 +17,11 @@
|
||||||
# Game DB installation path : -DGAMEINDEX_DIR="/usr/share/games/pcsx2"
|
# Game DB installation path : -DGAMEINDEX_DIR="/usr/share/games/pcsx2"
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Misc option
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
option(DISABLE_SVU "Disable superVU (don't use it)")
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Graphical option
|
# Graphical option
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
|
@ -129,6 +134,9 @@ elseif(${PCSX2_TARGET_ARCHITECTURES} MATCHES "x86_64")
|
||||||
# x86_64 requires -fPIC
|
# x86_64 requires -fPIC
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
|
|
||||||
|
# SuperVU will not be ported
|
||||||
|
set(DISABLE_SVU TRUE)
|
||||||
|
|
||||||
if (DISABLE_ADVANCE_SIMD)
|
if (DISABLE_ADVANCE_SIMD)
|
||||||
set(ARCH_FLAG "-msse -msse2")
|
set(ARCH_FLAG "-msse -msse2")
|
||||||
else()
|
else()
|
||||||
|
@ -213,6 +221,9 @@ endif()
|
||||||
# Set some default compiler flags
|
# Set some default compiler flags
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
set(COMMON_FLAG "-pipe -std=c++0x -fvisibility=hidden -pthread")
|
set(COMMON_FLAG "-pipe -std=c++0x -fvisibility=hidden -pthread")
|
||||||
|
if (DISABLE_SVU)
|
||||||
|
set(COMMON_FLAG "${COMMON_FLAG} -DDISABLE_SVU")
|
||||||
|
endif()
|
||||||
set(HARDENING_FLAG "-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security")
|
set(HARDENING_FLAG "-D_FORTIFY_SOURCE=2 -Wformat -Wformat-security")
|
||||||
# -Wno-attributes: "always_inline function might not be inlinable" <= real spam (thousand of warnings!!!)
|
# -Wno-attributes: "always_inline function might not be inlinable" <= real spam (thousand of warnings!!!)
|
||||||
# -Wno-missing-field-initializers: standard allow to init only the begin of struct/array in static init. Just a silly warning.
|
# -Wno-missing-field-initializers: standard allow to init only the begin of struct/array in static init. Just a silly warning.
|
||||||
|
|
|
@ -559,11 +559,15 @@ set(pcsx2x86Sources
|
||||||
x86/newVif_Dynarec.cpp
|
x86/newVif_Dynarec.cpp
|
||||||
x86/newVif_Unpack.cpp
|
x86/newVif_Unpack.cpp
|
||||||
x86/newVif_UnpackSSE.cpp
|
x86/newVif_UnpackSSE.cpp
|
||||||
|
)
|
||||||
|
if (NOT DISABLE_SVU)
|
||||||
|
set(pcsx2x86Sources ${pcsx2x86Sources}
|
||||||
x86/sVU_Lower.cpp
|
x86/sVU_Lower.cpp
|
||||||
x86/sVU_Micro.cpp
|
x86/sVU_Micro.cpp
|
||||||
x86/sVU_Upper.cpp
|
x86/sVU_Upper.cpp
|
||||||
x86/sVU_zerorec.cpp
|
x86/sVU_zerorec.cpp
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
# x86 headers
|
# x86 headers
|
||||||
set(pcsx2x86Headers
|
set(pcsx2x86Headers
|
||||||
|
@ -602,10 +606,6 @@ set(pcsx2x86Headers
|
||||||
x86/newVif.h
|
x86/newVif.h
|
||||||
x86/newVif_HashBucket.h
|
x86/newVif_HashBucket.h
|
||||||
x86/newVif_UnpackSSE.h
|
x86/newVif_UnpackSSE.h
|
||||||
x86/sVU_Compare.h
|
|
||||||
x86/sVU_Debug.h
|
|
||||||
x86/sVU_Micro.h
|
|
||||||
x86/sVU_zerorec.h
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# colect .asm files
|
# colect .asm files
|
||||||
|
@ -614,11 +614,14 @@ set(pcsx2AsmFiles
|
||||||
x86/ix86-32/aVif_proc-32.asm)
|
x86/ix86-32/aVif_proc-32.asm)
|
||||||
|
|
||||||
# collect .S files
|
# collect .S files
|
||||||
set(pcsx2SSources
|
if (NOT DISABLE_SVU)
|
||||||
x86/aVUzerorec.S)
|
set(pcsx2SSources x86/aVUzerorec.S)
|
||||||
|
|
||||||
# change language of .S-files to c++
|
# change language of .S-files to c++
|
||||||
set_source_files_properties(${pcsx2SSources} PROPERTIES LANGUAGE CXX)
|
set_source_files_properties(${pcsx2SSources} PROPERTIES LANGUAGE CXX)
|
||||||
|
else()
|
||||||
|
set(pcsx2SSources "")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
# common Sources
|
# common Sources
|
||||||
set(Common
|
set(Common
|
||||||
|
|
|
@ -331,10 +331,11 @@ CpuInitializer< CpuType >::~CpuInitializer() throw()
|
||||||
class CpuInitializerSet
|
class CpuInitializerSet
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
// Note: Allocate sVU first -- it's the most picky.
|
// Note: Allocate sVU first -- it's the most picky.
|
||||||
|
|
||||||
CpuInitializer<recSuperVU0> superVU0;
|
CpuInitializer<recSuperVU0> superVU0;
|
||||||
CpuInitializer<recSuperVU1> superVU1;
|
CpuInitializer<recSuperVU1> superVU1;
|
||||||
|
#endif
|
||||||
|
|
||||||
CpuInitializer<recMicroVU0> microVU0;
|
CpuInitializer<recMicroVU0> microVU0;
|
||||||
CpuInitializer<recMicroVU1> microVU1;
|
CpuInitializer<recMicroVU1> microVU1;
|
||||||
|
@ -491,10 +492,12 @@ bool SysCpuProviderPack::IsRecAvailable_MicroVU1() const { return CpuProviders->
|
||||||
BaseException* SysCpuProviderPack::GetException_MicroVU0() const { return CpuProviders->microVU0.ExThrown; }
|
BaseException* SysCpuProviderPack::GetException_MicroVU0() const { return CpuProviders->microVU0.ExThrown; }
|
||||||
BaseException* SysCpuProviderPack::GetException_MicroVU1() const { return CpuProviders->microVU1.ExThrown; }
|
BaseException* SysCpuProviderPack::GetException_MicroVU1() const { return CpuProviders->microVU1.ExThrown; }
|
||||||
|
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
bool SysCpuProviderPack::IsRecAvailable_SuperVU0() const { return CpuProviders->superVU0.IsAvailable(); }
|
bool SysCpuProviderPack::IsRecAvailable_SuperVU0() const { return CpuProviders->superVU0.IsAvailable(); }
|
||||||
bool SysCpuProviderPack::IsRecAvailable_SuperVU1() const { return CpuProviders->superVU1.IsAvailable(); }
|
bool SysCpuProviderPack::IsRecAvailable_SuperVU1() const { return CpuProviders->superVU1.IsAvailable(); }
|
||||||
BaseException* SysCpuProviderPack::GetException_SuperVU0() const { return CpuProviders->superVU0.ExThrown; }
|
BaseException* SysCpuProviderPack::GetException_SuperVU0() const { return CpuProviders->superVU0.ExThrown; }
|
||||||
BaseException* SysCpuProviderPack::GetException_SuperVU1() const { return CpuProviders->superVU1.ExThrown; }
|
BaseException* SysCpuProviderPack::GetException_SuperVU1() const { return CpuProviders->superVU1.ExThrown; }
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void SysCpuProviderPack::CleanupMess() throw()
|
void SysCpuProviderPack::CleanupMess() throw()
|
||||||
|
@ -522,10 +525,16 @@ bool SysCpuProviderPack::HadSomeFailures( const Pcsx2Config::RecompilerOptions&
|
||||||
{
|
{
|
||||||
return (recOpts.EnableEE && !IsRecAvailable_EE()) ||
|
return (recOpts.EnableEE && !IsRecAvailable_EE()) ||
|
||||||
(recOpts.EnableIOP && !IsRecAvailable_IOP()) ||
|
(recOpts.EnableIOP && !IsRecAvailable_IOP()) ||
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
(recOpts.EnableVU0 && recOpts.UseMicroVU0 && !IsRecAvailable_MicroVU0()) ||
|
(recOpts.EnableVU0 && recOpts.UseMicroVU0 && !IsRecAvailable_MicroVU0()) ||
|
||||||
(recOpts.EnableVU1 && recOpts.UseMicroVU0 && !IsRecAvailable_MicroVU1()) ||
|
(recOpts.EnableVU1 && recOpts.UseMicroVU0 && !IsRecAvailable_MicroVU1()) ||
|
||||||
(recOpts.EnableVU0 && !recOpts.UseMicroVU0 && !IsRecAvailable_SuperVU0()) ||
|
(recOpts.EnableVU0 && !recOpts.UseMicroVU0 && !IsRecAvailable_SuperVU0()) ||
|
||||||
(recOpts.EnableVU1 && !recOpts.UseMicroVU1 && !IsRecAvailable_SuperVU1());
|
(recOpts.EnableVU1 && !recOpts.UseMicroVU1 && !IsRecAvailable_SuperVU1())
|
||||||
|
#else
|
||||||
|
(recOpts.EnableVU0 && !IsRecAvailable_MicroVU0()) ||
|
||||||
|
(recOpts.EnableVU1 && !IsRecAvailable_MicroVU1())
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -541,12 +550,21 @@ void SysCpuProviderPack::ApplyConfig() const
|
||||||
CpuVU1 = CpuProviders->interpVU1;
|
CpuVU1 = CpuProviders->interpVU1;
|
||||||
|
|
||||||
if( EmuConfig.Cpu.Recompiler.EnableVU0 )
|
if( EmuConfig.Cpu.Recompiler.EnableVU0 )
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
CpuVU0 = EmuConfig.Cpu.Recompiler.UseMicroVU0 ? (BaseVUmicroCPU*)CpuProviders->microVU0 : (BaseVUmicroCPU*)CpuProviders->superVU0;
|
CpuVU0 = EmuConfig.Cpu.Recompiler.UseMicroVU0 ? (BaseVUmicroCPU*)CpuProviders->microVU0 : (BaseVUmicroCPU*)CpuProviders->superVU0;
|
||||||
|
#else
|
||||||
|
CpuVU0 = (BaseVUmicroCPU*)CpuProviders->microVU0;
|
||||||
|
#endif
|
||||||
|
|
||||||
if( EmuConfig.Cpu.Recompiler.EnableVU1 )
|
if( EmuConfig.Cpu.Recompiler.EnableVU1 )
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
CpuVU1 = EmuConfig.Cpu.Recompiler.UseMicroVU1 ? (BaseVUmicroCPU*)CpuProviders->microVU1 : (BaseVUmicroCPU*)CpuProviders->superVU1;
|
CpuVU1 = EmuConfig.Cpu.Recompiler.UseMicroVU1 ? (BaseVUmicroCPU*)CpuProviders->microVU1 : (BaseVUmicroCPU*)CpuProviders->superVU1;
|
||||||
|
#else
|
||||||
|
CpuVU1 = (BaseVUmicroCPU*)CpuProviders->microVU1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
// This is a semi-hacky function for convenience
|
// This is a semi-hacky function for convenience
|
||||||
BaseVUmicroCPU* SysCpuProviderPack::getVUprovider(int whichProvider, int vuIndex) const {
|
BaseVUmicroCPU* SysCpuProviderPack::getVUprovider(int whichProvider, int vuIndex) const {
|
||||||
switch (whichProvider) {
|
switch (whichProvider) {
|
||||||
|
@ -556,6 +574,7 @@ BaseVUmicroCPU* SysCpuProviderPack::getVUprovider(int whichProvider, int vuIndex
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Resets all PS2 cpu execution caches, which does not affect that actual PS2 state/condition.
|
// Resets all PS2 cpu execution caches, which does not affect that actual PS2 state/condition.
|
||||||
// This can be called at any time outside the context of a Cpu->Execute() block without
|
// This can be called at any time outside the context of a Cpu->Execute() block without
|
||||||
|
|
|
@ -141,7 +141,9 @@ public:
|
||||||
virtual ~SysCpuProviderPack() throw();
|
virtual ~SysCpuProviderPack() throw();
|
||||||
|
|
||||||
void ApplyConfig() const;
|
void ApplyConfig() const;
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
BaseVUmicroCPU* getVUprovider(int whichProvider, int vuIndex) const;
|
BaseVUmicroCPU* getVUprovider(int whichProvider, int vuIndex) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
bool HadSomeFailures( const Pcsx2Config::RecompilerOptions& recOpts ) const;
|
bool HadSomeFailures( const Pcsx2Config::RecompilerOptions& recOpts ) const;
|
||||||
|
|
||||||
|
|
|
@ -167,16 +167,25 @@ void Pcsx2App::AllocateCoreStuffs()
|
||||||
{
|
{
|
||||||
scrollableTextArea->AppendText( L"* microVU0\n\t" + ex->FormatDisplayMessage() + L"\n\n" );
|
scrollableTextArea->AppendText( L"* microVU0\n\t" + ex->FormatDisplayMessage() + L"\n\n" );
|
||||||
recOps.UseMicroVU0 = false;
|
recOps.UseMicroVU0 = false;
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
recOps.EnableVU0 = recOps.EnableVU0 && m_CpuProviders->IsRecAvailable_SuperVU0();
|
recOps.EnableVU0 = recOps.EnableVU0 && m_CpuProviders->IsRecAvailable_SuperVU0();
|
||||||
|
#else
|
||||||
|
recOps.EnableVU1 = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if( BaseException* ex = m_CpuProviders->GetException_MicroVU1() )
|
if( BaseException* ex = m_CpuProviders->GetException_MicroVU1() )
|
||||||
{
|
{
|
||||||
scrollableTextArea->AppendText( L"* microVU1\n\t" + ex->FormatDisplayMessage() + L"\n\n" );
|
scrollableTextArea->AppendText( L"* microVU1\n\t" + ex->FormatDisplayMessage() + L"\n\n" );
|
||||||
recOps.UseMicroVU1 = false;
|
recOps.UseMicroVU1 = false;
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
recOps.EnableVU1 = recOps.EnableVU1 && m_CpuProviders->IsRecAvailable_SuperVU1();
|
recOps.EnableVU1 = recOps.EnableVU1 && m_CpuProviders->IsRecAvailable_SuperVU1();
|
||||||
|
#else
|
||||||
|
recOps.EnableVU1 = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
if( BaseException* ex = m_CpuProviders->GetException_SuperVU0() )
|
if( BaseException* ex = m_CpuProviders->GetException_SuperVU0() )
|
||||||
{
|
{
|
||||||
scrollableTextArea->AppendText( L"* SuperVU0\n\t" + ex->FormatDisplayMessage() + L"\n\n" );
|
scrollableTextArea->AppendText( L"* SuperVU0\n\t" + ex->FormatDisplayMessage() + L"\n\n" );
|
||||||
|
@ -190,9 +199,9 @@ void Pcsx2App::AllocateCoreStuffs()
|
||||||
recOps.UseMicroVU1 = m_CpuProviders->IsRecAvailable_MicroVU1();
|
recOps.UseMicroVU1 = m_CpuProviders->IsRecAvailable_MicroVU1();
|
||||||
recOps.EnableVU1 = recOps.EnableVU1 && recOps.UseMicroVU1;
|
recOps.EnableVU1 = recOps.EnableVU1 && recOps.UseMicroVU1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
exconf += exconf.Heading( pxE( L"Note: Recompilers are not necessary for PCSX2 to run, however they typically improve emulation speed substantially. You may have to manually re-enable the recompilers listed above, if you resolve the errors." )
|
exconf += exconf.Heading(pxE( L"Note: Recompilers are not necessary for PCSX2 to run, however they typically improve emulation speed substantially. You may have to manually re-enable the recompilers listed above, if you resolve the errors." ));
|
||||||
);
|
|
||||||
|
|
||||||
pxIssueConfirmation( exconf, MsgButtons().OK() );
|
pxIssueConfirmation( exconf, MsgButtons().OK() );
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,8 +185,10 @@ Panels::CpuPanelVU::CpuPanelVU( wxWindow* parent )
|
||||||
RadioPanelItem(_("microVU Recompiler"))
|
RadioPanelItem(_("microVU Recompiler"))
|
||||||
.SetToolTip(_("New Vector Unit recompiler with much improved compatibility. Recommended.")),
|
.SetToolTip(_("New Vector Unit recompiler with much improved compatibility. Recommended.")),
|
||||||
|
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
RadioPanelItem(_("superVU Recompiler [legacy]"))
|
RadioPanelItem(_("superVU Recompiler [legacy]"))
|
||||||
.SetToolTip(_("Useful for diagnosing bugs or clamping issues in the new mVU recompiler."))
|
.SetToolTip(_("Useful for diagnosing bugs or clamping issues in the new mVU recompiler."))
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
m_panel_VU0 = &(new pxRadioPanel( this, tbl_CpuTypes_VU )) ->SetDefaultItem( 1 );
|
m_panel_VU0 = &(new pxRadioPanel( this, tbl_CpuTypes_VU )) ->SetDefaultItem( 1 );
|
||||||
|
@ -274,8 +276,10 @@ void Panels::CpuPanelVU::Apply()
|
||||||
recOps.EnableVU0 = m_panel_VU0->GetSelection() > 0;
|
recOps.EnableVU0 = m_panel_VU0->GetSelection() > 0;
|
||||||
recOps.EnableVU1 = m_panel_VU1->GetSelection() > 0;
|
recOps.EnableVU1 = m_panel_VU1->GetSelection() > 0;
|
||||||
|
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
recOps.UseMicroVU0 = m_panel_VU0->GetSelection() == 1;
|
recOps.UseMicroVU0 = m_panel_VU0->GetSelection() == 1;
|
||||||
recOps.UseMicroVU1 = m_panel_VU1->GetSelection() == 1;
|
recOps.UseMicroVU1 = m_panel_VU1->GetSelection() == 1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Panels::CpuPanelVU::AppStatusEvent_OnSettingsApplied()
|
void Panels::CpuPanelVU::AppStatusEvent_OnSettingsApplied()
|
||||||
|
@ -289,21 +293,33 @@ void Panels::CpuPanelVU::ApplyConfigToGui( AppConfig& configToApply, int flags )
|
||||||
m_panel_VU1->Enable(true);
|
m_panel_VU1->Enable(true);
|
||||||
|
|
||||||
m_panel_VU0->EnableItem( 1, true);
|
m_panel_VU0->EnableItem( 1, true);
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
m_panel_VU0->EnableItem( 2, true);
|
m_panel_VU0->EnableItem( 2, true);
|
||||||
|
#endif
|
||||||
|
|
||||||
m_panel_VU1->EnableItem( 1, true);
|
m_panel_VU1->EnableItem( 1, true);
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
m_panel_VU1->EnableItem( 2, true);
|
m_panel_VU1->EnableItem( 2, true);
|
||||||
|
#endif
|
||||||
|
|
||||||
Pcsx2Config::RecompilerOptions& recOps( configToApply.EmuOptions.Cpu.Recompiler );
|
Pcsx2Config::RecompilerOptions& recOps( configToApply.EmuOptions.Cpu.Recompiler );
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
if( recOps.UseMicroVU0 )
|
if( recOps.UseMicroVU0 )
|
||||||
m_panel_VU0->SetSelection( recOps.EnableVU0 ? 1 : 0 );
|
m_panel_VU0->SetSelection( recOps.EnableVU0 ? 1 : 0 );
|
||||||
else
|
else
|
||||||
m_panel_VU0->SetSelection( recOps.EnableVU0 ? 2 : 0 );
|
m_panel_VU0->SetSelection( recOps.EnableVU0 ? 2 : 0 );
|
||||||
|
#else
|
||||||
|
m_panel_VU0->SetSelection( recOps.EnableVU0 ? 1 : 0 );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
if( recOps.UseMicroVU1 )
|
if( recOps.UseMicroVU1 )
|
||||||
m_panel_VU1->SetSelection( recOps.EnableVU1 ? 1 : 0 );
|
m_panel_VU1->SetSelection( recOps.EnableVU1 ? 1 : 0 );
|
||||||
else
|
else
|
||||||
m_panel_VU1->SetSelection( recOps.EnableVU1 ? 2 : 0 );
|
m_panel_VU1->SetSelection( recOps.EnableVU1 ? 2 : 0 );
|
||||||
|
#else
|
||||||
|
m_panel_VU1->SetSelection( recOps.EnableVU1 ? 1 : 0 );
|
||||||
|
#endif
|
||||||
|
|
||||||
this->Enable(!configToApply.EnablePresets);
|
this->Enable(!configToApply.EnablePresets);
|
||||||
m_panel_VU0->Enable(!configToApply.EnablePresets);
|
m_panel_VU0->Enable(!configToApply.EnablePresets);
|
||||||
|
|
|
@ -50,7 +50,9 @@
|
||||||
|
|
||||||
// used in VU recs
|
// used in VU recs
|
||||||
#define PROCESS_VU_UPDATEFLAGS 0x10
|
#define PROCESS_VU_UPDATEFLAGS 0x10
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
#define PROCESS_VU_SUPER 0x40 // set if using supervu recompilation
|
#define PROCESS_VU_SUPER 0x40 // set if using supervu recompilation
|
||||||
|
#endif
|
||||||
#define PROCESS_VU_COP2 0x80 // simple cop2
|
#define PROCESS_VU_COP2 0x80 // simple cop2
|
||||||
|
|
||||||
#define EEREC_S (((info)>>8)&0xf)
|
#define EEREC_S (((info)>>8)&0xf)
|
||||||
|
|
|
@ -20,10 +20,16 @@
|
||||||
#include "R5900OpcodeTables.h"
|
#include "R5900OpcodeTables.h"
|
||||||
#include "iR5900.h"
|
#include "iR5900.h"
|
||||||
#include "iFPU.h"
|
#include "iFPU.h"
|
||||||
|
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
#include "sVU_Micro.h"
|
#include "sVU_Micro.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace x86Emitter;
|
using namespace x86Emitter;
|
||||||
|
|
||||||
|
const __aligned16 u32 g_minvals[4] = {0xff7fffff, 0xff7fffff, 0xff7fffff, 0xff7fffff};
|
||||||
|
const __aligned16 u32 g_maxvals[4] = {0x7f7fffff, 0x7f7fffff, 0x7f7fffff, 0x7f7fffff};
|
||||||
|
|
||||||
//------------------------------------------------------------------
|
//------------------------------------------------------------------
|
||||||
namespace R5900 {
|
namespace R5900 {
|
||||||
namespace Dynarec {
|
namespace Dynarec {
|
||||||
|
|
|
@ -16,6 +16,9 @@
|
||||||
#ifndef __IFPU_H__
|
#ifndef __IFPU_H__
|
||||||
#define __IFPU_H__
|
#define __IFPU_H__
|
||||||
|
|
||||||
|
extern const __aligned16 u32 g_minvals[4];
|
||||||
|
extern const __aligned16 u32 g_maxvals[4];
|
||||||
|
|
||||||
namespace R5900 {
|
namespace R5900 {
|
||||||
namespace Dynarec {
|
namespace Dynarec {
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,10 @@
|
||||||
#include "x86emitter/x86emitter.h"
|
#include "x86emitter/x86emitter.h"
|
||||||
#include "iR5900.h"
|
#include "iR5900.h"
|
||||||
#include "iFPU.h"
|
#include "iFPU.h"
|
||||||
|
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
#include "sVU_Micro.h"
|
#include "sVU_Micro.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This is a version of the FPU that emulates an exponent of 0xff and overflow/underflow flags */
|
/* This is a version of the FPU that emulates an exponent of 0xff and overflow/underflow flags */
|
||||||
|
|
||||||
|
|
|
@ -1972,8 +1972,10 @@ StartRecomp:
|
||||||
|
|
||||||
for(i = startpc; i < s_nEndBlock; i += 4) {
|
for(i = startpc; i < s_nEndBlock; i += 4) {
|
||||||
|
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
// superVU hack: it needs vucycles, for some reason. >_<
|
// superVU hack: it needs vucycles, for some reason. >_<
|
||||||
extern int vucycle;
|
extern int vucycle;
|
||||||
|
#endif
|
||||||
|
|
||||||
g_pCurInstInfo++;
|
g_pCurInstInfo++;
|
||||||
cpuRegs.code = *(u32*)PSM(i);
|
cpuRegs.code = *(u32*)PSM(i);
|
||||||
|
@ -1983,7 +1985,9 @@ StartRecomp:
|
||||||
|
|
||||||
if( !usecop2 ) {
|
if( !usecop2 ) {
|
||||||
// init
|
// init
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
vucycle = 0;
|
vucycle = 0;
|
||||||
|
#endif
|
||||||
usecop2 = 1;
|
usecop2 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1992,9 +1996,11 @@ StartRecomp:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
// fixme - This should be based on the cycle count of the current EE
|
// fixme - This should be based on the cycle count of the current EE
|
||||||
// instruction being analyzed.
|
// instruction being analyzed.
|
||||||
if( usecop2 ) vucycle++;
|
if( usecop2 ) vucycle++;
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
// This *is* important because g_pCurInstInfo is checked a bit later on and
|
// This *is* important because g_pCurInstInfo is checked a bit later on and
|
||||||
|
|
|
@ -22,11 +22,13 @@
|
||||||
#include "iMMI.h"
|
#include "iMMI.h"
|
||||||
#include "iFPU.h"
|
#include "iFPU.h"
|
||||||
#include "iCOP0.h"
|
#include "iCOP0.h"
|
||||||
#include "sVU_Micro.h"
|
|
||||||
#include "VU.h"
|
#include "VU.h"
|
||||||
#include "VUmicro.h"
|
#include "VUmicro.h"
|
||||||
|
|
||||||
|
#ifndef DISABLE_SVU
|
||||||
|
#include "sVU_Micro.h"
|
||||||
#include "sVU_zerorec.h"
|
#include "sVU_zerorec.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "vtlb.h"
|
#include "vtlb.h"
|
||||||
|
|
||||||
|
|
|
@ -88,8 +88,6 @@ int vucycle;
|
||||||
const __aligned16 float s_fones[8] = {1.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f};
|
const __aligned16 float s_fones[8] = {1.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f};
|
||||||
const __aligned16 u32 s_mask[4] = {0x007fffff, 0x007fffff, 0x007fffff, 0x007fffff};
|
const __aligned16 u32 s_mask[4] = {0x007fffff, 0x007fffff, 0x007fffff, 0x007fffff};
|
||||||
const __aligned16 u32 s_expmask[4] = {0x7f800000, 0x7f800000, 0x7f800000, 0x7f800000};
|
const __aligned16 u32 s_expmask[4] = {0x7f800000, 0x7f800000, 0x7f800000, 0x7f800000};
|
||||||
const __aligned16 u32 g_minvals[4] = {0xff7fffff, 0xff7fffff, 0xff7fffff, 0xff7fffff};
|
|
||||||
const __aligned16 u32 g_maxvals[4] = {0x7f7fffff, 0x7f7fffff, 0x7f7fffff, 0x7f7fffff};
|
|
||||||
const __aligned16 u32 const_clip[8] = {0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff,
|
const __aligned16 u32 const_clip[8] = {0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff,
|
||||||
0x80000000, 0x80000000, 0x80000000, 0x80000000};
|
0x80000000, 0x80000000, 0x80000000, 0x80000000};
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,6 @@ extern vFloat vFloats4_useEAX[16];
|
||||||
extern const __aligned16 float s_fones[8];
|
extern const __aligned16 float s_fones[8];
|
||||||
extern const __aligned16 u32 s_mask[4];
|
extern const __aligned16 u32 s_mask[4];
|
||||||
extern const __aligned16 u32 s_expmask[4];
|
extern const __aligned16 u32 s_expmask[4];
|
||||||
extern const __aligned16 u32 g_minvals[4];
|
|
||||||
extern const __aligned16 u32 g_maxvals[4];
|
|
||||||
extern const __aligned16 u32 const_clip[8];
|
extern const __aligned16 u32 const_clip[8];
|
||||||
|
|
||||||
u32 GetVIAddr(VURegs * VU, int reg, int read, int info);
|
u32 GetVIAddr(VURegs * VU, int reg, int read, int info);
|
||||||
|
|
Loading…
Reference in New Issue