VOGONS


Various patches for OpenGlide

Topic actions

Reply 60 of 73, by Glidos

User metadata
Rank l33t
Rank
l33t
gulikoza wrote:
A few changes: […]
Show full quote

A few changes:

- fix a bug where lfb texture size is still assumed to be 1024 pixels (texture coordinates)
- use smallest possible lfb texture size *
- preserve window/fullscreen mode for SDL aplications (override config setting)

* hey wd, int_log2() incorrectly calculates size when the size is exactly pow 2. It will return 1024 when size is 512 for example 😉

Ok, sorted. Sorry about the delay.

Reply 61 of 73, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

The next problem I ran into was that bootstrap complained about missing /platform/windows/makefile.in.

platform/windows/Makefile.am is missing from the cvs repository. It was in my patch but apparently it wasn't added. Paul? 😀

AUTOMAKE_OPTIONS = foreign

noinst_LTLIBRARIES = libwindows.la

libwindows_la_SOURCES = \
clock.cpp \
error.cpp \
openglext.cpp \
library.cpp \
window.cpp \
\
platform/clock.h \
platform/error.h \
platform/openglext.h \
platform/window.h \
platform/windows/platform.h

http://www.si-gamer.net/gulikoza

Reply 62 of 73, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

thanks, I get a bit further now and fail with

Making all in sdl
/bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/usr/include -I/opt/local/include -mmmx -MT openglext.lo -MD -MP -MF .deps/openglext.Tpo -c -o openglext.lo openglext.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../.. -I/opt/local/include -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/usr/include -I/opt/local/include -mmmx -MT openglext.lo -MD -MP -MF .deps/openglext.Tpo -c openglext.cpp -fno-common -DPIC -o .libs/openglext.o
In file included from openglext.cpp:20:
../../platform/openglext.h:16:22: error: platform.h: No such file or directory
In file included from openglext.cpp:20:
../../platform/openglext.h:18: error: ‘ExtFn’ does not name a type
openglext.cpp:22: error: ‘ExtFn’ does not name a type
make[3]: *** [openglext.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

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 63 of 73, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Quite expected, Openglide does not have any support for OS X 😁
Linux version might compile, but then again it most probably won't. For starters, you can create a new option in configure.ac:

*darwin*)

and duplicate the code from linux. Make sure SDL is detected and used as I guess it has more chances it will work (SDL should put all other OS X specific libs...), maybe add LIBS="$LIBS -framework OpenGL" that's what dosbox does 😁

If it works, post the patch, I'm sure Paul will be happy to apply it 😀

http://www.si-gamer.net/gulikoza

Reply 64 of 73, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

he he, ok, I'll give it my best 😀

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 65 of 73, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

ok, some progress I guess...
I added to configure.ac:

*darwin*)
osflag="__linux__"
CXXFLAGS="$CXXFLAGS -D__unix__ -D$osflag -I\$(top_srcdir)/platform/linux $X_CFLAGS"
LIBS="$LIBS -lGL -lGLU"
if test x$have_sdl_lib != xyes ; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lXxf86vm"
fi
;;

And with the exports I use for building Dosbox in 32bit (CFLAGS='-O2 -arch i386' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-O2 -arch i386' MACOSX_DEPLOYMENT_TARGET='10.6' CXX='/usr/bin/g++-4.2' F90FLAGS='-O2 -m32' LDFLAGS='-L/opt/local/lib -arch i386 -O2' OBJC='/usr/bin/gcc-4.2' FCFLAGS='-O2 -m32' INSTALL='/usr/bin/install -c' OBJCFLAGS='-O2 -arch i386' FFLAGS='-O2 -m32' CC='/usr/bin/gcc-4.2')
I seem to have managed to build it.
I got
libglide2x.lai
libglide2x.la
libglide2x.a
libglide2x.dylib
libglide2x.0.dylib.dSYM.app
libglide2x.0.dylib

Now I only need to throw them where a patched dosbox will find them... 😀

Reply 66 of 73, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

A patched dosbox source fails in glide.cpp with

glide.cpp: In function ‘void process_msg(Bitu)’: glide.cpp:476: error: ‘MAX_PATH’ was not declared in this scope glide.cpp:774: […]
Show full quote

glide.cpp: In function ‘void process_msg(Bitu)’:
glide.cpp:476: error: ‘MAX_PATH’ was not declared in this scope
glide.cpp:774: error: ‘filename’ was not declared in this scope
make[4]: *** [glide.o] Error 1[/code]
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Not sure where I should continue with my error reporting now... in the dosbox glide patch thread or here... 😀

Last edited by Dominus on 2009-10-19, 23:04. Edited 1 time in total.

Reply 68 of 73, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Good news 😀. You can probably safely remove 'if test x$have_sdl_lib != xyes' and X_EXTRA_LIBS ... I doubt Xxf86vm exists anyway and that non SDL version will compile.

libglide2x.dylib is the dynamic library? Then you will have to add another line in glide.cpp, where it says load glide2x.dll (linux uses .so extension). The MAX_PATH seems a trivial issue, it is probably in some other include (dosbox uses it everywhere), perhaps you can just do #ifndef MAX_PATH #define MAX_PATH 4096 or something similar for now...

http://www.si-gamer.net/gulikoza

Reply 69 of 73, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

success!!! At least when I let the new compiled dosbox write a config it added the [glide] stuff to the config.
I added to glide.h
#ifndef MAX_PATH
#define MAX_PATH 4096
#endif

and changed the libglide.so to libglide.dylib in glide.cpp and it compiled. Could you add an if for darwin to use that on Mac?

@Glidos, could you add

*darwin*)
osflag="__linux__"
CXXFLAGS="$CXXFLAGS -D__unix__ -D$osflag -I\$(top_srcdir)/platform/linux $X_CFLAGS"
LIBS="$LIBS -lGL -lGLU"
;;

to configure.ac? Or do you need a patch (I'm not entirely sure how to do that) and if so, where do you need it, here or on the SF Openglide tracker?

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 70 of 73, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The MAX_PATH seems a trivial issue, it is probably in some other include (dosbox uses it everywhere)

Erm 4x is not really everywhere, and all those cases are guarded by
WIN32 ifdef checks (as it's part of the dirent implementation for cross
platform file search operations).
But 4096 should be a rather safe limit for testing purposes, in dosbox it
is set to 512 or so.

Reply 71 of 73, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

something other, can one make Wine use openglide? I googled a bit and found no direct information, except that it is possible...

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 72 of 73, by Sheriff Hobbes

User metadata
Rank Newbie
Rank
Newbie

I'm not a programmer or anything. Can somebody please tell me how to apply these patches? Here's what I did:
- downloaded openglide from http://openglide.cvs.sourceforge.net
- put the patches in the extracted source folder
- tried to start patching by typing patch -p1 < openglide-ac.diff

This is what I got:

patching file GlOgl.h Hunk #2 FAILED at 294. 1 out of 2 hunks FAILED -- saving rejects to file GlOgl.h.rej patching file Glide.c […]
Show full quote

patching file GlOgl.h
Hunk #2 FAILED at 294.
1 out of 2 hunks FAILED -- saving rejects to file GlOgl.h.rej
patching file Glide.cpp
Hunk #1 FAILED at 48.
1 out of 1 hunk FAILED -- saving rejects to file Glide.cpp.rej
The next patch would create the file Glide2x.def,
which already exists! Assume -R? [n]

Thanks,
SH

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

H. L. Mencken

Reply 73 of 73, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I think the patches ate already merged to openglide

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