VOGONS


Tutorial: dosbox with Glide under Linux

Topic actions

Reply 40 of 72, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Just look at the patch and apply it by hand. We have no idea as to which version of dosbox sources you try to apply the patch to.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 41 of 72, by Orka Borka

User metadata
Rank Newbie
Rank
Newbie

@gulikoza: yep, that was it, I wasn't using the voodoo rush package. I bought a 9.99€ "classic edition" of some sort and assumed the patch that was inside was the right one. Ill' try packaging the voodoo emulation patches anyway.

EDIT: Screamer Rally wasn't working correctly due to a weird nvidia driver problem with rescaling between the game resolution and desktop size.
Playing while windowed shows no problems; if I try to press alt-enter in mid game it does nothing, then when closing the game (but still while being inside dosbox) it goes full screen but only showing a black screen...Or so it seems: It is actually the dosbox prompt, only at the original display size (1280x800) while the screen size is still at 640x480.

Reply 42 of 72, by MadDin

User metadata
Rank Newbie
Rank
Newbie

Finally I got it to work with 0.73 and after some time with 0.74. I had to remove just some line in the patch and everything was okay.

I also translated the tutorial for German speaking Ubuntuusers. You can find the related wiki article under the following link: http://wiki.ubuntuusers.de/Spiele/DOSBox_mit_Glide(only for 0.73 at the time)

cu, MadDin

P.S Yes I know an answer after 1 year isn't very fast... 🤣

Reply 43 of 72, by arromdee3

User metadata
Rank Newbie
Rank
Newbie

I am running dosbox 0.74 on Mageia 2 with the patch. It seems to mostly work.
I have fullresolution=1280x1024 (which is what my monitor is) and aspect=true, output=overlay, with machine=svga_s3.

If I run the non-Glide version of Tomb Raider the game runs with the 640x480 screen scaled into a 1280x960 piece in the middle of the 1280x1024 screen--which is what I expect. However, my first problem is that the movies do not obey this and refuse to scale--they appear in an unscaled 640x480 piece in the middle of the 1280x1024 screen.

If I run the Glide version of Tomb Raider, the second problem is that the game doesn't seem want to set the monitor to 1280x1024, render in 640x480, and scale that. Instead, it tries to directly set the monitor to 640x480 mode (and my monitor doesn't quite do that properly.) (I also get the unscaled movies problem.)

Reply 44 of 72, by Gamecollector

User metadata
Rank Oldbie
Rank
Oldbie

Output=overlay isn't scaling 16-bit and 32-bit video modes, unfortunately.

Asus P4P800 SE/Pentium4 3.2E/2 Gb DDR400B,
Radeon HD3850 Agp (Sapphire), Catalyst 14.4 (XpProSp3).
Voodoo2 12 MB SLI, Win2k drivers 1.02.00 (XpProSp3).

Reply 45 of 72, by arromdee3

User metadata
Rank Newbie
Rank
Newbie

As well as the above scaling problems, I was also only getting around 15-20 FPS (oddly, my CPU usage wasn't 100%. It was around 70% divided between two cores--could this actually be limited by the speed of my graphics card? It's a crappy built-in Radeon 3200 HD.)

So I tried it in Windows (the version I happened to grab was 0.72) and got 30 FPS (output=direct3d which isn't available on Linux. I tried output=overlay but it wouldn't even run). Windows, unfortunately, had a screen which looked washed out and could not be fixed by changing my video card gamma settings.

The final answer was to use a different glide wrapper. nglide on Windows allows me to 1) change gamma and 2) specify that I want it to use a 4:3 aspect ratio screen centered in a 1280x1024 screen. Openglide didn't allow either of these. The movies still aren't quite right, but much better. So I guess if I want this to work as close to working as I can get it I can't use Linux.

I wonder if a real video card would help me in Linux. (I wouldn't buy one just for this, but the first time I want to play a modern Windows game I'll need one anyway.)

Reply 46 of 72, by Sheriff Hobbes

User metadata
Rank Newbie
Rank
Newbie

I'm stuck at applying the patch. The patch lists these files to be patched:

 configure.ac             |    2 
include/glide.h | 331 ++++++++
include/glidedef.h | 179 ++++
include/mem.h | 2
src/dosbox.cpp | 12
src/gui/sdlmain.cpp | 13
src/hardware/Makefile.am | 2
src/hardware/glide.cpp | 1962 ++++++++++++++++++++++++++++++++++++++++++++++
src/hardware/memory.cpp | 21

The source code in dosbox-0.73.tar.gz does not include these files:

 configure.ac             |    2 
include/glide.h | 331 ++++++++
include/glidedef.h | 179 ++++
src/hardware/glide.cpp | 1962 ++++++++++++++++++++++++++++++++++++++++++++++

That's why the patch fails. It seems like you were talking about a dosbox source with glide already included, but that's not the case for the download link you gave. Please somebody advise on which dosbox version to apply the patch (download link).

Thanks,
SH

Marriage is a three ring circus:
-engagement ring
-wedding ring
-suffering

H. L. Mencken

Reply 47 of 72, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

First of all grab either Dosbox 0.74 or SVN.
Then apply the patch, sometimes listed files for the patch means it will create them.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 48 of 72, by Sheriff Hobbes

User metadata
Rank Newbie
Rank
Newbie

The instructions clearly say I have to use version 0.73. However, taking v0.74 makes no difference. I execute the command

cat dosbox_glide.diff | patch -p0

in the folder above "dosbox" and this is what I get:

File to patch:

Marriage is a three ring circus:
-engagement ring
-wedding ring
-suffering

H. L. Mencken

Reply 50 of 72, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

You can get the clean patch of kekko voodoo1 emulation against SVN r3858 here:
Re: Direct3D games in DosBox

This gives you 3Dfx chip emulation and able to run both glide and Win9x Direct3D games in Linux. And, you don't have to compile OpenGlide for Linux. I have tested it on Ubuntu 12.04.4LTS and 13.10. Tomb Raider 1 works, so as Tomb Raider II (Dagger of Xian) in Win98.

Another note to keep in mind is that DOSBox built on AMD64 Linux cannot support dynamic x86 core, and different dynamic core "dynarec" will be used. This is, from my measurement, ~20% slower than dynamic x86. I got virtual machine instanced in Linux x86 flavor to build DOSBox in ELF32 to get back the dynamic x86 core as cross compiling to ELF32 does not work due to missing multilibs support in SDL-* libraries.

Reply 51 of 72, by Sheriff Hobbes

User metadata
Rank Newbie
Rank
Newbie

Ok, I downloaded an 3858-snapshot from here http://sourceforge.net/p/dosbox/code-0/HEAD/t … h=/dosbox/trunk, and I downloaded the Patch you mentioned.
Can you tell me where to put the patch and which command to execute?

Marriage is a three ring circus:
-engagement ring
-wedding ring
-suffering

H. L. Mencken

Reply 52 of 72, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

I attached an updated patch here.
OK, I am going to start it very simple. I assume that user who want to try this has certain level of Linux GNU tools experience and doing command lines at the Terminal.

Assumption:
- Your DOSBox is located at ~/src/dosbox-3858/...
- The patch file is located at ~/dosbox_patches/...

Use the following commands:

$ cd ~/src/dosbox-3858
$ patch -p0 < ~/dosbox_patches/voodoo_patch_dosbox-3858.txt

Next, we need to resolve the OpenGL includes inconsistency between MinGW and Linux. I am using Ubuntu. If you are on different distro, you got to figure it out yourself to locate the system gl.h.

$ cd ~/src/dosbox-3858
$ mkdir -p ./include/GL
$ cp -vf /usr/include/GL/gl.h ./include/GL/

Ok, now we have a copy of gl.h in DOSBox local includes. Find those lines in this file and modify it so that it keeps the Linux version clean.

-#ifndef GL_ARB_multitexture
-#define GL_ARB_multitexture 1
-
+//#ifndef GL_ARB_multitexture
+//#define GL_ARB_multitexture 1
+#if 0

Finally, one last small change in DOSBox source.
Edit ~/src/dosbox-3858/src/hardware/voodoo_vogl.h and add the line below:

typedef Bit32s INT32;

Everything is done. So proceed with typical DOSBox build flow.

$ ./autogen.sh
$ ./configure
$ make clean
$ make

And enjoy!

Attachments

Reply 53 of 72, by Sheriff Hobbes

User metadata
Rank Newbie
Rank
Newbie

Thank you very much for that detailed instructions. They went well. 😀
How do I create my "complete" DOSBox SVN now?
I have a dosbox executable which is 15.4 Megs in size and I can run it. But where are the other files I usually get with a full download for Windows, like dosbox.conf and especially the glide files?
Or is the Voodoo support completely integrated in this big dosbox executable?
(I can't test it right now since I only have a virtual machine)

Marriage is a three ring circus:
-engagement ring
-wedding ring
-suffering

H. L. Mencken

Reply 54 of 72, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

My dosbox build is ~2.8MB out right, and 2.6M after strip. I am not sure how you can end up in such a huge binary. Perhaps, your GNU gcc toolchain setup default to static linkage. I am not into dosbox packaging for distribution. If you build it out from source, then you already have everything. When DOSBox was 1st invoked, it will create dosbox-SVN.conf in ~/.dosbox. You can copy and rename it to dosbox.conf.

Reply 55 of 72, by Sheriff Hobbes

User metadata
Rank Newbie
Rank
Newbie

All my 3Dfx-Games fail. They stop with errors like "missing dll". They all work under Windows.

Marriage is a three ring circus:
-engagement ring
-wedding ring
-suffering

H. L. Mencken

Reply 56 of 72, by kjliew

User metadata
Rank Oldbie
Rank
Oldbie

I don't have a lot of 3Dfx DOS games to test. I only have Tomb Raider 1. And for that, all I need is the official 3Dfx patch which has GLIDE2X.OVL statically linked within the EXE.

When you said that they all work under Windows, I presume that you mean the WIN32 version of DOSBox. Most likely, your WIN32 DOSBox has gulikoza glide passthrough support for 3Dfx, because statically linked EXE doesn't work for glide passthrough. Gulikoza provides his own copy of GLIDE2X.OVL for 3Dfx DOS games within DOSBox.

Check out this thread 3dfx voodoo chip emulation and download the real GLIDE2X.OVL for your 3Dfx DOS games, if they require one.

Reply 57 of 72, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

I noticed that this patch doesn't add the configuration entries under the [pci] section in the conf file, it just adds the empty section. So I updated it and corrected some lines that changed since r3825, it works with r4006 now:

Filename
voodoo_linux_r4006.diff
File size
323.76 KiB
Downloads
324 downloads
File license
Fair use/fair dealing exception

I also added the changes to the file voodoo_vogl.h, so you can run this patch against a fresh checkout of the source code without having to modify nothing more besides the GL.h (which I didn't include in the patch because it might differ between the various linux distros).

My full-featured DOSBox SVN builds for Windows & Linux: Vanilla DOSBox and DOSBox ECE (Google Drive Mirror)

Reply 58 of 72, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Thanks

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 59 of 72, by aaronp

User metadata
Rank Newbie
Rank
Newbie
Yesterplay80 wrote:

I noticed that this patch doesn't add the configuration entries under the [pci] section in the conf file, it just adds the empty section. So I updated it and corrected some lines that changed since r3825, it works with r4006 now:

voodoo_linux_r4006.diff

I also added the changes to the file voodoo_vogl.h, so you can run this patch against a fresh checkout of the source code without having to modify nothing more besides the GL.h (which I didn't include in the patch because it might differ between the various linux distros).

Seems to segfault on radeonsi with output=opengl or openglnb. It works fine with surface or overlay, though Tomb Raider's performance is a little choppy.