mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
Implement the SRR0 register.
This commit is contained in:
parent
a87de1b565
commit
03b059c1d5
2 changed files with 10 additions and 1 deletions
|
|
@ -558,6 +558,8 @@ u32 SPUThread::GetChannelCount(u32 ch)
|
|||
|
||||
switch (ch)
|
||||
{
|
||||
case SPU_WrSRR0: res = 1; break;
|
||||
case SPU_RdSRR0: res = 1; break;
|
||||
case SPU_WrOutMbox: res = SPU.Out_MBox.GetFreeCount(); break;
|
||||
case SPU_WrOutIntrMbox: res = SPU.Out_IntrMBox.GetFreeCount(); break;
|
||||
case SPU_RdInMbox: res = SPU.In_MBox.GetCount(); break;
|
||||
|
|
@ -589,6 +591,9 @@ void SPUThread::WriteChannel(u32 ch, const u128& r)
|
|||
|
||||
switch (ch)
|
||||
{
|
||||
case SPU_WrSRR0:
|
||||
SRR0 = v & 0x3FFFC; //LSLR & ~3
|
||||
break;
|
||||
case SPU_WrOutIntrMbox:
|
||||
{
|
||||
if (!group) // if RawSPU
|
||||
|
|
@ -910,6 +915,9 @@ void SPUThread::ReadChannel(u128& r, u32 ch)
|
|||
|
||||
switch (ch)
|
||||
{
|
||||
case SPU_RdSRR0:
|
||||
v = SRR0;
|
||||
break;
|
||||
case SPU_RdInMbox:
|
||||
{
|
||||
while (!SPU.In_MBox.Pop(v) && !Emu.IsStopped())
|
||||
|
|
@ -1223,4 +1231,4 @@ spu_thread::spu_thread(u32 entry, const std::string& name, u32 stack_size, u32 p
|
|||
thread->SetPrio(prio ? prio : Emu.GetInfo().GetProcParam().primary_prio);
|
||||
|
||||
argc = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue