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

Method CommandWriteMemPack

Source/Core/PIF.cpp:675–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673// i is the address of the first write info (after command itself)
674
675void IController::CommandWriteMemPack(u32 channel, u8 *cmd)
676{
677 u32 addr {((cmd[3] << 8) | (u32)cmd[4])};
678 u8* data {&cmd[5]};
679
680 if (addr != 0x8001)
681 {
682 addr &= 0xFFE0;
683
684 if (addr <= 0x7FE0)
685 {
686 Save_MarkMempackDirty();
687 memcpy(&mMemPack[channel][addr], data, 32);
688 }
689 else
690 {
691 // Do nothing, eventually enable rumblepak
692 }
693 }
694
695 cmd[37] = CalculateDataCrc(data);
696}
697
698
699//

Callers

nothing calls this directly

Calls 1

Save_MarkMempackDirtyFunction · 0.85

Tested by

no test coverage detected