Jump to content

X-com CE on Vista


BladeFireLight

Recommended Posts

Actually it doesn't work for my system at all - Though it's supposedly a generic key. Not sure why my XP box doesn't like it but I can only imagine it's got something to do with the term "Avalon" (which refers to Vista).

 

Ideally I'd find an app that watches over the registry and reports any changes as they happen. Dunno if such an app would be cross-OS though so it's probably not worth my testing one out.

Link to comment
Share on other sites

  • Replies 60
  • Created
  • Last Reply

Top Posters In This Topic

I think that is a good solution, but if it doesn't work, there could be a few other ways. One is to find f0dder. I have no idea who he is, but I have taken a look at his patch (I have the source as well) and he says he basically did some reverse engineering and injecting his code into the game to make it work properly. I am hoping that he might be able to fix this as well. On the other hand, it seems that DirectX 10 may be the problem as I suspected. I did a little research and noticed that the game uses some DirectX .dlls as well as kernel32.dll and a few others. Now all of these appear for both Vista and XP. The only problem is, their file sizes are different which implies that their contents have changed. Now if I'm not mistaken the game only calls the features of DirectX and whatever else it needs via some function and probably gives it some input data (variables and what not). DirectX takes care of the rest. Ideally, if we knew what has changed in these functions between DX9 and 10 we might be able to hack into it and fix it much like f0dder did. The problem is, I don't know how to get to DirectX's feature/function/whatever list. Of course, if we could find f0dder, then maybe he would be willing to help?

In any case, I'll ask one dev I know next Thursday, he'll be able to offer some insight.

 

If you're wondering why some games do work even if they're not DX 10, it's because they're DX 9. DX 10 can switch to Direct 3D 9, but it seems it can't switch to earlier versions, whereas DX 9 could. For example, it seems that Civ 3 doesn't work either (should be a pre DX 9 game as I recall).

Link to comment
Share on other sites

Update: OK, I tried what you suggested BB, but it didn't work.

 

A few questions: Is the Avalon Grpahics thing a matter of my graphics adapter or is it there for every computer? Also, which executable were you referring to: f0dder's loader or the normal TFTD one?

What happens if the "Windows Registry Editor Version 5.00" is not what I have? Do I get an error or will it still execute?

 

@Blade: How did you disable HW acceleration? I don't see options to disable anything in dxdiag. Also, did you use f0dder's loader or the other .exe when you disabled HW acceleration?

Link to comment
Share on other sites

That'll teach me not to read the "solution" notes before opening my big mouth - It's the driver that needs to be changed, not the acceleration setting. Can't really automate that. :)

 

Well, it might be possible... Hardware profiles, maybe. :oh: Probably much more effort then it's worth to setup though.

 

(That said, I'm assuming people have tried toggling HWA with no luck - Can't seem to see anything specific about that).

 

f0dder's sites don't seem to load anymore. I'm pretty sure they used to. Contained training exercises for similar things, probably should have gone through them... :P

 

Anyone remember 3D Analyzer? Essentially it told games your graphics card had features that were not in fact present (to prevent them throwing up hardware incompatibility errors on older hardware) then "emulated" these features by catching attempts to use them and making sure they got ignored.

 

Then there was VDMSound which caught calls to (non-present) older sound cards and passed them on to whatever your system actually had.

 

It wouldn't surprise me if someone throws together something similar for Vista (something that catches older DX calls and "upgrades" them to their DX9+ versions). Bound to be someone working on such a thing.

 

Edit: Gimli, (under XP at least) you can tweak HWA by right clicking your desktop and hitting Properties off the context menu. Jump to the Settings tab and press Advanced, the new Troubleshoot tab holds the slider you want. Forget about the intermediate settings and drag the bar all the way down to the bottom to disable it.

 

Try double clicking the reg keys on their own to see if they have any effect on the bar. You'll probably have to have the properties page closed between checks.

Link to comment
Share on other sites

It says that my graphics card drivers do not allow changing hardware acceleration settings.

Edit:

 

I forgot to mention this, but when I used f0dder's loader as the target in the new batch file I got this message:

 

"Patch code timed out"

 

If it helps, here's the section of f0dder's code that has that error. That last line of code creates a message box with that text inside.

 

// the patch codes writes to the executable, so we must unprotect it
Sleep(0);					// give up remaining timeslice to make the next code less likely to fail.
ResumeThread(pi.hThread);
if (WaitForSingleObject(hEvent, 2500) != WAIT_OBJECT_0) {
	szErrorMsg = "Patch code timed out";
	goto error;
}

Link to comment
Share on other sites

"patch code timed out" is some sort of CPU/resource loading issue (it affects me on W2K also, but not immediately). It's taking more than 2.5 seconds to do the function call rewrites.

 

As for current DirectX: I find the Microsoft developer's network to be overkill for anything related to the Windows API family. It documents all changes back to WinNT/Win95.

Link to comment
Share on other sites

A friend explained that DirectX doesn't directly tell hardware what to do, it passes it on to Vista, then Vista forwards stuff to hardware. So I guess it's Vista's fault after all. Guess we'll have to wait for MS to fix things, or maybe mail someone (don't know who, though).
Link to comment
Share on other sites

  • 2 weeks later...

OK, so I tampered with the XP's registry and managed to fix the garbled graphics problem without resorting to f0dder's patch. I followed BB's registry method and found that DirectDraw can be emulated by changing a value in the registry. The reason BB's suggestion didn't work is because there is no HWADisable in the registry in the first place. We created them when we ran BB's suggested batch file.

Still, I tampered some more with Vista and uninstalled the Catalyst drivers as has been suggested. This caused no picture in Vista (expected) so I had to reboot and entered Safe mode. In safe mode, the game runs perfectly. This leads me to believe that DirectX isn't loaded at all in safe mode. If we could somehow force the registry to disable DirectX before running the game and enable it afterwards, the problem would be solved. Anybody want to give it a go? I'm quite out of time. :oh:

Link to comment
Share on other sites

On XP, if you decrease hardware acceleration low enough (like the 3rd lowest level) that basically disables DirectDraw and Direct3D. With this method you wouldn't have to boot to safe mode or uninstall any drivers. Not sure if this is possible in Vista though. :oh:

 

- Zombie

Link to comment
Share on other sites

Nope, unfortunately it isn't possible. :oh:

 

EDIT: Shamelessly stealing SC space. For those of you for whom the f0dder's loader doesn't help with garbled graphics, here's a different solution.

Just unpack the files into your TFTD main folder and run "TFTDfix".

TFTD_DDraw_fix.zip

 

This doesn't help the game not running in Vista problem.

 

EDIT2: Very important! Do not try to run an application that uses DirectX while TFTD is running, because Direct3D and DirectDraw are disabled, so you could have problems.

Link to comment
Share on other sites

Actually, did you know that most video players call on DX? Ever tried to PrintScreen one?

 

One "fix" to that issue is to run two of the things at once. Apparently they can't share.

 

I tried this with UFO but unfortunately it didn't make much difference.

 

It's beginning to sound like Hardware Profiles are the easiest solution. Catch is I can't remember how to use the things and a quick trip to XP's Device Manager is doing nothing to refresh my memory... :oh:

Link to comment
Share on other sites

  • 1 month later...
If somebody has the time, there is a certain Application Compatibility Toolkit 5 from Microsoft. Unfortunately I can't run it right now due to some technical problems, but if you can and have the patience to figure out how it works, it may be possible to fix the game for Vista.
Link to comment
Share on other sites

  • 2 months later...
If somebody has the time, there is a certain Application Compatibility Toolkit 5 from Microsoft. Unfortunately I can't run it right now due to some technical problems, but if you can and have the patience to figure out how it works, it may be possible to fix the game for Vista.

 

This works!!

I set No emulation on the advanced options I set ForceDirectDrawEmulation This fixed EU but TFTD has scrambled graphics.

 

<edit>

 

Found the solution for that. Forced 256 Color. seems to be fine now.

 

Although it runs way to fast for my likening on a moder machine but at least I can test xcomtuil with the CE version now.

 

-BladeFireLight

Link to comment
Share on other sites

I think I can do better it's actually possible to create packages that you can install on other computers. I'm just trying to automate that process. plus i have to account for all the variation on executable names.

The other thing I'm trying to figure out is how to disable virtualization on the game_x and missdat folders with out requireing elevated privlages in an automated fashion so xcomutil will still work.

Link to comment
Share on other sites

This is the fix with a basic installer.

It only works if the file naming matches that of the X-Com Collectors Edition that I have (Terror From The Deep.exe and UFO Defense.exe)

It also requires Admin rights to install but will not work if you right click and say run as admin. you have to let UAC do it's job (assuming you have not turned it off)

 

Xcomutil is not the least bit compatible with this patch nor does it play well with vista's file virtualization. So I'm working on that next.

 

-Blade FireLight

 

** removed patch as some virus scanners are reporting a Trojan. Will re post when I have a clean file.

Link to comment
Share on other sites

I am not sure what UAC is, but anyway, it works fine, although the path didn't match, even though I put the database in the folder where the file was (the file name matched). Doesn't matter though, as long as it works. I'll pass this piece of news along. Thanks for the fix!
Link to comment
Share on other sites

OK, so I didn't run the Install-Fix file, because I thought it was something the .sdb was calling. Works like a charm now.

 

EDIT: I'll upload this to our files section with a readme included.

Link to comment
Share on other sites

OK, so I didn't run the Install-Fix file, because I thought it was something the .sdb was calling. Works like a charm now.

 

EDIT: I'll upload this to our files section with a readme included.

 

Ah... :) your don't need the ACT to install this the only file the installer calls is part of Vista. Could you please correct this in your read me. No reason to load that extra bloat into everyones comp.

 

-Blade FireLight

Link to comment
Share on other sites

Ah, should have checked, I'll fix it.

EDIT: Fixed.

EDIT 2: I noticed ACT has a list of compatibility settings for some games. Perhaps it would be worth sending it to whoever made it. Also, they have compatibility settings for Enforcer, but not for any of the first three games. :)

EDIT 3: OK, I informed the 2K Games representative of this and he asked if we could make an installer for this. This should not be difficult, but I'll point out a few things:

 

Now making this installer should not be difficult. I think all we need is .bat file that would call the game installer, then call the Vista patch. But I am not sure if the command calling the Vista patch would wait for the game installer to finish. I'll try and do some testing.

The second thing that bothers me is what would happen if this were to be run on XP? The installer should work on both.

EDIT 4: I tested both and it works OK, so this makes things easier.

 

Could there be an uninstaller for the game and the patch, too?

 

You know, maybe a complete installer should be written. The good thing is that the only thing the game installer does is copying the files into the correct directories. So I think all we would need to do is some package containing all the necessary files and an installer to extract everything properly. The only other thing we would need is to remember the path to the directory where the game was installed and put that into the Windows registry. Then we could have an uninstaller as well I think.

 

Actually, I'm not sure I'd be up for making an (un)installer right now. I am kind of busy and to tell you the truth I don't know how to make one at the moment. It shouldn't be too difficult, I'd just need to look up a tutorial or two. I've been meaning to learn how to make one anyway. Do you know how to write a proper installer (one that would use Windows forms)?

Link to comment
Share on other sites

Ah, should have checked, I'll fix it.

EDIT: Fixed.

EDIT 2: I noticed ACT has a list of compatibility settings for some games. Perhaps it would be worth sending it to whoever made it. Also, they have compatibility settings for Enforcer, but not for any of the first three games. :)

EDIT 3: OK, I informed the 2K Games representative of this and he asked if we could make an installer for this. This should not be difficult, but I'll point out a few things:

 

Now making this installer should not be difficult. I think all we need is .bat file that would call the game installer, then call the Vista patch. But I am not sure if the command calling the Vista patch would wait for the game installer to finish. I'll try and do some testing.

The second thing that bothers me is what would happen if this were to be run on XP? The installer should work on both.

EDIT 4: I tested both and it works OK, so this makes things easier.

 

Could there be an uninstaller for the game and the patch, too?

 

You know, maybe a complete installer should be written. The good thing is that the only thing the game installer does is copying the files into the correct directories. So I think all we would need to do is some package containing all the necessary files and an installer to extract everything properly. The only other thing we would need is to remember the path to the directory where the game was installed and put that into the Windows registry. Then we could have an uninstaller as well I think.

 

Actually, I'm not sure I'd be up for making an (un)installer right now. I am kind of busy and to tell you the truth I don't know how to make one at the moment. It shouldn't be too difficult, I'd just need to look up a tutorial or two. I've been meaning to learn how to make one anyway. Do you know how to write a proper installer (one that would use Windows forms)?

 

My original zip includes the commands needing to be called. the location of the game is un-nessistary. Vista looks at the content of every executable at launch time and compares them to the settings in the registry created by the ACT database to determine if any adjustments need to be made.

 

The ACT database can only be installed by the an administrator account. however when the execution switches to Administrator it triggers a second command prompt using the built in administrator accounts credentials, and placing the Current working directory to %systemroot%. This leads to the need to pass the full path of theACT database.

 

So, in summary. and installer just needs to extract the ACT database in a temp folder. trigger sdbinst.exe <path to ACT database>. at that point causein a prompt for elevation of privileges. and installing. and uninstaller luckily does not require that.

 

That batch files I provided are enough for any user. but I suspect they want a full installation package. probably so they can provide it as a "patch".

 

I wonder if I will get any credit for finding the solution? Probably not because there is no proprietary code.

 

-Blade FireLight.

Link to comment
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

×
  • Create New...