Date: Wed, 24 Aug 2005 18:29:28 +1000 (EST) From: Edwin Groothuis <edwin@mavetju.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/85263: [new port] emulators/m2000 - Philips P2000 emulator Message-ID: <20050824082928.50DC9629B@k7.mavetju> Resent-Message-ID: <200508240830.j7O8U8bx080277@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 85263 >Category: ports >Synopsis: [new port] emulators/m2000 - Philips P2000 emulator >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Aug 24 08:30:08 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Edwin Groothuis >Release: FreeBSD 5.2.1-RELEASE i386 >Organization: - >Environment: System: FreeBSD k7.mavetju 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #8: Wed Dec 15 16:58:01 EST 2004 edwin@k7.mavetju:/usr/src-5.2.1/sys/i386/compile/k7 i386 >Description: Safe keeping for after ports freeze >How-To-Repeat: >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: # # m2000/ # m2000/Makefile # m2000/distinfo # m2000/files # m2000/files/patch-Makefile.X # m2000/files/m2000.sh.in # m2000/files/patch-X.c # m2000/pkg-plist # m2000/pkg-descr # echo c - m2000/ mkdir -p m2000/ > /dev/null 2>&1 echo x - m2000/Makefile sed 's/^X//' >m2000/Makefile << 'END-of-m2000/Makefile' X# X# New ports collection makefile for: m2000 X# Date created: 2005-08-23 X# Whom: Edwin Groothuis <edwin@mavetju.org> X# X# $FreeBSD$ X# X XPORTNAME= m2000 XPORTVERSION= 0.6 XCATEGORIES= emulators XMASTER_SITES= http://www.komkon.org/~dekogel/files/p2000/:code \ X ftp://ftp.komkon.org/pub/EMUL8/P2000/Tapes/:tapes XDISTFILES= ${PORTNAME:U}${EXTRACT_SUFX}:code \ X tapeconv.zip:code \ X ${M2000TAPES:S/$/.gz:tapes/} XDIST_SUBDIR= m2000 XEXTRACT_ONLY= ${PORTNAME:U}${EXTRACT_SUFX} X XMAINTAINER= edwin@mavetju.org XCOMMENT= M2000 is a portable emulator for the P2000 home computer X XM2000TAPES= 3DDoolhof2.cas \ X BrickWall.cas \ X Componist.cas \ X ElevatorHumpie.cas \ X ErrorSoft1.cas \ X Fraxxon.cas \ X KleurenDemo.cas \ X LazyBug.cas \ X MachoMan.cas \ X MonkeyKong.cas \ X Snakey.cas \ X SpaceAttack.cas \ X SpaceFight.cas \ X SpaceMission.cas \ X SpeelPalijs.cas \ X StarTrek.cas \ X VluchtSimulator.cas X XWRKSRC= ${WRKDIR}/P2000 XALL_TARGET= x X XSUB_FILES= m2000.sh XUSE_UNZIP= yes X Xpost-extract: X ${MKDIR} ${WRKDIR}/tapeconv X ${UNZIP_CMD} ${DISTDIR}/${DIST_SUBDIR}/tapeconv.zip -d ${WRKDIR}/tapeconv X ${MV} ${WRKDIR}/tapeconv/PCM2CAS.C ${WRKDIR}/tapeconv/PCM2CAS.c X Xpost-build: X ${CC} -o ${WRKDIR}/tapeconv/PCM2CAS ${WRKDIR}/tapeconv/PCM2CAS.c X Xdo-install: X @${INSTALL_SCRIPT} ${WRKDIR}/m2000.sh ${PREFIX}/bin/m2000 X @${INSTALL_PROGRAM} ${WRKDIR}/tapeconv/PCM2CAS ${PREFIX}/bin/tapeconv X @${MKDIR} ${PREFIX}/share/m2000/ X @${INSTALL_PROGRAM} ${WRKSRC}/m2000 ${PREFIX}/share/m2000 X @${INSTALL_DATA} ${WRKSRC}/P2000ROM.bin ${PREFIX}/share/m2000 X @${INSTALL_DATA} ${WRKSRC}/Default.fnt ${PREFIX}/share/m2000 X @${INSTALL_DATA} ${WRKSRC}/BASIC.bin ${PREFIX}/share/m2000 X @${MKDIR} ${DOCSDIR} X @${INSTALL_DATA} ${WRKSRC}/M2000.txt ${DOCSDIR} X.for f in ${M2000TAPES} X @${GZCAT} ${DISTDIR}/${DIST_SUBDIR}/${f}.gz > ${WRKDIR}/${f} X @${INSTALL_DATA} ${WRKDIR}/${f} ${PREFIX}/share/m2000 X.endfor X Xpost-install: X @${ECHO_CMD} "Run 'make install-user' to install the tapes in your own directory" X Xinstall-user: X @${ECHO_CMD} "Copying tapes to ${HOME}/.m2000..." X @${MKDIR} ${HOME}/.m2000 X.for f in ${M2000TAPES} X @${INSTALL_DATA} ${WRKDIR}/${f} ${HOME}/.m2000 X @${CHMOD} u+w ${HOME}/.m2000/${f} X.endfor X @${ECHO_CMD} "Done. Now start it with 'm2000 [tapename]' and execute the commands 'cload' and 'run'" X X.include <bsd.port.mk> END-of-m2000/Makefile echo x - m2000/distinfo sed 's/^X//' >m2000/distinfo << 'END-of-m2000/distinfo' XMD5 (m2000/M2000.tar.gz) = 52513a1276454893fc2a5df562814b1e XSIZE (m2000/M2000.tar.gz) = 96824 XMD5 (m2000/tapeconv.zip) = 0fcb2c17f91ad7f35667a25e84019b4c XSIZE (m2000/tapeconv.zip) = 31353 XMD5 (m2000/3DDoolhof2.cas.gz) = 796960ecf25104798d84e5dd18900d85 XSIZE (m2000/3DDoolhof2.cas.gz) = 5676 XMD5 (m2000/BrickWall.cas.gz) = 5d09884bd589d0f8e5eca18bb2af2393 XSIZE (m2000/BrickWall.cas.gz) = 6276 XMD5 (m2000/Componist.cas.gz) = 2f004f8710e8664580f792a0e21f229b XSIZE (m2000/Componist.cas.gz) = 4964 XMD5 (m2000/ElevatorHumpie.cas.gz) = e7bc0604da81bfdead1eb70d56db93b3 XSIZE (m2000/ElevatorHumpie.cas.gz) = 3530 XMD5 (m2000/ErrorSoft1.cas.gz) = 18f72fbd11c94cc4c7f7a71abfb1618d XSIZE (m2000/ErrorSoft1.cas.gz) = 9300 XMD5 (m2000/Fraxxon.cas.gz) = b2fda31791a40be4c15f3de212f869d4 XSIZE (m2000/Fraxxon.cas.gz) = 13409 XMD5 (m2000/KleurenDemo.cas.gz) = 5a308c9e993b155f4431d7f881d0cb38 XSIZE (m2000/KleurenDemo.cas.gz) = 6564 XMD5 (m2000/LazyBug.cas.gz) = 731ff499d38d24893d398b730cb6d384 XSIZE (m2000/LazyBug.cas.gz) = 5719 XMD5 (m2000/MachoMan.cas.gz) = 6961df6c4dcd29a3fcc24e8e7116139b XSIZE (m2000/MachoMan.cas.gz) = 5651 XMD5 (m2000/MonkeyKong.cas.gz) = ee66dd6ad3884301e01b1c0ce81529bf XSIZE (m2000/MonkeyKong.cas.gz) = 4510 XMD5 (m2000/Snakey.cas.gz) = 035a9f44bb83d6275eb30b0a8593f95e XSIZE (m2000/Snakey.cas.gz) = 4076 XMD5 (m2000/SpaceAttack.cas.gz) = 67e851b5639e5972f5cb13093660f195 XSIZE (m2000/SpaceAttack.cas.gz) = 5869 XMD5 (m2000/SpaceFight.cas.gz) = 65ff0ae9414ea82244b20dd1d488a445 XSIZE (m2000/SpaceFight.cas.gz) = 5301 XMD5 (m2000/SpaceMission.cas.gz) = be92059fecebd662afdd8608cd60ac93 XSIZE (m2000/SpaceMission.cas.gz) = 8706 XMD5 (m2000/SpeelPalijs.cas.gz) = 8ac3d9232bd3358df50ba3d6e337463c XSIZE (m2000/SpeelPalijs.cas.gz) = 6503 XMD5 (m2000/StarTrek.cas.gz) = c6e0c6d9c97a08700818181d0d36a645 XSIZE (m2000/StarTrek.cas.gz) = 6533 XMD5 (m2000/VluchtSimulator.cas.gz) = 11c82a825dfc94ddaa3a0476e492bce8 XSIZE (m2000/VluchtSimulator.cas.gz) = 18397 END-of-m2000/distinfo echo c - m2000/files mkdir -p m2000/files > /dev/null 2>&1 echo x - m2000/files/patch-Makefile.X sed 's/^X//' >m2000/files/patch-Makefile.X << 'END-of-m2000/files/patch-Makefile.X' X--- Makefile.X.orig Fri Feb 14 04:53:43 1997 X+++ Makefile.X Wed Aug 24 16:01:47 2005 X@@ -18,14 +18,14 @@ X # aware though, screen refresh is much slower when shared X # memory is not used X X-CC = gcc # C compiler used X-LD = gcc # Linker used X+CC ?= gcc # C compiler used X+LD ?= gcc # Linker used X X-CFLAGS = -Wall -fomit-frame-pointer -O2 -I/usr/X11/include \ X+CFLAGS += -Wall -fomit-frame-pointer -O2 -I${X11BASE}/include \ X -DLSB_FIRST -DHAVE_FTRUNCATE -DHAVE_CLOCK -DUNIX_X \ X -DSOUND -DMITSHM X X-LFLAGS = -s -L/usr/X11/lib X+LFLAGS += -L${X11BASE}/lib X X OBJECTS = M2000.o P2000.o Z80.o Z80Debug.o \ X Unix.o X.o X@@ -33,13 +33,13 @@ X all: m2000 fontc splitape z80dasm X X m2000: $(OBJECTS) X- $(LD) $(LFLAGS) -o m2000 $(OBJECTS) -lXext -lX11 X+ $(CC) $(LFLAGS) -o m2000 $(OBJECTS) -lXext -lX11 X fontc: fontc.o X- $(LD) $(LFLAGS) -o fontc fontc.o X+ $(CC) $(LFLAGS) -o fontc fontc.o X splitape: splitape.o X- $(LD) $(LFLAGS) -o splitape splitape.o X+ $(CC) $(LFLAGS) -o splitape splitape.o X z80dasm: Z80Dasm.o X- $(LD) $(LFLAGS) -o z80dasm Z80Dasm.o X+ $(CC) $(LFLAGS) -o z80dasm Z80Dasm.o X X M2000.o: M2000.c P2000.h Z80.h Help.h Z80IO.h X P2000.o: P2000.c P2000.h Z80.h Z80IO.h END-of-m2000/files/patch-Makefile.X echo x - m2000/files/m2000.sh.in sed 's/^X//' >m2000/files/m2000.sh.in << 'END-of-m2000/files/m2000.sh.in' X#!/bin/sh X X# X# m2000 doesn't seem to like tapes which are not writable. X# Therefor the tapes are installed to ${HOME}/.m2000 and need to X# be started from there X# X Xif [ -z "$1" ]; then X echo "Usage: $0 [tape] [options...]" X cd %%PREFIX%%/share/m2000 X ./m2000 X exit Xfi X Xif [ "`echo $1 | cut -c 1`" = "-" ]; then X cd %%PREFIX%%/share/m2000 X ./m2000 $* X exit Xfi X Xtape=$1 Xshift X Xif [ "`dirname ${tape}`" = "." ]; then X tape=${HOME}/.m2000/${tape} Xfi Xif [ ! -f ${tape} ]; then X tape=${tape}.cas Xfi Xif [ ! -f ${tape} ]; then X echo "m2000-wrapper: ${tape} not found." X exit Xfi Xif [ ! -w ${tape} ]; then X echo "m2000-wrapper: ${tape} not writable." X exit Xfi X Xcd %%PREFIX%%/share/m2000 X./m2000 -tape ${tape} $* END-of-m2000/files/m2000.sh.in echo x - m2000/files/patch-X.c sed 's/^X//' >m2000/files/patch-X.c << 'END-of-m2000/files/patch-X.c' X--- X.c.orig Wed Aug 24 15:59:59 2005 X+++ X.c Wed Aug 24 16:00:08 2005 X@@ -290,7 +290,7 @@ X DefaultGC=DefaultGCOfScreen (Scr); X DefaultCMap=DefaultColormapOfScreen (Scr); X bpp=DefaultDepthOfScreen (Scr); X- if (bpp!=8 && bpp!=16 && bpp!=32) X+ if (bpp!=8 && bpp!=16 && bpp!=24 && bpp!=32) X { X printf ("FAILED - Only 8,16 and 32 bpp displays are supported\n"); X return 0; END-of-m2000/files/patch-X.c echo x - m2000/pkg-plist sed 's/^X//' >m2000/pkg-plist << 'END-of-m2000/pkg-plist' Xbin/m2000 Xbin/tapeconv X Xshare/m2000/m2000 X Xshare/m2000/P2000ROM.bin Xshare/m2000/BASIC.bin Xshare/m2000/Default.fnt X Xshare/m2000/3DDoolhof2.cas Xshare/m2000/BrickWall.cas Xshare/m2000/Componist.cas Xshare/m2000/ElevatorHumpie.cas Xshare/m2000/ErrorSoft1.cas Xshare/m2000/Fraxxon.cas Xshare/m2000/KleurenDemo.cas Xshare/m2000/LazyBug.cas Xshare/m2000/MachoMan.cas Xshare/m2000/MonkeyKong.cas Xshare/m2000/Snakey.cas Xshare/m2000/SpaceAttack.cas Xshare/m2000/SpaceFight.cas Xshare/m2000/SpaceMission.cas Xshare/m2000/SpeelPalijs.cas Xshare/m2000/StarTrek.cas Xshare/m2000/VluchtSimulator.cas X X%%DOCSDIR%%/M2000.txt X X@dirrm share/m2000 END-of-m2000/pkg-plist echo x - m2000/pkg-descr sed 's/^X//' >m2000/pkg-descr << 'END-of-m2000/pkg-descr' XP2000 Emulator X X- P2000T or P2000M model (P2000M emulation is buggy) X- Support for 1 ROM cartridge X- User-definable amount of RAM X- One tape drive X- Sound through PC Speaker or SoundBlaster (MS-DOS version), or X USS(/Lite) /dev/dsp (Linux/SVGALib and Unix/X versions) X- SAA5050 character rounding emulated in high resolution mode X XThe tape files should be writable, otherwise the emulator won't load them. X XWWW: http://www.komkon.org/~dekogel/m2000.html XAuthor: Marcel de Kogel <dekogel@giganda.komkon.org> END-of-m2000/pkg-descr exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050824082928.50DC9629B>