fix bug in savestate loading

This commit is contained in:
Arisotura 2023-04-06 21:20:06 +02:00
parent 6f7a2b3413
commit e78ada50b9
2 changed files with 8 additions and 2 deletions

View File

@ -935,7 +935,9 @@ bool DoSavestate(Savestate* file)
{
// 'dept of redundancy dept'
// but we do need to update the mappings
MapSharedWRAM(WRAMCnt);
u8 wramcnt = WRAMCnt;
WRAMCnt ^= 0xFF;
MapSharedWRAM(wramcnt);
InitTimings();
SetGBASlotTimings();

View File

@ -647,6 +647,10 @@ printf("[MC] finish blob type=%d len=%d\n", type, len);
BlobLens[i] = 0;
}
/*Savestate* zorp = new Savestate("netplay3.mln", true);
NDS::DoSavestate(zorp);
delete zorp;*/
printf("[MC] state loaded, PC=%08X/%08X\n", NDS::GetPC(0), NDS::GetPC(1));
ENetPacket* resp = enet_packet_create(buf, 1, ENET_PACKET_FLAG_RELIABLE);
enet_peer_send(peer, 1, resp);