Make SNES rom memory domain writeable
Use at your own risk
This commit is contained in:
parent
fbee96c76b
commit
1c27943707
Binary file not shown.
|
@ -68,8 +68,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
SbrkHeapSizeKB = 4 * 1024,
|
SbrkHeapSizeKB = 4 * 1024,
|
||||||
InvisibleHeapSizeKB = 8 * 1024,
|
InvisibleHeapSizeKB = 8 * 1024,
|
||||||
MmapHeapSizeKB = 32 * 1024, // TODO: see if we can safely make libco stacks smaller
|
MmapHeapSizeKB = 32 * 1024, // TODO: see if we can safely make libco stacks smaller
|
||||||
PlainHeapSizeKB = 2 * 1024, // TODO: wasn't there more in here?
|
PlainHeapSizeKB = 32 * 1024, // TODO: This can be smaller, probably; needs to be as big as largest ROM + 2MB, or less
|
||||||
SealedHeapSizeKB = 128 * 1024,
|
SealedHeapSizeKB = 80 * 1024,
|
||||||
SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck),
|
SkipCoreConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxCoreConsistencyCheck),
|
||||||
SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck),
|
SkipMemoryConsistencyCheck = comm.CorePreferences.HasFlag(CoreComm.CorePreferencesFlags.WaterboxMemoryConsistencyCheck),
|
||||||
});
|
});
|
||||||
|
|
|
@ -92,7 +92,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
byte* blockPtr = Api.QUERY_get_memory_data(id);
|
byte* blockPtr = Api.QUERY_get_memory_data(id);
|
||||||
|
|
||||||
var md = new MemoryDomainIntPtrMonitor(name, MemoryDomain.Endian.Little, (IntPtr)blockPtr, size,
|
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);
|
byteSize, Api);
|
||||||
|
|
||||||
_memoryDomainList.Add(md);
|
_memoryDomainList.Add(md);
|
||||||
|
|
|
@ -297,10 +297,7 @@ void* snes_allocSharedMemory(const char* memtype, size_t amt)
|
||||||
|
|
||||||
void* ret;
|
void* ret;
|
||||||
|
|
||||||
if (strcmp(memtype, "CARTRIDGE_ROM") == 0)
|
ret = alloc_plain(amt);
|
||||||
ret = alloc_sealed(amt);
|
|
||||||
else
|
|
||||||
ret = alloc_plain(amt);
|
|
||||||
|
|
||||||
comm.str = (char*)memtype;
|
comm.str = (char*)memtype;
|
||||||
comm.size = amt;
|
comm.size = amt;
|
||||||
|
|
Loading…
Reference in New Issue