SPU: Implement channels 70, 71, add naming for channel 69 (#8932)

This commit is contained in:
Eladash 2020-09-19 15:08:35 +03:00 committed by GitHub
parent 9db97278f3
commit c436ef0c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 6 deletions

View File

@ -2470,7 +2470,9 @@ void spu_recompiler::WRCH(spu_opcode_t op)
// TODO // TODO
break; break;
} }
case 69: case SPU_Set_Bkmk_Tag:
case SPU_PM_Start_Ev:
case SPU_PM_Stop_Ev:
{ {
return; return;
} }

View File

@ -56,7 +56,7 @@ static constexpr const char* spu_ch_name[128] =
"ch41", "ch42", "ch43", "ch44", "ch45", "ch46", "ch47", "ch48", "ch41", "ch42", "ch43", "ch44", "ch45", "ch46", "ch47", "ch48",
"ch49", "ch50", "ch51", "ch52", "ch53", "ch54", "ch55", "ch56", "ch49", "ch50", "ch51", "ch52", "ch53", "ch54", "ch55", "ch56",
"ch57", "ch58", "ch59", "ch60", "ch61", "ch62", "ch63", "ch64", "ch57", "ch58", "ch59", "ch60", "ch61", "ch62", "ch63", "ch64",
"ch65", "ch66", "ch67", "ch68", "ch69", "ch70", "ch71", "ch72", "ch65", "ch66", "ch67", "ch68", "SPU_Set_Bkmk_Tag", "SPU_PM_Start_Ev", "SPU_PM_Stop_Ev", "ch72",
"ch73", "ch74", "ch75", "ch76", "ch77", "ch78", "ch79", "ch80", "ch73", "ch74", "ch75", "ch76", "ch77", "ch78", "ch79", "ch80",
"ch81", "ch82", "ch83", "ch84", "ch85", "ch86", "ch87", "ch88", "ch81", "ch82", "ch83", "ch84", "ch85", "ch86", "ch87", "ch88",
"ch89", "ch90", "ch91", "ch92", "ch93", "ch94", "ch95", "ch96", "ch89", "ch90", "ch91", "ch92", "ch93", "ch94", "ch95", "ch96",

View File

@ -2514,7 +2514,7 @@ u32 spu_thread::get_ch_count(u32 ch)
case MFC_Cmd: return 16 - mfc_size; case MFC_Cmd: return 16 - mfc_size;
} }
fmt::throw_exception("Unknown/illegal channel (ch=%d [%s])" HERE, ch, ch < 128 ? spu_ch_name[ch] : "???"); fmt::throw_exception("Unknown/illegal channel in RCHCNT (ch=%d [%s])" HERE, ch, ch < 128 ? spu_ch_name[ch] : "???");
} }
s64 spu_thread::get_ch_value(u32 ch) s64 spu_thread::get_ch_value(u32 ch)
@ -2709,7 +2709,7 @@ s64 spu_thread::get_ch_value(u32 ch)
} }
} }
fmt::throw_exception("Unknown/illegal channel (ch=%d [%s])" HERE, ch, ch < 128 ? spu_ch_name[ch] : "???"); fmt::throw_exception("Unknown/illegal channel in RDCH (ch=%d [%s])" HERE, ch, ch < 128 ? spu_ch_name[ch] : "???");
} }
bool spu_thread::set_ch_value(u32 ch, u32 value) bool spu_thread::set_ch_value(u32 ch, u32 value)
@ -3060,13 +3060,15 @@ bool spu_thread::set_ch_value(u32 ch, u32 value)
return true; return true;
} }
case 69: case SPU_Set_Bkmk_Tag:
case SPU_PM_Start_Ev:
case SPU_PM_Stop_Ev:
{ {
return true; return true;
} }
} }
fmt::throw_exception("Unknown/illegal channel (ch=%d [%s], value=0x%x)" HERE, ch, ch < 128 ? spu_ch_name[ch] : "???", value); fmt::throw_exception("Unknown/illegal channel in WRCH (ch=%d [%s], value=0x%x)" HERE, ch, ch < 128 ? spu_ch_name[ch] : "???", value);
} }
bool spu_thread::stop_and_signal(u32 code) bool spu_thread::stop_and_signal(u32 code)

View File

@ -35,6 +35,9 @@ enum : u32
SPU_WrOutMbox = 28, // Write outbound mailbox contents SPU_WrOutMbox = 28, // Write outbound mailbox contents
SPU_RdInMbox = 29, // Read inbound mailbox contents SPU_RdInMbox = 29, // Read inbound mailbox contents
SPU_WrOutIntrMbox = 30, // Write outbound interrupt mailbox contents (interrupting PPU) SPU_WrOutIntrMbox = 30, // Write outbound interrupt mailbox contents (interrupting PPU)
SPU_Set_Bkmk_Tag = 69, // Causes an event that can be logged in the performance monitor logic if enabled in the SPU
SPU_PM_Start_Ev = 70, // Starts the performance monitor event if enabled
SPU_PM_Stop_Ev = 71, // Stops the performance monitor event if enabled
}; };
// MFC Channels // MFC Channels