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

Function expected_c0_reg_value

RSPRecomp/src/rsp_recomp.cpp:124–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124uint32_t expected_c0_reg_value(int cop0_reg) {
125 switch (static_cast<Cop0Reg>(cop0_reg)) {
126 case Cop0Reg::RSP_COP0_SP_STATUS:
127 return 0; // None of the flags in RSP status are set
128 case Cop0Reg::RSP_COP0_SP_DMA_FULL:
129 return 0; // Pretend DMAs complete instantly
130 case Cop0Reg::RSP_COP0_SP_DMA_BUSY:
131 return 0; // Pretend DMAs complete instantly
132 case Cop0Reg::RSP_COP0_SP_SEMAPHORE:
133 return 0; // Always acquire the semaphore
134 case Cop0Reg::RSP_COP0_DPC_STATUS:
135 return 0; // Good enough for the microcodes that would be recompiled (i.e. non-graphics ones)
136 default:
137 fmt::print(stderr, "Unhandled mfc0: {}\n", cop0_reg);
138 throw std::runtime_error("Unhandled mfc0");
139 return 0;
140 }
141}
142
143std::string_view c0_reg_write_action(int cop0_reg) {
144 switch (static_cast<Cop0Reg>(cop0_reg)) {

Callers 1

process_instructionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected