| 122 | } |
| 123 | |
| 124 | uint32_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 | |
| 143 | std::string_view c0_reg_write_action(int cop0_reg) { |
| 144 | switch (static_cast<Cop0Reg>(cop0_reg)) { |
no outgoing calls
no test coverage detected