Tatsunoko has DVD trouble. This prevents it from corrupting RAM. This doesn't make the game work, though.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1523 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2008-12-13 19:55:04 +00:00
parent 3c2a41c290
commit f225f92f4d
1 changed files with 16 additions and 3 deletions

View File

@ -87,7 +87,11 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
/* Set out buffer to zeroes as a safety precaution to avoid answering
nonsense values */
Memory::Memset(_BufferOut, 0, _BufferOutSize);
// TATSUNOKO VS CAPCOM: Gets here with _BufferOut == 0x0!!!
if (_BufferOut != 0) {
Memory::Memset(_BufferOut, 0, _BufferOutSize);
}
switch (Command)
{
@ -133,11 +137,16 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
// DVDLowRead
case 0x71:
{
{
if (_BufferOut == 0)
{
PanicAlert("DVDLowRead : _BufferOut == 0");
return 0;
}
u32 Size = Memory::Read_U32(_BufferIn + 0x04);
u64 DVDAddress = (u64)Memory::Read_U32(_BufferIn + 0x08) << 2;
const char* pFilename = m_pFileSystem->GetFileName(DVDAddress);
const char *pFilename = m_pFileSystem->GetFileName(DVDAddress);
if (pFilename != NULL)
{
LOG(WII_IPC_DVD, " DVDLowRead: %s (0x%x) - (DVDAddr: 0x%x, Size: 0x%x)", pFilename, m_pFileSystem->GetFileSize(pFilename), DVDAddress, Size);
@ -244,6 +253,10 @@ u32 CWII_IPC_HLE_Device_di::ExecuteCommand(u32 _BufferIn, u32 _BufferInSize, u32
// PanicAlert("DVDLowSeek");
break;
case 0xe0:
PanicAlert("DVD unknown command 0xe0, so far only seen in Tatsunoko. Don't know what to do, things will probably go wrong.");
break;
// DVDLowStopMotor
case 0xe3:
{