Tutorial: dosbox with Glide under Linux

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Re: Tutorial: dosbox with Glide under Linux

Postby Dominus » 2011-1-15 @ 15:53

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.
User avatar
Dominus
DOSBox Moderator
 
Posts: 7595
Joined: 2002-10-03 @ 09:54
Location: Vienna or Ludwigsburg

Re: Tutorial: dosbox with Glide under Linux

Postby Orka Borka » 2011-1-15 @ 16:27

@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.
Orka Borka
Newbie
 
Posts: 32
Joined: 2008-2-08 @ 17:58

Re: Tutorial: dosbox with Glide under Linux

Postby MadDin » 2012-1-15 @ 19:32

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... :lol:
MadDin
Newbie
 
Posts: 7
Joined: 2010-12-23 @ 22:37

Re: Tutorial: dosbox with Glide under Linux

Postby arromdee3 » 2012-10-27 @ 01:49

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.)
arromdee3
Newbie
 
Posts: 49
Joined: 2003-12-01 @ 17:52

Re: Tutorial: dosbox with Glide under Linux

Postby Gamecollector » 2012-10-27 @ 05:07

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).
User avatar
Gamecollector
Oldbie
 
Posts: 1295
Joined: 2010-10-06 @ 22:17

Re: Tutorial: dosbox with Glide under Linux

Postby arromdee3 » 2012-10-30 @ 03:54

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.)
arromdee3
Newbie
 
Posts: 49
Joined: 2003-12-01 @ 17:52

Re: Tutorial: dosbox with Glide under Linux

Postby Sheriff Hobbes » 2014-6-05 @ 05:56

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

Code: Select all
 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:

Code: Select all
 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
User avatar
Sheriff Hobbes
Newbie
 
Posts: 54
Joined: 2009-4-17 @ 06:58

Re: Tutorial: dosbox with Glide under Linux

Postby Dominus » 2014-6-05 @ 06:44

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.
User avatar
Dominus
DOSBox Moderator
 
Posts: 7595
Joined: 2002-10-03 @ 09:54
Location: Vienna or Ludwigsburg

Re: Tutorial: dosbox with Glide under Linux

Postby Sheriff Hobbes » 2014-6-06 @ 04:44

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

Code: Select all
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
User avatar
Sheriff Hobbes
Newbie
 
Posts: 54
Joined: 2009-4-17 @ 06:58

Re: Tutorial: dosbox with Glide under Linux

Postby gulikoza » 2014-6-06 @ 13:23

Most patches are made to be used with -p1.
User avatar
gulikoza
Oldbie
 
Posts: 1704
Joined: 2004-6-25 @ 14:53

Re: Tutorial: dosbox with Glide under Linux

Postby kjliew » 2014-6-07 @ 06:43

You can get the clean patch of kekko voodoo1 emulation against SVN r3858 here:
viewtopic.php?f=31&t=35814&p=347552#p347552

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.
kjliew
Member
 
Posts: 185
Joined: 2004-1-08 @ 03:03

Re: Tutorial: dosbox with Glide under Linux

Postby Sheriff Hobbes » 2014-6-07 @ 13:10

Ok, I downloaded an 3858-snapshot from here http://sourceforge.net/p/dosbox/code-0/ ... sbox/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
User avatar
Sheriff Hobbes
Newbie
 
Posts: 54
Joined: 2009-4-17 @ 06:58

Re: Tutorial: dosbox with Glide under Linux

Postby kjliew » 2014-6-09 @ 17:44

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:
Code: Select all
$ 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.
Code: Select all
$ 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.
Code: Select all
-#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:
Code: Select all
typedef Bit32s INT32;


Everything is done. So proceed with typical DOSBox build flow.
Code: Select all
$ ./autogen.sh
$ ./configure
$ make clean
$ make


And enjoy!
Attachments
voodoo_patch_dosbox-3858.txt
(323.2 KiB) Downloaded 256 times
kjliew
Member
 
Posts: 185
Joined: 2004-1-08 @ 03:03

Re: Tutorial: dosbox with Glide under Linux

Postby Sheriff Hobbes » 2014-6-10 @ 05:37

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
User avatar
Sheriff Hobbes
Newbie
 
Posts: 54
Joined: 2009-4-17 @ 06:58

Re: Tutorial: dosbox with Glide under Linux

Postby kjliew » 2014-6-10 @ 21:38

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.
kjliew
Member
 
Posts: 185
Joined: 2004-1-08 @ 03:03

Re: Tutorial: dosbox with Glide under Linux

Postby Sheriff Hobbes » 2014-6-11 @ 04:52

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
User avatar
Sheriff Hobbes
Newbie
 
Posts: 54
Joined: 2009-4-17 @ 06:58

Re: Tutorial: dosbox with Glide under Linux

Postby kjliew » 2014-6-11 @ 18:09

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 viewtopic.php?f=32&t=25606&start=100#p198624 and download the real GLIDE2X.OVL for your 3Dfx DOS games, if they require one.
kjliew
Member
 
Posts: 185
Joined: 2004-1-08 @ 03:03

Re: Tutorial: dosbox with Glide under Linux

Postby Yesterplay80 » 2017-2-08 @ 10:40

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
(323.76 KiB) Downloaded 93 times


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 (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)
User avatar
Yesterplay80
Member
 
Posts: 317
Joined: 2016-2-23 @ 11:02
Location: Germany

Re: Tutorial: dosbox with Glide under Linux

Postby Dominus » 2017-2-08 @ 10:48

Thanks
User avatar
Dominus
DOSBox Moderator
 
Posts: 7595
Joined: 2002-10-03 @ 09:54
Location: Vienna or Ludwigsburg

Re: Tutorial: dosbox with Glide under Linux

Postby aaronp » 2017-2-12 @ 06:57

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.
aaronp
Newbie
 
Posts: 5
Joined: 2016-10-16 @ 19:32

PreviousNext

Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 4 guests