add functionality to import savefiles

This commit is contained in:
RSDuck
2020-09-11 03:08:06 +02:00
parent 00e2ec3faf
commit f2fa52f26c
8 changed files with 76 additions and 0 deletions

View File

@ -1034,6 +1034,12 @@ void RelocateSave(const char* path, bool write)
NDSCart_SRAM::RelocateSave(path, write);
}
int ImportSRAM(const u8* data, u32 length)
{
memcpy(NDSCart_SRAM::SRAM, data, std::min(length, NDSCart_SRAM::SRAMLength));
return length - NDSCart_SRAM::SRAMLength;
}
void ResetCart()
{
// CHECKME: what if there is a transfer in progress?