MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / InitMempackContent

Function InitMempackContent

Source/Core/Save.cpp:214–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212};
213
214static void InitMempackContent()
215{
216 for (size_t dst_off = 0; dst_off < MemoryRegionSizes[MEM_MEMPACK]; dst_off += 32 * 1024)
217 {
218 u8 * mempack {(u8*)g_pMemoryBuffers[MEM_MEMPACK] + dst_off};
219 for (u32 i = 0; i < 0x8000; i += 2)
220 {
221 mempack[i + 0] = 0x00;
222 mempack[i + 1] = 0x03;
223 }
224 memcpy(mempack, gMempackInitialize, sizeof(gMempackInitialize));
225
226#ifdef DAEDALUS_ENABLE_ASSERTS
227 DAEDALUS_ASSERT(dst_off + 0x8000 <= MemoryRegionSizes[MEM_MEMPACK], "Buffer overflow");
228 DAEDALUS_ASSERT(dst_off + sizeof(gMempackInitialize) <= MemoryRegionSizes[MEM_MEMPACK], "Buffer overflow");
229#endif
230 }
231}

Callers 1

Save_ResetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected