Support Dezaemon 3D saves (SRAM 96KB)

Support Dezaemon 3D saves (SRAM 96KB)
This commit is contained in:
Nekokabu 2015-10-30 22:09:56 +09:00
parent ba2e5ba9e6
commit cd2f3cf173
1 changed files with 9 additions and 0 deletions

View File

@ -63,6 +63,10 @@ void CSram::DmaFromSram(BYTE * dest, int StartOffset, int len)
return;
}
}
// Fix Dezaemon 3D saves
StartOffset = ((StartOffset >> 3) & 0xFFFF8000) | (StartOffset & 0x7FFF);
DWORD Offset = StartOffset & 3;
if (Offset == 0)
@ -145,7 +149,12 @@ void CSram::DmaToSram(BYTE * Source, int StartOffset, int len)
return;
}
}
// Fix Dezaemon 3D saves
StartOffset = ((StartOffset >> 3) & 0xFFFF8000) | (StartOffset & 0x7FFF);
DWORD Offset = StartOffset & 3;
if (Offset == 0)
{
SetFilePointer(m_hFile, StartOffset, NULL, FILE_BEGIN);