mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-11 09:38:41 +12:00
Update teakra
This commit is contained in:
parent
518b279139
commit
9ef7db63ef
6 changed files with 84 additions and 29 deletions
|
@ -66,6 +66,21 @@ namespace Audio {
|
|||
|
||||
virtual Type getType() = 0;
|
||||
virtual void* getRegisters() { return nullptr; }
|
||||
|
||||
// Read a word from program memory. By default, just perform a regular DSP RAM read for the HLE cores
|
||||
// The LLE cores translate the address, accounting for the way Teak memory is mapped
|
||||
virtual u16 readProgramWord(u32 address) {
|
||||
u8* dspRam = getDspMemory();
|
||||
|
||||
auto readByte = [&](u32 addr) {
|
||||
if (addr >= 256_KB) return u8(0);
|
||||
return dspRam[addr];
|
||||
};
|
||||
|
||||
u16 lsb = u16(readByte(address));
|
||||
u16 msb = u16(readByte(address + 1));
|
||||
return u16(lsb | (msb << 8));
|
||||
}
|
||||
};
|
||||
|
||||
std::unique_ptr<DSPCore> makeDSPCore(EmulatorConfig& config, Memory& mem, Scheduler& scheduler, DSPService& dspService);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue