3 ms·
Even today, windowed applications are stuttery. They drop frames in what should be smooth animations. The Amiga was technically better, in a way that can't eas
by abainbridge 8y ago
Even today, windowed applications are stuttery. They drop frames in what should be smooth animations.
The Amiga was technically better, in a way that can't easily be emulated. The Amiga video hardware could generate an interrupt at the end of the video frame output. As a result, an application could do all its work for the current frame, then call a "wait for vsync" function. That made it yield to the OS scheduler. When the interrupt fired, the scheduler would handle it and reschedule the app VERY QUICKLY. It was almost like a real-time OS. It knew that video generating was time critical.
I don't think you can't do that on Windows or Linux. The video hardware _might_ support interrupt generation but it isn't wired into the OS in the same way. You might get close to being able to use the "wait for vsync" in full screen DirectX apps, but even then it's a nightmare of video driver lies and OS scheduler complexity instead of a nice clean, simple, reliable feature all applications can use.
I'd be interested to know if Wayland solves this problem.
- growlist 8y agoI knew there was some interesting technical reason behind it! One of my bugbears is delayed response - I seem to see this more and more in mainstream software, and I think platforms like .NET etc don't help. I can't help feeling like I'm interacting with a façade. Things just feel so tighter when you click and the interface responds, consistently. I used to dabble with electronic music and I always found that dedicated hardware was much more satisfying as there weren't god knows how many layers of abstraction and management between you and the metal - just directly wired to a chip. Latency goes from annoyance to serious problem with audio.
- jacobush 8y agoAnd people who have not experienced (practically) zero latency computers, don't know what they are missing. Heck, back in the day, even though I loved my Amiga, I preferred the editor of Turbo C to more sluggish, font rendering editors on the Amiga. DOS in text mode was unconditionally fast. Maybe VR will drive the technology back to low latency. Latency in VR equals users throwing up.
- jacobush 8y agoI wonder if Linux could be hacked/tweaked to do something like that. If you replaced init with your own program and had exactly 1 process going on your machine, there'd be no scheduling.
- abainbridge 8y agoAfter I wrote this comment, I decided to have another look to see if this was fixed on Windows yet. It turns out it is. You can call DwmFlush() which deschedules your app until the Desktop Window Manager decides it is time to draw a new frame. I might now try to recreate the classic Amiga Bezier lines screen saver.
- abainbridge 8y agoFurther update: On one machine I found that while DwmFlush() reliably keeps sync to the video rate (ie every time it returns is 1/60th of a second after the previous time), this wasn't sufficient to keep the video output stutter free. I tried many things to get rid of the stutters and gave up after an hour. My guess is the the compositor gives no guarantee that it will display every "frame" your app gives it, even if you give it exactly one per vsync. The next day my machine had rebooted itself (presumably to apply an update) and now the stutter is gone. That's the kind of thing that didn't happen on an Amiga :-)