indigodarkwolf / box16

A fork of the official X16 emulator, converted to C++20 and with a bunch of features tweaked and added.
MIT License
41 stars 19 forks source link

Bug: Box16 doesn't actually run at "realtime" speed. #47

Closed indigodarkwolf closed 1 year ago

indigodarkwolf commented 2 years ago

It runs at ~98% realtime, even by its own arithmetic. This seems to be because the timing code doesn't consider the possibility that a frame plus a usleep call might result in the frame ever so slightly longer than 16,666μs, and doesn't allow subsequent frames to shave off the difference to make up for it.

indigodarkwolf commented 1 year ago

Ha, in fact I don't know how fast Box16 runs relative to "realtime" because there's the added complexity that the x16 runs at a display frequency of 59.524fps, which is not 60fps, so this may not be an issue at all. Closing for now.