Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40328 - I got games-fps/quake2-icculus working on amd64 ... sort of
Summary: I got games-fps/quake2-icculus working on amd64 ... sort of
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: AMD64 Linux
: High enhancement (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-03 16:43 UTC by Tamran Lengyel
Modified: 2004-11-27 07:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
This is the Makefile as I modified it. (Makefile,48.61 KB, text/plain)
2004-02-03 16:46 UTC, Tamran Lengyel
Details
this goes in src/linux/sys_linux.c (sys_linux.c,8.10 KB, text/plain)
2004-02-03 16:46 UTC, Tamran Lengyel
Details
AMD64 Makefile Patch (0.15-Makefile-amd64.patch,2.84 KB, patch)
2004-02-04 08:10 UTC, Kris Kersey (RETIRED)
Details | Diff
Patch for src/linux/sys_linux.c for AMD64. (0.15-amd64.patch,358 bytes, patch)
2004-02-04 08:11 UTC, Kris Kersey (RETIRED)
Details | Diff
quake2-icculus-0.15-r1.ebuild AMD64 Patch (quake2-icculus-0.15-r1.ebuild.patch,1.23 KB, patch)
2004-02-04 08:15 UTC, Kris Kersey (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tamran Lengyel 2004-02-03 16:43:32 UTC
Compiling at first didn't want to work, as x86_64 wasn't supported.  I then went ahead and tinkered with the Makefile and src/linux/sys_linux.c (which are attached).  Just search the files for "x86_64" as those lines are all I added.

In order to get it to work with glx mode without glitched graphics, I modified ~/.quake2/baseq2/config.cfg and modfied the setting for "set vid_ref" to:

set vid_ref "glx"

Now the game works. 

To get sound working I had to also use the following command:

echo "quake2 0 0 direct" > /proc/asound/card0/pcm0p/oss

The game has a few bugs still I think, like if you choose the video menu it crashes.  But, hopefully someone else out there can give it a good lookover?  I have not yet done networking with this client yet, but plan to test that more tonight.

Please use the attached files and add ~amd64 to the keywords to mark it as working

Reproducible: Always
Steps to Reproduce:
1. Unpacked source
2. Modified Makefile and src/linux/sys_linux.c
3. Installed aalib (you'll need this for a successful compile)
4. ebuild <ebuildfile> compile
5. ebuild <ebuildfile> install
6. ebuild <ebuildfile> qmerge
7. modified ~/.quake2/baseq2/config.cfg
8. echo "quake2 0 0 direct" > /proc/asound/card0/pcm0p/oss

Actual Results:  
game works in default glx mode.  Crashes when opening video menu.  Game does not
work in software mode at all (graphics are messed up)


Portage 2.0.50_pre21 (default-amd64-2004.0, gcc-3.3.2, glibc-2.3.3_pre20040117-r
0, 2.6.2-rc1-gentoo)
=================================================================
System uname: 2.6.2-rc1-gentoo x86_64 5
Gentoo Base System version 1.4.3.12
Autoconf: sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.7.8
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/s
hare/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS=""
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.mirrors.p
air.com/ ftp://gentoo.noved.org/ http://mirror.tucdemonic.org/gentoo/"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa amd64 apache2 apm avi berkdb bonobo crypt cups encode foomatic
db gdbm gif gpm gtk gtk2 gtkhtml guile imlib ipv6 jpeg libg++ libwww mikmod moti
f mozilla mpeg multilib mysql ncurses nls oggvorbis opengl oss pam pdflib perl p
ng python quicktime readline sdl slang spell ssl tcpd truetype usb xml2 xmms xv 
zlib"
Comment 1 Tamran Lengyel 2004-02-03 16:46:02 UTC
Created attachment 24908 [details]
This is the Makefile as I modified it.
Comment 2 Tamran Lengyel 2004-02-03 16:46:42 UTC
Created attachment 24909 [details]
this goes in src/linux/sys_linux.c
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2004-02-04 05:22:06 UTC
At the moment, we have no way of testing this, as nobody on our team has an AMD64 machine.

I should be getting my machine in the next week, so I'll take this one and try it out.  Thanks for the report and if we can get everything working, I'll submit it upstream to icculus.org and hopefully get it added to the actual upstream package.
Comment 4 Kris Kersey (RETIRED) gentoo-dev 2004-02-04 08:08:10 UTC
Notes from the front:

I will be attaching the patch version of his files for convenience and ease of addition.  Also to follow is my ebuild.

In order to get sound to work I had to run sdlquake2.  No hints I found from others workes to get the straight quake2 to output via the kernel ALSA drivers.

Can someone on the games team inform me what these lines do:
       rogue? ( ftp://ftp.idsoftware.com/idstuff/quake2/source/roguesrc320.shar.Z )
       xatrix? ( ftp://ftp.idsoftware.com/idstuff/quake2/source/xatrixsrc320.shar.Z )"

I could not get the build to emerge with those line included.  Error:
11:07:46 (357.40 KB/s) - `/usr/portage/distfiles/.listing' saved [1139263]

Removed `/usr/portage/distfiles/.listing'.
No matches on pattern `rogue?'.
>>> md5 src_uri ;-) quake2-r0.15.tar.gz

!!! No message digest entry found for file "rogue?."
!!! Most likely a temporary problem. Try 'emerge sync' again later.
!!! If you are certain of the authenticity of the file then you may type
!!! the following to generate a new digest:
!!!   ebuild /usr/portage/category/package/package-version.ebuild digest

Comment 5 Kris Kersey (RETIRED) gentoo-dev 2004-02-04 08:10:13 UTC
Created attachment 24945 [details, diff]
AMD64 Makefile Patch

This is the patch for the Makefile in the tar's root directory.
Comment 6 Kris Kersey (RETIRED) gentoo-dev 2004-02-04 08:11:14 UTC
Created attachment 24947 [details, diff]
Patch for src/linux/sys_linux.c for AMD64.

Patch for src/linux/sys_linux.c that builds the AMD64 game library.
Comment 7 Kris Kersey (RETIRED) gentoo-dev 2004-02-04 08:15:15 UTC
Created attachment 24948 [details, diff]
quake2-icculus-0.15-r1.ebuild AMD64 Patch

This will patch your ebuild to build for AMD64.  Please be sure to read all
notes to get the resulting executable to function correctly.  Also, please be
sure to place attachment 24945 [details, diff] and 24947 in the files directory as
0.15-Makefile-amd64.patch and 0.15-amd64.patch respectively.

For my convenice (and since they don't seem to work), I removed the two lines
mentioned in my previous comment from the ebuild.  Please advise.
Comment 8 Brendan Burns 2004-02-04 09:55:17 UTC
xatrix and rogue are both commercial add-on packs which require the source (under different license btw) to be downloaded from Id.

beta direct alsa sound support has been committed to CVS (as will the patches attached) and will appear in the next release (sometime soon I promise)

Brendan (bburns <at> icculus.org)
Comment 9 Chris Gianelloni (RETIRED) gentoo-dev 2004-05-12 13:39:53 UTC
Brendan, should I go ahead and implement these patches in the version we have in portage, or is a release due sometime soon?
Comment 10 Tamran Lengyel 2004-06-03 19:57:23 UTC
Are these changes going to be put in?  I tried the current ebuild on two different x86 systems and I get the same bug when opening the video menu, so I don't think that's amd64 related.

I again compiled this just today and the game works good.  SDL isn't yet available on amd64 IIRC, so that shouln't really be working anyways.
Comment 11 SpanKY gentoo-dev 2004-08-16 18:38:26 UTC
brendan seems to be on top of this stuff so we'll just wait for his next release i think for proper support across the board
Comment 12 Chris Gianelloni (RETIRED) gentoo-dev 2004-11-27 06:47:07 UTC
Working
Comment 13 Chris Gianelloni (RETIRED) gentoo-dev 2004-11-27 07:45:35 UTC
Added these to CVS