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

Function vuMicroWrite8

pcsx2/Memory.cpp:814–826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

812// Profiled VU writes: Happen very infrequently, with exception of BIOS initialization (at most twice per
813// frame in-game, and usually none at all after BIOS), so cpu clears aren't much of a big deal.
814template<int vunum> static void vuMicroWrite8(u32 addr,mem8_t data) {
815 VURegs* vu = vunum ? &VU1 : &VU0;
816 addr &= vunum ? 0x3fff: 0xfff;
817
818 if (vunum && THREAD_VU1) {
819 vu1Thread.WriteMicroMem(addr, &data, sizeof(u8));
820 return;
821 }
822 if (vu->Micro[addr]!=data) { // Clear before writing new data
823 ClearVuFunc<vunum>(addr, 8); //(clearing 8 bytes because an instruction is 8 bytes) (cottonvibes)
824 vu->Micro[addr] =data;
825 }
826}
827template<int vunum> static void vuMicroWrite16(u32 addr, mem16_t data) {
828 VURegs* vu = vunum ? &VU1 : &VU0;
829 addr &= vunum ? 0x3fff: 0xfff;

Callers

nothing calls this directly

Calls 1

WriteMicroMemMethod · 0.80

Tested by

no test coverage detected