VOGONS


Openglide on MacOS X

Topic actions

  • This topic is locked. You cannot reply or edit posts.

First post, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

to move the discussion of the dosbox glide patch to the right discussion... 😀
When I start Dosbox, with the [glide]glide=true in the config, Dosbox crashes with

Glide:LFB access: read-write
Bus error

I guess I need to change the grport. But to what?

Just for the record, this is under OS X 10.6.1 😀 AND I've been using the CVS of Dosbox.
I'm attaching the error report, maybe this helps...

Attachments

  • Filename
    dosboxerror.txt
    File size
    30.09 KiB
    Downloads
    759 downloads
    File license
    Fair use/fair dealing exception

Reply 3 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Hmm, I just commented out the the whole thing in clock.cpp and then had to comment out ClockFreq = ClockFrequency( ); in glutil.cpp as well.
Now 3DFX Tomb Raider exits with the message "No PCI bus detected"
At least something, neither Dosbox nor Tomb Raider crashed 😀

console output:

CONFIG:Loading primary settings from config file /users/dominus/library/preferences/DOSBox 0.73 Preferences CONFIG:Loading addit […]
Show full quote

CONFIG:Loading primary settings from config file /users/dominus/library/preferences/DOSBox 0.73 Preferences
CONFIG:Loading additional settings from config file /users/dominus/documents/dosbox/tomb.conf
MIDI:Opened device:coremidi
Glide:LFB access: read-write
Glide:GLIDE_PageHandler installed at 0x60000000 (384 pages)
One joystick reported, initializing with 4axis
Using joystick Adaptoid with 2 axes, 14 buttons and 0 hat(s)

Reply 4 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

That means it is loading the original 3dfx glide2x.ovl not the dosbox modified one. Put the dosbox glide2x.ovl in the game directory. Make sure it matches the version of the patch (if you got the patch from this thread, take the ovl as well)

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

Reply 5 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I have ONLY the glide2x.ovl from the first post of this thread on my system. I even copied the one from the debug folder in the zip and get the following log:

--------------------------------------------------------
OpenGLide Log File
--------------------------------------------------------
***** OpenGLide 0.09rc9 *****
--------------------------------------------------------
Date: 21 Oct 2009
Time: 16:26:32
--------------------------------------------------------
--------------------------------------------------------
Clock Frequency: 0.00 Mhz
--------------------------------------------------------
--------------------------------------------------------
Configuration file is OpenGLid.ini
--------------------------------------------------------
Time: 16:27:14
--------------------------------------------------------

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

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Oops my answer got lost...

Ok, I found the correct Tomb Raider patch (I didn't know there were two voodoo patches, I got the first one from the eidos pages).
Tomb Raider starts now, but after the videos, when it starts to render it crashes again with a bus error.
Console looks like this:

Glide:Activated
Bus error

Same happens with Lands of Lore 2.
Attached again the apple error log (don't wonder, I named the openglided dosbox, glidebox)

Attachments

  • Filename
    glidebox.txt
    File size
    29.16 KiB
    Downloads
    712 downloads
    File license
    Fair use/fair dealing exception

Reply 8 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

It seems to crash in openglide again. Perhaps you can activate the logging (uncomment #define OGL_ALL in GlOgl.h, recompile and then post the contents of Openglid.log). Maybe add some more logging in grSstWinOpen() to see exactly where it crashes. I'm afraid grSstWinOpen + 181 doesn't tell me too much 😀

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

Reply 9 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

grGlideInit( )
Configuration file is OpenGLid.ini
grSstQueryHardware( --- )
grSstSelect( 0 )

is what I get after that.

Maybe add some more logging in grSstWinOpen() to see exactly where it crashes.

That's where my knowledge ends. I have no idea how to do that. Sorry...

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 10 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Just add a couple of those GlideMsg() calls. It behaves just like printf and the message should end in openglid.log. You can add messages like:

GlideMsg("Here");
...
GlideMsg("Still here");
...

and try to figure out where exactly it crashes 😁

Since there is no grSstWinOpen message, I assume it crashes before or somewhere in InitWindow().

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

Reply 13 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Really except for doing simple tasks I'm lost in code.
I have no idea where in that code I should throw in some GlideMsg();
When I try I only make Dosbox crash with a "Glide:grSstWinOpen failed!" before the Bus Error, but not with an entry in Openglide. I'm really sorry for being that slow but I need some holding hands now 😀
Could you give me an example of where and how in grSstWinOpen() I should enter some glidemsg()?

Reply 14 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

Ok, first let's try to copy the existing

GlideMsg( "grSstWinOpen( %d, %d, %d, %d, %d, %d, %d )\n",
hwnd, res, ref, cformat, org_loc, num_buffers, num_aux_buffers );

to the top of the function (line 249) so that we can see what parameters get passed. I still don't see where the code could crash with a null pointer dereference if the parameters are sane. So you could just add a simple

GlideMsg("1"); (increment the counter later)

after every line of code (just until before the original GlideMsg( "grSstWinOpen...") we know it doesn't come that far). The code after the last msg will be the problem 😀

If some moderator has some time, perhaps these last few posts could be split into a seperate topic Openglide on OS X in the Openglide development forum 😀

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

Reply 15 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

grSstQueryHardware( --- )
grSstSelect( 0 )
grSstWinOpen( 0, 7, 0, 0, 0, 2, 1 )

is the output in the log when I just copy the glidemsg from your post there.
I'll see about the other stuff either tonight or tomorrow, now I gotta go 😀

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 17 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Thanks, HunterZ.
@gulikoza

OpenGL.WindowWidth  = Glide.WindowWidth;
OpenGL.WindowHeight = Glide.WindowHeight;
Glide.WindowTotalPixels = Glide.WindowWidth * Glide.WindowHeight;

OpenGL.WaitSignal = (int)( 1000 / OpenGL.Refresh );

After that it breaks. Anything I can do now?

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 18 of 69, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

It crashes after these lines? Then it must be InitWindow. Perhaps you can add some msg lines in InitWindow()? Also just below the InitialiseOpenGLWindow() in Glide.cpp (line 79), you can add:

	
if(glGetString( GL_RENDERER ) == NULL) {
GlideMsg( "glGetString( GL_RENDERER ) returned NULL!");
return false;
}

if ( !strcmp( (char*)glGetString( GL_RENDERER ), "GDI Generic" ) )
ReportWarning("You are running in a Non-Accelerated OpenGL!!!\nThings can become really slow");

That strcmp might crash if it comes that far and OpenGL wasn't initialized properly.

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

Reply 19 of 69, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Perhaps you can add some msg lines in InitWindow()?

Already did, nothing happens in there...

Also just below the InitialiseOpenGLWindow() in Glide.cpp (line 79), you can add

Hmm, doesn't seem to come that far, the log says the same:

grGlideInit( )
Configuration file is OpenGLid.ini
grSstQueryHardware( --- )
grSstSelect( 0 )
grSstWinOpen( 0, 7, 0, 0, 0, 2, 1 )
6789

(the last lines are the glide msg from grSstWinOpen())

Just for making sure, when compiling I get the following warnings:

grguDepth.cpp: In function ‘void grDepthBufferMode(GrDepthBufferMode_t)’:
grguDepth.cpp:85: warning: deprecated conversion from string constant to ‘char*’
grguDepth.cpp: In function ‘void grDepthMask(FxBool)’:
grguDepth.cpp:106: warning: deprecated conversion from string constant to ‘char*’
grguDepth.cpp: In function ‘void grDepthBufferFunction(GrCmpFnc_t)’:
grguDepth.cpp:131: warning: deprecated conversion from string constant to ‘char*’
grguDepth.cpp: In function ‘void grDepthBiasLevel(FxI16)’:
grguDepth.cpp:163: warning: deprecated conversion from string constant to ‘char*

...

grguMisc.cpp: In function ‘void grCullMode(GrCullMode_t)’:
grguMisc.cpp:78: warning: deprecated conversion from string constant to ‘char*’

...

grguSstGlide.cpp: In function ‘FxBool grSstWinOpen(FxU, GrScreenResolution_t, GrScreenRefresh_t, GrColorFormat_t, GrOriginLocation_t, int, int)’:
grguSstGlide.cpp:391: warning: deprecated conversion from string constant to ‘char*’
grguSstGlide.cpp: In function ‘void grSstOrigin(GrOriginLocation_t)’:
grguSstGlide.cpp:571: warning: deprecated conversion from string constant to ‘char*’
grguSstGlide.cpp: In function ‘void grSstIdle()’:
grguSstGlide.cpp:703: warning: deprecated conversion from string constant to ‘char*’

....

grguTex.cpp: In function ‘void grTexClampMode(GrChipID_t, GrTextureClampMode_t, GrTextureClampMode_t)’:
grguTex.cpp:207: warning: deprecated conversion from string constant to ‘char*’
grguTex.cpp: In function ‘void grTexFilterMode(GrChipID_t, GrTextureFilterMode_t, GrTextureFilterMode_t)’:
grguTex.cpp:280: warning: deprecated conversion from string constant to ‘char*’
grguTex.cpp: In function ‘void grTexMipMapMode(GrChipID_t, GrMipMapMode_t, FxBool)’:
grguTex.cpp:310: warning: deprecated conversion from string constant to ‘char*’

...

grguLfb.cpp: In function ‘FxBool grLfbReadRegion(GrBuffer_t, FxU32, FxU32, FxU32, FxU32, FxU32, void*)’:
grguLfb.cpp:237: warning: deprecated conversion from string constant to ‘char*’
grguLfb.cpp: In function ‘FxBool grLfbWriteRegion(GrBuffer_t, FxU32, FxU32, GrLfbSrcFmt_t, FxU32, FxU32, FxI32, void*)’:
grguLfb.cpp:297: warning: deprecated conversion from string constant to ‘char*’

...

GLRender.cpp: In function ‘void RenderUpdateArrays()’:
GLRender.cpp:129: warning: deprecated conversion from string constant to ‘char*’
GLRender.cpp: In function ‘void RenderDrawTriangles()’:
GLRender.cpp:330: warning: deprecated conversion from string constant to ‘char*’
GLRender.cpp: In function ‘void RenderAddTriangle(const GrVertex*, const GrVertex*, const GrVertex*, bool)’:
GLRender.cpp:712: warning: deprecated conversion from string constant to ‘char*’
GLRender.cpp: In function ‘void RenderAddLine(const GrVertex*, const GrVertex*, bool)’:
GLRender.cpp:1197: warning: deprecated conversion from string constant to ‘char*’
GLRender.cpp: In function ‘void RenderAddPoint(const GrVertex*, bool)’:
GLRender.cpp:1567: warning: deprecated conversion from string constant to ‘char*’

...

libtool: compile:  /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I/opt/local/include -I /usr/local/include/openglide/ -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -I/usr/include -arch i386 -mmmx -D__unix__ -D__linux__ -I./platform/linux -MT FormatConversion.lo -MD -MP -MF .deps/FormatConversion.Tpo -c FormatConversion.cpp  -fno-common -DPIC -o .libs/FormatConversion.o
/var/folders/zd/zd2LYc3pEZup1o0dxuhWVU+++TI/-Tmp-//ccOhPHaV.s:113:Alignment too large: 15. assumed.
/var/folders/zd/zd2LYc3pEZup1o0dxuhWVU+++TI/-Tmp-//ccOhPHaV.s:141:Alignment too large: 15. assumed.
/var/folders/zd/zd2LYc3pEZup1o0dxuhWVU+++TI/-Tmp-//ccOhPHaV.s:173:Alignment too large: 15. assumed.
/var/folders/zd/zd2LYc3pEZup1o0dxuhWVU+++TI/-Tmp-//ccOhPHaV.s:205:Alignment too large: 15. assumed.
/var/folders/zd/zd2LYc3pEZup1o0dxuhWVU+++TI/-Tmp-//ccOhPHaV.s:233:Alignment too large: 15. assumed.

...

grguBuffer.cpp: In function ‘void grBufferClear(GrColor_t, GrAlpha_t, FxU16)’:
grguBuffer.cpp:74: warning: deprecated conversion from string constant to ‘char*’
grguBuffer.cpp: In function ‘void grBufferSwap(int)’:
grguBuffer.cpp:112: warning: deprecated conversion from string constant to ‘char*’
grguBuffer.cpp: In function ‘void grRenderBuffer(GrBuffer_t)’:
grguBuffer.cpp:150: warning: deprecated conversion from string constant to ‘char*’

...

grguColorAlpha.cpp: In function ‘void grDitherMode(GrDitherMode_t)’:
grguColorAlpha.cpp:49: warning: deprecated conversion from string constant to ‘char*’
grguColorAlpha.cpp: In function ‘void grColorMask(FxBool, FxBool)’:
grguColorAlpha.cpp:109: warning: deprecated conversion from string constant to ‘char*’
grguColorAlpha.cpp: In function ‘void grAlphaTestReferenceValue(GrAlpha_t)’:
grguColorAlpha.cpp:296: warning: deprecated conversion from string constant to ‘char*’
grguColorAlpha.cpp: In function ‘void grAlphaTestFunction(GrCmpFnc_t)’:
grguColorAlpha.cpp:322: warning: deprecated conversion from string constant to ‘char*’
grguColorAlpha.cpp: In function ‘void grAlphaBlendFunction(GrAlphaBlendFnc_t, GrAlphaBlendFnc_t, GrAlphaBlendFnc_t, GrAlphaBlendFnc_t)’:
grguColorAlpha.cpp:424: warning: deprecated conversion from string constant to ‘char*’
grguColorAlpha.cpp: In function ‘void grGammaCorrectionValue(float)’:
grguColorAlpha.cpp:570: warning: deprecated conversion from string constant to ‘char*’

...

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