Jump to content
COMBATSIM Forum
Home Fries

TAW 2.0 Known Issues and Bug Reports

Recommended Posts

That might help.

As far as I can see, the game checks the resolution by using the Windows 'GetSystemMetrics' function with parameters 0 and 1. This (according to Microsoft documentation) should return the width and height 'of the screen of the primary display monitor, in pixels'. If these aren't 800 and 600, that error ensues.

EDIT: On second thoughts, there may be something else going on inside Windows that can cause the subroutine to fail:
 

while ( !sub_4EA7E4(800, 600) )
    sub_4EA3FC(
      "This program requires an 800x600 display resolution but was unable to obtain it.\nPlease use the display settings control panel to make 800x600 available.\n",
      v1);

bool __usercall sub_4EA7E4<eax>(int a1<eax>, int a2<edx>)
{
  int v2; // eax@1
  int v3; // edi@1
  int v4; // esi@1
  int v5; // eax@3
  int v7; // ST20_4@1
  int v8; // ST20_4@3

  v3 = a1;
  v4 = a2;
  v7 = GetSystemMetrics(0);
  v2 = GetSystemMetrics(1);
  return v3 == v7 && v2 == v4
      || (sub_4EA8F0(), Sleep(0x1F4u), v8 = GetSystemMetrics(0), v5 = GetSystemMetrics(1), v3 == v8) && v5 == v4;
}

I'm not sure what that OR is going to achieve...

Share this post


Link to post
Share on other sites

Oh, it seems that the values 'GetSystemMetrics' returns can be affected by the magnification setting for Windows objects. So it might be worth checking that this is set to 100%.

Share this post


Link to post
Share on other sites
14 hours ago, mikew said:

  return v3 == v7 && v2 == v4
      || (sub_4EA8F0(), Sleep(0x1F4u), v8 = GetSystemMetrics(0), v5 = GetSystemMetrics(1), v3 == v8) && v5 == v4;

I'm not sure what that OR is going to achieve...

That has been heavily optimized, but if we resolve it to plain old if-elses, it’s basically this:

resX = GetSystemMetrics(0);
resY = GetSystemMetrics(1);
if(resX != 800 || resY != 600) {
	return false;
}

sub_4EA8F0();

Sleep(500); // wait half a second

resX = GetSystemMetrics(0);
resY = GetSystemMetrics(1);
if(resX != 800 || resY != 600) {
	return false;
}

return true;

It checks if the resolution is 800×600 by default. If not, it calls sub_4EA8F8(), which I don’t know, but I’m sure it’s some DirectDraw or Win32 stuff to force resolution to 800×600. It lets half a second pass to realize that change, then it checks again.

At this point I’m sure sub_4EA8F8() fails for whatever reason. Does the display driver/monitor support 800×600 at all?

Share this post


Link to post
Share on other sites
10 hours ago, Krycztij said:

Does the display driver/monitor support 800×600 at all?

From Fox2's picture, it looks like it does...which is the strange thing here.

Thanks for picking apart that code!

Share this post


Link to post
Share on other sites

Really hoping to get some help.

 

I have this working Ok at 1024x768, until I break through the clouds, and then the game crashes with an f22.dat error.

 

Could you please tell me what information I can gather for you that would help us triage this?

Share this post


Link to post
Share on other sites

If it crashed, there should be a file called 'f22.$$$' on your C:\ drive.

This can be opened in Notepad, so please post its contents here.

 

Also, are you using a Glide wrapper? If not, it would be worth trying one.

Share this post


Link to post
Share on other sites

Hello,

I managed to get TAW 2.30 running on my Windows 10 machine, but now there's no menu or in-game audio of any kind; tried reinstalling, didn't seem to help.

Share this post


Link to post
Share on other sites

I don't like to see any question go unanswered, but I don't really have anything else to add to my answer back in January.

 

For me, TAW 2.30 works quite well on Windows 10 with default settings (or it did last time I tried it a year or so ago).

You say it's 'running', so the pilot selection menu must have worked?

Share this post


Link to post
Share on other sites

I don't think there's much we can do from the game side of things. All I can suggest is changing the compatibility settings for _f22.exe and f22.dat and see what happens.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×