joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.65k stars 377 forks source link

Windows 95 games and dib mode #130

Closed ghost closed 8 years ago

ghost commented 8 years ago

Noted that Starcraft, Diablo 1 and Diablo 2 require directx3 only, but I didn't test against directx2. I was unable to start these games without directdraw (dib mode), however.

Unreal Tournament (and likely Unreal) support dib mode in a window (such as 320x240 or higher), but not full screen. I couldn't find a wrapper to create a borderless window which fills the screen in 95. Others have even run this game in NT 3.51.

Didn't test Age of Empires 1 and 2 which reportedly have low minimum requirements in 95.

ghost commented 8 years ago

Half-life 1 runs in NT 4.0, so it should be compatible with directx3. However, I've been unable to test half-life 1 in 95 using directx3 because of its Win95/directx6 detection routine.

In removing directx6 from 95 and then installing dx3, I noted shell issues with the command prompt. I'd have to reinstall 95b to verify this wasn't caused by the removal process, but reinstalling dx6 fixed the issue. In addition, dx6 with its native s3 driver allows for low resolution modes, so dx6 should be ideal for this era of games.

ghost commented 8 years ago

Half-life startup file accesses: ddraw.dll <--- winmm.dll advapi32.dll gdi32.dll user32.dll kernel32.dll hl.exe woncr_w95.dll hl_res.dll wonau_w95.dll wsock32.dll comdlg32.dll winspool.drv comctl32.dll

Half-life startup registry accesses (partial list): 0xC10F40A4\DDRAW not found 0xC10F44D0\DDRAW16.DLL and TOOLHELP.DLL HKLM\Software\Microsoft\Windows\CurrentVersion\SubVersionNumber HKLM\Software\Microsoft\Direct3D\Drivers* SHELL32.DLL

DxWnd application has a hook for the OS version. It may be modified for NT 4.0 (hl.exe refers to getversionexA)?


+   {4, 0, VER_PLATFORM_WIN32_WINDOWS,  950,        "Windows 95"},
+   {4,10, VER_PLATFORM_WIN32_WINDOWS,  67766446,   "Windows 98/SE"},
+   {4,90, VER_PLATFORM_WIN32_WINDOWS,  0,          "Windows ME"},
+   {4, 0, VER_PLATFORM_WIN32_NT,       1381,       "Windows NT4.0(sp5)"},
+   {5, 0, VER_PLATFORM_WIN32_NT,       2195,       "Windows 2000"},
+   {5, 1, VER_PLATFORM_WIN32_NT,       2600,       "Windows XP(sp3)"},

@@ -277,16 +299,17 @@ BOOL WINAPI extGetVersionExA(LPOSVERSION
        return ret;
    }

+   OutTraceDW("GetVersionExA: version=%d.%d platform=%x build=(%d)\n", 
+       lpVersionInfo->dwMajorVersion, lpVersionInfo->dwMinorVersion, lpVersionInfo->dwPlatformId, lpVersionInfo->dwBuildNumber);

    if(dxw.dwFlags2 & FAKEVERSION) {
        // fake Win XP build 0
        lpVersionInfo->dwMajorVersion = WinVersions[dxw.FakeVersionId].bMajor;
        lpVersionInfo->dwMinorVersion = WinVersions[dxw.FakeVersionId].bMinor;
+       lpVersionInfo->dwPlatformId = WinVersions[dxw.FakeVersionId].dwPlatformId;
        lpVersionInfo->dwBuildNumber = 0;
+       OutTraceDW("GetVersionExA: FIXED version=%d.%d platform=%x build=(%d) os=\"%s\"\n", 
+           lpVersionInfo->dwMajorVersion, lpVersionInfo->dwMinorVersion, lpVersionInfo->dwPlatformId, lpVersionInfo->dwBuildNumber,
            WinVersions[dxw.FakeVersionId].sName);
    }
    return TRUE;

And commands: -nosierra -noprompt -nommx -sw -startwindowed -windowed -vid_mode -vt

-dev -toconsole _snd_mixahead 0.100

ghost commented 8 years ago

For compatibility, it is possible to run half-life like this: hl.exe -dibonly -wavonly. This parameter may help with any audio lag: _snd_mixahead.

However, it tests for directx6, so it seems like a requirement and it does add the low resolution capable video driver; to run half-life without directx, then "copy the dx6 versions of ddraw.dll, ddraw.vxd, ddraw16.dll and the dx3 or dx6 version of ddhelp.exe into /windows/system/".

Starcraft and the Diablos run with dx3. I haven't determined whether they are dependent on a ddraw surface or have a DIB mode. Since dosbox-x is now compatible with these configurations, I'll close this thread.

Update- Another post showed that these changes to hl (v1.0) will enable it to run in 95 with dx3: 00020717 74 to 75 0002BC8B 1C to 00 0002728E 04 to 00