From c9c91f327a4ded2f52f13c449690a334623e0fdd Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika Date: Fri, 1 Feb 2013 00:57:15 -0500 Subject: 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. --- source/memmap.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source') 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); -- cgit v1.2.3