Author Topic: Trem In 64-Bit?  (Read 10155 times)

BeerBastard

  • Posts: 276
  • Turrets: +25/-21
    • Home of [OPP]
Trem In 64-Bit?
« on: January 28, 2007, 10:32:35 pm »
Ok I have an idea I want info on if it will work.  Would it be possible to compile trem for the newer 64 bit cpus?  If you did it would you get unpure client errors? I have heard of newer games being released in 32bit and 64bit versions, Wasnt half life 2?  Any ideas on this would be cool, I think alot of people would be able to use this because 64bit cpus are becoming more and more common.

Wasnt sure this went here, its not really a mod. So I posted here.
Feeling Oppressed?
You Down with [OPP]?


-[OPP]Beerbastard

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Trem In 64-Bit?
« Reply #1 on: January 29, 2007, 12:18:51 am »
most people notice a pretty sizable performance hit with 64-bit trem compared to 32-bit.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

TinMan

  • Posts: 1019
  • Turrets: +49/-70
    • http://neonpulse.net
Trem In 64-Bit?
« Reply #2 on: January 29, 2007, 12:19:39 am »
64-bit games and applications are for 64-bit Operating Systems, Windows XP 64-bit isn't worth compiling anything for since it's so horrid. There are already 64-bit builds out for linux and they work fine for the most part, sometimes they get a little slow around too many entities. When Windows Vista launches with 64-bit I'm sure that someone in the tremulous community will compile a 64-bit build for Vista.

Also, if you have a dual-core CPU you can enable it with "r_smp 1", this is a great way to utilize your hardware to run tremulous smoother.
Code: [Select]
Linux: ~/.tremulous/base/
Mac: ~/Library/Application\ Support/Tremulous/base/
Windows: C:\Documents and Settings\username\Local Settings\Application Data\Tremulous\base\
NeonPulse
http://neonpulse.net/media/games/tremulous/base/autoexec.cfg

Kuszja

  • Posts: 72
  • Turrets: +1/-0
Trem In 64-Bit?
« Reply #3 on: January 29, 2007, 12:55:16 am »
r_smp doesn't work for ht processors emulatiog a dual core, does it?

BeerBastard

  • Posts: 276
  • Turrets: +25/-21
    • Home of [OPP]
Trem In 64-Bit?
« Reply #4 on: January 29, 2007, 03:06:14 am »
What about running win xp (not 64) and compiling trem for 64 bit. Would that work? or is it useless without win xp 64. Also r_smp does what? The cpu is an amd athlon x2 64 3800.
Feeling Oppressed?
You Down with [OPP]?


-[OPP]Beerbastard

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Trem In 64-Bit?
« Reply #5 on: January 29, 2007, 03:16:56 am »
Quote from: "Kuszja"
r_smp doesn't work for ht processors emulatiog a dual core, does it?
HT is, from my understanding, transparent dual-core(because of how it works). It should work fine, and without r_smp, trem probably isn't taking advantage of HT.

Quote
What about running win xp (not 64) and compiling trem for 64 bit. Would that work? or is it useless without win xp 64. Also r_smp does what? The cpu is an amd athlon x2 64 3800.

It won't work.
SMP is Symmetric Multi-Processing, and setting r_smp to 1 enables it, allowing trem to use more than just the first processor(or core).

BeerBastard

  • Posts: 276
  • Turrets: +25/-21
    • Home of [OPP]
Trem In 64-Bit?
« Reply #6 on: January 29, 2007, 09:06:16 am »
Quote from: "Odin"
Quote from: "Kuszja"
r_smp doesn't work for ht processors emulatiog a dual core, does it?
HT is, from my understanding, transparent dual-core(because of how it works). It should work fine, and without r_smp, trem probably isn't taking advantage of HT.

Quote
What about running win xp (not 64) and compiling trem for 64 bit. Would that work? or is it useless without win xp 64. Also r_smp does what? The cpu is an amd athlon x2 64 3800.

It won't work.
SMP is Symmetric Multi-Processing, and setting r_smp to 1 enables it, allowing trem to use more than just the first processor(or core).


The Amd athlon x2's are duel core. So why wouldnt work?
Feeling Oppressed?
You Down with [OPP]?


-[OPP]Beerbastard

next_ghost

  • Posts: 892
  • Turrets: +3/-6
Trem In 64-Bit?
« Reply #7 on: January 29, 2007, 10:15:52 am »
Both 64-bit compilation and r_smp is possible, but:
1) I don't remember right now how to work around the performance issue with QVMs, it had something to do with GNU assembler as bytecode compiler.
2) r_smp is disabled during compilation no mater what you do. You'll have to patch the makefile before you can get it working.
If my answer to your problem doesn't seem helpful, it means I won't help you until you show some effort to fix your problem yourself!
1.2.0 release's been delayed for 5:48:00 already because of stupid questions.

Stof

  • Posts: 1343
  • Turrets: +1/-1
Trem In 64-Bit?
« Reply #8 on: January 29, 2007, 10:21:41 am »
Quote from: "next_ghost"
Both 64-bit compilation and r_smp is possible, but:
1) I don't remember right now how to work around the performance issue with QVMs, it had something to do with GNU assembler as bytecode compiler.
2) r_smp is disabled during compilation no mater what you do. You'll have to patch the makefile before you can get it working.

I've already made the changes to get SMP to compile a long time ago. I didn't bother to release a patch for the Makefiles because, SMP doesn't work with SDL, except on MacOS X :/ The resulting binary works perfectly, it's just that it completly ignores the SMP setting.

Don't bother for now unless you are willing to fix it yourself.
urphy's rules of combat
8 ) Teamwork is essential; it gives the enemy someone else to shoot at.
18 ) Make it too tough for the enemy to get in and you can't get out.

tomek-k

  • Guest
Trem In 64-Bit?
« Reply #9 on: January 29, 2007, 11:26:58 am »
Quote from: "BeerBastard"
What about running win xp (not 64) and compiling trem for 64 bit. Would that work? or is it useless without win xp 64 (...)


You need a 64bit operating system to run 64bit programs. Having only a 64bit processor is not enough.

BTW. I've compiled tremulous for 64bits and it works quite well for me.
However there are the slowdowns caused by that bytecode compiler issue, but in my case they aren't so big that they would make it not worth using the 64bit version (they are more noticable during loading of maps then during the gameplay - only about 10 fps less than in 32bit version).
I guess it depends on the whole system's configuration.

Risujin

  • Posts: 739
  • Turrets: +33/-13
    • http://risujin.org
Trem In 64-Bit?
« Reply #10 on: January 29, 2007, 03:21:24 pm »
Can't 64-bit OSes can emulate 32-bit programs? With 64-bit Windows you can run the regular Tremulous exe probably... though it'll undoubtably lag.

tomek-k

  • Guest
Trem In 64-Bit?
« Reply #11 on: January 29, 2007, 05:20:42 pm »
64bit OS (compiled for AMD64 architecture) can run 32bit programs natively, with out emulation, just because the AMD64 architecture is compatible with the i386 arch.
But the other way is impossible (from obvious reasons).

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Trem In 64-Bit?
« Reply #12 on: January 29, 2007, 07:59:06 pm »
Quote from: "tomek-k"
64bit OS (compiled for AMD64 architecture) can run 32bit programs natively, with out emulation, just because the AMD64 architecture is compatible with the i386 arch.
But the other way is impossible (from obvious reasons).
Source? Because if you are correct, I'm switching to 64-bit right now.

Quote
The Amd athlon x2's are duel core. So why wouldnt work?
I meant a 64-bit binary won't run on a 32-bit OS.

Stof

  • Posts: 1343
  • Turrets: +1/-1
Trem In 64-Bit?
« Reply #13 on: January 29, 2007, 08:04:09 pm »
Quote from: "Odin"
Quote from: "tomek-k"
64bit OS (compiled for AMD64 architecture) can run 32bit programs natively, with out emulation, just because the AMD64 architecture is compatible with the i386 arch.
But the other way is impossible (from obvious reasons).
Source? Because if you are correct, I'm switching to 64-bit right now.

Of course it is correct! Although it is sometimes a pain to install both 64 bit binaries and 32bit binaries, it does work if you take the time to make it happen.
urphy's rules of combat
8 ) Teamwork is essential; it gives the enemy someone else to shoot at.
18 ) Make it too tough for the enemy to get in and you can't get out.

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Trem In 64-Bit?
« Reply #14 on: January 29, 2007, 08:07:34 pm »
Ok so hypothetically, if I had Ubuntu 64-bit running on my computer with an AMD64 processor(Athlon 64 3200+ Venice), I could run x86 binaries, without an i386 chroot?

Stof

  • Posts: 1343
  • Turrets: +1/-1
Trem In 64-Bit?
« Reply #15 on: January 29, 2007, 08:14:04 pm »
Quote from: "Odin"
Ok so hypothetically, if I had Ubuntu 64-bit running on my computer with an AMD64 processor(Athlon 64 3200+ Venice), I could run x86 binaries, without an i386 chroot?

No idea for the Ubuntu but I do that perfectly well ( nearly perfectly ;) ) with a Mandriva 2006

Just make sure to install the full version of the NVIDIA drivers, the ones with the 32 compatibility libs if you do that yourself.
urphy's rules of combat
8 ) Teamwork is essential; it gives the enemy someone else to shoot at.
18 ) Make it too tough for the enemy to get in and you can't get out.

kevlarman

  • Posts: 2737
  • Turrets: +291/-295
Trem In 64-Bit?
« Reply #16 on: January 29, 2007, 08:37:41 pm »
Quote from: "Odin"
Ok so hypothetically, if I had Ubuntu 64-bit running on my computer with an AMD64 processor(Athlon 64 3200+ Venice), I could run x86 binaries, without an i386 chroot?
yes, but you need to have 32bit versions of glibc,libsdl, libGL, libopenal,etc..., it ends up eating quite a bit more RAM than you would with only 32 or only 64 bit binaries.
Quote from: Asvarox link=topic=8622.msg169333#msg169333
Ok let's plan it out. Asva, you are nub, go sit on rets, I will build, you two go feed like hell, you go pwn their asses, and everyone else camp in the hallway, roger?
the dretch bites.
-----
|..d| #
|.@.-##
-----

techhead

  • Posts: 1496
  • Turrets: +77/-73
    • My (Virtually) Infinite Source of Knowledge (and Trivia)
Trem In 64-Bit?
« Reply #17 on: January 29, 2007, 08:42:44 pm »
Mac OS X supports 64 bit, but no one cares about us...
With all your Windows and Linux stuff, I feel so left out.
I'm playing Tremulous on a Mac!
MGDev fan-club member
Techhead||TH
/"/""\"\
\"\""/"/
\\:.V.://
Copy and paste Granger into your signature!

tomek-k

  • Guest
Trem In 64-Bit?
« Reply #18 on: January 29, 2007, 09:07:14 pm »
Quote from: "Odin"
Ok so hypothetically, if I had Ubuntu 64-bit running on my computer with an AMD64 processor(Athlon 64 3200+ Venice), I could run x86 binaries, without an i386 chroot?


Debian (and derivative distros, eg. Ubuntu, Knoppix), Gentoo and some other distributions do not provide the 32bit libraries by default - you need to install them (the mentioned above compatibility libraries). These libraries are provided in so-called ia32-libs packages in order to simplify things.

For example Mandriva and Red Hat include those libraries in 64bit ports so you can run the 32bit programs with out any problems.

However in case of distros that don't include the 32bit libraries by default you may have problems even after installing ia32-libs - some programs require libraries that are not included in ia32-libs packages, but for majority of programs it should be enough.
In such case the chroot is the only way.

I once used amd64 port of Fedora (based on RedHat) and I had no problems running 32bit programs.
Now I use Debian amd64 and I chose 'the chroot way' because I have also a 32bit Debian installed so I didn't have to install the chroot - I just chroot to the other Debian if I need to run 32bit apps. Thus I don't know which 32bit programs will run w/o chroot, but I heared that for example 32bit firefox (needed if you need win32 codecs and flash plugin) runs well with ia32-libs.
Moreover I wasn't able to run 32bit tremulous in the chroot so maby the ia32-libs will be just fine in your case.

So I suggest you to install the ia32-libs and to try it out.

Stof

  • Posts: 1343
  • Turrets: +1/-1
Trem In 64-Bit?
« Reply #19 on: January 29, 2007, 09:12:59 pm »
Quote from: "tomek-k"
For example Mandriva and Red Hat include those libraries in 64bit ports so you can run the 32bit programs with out any problems.

This is not really how Mandriva does it ( not sure about Red Hat )

For Mandrive, all I add to do once my 64bit distro was installed, was to add the 32bit distro package source to my package manager. After that, installing a 32bit package is just a matter of forcing the package manager to use the 32bit source.

Myself, I find the system incredibly elegant since any package built for the 32bit version of Mandriva can be installed directly on the 64bit version at that point :)
urphy's rules of combat
8 ) Teamwork is essential; it gives the enemy someone else to shoot at.
18 ) Make it too tough for the enemy to get in and you can't get out.

tomek-k

  • Guest
Trem In 64-Bit?
« Reply #20 on: January 29, 2007, 09:25:05 pm »
Quote from: "Stof"
Quote from: "tomek-k"
For example Mandriva and Red Hat include those libraries in 64bit ports so you can run the 32bit programs with out any problems.

This is not really how Mandriva does it ( not sure about Red Hat )


Sorry - I shouldn't write about distro I don't know myself - I thought it was true about Mandriva :wink:

But about Red Hat I'm pretty sure (as I used Fedora, but it was a while ago and thingh might have changed)

TinMan

  • Posts: 1019
  • Turrets: +49/-70
    • http://neonpulse.net
Trem In 64-Bit?
« Reply #21 on: January 29, 2007, 10:07:17 pm »
In linux you still need the lib32 files (32-bit libraries, duh), and you need to have linux32 installed. So instead of running tremulous you'd run "linux32 tremulous"

In ubuntu you can just follow this how-to that I made: http://ubuntuforums.org/showthread.php?t=234063p

I don't recommend running 64-bit Windows XP, you'll have a pain finding 64-bit versions of most drivers and then you'll experience many errors with DLL files and such, if you're going to run 64-bit Windows then you should really wait for Vista which is as promising as Microsoft will ever get when it comes to 64-bit.

Right now I wouldn't recommend using 64-bit Linux if you use any restricted formats of media or if you run many applications that are closed-source and only for 32-bit. Getting those things working isn't usually that hard, but getting them working well is.
Code: [Select]
Linux: ~/.tremulous/base/
Mac: ~/Library/Application\ Support/Tremulous/base/
Windows: C:\Documents and Settings\username\Local Settings\Application Data\Tremulous\base\
NeonPulse
http://neonpulse.net/media/games/tremulous/base/autoexec.cfg

Stof

  • Posts: 1343
  • Turrets: +1/-1
Trem In 64-Bit?
« Reply #22 on: January 29, 2007, 10:15:27 pm »
Quote from: "TinMan"
In linux you still need the lib32 files (32-bit libraries, duh), and you need to have linux32 installed. So instead of running tremulous you'd run "linux32 tremulous"

In ubuntu you can just follow this how-to that I made: http://ubuntuforums.org/showthread.php?t=234063p

I don't recommend running 64-bit Windows XP, you'll have a pain finding 64-bit versions of most drivers and then you'll experience many errors with DLL files and such, if you're going to run 64-bit Windows then you should really wait for Vista which is as promising as Microsoft will ever get when it comes to 64-bit.

Right now I wouldn't recommend using 64-bit Linux if you use any restricted formats of media or if you run many applications that are closed-source and only for 32-bit. Getting those things working isn't usually that hard, but getting them working well is.

Do not mistake the awkward and annoying way of having 32bit code run on Debian and derivatives will all Linux distro ;) As I told you, all that I had to do was install Trem dependencies ( SDL, OpenGL ) in 32bit form, thing that was already done before for other games and run it like I would any other application.

IIRC, on a 64bit dirstop, Debian puts 32bit libs in /usr/lib32 dir, and 64bit libs in /usr/lib. That way causes conflicts with any prebuilt binary application since it is looking for it's 32bit libs in /usr/lib. Mandriva ( and Red Hat I think ) does that the other way : 32bit libs in /usr/lib ( which is mostly empty on a regular 64bit install, except for things that do not care about 32/64 bit difference like perl scripts, Python source files ... ) and 64bit libs go into /usr/lib64

That way, existing 32bit binaries can run directly provided the required libs are installed :) No need for that linux32 wrapper.
urphy's rules of combat
8 ) Teamwork is essential; it gives the enemy someone else to shoot at.
18 ) Make it too tough for the enemy to get in and you can't get out.

tomek-k

  • Guest
Trem In 64-Bit?
« Reply #23 on: January 29, 2007, 10:43:48 pm »
Quote from: "Stof"
IIRC, on a 64bit dirstop, Debian puts 32bit libs in /usr/lib32 dir, and 64bit libs in /usr/lib. That way causes conflicts with any prebuilt binary application since it is looking for it's 32bit libs in /usr/lib. Mandriva ( and Red Hat I think ) does that the other way : 32bit libs in /usr/lib ( which is mostly empty on a regular 64bit install, except for things that do not care about 32/64 bit difference like perl scripts, Python source files ... ) and 64bit libs go into /usr/lib64


It couldn't be explained more clearly :wink:

Odin

  • Spam Killer
  • *
  • Posts: 1767
  • Turrets: +113/-204
    • My Website
Trem In 64-Bit?
« Reply #24 on: January 30, 2007, 01:29:51 am »
Well, the next time my Ubuntu install blows up(I have a lot of data that would be hard to back up), I will install 64-bit first and see if I can get something working. Otherwise, I'm sticking to 32-bit for now.

AKAnotu

  • Posts: 616
  • Turrets: +7/-9
Trem In 64-Bit?
« Reply #25 on: January 31, 2007, 01:34:41 am »
Quote from: "techhead"
Mac OS X supports 64 bit, but no one cares about us...
With all your Windows and Linux stuff, I feel so left out.

DON'T BE MEAN TO MACS  :cry: