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();
|
||||
|
||||
m_accelerator = std::make_unique<HLEAccelerator>();
|
||||
m_accelerator = std::make_unique<HLEAccelerator>(m_dsphle->GetSystem().GetDSP());
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
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;
|
||||
|
||||
protected:
|
||||
|
@ -182,14 +189,12 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
u8 ReadMemory(u32 address) override
|
||||
{
|
||||
return Core::System::GetInstance().GetDSP().ReadARAM(address);
|
||||
}
|
||||
void WriteMemory(u32 address, u8 value) override
|
||||
{
|
||||
Core::System::GetInstance().GetDSP().WriteARAM(value, address);
|
||||
}
|
||||
u8 ReadMemory(u32 address) override { return m_dsp.ReadARAM(address); }
|
||||
|
||||
void WriteMemory(u32 address, u8 value) override { m_dsp.WriteARAM(value, address); }
|
||||
|
||||
private:
|
||||
DSP::DSPManager& m_dsp;
|
||||
};
|
||||
|
||||
// Sets up the simulated accelerator.
|
||||
|
|
|
@ -34,7 +34,7 @@ void AXWiiUCode::Initialize()
|
|||
{
|
||||
InitializeShared();
|
||||
|
||||
m_accelerator = std::make_unique<HLEAccelerator>();
|
||||
m_accelerator = std::make_unique<HLEAccelerator>(m_dsphle->GetSystem().GetDSP());
|
||||
}
|
||||
|
||||
void AXWiiUCode::HandleCommandList()
|
||||
|
|
Loading…
Reference in New Issue