> Sent: Saturday, May 30, 2020 at 9:45 PM
> From: "Charlene Wendling" <juliana...@posteo.jp>
> To: "Landry Breuil" <lan...@openbsd.org>
> Cc: "Alex Free" <ale...@mail.com>, ports@openbsd.org, abie...@openbsd.org
> Subject: Re: games/ioquake3 cvs current diffs adding ppc support
>
> Hi,
> 
> On Sat, 30 May 2020 09:36:25 +0200
> Landry Breuil wrote:
> 
> > On Sat, May 30, 2020 at 09:09:13AM +0200, Alex Free wrote:
> > > Successfully built and tested against current.
> > > 
> > > Let me know if I can do anything else to make this happen.
> > > 
> > > A new file named patch-code_qcommon_q_platform_h contains the
> > > following immediately below.
> > 
> > note that you can do a cvs add of that new file, and cvs diff will
> > show it.
> > 
> > > Below are the CVS diffs.
> > 
> > usually, when sending a diff for a port, you to the cvs diff from the
> > port directory, otherwise the person applying it will have to cd to
> > /usr or use patch -p2 in that case.
> > 
> > those are not strong remarks, your diff itself is fine, it's just
> > 'best practice to get used to' if you plan to send more diffs (which
> > are always welcome!)
> 
> ^ Agreed :) 
> 
> It builds fine on macppc indeed, there are font glitches, but i don't
> have much time to fiddle with q3config.cfg since i can't read options.
> It requires to disable HDR at least to have proper weapons/font
> textures with my Radeon 9700.
> 
> Alex, if you had the issue and know what is needed to make glitches
> disappear, we should add it to pkg/README :)
> 
> OK cwen@ either way, here is the diff as we usually expect it by the way. 
> 
> Charlène.
> 
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/games/ioquake3/Makefile,v
> retrieving revision 1.25
> diff -u -p -u -p -r1.25 Makefile
> --- Makefile  12 Jul 2019 20:46:19 -0000      1.25
> +++ Makefile  30 May 2020 18:22:36 -0000
> @@ -1,7 +1,7 @@
>  # $OpenBSD: Makefile,v 1.25 2019/07/12 20:46:19 sthen Exp $
>  
>  BROKEN-i386= need to free up a register
> -ONLY_FOR_ARCHS= amd64 i386
> +ONLY_FOR_ARCHS= amd64 i386 macppc
>  
>  COMMENT=     clone of the original Quake III Arena
>  
> @@ -33,7 +33,11 @@ ALL_TARGET=        "release"
>  USE_GMAKE=   Yes
>  NO_TEST=     Yes
>  
> +.if ${MACHINE_ARCH} == "powerpc"
> +QUAKE_ARCH=  ppc
> +.else
>  QUAKE_ARCH=  ${ARCH:S/amd64/x86_64/:S/i386/x86/}
> +.endif
>  SUBST_VARS+= QUAKE_ARCH
>  
>  do-install:
> Index: patches/patch-Makefile
> ===================================================================
> RCS file: /cvs/ports/games/ioquake3/patches/patch-Makefile,v
> retrieving revision 1.2
> diff -u -p -u -p -r1.2 patch-Makefile
> --- patches/patch-Makefile    16 Apr 2018 13:12:22 -0000      1.2
> +++ patches/patch-Makefile    30 May 2020 18:22:36 -0000
> @@ -3,7 +3,16 @@ $OpenBSD: patch-Makefile,v 1.2 2018/04/1
>  Index: Makefile
>  --- Makefile.orig
>  +++ Makefile
> -@@ -743,16 +743,16 @@ ifeq ($(PLATFORM),openbsd)
> +@@ -4,7 +4,7 @@
> + # GNU Make required
> + #
> + COMPILE_PLATFORM=$(shell uname | sed -e 's/_.*//' | tr '[:upper:]' 
> '[:lower:]' | sed -e 's/\//_/g')
> +-COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 
> 's/^arm.*/arm/')
> ++COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 
> 's/macppc/ppc/' | sed -e 's/^arm.*/arm/')
> +
> + ifeq ($(COMPILE_PLATFORM),sunos)
> +   # Solaris uname and GNU uname differ
> +@@ -769,16 +769,16 @@ ifeq ($(PLATFORM),openbsd)
>       -pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
>     CLIENT_CFLAGS += $(SDL_CFLAGS)
>   
> @@ -23,7 +32,7 @@ Index: Makefile
>       OPTIMIZE = $(OPTIMIZEVM) -ffast-math
>       HAVE_VM_COMPILED=true
>     else
> -@@ -1525,7 +1525,6 @@ Q3CPPOBJ = \
> +@@ -1562,7 +1562,6 @@ Q3CPPOBJ = \
>     $(B)/tools/cpp/eval.o \
>     $(B)/tools/cpp/include.o \
>     $(B)/tools/cpp/hideset.o \
> Index: patches/patch-code_qcommon_q_platform_h
> ===================================================================
> RCS file: patches/patch-code_qcommon_q_platform_h
> diff -N patches/patch-code_qcommon_q_platform_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-code_qcommon_q_platform_h   30 May 2020 18:22:36 -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: code/qcommon/q_platform.h
> +--- code/qcommon/q_platform.h.orig
> ++++ code/qcommon/q_platform.h
> +@@ -223,6 +223,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
> +
> + #ifdef __i386__
> + #define ARCH_STRING "x86"
> ++#elif defined __ppc__
> ++#define ARCH_STRING "ppc"
> + #elif defined __amd64__
> + #undef idx64
> + #define idx64 1
> 


Thank you all for informing me of how to submit things correctly. I
greatly appreciate the correct format for the patches submitted here.

As for the font issues, I only have one powerpc machine with graphics
acceleration support in OpenBSD 6.7. Mach64 DRI was dropped years ago. 

My one machine has a Radeon 9200 32MB graphics card so I had to change
the renderer to opengl1 in q3cfg.cfg using the text below.

seta cl_renderer "opengl1"

Also, fullscreen is scaled incorrectly on my card, it is in the corner
of the screen and not completely visible. Windowed mode works fine, I
have it set in q3cfg.cfg using the text below.

seta r_fullscreen "0"

As I believe we are using different renderers (9700 supports OpenGL2.0
AFAIK), maybe the opengl1 renderer will work better? I haven’t had any
font issues on my OpenGL 1.3 card, just the fullscreen one which I work
around by setting xrandr -s 640x480.

Another thing I think might be important, on my radeon 9200 I have to
use the fastest preset for a playable game. Resolution can be then be changed.

Is this good to include in the readme? I can submit a new patch for an
updated readme if that is what should be done next.

Reply via email to