summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorskrll <skrll@pkgsrc.org>2004-01-23 08:21:54 +0000
committerskrll <skrll@pkgsrc.org>2004-01-23 08:21:54 +0000
commit2526dad9fef9b0f56b9157a2e8dd385b6bd167e5 (patch)
treee9b43521858e1e7db4c9672820e5666fd5c2f26c /emulators
parent1766725939889644e2ad7fcac34df8b6fe8edcde (diff)
downloadpkgsrc-2526dad9fef9b0f56b9157a2e8dd385b6bd167e5.tar.gz
Import of tme 0.2
The Machine Emulator, or tme, is a program that provides a general- purpose framework for computer emulation. The first machine that tme could emulate was the Sun 2/120, one of the first widely available Sun workstations.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/tme/DESCR4
-rw-r--r--emulators/tme/Makefile21
-rw-r--r--emulators/tme/PLIST127
-rw-r--r--emulators/tme/distinfo7
-rw-r--r--emulators/tme/patches/patch-aa131
-rw-r--r--emulators/tme/patches/patch-ab34
-rw-r--r--emulators/tme/patches/patch-ac13
7 files changed, 337 insertions, 0 deletions
diff --git a/emulators/tme/DESCR b/emulators/tme/DESCR
new file mode 100644
index 00000000000..a9ef0b235b8
--- /dev/null
+++ b/emulators/tme/DESCR
@@ -0,0 +1,4 @@
+The Machine Emulator, or tme, is a program that provides a general-
+purpose framework for computer emulation. The first machine that tme
+could emulate was the Sun 2/120, one of the first widely available Sun
+workstations.
diff --git a/emulators/tme/Makefile b/emulators/tme/Makefile
new file mode 100644
index 00000000000..759f7dc9fe3
--- /dev/null
+++ b/emulators/tme/Makefile
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/01/23 08:21:54 skrll Exp $
+#
+
+DISTNAME= tme-0.2
+CATEGORIES= emulators
+MASTER_SITES= http://theory.lcs.mit.edu/~fredette/tme/
+
+MAINTAINER= skrll@NetBSD.org
+HOMEPAGE= http://theory.lcs.mit.edu/~fredette/tme/
+COMMENT= The Machine Emulator
+
+USE_BUILDLINK2= yes
+USE_PKGLOCALEDIR= yes
+USE_LIBTOOL= yes
+LIBTOOL_OVERRIDE= ${WRKSRC}/libtool
+GNU_CONFIGURE= yes
+USE_GNU_TOOLS+= make
+
+.include "../../devel/libtool/buildlink2.mk"
+.include "../../x11/gtk/buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/emulators/tme/PLIST b/emulators/tme/PLIST
new file mode 100644
index 00000000000..ca7e495a898
--- /dev/null
+++ b/emulators/tme/PLIST
@@ -0,0 +1,127 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/01/23 08:21:56 skrll Exp $
+bin/tme-sun-idprom
+bin/tmesh
+include/tme/atomics.h
+include/tme/common.h
+include/tme/connection.h
+include/tme/element.h
+include/tme/generic/bus-device.h
+include/tme/generic/bus.h
+include/tme/generic/disk.h
+include/tme/generic/ethernet.h
+include/tme/generic/fb.h
+include/tme/generic/ic.h
+include/tme/generic/keyboard.h
+include/tme/generic/mouse.h
+include/tme/generic/scsi.h
+include/tme/generic/serial.h
+include/tme/generic/tape.h
+include/tme/hash.h
+include/tme/ic/am9513.h
+include/tme/ic/m68k.h
+include/tme/ic/mm58167.h
+include/tme/ic/z8530.h
+include/tme/log.h
+include/tme/machine/sun.h
+include/tme/misc.h
+include/tme/module.h
+include/tme/scsi/scsi-cdb.h
+include/tme/scsi/scsi-device.h
+include/tme/scsi/scsi-disk.h
+include/tme/scsi/scsi-msg.h
+include/tme/scsi/scsi-tape.h
+include/tme/threads.h
+include/tme/tme.h
+include/tme/tmesh.h
+lib/libtme-generic.a
+lib/libtme-generic.la
+lib/libtme-generic.so
+lib/libtme-generic.so.0
+lib/libtme-generic.so.0.0
+lib/libtme.a
+lib/libtme.la
+lib/libtme.so
+lib/libtme.so.0
+lib/libtme.so.0.0
+lib/libtmesh.a
+lib/libtmesh.la
+lib/libtmesh.so
+lib/libtmesh.so.0
+lib/libtmesh.so.0.0
+lib/tme/libtme-machine-sun.a
+lib/tme/libtme-machine-sun.la
+lib/tme/libtme-machine-sun.so
+lib/tme/libtme-machine-sun.so.0
+lib/tme/libtme-machine-sun.so.0.0
+lib/tme/tme-plugins.txt
+lib/tme/tme_bus_multibus.a
+lib/tme/tme_bus_multibus.la
+lib/tme/tme_bus_multibus.so
+lib/tme/tme_bus_multibus.so.0
+lib/tme/tme_bus_multibus.so.0.0
+lib/tme/tme_generic.a
+lib/tme/tme_generic.la
+lib/tme/tme_generic.so
+lib/tme/tme_generic.so.0
+lib/tme/tme_generic.so.0.0
+lib/tme/tme_host_bsd.a
+lib/tme/tme_host_bsd.la
+lib/tme/tme_host_bsd.so
+lib/tme/tme_host_bsd.so.0
+lib/tme/tme_host_bsd.so.0.0
+lib/tme/tme_host_gtk.a
+lib/tme/tme_host_gtk.la
+lib/tme/tme_host_gtk.so
+lib/tme/tme_host_gtk.so.0
+lib/tme/tme_host_gtk.so.0.0
+lib/tme/tme_host_posix.a
+lib/tme/tme_host_posix.la
+lib/tme/tme_host_posix.so
+lib/tme/tme_host_posix.so.0
+lib/tme/tme_host_posix.so.0.0
+lib/tme/tme_ic_am9513.a
+lib/tme/tme_ic_am9513.la
+lib/tme/tme_ic_am9513.so
+lib/tme/tme_ic_am9513.so.0
+lib/tme/tme_ic_am9513.so.0.0
+lib/tme/tme_ic_m68k.a
+lib/tme/tme_ic_m68k.la
+lib/tme/tme_ic_m68k.so
+lib/tme/tme_ic_m68k.so.0
+lib/tme/tme_ic_m68k.so.0.0
+lib/tme/tme_ic_mm58167.a
+lib/tme/tme_ic_mm58167.la
+lib/tme/tme_ic_mm58167.so
+lib/tme/tme_ic_mm58167.so.0
+lib/tme/tme_ic_mm58167.so.0.0
+lib/tme/tme_ic_z8530.a
+lib/tme/tme_ic_z8530.la
+lib/tme/tme_ic_z8530.so
+lib/tme/tme_ic_z8530.so.0
+lib/tme/tme_ic_z8530.so.0.0
+lib/tme/tme_machine_sun2.a
+lib/tme/tme_machine_sun2.la
+lib/tme/tme_machine_sun2.so
+lib/tme/tme_machine_sun2.so.0
+lib/tme/tme_machine_sun2.so.0.0
+lib/tme/tme_scsi.a
+lib/tme/tme_scsi.la
+lib/tme/tme_scsi.so
+lib/tme/tme_scsi.so.0
+lib/tme/tme_scsi.so.0.0
+lib/tme/tme_serial_kb.a
+lib/tme/tme_serial_kb.la
+lib/tme/tme_serial_kb.so
+lib/tme/tme_serial_kb.so.0
+lib/tme/tme_serial_kb.so.0.0
+lib/tme/tmeconfig.h
+share/examples/tme/SUN2-MULTIBUS
+share/examples/tme/my-sun-macros.txt
+share/examples/tme/sun-keyboards.txt
+@dirrm share/examples/tme
+@dirrm lib/tme
+@dirrm include/tme/scsi
+@dirrm include/tme/machine
+@dirrm include/tme/ic
+@dirrm include/tme/generic
+@dirrm include/tme
diff --git a/emulators/tme/distinfo b/emulators/tme/distinfo
new file mode 100644
index 00000000000..8fff49a2d21
--- /dev/null
+++ b/emulators/tme/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/01/23 08:21:56 skrll Exp $
+
+SHA1 (tme-0.2.tar.gz) = b4a42c1ef65836fb3da2226293fc631a98db5f08
+Size (tme-0.2.tar.gz) = 1183794 bytes
+SHA1 (patch-aa) = 49dd1b5505990522011071752544209c1540ed21
+SHA1 (patch-ab) = 762aca8120b6864e9609ab79ae1385a783ffd9e7
+SHA1 (patch-ac) = 03f61f24a02e4380ef6e75845f59de380e022ffa
diff --git a/emulators/tme/patches/patch-aa b/emulators/tme/patches/patch-aa
new file mode 100644
index 00000000000..272e6975218
--- /dev/null
+++ b/emulators/tme/patches/patch-aa
@@ -0,0 +1,131 @@
+$NetBSD: patch-aa,v 1.1.1.1 2004/01/23 08:21:59 skrll Exp $
+
+--- generic/fb-xlat-auto.sh.orig Mon Sep 29 12:42:56 2003
++++ generic/fb-xlat-auto.sh
+@@ -1905,50 +1905,82 @@ for src_key in ${src_all}; do
+ echo " : ${dst_shift}));"
+
+ echo ""
+- echo " /* put the pixel into both FIFOs again. if"
+- echo " dst_bipp is 24 or greater, the FIFOs can"
+- echo " not entirely take these further pixels,"
+- echo " so we need to shift: */"
+- echo " if (dst_bipp >= 24) {"
+- echo " TME_FB_XLAT_SHIFT_DST(dst_fifo0_may_be_unaligned,"
+- echo " dst_fifo0,"
+- echo " dst_fifo0_next,"
+- echo " dst_fifo0_bits,"
+- echo " dst_bipp,"
+- echo " dst_raw0,"
+- echo " dst_order);"
+- echo " TME_FB_XLAT_SHIFT_DST(dst_fifo1_may_be_unaligned,"
+- echo " dst_fifo1,"
+- echo " dst_fifo1_next,"
+- echo " dst_fifo1_bits,"
+- echo " dst_bipp,"
+- echo " dst_raw1,"
+- echo " dst_order);"
+- echo " dst_fifo0 |="
+- echo " (pixel"
+- echo " << (dst_order == TME_ENDIAN_BIG"
+- echo " ? ((32 - dst_bipp) - ${dst_shift})"
+- echo " : ${dst_shift}));"
+- echo " dst_fifo1 |="
+- echo " (pixel"
+- echo " << (dst_order == TME_ENDIAN_BIG"
+- echo " ? ((32 - dst_bipp) - ${dst_shift})"
+- echo " : ${dst_shift}));"
+- echo " }"
+- echo ""
+- echo " /* otherwise, the FIFOs can take these further pixels: */"
+- echo " else {"
+- echo " dst_fifo0 |="
+- echo " (pixel"
+- echo " << (dst_order == TME_ENDIAN_BIG"
+- echo " ? ((32 - dst_bipp) - (${dst_shift} + dst_bipp))"
+- echo " : (${dst_shift} + dst_bipp)));"
+- echo " dst_fifo1 |="
+- echo " (pixel"
+- echo " << (dst_order == TME_ENDIAN_BIG"
+- echo " ? ((32 - dst_bipp) - (${dst_shift} + dst_bipp))"
+- echo " : (${dst_shift} + dst_bipp)));"
+- echo " }"
++ if test `expr ${dst_bipp} \>= 24` = 1; then
++ echo " /* put the pixel into both FIFOs again. in"
++ echo " this case, dst_bipp is known to be ${dst_bipp},"
++ echo " meaning the FIFOs cannot entirely take these"
++ echo " further pixels, so we need to shift the FIFOs: */"
++ indent0=""
++ indent1=X
++ elif test ${dst_bipp} = 0; then
++ echo " /* put the pixel into both FIFOs again. if"
++ echo " dst_bipp is 24 or greater, the FIFOs can"
++ echo " not entirely take these further pixels,"
++ echo " so we need to shift the FIFOs: */"
++ echo " if (dst_bipp >= 24) {"
++ indent0=" "
++ indent1=" "
++ else
++ echo " /* put the pixel into both FIFOs again. in"
++ echo " this case, dst_bipp is known to be ${dst_bipp},"
++ echo " meaning the FIFOs can take these further pixels"
++ echo " without shifting the FIFOs, as long as we shift"
++ echo " the pixels one pixel further: */"
++ indent0=X
++ indent1=""
++ fi
++ if test "X${indent0}" != "XX"; then
++ echo "${indent0} TME_FB_XLAT_SHIFT_DST(dst_fifo0_may_be_unaligned,"
++ echo "${indent0} dst_fifo0,"
++ echo "${indent0} dst_fifo0_next,"
++ echo "${indent0} dst_fifo0_bits,"
++ echo "${indent0} dst_bipp,"
++ echo "${indent0} dst_raw0,"
++ echo "${indent0} dst_order);"
++ echo "${indent0} TME_FB_XLAT_SHIFT_DST(dst_fifo1_may_be_unaligned,"
++ echo "${indent0} dst_fifo1,"
++ echo "${indent0} dst_fifo1_next,"
++ echo "${indent0} dst_fifo1_bits,"
++ echo "${indent0} dst_bipp,"
++ echo "${indent0} dst_raw1,"
++ echo "${indent0} dst_order);"
++ echo ""
++ echo "${indent0} /* now that we've shifted by dst_bipp, we can"
++ echo "${indent0} put the further pixels exactly where the"
++ echo "${indent0} first pixels went in the FIFOs: */"
++ echo "${indent0} dst_fifo0 |="
++ echo "${indent0} (pixel"
++ echo "${indent0} << (dst_order == TME_ENDIAN_BIG"
++ echo "${indent0} ? ((32 - dst_bipp) - ${dst_shift})"
++ echo "${indent0} : ${dst_shift}));"
++ echo "${indent0} dst_fifo1 |="
++ echo "${indent0} (pixel"
++ echo "${indent0} << (dst_order == TME_ENDIAN_BIG"
++ echo "${indent0} ? ((32 - dst_bipp) - ${dst_shift})"
++ echo "${indent0} : ${dst_shift}));"
++ fi
++ if test ${dst_bipp} = 0; then
++ echo " }"
++ echo ""
++ echo " /* otherwise, the FIFOs can take these further pixels,"
++ echo " as long as we shift the pixels one pixel further: */"
++ echo " else {"
++ fi
++ if test "X${indent1}" != "XX"; then
++ echo "${indent1} dst_fifo0 |="
++ echo "${indent1} (pixel"
++ echo "${indent1} << (dst_order == TME_ENDIAN_BIG"
++ echo "${indent1} ? ((32 - dst_bipp) - (${dst_shift} + dst_bipp))"
++ echo "${indent1} : (${dst_shift} + dst_bipp)));"
++ echo "${indent1} dst_fifo1 |="
++ echo "${indent1} (pixel"
++ echo "${indent1} << (dst_order == TME_ENDIAN_BIG"
++ echo "${indent1} ? ((32 - dst_bipp) - (${dst_shift} + dst_bipp))"
++ echo "${indent1} : (${dst_shift} + dst_bipp)));"
++ fi
++ if test ${dst_bipp} = 0; then
++ echo " }"
++ fi
+ fi
+
+ echo ""
diff --git a/emulators/tme/patches/patch-ab b/emulators/tme/patches/patch-ab
new file mode 100644
index 00000000000..7fa6e1db2f5
--- /dev/null
+++ b/emulators/tme/patches/patch-ab
@@ -0,0 +1,34 @@
+$NetBSD: patch-ab,v 1.1.1.1 2004/01/23 08:21:59 skrll Exp $
+
+--- host/gtk/gtk-screen.c.orig Wed Oct 29 02:03:26 2003
++++ host/gtk/gtk-screen.c
+@@ -114,13 +114,23 @@ _tme_gtk_screen_th_update(struct tme_gtk
+ static unsigned int
+ _tme_gtk_gdkimage_bipp(GdkImage *image)
+ {
+- unsigned int bipp, total_bits_halved;
++ unsigned int bipp, total_bits;
+
+- total_bits_halved = image->bpl;
+- total_bits_halved = (total_bits_halved * 8) / 2;
+- for (bipp = image->depth;
+- (bipp * image->width) <= total_bits_halved;
+- bipp <<= 1);
++ /* if the bytes per pixel value is greater than one, or if the image
++ depth is 8 or greater, just convert the bytes per pixel value to
++ bits per pixel: */
++ if (image->bpp > 1
++ || image->depth >= 8) {
++ return (image->bpp * 8);
++ }
++
++ /* otherwise, we know that the depth of the image is less than
++ eight, and the number of bits per pixel is eight or less: */
++ total_bits = image->bpl;
++ total_bits *= 8;
++ for (bipp = 8;
++ bipp > image->depth && (bipp * image->width) > total_bits;
++ bipp >>= 1);
+ return (bipp);
+ }
+
diff --git a/emulators/tme/patches/patch-ac b/emulators/tme/patches/patch-ac
new file mode 100644
index 00000000000..e4b3cc4e772
--- /dev/null
+++ b/emulators/tme/patches/patch-ac
@@ -0,0 +1,13 @@
+$NetBSD: patch-ac,v 1.1.1.1 2004/01/23 08:21:59 skrll Exp $
+
+--- libtme/module.c.orig Sat Aug 23 14:48:30 2003
++++ libtme/module.c
+@@ -107,7 +107,7 @@ _tme_modules_find(const char *top_name,
+ FILE *modules_index;
+
+ /* pass over the search path environment variables: */
+- for (pass = 0; ++pass < 2; ) {
++ for (pass = 0; ++pass <= 2; ) {
+
+ /* get the next search path environment variable value: */
+ search_path = NULL;