diff --git a/desmume/src/MMU.cpp b/desmume/src/MMU.cpp index 24fb1b9d8..020109e2b 100644 --- a/desmume/src/MMU.cpp +++ b/desmume/src/MMU.cpp @@ -1947,8 +1947,8 @@ u32 TGXSTAT::read32() // stack position always equal zero. possible timings is wrong // using in "The Wild West" - int proj_level = mtxStackProjection.position & 1; - int mv_level = mtxStackPosition.position & 31; + int proj_level = mtxStackIndex[MATRIXMODE_PROJECTION] & 1; + int mv_level = mtxStackIndex[MATRIXMODE_POSITION] & 31; ret |= ((proj_level << 13) | (mv_level << 8)); ret |= sb<<14; //stack busy @@ -1983,7 +1983,7 @@ void TGXSTAT::write32(const u32 val) // Writing "1" to Bit15 does reset the Error Flag (Bit15), // and additionally resets the Projection Stack Pointer (Bit13) // (and probably (?) also the Texture Stack Pointer)?? - mtxStackProjection.position = 0; + mtxStackIndex[MATRIXMODE_PROJECTION] = 0; se = 0; //clear stack error flag } //printf("gxstat write: %08X while gxfifo.size=%d\n",val,gxFIFO.size);