Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance in DOS is terrible #7332

Closed
nielsmh opened this issue Mar 5, 2019 · 3 comments
Closed

Performance in DOS is terrible #7332

nielsmh opened this issue Mar 5, 2019 · 3 comments
Labels
good first issue Good for newcomers regression It used to work, and now it's broken.

Comments

@nielsmh
Copy link
Contributor

nielsmh commented Mar 5, 2019

Version of OpenTTD

#7331 test build
DJGPP (DOS) build running in Windows 95 DOS box on a Via EPIA-VE5000 board with 128 MB RAM installed. (No VM or emulation.)

openttd.cfg:

blitter = 8bpp-optimized
support8bpp = hardware
resolution = 640,480

Expected result

Playable framerates.

Actual result

image
Framerate is very low and game is not really playable, despite no individual performance measurement being bad. Something slow is happening between GameLoop and the video output.

Steps to reproduce

  1. Obtain some old hardware
  2. Install a long out of support operating system
  3. Figure out a way to transfer files from the internet to the system
  4. Run the game
@TrueBrain TrueBrain added good first issue Good for newcomers regression It used to work, and now it's broken. labels Mar 5, 2019
@nielsmh
Copy link
Contributor Author

nielsmh commented Mar 5, 2019

A possible suspect for the cause might be the timing routine, except then fast-forward mode should still work (which it doesn't):

#if defined(UNIX) || defined(__OS2__) || defined(DOS)
# include <sys/time.h> /* gettimeofday */
static uint32 GetTime()
{
struct timeval tim;
gettimeofday(&tim, NULL);
return tim.tv_usec / 1000 + tim.tv_sec * 1000;
}
#else
static uint32 GetTime()
{
return GetTickCount();
}
#endif

@Gymnasiast
Copy link

Don't take this the wrong way (I don't want to tell you how to develop OpenTTD), but why does OpenTTD still support operating systems this old? Isn't it a noticeable burden on development? (At OpenRCT2, we even dropped XP because of compiler support and missing APIs, which might be the other extreme.)

@TrueBrain
Copy link
Member

@Gymnasiast: in simple terms, because we can :D But .. we are planning on dropping it for other reasons ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers regression It used to work, and now it's broken.
Projects
None yet
Development

No branches or pull requests

3 participants