With help of fms I managed to hear some kind of clippling and distorted sound in the emulator, so at the moment I think that Sansa E200 has not enough power to emulate MSX with sound (works nice without sound, BTW).
Maybe I am wrong, and after some optimizations it will produce better sound...
Anyway now I see that any emulator that slower than fMSX just won't run on the devices with PortalPlayer chipset.
I hope some day I will find volunteer to help me with optimizations, and at the moment I think I will leave things as is.
I'd better spend time playing games (without sound)
\at the moment I think that Sansa E200 has not enough power to emulate MSX with sound (works nice without sound, BTW). Maybe I am wrong, and after some optimizations it will produce better sound...
I do suspect you are wrong, as I have run fMSX and similarly specced emulators on ARM devices before. 100MHz ARM7 should be sufficient for both the emulation and the sound.
You have said before that the RockBox uses cooperative multitasking. The question is though:
Is the sound callback being called on an interrupt, or is it being called as part of cooperative multitasking scheme?
If it is not called on an interrupt, then the reason for your problems is that you do not yield execution often enough. In this case, it may be better to completely abandon using RockBox's audio API, look at its code, and set up a ring buffer DMA in a similar way.
If callback is called on an interrupt, then something is wrong with your code, as the emulator performance should not affect interrupt performance. In this case, I suggest that you make callback routine fill the buffer with a square wave (i.e. -127/+127/-127/+127... or something similar) and make it sound right, before using more complicated code.
I just finished a port of bluemsxlite to a PXA270 xscale single board computer. the CPU runs at 300MHz and the system bus and memory runs at 100MHz. When I disabled audio, the emulation ran very nice and utilized about 60% CPU. I think the audio can be optimized quite a bit, for example remove filters, do 22kHz, etc. I'm quite sure that the rest of the emulation can be improved too without too much effort. I need to do more profiling to see where I can cut CPU cycles.
But its probably a while before the emulator runs without frameskip on an 100MHz ARM. bluemsx is slower than fMSX mainly because the emulation and interaction between emulated devices is cycle exact, while fMSX does a lot of shortcuts to gain speed (which is fine in most cases). blueMSX is also modular and support runtime configuration while fMSX is more static.
Interesting Would you be interested in getting that port running on S60 as well? I can help you with the S60 specific stuff.