Update to 0.4.

A huge number of changes have been made. This most visible being support
for emulating a SUN3/160.
This commit is contained in:
skrll 2005-07-27 07:29:26 +00:00
parent 2bb8c21043
commit 336dccb73f
7 changed files with 46 additions and 187 deletions

View file

@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.8 2005/05/22 20:07:58 jlam Exp $
# $NetBSD: Makefile,v 1.9 2005/07/27 07:29:26 skrll Exp $
#
DISTNAME= tme-0.2
PKGREVISION= 3
DISTNAME= tme-0.4
CATEGORIES= emulators
MASTER_SITES= http://theory.lcs.mit.edu/~fredette/tme/

View file

@ -1,4 +1,5 @@
@comment $NetBSD: PLIST,v 1.2 2004/09/22 08:09:30 jlam Exp $
@comment $NetBSD: PLIST,v 1.3 2005/07/27 07:29:26 skrll Exp $
bin/tme-sun-eeprom
bin/tme-sun-idprom
bin/tmesh
include/tme/atomics.h
@ -10,6 +11,7 @@ include/tme/generic/bus.h
include/tme/generic/disk.h
include/tme/generic/ethernet.h
include/tme/generic/fb.h
include/tme/generic/float.h
include/tme/generic/ic.h
include/tme/generic/keyboard.h
include/tme/generic/mouse.h
@ -18,6 +20,11 @@ include/tme/generic/serial.h
include/tme/generic/tape.h
include/tme/hash.h
include/tme/ic/am9513.h
include/tme/ic/i825x6.h
include/tme/ic/ieee754-auto.h
include/tme/ic/ieee754-ops-auto.h
include/tme/ic/ieee754.h
include/tme/ic/isil7170.h
include/tme/ic/m68k.h
include/tme/ic/mm58167.h
include/tme/ic/z8530.h
@ -34,6 +41,7 @@ include/tme/threads.h
include/tme/tme.h
include/tme/tmesh.h
lib/libtme-generic.la
lib/libtme-ieee754.la
lib/libtme.la
lib/libtmesh.la
lib/tme/libtme-machine-sun.la
@ -44,16 +52,22 @@ lib/tme/tme_host_bsd.la
lib/tme/tme_host_gtk.la
lib/tme/tme_host_posix.la
lib/tme/tme_ic_am9513.la
lib/tme/tme_ic_i825x6.la
lib/tme/tme_ic_isil7170.la
lib/tme/tme_ic_m68k.la
lib/tme/tme_ic_mm58167.la
lib/tme/tme_ic_ncr5380.la
lib/tme/tme_ic_z8530.la
lib/tme/tme_machine_sun2.la
lib/tme/tme_machine_sun3.la
lib/tme/tme_scsi.la
lib/tme/tme_serial_kb.la
lib/tme/tmeconfig.h
share/examples/tme/SUN2-MULTIBUS
share/examples/tme/SUN3-CARRERA
share/examples/tme/my-sun-macros.txt
share/examples/tme/sun-keyboards.txt
share/examples/tme/sun3-carrera-eeprom.txt
@dirrm share/examples/tme
@dirrm lib/tme
@dirrm include/tme/scsi

View file

@ -1,10 +1,9 @@
$NetBSD: distinfo,v 1.3 2005/02/23 18:49:21 agc Exp $
$NetBSD: distinfo,v 1.4 2005/07/27 07:29:26 skrll Exp $
SHA1 (tme-0.2.tar.gz) = b4a42c1ef65836fb3da2226293fc631a98db5f08
RMD160 (tme-0.2.tar.gz) = 363477b7f4940f2108915e95e83165a97acc1f64
Size (tme-0.2.tar.gz) = 1183794 bytes
SHA1 (patch-aa) = 49dd1b5505990522011071752544209c1540ed21
SHA1 (patch-ab) = 762aca8120b6864e9609ab79ae1385a783ffd9e7
SHA1 (patch-ac) = c6c62adabf588b8445b724cf5da93a36e2cc1124
SHA1 (patch-ad) = efb8815d0a1cd501a10268b9ef0a4f4fea16678c
SHA1 (tme-0.4.tar.gz) = 7a1a2c6aa05527b11f81925e4931e7250f5be308
RMD160 (tme-0.4.tar.gz) = a5b5ac56c8247f94cd96c92a04a6cb132ba92931
Size (tme-0.4.tar.gz) = 1448981 bytes
SHA1 (patch-aa) = 0f8cdd5efe8dab297d6369c7d6508bd1902c3bc2
SHA1 (patch-ac) = 885286eb6893d5af9769791805d054212b6d0db5
SHA1 (patch-ad) = 3f5adbaa94e5b97ded14e9a05cce912ed01f406f
SHA1 (patch-ae) = 2f472a55f5afd1c0079349ce49bd3eb251ea9d76

View file

@ -1,131 +1,12 @@
$NetBSD: patch-aa,v 1.1.1.1 2004/01/23 08:21:59 skrll Exp $
$NetBSD: patch-aa,v 1.2 2005/07/27 07:29:26 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}));"
--- tme/threads.h.orig 2003-06-27 21:09:10.000000000 +0000
+++ tme/threads.h
@@ -41,6 +41,7 @@ _TME_RCSID("$Id: threads.h,v 1.6 2003/06
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
/* includes: */
#include <errno.h>
+#include <sys/time.h>
/* note that our locking model never allows recursive locking. */
echo ""

View file

@ -1,34 +0,0 @@
$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);
}

View file

@ -1,16 +1,7 @@
$NetBSD: patch-ac,v 1.2 2004/12/05 07:32:17 skrll Exp $
$NetBSD: patch-ac,v 1.3 2005/07/27 07:29:26 skrll Exp $
--- libtme/module.c.orig 2003-08-23 14:48:30.000000000 +0100
--- libtme/module.c.orig 2005-01-26 12:59:24.000000000 +0000
+++ 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;
@@ -230,7 +230,7 @@ tme_module_open(const char *module_fake_
for (p1 = module_raw_name;
(c = *p1) != '\0';

View file

@ -1,6 +1,6 @@
$NetBSD: patch-ad,v 1.1 2004/12/05 07:32:17 skrll Exp $
$NetBSD: patch-ad,v 1.2 2005/07/27 07:29:26 skrll Exp $
--- libtme/misc.c.orig 2003-06-27 22:00:21.000000000 +0100
--- libtme/misc.c.orig 2004-05-11 12:03:47.000000000 +0000
+++ libtme/misc.c
@@ -83,7 +83,7 @@ tme_misc_tokenize(const char *string,
@ -11,3 +11,12 @@ $NetBSD: patch-ad,v 1.1 2004/12/05 07:32:17 skrll Exp $
|| c == comment) {
/* if we had been collecting a token, it's finished: */
@@ -184,7 +184,7 @@ _tme_misc_number_parse(const char *strin
/* XXX parts of this might be ASCII-centric: */
/* skip leading whitespace: */
- for (; (c = *string) != '\0' && isspace(c); string++);
+ for (; (c = *string) != '\0' && isspace((unsigned char)c); string++);
/* check for a leading '-' or '+' character: */
if ((negative = (c == '-'))