Author Topic: Question regarding the openGL port?  (Read 14015 times)

0 Members and 1 Guest are viewing this topic.

Offline Gangsta

  • 22
Question regarding the openGL port?
I've found it in many places... one such place is ftp://ftp.sac.sk/pub/sac/pack/i5comp21.rar

 

Offline Inquisitor

Question regarding the openGL port?
One side note to a Linux build: Might generate a Linux server, which, for anyont who has run the current dedicated servers, knows is a bit of a bugaboo.

Thanks to penguin for uploading his source to CVS, now to figure out what  Iscrewed up when I made his account the first time :)
No signature.

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Question regarding the openGL port?
The ps2_open version won't build on non-x86 Linux. There's a little bit of assembly in windows_stubs/stubs.cpp in MulDiv(). Compiled with less warnings then the GCC Cygwin port until then though. Shouldn't be hard to replace that bit of assembly with C/C++ code, if you know what it's supposed to do. :)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
Question regarding the openGL port?
Quote
Originally posted by EdrickV
There's a little bit of assembly in windows_stubs/stubs.cpp in MulDiv(). Compiled with less warnings then the GCC Cygwin port until then though. Shouldn't be hard to replace that bit of assembly with C/C++ code, if you know what it's supposed to do. :)
Heh, it's pretty simple, I shoulda put a C version in if the arch is unknown.  Next patch :)  It never occurred to me that anyone would try to build on non-x86 this early in the game.  Shoulda known :o

Is this for the PS2?  What processor does it have?

Edit: added C version, will use asm if i386, else the machine-independent code.
« Last Edit: June 04, 2002, 01:29:46 am by 334 »
your source code slave

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Question regarding the openGL port?
The PS2 uses a modified MIPS 5900 along with it's specialty processors: The VPUs VPU0 and VPU1, the custom graphics system, and lots of other oddities. (VPU0 by default acts as a co-processor for the 5900.) Will try and update that version so I can try compiling it more. :D (I doubt it'll run, at the very least due to screen resolution problems, but since I can get the source I want to try compiling it.) I've been trying out all sorts of stuff, and a lot of it's not working very easily. Some things just need a ./configure --build=mips-linux, like XMMS. And some things, like the Xvnc server, (not the client) seem to need some configuration editing.
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Question regarding the openGL port?
I actually got it compiled! And it tried to run! But then it segfaulted:

Setting language to English
soundcard = (nothing)
No video card defined... exiting
GR_CPU: Family 0, MMX=No
Initializing opengl graphics device...
Screen BPP: 16

Vendor     :Brian Paul
Renderer  : Mesa X11
Version     : 1.2 Mesa 3.3 beta
Extentions: {big list of stuff}
Fatal signal: Bus Error (SDL Parachute Deployed)
GL User Error: calling glScissor without a current context
GL User Error: calling glClear without a current context
Segmentation fault

That was from being run by a terminal in X running on a TV at less then 640x480 resolution. When run from a console it was complaining about not being able to get a big enough display. Might work differently from a monitor, then again it might not. But it actually popped up a window for a sec! :)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Inquisitor

Question regarding the openGL port?
Did you install the SDL RPMs?

And getting it to compile is a big deal :)
No signature.

 

Offline daveb

  • WHEE!!
  • 25
Question regarding the openGL port?
PS2's not gonna like 640x480.  You're gonna need to use 640x448 or 320x224.  But hi-res/lo-res have kind of "special" meanings on TV sets. Its possible the OpenGL implementation has stuff to deal with this. _But_ you'd be really short-changing yourself if you just stuck with OpenGL on that beast. If you do, what you end up with is a marginal GL implementation running on a pretty craptacular CPU. All the "fun" of the PS2 comes from writing PS2-specific code. Get cozy with the EE-User's manual (specifically, the DMA and VIF chapters), the GS User's Manual and the VU User's Manual. Making the PS2 architecture hum is a fascinating experience.

 

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
Question regarding the openGL port?
Quote
Originally posted by EdrickV
I actually got it compiled! And it tried to run! But then it segfaulted:
Very cool :yes:

SDL and OpenGL are getting initialized, it looks like...

The bus error looks like the culprit -- most RISC architectures are much more picky about word alignment than the x86.  My guess is it was trying to read an int out of a structure that was not 4-byte aligned.  Might be way ugly to find (and worse to fix)...

Have you tried running it under gdb?  A lot of times when you get a bus error the stack is useless, but you might get lucky and find where the error occurred.
your source code slave

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Question regarding the openGL port?
Under X FS2 could actually create a 640x480 window, I just wouldn't be able to see all of it at once. My virtual desktop's total size is 1156x808 (578x404 *2)and I can pan around it. PS2Linux can work with a sync-on-green monitor and get better resolutions (640x480, 800x600, 1024x768, and maybe higher) and HDTVs and get the special resolutions they provide. I didn't expect it would run on a TV without major editing. :)

SDL should be installed, I'm not completely sure it's installed right but I will look into that. I'll also see what I can discover with gdb. I do know the PS2 is not a bigendian system, unlike most MIPS systems. (It has the same endianness as a PC.)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
Question regarding the openGL port?
I think it is *not* an SDL or OpenGL problem -- it always runs in windowed mode (for now), so if you're seeing the above messages, and a window is popping up on the screen (however briefly), then I think the SDL is getting initted OK.

The problem is probably deeper within the code, my guess is still accessing some misaligned int.  The endianness doesn't really matter -- some architectures are just a little more picky about how 16- and 32-bit values are aligned.  The x86 family is very lax.

Send me a PS2 and the kit and I'll be happy to debug it :nod: :D  I'll even pay for shipping ;)
your source code slave

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Question regarding the openGL port?
Tried using gdb and, while I'm not totally sure I'm using it right, I'll post what I got from it:

Starting program: /home/Hunter/games/freespace2/fs2
Size of bitmap info = 1121 KB
Size of bitmap extra info = 8 bytes
WARNING: "Cannot chdir to /home/hunter/games/freespace2: No such file or directory" at windows_stub/stubs.cpp:103
Building file index...
Found 5 roots and 6872 files.
==========================================================================
DEBUG SPEW: No debug_filter.cfg found, so only general, error, and warning
categories can be shown and no debug_filter.cfg info will be saved.
==========================================================================
Opened fs.log OK
Setting language to English
soundcard =
No video card defined... exiting
GR_CPU: Family 0, MMX=No
Initializing opengl graphics device...
Screen BPP: 32

Vendor     : Brian Paul
Renderer   : Mesa X11
Version    : 1.2 Mesa 3.3 beta
Extensions : GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_logic_op GL_EXT_blend_subtract GL_EXT_paletted_texture GL_EXT_point_parameters GL_EXT_polygon_offset GL_EXT_vertex_array GL_EXT_texture_object GL_EXT_texture3D GL_MESA_window_pos GL_MESA_resize_buffers GL_EXT_shared_texture_palette GL_EXT_rescale_normal GL_EXT_abgr GL_SGIS_texture_edge_clamp GL_EXT_stencil_wrap GL_INGR_blend_func_separate GL_ARB_multitexture GL_NV_texgen_reflection GL_PGI_misc_hints GL_EXT_compiled_vertex_array GL_EXT_clip_volume_hint GL_EXT_texture_env_add GL_ARB_tranpose_matrix

Program received signal SIGBUS, Bus error.
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address 0x5f766e65
0x5f766e65 in ?? ()

Tried setting the fence post thing to 10 and ran it again. I got the following difference:

Program received signal SIGBUS, Bus error.
Cannot access memory at address 0x5f766e62

What this all means I can't even guess. :)

Addendum: And the window it made (which hung around with gdb long enough to "identify" it) was an SDL_app window. Or something like that. Interesting thing is, if this ever works on PS2Linux it looks like we could use a display on another computer through the standard X server/client stuff. (The results of running fs2 using my PC as an X server and the PS2 as the client were the same as on the PS2.)
« Last Edit: June 04, 2002, 01:47:31 pm by 657 »
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline Inquisitor

Question regarding the openGL port?
penguin: I'll happily let you telnet into mine :)
No signature.

 

Offline penguin

  • Eudyptes codus
  • 28
  • Still alive.
Question regarding the openGL port?
Quote
Originally posted by Inquisitor
penguin: I'll happily let you telnet into mine :)
That's NOT what I asked for, please read my post above if you're still confused :D :D :D

Actually, I may take you up on your offer, but we had a server failure last night (RAID card got cooked) and I got about 3 hours sleep, so I don't plan on doing much FS2 for the next 24 hours :sigh:
your source code slave

 

Offline Inquisitor

Question regarding the openGL port?
Hehe, maybe so, but that's the best  I got :)

Bummer on the no sleep, go take a nap and stop responding to threads :)
No signature.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Question regarding the openGL port?
Almost working on a PS2? :eek: :eek: :eek: :eek:
-C

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Question regarding the openGL port?
Almost working with just about everything but graphics disabled, but likely far from playable. :) (As Penguin's always saying, code optimization can wait till everything works.) Hopefully the other group will release theirs soon and put it up so we can check it out. :D I know some stuff is kinda stubbed out (like all the registry stuff) with empty functions and TODO comments. And other stuff is ifdeffed out. Still, the fact that it compiled and tried to run is cool! :cool:
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers

 

Offline relnev

  • 20
    • http://www.icculus.org/~relnev/
Question regarding the openGL port?
Nope, it's not finished, but here it is:
http://www.icculus.org/~relnev/freespace2-020605.tar.gz

Hope this helps!


Steven Fuller

 
Question regarding the openGL port?
Thanks relnev, just wanted to take a moment to thank you for all your porting work :) You do a *LOT* of ports. Your work is helping me learn a lot more about graphics! Thanks!

 

Offline EdrickV

  • Valued
  • 29
    • http://members.aol.com/HunterComputers
Question regarding the openGL port?
Little update:
The Incculus.org version won't just compile with GCC 2.95. (It expects G++-3.0.) With 2.95's G++ it complains about anonymous structures so I think I'll have to download GCC 3 to try compiling this one. :)
Ground - "Let me help you out, you're clear to taxi any way you can, to any runway you see."

Mesh Gallery/Downloads:
http://members.aol.com/ArisKalzar/Gallery.html
Turreting 101:
http://members.aol.com/EdrickV/FS2/Turreting.html

http://members.aol.com/HunterComputers