libsnes: savestate uncompressed size 14MB=>10MB (for a game with nothing special)
This commit is contained in:
parent
22a076451b
commit
edbe83bc13
|
@ -59,7 +59,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
||||||
Filename = "libsnes.wbx",
|
Filename = "libsnes.wbx",
|
||||||
Path = dllPath,
|
Path = dllPath,
|
||||||
SbrkHeapSizeKB = 4 * 1024,
|
SbrkHeapSizeKB = 4 * 1024,
|
||||||
InvisibleHeapSizeKB = 2048,
|
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 = 2 * 1024, // TODO: wasn't there more in here?
|
||||||
SealedHeapSizeKB = 128 * 1024
|
SealedHeapSizeKB = 128 * 1024
|
||||||
|
|
Binary file not shown.
|
@ -419,7 +419,7 @@ void PPU::initialize()
|
||||||
oam = (uint8*)interface()->allocSharedMemory("OAM",544);
|
oam = (uint8*)interface()->allocSharedMemory("OAM",544);
|
||||||
cgram = (uint8*)interface()->allocSharedMemory("CGRAM",512);
|
cgram = (uint8*)interface()->allocSharedMemory("CGRAM",512);
|
||||||
|
|
||||||
surface = new uint32[512 * 512];
|
surface = (uint32_t*)alloc_invisible(512 * 512 * sizeof(uint32_t));
|
||||||
output = surface + 16 * 512;
|
output = surface + 16 * 512;
|
||||||
|
|
||||||
alloc_tiledata_cache();
|
alloc_tiledata_cache();
|
||||||
|
@ -447,11 +447,7 @@ void PPU::initialize()
|
||||||
}
|
}
|
||||||
|
|
||||||
PPU::~PPU() {
|
PPU::~PPU() {
|
||||||
delete[] surface;
|
abort();
|
||||||
free_tiledata_cache();
|
|
||||||
interface()->freeSharedMemory(vram);
|
|
||||||
interface()->freeSharedMemory(oam);
|
|
||||||
interface()->freeSharedMemory(cgram);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,7 @@ vram(nullptr),
|
||||||
oam(nullptr),
|
oam(nullptr),
|
||||||
cgram(nullptr)
|
cgram(nullptr)
|
||||||
{
|
{
|
||||||
surface = new uint32[512 * 512];
|
surface = (uint32_t*)alloc_invisible(512 * 512 * sizeof(uint32_t));
|
||||||
output = surface + 16 * 512;
|
output = surface + 16 * 512;
|
||||||
display.width = 256;
|
display.width = 256;
|
||||||
display.height = 224;
|
display.height = 224;
|
||||||
|
@ -147,10 +147,7 @@ cgram(nullptr)
|
||||||
}
|
}
|
||||||
|
|
||||||
PPU::~PPU() {
|
PPU::~PPU() {
|
||||||
delete[] surface;
|
abort();
|
||||||
interface()->freeSharedMemory(vram);
|
|
||||||
interface()->freeSharedMemory(oam);
|
|
||||||
interface()->freeSharedMemory(cgram);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PPU::initialize()
|
void PPU::initialize()
|
||||||
|
|
|
@ -151,7 +151,7 @@ void PPU::initialize()
|
||||||
vram = (uint8*)interface()->allocSharedMemory("VRAM",128 * 1024);
|
vram = (uint8*)interface()->allocSharedMemory("VRAM",128 * 1024);
|
||||||
oam = (uint8*)interface()->allocSharedMemory("OAM",544);
|
oam = (uint8*)interface()->allocSharedMemory("OAM",544);
|
||||||
cgram = (uint8*)interface()->allocSharedMemory("CGRAM",512);
|
cgram = (uint8*)interface()->allocSharedMemory("CGRAM",512);
|
||||||
surface = new uint32[512 * 512];
|
surface = (uint32_t*)alloc_invisible(512 * 512 * sizeof(uint32_t));
|
||||||
output = surface + 16 * 512;
|
output = surface + 16 * 512;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,10 +167,7 @@ screen(*this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
PPU::~PPU() {
|
PPU::~PPU() {
|
||||||
delete[] surface;
|
abort();
|
||||||
interface()->freeSharedMemory(vram);
|
|
||||||
interface()->freeSharedMemory(oam);
|
|
||||||
interface()->freeSharedMemory(cgram);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,14 +130,13 @@ struct Interface : public SNES::Interface {
|
||||||
ptrace(0),
|
ptrace(0),
|
||||||
cart(nullptr, 0)
|
cart(nullptr, 0)
|
||||||
{
|
{
|
||||||
buffer = new uint32_t[512 * 480];
|
buffer = (uint32_t*)alloc_invisible(512 * 480 * sizeof(uint32_t));
|
||||||
palette = new uint32_t[16 * 32768];
|
palette = (uint32_t*)alloc_invisible(16 * 32768 * sizeof(uint32_t));
|
||||||
memset(&cdlInfo,0,sizeof(cdlInfo));
|
memset(&cdlInfo,0,sizeof(cdlInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
~Interface() {
|
~Interface() {
|
||||||
delete[] buffer;
|
abort();
|
||||||
delete[] palette;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue