diff --git a/memory/ram.cpp b/memory/ram.cpp index d430a43..123a4f4 100644 --- a/memory/ram.cpp +++ b/memory/ram.cpp @@ -1,7 +1,9 @@ #include "ram.h" +#include RAM::RAM(u16 size) : size(size), readonly(false) { memory = new u8[size]; + std::memset(memory, 0, sizeof(u8) * size); } RAM::RAM(u8* memory, u16 size, bool readonly)