| 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. |
| 814 | template<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 | } |
| 827 | template<int vunum> static void vuMicroWrite16(u32 addr, mem16_t data) { |
| 828 | VURegs* vu = vunum ? &VU1 : &VU0; |
| 829 | addr &= vunum ? 0x3fff: 0xfff; |
nothing calls this directly
no test coverage detected