1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-23 20:51:43 +00:00
freebsd-ports/emulators/m2000/files/m2000.sh.in
Edwin Groothuis 4e5bfe1685 [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>
2005-08-28 10:36:18 +00:00

42 lines
703 B
Bash

#!/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} $*