New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glide wrapper patch #1428
Comments
I had a look at this. It seems the latest glide code can be found as part of DOSBox ECE. Most of the code is pretty straight forward to merge it seems, you just need to take these files verbatim: Add a few config options to dosbox.cpp, add a little code to sdlmain.cpp and update Makefile.am Where I got stuck, was the last file. The original code adds itself to the Mem_GetPageHandler() in src/hardware/memory.cpp. And that function has changed quite a bit. Looking through the change history, I found that @joncampbell123 had done this to speed up the code, such that not every page request was going through a bunch of range checks. So adding range checks back in seems the wrong thing to do. |
I have already added support for the Glide wrapper in the latest code. The original code from DOSBox ECE only supports SDL1, thus I modified it somewhat so that it will also work with SDL2. Also, the file GLIDE2X.OVL file is built into DOSBox-X, but the DLL file glide2x.dll/libglide2x.so/libglide2x.dylib will be required for Glide to work. Tested with 3dfx version of Tomb Raider and confirmed to work. |
Unfortunately, using the glide wrapper and openglide crashes in openglide. I mentioned this in #1788 and also reported this to voyageur's openglide, but don't have high hopes of anyone ever being able to look at it. It also turned out that my initial problem of low level emulation not being fast enough was not a problem because I didn't have cycles=auto, but it's still awkward to use it because it can't be used fullscreen or in a large window as per #1215. Pure software Voodoo emulation on Tomb Raider is unusable, because any text in the emulated glide window (such as "Lara's Home" on the start screen) is replaced by colored blocks. I also get sound stuttering which is not helped by setting a high blocksize and happens even though my CPU usage is nowhere near 100%. |
There are quite a few different implementations of the Glide wrapper, at least on Windows (which I primarily use), such as nGlide, dgVoodoo, Glidos, and OpenGlide. If voyageur's OpenGlide has problems and is no longer actively maintained, perhaps you can try a different implementation, if that exists for your platform. |
@arromdee I already replied to these issues in #1788. The issue seems to be with OpenGlide on your system, as I can run it just fine on Linux with Intel Graphics. It could be an issue with your graphics card (what graphics card do you have?), or the version of some library like Mesa on your system. As to Tomb Raider, there are different "versions". The version I have (a late budget re-release), does not have the font rendering problem. Not a real solution obviously, but at least there are versions that do work. |
My graphics card is a Radeon R7 260X. Is the font in Tomb Raider (and sound stuttering) a known problem that happens on other systems? |
There are several versions of Tomb Raider (DOS), and according to Issue #1713 there seems to exist at least one version that have the font issue with the Voodoo hardware emulation (not the wrapper) when Mipmapping is selected, and the user is using Windows 10. However, in the version I tested I never seen the problem myself, and in fact I could not find the Mipmapping option in the game I tried. That is why I was never able to confirm it myself, but it was indeed reported by at least one user. |
I confirmed that my version does have the Mipmapping option, and turning it off fixes the problem. The option is located on the title screen, using the sunglasses icon to go from Mipmapping to normal. I believe the option was added for the 3dfx version. Now that I can see the text I can see that it's below 30 fps. It may just be too slow to run full speed and that's why my sound problems. |
@arromdee I see. I re-tried 3dfx version of the game (downloaded online) and found that if I force Voodoo hardware emulation by replacing the GLIDE2X.OVL file from the new Glide feature with the original one provided by 3dfx, then I can indeed see the font problem. And in this mode the game is running in a terribly slow speed (causing sound issues). But both problems are immediately solved if I use the Glide wrapper emulation with the GLIDE2X.OVL file provided by DOSBox-X instead. |
Given that Dosbox-x even tries to get demos to work because demos exercise edge cases that make emulation more accurate, I hope the font problem could be fixed someday, even though it wouldn't really help me right now. Actualy, I'm sort of stuck--software mode is too slow, high level crashes, and low level works but the limitations on fullscreen and window size make it awkward |
@arromdee Yes, I do have plan to fix Voodoo hardware emulation by porting new code, but the change will not be small and a new DOSBox-X version is coming very soon, so maybe the next version. By the way, for high-level emulation, as I mentioned earlier perhaps you can try a different Glide wrapper implementation if voyageur's OpenGlide does not support your system. |
I was not able to find another glide wrapper implementation for Linux. My son has a PC with an AMD RX590, I will try to see if I can test it on that in the next few days to determine if it is an issue with the AMD OpenGL implementation on Linux. |
According to online discussions some Linux users seem to use Windows Glide wrappers with Wine in Linux and it works for them. So this can be a possible option too. Examples: https://forum.winehq.org/viewtopic.php?t=15142 |
Yes, but then you also need to run the Windows build of DOSBox-X through wine, which seems like an additional layer of redirection. |
Not sure what is going on, but Glide pass-through no longer works for me on either my Intel graphics PC or the AMD graphics PC. It seems that DOSBox-X no longer recognises that I have libglide2x.so and does not provide the glide2x.ovl on the Z: drive. Meanwhile the glide libraries are still found.
Looking through the log, all I find is:
edit Never mind, forgot that Also, I can confirm that it works here on a Fedora 32 x86_64 installation with AMD RX590 graphics. |
@rderooy Yes, [pci] section no longer applies, use [voodoo] instead. |
Do you get the 'warning: "GL_GLEXT_VERSION" redefined when building openglide'? |
Yes I do.
Full log below;
|
After I rebuild both openglide and dosbox-x without optimization, I still get the crash. Debugging it gives me this.
|
@arromdee I believe I have already fixed the font issue in the Voodoo hardware emulation in the latest code. As mentioned earlier portions of the code were ported from DOSBox ECE, but it is not a complete port of code from it. |
I am using DOSBox-X build 0.83.7 MinGW x64 SDL1. I was unable to start Carmageddon with 3Dfx. I copied all the necessary files to the DOSBox-X folder for x64: Glide.dll, Glide2x.dll, Glide3x.dll (taken from DGVoodoo). Here is the configuration: |
@maximus105 Where did you download the game from? |
@Wengier I uploaded the game to google drive: |
@maximus105 Thanks for uploading it. DOSBox-X does fully emulate 3Dfx, but maybe there is some oversight somewhere for this case. I will look at it further. |
@maximus105 This is likely caused by the 2D texture bug. It is hopefully fixed in #2129. Tested with Windows 32-bit SDL1 and SDL2 builds with nGlide. |
@Wengier Carmageddon is already startup and running with 3Dfx in build MinGW x64 SDL1 v0.83.9. Thanks! |
openglide seems only support SDL 1.x, for SDL 2 build environment, it will fall back to X implement. so combine SDL 2 version dosbox-x together with X version openglide will result in stuck mode, no keyboard input event can be send to game window. SDL 1.x version dosbox-x + SDL1.x version openglide works, for 3dfx tomb raider 1 will got 30fps on menu screen, 17+fps in game, but the loading video was very choppy. |
@xlla Correct, openglide is only SDL1 for now. I have opened an issue upstream for it here: voyageur/openglide#20 |
gulikoza's Glide patch (https://www.vogons.org/viewtopic.php?t=16462 ) that works with a Glide wrapper.
A number of years ago I used this patch and it had a much better framerate in Tomb Raider than the Dosbox-x glide support, and worked fullscreen. My computer has newer parts now, but I still need some FPS.
My current system is Mageia Linux 7.1, 64 bit.
The text was updated successfully, but these errors were encountered: