dang it, do a better job adding sram memdomain to vbanext
This commit is contained in:
parent
5ed2e46982
commit
41dd8741d5
|
@ -175,6 +175,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
public IntPtr rom;
|
||||
public IntPtr mmio;
|
||||
public IntPtr sram;
|
||||
public int sram_size;
|
||||
}
|
||||
|
||||
// this isn't used directly at the moment. but it could be used for something eventually...
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBA
|
|||
mm.Add(MemoryDomain.FromIntPtr("VRAM", 96 * 1024, l, s.vram, true, 4));
|
||||
mm.Add(MemoryDomain.FromIntPtr("OAM", 1024, l, s.oam, true, 4));
|
||||
mm.Add(MemoryDomain.FromIntPtr("ROM", 32 * 1024 * 1024, l, s.rom, true, 4));
|
||||
mm.Add(MemoryDomain.FromIntPtr("SRAM", 128 * 1024, l, s.sram, true, 4));
|
||||
mm.Add(MemoryDomain.FromIntPtr("SRAM", s.sram_size, l, s.sram, true, 4));
|
||||
|
||||
mm.Add(new MemoryDomainDelegate("System Bus", 0x10000000, l,
|
||||
delegate(long addr)
|
||||
|
|
Binary file not shown.
|
@ -13443,7 +13443,29 @@ template<bool isReader>bool SyncBatteryRam(NewState *ns)
|
|||
mem.rom = rom;
|
||||
mem.vram = vram;
|
||||
mem.oam = oam;
|
||||
switch (cpuSaveType)
|
||||
{
|
||||
default:
|
||||
case 0: // auto
|
||||
mem.sram = flashSaveMemory;
|
||||
mem.sram_size = 0x10000;;
|
||||
return;
|
||||
case 1:
|
||||
case 4: // eeprom
|
||||
mem.sram = eepromData;
|
||||
mem.sram_size = eepromSize;
|
||||
return;
|
||||
case 2: // sram
|
||||
mem.sram = flashSaveMemory;
|
||||
mem.sram_size = 0x10000;
|
||||
return;
|
||||
case 3: // flash
|
||||
mem.sram = flashSaveMemory;
|
||||
mem.sram_size = flashSize;
|
||||
return;
|
||||
case 5: // none
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void BusWrite(u32 addr, u8 val)
|
||||
|
|
|
@ -28,9 +28,10 @@ struct MemoryAreas
|
|||
void *palram;
|
||||
void *vram;
|
||||
void *oam;
|
||||
void *sram;
|
||||
void *rom;
|
||||
void *mmio;
|
||||
void *sram;
|
||||
uint32_t sram_size;
|
||||
};
|
||||
|
||||
#define FLASH_128K_SZ 0x20000
|
||||
|
|
Loading…
Reference in New Issue