FunkyFr3sh / cnc-ddraw

GDI, OpenGL and Direct3D 9 re-implementation of the DirectDraw API for classic 2D games for better compatibility with Windows 2000, XP, Vista, 7, 8, 10, 11, Wine (Linux/macOS/Android) and Virtual Machines
https://discord.gg/afWXJNDDF5
MIT License
2.13k stars 143 forks source link

Commandos #241

Closed AzazelHD closed 1 month ago

AzazelHD commented 10 months ago

Hello. Thanks for making this tool.

Im trying to use it along Commandos 1 and its expansion.

What should i notice ingame after installing it? I cant really notice it, so i dont know if im doing something wrong

FunkyFr3sh commented 10 months ago

you could press Alt+Enter to check if it switches to windowed mode. Or you can press Ctrl+Tab and check if that unlocks your cursor.

Or use cnc-ddraw config.exe and enable windowed mode in there, then start the game and check if it's windowed.

AzazelHD commented 10 months ago

So, this is tool is mainly to allow old game (those that use directdraw) to be displayed in windowed or borderless mode?

FunkyFr3sh commented 10 months ago

Yeah, borderless and windowed mode are two things people usually like about cnc-ddraw. But it does also add support for shaders that improve the image quality or add some retro CRT/scanline effects. It can also fix your mouse sensitivity (needs Borderless/Fullscreen upscaled enabled).

But it does fix compatibility issues as well, some games don't even start without cnc-ddraw (or run very slow). There are also games that crash on Alt+Tab without cnc-ddraw.

AzazelHD commented 10 months ago

I see. Thanks so much ^^

AzazelHD commented 10 months ago

Sorry for coming here again. Im having some issues. Without cnc, mouse works right, but i cant use borderless mode. With cnc, i can use borderless, but mouse goes weird. Like if it had lagg. I tried enabling and disabling adjust the mouse sensitivity, but i cant make it go like without cnc.

Do you have any ideas?

FunkyFr3sh commented 10 months ago

There are all kinds of reasons for a slow cursor:

  1. You enabled v-sync
  2. Boderless does also add some delay to the cursor, that's normal in games that have a software cursor
  3. You chose a shader that's too heavy and your hardware can't handle it

Also, make sure you never enable v-sync and boderless at the same time.

AzazelHD commented 10 months ago

vsync is off. And idk how to disable shaders. There is no "none" option. Simply remove folder? I am not sure, but cnc is doing something with resolutions. The resolutions (in game) with and without cnc are totally different

FunkyFr3sh commented 10 months ago

If you didn't change the shader then it's probably fine, "nearest neighbor", "bilinear" and "bicubic/Catmull-rom" are not going to lag

What if you use "Fullscreen upscaled" instead of "Borderless", does it feel normal? "Fullscreen upscaled" does the same as "borderless", both upscale the game. But "Fullscreen upscaled" is real fullscreen so it doesn't add any delay.

AzazelHD commented 10 months ago

So, im on windows 10, and i have on that feature called "night light" (sorry my OS isnt on english), which applies like a yellow filter to the screen. If i use fullscreen upscaled, that filter is gone. I dont know why, but i dont like it playing at night without that filter.

FunkyFr3sh commented 10 months ago

Yeah, that's fine, it was mainly just meant to be a test. Does the cursor feel normal with "Fullscreen upscaled"?

AzazelHD commented 10 months ago

Nop, cursor is still laggy. I dont know how to describe apart from saying that it is not as smooth as without cnc.

All the other settings are by default. Only changed the window mode

FunkyFr3sh commented 10 months ago

Alright, I'll try to set the game up and do some tests just to make sure it's still working as intended (been long time since I last tried it)

AzazelHD commented 10 months ago

I dont know if it will matter, but I have the GOG version. Thanks for your time

FunkyFr3sh commented 10 months ago

Yeah, there are multiple bugs. it does run better with the game speed limiter disabled, but I'll have to do some more debugging (Will do that tomorrow, getting late here)

image

AzazelHD commented 10 months ago

Yeah i tried that too. It is smoother, but not as smooth as without cnc. Thanks so much, and sorry for troubles. Take your time lol, dont worry ^^

FunkyFr3sh commented 10 months ago

Did you disable "Adjust Mouse sensitivity"? It seems to run same as original for me with that off and no speed limiter.

BTW, this problem only happens in the menus (The gameplay is fine). In Beyond The Call Of Duty they've fixed it.

AzazelHD commented 10 months ago

Even in game i have lagg. Look, maybe u could try this and hopefully find the issue. Do u have afterburner + rivartuner? if not, download them, and on afterburner settings, click on frametime - show on screen display - graph (it is on text by default) And then make RTSS to show ingame. When ever u move the cursor, frametime varies a lot. Idk if this is the "lagg"

FunkyFr3sh commented 10 months ago

I have a FPS overlay in cnc-ddraw, but what you see there is normal. Old games only redraw the screen if something changed. So if you don't move the mouse or move it slow it will show a low fps.

https://github.com/FunkyFr3sh/cnc-ddraw/assets/8355237/a38025a7-c8b4-4327-950e-250cf26476ed

AzazelHD commented 10 months ago

Mmmm ive noticed that your ddraw.dll is bigger than mine, and i dont have those dxwrapper files. I googled it and i got another github repo. Could be that? Also, u running it windowed mode. Should i?

FunkyFr3sh commented 10 months ago

Oh, you can ignore those files, I just wanted to try some other ddraw.dll wrappers and check if they also have the same issue (they do). It did even happen on windows xp without any ddraw.dll wrapper.

You could try to play around with the settings a bit, but I guess it's the best you try it with all on default first (until we figured out the issue). Keep it on Fullscreen and make sure game speed limit is off

AzazelHD commented 10 months ago

Thanks for ur time ^^

AzazelHD commented 10 months ago

Hi. Little update. I tried dxwrapper (https://github.com/elishacloud/dxwrapper) And mouse runs smoother. Do u think i could use the ddraw.dll from there with ur cnc? or it will crash?

EDIT: It crashes

FunkyFr3sh commented 10 months ago

No, that's not possible. You can use only one at a time. And BTW, dxwrapper is disabled by default (just dropping the ddraw.dll into the folder isn't enough to activate it), you need to enable it via the settings file

elishacloud commented 10 months ago

I tried dxwrapper (https://github.com/elishacloud/dxwrapper) And mouse runs smoother.

What settings are you enabling in the dxwrapper.ini file?

FunkyFr3sh commented 10 months ago

Okay I can reproduce it now on windows 10. Don't have a solution yet, but I'll post here once I made some progress

AzazelHD commented 10 months ago

No, that's not possible. You can use only one at a time. And BTW, dxwrapper is disabled by default (just dropping the ddraw.dll into the folder isn't enough to activate it), you need to enable it via the settings file

Yeah, i read the instructions and the settings. Their readme has the reqs for it. For commandos they say to enable FullscreenWindowMode and ColorMode (or something similar) to 16. But dxwrapper does something weird, cuz the resolution on rivatuner is not the same as with cnc

imagen

FunkyFr3sh commented 10 months ago

You also need to set this, otherwise the other settings are doing nothing. It does not run well with dxwrapper though, at least for me it's unplayable atm

[Compatibility] Dd7to9 = 1

AzazelHD commented 10 months ago

Ye ye, i didnt mention but sure, i enabled dd7to9 ^^'

FunkyFr3sh commented 10 months ago

Here's a test build @AzazelHD , I'm getting a 60 fps cursor now with it:

cnc-ddraw_Commandos_5.7.0.4.zip

AzazelHD commented 10 months ago

OMG it goes super smooth <3 <3 <3

Thank you so much, i really appreciate it

SilentMRG commented 9 months ago

Hello everybody!

Enjoying the topic to ask a question... Could someone please tell me how I can make the videos (I'm referring to those historical videos) appear? There are none of these videos and no videos with company logo appear when starting the game. I'm using the GOG version of Behind Enemy Lines. Of course, I'm using the latest version of cnc-ddraw.

Thanks in advance!

Funky-Fr3sh commented 9 months ago

Hello everybody!

Enjoying the topic to ask a question... Could someone please tell me how I can make the videos (I'm referring to those historical videos) appear? There are none of these videos and no videos with company logo appear when starting the game. I'm using the GOG version of Behind Enemy Lines. Of course, I'm using the latest version of cnc-ddraw.

Thanks in advance!

Does it work without cnc-ddraw? If it also doesn't work without cnc-ddraw then my guess is a problem with the codec, you might need to run the game in compatibility mode Windows XP SP2 (This way windows enables some older codecs)

Edit: just tested, works fine for me using the "comandos_w10.exe" in the game folder. Tested on Win7 and win10

SilentMRG commented 9 months ago

I haven't tested it without cnc-ddraw yet. As soon as it's on my PC I'll test it. Regarding the codec, I don't think this is the problem, as I have installed the latest version of "K-Lite Codec Pack Mega", and I can watch the videos by accessing them directly from the folder; however, in the game no video will play, and instead I get a black screen with some dots that flash quickly. Other than that, the game works very well and I even finished it. I'm going to play Beyond the Call of Duty for the next few days and see whether or not videos will be play.

SilentMRG commented 9 months ago

Edit: just tested, works fine for me using the "comandos_w10.exe" in the game folder. Tested on Win7 and win10

Wait a minute... Does "comandos_w10.exe" work on Windows 7?! I thought about using this executable but I thought it wouldn't work because I'm on Windows 7 and the executable is for Windows 10. I'll test this later too. Thanks for the tip!

FunkyFr3sh commented 9 months ago

Yes, it does work fine on windows 7, I always use the _w10 one

SilentMRG commented 9 months ago

Unsuccessfully! I tried "comandos.exe" with and without cnc-ddraw and got the absence of videos, then I tried "comandos_w10.exe" also with and without cnc-ddraw and the same problem occurred. I don't understand... I can watch the videos through the folder, but in the game, they don't work. Anyway, I'm using the latest version of the K-Lite Codec Pack in its default configuration. Another suggestion of what could be causing this? I also tried various compatibility modes and no videos to watch. =/

Thank you for your attention!

FunkyFr3sh commented 9 months ago

We could try to use a different codec for testing, just to see what happens. I re-encoded one videos for you, try to extract the files into your game folder (Make a backup of your original video first!) and run "enable-xvid-vfw.reg" to enable the xvid codec.

commandos-video-test.zip

SilentMRG commented 9 months ago

This is one of the codecs installed by K-Lite Codec Pack Mega. I received an error related to this codec every time I tried to play Ys I & II Chronicles+, and after installing K-Lite the problem was resolved. So, in my humble opinion I believe it is not a problem with the codecs.

Honestly, this is a mystery, worse than the videos not being displayed is the lack of a warning related to the error. At least Ys warned that there was an error about missing codec.

FunkyFr3sh commented 9 months ago

Hm, I don't really know what else the problem could be. The game plays the videos just fine and there seems to be nothing unusual about them (cnc-ddraw also fulyl supports them, including upscaling). The codec is also nothing special, it's just the old "Cinepak Video" one that a lot of other old games are using as well.

SilentMRG commented 9 months ago

I just installed Beyond the Call of Duty and I'm not getting any videos either. I installed the latest version of K-Lite: https://codecguide.com/

And I did a fresh install, and left all the settings at their defaults. So, I don't know what could be causing this. I took a look in the System32 folder and there are the dlls from the package you uploaded, the same dlls that were reinstalled by K-Lite. To give you an idea, the creation date of the dlls in your package is the same as the one that K-Lite installs. That about the videos not appearing doesn't make sense... Anyway, at least I can watch the videos through the folder.

And sorry for posting these things here, it's just that for me, this wasn't a problem with cnc-ddraw, that's why I didn't open an issue.

Thank you for your attention and help!

FunkyFr3sh commented 9 months ago

Yeah, the dll files in my .zip are just the original xvid ones from the official installer. I only included them just in case you don'T have them yet.

BTW, the video in my zip is the only one that needs these dlls. The original videos are using "iccvid.dll", maybe you don't have that one?

SilentMRG commented 9 months ago

I just searched the System32 folder for iccvid.dll and didn't find anything, so I guess I don't have it. Could this be the problem?

FunkyFr3sh commented 9 months ago

I guess that might be the problem yeah. I do have the file on my win7

image

image

SilentMRG commented 9 months ago

Surely this is the problem. And now? How to install this dll? There is a program that installs it? K-Lite does not install it.

FunkyFr3sh commented 9 months ago

I think it's part of windows installation, that's probably also the reason why mine is german (Deutsch). I also tried to delete the file it doesn't let me delete it so it probably is a windows component.

Maybe in your country the file wasn't included in the windows installation due to license issues? Windows installs different files on different languages.

I don't know if there is a official download link for it, you'll have to google for it.

Here is my file and the registry key to enable the codec: cinepak-codec.zip

SilentMRG commented 9 months ago

Man, I really thank you for all your help! You wouldn't even have to care about it, but you did and tried to help me in the best way possible. BUT, unfortunately it didn't work, I tried several ways: I threw the dll in the game folder and registered it, then I deleted the keys and threw the dll in the System32 folder, finally, I found this: http://www.probo.com/cinepak.php

I downloaded the 32-bit version and used these keys:

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\drivers.desc] "iccvid.dll"="Cinepak Codec by Radius Inc."

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Drivers32] "vidc.cvid"="iccvid.dll"

With your file header, in this case, "Windows Registry Editor Version 5.00". And guess what? Nothing happened! Holy shit... And of course, when doing these tests I deleted the keys and dlls to avoid generating conflicts. I think my PC is cursed and not even black magic will solve it! I've never seen an invisible error like this where no solution works. Anyway, I'm from Brazil, and I think that MAYBE it's a region lock or whatever!

I was irritated by this game! I'm going to uninstall it and try Commandos 2 another time. They say it's better than the first one anyway, so I'm wasting time with this stupid game.

Again, thank you for all your help and apologize for any inconvenience.

elishacloud commented 9 months ago

Those codecs should be installed as part of a Windows component. Have you tried removing with "Media Features" component and then adding it back in? See here: https://www.dummies.com/article/technology/computers/operating-systems/windows/windows-10/how-to-add-or-remove-parts-of-windows-7-195288/

SilentMRG commented 9 months ago

Those codecs should be installed as part of a Windows component. Have you tried removing with "Media Features" component and then adding it back in? See here: https://www.dummies.com/article/technology/computers/operating-systems/windows/windows-10/how-to-add-or-remove-parts-of-windows-7-195288/

Thanks for the tip... And by the way, I lost my system installation disc. I gave up on this game, many juggles to make a game work is not good. If it worked the first time or with minimal adjustments, that's fine, if it didn't work, I'll just delete it. I'm an old guy who doesn't have time to waste. XD

Edit: Just for the record... I installed Commandos 2 just to see whether or not the videos would show up, and they all did, I didn't see any errors or anything weird. And I also used the latest version of cnc-ddraw. Anyway, I don't know if C2 videos use the same codec as C1, what I know in short is that it worked like a charm. I don't understand these things... PC games are definitely a Pandora's box! hehe

AzazelHD commented 8 months ago

Hi. Sorry for coming back again. I have realised game freezes every few seconds. imagen Is like... if it was lagging. Do i have something wrong on the cnc settings? ddraw.txt

FunkyFr3sh commented 8 months ago

Hi. Sorry for coming back again. I have realised game freezes every few seconds. imagen Is like... if it was lagging. Do i have something wrong on the cnc settings? ddraw.txt

I still don't have a proper solution for this game, but you can try these two here, maybe one of them will work better:

cnc-ddraw_Commandos_5.7.0.4_sleep4.zip cnc-ddraw_Commandos_5.7.0.4_sleep3.zip