VOGONS


First post, by Rainmak3r

User metadata
Rank Newbie
Rank
Newbie

Hi all,

I searched the whole forum to see if this subject has already been discussed, but I couldn't find anything explicitely related.

I'm trying the Linux build of ykhwong's Dosbox CVS, since I'm interested in its Glide functionality. The game I'm experimenting with is Tomb Raider, since it should be well supported (even if my aim is managing to play Redguard once done), on Fedora 7 and with a GeForce 5200 FX. However, before trying any game, I'm testing the functionality with the "3dfx Glide2 & Glide3 Diagnostics Kit" test utilities.

As far as I've understood by reading around, customized glide2x.ovl/.dll files are needed in the windows build. I managed to get both the files from the windows build (the .ovl file from the virtual Z: folder through Wine) and copied them to the game folder (in this case, the folder with the test executables). But of course the glide=true option only gets enabled in Linux if the libglide2x.so shared object is found...

Without much hope I first tried with the true libglide2x.so (Glide_VG-2.46-5.i686 package), which obviously made dosbox crash since I don't actually have a 3dfx card... I also tried linking it to one of the glide-related shared objects I have installed (e.g. /usr/lib/libglide3-v2.so), but then dosbox complains about undefined symbols:

Glide:Invalid glide call: /usr/lib/libglide2x.so: undefined symbol: grSstQueryHardware
gd error (glide): grSstSelect: non-existent SSTGlide:Resolution set to:640x480, LFB at 0x216000
Glide:GLIDE_PageHandler installed for 0x216000 (534 + 150 pages)

and then nothing happens, the emulation just proceeds without crashing.

Is a wrapping libglade2x.so, as the glide2x.dll is a wrapper in the windows build, needed for the Linux build as well? or am I just doing something wrong? In case it is needed, where can I find such wrapper? I already tried looking around, but I couldn't find anything useful...

Thanks in advance for any help you'll be able to provide me, hope to hear from you soon.

Reply 1 of 16, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

The ovl file is platform independent (it runs inside dosbox, so it can be on Z: ), but libglide2x should be a wrapper (unless you have a real voodoo card...although I only tested this with windows98 😀). I'm not sure how many linux wrappers exist, but at least one does and has been tested to work: OpenGlide. Be sure to build SDL version though (you might need to fiddle with the Makefiles), also, search for the functions with the __fastcall calling convention and remove it (the __fastcall keyword, function stays 😀)

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

Reply 3 of 16, by Rainmak3r

User metadata
Rank Newbie
Rank
Newbie

Wow works like a charm, thank you!

It took me a while to understand that I needed the CVS version of openglide (the zips on the site are old and no Makefile in them), but then I managed to compile the SDL version as you suggested.

The 3dfxdiagnostic tests work fine,but they freeze dosbox when pressing 'A' to leave them: Tomb Raider, instead, works very well and quits fine.

Now I only have to get back the Redguard CDs I lent to a friend of mine and cross my fingers 😀

Thanks again, cheers!

Reply 4 of 16, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Sorry, I forgot to mention cvs is needed 😀
I have actually started to prepare some patches for openglide to improve the build process (and include some performance fixes), but haven't had the time to finish them yet...
RedGuard should work fine, but if it doesn't start, try running it with a low cycle count (say 10.000-15.000 cycles) and increase the cycles when the loading screen appears...

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

Reply 5 of 16, by Rainmak3r

User metadata
Rank Newbie
Rank
Newbie

I read about the low cycles when loading in some old discussions about Redguard. However, I didn't need to do it, I left cycles=auto and just had to set the memsize to a high value (I've chosen 64 MB) and all went fine.

All the intro videos play well, while the game, even if good looking, is really slow (kind of 0.5 fps, I guess). I don't know if this is normal: the linux build is almost an year older than the windows one, so probably much has changed in the meanwhile...

Reply 7 of 16, by Rainmak3r

User metadata
Rank Newbie
Rank
Newbie

I just tried the patch, and there are two results:

1) now I can see the static background image while loading the scene after the videos, which was missing before;
2) but after the loading process, I just see a pink block! nothing else... even if I can hear the game running in the background (specifically the two pirates beating me 😀 )

Reply 10 of 16, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Well...Windows version seems to work and my linux is a mess 😜 I can't really get opengl to work...but...
I have just released the sources of my patch. Try compiling your own dosbox version (the ykhwong's linux version is quite old...it is possible that the ovl file and dosbox got out of sync 😀)

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

Reply 11 of 16, by Rainmak3r

User metadata
Rank Newbie
Rank
Newbie

Hi,

sorry for my late answer, I missed your reply... thanks for releasing your sources!

I just finished compiling your latest CVS, dated 23-06-07. In order to be of help to others who might want to accomplish this under linux, I had to make the following things before:

  • 1) I removed any reference to hq2x_d3d, since there's no Direct3D in linux;

    2) I renamed ScalingEffect.* to scalingeffect.*, because otherwise the compilation would complain (in linux files are case-sensitive);

    3) I had to make use of gcc/g++3.4, because 4.1 was complaining about some asm commands.

However, how do I enable glide emulation? Is it enabled by default or is there some line I have to add to dosbox.conf as it works in ykhwong's build?
I just tried the 3dfx diagnostic tests and they do nothing: I start the test by pressing the 'A' key, and it does nothing; then when I press a key (that is how you exit the test when it's running) the console becomes active again. I had this behaviour when testing your windows executable with Wine as well.

Hope to hear you soon, thanks in advance!

Reply 14 of 16, by Rainmak3r

User metadata
Rank Newbie
Rank
Newbie

Yes, this is the exact error it gives me when compiling with 4.1:

if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT file.o -MD […]
Show full quote

if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT file.o -MD -MP -MF ".deps/file.Tpo" -c -o file.o file.cpp; \
then mv -f ".deps/file.Tpo" ".deps/file.Po"; else rm -f ".deps/file.Tpo"; exit 1; fi
../../include/structures.h:154: warning: ‘packed’ attribute ignored for field of type ‘MT32Emu::TimbreParam [8]’
../../include/structures.h:156: warning: ‘packed’ attribute ignored for field of type ‘MT32Emu::PatchParam [128]’
if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT i386.o -MD -MP -MF ".deps/i386.Tpo" -c -o i386.o i386.cpp; \
then mv -f ".deps/i386.Tpo" ".deps/i386.Po"; else rm -f ".deps/i386.Tpo"; exit 1; fi
../../include/structures.h:154: warning: ‘packed’ attribute ignored for field of type ‘MT32Emu::TimbreParam [8]’
../../include/structures.h:156: warning: ‘packed’ attribute ignored for field of type ‘MT32Emu::PatchParam [128]’
i386.cpp: In function ‘float MT32Emu::iir_filter_sse(float, float*, float*)’:
i386.cpp:142: error: unknown register name ‘xmm3’ in ‘asm’
i386.cpp:142: error: unknown register name ‘xmm2’ in ‘asm’
i386.cpp:142: error: unknown register name ‘xmm1’ in ‘asm’
make[3]: *** [i386.o] Error 1

The error disappears if I make use of 3.4 instead.

Besides, there are another couple of issues I forgot to report in the previous mail:

1) the attached configure script doesn't have executable permissions, it must be made executable with a 'chmod +x' in order to work;

2) there's a typeless size variable in drive_physfs.cpp:

if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT drive_physf […]
Show full quote

if g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -g -O2 -MT drive_physfs.o -MD -MP -MF ".deps/drive_physfs.Tpo" -c -o drive_physfs.o drive_physfs.cpp; \
then mv -f ".deps/drive_physfs.Tpo" ".deps/drive_physfs.Po"; else rm -f ".deps/drive_physfs.Tpo"; exit 1; fi
drive_physfs.cpp: In constructor ‘physfsFile::physfsFile(const char*, PHYSFS_file*, Bit16u, const char*, bool)’:
drive_physfs.cpp:648: error: ‘size’ was not declared in this scope

Changing line 648 to

Bit32u size=(Bit32u)PHYSFS_fileLength(fhandle);

fixes the problem.

With these changes, it seems to work fine! Of course I didn't test it thoroughfully...

Reply 16 of 16, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

The MT32 error is due to a misdetection of SSE support. the code uses SSE assembler, but the compiler flags do not enable them. -march=pentium3, -msse or similar should do the trick, although the real bug is probably due to a wrong #define clause that doesn't recognize SSE is unsupported in that compile.