只卖2美刀的国人开发的安卓nds模拟器Dsoid更新了。有微弱的性能提升。
这位可能姓何的coder大神在说明里贴出了目前的进度。他正在重构许多代码,其中包括exophase的dynarec,好让它适合在多线程下运行,如果成功的话,Dsoid在多核的硬件上可能会获得极大的提速。
What I’ve been working on
Right now, the emulator emulates both CPUs on a single thread. First it emulates the ARM9 CPU for a while, then emulates the ARM9(把这里可能是笔误,因为NDS是ARM9+ARM7) CPU for a while. The problem is that switching between emulating the two is extremely slow, since I basically have to flush all the registers into memory and then reload them. I’ve been trying to emulate the CPUs on separate threads, but right now, there’s two problems. Syncing the threads is way too slow. On the interpreter, which I’m using since it’s much easier to debug, multithreading basically gives no performance improvement. I’m pretty sure this is caused by a bug in my code, since there’s literally no possible way to write this faster. I’m using a spinlock, and using a bigger time slice causes certain images on the screen to flash, since the graphics hardware isn’t being update enough. The other problem is that exophase’s dynarec isn’t exactly built for multiple threads. Each thread needs its own separate copy of each data structure, but the dynarec has global variables everywhere. I’m thinking of literally copy-pasting the code. So basically, if you didn’t understand any of that, I’ve been rewriting a lot of code, and at least, in theory, it should give a big speed boost.
根据上面这段说明,Dsoid还是如此缓慢的原因实际上和nds4droid一样,它必须在一个模拟线程中在ARM9和ARM7中之间切换,而且每次都要刷新并重载所有对应的寄存器,这个过程极端缓慢。当然,所有人都明白啊,你可以用多个线程来分别模拟ARM9和ARM7啊,问题是这两个线程之间的同步也很缓慢。所以呢,我们的小何同学现在正在一步一步debug呢,这钱不好赚啊….
作为最早在安卓nds模拟器上获得突破的Dsoid,我还是比较看好他的。测试版在老地方 😉