mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Add support for Super3D ucode.
Details: https://github.com/gonetz/GLideN64/issues/6#issuecomment-310126139 Fixed #6 wrong viewport in some games
This commit is contained in:
parent
a6babb418f
commit
3e4a499a9b
|
@ -184,7 +184,6 @@ struct Config
|
|||
#define hack_pilotWings (1<<5) //Special blend mode for PilotWings.
|
||||
#define hack_subscreen (1<<6) //Fix subscreen delay in Zelda OOT and Doubutsu no Mori
|
||||
#define hack_blastCorps (1<<7) //Blast Corps black polygons
|
||||
#define hack_NegativeViewport (1<<8) //Reverse negative viewport when game set it. Eikou no Saint Andrews, pachinko nichi 365
|
||||
#define hack_rectDepthBufferCopyPD (1<<9) //Copy depth buffer only when game need it. Optimized for PD
|
||||
#define hack_rectDepthBufferCopyCBFD (1<<10) //Copy depth buffer only when game need it. Optimized for CBFD
|
||||
#define hack_WinBack (1<<11) //Hack for WinBack to remove gray rectangle in HLE mode
|
||||
|
|
47
src/GBI.cpp
47
src/GBI.cpp
|
@ -37,30 +37,27 @@ u32 last_good_ucode = (u32) -1;
|
|||
|
||||
SpecialMicrocodeInfo specialMicrocodes[] =
|
||||
{
|
||||
{ F3D, false, 0xe62a706d, "Fast3D" },
|
||||
{ F3D, false, 0x7d372819, "Fast3D" },
|
||||
{ F3D, false, 0xe01e14be, "Fast3D" },
|
||||
{ F3D, false, 0x4AED6B3B, "Fast3D" }, //Vivid Dolls [ALECK64]
|
||||
|
||||
{ F3DSETA, false, 0x2edee7be, "RSP SW Version: 2.0D, 04-01-96" },
|
||||
{ F3DBETA, false, 0xd17906e2, "RSP SW Version: 2.0D, 04-01-96" }, // Wave Race (U)
|
||||
{ F3DBETA, false, 0x94c4c833, "RSP SW Version: 2.0D, 04-01-96" }, // Star Wars Shadows of Empire
|
||||
{ F3DEX, true, 0x637b4b58, "RSP SW Version: 2.0D, 04-01-96" },
|
||||
{ F3D, true, 0x54c558ba, "RSP SW Version: 2.0D, 04-01-96" }, // Pilot Wings
|
||||
{ F3DGOLDEN, true, 0x302bca09, "RSP SW Version: 2.0G, 09-30-96" }, // GoldenEye
|
||||
|
||||
{ S2DEX, false, 0x9df31081, "RSP Gfx ucode S2DEX 1.06 Yoshitaka Yasumoto Nintendo." },
|
||||
|
||||
{ F3DDKR, false, 0x8d91244f, "Diddy Kong Racing" },
|
||||
{ F3DDKR, false, 0x6e6fc893, "Diddy Kong Racing" },
|
||||
{ F3DJFG, false, 0xbde9d1fb, "Jet Force Gemini" },
|
||||
{ F3DPD, true, 0x1c4f7869, "Perfect Dark" },
|
||||
{ Turbo3D, false, 0x2bdcfc8a, "Turbo3D" },
|
||||
{ F3DEX2CBFD, true, 0x1b4ace88, "Conker's Bad Fur Day" },
|
||||
{ F3DEX2MM, true, 0xd39a0d4f, "Animal Forest" },
|
||||
{ S2DEX2, false, 0x2c399dd, "Animal Forest" },
|
||||
{ T3DUX, false, 0xbad437f2, "T3DUX vers 0.83 for Toukon Road" },
|
||||
{ T3DUX, false, 0xd0a1aa3d, "T3DUX vers 0.85 for Toukon Road 2" }
|
||||
{ F3D, false, true, 0xe62a706d, "Fast3D" },
|
||||
{ F3D, false, false, 0x7d372819, "Super3D" }, // Pachinko nichi 365
|
||||
{ F3D, false, false, 0xe01e14be, "Super3D" }, // Eikou no Saint Andrews
|
||||
{ F3D, false, true, 0x4AED6B3B, "Fast3D" }, //Vivid Dolls [ALECK64]
|
||||
{ F3DSETA, false, true, 0x2edee7be, "RSP SW Version: 2.0D, 04-01-96" },
|
||||
{ F3DBETA, false, true, 0xd17906e2, "RSP SW Version: 2.0D, 04-01-96" }, // Wave Race (U)
|
||||
{ F3DBETA, false, true, 0x94c4c833, "RSP SW Version: 2.0D, 04-01-96" }, // Star Wars Shadows of Empire
|
||||
{ F3DEX, true, true, 0x637b4b58, "RSP SW Version: 2.0D, 04-01-96" },
|
||||
{ F3D, true, true, 0x54c558ba, "RSP SW Version: 2.0D, 04-01-96" }, // Pilot Wings
|
||||
{ F3DGOLDEN, true, true, 0x302bca09, "RSP SW Version: 2.0G, 09-30-96" }, // GoldenEye
|
||||
{ S2DEX, false, true, 0x9df31081, "RSP Gfx ucode S2DEX 1.06 Yoshitaka Yasumoto Nintendo." },
|
||||
{ F3DDKR, false, true, 0x8d91244f, "Diddy Kong Racing" },
|
||||
{ F3DDKR, false, true, 0x6e6fc893, "Diddy Kong Racing" },
|
||||
{ F3DJFG, false, true, 0xbde9d1fb, "Jet Force Gemini" },
|
||||
{ F3DPD, true, true, 0x1c4f7869, "Perfect Dark" },
|
||||
{ Turbo3D, false, true, 0x2bdcfc8a, "Turbo3D" },
|
||||
{ F3DEX2CBFD, true, true, 0x1b4ace88, "Conker's Bad Fur Day" },
|
||||
{ F3DEX2MM, true, true, 0xd39a0d4f, "Animal Forest" },
|
||||
{ S2DEX2, false, true, 0x2c399dd, "Animal Forest" },
|
||||
{ T3DUX, false, true, 0xbad437f2, "T3DUX vers 0.83 for Toukon Road" },
|
||||
{ T3DUX, false, true, 0xd0a1aa3d, "T3DUX vers 0.85 for Toukon Road 2" }
|
||||
};
|
||||
|
||||
u32 G_RDPHALF_1, G_RDPHALF_2, G_RDPHALF_CONT;
|
||||
|
@ -249,6 +246,7 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize)
|
|||
current.dataAddress = uc_dstart;
|
||||
current.dataSize = uc_dsize;
|
||||
current.NoN = false;
|
||||
current.negativeY = true;
|
||||
current.textureGen = true;
|
||||
current.texturePersp = true;
|
||||
current.type = NONE;
|
||||
|
@ -260,6 +258,7 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize)
|
|||
if (uc_crc == specialMicrocodes[i].crc) {
|
||||
current.type = specialMicrocodes[i].type;
|
||||
current.NoN = specialMicrocodes[i].NoN;
|
||||
current.negativeY = specialMicrocodes[i].negativeY;
|
||||
_makeCurrent(¤t);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -673,6 +673,7 @@ struct SpecialMicrocodeInfo
|
|||
{
|
||||
u32 type;
|
||||
bool NoN;
|
||||
bool negativeY;
|
||||
u32 crc;
|
||||
const char *text;
|
||||
};
|
||||
|
@ -684,6 +685,7 @@ struct MicrocodeInfo
|
|||
u32 type;
|
||||
u32 crc;
|
||||
bool NoN;
|
||||
bool negativeY;
|
||||
bool textureGen;
|
||||
bool texturePersp;
|
||||
};
|
||||
|
@ -700,6 +702,7 @@ struct GBIInfo
|
|||
u32 getMicrocodeType() const {return m_pCurrent != nullptr ? m_pCurrent->type : NONE;}
|
||||
bool isHWLSupported() const;
|
||||
bool isNoN() const { return m_pCurrent != nullptr ? m_pCurrent->NoN : false; }
|
||||
bool isNegativeY() const { return m_pCurrent != nullptr ? m_pCurrent->negativeY : true; }
|
||||
bool isTextureGen() const { return m_pCurrent != nullptr ? m_pCurrent->textureGen: true; }
|
||||
bool isTexturePersp() const { return m_pCurrent != nullptr ? m_pCurrent->texturePersp: true; }
|
||||
|
||||
|
|
|
@ -246,10 +246,6 @@ void RSP_Init()
|
|||
config.generalEmulation.hacks |= hack_legoRacers;
|
||||
else if (strstr(RSP.romname, (const char *)"Blast") != nullptr)
|
||||
config.generalEmulation.hacks |= hack_blastCorps;
|
||||
else if (strstr(RSP.romname, (const char *)"PACHINKO365NICHI") != nullptr ||
|
||||
strstr(RSP.romname, // Eikou no Saint Andrews (J)
|
||||
(const char *)"\xb4\xb2\xba\xb3\xc9\xbe\xdd\xc4\xb1\xdd\xc4\xde\xd8\xad\xb0\xbd\x00") != nullptr)
|
||||
config.generalEmulation.hacks |= hack_NegativeViewport;
|
||||
else if (strstr(RSP.romname, (const char *)"MASK") != nullptr) // Zelda MM
|
||||
config.generalEmulation.hacks |= hack_ZeldaMM;
|
||||
else if (strstr(RSP.romname, (const char *)"Perfect Dark") != nullptr ||
|
||||
|
|
|
@ -767,7 +767,7 @@ void gSPViewport( u32 v )
|
|||
gSP.viewport.vtrans[2] = _FIXED2FLOAT( *(s16*)&RDRAM[address + 14], 10 );// * 0.00097847357f;
|
||||
gSP.viewport.vtrans[3] = *(s16*)&RDRAM[address + 12];
|
||||
|
||||
if ((config.generalEmulation.hacks & hack_NegativeViewport) != 0 && gSP.viewport.vscale[1] < 0.0f)
|
||||
if (gSP.viewport.vscale[1] < 0.0f && !GBI.isNegativeY())
|
||||
gSP.viewport.vscale[1] = -gSP.viewport.vscale[1];
|
||||
|
||||
gSP.viewport.x = gSP.viewport.vtrans[0] - gSP.viewport.vscale[0];
|
||||
|
|
Loading…
Reference in New Issue
Block a user