Commit 098a7303 authored by Jean-Philip Desjardins's avatar Jean-Philip Desjardins
Browse files

HACK: This makes Spyro: A Hero's Tail boot.

Needs to be cleaned up.
parent 41b45dbc
......@@ -43,6 +43,7 @@ void CGIF::Reset()
m_eop = false;
m_qtemp = QTEMP_INIT;
m_signalState = SIGNAL_STATE_NONE;
m_xferDelay = 0;
}
void CGIF::LoadState(Framework::CZipArchiveReader& archive)
......@@ -413,6 +414,7 @@ uint32 CGIF::ReceiveDMA(uint32 address, uint32 qwc, uint32 unused, bool tagInclu
address += 0x10;
}
m_xferDelay = 0x10;
address += ProcessMultiplePackets(memory, address, end, CGsPacketMetadata(3));
assert(address <= end);
......@@ -431,6 +433,12 @@ uint32 CGIF::GetRegister(uint32 address)
//Indicate that FIFO is full (15 qwords) (needed for GTA: San Andreas)
result |= (0x1F << 24);
}
if(m_xferDelay > 0)
{
result |= GIF_STAT_OPH;
result |= GIF_STAT_APATH3;
m_xferDelay--;
}
break;
}
#ifdef _DEBUG
......
......@@ -17,6 +17,7 @@ public:
enum
{
GIF_STAT_M3P = 0x002,
GIF_STAT_OPH = 0x200,
GIF_STAT_APATH3 = 0xC00,
};
......@@ -88,6 +89,7 @@ private:
uint8* m_ram;
uint8* m_spr;
CGSHandler*& m_gs;
int32 m_xferDelay = 0;
CProfiler::ZoneHandle m_gifProfilerZone = 0;
};
......@@ -144,7 +144,7 @@ std::string CStdio::PrintFormatted(const char* format, CArgumentIterator& args)
}
else
{
fillChar = type;
fillChar = '0';
inPrecision = true;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment