Community for Sid Meier's Gettysburg! Players |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Inside XP: Sid Meier's Antietam! on XP Service Pack 2/Direct X 9.0c by Don V Wells, Jr. June 16th, 2005 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
HomepagesSociety HomeForum Patching guide Sid Meier's Gettysburg Downloads Sid Meier's Antietam Downloads |
Rationale: The game Sid Meier's Antietam! was originally a Win98 game by Firaxis Games which requires some modifications to its default installation to properly function outside of its original native Windows 98 environment. This document addresses the steps necessary to make this Win98-era game fully functional on the now current Windows workstation standard, Windows XP (Pro), Service Pack 2, which incorporates DirectX 9.0c as standard. The base-line requirements for Sid Meier' Antietam!: Problems under WinXP(SP2): The primary problem with attempting to play Sid Meier's Antietam on Windows XP(SP2) is that the game sound, a vital part of feed-back for the game, does not function in any way. The other unrelated but co-incident occurrence is that the opening AVI logo files from Firaxis Games and/or BreakAway Games suffer a display corruption or visual 'tearing' effect. These errors occurred with the introduction of Windows XP, Service Pack 2. The fixes necessary are entirely accomplished by file deletion and replacement. Read on... The problems in executing "Sid Meier's Antietam!" on today's hardware and operating systems can be delineated in four areas: Hard-coded Win9x programming practices; the improper inclusion of Windows 9x-era system level Dynamic Link Libraries (DLL) files in the application installation sub-directory; the 'inadvertent' changes by Microsoft in CODEC support for the now deprecated 'Microsoft Video for Windows' API; the ever increasing speed of current/future x86 processors and its effect on critical timing sensitive game routines. 1.) Resolution: Hard-coded Win9x programming practices Firaxis did not bother to correct the minor Win9x hard-coding present in Antietam! as it had to do with the release of the Gettysburg! Windows 2000/XP Update. The reason is that the Windows XP(SP2) Application Compatibility Database, which is dynamically updated if a WinXP workstation is connected to the Internet, will already have the fix necessary for Antietam! included. This fix (or shim) is known as the "Win98VersionLie" for ANTIETAM.EXE, which causes the executable to believe that it is operating under the Windows 98 operating system. If you wish to examine the Application Compatibility Database, or add modifications for other applications not included, please see the Windows Application Compatibility page at Microsoft. The necessary patches for 'Sid Meier's Antietam!' are as follows: Download the Antietam! Final Patch w/SM Scenarios from the Firaxis Download page: Each of the above patch files contain the files necessary to update the Antietam! executable ANTIETAM.EXE, SOUND.DLL and some other supporting files. Here is what each patch contains: The Antietam! v2.0 Beta Patch: (Antietam_Beta_Patch.EXE) The Antietam! v3.0 Final Patch w/SM Scenarios: (South_Mountain.exe) So we have the following possible ANTIETAM.EXE and SOUND.DLL files from the original v1.0 Antietam! CD-ROM, the v2.0 Beta patch and finally the v3.0 Final Patch: We need to end up with the Number 3 item version 3.0 listed above of the ANTIETAM.EXE file, since the SOUND.DLL files are identical for the original version 1.0 release and the final version 3.0 release. The two files necessary to properly execute the Antietam! game engine, ANTIETAM.EXE and the SOUND.DLL files comprise the Antietam! game engine. The version 3.0 updated versions of ANTIETAM.EXE is the one that all owners of Antietam! should be using, regardless of operating system version. The exception to this recommendation is that the version 2.0 Patch (Beta) version of ANTIETAM.EXE is necessary for those who wish to play user created battlepacks on the "Sid Meier's Antietam!" game engine. The version 3.0 Patch (Final) of ANTIETAM.EXE will not allow for the modified map necessary for these to function. Some comments on internet forums indicate that the "lack of sound problem" can be resolved by using the SOUND.DLL file from the Firaxis "Sid Meier's Antietam! Demo" download. This will not solve the 'no sound' problem, since the SOUND.DLL file in the Demo package is the same as the one in the version 2.0 Patch (Beta) release, except for the internal Linker date/time stamp. There is no functional difference and no benefit to downloading the Antietam! demo to get this 'magical' SOUND.DLL file. Save Firaxis and the Internet the wasted bandwidth... The key to restoring the game sound is the removal of system-level DLLs from the Antietam! sub-directory, not a replacement SOUND.DLL file. The following registry changes are made by the v3.0 Patch (Final) South Mountain add-on package to the Window XP(SP2) Registry. Version 3.0 Patch (Final) South Mountain additions to Registry: HKEY_LOCAL_MACHINE\SOFTWARE\Firaxis Games\Sid Meier's South Mountain Add-on HKEY_LOCAL_MACHINE\SOFTWARE\Firaxis Games\Sid Meier's South Mountain Add-on\1.00.000 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\Antietam.exe 2.) Resolution: Improper inclusion of Windows 9x-era system level Dynamic Link Libraries (DLL) Now on to the other DLLs which are placed in the Antietam! sub-directory by the SETUP.EXE installation program for use by the ANTIETAM.EXE program file. Listed below are some of the DLL dependencies for the executable "ANTIETAM.EXE" according to version 2.1.3623 of the Microsoft Dependency Walker for Win32(x86). These are the files that the executable ANTIETAM.EXE loads from its own installation directory. The complete DLL listing will show while many of the system-level DLLs are being properly provided by WinXP(SP2) from the "%windir%\System32" sub-directory, two system-level DLLs are being loaded from the application execution sub-directory, which is a cause of the 'lack-of-sound' problem. As long as the DLL files SETUPAPI.DLL and CFGMGR32.DLL exist in the Antietam! sub-directory there will be both NO SOUND and NO STABILITY. c:\program files\firaxis games\sid meier's antietam\ANTIETAM.EXE c:\program files\firaxis games\sid meier's antietam\CFGMGR32.DLL c:\program files\firaxis games\sid meier's antietam\SETUPAPI.DLL c:\program files\firaxis games\sid meier's antietam\SOUND.DLL The two files ANTIETAM.EXE and SOUND.DLL represent the Antietam! game engine. The other two DLL files which exist in the Antietam! sub-directory are system-level DLLs which were improperly installed by the SETUP.EXE program. The only DLL which should be available is the SOUND.DLL file, as the SETUPAPI.DLL and the CFGMGR32.DLL files should be supplied by the WinXP operating system via the "%windir%\System32" sub-directory. These two files, SETUPAPI.DLL and CFGMGR32.DLL prevent the Antietam! sound from functioning and cause intermittent game faults. The only DLL which should remain in the Antietam! sub-directory is the SOUND.DLL file. The other two DLL files listed below should be deleted so that the Antietam! sound will function properly again under WinXP(SP2). There is a structure to the way that supporting system and application DLLs are located and loaded by the Windows operating system when executing a Win32 application. This DLL search order and changes made to the functions supported by system-level DLLs over that past years can cause problems for applications when past programmers improperly included operating system-level DLLs in their release by either over-writing any existing Windows system directory DLLs, or by including such system-level DLLs in the application sub-directory. This approach functioned in the Windows 9x-era when the application release was close to the release dates of Win98, Win98SE and WinME as major Windows operating systems supporting DirectX and gaming. While Windows XP can protect itself from applications installing their own DLLs in the Windows system sub-directory, it can not stop applications from installing out-of-date system-level DLLs in the application sub-directory. With the release of Windows XP (SP1) and Windows 2003 Server the traditional DLL search order was changed. There now exists a registry entry which controls how the DLL search order is defined, either the 'traditional' method or the new 'safe' method. (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\SafeDllSearchMode) The traditional DLL search path: (SafeDllSearchMode is 0): The new WinXP(SP1)+ DLL search path: (SafeDllSearchMode is 1): Source: MSDN: Dynamic-Link Library Search Order Notice that in both DLL search order cases that the Directory from which an application is loaded is still searched FIRST before the (new & old) DLL search rules are applied. Therefore any older system level DLLs which are co-located in the 'Antietam!' sub-directory where the executable "ANTIETAM.EXE" is located will be used before the Windows XP(SP2) operating system can provide the proper system-level DLLs from the "%windir%\System32" sub-directory. Due to this search order, there are other files installed to the Antietam! sub-directory which should be deleted since the latest versions are already installed in the WinXP(SP2) "%windir%\System32" sub-directory. There is no need to risk accidently installing the much older DirectX v7.0 over the Windows XP(SP2) native DirectX v9.0c by leaving these files in place. Here are other DLLs which serve no purpose under WinXP(SP2) and should be deleted for safety sake. These files are no longer necessary and should be deleted from the Antietam! sub-directory. This will eliminate any chance of the DirectX v7.0 installation being executed. Delete all five listed files. To repeat, the proper setup for Antietam! for DLL support would have only the latest v3.0 SOUND.DLL file in the Antietam! sub-directory. No other DLLs should be present, so to repeat - delete all of the unnecessary system-level DLLs from the Antietam! sub-directory. 3.) Resolution: 'inadvertent' changes by Microsoft in VfW CODEC support Since the release of Service Pack 2 for Windows XP, the initial AVI files which display the Firaxis and/or BreakAway Games video Logos appear to be corrupted or suffer visual 'tearing' when the ANTIETAM.EXE program attempts to display said files upon program execution. This video problem occurred at the same time as the sound to Antietam! stopped working and therefore appeared related. The problems are unrelated and occurred due to an unfortunate coincidence in the release of Service Pack 2. Windows XP(SP2) provides audio/video CODEC support for past and current applications via two API mechanisms. The first and oldest method was the original 'Microsoft Video for Windows' code base which was grafted onto the Win9x and WinNT4 operating systems with CODECs supported as DLL files in the Windows system directory. The current method for Windows XP(SP2) support for older applications which rely on the WVfW interface is to get their CODECs DLL support from the files located in the "%windir%\System32" directory. The Registry defines the installed CODECs, their description and location for those applications which need CODEC support via the WVfW API mechanism. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\drivers.desc HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Drivers32 The second and current method of providing CODEC support by WinXP(SP2) is via DirectShow Filters, with the registration of the COM component CODECs in the form of 'SomeCodec.AX' file structure. These files with the "AX" file extension are COM component DLLs by another name. The DirectShow API interface is a superset of the VfW API and provides a 'wrapper' around older VfW DLL CODECs for those applications which make DirectShow requests for the services of older CODECs. Microsoft therefore had no need to re-write the code from the third-parties who provided the CODECs in years past. The two AVI files which now fail to display properly when ANTIETAM.EXE is executed are the LOGO.AVI and BREAKAWAY_LOGO.AVI files. These files were created with the 'cvid' CODEC 'Cinepak' for Windows 32 by Radius, Inc. Even worse, if the Windows Media Player 9/10 is used to play one of these Logo AVI video clips directly from the Antietam! sub-directory, the Media Player 9/10 will abort and be terminated by the Windows XP(SP2) operating system. Clearly something is wrong with the Cinepak CODEC support in WinXP(SP2). So we have a situation where the Microsoft Windows Media Player 9/10 can NOT properly display the Antietam! opening AVI video files, nor can the ANTIETAM.EXE program file do so... First off is identifying the error prone 'cvid' labeled CODEC - it is the Radius Cinepak for Windows 32. This CODEC exists in the WinXP(SP2) "%windir%\System32" sub-directory as the VfW CODEC DLL file: ICCVID.DLL, with a date of 08/04/2004 and a file size of 80,384 bytes. It has two version numbers, v1.10.0.12 and v1.10.0.11, strange but true. Curious also is the fact that this same SP2 installed v1.10.0.12 'cvid' CODEC file ICCVID.DLL will also cause the Windows Media Player 9/10 to terminate if the original Sid Meier's Gettysburg! LOGO.AVI is played. However, the actual Gettysburg! LEE.EXE program file has no problem with its own initial Firaxis Games LOGO.AVI file using that same v1.10.0.12 'cvid' CODEC. OK, so the answer is to go back to the ICCVID.DLL version which was installed with Windows XP, Service Pack 1. On a Windows XP(SP1) CD-ROM the compressed version of the file is located in the \i386 sub-directory as the file ICCVID.DL_ with a file size of 36,141 bytes. Copy the compressed file to the temp folder, then use the command-line utility EXPAND.EXE as follows: Start/Run C:\TEMP>EXPAND ICCVID.DL_ ICCVID.DLL This file expansion should yield the file ICCVID.DLL with a file size of 110,592 bytes, dated 08/29/2002. The version number is v1.10.0.6 and will correct all problems with 'cvid' AVI files. Move this to the WINDOWS/SYSTEM32 folder, overwriting the existing file. Yes, it's that simple... Now the Antietam! initial video Logo clips for Firaxis and BreakAway Games work perfectly, and the Windows Media Player 9/10 does not crash when playing the either the Gettysburg! or Antietam! Logo AVI files. Note: Even with these fixes any attempt to use Windows Explorer to 'right-click' the mouse to select one of the Logo AVI files to be played, that process will cause a DEP exception and a termination/restart of Explorer. 4.) Resolution: Ever increasing speed of current/future x86 processors Many of the timing routines in the code of Antietam! are not processor dependent, however the ones that are processor speed dependent impact the user interface for moving about the complete map using today's much faster x86 processors. When using the mouse to navigate around the map by placing the mouse pointer at one of the four edges of the display 800x600 screen, the map is redrawn so quickly that it is sometimes hard not to 'overshoot' the intended map destination. With no coding modifications to ANTIETAM.EXE on the horizon, the only solution seems to be a combination of making the x86 processor do as much work as possible during the game, plus adding some sort of slow-down utility to the workstation to allow for a more reasonable speed of the user interface. For the in-game slow downs, go to the Antietam! F9 preferences and make sure that the following items are set to ON: Normal Trees and Houses Map Scrolling Enabled Maximize Graphic Detail Full Draw on Scroll This will at least make the x86 processor work as hard as possible in drawing the 2D images and sprites which are the center of the Antietam! graphics sub-system. Probably the simplest 'slowdown' coding fix would to be to cause any DirectDraw screen redraws performed on a map scroll to be executed twice in a row. This would waste CPU time, but that is after all the objective... The following web page titled "The NEW PC Slow Down Page!" has various DOS and Windows x86 CPU slow-down utilities. The site is hosted by DeBray Bailey and includes a free copy of the Microsoft DirectShow SDK utility 'CPU Grabber'. This Microsoft "CPU Grabber" utility and the shareware "CPUKiller! v3.0" are probably the best utilities for slowing down the faster x86 CPUs now in use. The utility "CPUKiller! v 3.0" is hyper-threading and multiprocessor aware, but does cost if you like the time-limited demo. Final Observations The final software recommendation would be Daemon Tools CD-ROM emulator a free CD-ROM emulation program which will allow an ISO CD-ROM image be used instead of the actual Antietam! CD-ROM. Very good at speeding up access to the video clips when there is a need to run them at the conclusion of a scenario. It also helps that you don't have go looking for the CD-ROM just to play Antietam!, it's just an ISO image stored on the hard drive... If you do use a CD-ROM emulator to host the Antietam! CD-ROM image file, be sure to actually install the game from the emulated CD-ROM drive. The Windows Registry maintains this "installed from CD drive" letter and expects to find the actual CD-ROM (or image) at that drive letter for the game to properly function. If the Gettysburg! and Antietam! engines were just re-coded to support 1024x768 screen resolution @32bit color with the processor dependent timing fixed, it would be enough for me... Hope this helps, dvwjr Credit: Marc Swaby (via the Gettysburg! Online Society Forums) for the idea that SETUPAPI.DLL in the application sub-directory was part of the cause of the problem with the Sid Meier's Antietam! lack of sound operating under WinXP(SP2).
This article has been published at Vogon forums and was revised by the author for Gettysburg! Online Society. Publishing with kind permission of Don V Wells, Jr.
|