MCPcopy Create free account
hub / github.com/N64Recomp/N64Recomp / c0_reg_write_action

Function c0_reg_write_action

RSPRecomp/src/rsp_recomp.cpp:143–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143std::string_view c0_reg_write_action(int cop0_reg) {
144 switch (static_cast<Cop0Reg>(cop0_reg)) {
145 case Cop0Reg::RSP_COP0_SP_SEMAPHORE:
146 return ""; // Ignore semaphore functionality
147 case Cop0Reg::RSP_COP0_SP_STATUS:
148 return ""; // Ignore writes to the status flags since yielding is ignored
149 case Cop0Reg::RSP_COP0_SP_DRAM_ADDR:
150 return "SET_DMA_DRAM";
151 case Cop0Reg::RSP_COP0_SP_MEM_ADDR:
152 return "SET_DMA_MEM";
153 case Cop0Reg::RSP_COP0_SP_RD_LEN:
154 return "DO_DMA_READ";
155 case Cop0Reg::RSP_COP0_SP_WR_LEN:
156 return "DO_DMA_WRITE";
157 default:
158 fmt::print(stderr, "Unhandled mtc0: {}\n", cop0_reg);
159 throw std::runtime_error("Unhandled mtc0");
160 }
161
162}
163
164bool is_c0_reg_write_dma_read(int cop0_reg) {
165 return static_cast<Cop0Reg>(cop0_reg) == Cop0Reg::RSP_COP0_SP_RD_LEN;

Callers 1

process_instructionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected