mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 03:02:53 +01:00
RawSPU initialization fix
This commit is contained in:
parent
8e19af530b
commit
b487dcee27
@ -11,7 +11,6 @@
|
||||
#include "Emu/ARMv7/ARMv7Thread.h"
|
||||
|
||||
CPUThreadManager::CPUThreadManager()
|
||||
: m_raw_spu_num(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -22,7 +21,6 @@ CPUThreadManager::~CPUThreadManager()
|
||||
|
||||
void CPUThreadManager::Close()
|
||||
{
|
||||
m_raw_spu_num = 0;
|
||||
while(m_threads.size()) RemoveThread(m_threads[0]->GetId());
|
||||
}
|
||||
|
||||
@ -34,10 +32,26 @@ CPUThread& CPUThreadManager::AddThread(CPUThreadType type)
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case CPU_THREAD_PPU: new_thread = new PPUThread(); break;
|
||||
case CPU_THREAD_SPU: new_thread = new SPUThread(); break;
|
||||
case CPU_THREAD_RAW_SPU: new_thread = new RawSPUThread(m_raw_spu_num++); break;
|
||||
case CPU_THREAD_ARMv7: new_thread = new ARMv7Thread(); break;
|
||||
case CPU_THREAD_PPU:
|
||||
{
|
||||
new_thread = new PPUThread();
|
||||
break;
|
||||
}
|
||||
case CPU_THREAD_SPU:
|
||||
{
|
||||
new_thread = new SPUThread();
|
||||
break;
|
||||
}
|
||||
case CPU_THREAD_RAW_SPU:
|
||||
{
|
||||
new_thread = new RawSPUThread();
|
||||
break;
|
||||
}
|
||||
case CPU_THREAD_ARMv7:
|
||||
{
|
||||
new_thread = new ARMv7Thread();
|
||||
break;
|
||||
}
|
||||
default: assert(0);
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@ class CPUThreadManager
|
||||
{
|
||||
std::vector<CPUThread*> m_threads;
|
||||
std::mutex m_mtx_thread;
|
||||
u32 m_raw_spu_num;
|
||||
|
||||
public:
|
||||
CPUThreadManager();
|
||||
|
@ -7,12 +7,11 @@
|
||||
|
||||
#include "Emu/Cell/RawSPUThread.h"
|
||||
|
||||
RawSPUThread::RawSPUThread(u32 index, CPUThreadType type)
|
||||
RawSPUThread::RawSPUThread(CPUThreadType type)
|
||||
: SPUThread(type)
|
||||
, MemoryBlock()
|
||||
, m_index(index)
|
||||
{
|
||||
Memory.InitRawSPU(SetRange(RAW_SPU_BASE_ADDR + RAW_SPU_OFFSET * index, RAW_SPU_PROB_OFFSET), m_index);
|
||||
m_index = Memory.InitRawSPU(this);
|
||||
Reset();
|
||||
}
|
||||
|
||||
@ -344,7 +343,7 @@ void RawSPUThread::Task()
|
||||
{
|
||||
PC = SPU.NPC.GetValue();
|
||||
|
||||
CPUThread::Task();
|
||||
SPUThread::Task();
|
||||
|
||||
SPU.NPC.SetValue(PC);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ class RawSPUThread
|
||||
u32 m_index;
|
||||
|
||||
public:
|
||||
RawSPUThread(u32 index, CPUThreadType type = CPU_THREAD_RAW_SPU);
|
||||
RawSPUThread(CPUThreadType type = CPU_THREAD_RAW_SPU);
|
||||
virtual ~RawSPUThread();
|
||||
|
||||
virtual bool Read32(const u64 addr, u32* value) override;
|
||||
|
Loading…
Reference in New Issue
Block a user