summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2007-04-25 20:38:14 +0000
committerUlrich Müller <ulm@gentoo.org>2007-04-25 20:38:14 +0000
commit46a118d87cea90206a9f1f05d1347056e6b43006 (patch)
treeccc2cb3f56bd59f39ed5a50fc3678167d2b951fd /app-emulation/xtrs
parentmetadata cleanup (diff)
downloadgentoo-2-46a118d87cea90206a9f1f05d1347056e6b43006.tar.gz
gentoo-2-46a118d87cea90206a9f1f05d1347056e6b43006.tar.bz2
gentoo-2-46a118d87cea90206a9f1f05d1347056e6b43006.zip
Version bump. Fixed "keyboard wait" and "delay" bugs. Other minor changes.
(Portage version: 2.1.2.4)
Diffstat (limited to 'app-emulation/xtrs')
-rw-r--r--app-emulation/xtrs/ChangeLog14
-rw-r--r--app-emulation/xtrs/files/digest-xtrs-4.9c6
-rw-r--r--app-emulation/xtrs/files/xtrs-4.9c-gentoo.patch85
-rw-r--r--app-emulation/xtrs/xtrs-4.9c.ebuild62
4 files changed, 165 insertions, 2 deletions
diff --git a/app-emulation/xtrs/ChangeLog b/app-emulation/xtrs/ChangeLog
index 6c836066b0d9..318e0a6fe0b4 100644
--- a/app-emulation/xtrs/ChangeLog
+++ b/app-emulation/xtrs/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for app-emulation/xtrs
-# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xtrs/ChangeLog,v 1.13 2006/08/27 15:07:44 mr_bones_ Exp $
+# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xtrs/ChangeLog,v 1.14 2007/04/25 20:38:14 ulm Exp $
+
+*xtrs-4.9c (25 Apr 2007)
+
+ 25 Apr 2007; Ulrich Mueller <ulm@gentoo.org>
+ +files/xtrs-4.9c-gentoo.patch, +xtrs-4.9c.ebuild:
+ Version bump. Fix "keyboard wait" bug when F7, F8, F9, or F10 is hit; use
+ volatile variable to avoid optimisation of delay loop; pass PREFIX, CFLAGS,
+ DISKDIR, etc. directly to emake; output message how to install ROM images;
+ LICENSE changed to as-is; other minor changes. Ebuild and patch submitted by
+ Joe Peterson <joe@skyrush.com>, resolving bug #166715.
27 Aug 2006; Michael Sterrett <mr_bones_@gentoo.org> -xtrs-4.9.ebuild:
clean out older, non-modX ebuild
diff --git a/app-emulation/xtrs/files/digest-xtrs-4.9c b/app-emulation/xtrs/files/digest-xtrs-4.9c
new file mode 100644
index 000000000000..a3cc6ce64dea
--- /dev/null
+++ b/app-emulation/xtrs/files/digest-xtrs-4.9c
@@ -0,0 +1,6 @@
+MD5 22dc427930e156315853e7bcef2cf1eb ld4-631.tar.gz 191393
+RMD160 2460b1f5490039c02aaec8e1645b23c511b557d9 ld4-631.tar.gz 191393
+SHA256 7f810d5fe0ce5c2fdabf25b5631ed2c84b19301b2e4df452bc57ca1375a84650 ld4-631.tar.gz 191393
+MD5 92b9b1fc28b4f341452b14e28c7e302d xtrs-4.9c.tar.gz 443651
+RMD160 db6057adb8a648362856026b9e8b4edd9a43b117 xtrs-4.9c.tar.gz 443651
+SHA256 a5071dee883b83d893467b913441f8bb75984d0d4e567eef0479d43891dfb978 xtrs-4.9c.tar.gz 443651
diff --git a/app-emulation/xtrs/files/xtrs-4.9c-gentoo.patch b/app-emulation/xtrs/files/xtrs-4.9c-gentoo.patch
new file mode 100644
index 000000000000..113e26afcfed
--- /dev/null
+++ b/app-emulation/xtrs/files/xtrs-4.9c-gentoo.patch
@@ -0,0 +1,85 @@
+diff -Nur xtrs-4.9c-orig/ChangeLog xtrs-4.9c/ChangeLog
+--- xtrs-4.9c-orig/ChangeLog 2006-05-15 02:55:28.000000000 +0200
++++ xtrs-4.9c/ChangeLog 2007-04-25 22:12:20.000000000 +0200
+@@ -1,3 +1,11 @@
++4.9c-Gentoo -- Sat Apr 21 14:37:00 MDT 2007 Joe Peterson <joe@skyrush.com>
++
++* Patched for Gentoo ebuild
++ - Change "int i" in the z80 delay loop to "volatile int"
++ (allows near-actual speed emulation with optimization)
++ - Fixed keyboard wait issue that caused CPU spinning (i.e. max
++ CPU usage) after using F10 (reset), F7, F8, or F9.
++
+ 4.9c -- Sun May 14 17:54:25 PDT 2006 -- Tim Mann
+
+ * Fixed the new -e flag on import/cmd and export/cmd to actually
+diff -Nur xtrs-4.9c-orig/main.c xtrs-4.9c/main.c
+--- xtrs-4.9c-orig/main.c 2002-04-14 09:03:43.000000000 +0200
++++ xtrs-4.9c/main.c 2007-04-25 22:12:20.000000000 +0200
+@@ -26,7 +26,7 @@
+ #include "trs_disk.h"
+ #include "load_cmd.h"
+
+-int trs_model = 1;
++int trs_model = 5;
+ int trs_paused = 1;
+ int trs_autodelay = 0;
+ char *program_name;
+diff -Nur xtrs-4.9c-orig/trs.h xtrs-4.9c/trs.h
+--- xtrs-4.9c-orig/trs.h 2006-05-13 23:05:59.000000000 +0200
++++ xtrs-4.9c/trs.h 2007-04-25 22:12:20.000000000 +0200
+@@ -67,6 +67,7 @@
+ extern void queue_key(int key);
+ extern int dequeue_key(void);
+ extern void clear_key_queue(void);
++extern void trs_start_kbwait(void);
+ extern void trs_end_kbwait(void);
+ extern int stretch_amount;
+
+diff -Nur xtrs-4.9c-orig/trs_keyboard.c xtrs-4.9c/trs_keyboard.c
+--- xtrs-4.9c-orig/trs_keyboard.c 2006-05-13 22:50:17.000000000 +0200
++++ xtrs-4.9c/trs_keyboard.c 2007-04-25 22:12:20.000000000 +0200
+@@ -983,6 +983,12 @@
+ }
+
+ void
++trs_start_kbwait()
++{
++ key_immediate = 0;
++}
++
++void
+ trs_end_kbwait()
+ {
+ key_immediate = 1;
+@@ -1003,7 +1009,6 @@
+ }
+ trs_paused = 1;
+ pause(); /* Wait for SIGALRM or SIGIO */
+- key_immediate = 0;
+ trs_get_event(0);
+ }
+ return rval;
+diff -Nur xtrs-4.9c-orig/trs_xinterface.c xtrs-4.9c/trs_xinterface.c
+--- xtrs-4.9c-orig/trs_xinterface.c 2006-05-13 23:33:51.000000000 +0200
++++ xtrs-4.9c/trs_xinterface.c 2007-04-25 22:12:20.000000000 +0200
+@@ -920,6 +920,7 @@
+ (void)trs_uart_check_avail();
+ }
+
++ trs_start_kbwait();
+ do {
+ if (wait) {
+ XNextEvent(display, &event);
+diff -Nur xtrs-4.9c-orig/z80.c xtrs-4.9c/z80.c
+--- xtrs-4.9c-orig/z80.c 2005-05-22 08:57:01.000000000 +0200
++++ xtrs-4.9c/z80.c 2007-04-25 22:12:20.000000000 +0200
+@@ -2999,7 +2999,7 @@
+ Uchar instruction;
+ Ushort address; /* generic temps */
+ int ret = 0;
+- int i;
++ volatile int i;
+ trs_continuous = continuous;
+
+ /* loop to do a z80 instruction */
diff --git a/app-emulation/xtrs/xtrs-4.9c.ebuild b/app-emulation/xtrs/xtrs-4.9c.ebuild
new file mode 100644
index 000000000000..b6bf2cc8d804
--- /dev/null
+++ b/app-emulation/xtrs/xtrs-4.9c.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xtrs/xtrs-4.9c.ebuild,v 1.1 2007/04/25 20:38:14 ulm Exp $
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="Radio Shack TRS-80 emulator"
+HOMEPAGE="http://www.tim-mann.org/xtrs.html"
+SRC_URI="http://www.tim-mann.org/trs80/${P}.tar.gz
+ http://home.gwi.net/~plemon/support/disks/xtrs/ld4-631.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="sys-libs/ncurses
+ sys-libs/readline
+ >=x11-libs/libX11-1.0.0"
+
+src_unpack() {
+ unpack ${P}.tar.gz
+ tar xzf "${DISTDIR}/ld4-631.tar.gz" disks || die "tar failed"
+
+ cd "${S}"
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+}
+
+src_compile() {
+ use ppc && append-flags -Dbig_endian
+ emake CC="$(tc-getCC)" DEBUG="${CFLAGS}" \
+ DISKDIR="-DDISKDIR='\"/usr/share/xtrs\"'" \
+ DEFAULT_ROM="-DDEFAULT_ROM='\"/usr/share/xtrs/romimage\"' \
+ -DDEFAULT_ROM3='\"/usr/share/xtrs/romimage.m3\"' \
+ -DDEFAULT_ROM4P='\"/usr/share/xtrs/romimage.m4p\"'" \
+ || die "emake failed"
+}
+
+src_install() {
+ dodir /usr/bin /usr/share/xtrs/disks /usr/share/man/man1
+ emake PREFIX="${D}"/usr install || die "emake install failed"
+
+ insopts -m0444
+ insinto /usr/share/xtrs/disks
+ doins cpmutil.dsk utility.dsk "${WORKDIR}"/disks/ld4-631.dsk
+ dosym disks/ld4-631.dsk /usr/share/xtrs/disk4p-0
+ dosym disks/utility.dsk /usr/share/xtrs/disk4p-1
+
+ dodoc ChangeLog README xtrsrom4p.README cpmutil.html dskspec.html \
+ || die "dodoc failed"
+}
+
+pkg_postinst() {
+ elog "For copyright reasons, xtrs does not include ROM images."
+ elog "If you already own a copy of the ROM software (e.g., if you have"
+ elog "a TRS-80 with this ROM), then you can make yourself a copy of this"
+ elog "for use with xtrs. You can get such a copy also from elsewhere on"
+ elog "the web. You may install the ROM images in directory /usr/share/xtrs"
+ elog "as files \"romimage\", \"romimage.m3\", or \"romimage.m4p\", for"
+ elog "Model I, III, or 4P, respectively. (Model 4 uses the same ROM image"
+ elog "as Model III.) The files may be in Intel hex or binary format."
+}