MCPcopy Create free account
hub / github.com/Hydr8gon/3Beans / writeCopyCnt

Method writeCopyCnt

src/core/gpu/gpu.cpp:841–855  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

839}
840
841void Gpu::writeCopyCnt(uint32_t mask, uint32_t value) {
842 // Allow clearing the interrupt bit but not setting it
843 if ((mask & BIT(8)) && !(value & BIT(8)))
844 gpuCopy.cnt &= ~BIT(8);
845
846 // Check if a copy should start and schedule the end signal based on type and size
847 if (!(value & mask & BIT(0)) || !(cfg11GpuCnt & BIT(4))) return;
848 core.schedule(GPU_END_COPY, (gpuCopy.flags & BIT(3)) ? (gpuCopy.texSize / 4)
849 : ((gpuCopy.dispDstSize & 0xFFFF) * (gpuCopy.dispDstSize >> 16)));
850
851 // Start the copy now or forward it to the thread if running
852 if (!thread) return startCopy(gpuCopy);
853 GpuCopyRegs *regs = new GpuCopyRegs(gpuCopy);
854 addThreadTask(TASK_COPY, regs);
855}
856
857void Gpu::writeCopyTexSize(uint32_t mask, uint32_t value) {
858 // Write to the GPU_COPY_TEX_SIZE register

Callers 1

ioWriteMethod · 0.80

Calls 1

scheduleMethod · 0.80

Tested by

no test coverage detected