MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / cdvdWriteNVM

Function cdvdWriteNVM

pcsx2/CDVD/CDVD.cpp:256–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256static void cdvdWriteNVM(const u8* src, int offset, int bytes)
257{
258 int to_write = bytes;
259 if (static_cast<size_t>(offset + bytes) > sizeof(s_nvram)) [[unlikely]]
260 {
261 WARNING_LOG("CDVD: Out of bounds NVRAM write: offset={}, bytes={}", offset, bytes);
262 to_write = std::max(static_cast<int>(sizeof(s_nvram)) - offset, 0);
263 }
264
265 if (to_write > 0) [[likely]]
266 std::memcpy(&s_nvram[offset], src, to_write);
267}
268
269static void cdvdReadConsoleID(u8* id)
270{

Callers 7

cdvdWriteConsoleIDFunction · 0.85
cdvdWriteILinkIDFunction · 0.85
cdvdWriteModelNumberFunction · 0.85
cdvdWriteRegionParamsFunction · 0.85
cdvdWriteMACFunction · 0.85
cdvdWriteConfigFunction · 0.85
cdvdWrite16Function · 0.85

Calls 1

maxFunction · 0.50

Tested by

no test coverage detected