Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Aug 1999 18:16:58 +0200 (MET DST)
From:      Juergen Lock <nox@jelal.kn-bremen.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/13201: new port: xmess (X11 emulator for game consoles, including pdp1)
Message-ID:  <199908171616.SAA98165@saturn.kn-bremen.de>

next in thread | raw e-mail | index | archive | help

>Number:         13201
>Category:       ports
>Synopsis:       new port: xmess (X11 emulator for game consoles, including pdp1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 17 09:30:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Juergen Lock
>Release:        FreeBSD 3.2-STABLE i386
>Organization:
me?  organized?
>Environment:

	FreeBSD 3.2-STABLE i386, not tested on alpha

>Description:

	I wanted to see the original 1961 Space Wars so i ported this...
	Thanks goes to mycroft@NetBSD.ORG for the NetBSD port

	MESS currently emulates the Nintendo Entertainment System (NES), Sega
	Genesis/Megadrive, TRS-80 models 1 and 3, Colour Genie, Colecovision,
	Vectrex, Apple ][ series, Atari 800, Atari 5200, Sega Master System/Game
	Gear, Bally Astrocade, Kaypro 2x and PDP-1.

	To play games in X-MESS you must have a copy of the original game,
	extracted from a cartridge, floppy or tape image.

>How-To-Repeat:

	n/a

>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	Makefile
#	files/
#	files/md5
#	pkg/
#	pkg/COMMENT
#	pkg/DESCR
#	pkg/PLIST
#	patches/
#	patches/patch-aa
#	patches/patch-ab
#	patches/patch-ae
#	patches/patch-af
#	patches/patch-ag
#	patches/patch-ba
#	patches/patch-be
#
echo x - Makefile
sed 's/^X//' >Makefile << 'END-of-Makefile'
X# New ports collection makefile for:   xmess
X# Version required:    0.2b4.1
X# Date created:        Tue Aug 17 00:21:10 MET DST 1999
X# Whom:                nox@jelal.kn-bremen.de
X#
X# $Id: $
X#
X
XDISTNAME=		unix02s4
XPKGNAME=		xmess-0.2b4.1
XCATEGORIES=		emulators games
XMASTER_SITES=		http://mess.emuverse.com/files/ \
X			http://davesclassics.warzone.com/hosted/vectrex/
XDISTFILES=		${DISTNAME}.tgz pdp1.zip
X
X#NetBSD MAINTAINER=	mycroft@NetBSD.ORG
XMAINTAINER=		nox@jelal.kn-bremen.de
X
XLIB_DEPENDS=		Xpm.4:${PORTSDIR}/graphics/xpm
X
XEXTRACT_ONLY=		${DISTNAME}.tgz
X
XUSE_X_PREFIX=		yes
XUSE_GMAKE=		yes
XMAKE_ENV+=		OPSYS=${OPSYS} ARCH=${ARCH} MACHINE_ARCH=${ARCH} \
X			DESTDIR=${DESTDIR} \
X			INSTALL_MAN="${INSTALL_MAN}" \
X			INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
X			NETBSD_JOYSTICK="${NETBSD_JOYSTICK}" \
X			DISPLAY_METHOD="${DISPLAY_METHOD}"
XMAKEFILE=		makefile.unix
XDISPLAY_METHOD=		x11
XALL_TARGET=		xmess.${DISPLAY_METHOD}
X
XWRKSRC=			${WRKDIR}/xmess-0.2b4.1
X
XMESSDIR=		${PREFIX}/share/xmess
XMESSLIB=		${PREFIX}/lib/xmess
X.if exists(/usr/include/machine/joystick.h)
XNETBSD_JOYSTICK=	yes
X.else
XNETBSD_JOYSTICK=	no
X.endif
X
Xpost-patch:
X	(cd ${WRKSRC}/doc && ${SED} 's|@MESSDIR@|${MESSDIR}|;s|@MESSLIB@|${MESSLIB}|' xmessrc.dist >xmessrc)
X
Xdo-install:
X	(cd ${WRKSRC} && ${INSTALL_PROGRAM} ${ALL_TARGET} ${PREFIX}/bin/xmess)
X	${MKDIR} ${MESSDIR}
X	(cd ${WRKSRC}/doc && ${INSTALL_DATA} xmessrc ${MESSDIR}/xmessrc)
X	${MKDIR} ${MESSLIB}
X	${INSTALL_DATA} ${_DISTDIR}/pdp1.zip ${MESSLIB}/spacewar.zip
X	@${ECHO} try \`xmess pdp1 spacewar\' for the original 1961 Space Wars
X
X.include <bsd.port.mk>
END-of-Makefile
echo c - files/
mkdir -p files/ > /dev/null 2>&1
echo x - files/md5
sed 's/^X//' >files/md5 << 'END-of-files/md5'
X$NetBSD: md5,v 1.5 1999/05/22 19:41:31 tv Exp $
X
XMD5 (unix02s4.tgz) = 2036d994aba7315d3204a9310c66f37c
END-of-files/md5
echo c - pkg/
mkdir -p pkg/ > /dev/null 2>&1
echo x - pkg/COMMENT
sed 's/^X//' >pkg/COMMENT << 'END-of-pkg/COMMENT'
XX11 emulator for game consoles
END-of-pkg/COMMENT
echo x - pkg/DESCR
sed 's/^X//' >pkg/DESCR << 'END-of-pkg/DESCR'
XX-MESS is the X11 port of the MESS game console emulator.
X
XMESS is virtual machine emulator; it includes emulators for the CPUs,
Xsound and video chips used in game consoles, as well as special purpose
XPALs and detailed information about the memory layout of each machine.
X
XMESS currently emulates the Nintendo Entertainment System (NES), Sega
XGenesis/Megadrive, TRS-80 models 1 and 3, Colour Genie, Colecovision,
XVectrex, Apple ][ series, Atari 800, Atari 5200, Sega Master System/Game
XGear, Bally Astrocade, Kaypro 2x and PDP-1.
X
XTo play games in X-MESS you must have a copy of the original game,
Xextracted from a cartridge, floppy or tape image.
X
XWWW: http://mess.emuverse.com/
END-of-pkg/DESCR
echo x - pkg/PLIST
sed 's/^X//' >pkg/PLIST << 'END-of-pkg/PLIST'
X@comment $NetBSD: PLIST,v 1.2 1998/08/29 04:24:29 mycroft Exp $
Xbin/xmess
Xlib/xmess/spacewar.zip
Xshare/xmess/xmessrc
X@dirrm lib/xmess
X@dirrm share/xmess
END-of-pkg/PLIST
echo c - patches/
mkdir -p patches/ > /dev/null 2>&1
echo x - patches/patch-aa
sed 's/^X//' >patches/patch-aa << 'END-of-patches/patch-aa'
X$NetBSD: patch-aa,v 1.11 1999/07/27 03:20:38 mycroft Exp $
X
X--- makefile.unix.orig	Wed Aug 26 18:40:21 1998
X+++ makefile.unix	Mon Aug 31 04:06:42 1998
X@@ -39,7 +39,7 @@
X # GNU MAKE is MANDATORY !!!
X # so please give me the path...
X # if GNU make is "native" use this
X-MAKE	= make
X+MAKE	= gmake
X # else ...
X # MAKE=/usr/people/jantonio/bin/gmake
X 
X@@ -99,18 +99,18 @@
X # *** Select destination directory for your compiled program , manual page
X # and binary distribution ( if you want to... )
X # ( only needed to install, not to compile... )
X-DESTDIR = /usr/games
X-MANDIR  = /usr/local/man/man6
X+DESTDIR = ${PREFIX}/bin
X+MANDIR  = ${PREFIX}/man/man6
X DISTDIR = /home/ftp/pub/emulators/$(NAME)
X 
X # *** Where the ROM source tree ?
X-ROMPATH = \"/usr/games/lib/$(NAME)\"
X+ROMPATH = \"${PREFIX}/share/$(NAME)\"
X 
X # *** Where to store high scores ?
X-SDIR = \"/usr/games/lib/$(NAME)\"
X+SDIR = \"${PREFIX}/share/$(NAME)\"
X 
X # *** Where resides global configuration file ?
X-MRC = \"/usr/games/lib/$(NAME)/$(NAME)rc\"
X+MRC = \"${PREFIX}/share/$(NAME)/$(NAME)rc\"
X 
X 
X ##############################################################################
X@@ -118,7 +118,9 @@
X ##############################################################################
X 
X # *** To disable joystick support comment next line
X-# JOY		= -DUSE_JOYSTICK
X+ifeq (${NETBSD_JOYSTICK},yes)
X+JOY		= -DUSE_JOYSTICK
X+endif
X 
X # *** To disable  mouse support comment next line
X MOUSE		= -DUSE_MOUSE
X@@ -137,7 +139,9 @@
X # JSLIB   = -lXi
X 
X # On iX86 based OS's, if supported, you can use standard joystick driver
X-# JS	= -DI386_JOYSTICK
X+ifeq (${NETBSD_JOYSTICK},yes)
X+JS	= -DI386_JOYSTICK
X+endif
X 
X # Linux FM-TOWNS game PAD joystick emulation support
X # Thanks to Osamu Kurati for provided patch
X@@ -158,8 +162,8 @@
X # you might decide to use these feature. Otherwise, you should use a 
X # timer based audio code and ajust in src/unix/sound.h AUDIO_TIMER_FREQ item
X #
X-S_TIM = -DDONTUSE_TIMER
X-# S_TIM = -DUSE_TIMER
X+# S_TIM = -DDONTUSE_TIMER
X+S_TIM = -DUSE_TIMER
X 
X # *** When using timer, you should provide the frequency to generate audio sample
X # frames in your system. See readme.unix notes about these item
X@@ -192,7 +196,7 @@
X # note: x11 is the only one supported on all platforms
X 
X ### normal X11
X-DISPLAY_METHOD = x11
X+#DISPLAY_METHOD = x11
X ### XFree86's DGA extension, only tested under linux
X #DISPLAY_METHOD = xf86_dga
X ### svgalib, only supported under linux
X@@ -215,14 +219,16 @@
X # *** If you haven't  the MIT-Shared Memory X Extensions, comment the following:
X # ( Test if available by mean of xdpyinfo command )
X # Comment it if not compiling  for normal x11
X-# MSHM	= -DUSE_MITSHM
X+ifeq (${DISPLAY_METHOD},x11)
X+MSHM	= -DUSE_MITSHM
X+endif
X 
X # standard location for X11 
X # X11INC		= -I/usr/include/X11
X # X11LIB		= -L/usr/lib/X11
X # standard location for XFree86
X-X11INC		= -I/usr/X11R6/include
X-X11LIB		= -L/usr/X11R6/lib
X+X11INC		= -I${PREFIX}/include
X+X11LIB		= -L${PREFIX}/lib -Wl,-R${PREFIX}/lib
X # for Sun systems 
X # X11INC		= -I/usr/openwin/include
X # X11LIB		= -L/usr/openwin/lib
END-of-patches/patch-aa
echo x - patches/patch-ab
sed 's/^X//' >patches/patch-ab << 'END-of-patches/patch-ab'
X$NetBSD: patch-ab,v 1.4 1998/08/29 19:42:00 frueauf Exp $
X
X--- src/unix/Makefile.orig	Tue Aug 25 07:39:20 1998
X+++ src/unix/Makefile	Fri Aug 28 23:08:49 1998
X@@ -16,6 +16,7 @@
X 
X $(TARGET): $(OBJS)
X 	ar -rcv $@ $(OBJS)
X+	ranlib $@
X 
X $(OBJDIR)/%.o: %.c xmame.h sound.h
X 	$(CC) -I../../src/ $(CFLAGS) -o $@ -c $<
END-of-patches/patch-ab
echo x - patches/patch-ae
sed 's/^X//' >patches/patch-ae << 'END-of-patches/patch-ae'
X$NetBSD: patch-ae,v 1.2 1998/08/07 10:40:37 agc Exp $
X
X--- doc/xmessrc.dist.orig	Tue Jun  9 08:14:22 1998
X+++ doc/xmessrc.dist	Thu Jul  9 08:11:39 1998
X@@ -21,7 +21,7 @@
X ############################ General options ##########################
X #
X # Mess needs a public-writable directory to store high scores
X-spooldir        /var/games/mess
X+spooldir       @MESSDIR@
X 
X # Type here the name of the display where play xmame
X # overriden by DISPLAY environment variable. Not usefull in config file but...
END-of-patches/patch-ae
echo x - patches/patch-af
sed 's/^X//' >patches/patch-af << 'END-of-patches/patch-af'
X$NetBSD: patch-af,v 1.2 1998/08/07 10:40:38 agc Exp $
X
X--- src/unix/devices.c.orig	Wed Jun 17 05:48:00 1998
X+++ src/unix/devices.c	Sat Jul  4 07:42:07 1998
X@@ -60,7 +60,7 @@
X #elif  I386_JOYSTICK
X void i386_poll_joystick (void);
X /* specific joystick for PC clones */
X-#ifdef netbsd_i386
X+#ifdef __FreeBSD__
X #include <machine/joystick.h>
X extern struct joystick joy_data,joy_orig;
X #else
X@@ -658,7 +658,7 @@
X {
X #if ( defined USE_JOYSTICK ) && ( defined  I386_JOYSTICK )
X         int res;
X-#ifdef netbsd_i386
X+#ifdef __FreeBSD__
X 	res = read(joy_fd,&joy_data,sizeof(struct joystick) );
X 	if (res == sizeof(struct joystick )) {
X #else
X@@ -666,7 +666,7 @@
X 	if (res == sizeof(struct JS_DATA_TYPE )) {
X #endif
X 	/* get value of buttons */
X-#ifdef netbsd_i386
X+#ifdef __FreeBSD__
X 	    joy_b1 = joy_data.b1;
X 	    joy_b2 = joy_data.b2;
X #else
END-of-patches/patch-af
echo x - patches/patch-ag
sed 's/^X//' >patches/patch-ag << 'END-of-patches/patch-ag'
XIndex: src/unix/FREEBSD.c
X@@ -10,7 +10,12 @@
X #include "sound.h"
X 
X #ifdef USE_JOYSTICK
X+#ifdef __FreeBSD__
X+#include <machine/joystick.h>
X+#define JS_DATA_TYPE joystick
X+#else
X #include <linux/joystick.h>
X+#endif
X struct 	 JS_DATA_TYPE joy_data,joy_orig;
X int	 joy_fd; /* joystick file descriptor */
X #endif
END-of-patches/patch-ag
echo x - patches/patch-ba
sed 's/^X//' >patches/patch-ba << 'END-of-patches/patch-ba'
XIndex: makefile.unix
X@@ -249,9 +249,9 @@
X ######## Alpha/Linux
X # ARCH  = linux_alpha
X ######## ix86/Linux
X-ARCH  = linux_i386
X+# ARCH  = linux_i386
X ######## ix86/FreeBSD and ix86/BSDi
X-# ARCH  = FREEBSD
X+ARCH  = FREEBSD
X ######## ix86/NetBSD
X # ARCH  = netbsd_i386
X ######## Sparc/SunOS ( no sound )
X@@ -287,7 +287,12 @@
X DEFS.linux_powerpc = -Dlinux -DACORN 
X DEFS.linux_alpha   = -Dlinux -DLSB_FIRST -DAXP_ASM -DACORN
X DEFS.linux_i386    = -Dlinux -DLSB_FIRST -DX86_ASM
X+ifeq (${MACHINE_ARCH},i386)
X DEFS.FREEBSD       = -DLSB_FIRST -DX86_ASM -Dlinux -DFREEBSD_SOUND_WORKAROUND
X+else
X+# someone with an alpha pls check this
X+DEFS.FREEBSD       = -DLSB_FIRST -DACORN -Dlinux -DFREEBSD_SOUND_WORKAROUND
X+endif
X DEFS.netbsd_i386   = -DLSB_FIRST -DX86_ASM -DNETBSD -DUSE_AUDIO
X DEFS.sunos	   = -Dsun -DCLOCKS_PER_SEC=1000000 -DACORN
X DEFS.solaris	   = -Dsun -DACORN 
END-of-patches/patch-ba
echo x - patches/patch-be
sed 's/^X//' >patches/patch-be << 'END-of-patches/patch-be'
XIndex: doc/xmessrc.dist
X@@ -21,7 +21,7 @@
X ############################ General options ##########################
X #
X # Tell mess where to find it's rom/diskimages, : seperated path
X-rompath         /usr/lib/mess:/usr/local/lib/mess:/opt/mess
X+rompath        @MESSLIB@
X 
X # Mess needs a public-writable directory to store high scores
X spooldir       @MESSDIR@
X@@ -77,8 +77,8 @@
X #
X 
X # Define X and Y axis scale related to original bitmap. Default is 1
X-widthscale	2
X-heightscale	2
X+widthscale	1
X+heightscale	1
X 
X # If your screen refresh is to slow, you can skip frames with frameskip option
X frameskip	3
END-of-patches/patch-be
exit


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908171616.SAA98165>