diff options
author | Arisotura <thetotalworm@gmail.com> | 2022-10-14 00:02:54 +0200 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2022-10-14 00:02:54 +0200 |
commit | cdd05c10b414e8aa7f17391a1f8f7adc73c373e2 (patch) | |
tree | 29a4f3c93c124d96cdd9bfed84e4d6ff83b5c03a /src/teakra/src/teakra.cpp | |
parent | a8fba8cc3465e736da6a19cd67a9fd99488ba721 (diff) |
more DSP unfucking: make Teakra directly use melonDS's NWRAM banks instead of trying to translate to a flat buffer, fixes bugs with the way the memory banks are ordered etc
Diffstat (limited to 'src/teakra/src/teakra.cpp')
-rw-r--r-- | src/teakra/src/teakra.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/teakra/src/teakra.cpp b/src/teakra/src/teakra.cpp index 9559920..fec900d 100644 --- a/src/teakra/src/teakra.cpp +++ b/src/teakra/src/teakra.cpp @@ -50,7 +50,6 @@ struct Teakra::Impl { } void Reset() { - //shared_memory.raw.fill(0); // BAD!!!! miu.Reset(); apbp_from_cpu.Reset(); apbp_from_dsp.Reset(); @@ -71,14 +70,6 @@ void Teakra::Reset() { impl->Reset(); } -std::array<std::uint8_t, 0x80000>& Teakra::GetDspMemory() { - return impl->shared_memory.raw; -} - -const std::array<std::uint8_t, 0x80000>& Teakra::GetDspMemory() const { - return impl->shared_memory.raw; -} - void Teakra::Run(unsigned cycle) { impl->processor.Run(cycle); } @@ -117,6 +108,9 @@ void Teakra::ClearSemaphore(std::uint16_t value) { void Teakra::MaskSemaphore(std::uint16_t value) { impl->apbp_from_dsp.MaskSemaphore(value); } +void Teakra::SetSharedMemoryCallback(const SharedMemoryCallback& callback) { + impl->shared_memory.SetExternalMemoryCallback(callback.read16, callback.write16); +} void Teakra::SetAHBMCallback(const AHBMCallback& callback) { impl->ahbm.SetExternalMemoryCallback(callback.read8, callback.write8, callback.read16, callback.write16, |