rpcsx/rpcs3/Emu/Cell/RawSPUThread.h

38 lines
684 B
C
Raw Normal View History

#pragma once
2015-08-02 04:15:49 +02:00
#include "SPUThread.h"
2015-07-01 00:25:52 +02:00
class RawSPUThread final : public SPUThread
{
2016-04-14 01:09:41 +02:00
void cpu_task() override;
public:
2016-04-14 01:09:41 +02:00
/* IdManager setups */
using id_base = RawSPUThread;
static constexpr u32 id_min = 0;
static constexpr u32 id_max = 4;
void on_init() override
{
if (!offset)
{
// Install correct SPU index and LS address
const_cast<u32&>(index) = id;
const_cast<u32&>(offset) = vm::falloc(RAW_SPU_BASE_ADDR + RAW_SPU_OFFSET * index, 0x40000);
ASSERT(offset);
SPUThread::on_init();
}
}
RawSPUThread(const std::string& name)
: SPUThread(name)
{
}
2015-07-19 13:36:32 +02:00
bool read_reg(const u32 addr, u32& value);
bool write_reg(const u32 addr, const u32 value);
};