VOGONS


Tutorial: dosbox with Glide under Linux

Topic actions

Reply 60 of 71, by Enverex

User metadata
Rank Newbie
Rank
Newbie

@Yesterplay80: Which GLIDE2X.OVL should be used with this patch?

EDIT: glide2x_emu.ovl renamed to glide2x.ovl seems to work. Albeit with lots of mode switching but that seems normal for the game. On that note, is there any way to keep scaling in play when using this? i.e. the way DOSBox normally works? With the output scaled up to match the original screen resolution, rather than changing to the actual resolution of the game? (which can be pretty low, e.g. 320x240).

Reply 61 of 71, by inukaze

User metadata
Rank Newbie
Rank
Newbie

Hi there, i try to follow the tutorial -> https://wiki.ubuntuusers.de/Archiv/Spiele/DOSBox_mit_Glide/
But when i try to patch, this ask me which file i want to patch

$ cat dosbox_glide.diff | patch -p0 
can't find file to patch at input line 53
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|DOSBox Glide patch.
|
|From: gulikoza <gulikoza@si-gamer.net>
|
|Add Glide support.
|
|Author: gulikoza (http://vogons.zetafleet.com/viewtopic.php?t=16462)
|
|Changes:
| - configurable splash screen
| - support multiple buffer locks (eg: back + depth) (Extreme Assault)
| - increase available LFB memory
| - fix Tie Break Tennis init
| - fix Unreal GPF
|
|Previous versions:
| - 2012/06/08: Fix grTexClampMode (thanks robertmo!)
| - 2011/08/03: Fix polygon rendering
| - 2010/10/27: Add Pył support, fix grLFBRead/WriteRegion
| - 2009/11/24: Fix some minor issues, add MacOSX support (!)
| - 2009/10/09: Various fixes and code cleanups, fix originlocation + splash screen
| - 2009/08/30: Fix LFB operations when paging is active
| - 2009/06/04: Updated for 0.73, add MSVC6 projects for glide2x win9x build
| - 2008/09/14: Updated for current CVS, allow disabling LFB reads/writes
| - 2008/02/17: Updated for current CVS
| - 2007/11/06: Improve TR shadow support (gidierre)
| - 2007/10/18: Add TombRaider shadow hack (thanks gidierre!)
| - 2007/09/03: Fix a crash when closing dosbox while glide is active
| - 2007/08/28: x86_64 support
| - 2007/08/23: Fix buffer overflow
| - 2007/08/22: Fix compilation problems
|
|TODO:
| - threading (?)
|---
| 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
| 9 files changed, 2520 insertions(+), 4 deletions(-)
| create mode 100644 include/glide.h
| create mode 100644 include/glidedef.h
| create mode 100644 src/hardware/glide.cpp
|
|diff --git a/configure.ac b/configure.ac
|--- configure.ac
|+++ configure.ac
--------------------------
File to patch:
Skip this patch? [y]
Show last 29 lines
Skipping patch.
1 out of 1 hunk ignored
The next patch would create the file include/glide.h,
which already exists! Assume -R? [n] y
patching file include/glide.h
The next patch would create the file include/glidedef.h,
which already exists! Assume -R? [n] y
patching file include/glidedef.h
can't find file to patch at input line 585
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/mem.h b/include/mem.h
|--- include/mem.h
|+++ include/mem.h
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 597
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/dosbox.cpp b/src/dosbox.cpp
|--- src/dosbox.cpp
|+++ src/dosbox.cpp
--------------------------
File to patch:

i am trying to patch dosbox 0.73 source code.
Someone have a patch version for the official dosbox 0.74 source code to enable glide support ???

Reply 62 of 71, by MastaG

User metadata
Rank Newbie
Rank
Newbie

For 0.74 and later versions there's the voodoo chip emulation patch which doesn't require an external glide wrapper.
See: VIDEO - 3dfx voodoo emulation (SDL1)
I haven't tried it yet.

But I'd really like to see an updated version of gulikoza's 3dfx patch for newer versions of dosbox though.
I've used it in the past with openglide on linux and it worked great for Carmageddon 😀

Reply 63 of 71, by Enverex

User metadata
Rank Newbie
Rank
Newbie

The post in response to the one you've linked seems to imply that it still requires additional files and didn't really seem usable.

I'll double check what I'm using because I'm pretty sure my custom hacked-together version of DOSBox supports 3DFX and works OK.

Reply 64 of 71, by realnc

User metadata
Rank Member
Rank
Member
kjliew wrote on 2014-06-09, 17:44:
Next, we need to resolve the OpenGL includes inconsistency between MinGW and Linux. I am using Ubuntu. If you are on different d […]
Show full quote

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

Instead of copying and modifying a system header, you could just modify voodoo_vogl.h like this and thus have the same patch for both Linux and Windows:

--- a/src/hardware/voodoo_vogl.h
+++ b/src/hardware/voodoo_vogl.h
@@ -21,6 +21,13 @@
#define DOSBOX_VOODOO_VOGL_H

#include <SDL/SDL.h>
+#ifndef _WIN32
+ #define GL_ARB_multitexture
+ #include <GL/gl.h>
+ #undef GL_ARB_multitexture
+ #include "config.h"
+ typedef Bit32s INT32;
+#endif
#include <SDL/SDL_opengl.h>


Reply 66 of 71, by realnc

User metadata
Rank Member
Rank
Member

There's a bug in this patch. In src/hardware/voodoo_interface.cpp, this:

RENDER_SetSize(v->fbi.width, v->fbi.height, 16, vdraw.vfreq, 4.0/3.0, false, false);

should be:

RENDER_SetSize(v->fbi.width, v->fbi.height, 16, 1000.0f / vdraw.vfreq, 4.0/3.0, false, false);

RENDER_SetSize() takes FPS as parameter, not frame time.

Reply 67 of 71, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

I just updated kjliews patch with those three fixes. Thanks, realnc!

Btw.: How many threads about Voodoo patches are there in the DOSBox section, actually? While searching I found at least three now. 😀

Attachments

My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)

Reply 70 of 71, by Yesterplay80

User metadata
Rank Oldbie
Rank
Oldbie

It's already applied. 😉 I stumbled over it in one of the other threads.

My full-featured DOSBox SVN builds (without debugger) for Windows: Vanilla DOSBox and DOSBox ECE (Enhanced Community Edition)

Reply 71 of 71, by Stiletto

User metadata
Rank l33t
Rank
l33t
kjliew wrote on 2020-05-05, 22:29:

Thanks for the solution.

Have you guys looked into merging code from modern MAME back into kekko's patch? My understanding is when MAME developer tedgreen came along to work on Midway Seattle, etc. hardware he made a number of changes and updates, adding support for newer chips, etc. I'm not sure what would change but you never know.
https://github.com/mamedev/mame/blob/master/s … eo/vooddefs.ipp
https://github.com/mamedev/mame/blob/master/s … ideo/voodoo.cpp
https://github.com/mamedev/mame/blob/master/s … /video/voodoo.h
https://github.com/mamedev/mame/blob/master/s … /voodoo_pci.cpp
https://github.com/mamedev/mame/blob/master/s … eo/voodoo_pci.h
https://github.com/mamedev/mame/blob/master/s … voodoo_rast.ipp
License on this code remains the same, 3-clause BSD, compatible with any GPLv2 project.

The same goes the other way - if there was some fix to kekko's emulation that's accurate and could be upstreamed, MAMEdev would be interested. Tho different developers than Aaron Giles would likely be involved these days.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto