1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00

Fixed gSPSegment command (sic!)

This commit is contained in:
Sergey Lipskiy 2014-11-06 17:06:45 +06:00
parent 99e3869056
commit bcdce0d501
2 changed files with 1 additions and 23 deletions

View File

@ -147,7 +147,7 @@ void F3D_MoveWord( u32 w0, u32 w1 )
gSPClipRatio( w1 );
break;
case G_MW_SEGMENT:
gSPSegment( _SHIFTR( w0, 8, 16 ) >> 2, w1 & 0x00FFFFFF );
gSPSegment( _SHIFTR( w0, 10, 4 ), w1 & 0x00FFFFFF );
break;
case G_MW_FOG:
/* u32 fm, fo, min, max;

22
gSP.cpp
View File

@ -1503,32 +1503,10 @@ void gSPPopMatrix( u32 param )
void gSPSegment( s32 seg, s32 base )
{
if (seg > 0xF) {
#ifdef DEBUG
DebugMsg( DEBUG_HIGH | DEBUG_ERROR, "// Attempting to load address into invalid segment\n",
SegmentText[seg], base );
DebugMsg( DEBUG_HIGH | DEBUG_HANDLED, "gSPSegment( %s, 0x%08X );\n",
SegmentText[seg], base );
#endif
return;
}
if ((unsigned int)base > RDRAMSize - 1) {
#ifdef DEBUG
DebugMsg( DEBUG_HIGH | DEBUG_ERROR, "// Attempting to load invalid address into segment array\n",
SegmentText[seg], base );
DebugMsg( DEBUG_HIGH | DEBUG_HANDLED, "gSPSegment( %s, 0x%08X );\n",
SegmentText[seg], base );
#endif
return;
}
gSP.segment[seg] = base;
#ifdef DEBUG
DebugMsg( DEBUG_HIGH | DEBUG_HANDLED, "gSPSegment( %s, 0x%08X );\n",
SegmentText[seg], base );
#endif
}
void gSPClipRatio( u32 r )