|
|
|
|
|
by 0xe2-0x9a-0x9b
5606 days ago
|
|
"I've wondered whether a language more focussed on concurrency could make a multi-threaded emulator possible, but it looks like GoSpeccy isn't a particularly useful example of it." I think you are wrong. OK, it is true that the "emulation core" in GoSpeccy is not using any parallelism (the emulation core is fast enough, so what would be the reason for a parallel implementation there?), but it has a more concurrent design than (all?) other Spectrum emulators. The part where you are wrong is that all video and audio postprocessing in GoSpeccy is designed to run in parallel to the hardware emulation (Z80 CPU, ULA chip). As I explained in [https://github.com/remogatto/gospeccy/wiki/Architecture], there are not many things which actually run in parallel, because the emulator is fast enough (50 frames per second). But you can try the following: load some Spectrum game or demo that is painting to the screen a lot. Set scale to 2. Then increase FPS from 50 to 150 (or more, if you have a faster computer) and observe that the GoSpeccy Linux process will be automatically using more than 1 x86 CPU core. And it will manage to play sound without any hiccups. (But, of course, if you increase the FPS even more, you will reach a point where sound buffer underruns start to happen.) |
|