9 ms·
Yes, the best thing that could happen to emulation latency reduction would be the creation of a skeleton OS framework. Something that piggybacks and can use exi
by byuu 10y ago
Yes, the best thing that could happen to emulation latency reduction would be the creation of a skeleton OS framework. Something that piggybacks and can use existing Linux or BSD hardware drivers, but puts the emulator in kernel space and lets it manage the hardware as directly as is practical.
I talk about this briefly in my infeasible section. But I'm mostly referring to myself there: I just don't have the skill and the time to write my own real-time OS for this.
However, I do hope that one day we see a serious project that isn't just "lightweight Linux" (eg Lakka, etc) or something running on top of DOS.
I presume that 98% of emulator users aren't going to be willing to boot into an "emulator OS" just to play games; so it's going to be a lot of work for a little gain.
In that vein, the ultimate latency reduction would be an entire FPGA emulator, like kevtris' FPGA NES (http://kevtris.org/Projects/console/video/page1.html http://kevtris.org/Projects/console/video/page1.html), but now you're approaching extreme effort for a userbase of maybe ten people :/
- pjc50 10y agoI think the C64 Direct-to-TV by Jeri Ellsworth was quite a success in terms of userbase. Of course the problem with making and selling hardware is increased IP scrutiny. I think the Raspberry Pi or Beaglebone would make good candidates for baremetal emulation. The Pi has a formidable but barely documented vector processor, and the Beaglebone has the (also under-supported) PRU realtime subsystems which would be ideal for controllers and audio. Both also have enough ecosystem to make it worth doing. Retropie is already popular, although it's a straight port of the normal userland emulators and doesn't attempt to do anything fancy with the hardware. I think there is a "market" (not the kind that pays money, but a decent userbase) which will happily dedicate a cheap SBC to booting straight into emulators.
- byuu 10y agoWell, debatable on the C64 instance. Indeed, if you can manage to commercially market your design, then you could get a userbase in the thousands. But compare that to the millions of downloads something like Dolphin gets. And the ARM-based mini systems could work for retro emulators in general, sure. Presuming someone actually writes a true bare-metal OS for them instead of just a lightweight Linux instance. But they're not fast enough for people like me that are obsessive about exacting emulation accuracy. I'm still hoping we'll get to a point where ARM-based computers are taken more seriously and we start getting a real market for products like the Jetson TX1 to compete against budget AMD systems. All of this stuff involves sacrifices. The more you chase latency, accuracy, etc ... the more you alienate your potential market. Even when we're not looking for money, more users is such a potent motivator to validate that our efforts aren't being wasted.
- stepvhen 10y agoLast time I used retropie it wouldn't correctly render vibrato effects in the music, so all of FFVI's wonderful score came out flat and awful. That was over a year agohowever, maybe its been updated.
- nibnib 10y agoRetropie is Linux right? That will have the same latency issues discussed. A more realtime OS is needed.
- anonbanker 10y agoretropie is an emulator frontend for linux. he was likely using Snes9x. Also, linux has realtime kernel patches, which help a lot. Distributions like KXStudio ship them by default.
- byuu 10y agoThe Raspberry Pi just isn't powerful enough for cycle-accuracy with the SNES. Maybe if a wizard like blargg attempted it by writing the whole thing in pure ARM assembly, but for mere mortals like myself, as awesome as it'd be, it's just not going to happen :(
- zorked 10y agoI wonder if you can't do a jolly good job by having emulators run under Linux with high RT priority and bypassing X by using the framebuffer? You can still have your other cores doing regular multitasking stuff in the background.
- byuu 10y agoIt would help even more, certainly. With really good setups, we're battling probably around ~100ms of latency when you combine everything I talked about together. If you were to do as you said, we could maybe drop another 10-20ms of that off.
- modified_dog 10y ago> I presume that 98% of emulator users aren't going to be willing to boot into an "emulator OS" just to play games They could run it inside VirtualBox.
- Narishma 10y agoAnd thereby introduce more latency that they are trying to reduce in the first place?
- modified_dog 10y agoIt was a joke … I thought it was obvious.
- striking 10y agoYou're not allowed to use humor on HN! This is a place for serious discussion!
- abecedarius 10y agoMassalin's Synthesis was a research OS designed for low-latency media processing. It's been decades since I read the thesis, so don't trust me to summarize it, but I think it was something like: set up layers in kernel space, but collapse them with runtime code generation (fusing loops), keep switching overhead low instead of buffering a lot, and schedule with a phase-locked loop in software. http://valerieaurora.org/synthesis/SynthesisOS/ch1.html http://valerieaurora.org/synthesis/SynthesisOS/ch1.html
- vardump 10y agoThat's pretty amazing OS, binary fusion, etc. Something like that would be optimal for current generation hardware, modern CPUs would benefit a lot more from that.