aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNebuleon Fumika2013-02-01 00:57:15 -0500
committerNebuleon Fumika2013-02-01 00:59:12 -0500
commitc9c91f327a4ded2f52f13c449690a334623e0fdd (patch)
tree1e6c96d320c7097fe1816f955910389ddaf316ae
parent60f6ffcc701c4175e31d90f950fb34f6b07a1712 (diff)
downloadsnes9x2005-c9c91f327a4ded2f52f13c449690a334623e0fdd.tar.gz
snes9x2005-c9c91f327a4ded2f52f13c449690a334623e0fdd.tar.bz2
snes9x2005-c9c91f327a4ded2f52f13c449690a334623e0fdd.zip
Don't initialise the ROM memory at startup, since a ROM needs to be loaded into it anyway. According to BassAceGold's timings, this should save 179 milliseconds.
-rw-r--r--source/memmap.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/memmap.cpp b/source/memmap.cpp
index c1546b1..755f7a0 100644
--- a/source/memmap.cpp
+++ b/source/memmap.cpp
@@ -415,11 +415,12 @@ bool8 CMemory::Init ()
SRAM = (uint8 *) malloc (0x20000);
VRAM = (uint8 *) malloc (0x10000);
ROM = (uint8 *) malloc (MAX_ROM_SIZE + 0x200 + 0x8000);
- // DS2 DMA notes: Can this be sped up with DMA from a block of zeroes? [Neb]
memset (RAM, 0, 0x20000);
memset (SRAM, 0, 0x20000);
memset (VRAM, 0, 0x10000);
- memset (ROM, 0, MAX_ROM_SIZE + 0x200 + 0x8000);
+ // This needs to be initialised with a ROM first anyway, so don't
+ // bother memsetting. [Neb]
+ // memset (ROM, 0, MAX_ROM_SIZE + 0x200 + 0x8000);
BSRAM = (uint8 *) malloc (0x80000);
memset (BSRAM, 0, 0x80000);