Core/DSPHLE: Store reference to DSPManager in HLEAccelerator (AX/AXWii).
This commit is contained in:
parent
3a9160100d
commit
1f0fe5a99a
|
@ -38,7 +38,7 @@ void AXUCode::Initialize()
|
||||||
{
|
{
|
||||||
InitializeShared();
|
InitializeShared();
|
||||||
|
|
||||||
m_accelerator = std::make_unique<HLEAccelerator>();
|
m_accelerator = std::make_unique<HLEAccelerator>(m_dsphle->GetSystem().GetDSP());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AXUCode::InitializeShared()
|
void AXUCode::InitializeShared()
|
||||||
|
|
|
@ -150,6 +150,13 @@ void WritePB(Memory::MemoryManager& memory, u32 addr, const PB_TYPE& pb, u32 crc
|
||||||
class HLEAccelerator final : public Accelerator
|
class HLEAccelerator final : public Accelerator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
explicit HLEAccelerator(DSP::DSPManager& dsp) : m_dsp(dsp) {}
|
||||||
|
HLEAccelerator(const HLEAccelerator&) = delete;
|
||||||
|
HLEAccelerator(HLEAccelerator&&) = delete;
|
||||||
|
HLEAccelerator& operator=(const HLEAccelerator&) = delete;
|
||||||
|
HLEAccelerator& operator=(HLEAccelerator&&) = delete;
|
||||||
|
~HLEAccelerator() = default;
|
||||||
|
|
||||||
PB_TYPE* acc_pb = nullptr;
|
PB_TYPE* acc_pb = nullptr;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -182,14 +189,12 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 ReadMemory(u32 address) override
|
u8 ReadMemory(u32 address) override { return m_dsp.ReadARAM(address); }
|
||||||
{
|
|
||||||
return Core::System::GetInstance().GetDSP().ReadARAM(address);
|
void WriteMemory(u32 address, u8 value) override { m_dsp.WriteARAM(value, address); }
|
||||||
}
|
|
||||||
void WriteMemory(u32 address, u8 value) override
|
private:
|
||||||
{
|
DSP::DSPManager& m_dsp;
|
||||||
Core::System::GetInstance().GetDSP().WriteARAM(value, address);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Sets up the simulated accelerator.
|
// Sets up the simulated accelerator.
|
||||||
|
|
|
@ -34,7 +34,7 @@ void AXWiiUCode::Initialize()
|
||||||
{
|
{
|
||||||
InitializeShared();
|
InitializeShared();
|
||||||
|
|
||||||
m_accelerator = std::make_unique<HLEAccelerator>();
|
m_accelerator = std::make_unique<HLEAccelerator>(m_dsphle->GetSystem().GetDSP());
|
||||||
}
|
}
|
||||||
|
|
||||||
void AXWiiUCode::HandleCommandList()
|
void AXWiiUCode::HandleCommandList()
|
||||||
|
|
Loading…
Reference in New Issue