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

Comments

@nielsmh
Copy link
Contributor

@nielsmh 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
@nielsmh
Copy link
Contributor Author

@nielsmh 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

@Gymnasiast Gymnasiast commented Mar 7, 2019

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

@TrueBrain TrueBrain commented Mar 19, 2019

@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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.