[cmds] Speed up 'sl' - let her rip full speed by ghaerr · Pull Request #1707 · ghaerr/elks (original) (raw)

Attempts at "fixing" sl on very slow (8088) systems: discussed in #1619 (comment).

sl used to cursor position off the screen and continue to draw the entire train. All this output would all appear in the last screen column since an ANSI terminal clips cursor moves to the screen. On faster systems, such drawing wouldn't even be noticeable. Now, portions of the train not on the screen aren't drawn.

After each column of the train was drawn, sl would wait 40ms. On very fast systems, this slowed the train down as drawing was extremely quick. On slow systems, this had the effect of slowing the drawing down further. For the time being, this wait is turned off, pending @Vutshi's testing on the Book 8088 and Schneider systems. The proper fix involves timing each column display with millisecond accuracy, and only adding a delay for drawing that takes less than 40ms per cycle.