mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Disable BranchLessZ logic for Zelda MM ucode since
it uses unknown format of test Z value.
This commit is contained in:
parent
dce0019e9a
commit
a911c85881
3
GBI.cpp
3
GBI.cpp
|
@ -208,6 +208,7 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize)
|
||||||
current.dataSize = uc_dsize;
|
current.dataSize = uc_dsize;
|
||||||
current.NoN = false;
|
current.NoN = false;
|
||||||
current.textureGen = true;
|
current.textureGen = true;
|
||||||
|
current.branchLessZ = true;
|
||||||
current.type = NONE;
|
current.type = NONE;
|
||||||
|
|
||||||
// See if we can identify it by CRC
|
// See if we can identify it by CRC
|
||||||
|
@ -252,6 +253,8 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize)
|
||||||
type = F3DEX2;
|
type = F3DEX2;
|
||||||
if (strncmp(&uc_str[14], "F3DF", 4) == 0)
|
if (strncmp(&uc_str[14], "F3DF", 4) == 0)
|
||||||
current.textureGen = false;
|
current.textureGen = false;
|
||||||
|
else if (strncmp(&uc_str[14], "F3DZ", 4) == 0)
|
||||||
|
current.branchLessZ = false;
|
||||||
}
|
}
|
||||||
else if (strncmp( &uc_str[14], "L3D", 3 ) == 0) {
|
else if (strncmp( &uc_str[14], "L3D", 3 ) == 0) {
|
||||||
u32 t = 22;
|
u32 t = 22;
|
||||||
|
|
2
GBI.h
2
GBI.h
|
@ -679,6 +679,7 @@ struct MicrocodeInfo
|
||||||
u32 crc;
|
u32 crc;
|
||||||
bool NoN;
|
bool NoN;
|
||||||
bool textureGen;
|
bool textureGen;
|
||||||
|
bool branchLessZ;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GBIInfo
|
struct GBIInfo
|
||||||
|
@ -694,6 +695,7 @@ struct GBIInfo
|
||||||
bool isHWLSupported() const;
|
bool isHWLSupported() const;
|
||||||
bool isNoN() const { return m_pCurrent != NULL ? m_pCurrent->NoN : false; }
|
bool isNoN() const { return m_pCurrent != NULL ? m_pCurrent->NoN : false; }
|
||||||
bool isTextureGen() const { return m_pCurrent != NULL ? m_pCurrent->textureGen: true; }
|
bool isTextureGen() const { return m_pCurrent != NULL ? m_pCurrent->textureGen: true; }
|
||||||
|
bool isBranchLessZ() const { return m_pCurrent != NULL ? m_pCurrent->branchLessZ : true; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _makeCurrent(MicrocodeInfo * _pCurrent);
|
void _makeCurrent(MicrocodeInfo * _pCurrent);
|
||||||
|
|
2
gSP.cpp
2
gSP.cpp
|
@ -1266,7 +1266,7 @@ void gSPBranchLessZ( u32 branchdl, u32 vtx, f32 zval )
|
||||||
|
|
||||||
SPVertex & v = video().getRender().getVertex(vtx);
|
SPVertex & v = video().getRender().getVertex(vtx);
|
||||||
const float zTest = v.z / v.w;
|
const float zTest = v.z / v.w;
|
||||||
if (zTest > 1.0f || zTest <= zval)
|
if (zTest > 1.0f || zTest <= zval || !GBI.isBranchLessZ())
|
||||||
RSP.PC[RSP.PCi] = address;
|
RSP.PC[RSP.PCi] = address;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
Loading…
Reference in New Issue
Block a user