mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-30 14:34:22 +01:00
Snes9x - Set SRAM initialization to set whole buffer (#987)
This commit is contained in:
parent
09db4c69f0
commit
35884aac65
@ -907,6 +907,8 @@ static void S9xDeinterleaveGD24 (int size, uint8 *base)
|
|||||||
|
|
||||||
bool8 CMemory::Init (void)
|
bool8 CMemory::Init (void)
|
||||||
{
|
{
|
||||||
|
// TODO: If these change size, check other locations in the code that also
|
||||||
|
// have the fixed size. In the future, make this a static allocation.
|
||||||
RAM = (uint8 *) memalign(32,0x20000);
|
RAM = (uint8 *) memalign(32,0x20000);
|
||||||
SRAM = (uint8 *) memalign(32,0x80000);
|
SRAM = (uint8 *) memalign(32,0x80000);
|
||||||
VRAM = (uint8 *) memalign(32,0x10000);
|
VRAM = (uint8 *) memalign(32,0x10000);
|
||||||
@ -1947,7 +1949,8 @@ void CMemory::ClearSRAM (bool8 onlyNonSavedSRAM)
|
|||||||
if (!(Settings.SuperFX && ROMType < 0x15) && !(Settings.SA1 && ROMType == 0x34)) // can have SRAM
|
if (!(Settings.SuperFX && ROMType < 0x15) && !(Settings.SA1 && ROMType == 0x34)) // can have SRAM
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memset(SRAM, SNESGameFixes.SRAMInitialValue, sizeof(SRAM));
|
// TODO: If SRAM size changes change this value as well
|
||||||
|
memset(SRAM, SNESGameFixes.SRAMInitialValue, (32,0x80000));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool8 CMemory::LoadSRAM (const char *filename)
|
bool8 CMemory::LoadSRAM (const char *filename)
|
||||||
|
Loading…
Reference in New Issue
Block a user