You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! At the moment, Teakra itself creates and owns DSP RAM, with the user being able to get a pointer to it via the interface. I'd like to inquire about your thoughts on (optionally?) allowing for the user to own DSP RAM themselves, and pass it to Teakra instead.
There's a handful of reasons why I believe this would be helpful for DSi/3DS emulators.
The current design does not allow for fastmem to be used with DSP RAM. Fastmem is a technique that creates a mirror of the emulated system's vaddr space inside a sectiom of the host's vaddr space. Then, an access to a guest vaddr can be performed by just accessing fastmem_base + vaddr. This significantly speeds up memory accesses, as they no longer have to go through any address decoding or pagetables, everything is handled by the host MMU.
In order to achieve this, we typically create a memory arena using VirtualAlloc/mmap, from which we allocate the emulated system's memory (eg FCRAM and DSP RAM on 3DS). As Teakra wants to own and manage its own memory, we can't do this, thus DSP RAM can't be used with fastmem, and needs slow memory access fallbacks instead.
Letting the user manage DSP RAM themselves would allow for things like using shared memory for it. This lets the emulator easily share DSP RAM between processes which opens up some nice possibilities, like hooking it up to external debugging tools.
Albeit a niche use case, there could be situations where one wants DSP RAM to persist even after the Teakra object is destroyed.
Thank you for your time.
The text was updated successfully, but these errors were encountered:
Sounds like a good idea to me! I don't see any problem with this. I haven't touched this code base for quite long, though, and I don't have much time working on it at the moment... Feel free to fork and/or send PR with the change.
wheremyfoodat
changed the title
Discussion: Having the Teakra user own DSP RAM instead of Teakra iteelf
Discussion: Having the Teakra user own DSP RAM instead of Teakra itself
Dec 1, 2024
Hi! At the moment, Teakra itself creates and owns DSP RAM, with the user being able to get a pointer to it via the interface. I'd like to inquire about your thoughts on (optionally?) allowing for the user to own DSP RAM themselves, and pass it to Teakra instead.
There's a handful of reasons why I believe this would be helpful for DSi/3DS emulators.
fastmem_base + vaddr
. This significantly speeds up memory accesses, as they no longer have to go through any address decoding or pagetables, everything is handled by the host MMU.Thank you for your time.
The text was updated successfully, but these errors were encountered: