mirror of https://github.com/snes9xgit/snes9x.git
Make ROMStorage dynamic.
This commit is contained in:
parent
6b2a8bf2de
commit
fdcef11795
|
@ -928,10 +928,11 @@ bool8 CMemory::Init (void)
|
|||
return (FALSE);
|
||||
}
|
||||
|
||||
ROMStorage.resize(MAX_ROM_SIZE + 0x200 + 0x8000);
|
||||
memset(RAM, 0, sizeof(RAM));
|
||||
memset(SRAM, 0, sizeof(SRAM));
|
||||
memset(VRAM, 0, sizeof(VRAM));
|
||||
memset(ROMStorage, 0, sizeof(ROMStorage));
|
||||
memset(ROMStorage.data(), 0, ROMStorage.size());
|
||||
|
||||
memset(IPPU.TileCache[TILE_2BIT], 0, MAX_2BIT_TILES * 64);
|
||||
memset(IPPU.TileCache[TILE_4BIT], 0, MAX_4BIT_TILES * 64);
|
||||
|
|
3
memmap.h
3
memmap.h
|
@ -13,6 +13,7 @@
|
|||
#define MEMMAP_MASK (MEMMAP_BLOCK_SIZE - 1)
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
struct CMemory
|
||||
{
|
||||
|
@ -56,7 +57,7 @@ struct CMemory
|
|||
int32 HeaderCount;
|
||||
|
||||
uint8 RAM[0x20000];
|
||||
uint8 ROMStorage[MAX_ROM_SIZE + 0x200 + 0x8000];
|
||||
std::vector<uint8_t> ROMStorage;
|
||||
uint8 *ROM;
|
||||
uint8 SRAM[0x80000];
|
||||
uint8 VRAM[0x10000];
|
||||
|
|
Loading…
Reference in New Issue