diff options
author | skrll <skrll> | 2000-05-22 22:13:11 +0000 |
---|---|---|
committer | skrll <skrll> | 2000-05-22 22:13:11 +0000 |
commit | f37bcbb6beceb0872a043ff6f8a059091b1eac7e (patch) | |
tree | 0552c749b350306265179425372fc0587c066635 /emulators/xbeeb | |
parent | 477da4c8e29ff2e7492b89bc9710db77482d5d2f (diff) | |
download | pkgsrc-f37bcbb6beceb0872a043ff6f8a059091b1eac7e.tar.gz |
Import of xbeeb package.
Based on PR/10013 by Dave Sainty <dave@dtsp.co.nz> with improvements by
myself.
Diffstat (limited to 'emulators/xbeeb')
-rw-r--r-- | emulators/xbeeb/Makefile | 53 | ||||
-rw-r--r-- | emulators/xbeeb/files/md5 | 3 | ||||
-rw-r--r-- | emulators/xbeeb/files/patch-sum | 6 | ||||
-rw-r--r-- | emulators/xbeeb/patches/patch-aa | 13 | ||||
-rw-r--r-- | emulators/xbeeb/patches/patch-ab | 123 | ||||
-rw-r--r-- | emulators/xbeeb/patches/patch-ac | 24 | ||||
-rw-r--r-- | emulators/xbeeb/patches/patch-ad | 25 | ||||
-rw-r--r-- | emulators/xbeeb/pkg/COMMENT | 1 | ||||
-rw-r--r-- | emulators/xbeeb/pkg/DESCR | 6 | ||||
-rw-r--r-- | emulators/xbeeb/pkg/MESSAGE | 0 | ||||
-rw-r--r-- | emulators/xbeeb/pkg/PLIST | 33 |
11 files changed, 287 insertions, 0 deletions
diff --git a/emulators/xbeeb/Makefile b/emulators/xbeeb/Makefile new file mode 100644 index 00000000000..4da9a8c379e --- /dev/null +++ b/emulators/xbeeb/Makefile @@ -0,0 +1,53 @@ +# $NetBSD: Makefile,v 1.1.1.1 2000/05/22 22:13:11 skrll Exp $ +# + +DISTNAME= xbeeb-0.3.6 +CATEGORIES= emulators x11 +MASTER_SITES= ftp://ftp.netcom.net.uk/pub/Micros/BBC/Emulators/Xbeeb/ + +MAINTAINER= skrll@netbsd.org +HOMEPAGE= http://www.netcomuk.co.uk/~james/BBCMicro/Xbeeb/index.html + +USE_IMAKE= yes +WRKSRC= ${WRKDIR}/xbeeb +PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC + +XBEEBROOT= share/xbeeb + +# xbeeb build starts in the source directory +do-configure: + cd ${WRKSRC}/src && ${XMKMF} + +post-patch: + (cd ${WRKSRC}/src && \ + ${MV} Config.h Config.h.dist && \ + ${SED} 's+^\(#define[ ]*XBEEBROOT[ ]*\)[^ ].*$$+\1"${PREFIX}/${XBEEBROOT}/"+' Config.h.dist > Config.h) + ${SED} 's+#XBEEBROOT#+${XBEEBROOT}+g' ${PKGDIR}/PLIST > ${PLIST_SRC} + +do-build: + (cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} xbeeb) + (cd ${WRKSRC}/fonts && \ + for i in *.bdf ; \ + do \ + bdftopcf $$i -o `basename $$i .bdf`.pcf ; \ + done) + ${ECHO} > ${MESSAGE_FILE} "You must copy the BBC \"BASIC2\" ROM image to" + ${ECHO} >> ${MESSAGE_FILE} "\"${PREFIX}/${XBEEBROOT}/roms/BASIC2.rom\"" + ${ECHO} >> ${MESSAGE_FILE} "and the BBC \"OS1.2\" ROM image to" + ${ECHO} >> ${MESSAGE_FILE} "\"${PREFIX}/${XBEEBROOT}/roms/OS1.2.rom\"." + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/xbeeb ${PREFIX}/bin/xbeeb + ${MKDIR} ${PREFIX}/${XBEEBROOT} + ${MKDIR} ${PREFIX}/${XBEEBROOT}/roms + ${MKDIR} ${PREFIX}/${XBEEBROOT}/docs + ${INSTALL_DATA} ${WRKSRC}/roms/xdfs0.70.rom ${PREFIX}/${XBEEBROOT}/roms/xdfs0.70.rom + for docfile in ${WRKSRC}/doc/*; do \ + ${INSTALL_DATA} $$docfile ${PREFIX}/${XBEEBROOT}/docs; \ + done + ${MKDIR} ${PREFIX}/lib/X11/fonts/xbeeb + ${CP} ${WRKSRC}/fonts/*.pcf ${PREFIX}/lib/X11/fonts/xbeeb + ${TOUCH} ${PREFIX}/lib/X11/fonts/xbeeb/fonts.alias + mkfontdir ${PREFIX}/lib/X11/fonts/xbeeb + +.include "../../mk/bsd.pkg.mk" diff --git a/emulators/xbeeb/files/md5 b/emulators/xbeeb/files/md5 new file mode 100644 index 00000000000..8ba79ff8ec8 --- /dev/null +++ b/emulators/xbeeb/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2000/05/22 22:13:12 skrll Exp $ + +MD5 (xbeeb-0.3.6.tar.gz) = 4915725e16da7d5f4caf8e77ed1852a5 diff --git a/emulators/xbeeb/files/patch-sum b/emulators/xbeeb/files/patch-sum new file mode 100644 index 00000000000..008a9d13c5f --- /dev/null +++ b/emulators/xbeeb/files/patch-sum @@ -0,0 +1,6 @@ +$NetBSD: patch-sum,v 1.1.1.1 2000/05/22 22:13:12 skrll Exp $ + +MD5 (patch-aa) = fb7bcabd86dd9b7d74fb080914a859b0 +MD5 (patch-ab) = ac9569a95d2d8162e08983d4e1a415ff +MD5 (patch-ac) = 4be16f01974cf59ce64207f719c6ea60 +MD5 (patch-ad) = 08731e4535ef5ca07fb51ebafcdd761b diff --git a/emulators/xbeeb/patches/patch-aa b/emulators/xbeeb/patches/patch-aa new file mode 100644 index 00000000000..2ac2c2a3c12 --- /dev/null +++ b/emulators/xbeeb/patches/patch-aa @@ -0,0 +1,13 @@ +$NetBSD: patch-aa,v 1.1.1.1 2000/05/22 22:13:12 skrll Exp $ + +--- src/Imakefile Tue Oct 8 13:04:30 1996 ++++ src/Imakefile Sat Apr 29 16:46:01 2000 +@@ -76,7 +76,7 @@ + # + # SYS_LIBRARIES may need to include -lsocket and -lnsl... + # +-SYS_LIBRARIES = -lm ++SYS_LIBRARIES = -lm -lossaudio + + # + # LOCAL_LIBRARIES are the X libraries to link... diff --git a/emulators/xbeeb/patches/patch-ab b/emulators/xbeeb/patches/patch-ab new file mode 100644 index 00000000000..b4aa7f2e3c9 --- /dev/null +++ b/emulators/xbeeb/patches/patch-ab @@ -0,0 +1,123 @@ +$NetBSD: patch-ab,v 1.1.1.1 2000/05/22 22:13:12 skrll Exp $ + +--- src/VoxWare.c Fri Oct 11 10:53:13 1996 ++++ src/VoxWare.c Sat Apr 29 18:29:53 2000 +@@ -51,6 +51,7 @@ + + #include <sys/types.h> + #include <sys/ioctl.h> ++#include <sys/midiio.h> + #include <unistd.h> + + #include "Config.h" +@@ -60,7 +61,73 @@ + #include <math.h> + #include <stdio.h> + #include <fcntl.h> +-#include <sys/soundcard.h> ++#include <soundcard.h> ++ ++/* Pseudo controllers (not midi compatible) */ ++#define CTRL_PITCH_BENDER 255 ++#define CTRL_PITCH_BENDER_RANGE 254 ++#define CTL_PAN 0x0a ++ ++/* Linux -> NetBSD */ ++#define EV_CHN_COMMON SEQ_CHN_COMMON ++#define EV_CHN_VOICE SEQ_CHN_VOICE ++#define SEQ_CONTROLLER SEQOLD_CONTROLLER ++#define SEQ_EXTENDED SEQOLD_EXTENDED ++ ++/* Missing soundcard.h definitions */ ++#define SEQ_PGM_CHANGE(dev, chn, patch) \ ++ _CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0) ++#define SEQ_SET_PATCH SEQ_PGM_CHANGE ++ ++#define _CHN_COMMON(dev, event, chn, p1, p2, w14) \ ++ {_SEQ_NEEDBUF(8);\ ++ _seqbuf[_seqbufptr] = EV_CHN_COMMON;\ ++ _seqbuf[_seqbufptr+1] = (dev);\ ++ _seqbuf[_seqbufptr+2] = (event);\ ++ _seqbuf[_seqbufptr+3] = (chn);\ ++ _seqbuf[_seqbufptr+4] = (p1);\ ++ _seqbuf[_seqbufptr+5] = (p2);\ ++ *(short *)&_seqbuf[_seqbufptr+6] = (w14);\ ++ _SEQ_ADVBUF(8);} ++#define SEQ_V2_X_CONTROL(dev, voice, controller, value) {_SEQ_NEEDBUF(8);\ ++ _seqbuf[_seqbufptr] = SEQ_EXTENDED;\ ++ _seqbuf[_seqbufptr+1] = SEQ_CONTROLLER;\ ++ _seqbuf[_seqbufptr+2] = (dev);\ ++ _seqbuf[_seqbufptr+3] = (voice);\ ++ _seqbuf[_seqbufptr+4] = (controller);\ ++ _seqbuf[_seqbufptr+5] = ((value)&0xff);\ ++ _seqbuf[_seqbufptr+6] = ((value>>8)&0xff);\ ++ _seqbuf[_seqbufptr+7] = 0;\ ++ _SEQ_ADVBUF(8);} ++#define _CHN_VOICE(dev, event, chn, note, parm) \ ++ {_SEQ_NEEDBUF(8);\ ++ _seqbuf[_seqbufptr] = EV_CHN_VOICE;\ ++ _seqbuf[_seqbufptr+1] = (dev);\ ++ _seqbuf[_seqbufptr+2] = (event);\ ++ _seqbuf[_seqbufptr+3] = (chn);\ ++ _seqbuf[_seqbufptr+4] = (note);\ ++ _seqbuf[_seqbufptr+5] = (parm);\ ++ _seqbuf[_seqbufptr+6] = (0);\ ++ _seqbuf[_seqbufptr+7] = 0;\ ++ _SEQ_ADVBUF(8);} ++ ++#define SEQ_START_NOTE(dev, chn, note, vol) \ ++ _CHN_VOICE(dev, MIDI_NOTEON, chn, note, vol) ++ ++#define SEQ_STOP_NOTE(dev, chn, note, vol) \ ++ _CHN_VOICE(dev, MIDI_NOTEOFF, chn, note, vol) ++ ++#define SEQ_PITCHBEND(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER, value) ++#define SEQ_BENDER_RANGE(dev, voice, value) SEQ_V2_X_CONTROL(dev, voice, CTRL_PITCH_BENDER_RANGE, value) ++#define SEQ_CONTROL(dev, chn, controller, value) \ ++ _CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value) ++#define SEQ_PANNING(dev, voice, pos) SEQ_CONTROL(dev, voice, CTL_PAN, (pos+128) / 2) ++#define SEQ_DEFINEBUF(len) unsigned char _seqbuf[len]; int _seqbuflen = len;int _seqbufptr = 0 ++#define _SEQ_ADVBUF(len) _seqbufptr += len ++#define _SEQ_NEEDBUF(len) if ((_seqbufptr+(len)) > _seqbuflen) seqbuf_dump() ++#define SEQ_DUMPBUF seqbuf_dump ++ ++void seqbuf_dump(); + + #include "VoxWare.h" + +@@ -152,7 +219,7 @@ + * check to see if any synth devices are available + */ + +- ioctl ( SequencerFD, SNDCTL_SEQ_NRSYNTHS, &NoDevs ); ++ ioctl ( SequencerFD, SEQUENCER_NRSYNTHS, &NoDevs ); + if ( !NoDevs ) + { + fprintf( stderr, "No synth devices available, disabling sound.\n"); +@@ -170,7 +237,7 @@ + for ( i = 0; i < NoDevs; i++ ) + { + info.device = i; +- ioctl ( SequencerFD, SNDCTL_SYNTH_INFO, &info ); ++ ioctl ( SequencerFD, SEQUENCER_INFO, &info ); + if ( info.synth_type == SYNTH_TYPE_FM ) + SynthDevNo = i; + break; +@@ -185,7 +252,7 @@ + SoundEnabled = 1; + + info.device = SynthDevNo; +- ioctl ( SequencerFD, SNDCTL_SYNTH_INFO, &info ); ++ ioctl ( SequencerFD, SEQUENCER_INFO, &info ); + + #ifdef SOUND_DEBUG + printf ( "Synth device %d info:\n", SynthDevNo ); +@@ -199,7 +266,7 @@ + for ( j = 0; j < 4; j++ ) + { + Instr.channel = j; +- Instr.key = FM_PATCH; ++ Instr.key = SBI_FM_PATCH; + Instr.device = SynthDevNo; + for ( i = 0; i < 16; i++ ) + { diff --git a/emulators/xbeeb/patches/patch-ac b/emulators/xbeeb/patches/patch-ac new file mode 100644 index 00000000000..2c5f5c0fca7 --- /dev/null +++ b/emulators/xbeeb/patches/patch-ac @@ -0,0 +1,24 @@ +$NetBSD: patch-ac,v 1.1.1.1 2000/05/22 22:13:12 skrll Exp $ + +--- src/Memory.c.orig Sat Oct 12 16:03:26 1996 ++++ src/Memory.c Sun May 21 21:22:13 2000 +@@ -254,6 +254,19 @@ + } + + close ( fd ); ++#ifdef EMUL_FS ++ /* ++ * This code is taken from pch/pch.c to patch up the OS rom when ++ * using EMUL_FS ++ */ ++ ++ /* The OSFILE trap */ ++ Mem [ 0xc000 + 0x327d ] = 0x22; ++ ++ /* The OSFSC trap */ ++ Mem [ 0xc000 + 0x31b1 ] = 0x02; ++#endif ++ + return; + } + diff --git a/emulators/xbeeb/patches/patch-ad b/emulators/xbeeb/patches/patch-ad new file mode 100644 index 00000000000..71af80291c8 --- /dev/null +++ b/emulators/xbeeb/patches/patch-ad @@ -0,0 +1,25 @@ +$NetBSD: patch-ad,v 1.1.1.1 2000/05/22 22:13:12 skrll Exp $ + +--- src/Config.h.orig Thu Oct 10 00:19:08 1996 ++++ src/Config.h Sun May 21 21:18:55 2000 +@@ -256,7 +256,7 @@ + */ + + #ifndef XBEEBROOT +-#define XBEEBROOT "/home/james/beeb/" ++#define XBEEBROOT "/usr/X11R6/share/xbeeb/" + #endif + #define XBEEBROMS XBEEBROOT"roms/" + #define XBEEBSNAPS XBEEBROOT"snaps/" +@@ -282,11 +282,7 @@ + * Names of ROMs to load by default + */ + +-#ifdef EMUL_FS +-#define OS_ROM "OS1.2p1.rom" +-#else + #define OS_ROM "OS1.2.rom" +-#endif + #define LANG_ROM "BASIC2.rom" + + #ifdef XDFS diff --git a/emulators/xbeeb/pkg/COMMENT b/emulators/xbeeb/pkg/COMMENT new file mode 100644 index 00000000000..a96c023175a --- /dev/null +++ b/emulators/xbeeb/pkg/COMMENT @@ -0,0 +1 @@ +Acorn BBC Micro emulator with an X based interface diff --git a/emulators/xbeeb/pkg/DESCR b/emulators/xbeeb/pkg/DESCR new file mode 100644 index 00000000000..1f8a58c8d70 --- /dev/null +++ b/emulators/xbeeb/pkg/DESCR @@ -0,0 +1,6 @@ +Xbeeb is an Acorn BBC Micro emulator with an X based interface. + +The emulation is good enough to run many games. Xbeeb includes a filesystem +interface for native filesystem access. + +To run the emulator you must have ROM images from the original machines. diff --git a/emulators/xbeeb/pkg/MESSAGE b/emulators/xbeeb/pkg/MESSAGE new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/emulators/xbeeb/pkg/MESSAGE diff --git a/emulators/xbeeb/pkg/PLIST b/emulators/xbeeb/pkg/PLIST new file mode 100644 index 00000000000..0f3c6fc7e79 --- /dev/null +++ b/emulators/xbeeb/pkg/PLIST @@ -0,0 +1,33 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2000/05/22 22:13:11 skrll Exp $ +bin/xbeeb +lib/X11/fonts/xbeeb/ttext-grc-ldh.pcf +lib/X11/fonts/xbeeb/ttext-std-udh.pcf +lib/X11/fonts/xbeeb/ttext-std-ldh.pcf +lib/X11/fonts/xbeeb/ttext-grs.pcf +lib/X11/fonts/xbeeb/ttext-grs-udh.pcf +lib/X11/fonts/xbeeb/ttext-grs-ldh.pcf +lib/X11/fonts/xbeeb/ttext-grc.pcf +lib/X11/fonts/xbeeb/ttext-grc-udh.pcf +lib/X11/fonts/xbeeb/ttext-std.pcf +lib/X11/fonts/xbeeb/fonts.alias +lib/X11/fonts/xbeeb/fonts.dir +#XBEEBROOT#/roms/xdfs0.70.rom +#XBEEBROOT#/docs/64doc +#XBEEBROOT#/docs/Configuration +#XBEEBROOT#/docs/DataXfer +#XBEEBROOT#/docs/DiskEmulation +#XBEEBROOT#/docs/Help +#XBEEBROOT#/docs/Installation +#XBEEBROOT#/docs/Keyboard +#XBEEBROOT#/docs/KnownBugs +#XBEEBROOT#/docs/MailingLists +#XBEEBROOT#/docs/Options +#XBEEBROOT#/docs/RomPatches +#XBEEBROOT#/docs/SnapshotFormat +#XBEEBROOT#/docs/Thanks +#XBEEBROOT#/docs/WWWSites +#XBEEBROOT#/docs/WorkingSoftware +@dirrm lib/X11/fonts/xbeeb +@dirrm #XBEEBROOT#/docs +@dirrm #XBEEBROOT#/roms +@dirrm #XBEEBROOT# |