1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

[new port] emulators/m2000 - Philips P2000 emulator

P2000 Emulator

    -  P2000T or P2000M model (P2000M emulation is buggy)
    -  Support for 1 ROM cartridge
    -  User-definable amount of RAM
    -  One tape drive
    -  Sound through PC Speaker or SoundBlaster (MS-DOS version), or
       USS(/Lite) /dev/dsp (Linux/SVGALib and Unix/X versions)
    -  SAA5050 character rounding emulated in high resolution mode

    The tape files should be writable, otherwise the emulator won't load them.

    WWW: http://www.komkon.org/~dekogel/m2000.html

PR:             ports/85263
Submitted by:   Edwin Groothuis <edwin@mavetju.org>
This commit is contained in:
Edwin Groothuis 2005-08-28 10:36:18 +00:00
parent cd0a3ac9e9
commit 4e5bfe1685
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=141076
8 changed files with 256 additions and 0 deletions

View File

@ -68,6 +68,7 @@
SUBDIR += linux_base-suse-9.1
SUBDIR += linux_base-suse-9.2
SUBDIR += linux_base-suse-9.3
SUBDIR += m2000
SUBDIR += mastergear
SUBDIR += minivmac
SUBDIR += mips64emul

82
emulators/m2000/Makefile Normal file
View File

@ -0,0 +1,82 @@
#
# New ports collection makefile for: m2000
# Date created: 2005-08-23
# Whom: Edwin Groothuis <edwin@mavetju.org>
#
# $FreeBSD$
#
PORTNAME= m2000
PORTVERSION= 0.6
CATEGORIES= emulators
MASTER_SITES= http://www.komkon.org/~dekogel/files/p2000/:code \
ftp://ftp.komkon.org/pub/EMUL8/P2000/Tapes/:tapes
DISTFILES= ${PORTNAME:U}${EXTRACT_SUFX}:code \
tapeconv.zip:code \
${M2000TAPES:S/$/.gz:tapes/}
DIST_SUBDIR= m2000
EXTRACT_ONLY= ${PORTNAME:U}${EXTRACT_SUFX}
MAINTAINER= edwin@mavetju.org
COMMENT= M2000 is a portable emulator for the P2000 home computer
M2000TAPES= 3DDoolhof2.cas \
BrickWall.cas \
Componist.cas \
ElevatorHumpie.cas \
ErrorSoft1.cas \
Fraxxon.cas \
KleurenDemo.cas \
LazyBug.cas \
MachoMan.cas \
MonkeyKong.cas \
Snakey.cas \
SpaceAttack.cas \
SpaceFight.cas \
SpaceMission.cas \
SpeelPalijs.cas \
StarTrek.cas \
VluchtSimulator.cas
WRKSRC= ${WRKDIR}/P2000
ALL_TARGET= x
SUB_FILES= m2000.sh
USE_UNZIP= yes
post-extract:
${MKDIR} ${WRKDIR}/tapeconv
${UNZIP_CMD} ${DISTDIR}/${DIST_SUBDIR}/tapeconv.zip -d ${WRKDIR}/tapeconv
${MV} ${WRKDIR}/tapeconv/PCM2CAS.C ${WRKDIR}/tapeconv/PCM2CAS.c
post-build:
${CC} -o ${WRKDIR}/tapeconv/PCM2CAS ${WRKDIR}/tapeconv/PCM2CAS.c
do-install:
@${INSTALL_SCRIPT} ${WRKDIR}/m2000.sh ${PREFIX}/bin/m2000
@${INSTALL_PROGRAM} ${WRKDIR}/tapeconv/PCM2CAS ${PREFIX}/bin/tapeconv
@${MKDIR} ${PREFIX}/share/m2000/
@${INSTALL_PROGRAM} ${WRKSRC}/m2000 ${PREFIX}/share/m2000
@${INSTALL_DATA} ${WRKSRC}/P2000ROM.bin ${PREFIX}/share/m2000
@${INSTALL_DATA} ${WRKSRC}/Default.fnt ${PREFIX}/share/m2000
@${INSTALL_DATA} ${WRKSRC}/BASIC.bin ${PREFIX}/share/m2000
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/M2000.txt ${DOCSDIR}
.for f in ${M2000TAPES}
@${GZCAT} ${DISTDIR}/${DIST_SUBDIR}/${f}.gz > ${WRKDIR}/${f}
@${INSTALL_DATA} ${WRKDIR}/${f} ${PREFIX}/share/m2000
.endfor
post-install:
@${ECHO_CMD} "Run 'make install-user' to install the tapes in your own directory"
install-user:
@${ECHO_CMD} "Copying tapes to ${HOME}/.m2000..."
@${MKDIR} ${HOME}/.m2000
.for f in ${M2000TAPES}
@${INSTALL_DATA} ${WRKDIR}/${f} ${HOME}/.m2000
@${CHMOD} u+w ${HOME}/.m2000/${f}
.endfor
@${ECHO_CMD} "Done. Now start it with 'm2000 [tapename]' and execute the commands 'cload' and 'run'"
.include <bsd.port.mk>

38
emulators/m2000/distinfo Normal file
View File

@ -0,0 +1,38 @@
MD5 (m2000/M2000.tar.gz) = 52513a1276454893fc2a5df562814b1e
SIZE (m2000/M2000.tar.gz) = 96824
MD5 (m2000/tapeconv.zip) = 0fcb2c17f91ad7f35667a25e84019b4c
SIZE (m2000/tapeconv.zip) = 31353
MD5 (m2000/3DDoolhof2.cas.gz) = 796960ecf25104798d84e5dd18900d85
SIZE (m2000/3DDoolhof2.cas.gz) = 5676
MD5 (m2000/BrickWall.cas.gz) = 5d09884bd589d0f8e5eca18bb2af2393
SIZE (m2000/BrickWall.cas.gz) = 6276
MD5 (m2000/Componist.cas.gz) = 2f004f8710e8664580f792a0e21f229b
SIZE (m2000/Componist.cas.gz) = 4964
MD5 (m2000/ElevatorHumpie.cas.gz) = e7bc0604da81bfdead1eb70d56db93b3
SIZE (m2000/ElevatorHumpie.cas.gz) = 3530
MD5 (m2000/ErrorSoft1.cas.gz) = 18f72fbd11c94cc4c7f7a71abfb1618d
SIZE (m2000/ErrorSoft1.cas.gz) = 9300
MD5 (m2000/Fraxxon.cas.gz) = b2fda31791a40be4c15f3de212f869d4
SIZE (m2000/Fraxxon.cas.gz) = 13409
MD5 (m2000/KleurenDemo.cas.gz) = 5a308c9e993b155f4431d7f881d0cb38
SIZE (m2000/KleurenDemo.cas.gz) = 6564
MD5 (m2000/LazyBug.cas.gz) = 731ff499d38d24893d398b730cb6d384
SIZE (m2000/LazyBug.cas.gz) = 5719
MD5 (m2000/MachoMan.cas.gz) = 6961df6c4dcd29a3fcc24e8e7116139b
SIZE (m2000/MachoMan.cas.gz) = 5651
MD5 (m2000/MonkeyKong.cas.gz) = ee66dd6ad3884301e01b1c0ce81529bf
SIZE (m2000/MonkeyKong.cas.gz) = 4510
MD5 (m2000/Snakey.cas.gz) = 035a9f44bb83d6275eb30b0a8593f95e
SIZE (m2000/Snakey.cas.gz) = 4076
MD5 (m2000/SpaceAttack.cas.gz) = 67e851b5639e5972f5cb13093660f195
SIZE (m2000/SpaceAttack.cas.gz) = 5869
MD5 (m2000/SpaceFight.cas.gz) = 65ff0ae9414ea82244b20dd1d488a445
SIZE (m2000/SpaceFight.cas.gz) = 5301
MD5 (m2000/SpaceMission.cas.gz) = be92059fecebd662afdd8608cd60ac93
SIZE (m2000/SpaceMission.cas.gz) = 8706
MD5 (m2000/SpeelPalijs.cas.gz) = 8ac3d9232bd3358df50ba3d6e337463c
SIZE (m2000/SpeelPalijs.cas.gz) = 6503
MD5 (m2000/StarTrek.cas.gz) = c6e0c6d9c97a08700818181d0d36a645
SIZE (m2000/StarTrek.cas.gz) = 6533
MD5 (m2000/VluchtSimulator.cas.gz) = 11c82a825dfc94ddaa3a0476e492bce8
SIZE (m2000/VluchtSimulator.cas.gz) = 18397

View File

@ -0,0 +1,41 @@
#!/bin/sh
#
# m2000 doesn't seem to like tapes which are not writable.
# Therefor the tapes are installed to ${HOME}/.m2000 and need to
# be started from there
#
if [ -z "$1" ]; then
echo "Usage: $0 [tape] [options...]"
cd %%PREFIX%%/share/m2000
./m2000
exit
fi
if [ "`echo $1 | cut -c 1`" = "-" ]; then
cd %%PREFIX%%/share/m2000
./m2000 $*
exit
fi
tape=$1
shift
if [ "`dirname ${tape}`" = "." ]; then
tape=${HOME}/.m2000/${tape}
fi
if [ ! -f ${tape} ]; then
tape=${tape}.cas
fi
if [ ! -f ${tape} ]; then
echo "m2000-wrapper: ${tape} not found."
exit
fi
if [ ! -w ${tape} ]; then
echo "m2000-wrapper: ${tape} not writable."
exit
fi
cd %%PREFIX%%/share/m2000
./m2000 -tape ${tape} $*

View File

@ -0,0 +1,39 @@
--- Makefile.X.orig Fri Feb 14 04:53:43 1997
+++ Makefile.X Wed Aug 24 16:01:47 2005
@@ -18,14 +18,14 @@
# aware though, screen refresh is much slower when shared
# memory is not used
-CC = gcc # C compiler used
-LD = gcc # Linker used
+CC ?= gcc # C compiler used
+LD ?= gcc # Linker used
-CFLAGS = -Wall -fomit-frame-pointer -O2 -I/usr/X11/include \
+CFLAGS += -Wall -fomit-frame-pointer -O2 -I${X11BASE}/include \
-DLSB_FIRST -DHAVE_FTRUNCATE -DHAVE_CLOCK -DUNIX_X \
-DSOUND -DMITSHM
-LFLAGS = -s -L/usr/X11/lib
+LFLAGS += -L${X11BASE}/lib
OBJECTS = M2000.o P2000.o Z80.o Z80Debug.o \
Unix.o X.o
@@ -33,13 +33,13 @@
all: m2000 fontc splitape z80dasm
m2000: $(OBJECTS)
- $(LD) $(LFLAGS) -o m2000 $(OBJECTS) -lXext -lX11
+ $(CC) $(LFLAGS) -o m2000 $(OBJECTS) -lXext -lX11
fontc: fontc.o
- $(LD) $(LFLAGS) -o fontc fontc.o
+ $(CC) $(LFLAGS) -o fontc fontc.o
splitape: splitape.o
- $(LD) $(LFLAGS) -o splitape splitape.o
+ $(CC) $(LFLAGS) -o splitape splitape.o
z80dasm: Z80Dasm.o
- $(LD) $(LFLAGS) -o z80dasm Z80Dasm.o
+ $(CC) $(LFLAGS) -o z80dasm Z80Dasm.o
M2000.o: M2000.c P2000.h Z80.h Help.h Z80IO.h
P2000.o: P2000.c P2000.h Z80.h Z80IO.h

View File

@ -0,0 +1,11 @@
--- X.c.orig Wed Aug 24 15:59:59 2005
+++ X.c Wed Aug 24 16:00:08 2005
@@ -290,7 +290,7 @@
DefaultGC=DefaultGCOfScreen (Scr);
DefaultCMap=DefaultColormapOfScreen (Scr);
bpp=DefaultDepthOfScreen (Scr);
- if (bpp!=8 && bpp!=16 && bpp!=32)
+ if (bpp!=8 && bpp!=16 && bpp!=24 && bpp!=32)
{
printf ("FAILED - Only 8,16 and 32 bpp displays are supported\n");
return 0;

14
emulators/m2000/pkg-descr Normal file
View File

@ -0,0 +1,14 @@
P2000 Emulator
- P2000T or P2000M model (P2000M emulation is buggy)
- Support for 1 ROM cartridge
- User-definable amount of RAM
- One tape drive
- Sound through PC Speaker or SoundBlaster (MS-DOS version), or
USS(/Lite) /dev/dsp (Linux/SVGALib and Unix/X versions)
- SAA5050 character rounding emulated in high resolution mode
The tape files should be writable, otherwise the emulator won't load them.
WWW: http://www.komkon.org/~dekogel/m2000.html
Author: Marcel de Kogel <dekogel@giganda.komkon.org>

30
emulators/m2000/pkg-plist Normal file
View File

@ -0,0 +1,30 @@
bin/m2000
bin/tapeconv
share/m2000/m2000
share/m2000/P2000ROM.bin
share/m2000/BASIC.bin
share/m2000/Default.fnt
share/m2000/3DDoolhof2.cas
share/m2000/BrickWall.cas
share/m2000/Componist.cas
share/m2000/ElevatorHumpie.cas
share/m2000/ErrorSoft1.cas
share/m2000/Fraxxon.cas
share/m2000/KleurenDemo.cas
share/m2000/LazyBug.cas
share/m2000/MachoMan.cas
share/m2000/MonkeyKong.cas
share/m2000/Snakey.cas
share/m2000/SpaceAttack.cas
share/m2000/SpaceFight.cas
share/m2000/SpaceMission.cas
share/m2000/SpeelPalijs.cas
share/m2000/StarTrek.cas
share/m2000/VluchtSimulator.cas
%%DOCSDIR%%/M2000.txt
@dirrm share/m2000