Page 1 of 2

Quake and Quake III, but not Quake II?

Posted: Sat Apr 15, 2017 4:07 pm
by JGHunter
I've been searching around hoping for a way to get Quake II on my RetroPie, however all I ever see is how Quake and Quake III are available with Ports. If Quake III is possible, surely II is?

If it is possible, how can I go about getting Quake II to work? Should I use Ports, or a PC engine, or what? Very confused! Thanks

Re: Quake and Quake III, but not Quake II?

Posted: Sat Apr 22, 2017 10:18 am
by raysaaron
I think someone ported quake2 to Pi b+ not PI 2 and 3.there is no way to get it working

Re: Quake and Quake III, but not Quake II?

Posted: Thu May 04, 2017 1:14 pm
by raysaaron
i have just messed around with https://github.com/yquake2/yquake2 branch opengl es i have got it compiling but gives me a black screen

Re: Quake and Quake III, but not Quake II?

Posted: Fri Jun 23, 2017 11:03 pm
by runboy93
Have anyone tried to compile recently and able to play quake II?

Or have you tried urho3d?

ofc there is always Exagear + Quake 2 D: but not port.

Re: Quake and Quake III, but not Quake II?

Posted: Wed Jul 26, 2017 11:06 pm
by spidey57
Quake2 does run on a Raspberry Pi 3!

Using 2017-07-05-raspbian-jessie with the latest yamagi-master source code v7.02pre.
Install dependencies build-essential libgl1-mesa-dev libsdl2-dev libogg-dev libvorbis-dev libopenal-dev zlib1g-dev then compile as per instructions.
Place pak0.pak & yq2.cfg in the baseq2 directory and ./quake2 to start.
Will also work with the experimental OpenGL driver.
But will fail with "Bus error" after a few minutes - any ideas?

Quake2 will also run on the Raspberry Pi Zero-W in dedicated server mode.

Re: Quake and Quake III, but not Quake II?

Posted: Thu Aug 03, 2017 4:43 pm
by spidey57
Okay lets start over... Quake2 running on Raspberry Pi 3!

using 2017-07-05-raspbian-jessie.img

We need

https://github.com/yquake2/yquake2/tree/opengl_es
Latest commit 9f638c7 on 26 May 2012
download the zipfile & extract

sudo apt-get install build-essential libgl1-mesa-dev libsdl2-dev libogg-dev libvorbis-dev libopenal-dev zlib1g-dev

sudo apt-get install libsdl1.2-dev

edit makefile

# Refuse all other platforms as a firewall against PEBKAC
# (You'll need some #ifdef for your unsupported plattform!)
ifeq ($(findstring $(ARCH), i386 x86_64 sparc64),)
$(error arch $(ARCH) is currently not supported)
endif

change to

# Refuse all other platforms as a firewall against PEBKAC
# (You'll need some #ifdef for your unsupported plattform!)
ifeq ($(findstring $(ARCH), i386 x86_64 sparc64 armv7l),)
$(error arch $(ARCH) is currently not supported)
endif

make

add pak0.pak & yq2.cfg to /baseq2

NB Just google q2-314-demo-x86 and extract pak0.pak

./quake2

Also works with GL driver

sudo raspi-config

activate experimental GL driver & 64 mb gpu memory

40 fps with q2demo1.dm2

NB for better performance append

set s_initsound 0
set r_shadows 0
set gl_shadows 0
set gl_dynamic 0

to /baseq2/yq2.cfg

don't forget to add a cpu heatsink

Happy fragging.

Quake2 will also run on the Raspberry Pi Zero-W. Just take the SD card from the Raspberry Pi 3 put into the Pi Zero-W and boot up.

10 fps with q2demo1.dm2

Re: Quake and Quake III, but not Quake II?

Posted: Mon Aug 07, 2017 7:18 pm
by Shafticus
For those googling for running Quake 2 - This will not work on RetroPie using these instructions. RetroPie is not compatible with the GL Driver turned on. I'm trying to get more information on how to get it to work for RetroPie users. spidey57 seems to be pretty knowledgeable in such things, so thought I would beg his advice further.

I think this was a typo:
sudo apt-get install apt-get install build-essential libgl1-mesa-dev libsdl2-dev libogg-dev libvorbis-dev libopenal-dev zlib1g-dev

Should be:
sudo apt-get install build-essential libgl1-mesa-dev libsdl2-dev libogg-dev libvorbis-dev libopenal-dev zlib1g-dev

After that compiling was fine. I ended up putting the files in /opt/retropie/ports/quake2/
When setting up a script to run it like other RetroPie ports, I found that it couldn't find the base directory for the files. I checked the git page and ended up with this:
"sudo /opt/retropie/ports/quake2/quake2 +set basedir /opt/retropie/ports/quake2/"

That is as far as I got. Ended up with this:

Yamagi Quake II v4.21
=====================

Client build options:
+ CD audio
+ OGG/Vorbis
+ OpenAL audio
+ Zip file support
Platform: Linux
Architecture: Unknown
Byte ordering: little endian

Added packfile '/opt/retropie/ports/quake2//baseq2/pak0.pak' (1106 files).
Using '/root/.yq2/baseq2' for writing.
execing default.cfg
execing yq2.cfg
couldn't exec config.cfg
basedir is write protected.
Console initialized.

------- sound initialization -------
not initializing.
------------------------------------

----- refresher initialization -----
LoadLibrary("/opt/retropie/ports/quake2//ref_gl.so")
Byte ordering: little endian

Input initialized.
Refresher build options:
- OpenGL ES
+ Dynamic Quake GL
+ Retexturing support
+ Vertex arrays
- Gamma via X11
Refresh: Yamagi Quake II OpenGL Refresher
Using libGL.so.1 for OpenGL.
SDL video driver is "fbcon".
setting mode 4: 640 480
SDL SetVideoMode failed: OpenGL not available
Reverting to gl_mode 4 (640x480) and windowed mode.
recursive shutdown
Error:
pi@retropie:/opt/retropie/configs/ports/yquake2

Any help is greatly appreciated. I'm hoping that there is not a fundamental incompatibility with RetroPie and yquake2.

Re: Quake and Quake III, but not Quake II?

Posted: Mon Aug 07, 2017 8:56 pm
by spidey57
typo corrected
thx

Re: Quake and Quake III, but not Quake II?

Posted: Wed Aug 16, 2017 8:20 am
by LeSanglier
Hi spidey57 ! :D
spidey57 wrote:
Thu Aug 03, 2017 4:43 pm
Okay lets start over... Quake2 running on Raspberry Pi 3!
Your tutorial runs perfectly !! ;-)

I can play now Quake 2 on my Raspi3 ! \o/

Re: Quake and Quake III, but not Quake II?

Posted: Mon Aug 21, 2017 10:07 pm
by BenMcLean
So, are binaries going to be distributed or does everyone need to compile their own?

Re: Quake and Quake III, but not Quake II?

Posted: Sun Sep 17, 2017 11:38 pm
by lejionator
And about the Mission packs of Quake2 to Raspberry???

Re: Quake and Quake III, but not Quake II?

Posted: Mon Sep 18, 2017 4:13 pm
by BenMcLean
Anyone? Binaries?

The mission packs involve no additional code, so if Quake II works, it follows that the mission packs work.

If it works then the only thing left to do at this point is for someone to distribute the binaries and someone to write a module for the RetroPie setup script to dowbload them.

Re: Quake and Quake III, but not Quake II?

Posted: Mon Sep 18, 2017 5:23 pm
by rpiMike
I've just built this and get the same 'bus error' others have mentioned after about 1 minute :(

Re: Quake and Quake III, but not Quake II?

Posted: Mon Sep 18, 2017 5:31 pm
by BenMcLean
Oh. It's dissappointing to hear that. I hope someone can take a look at this soon. Quake II is a great party game for co-op.

Re: Quake and Quake III, but not Quake II?

Posted: Mon Sep 18, 2017 9:44 pm
by spidey57
Quake2 mission packs on Raspberry Pi 3 (Rogue "Ground Zero" & Xatrix "The Reckoning")

First up .... follow my notes as per

viewtopic.php?f=78&t=180667#p1194521


For Rogue - get the source:-

https://github.com/yquake2/rogue/releas ... ROGUE_2_04

unzip
cd rogue dir
make

create a new dir rogue in same dir as quake2/baseq2
copy the compiled game.so here from the release dir
also copy the pak0.pak from your original Rogue cd
start game with
./quake2 +set game rogue

For Xatrix - get the source:-

https://github.com/yquake2/xatrix/relea ... ATRIX_2_05

unzip
cd xatrix dir
make

create a new dir xatrix in same dir as quake2/baseq2
copy the compiled game.so here from the release dir
also copy the pak0.pak from your original Xatrix cd
start game with
./quake2 +set game xatrix

Happy fragging.

Re: Quake and Quake III, but not Quake II?

Posted: Mon Sep 18, 2017 9:51 pm
by BenMcLean
Oh, so unlike in Quake 1, you're saying the Quake 2 expansions DO require code changes? That's very interesting. I didn't know that.

When might we see some binaries distributed?

Re: Quake and Quake III, but not Quake II?

Posted: Sat Sep 23, 2017 10:51 am
by osu
Here's a little known fact. Nobody uses OpenGL ES on Linux except Android devs. Enable the open source driver and use OpenGL.

Re: Quake and Quake III, but not Quake II?

Posted: Thu Nov 30, 2017 7:16 pm
by BenMcLean
No progress on this?

Re: Quake and Quake III, but not Quake II?

Posted: Thu Dec 14, 2017 3:48 pm
by VincentGR
Hello everybody, totally new to Raspberry/Linux.

I tried the above and it came with an error:
src/refresh/files/jpeg.c:30:21: fatal error: jpeglib.h: No such file or directory

So I've installed this:
sudo apt-get install libjpeg-dev

Tried again and:
src/refresh/files/jpeg.c:55:1: error: conflicting types for ‘jpeg_mem_src’
jpeg_mem_src(j_decompress_ptr cinfo, unsigned char *mem, unsigned long len)

No idea what it means and what to do :D

Thanks in advance,
Dimitris.

Re: Quake and Quake III, but not Quake II?

Posted: Sat Dec 16, 2017 6:44 pm
by spidey57
Using the latest
raspbian debian stretch with desktop november 2017 2017-11-29 kernel v4.9
gave me the exact same error!

Use this as suggested earlier:-

http://downloads.raspberrypi.org/raspbi ... jessie.zip

Re: Quake and Quake III, but not Quake II?

Posted: Sat Dec 16, 2017 6:47 pm
by VincentGR
Not gonna install again the OS.
Maybe if I have a spare SD an then move it.

Thank you very much!!!

Re: Quake and Quake III, but not Quake II?

Posted: Sun Dec 17, 2017 3:05 am
by jdonald
VincentGR wrote:
Thu Dec 14, 2017 3:48 pm
So I've installed this:
sudo apt-get install libjpeg-dev
Yeah, good catch. Would be great if spidey57 could edit his instructions above to include this package!
VincentGR wrote:
Thu Dec 14, 2017 3:48 pm
src/refresh/files/jpeg.c:55:1: error: conflicting types for ‘jpeg_mem_src’
jpeg_mem_src(j_decompress_ptr cinfo, unsigned char *mem, unsigned long len)

No idea what it means and what to do :D
Inspecting /usr/include/jpeglib.h, it seems earlier versions of gcc were more lenient while gcc 6 on Stretch requires the const-ness to match. You can fix like so:

Code: Select all

--- a/src/refresh/files/jpeg.c
+++ b/src/refresh/files/jpeg.c
@@ -52,7 +52,7 @@ jpg_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
 }
 
 void
-jpeg_mem_src(j_decompress_ptr cinfo, unsigned char *mem, unsigned long len)
+jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *mem, unsigned long len)
 {
However, once I had this running it then became evident in the settings that it's rendering using OpenGL, not GLES, so what was the point of pulling a branch named opengl_es? (For what it's worth I tried setting gl_driver in ~/.yq2/baseq2/config.js to libGLESv1_CM.so.1 which resulted in a crash in qglPolygonMode, libGLESv2.so.2 crashed in qglAlphaFunc.)

If we're using OpenGL + GLX anyway, might as well build the master branch:

Code: Select all

git clone https://github.com/yquake2/yquake2.git
Most of the other steps such as installing dependencies, running make, and copying pak{0,2}.pak are still required.

The resulting build works better (significantly higher framerate), does not require the above change to Makefile nor jpeg.c, and even allows selecting between OpenGL 3.2 and 1.4. The improvements seem reasonable considering the opengl_es branch was last updated 6 years ago, compared to the master branch 11 hours ago.

Re: Quake and Quake III, but not Quake II?

Posted: Sun Dec 17, 2017 2:38 pm
by VincentGR
@jdonald

It works with OpenGL1.4 like a charm.
I have 60-40 fps at 640x480 with no overheat.

Thank you very much.

Re: Quake and Quake III, but not Quake II?

Posted: Sun Dec 17, 2017 7:57 pm
by BenMcLean
Can we get binaries distributed?

Re: Quake and Quake III, but not Quake II?

Posted: Sun Dec 17, 2017 8:29 pm
by VincentGR
BenMcLean wrote:
Sun Dec 17, 2017 7:57 pm
Can we get binaries distributed?
If it is legal and the site permits it, there is no reason I wouldn't upload them.