[BS-X] Make Empty Memory Pack if loaded from Multi Cart menu

(This is a conscious choice. It means no empty Memory Pack will be made if loaded like a regular ROM, which is fine.)
This commit is contained in:
luigiblood 2016-11-24 03:19:36 +01:00
parent 50228801f1
commit 3d38857b44

View File

@ -2002,6 +2002,15 @@ bool8 CMemory::LoadBSCart ()
CalculatedSize = Multi.cartSizeA;
if (Multi.cartSizeB == 0 && Multi.cartSizeA <= (MAX_ROM_SIZE - 0x100000))
{
//Initialize 1MB Empty Memory Pack only if cart B is cleared
//It does not make a Memory Pack if game is loaded like a normal ROM
Multi.cartOffsetB = CalculatedSize;
Multi.cartSizeB = 0x100000;
memset(Memory.ROM + Multi.cartOffsetB, 0xFF, 0x100000);
}
return (TRUE);
}