Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for F3DEX 0.95 #2862

Merged
merged 2 commits into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions projects/msvc/GLideN64.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ copy /Y "$(OutDir)$(TargetName).*" "$(Mupen64PluginsDir_x64)")</Command>
<ClCompile Include="..\..\src\uCodes\F3DBETA.cpp" />
<ClCompile Include="..\..\src\uCodes\F3DDKR.cpp" />
<ClCompile Include="..\..\src\uCodes\F3DEX.cpp" />
<ClCompile Include="..\..\src\uCodes\F3DEX095.cpp" />
<ClCompile Include="..\..\src\uCodes\F3DEX2.cpp" />
<ClCompile Include="..\..\src\uCodes\F3DEX2ACCLAIM.cpp" />
<ClCompile Include="..\..\src\uCodes\F3DEX2CBFD.cpp" />
Expand Down Expand Up @@ -540,6 +541,7 @@ copy /Y "$(OutDir)$(TargetName).*" "$(Mupen64PluginsDir_x64)")</Command>
<ClInclude Include="..\..\src\uCodes\F3DBETA.h" />
<ClInclude Include="..\..\src\uCodes\F3DDKR.h" />
<ClInclude Include="..\..\src\uCodes\F3DEX.h" />
<ClInclude Include="..\..\src\uCodes\F3DEX095.h" />
<ClInclude Include="..\..\src\uCodes\F3DEX2.h" />
<ClInclude Include="..\..\src\uCodes\F3DEX2ACCLAIM.h" />
<ClInclude Include="..\..\src\uCodes\F3DEX2CBFD.h" />
Expand Down
12 changes: 9 additions & 3 deletions projects/msvc/GLideN64.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,9 @@
<ClCompile Include="..\..\src\uCodes\F3DEX3.cpp">
<Filter>Source Files\uCodes</Filter>
</ClCompile>
<ClCompile Include="..\..\src\uCodes\F3DEX095.cpp">
<Filter>Source Files\uCodes</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\3DMath.h">
Expand Down Expand Up @@ -700,9 +703,15 @@
<ClInclude Include="..\..\src\uCodes\F3DEX.h">
<Filter>Header Files\uCodes</Filter>
</ClInclude>
<ClInclude Include="..\..\src\uCodes\F3DEX095.h">
<Filter>Header Files\uCodes</Filter>
</ClInclude>
<ClInclude Include="..\..\src\uCodes\F3DEX2.h">
<Filter>Header Files\uCodes</Filter>
</ClInclude>
<ClInclude Include="..\..\src\uCodes\F3DEX3.h">
<Filter>Header Files\uCodes</Filter>
</ClInclude>
<ClInclude Include="..\..\src\uCodes\F3DEX2ACCLAIM.h">
<Filter>Header Files\uCodes</Filter>
</ClInclude>
Expand Down Expand Up @@ -820,9 +829,6 @@
<ClInclude Include="..\..\src\GLideNHQ\TxFilterExport.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\uCodes\F3DEX3.h">
<Filter>Header Files\uCodes</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\GLideN64.rc">
Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ set(GLideN64_SOURCES
uCodes/F3DBETA.cpp
uCodes/F3DDKR.cpp
uCodes/F3DEX.cpp
uCodes/F3DEX095.cpp
uCodes/F3DAM.cpp
uCodes/F3DEX2.cpp
uCodes/F3DEX3.cpp
Expand Down
8 changes: 7 additions & 1 deletion src/GBI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "RSP.h"
#include "uCodes/F3D.h"
#include "uCodes/F3DEX.h"
#include "uCodes/F3DEX095.h"
#include "uCodes/F3DEX2.h"
#include "uCodes/F3DEX3.h"
#include "uCodes/L3D.h"
Expand Down Expand Up @@ -58,7 +59,7 @@ static const
std::vector<SpecialMicrocodeInfo> specialMicrocodes =
{
{ S2DEX2, false, true, false, 0x02c399dd }, // Animal Forest
{ F3DEX, false, false, true, 0x0ace4c3f }, // Mario Kart 64
{ F3DEX095, false, false, true, 0x0ace4c3f }, // Mario Kart 64
{ F3D, true, false, false, 0x16c3a775 }, // AeroFighters
{ F3DEX2CBFD, true, true, false, 0x1b4ace88 }, // Conker's Bad Fur Day
{ F3DPD, true, true, false, 0x1c4f7869 }, // Perfect Dark
Expand Down Expand Up @@ -209,6 +210,11 @@ void GBIInfo::_makeCurrent(MicrocodeInfo * _pCurrent)
F3D_Init();
m_hwlSupported = true;
break;
case F3DEX095:
F3DEX095_Init();
m_hwlSupported = true;
gSP.clipRatio = m_pCurrent->Rej ? 2U : 1U;
break;
case F3DEX:
F3DEX_Init();
m_hwlSupported = true;
Expand Down
3 changes: 2 additions & 1 deletion src/GBI.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
#define S2DEX_1_03 27
#define S2DEX_1_05 28
#define F3DEX3 29
#define NONE 30
#define F3DEX095 30
#define NONE 31

// Fixed point conversion factors
#define FIXED2FLOATRECIP1 0.5f
Expand Down
12 changes: 12 additions & 0 deletions src/uCodes/F3DEX095.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include "F3D.h"
#include "F3DEX.h"
#include "F3DEX095.h"
#include "gSP.h"
#include "GBI.h"

// See #2774 for details
void F3DEX095_Init()
{
F3DEX_Init();
GBI_SetGBI(G_CULLDL, F3D_CULLDL, F3D_CullDL);
}
7 changes: 7 additions & 0 deletions src/uCodes/F3DEX095.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef F3DEX095_H
#define F3DEX095_H

void F3DEX095_Init();

#endif