Make SNES rom memory domain writeable

Use at your own risk
This commit is contained in:
nattthebear 2020-12-13 20:11:58 -05:00
parent fbee96c76b
commit 1c27943707
4 changed files with 4 additions and 7 deletions

Binary file not shown.

View File

@ -68,8 +68,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
SbrkHeapSizeKB = 4 * 1024,
InvisibleHeapSizeKB = 8 * 1024,
MmapHeapSizeKB = 32 * 1024, // TODO: see if we can safely make libco stacks smaller
PlainHeapSizeKB = 2 * 1024, // TODO: wasn't there more in here?
SealedHeapSizeKB = 128 * 1024,
PlainHeapSizeKB = 32 * 1024, // TODO: This can be smaller, probably; needs to be as big as largest ROM + 2MB, or less
SealedHeapSizeKB = 80 * 1024,
SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck),
SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck),
});

View File

@ -92,7 +92,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
byte* blockPtr = Api.QUERY_get_memory_data(id);
var md = new MemoryDomainIntPtrMonitor(name, MemoryDomain.Endian.Little, (IntPtr)blockPtr, size,
id != LibsnesApi.SNES_MEMORY.CARTRIDGE_ROM, // hack: for just this one memory area, it will be readonly
true,
byteSize, Api);
_memoryDomainList.Add(md);

View File

@ -297,10 +297,7 @@ void* snes_allocSharedMemory(const char* memtype, size_t amt)
void* ret;
if (strcmp(memtype, "CARTRIDGE_ROM") == 0)
ret = alloc_sealed(amt);
else
ret = alloc_plain(amt);
ret = alloc_plain(amt);
comm.str = (char*)memtype;
comm.size = amt;