diff options
author | Joe Peterson <lavajoe@gentoo.org> | 2008-03-06 22:35:54 +0000 |
---|---|---|
committer | Joe Peterson <lavajoe@gentoo.org> | 2008-03-06 22:35:54 +0000 |
commit | 1f9d951b665e1199ba165386a54bf98e8d5f07c2 (patch) | |
tree | 2ad913de7fb5f8f5abf8e18fe0f3f7e634316e2e /app-emulation | |
parent | QA cleanup: Fix quoting. (diff) | |
download | historical-1f9d951b665e1199ba165386a54bf98e8d5f07c2.tar.gz historical-1f9d951b665e1199ba165386a54bf98e8d5f07c2.tar.bz2 historical-1f9d951b665e1199ba165386a54bf98e8d5f07c2.zip |
Auto-initialize system date/time in NEWDOS/80
Package-Manager: portage-2.1.4.4
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/xtrs/ChangeLog | 10 | ||||
-rw-r--r-- | app-emulation/xtrs/Manifest | 4 | ||||
-rw-r--r-- | app-emulation/xtrs/files/xtrs-4.9c-newdos-datetime.patch | 66 | ||||
-rw-r--r-- | app-emulation/xtrs/xtrs-4.9c-r1.ebuild | 63 |
4 files changed, 140 insertions, 3 deletions
diff --git a/app-emulation/xtrs/ChangeLog b/app-emulation/xtrs/ChangeLog index cd3665f18cde..8bceb643f537 100644 --- a/app-emulation/xtrs/ChangeLog +++ b/app-emulation/xtrs/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-emulation/xtrs -# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xtrs/ChangeLog,v 1.21 2007/06/15 01:21:26 lavajoe Exp $ +# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xtrs/ChangeLog,v 1.22 2008/03/06 22:35:53 lavajoe Exp $ + +*xtrs-4.9c-r1 (06 Mar 2008) + + 06 Mar 2008; Joe Peterson <lavajoe@gentoo.org> + +files/xtrs-4.9c-newdos-datetime.patch, +xtrs-4.9c-r1.ebuild: + Auto-initialize system date/time in NEWDOS/80 15 Jun 2007; Joe Peterson <lavajoe@gentoo.org> -files/xtrs-4.9-gentoo.diff, -xtrs-4.9-r1.ebuild: diff --git a/app-emulation/xtrs/Manifest b/app-emulation/xtrs/Manifest index 27c4424a9739..422b4debcfee 100644 --- a/app-emulation/xtrs/Manifest +++ b/app-emulation/xtrs/Manifest @@ -1,6 +1,8 @@ AUX xtrs-4.9c-gentoo.patch 2650 RMD160 7e2b9bb228b2cc6ea0daacce4b82403b9c5f364a SHA1 373dcff9bb16a4b21f1eb78c17e89970b2c90007 SHA256 6b9a52848783854937e0f1508076f86da317e7a5c9bc553255597403101be07a +AUX xtrs-4.9c-newdos-datetime.patch 2750 RMD160 ac5f2be3ab48ebaddbabca2e40117cc0ef67abca SHA1 c8e295ae7f92ce34e7d976fdf131d8dd483b3282 SHA256 1aede5a158a5c0659714a024724500d27c77ff30198fee9db81009e223a5c592 DIST ld4-631.tar.gz 191393 RMD160 2460b1f5490039c02aaec8e1645b23c511b557d9 SHA1 2ad71c65e5b78fb2c67080ab332f723eb6f90be8 SHA256 7f810d5fe0ce5c2fdabf25b5631ed2c84b19301b2e4df452bc57ca1375a84650 DIST xtrs-4.9c.tar.gz 443651 RMD160 db6057adb8a648362856026b9e8b4edd9a43b117 SHA1 23b3440fca962104c7676c633974d413ef4d3b92 SHA256 a5071dee883b83d893467b913441f8bb75984d0d4e567eef0479d43891dfb978 +EBUILD xtrs-4.9c-r1.ebuild 2206 RMD160 4d6c2f34eedcf407a331029ff38cf8dbd024f34f SHA1 7aa8526cafbd16c08b6f42f3f3818ddc6129c70f SHA256 ccba4c3e3169db45f82715f883014c0db651ea5de6bc63e51f6716630a69c1af EBUILD xtrs-4.9c.ebuild 2154 RMD160 6f26f541a4dc447a206224057aebdf6d7a53db38 SHA1 a96f03c8517e86bba1168ac2bde3a9b2ec595c97 SHA256 7bc7c3aa498489b7ce27fdde5fb2aa50e3471a1a34879d947d75ec14992a3f8d -MISC ChangeLog 2687 RMD160 adcb4c5d1f3dadda5f1b82e2367f84f58321b4e1 SHA1 3180d53186bfdbffeaf824910848ad2f5c457c62 SHA256 f84263171cee93eca75632005154f0ae91d66cdd5c25fc97e74a8febd694bc0a +MISC ChangeLog 2878 RMD160 5605c518b6fad4c0415f349b0d4ba87363d3e8b8 SHA1 bce31557226269bce211cc49323ed1b389b8dfa5 SHA256 837160a4b53844704fbc16195e21665d627d023e9817dbdab99128fe0a1ee65c MISC metadata.xml 282 RMD160 b47308502ff1b64a1e9dd755d005e297021af8c1 SHA1 dc1449f86eee96a7cab082ecdfeb569ebebb7b36 SHA256 89071a7880688fef9ba20d2bf1c3e13093ab41b0d66271134d62d9a763579879 diff --git a/app-emulation/xtrs/files/xtrs-4.9c-newdos-datetime.patch b/app-emulation/xtrs/files/xtrs-4.9c-newdos-datetime.patch new file mode 100644 index 000000000000..1e58f8125dbc --- /dev/null +++ b/app-emulation/xtrs/files/xtrs-4.9c-newdos-datetime.patch @@ -0,0 +1,66 @@ +diff -Nur xtrs-4.9c~newdos-datetime/trs_interrupt.c xtrs-4.9c/trs_interrupt.c +--- xtrs-4.9c~newdos-datetime/trs_interrupt.c 2008-03-06 14:49:43.000000000 -0700 ++++ xtrs-4.9c/trs_interrupt.c 2008-03-06 14:50:00.000000000 -0700 +@@ -62,6 +62,34 @@ + #define LDOS4_DAY 0x0034 + #define LDOS4_YEAR 0x0033 + ++/* Kludge, continued: On NEWDOS/80, both date and time are stored in memory ++ across reboots, but a test is done on boot to decide whether to use the ++ stored values. Here's how it works: NEWDOS/80 writes a special byte value ++ to the memory address right before the stored date and time. On reboot, ++ this address is checked, and if it contains that special byte, the stored ++ date and time are considered valid and are therefore used. ++ ++ By putting this info in memory on powerup, NEWDOS/80 gets initialized ++ with the system date and time. ++ */ ++#define NEWDOS_DATETIME_VALID_BYTE 0xa5 ++// Model 1 ++#define NEWDOS_DATETIME_VALID_ADDR 0x43ab ++#define NEWDOS_MONTH 0x43b1 ++#define NEWDOS_DAY 0x43b0 ++#define NEWDOS_YEAR 0x43af ++#define NEWDOS_HOUR 0x43ae ++#define NEWDOS_MIN 0x43ad ++#define NEWDOS_SEC 0x43ac ++// Model 3 ++#define NEWDOS3_DATETIME_VALID_ADDR 0x42cb ++#define NEWDOS3_MONTH 0x42d1 ++#define NEWDOS3_DAY 0x42d0 ++#define NEWDOS3_YEAR 0x42cf ++#define NEWDOS3_HOUR 0x42ce ++#define NEWDOS3_MIN 0x42cd ++#define NEWDOS3_SEC 0x42cc ++ + static int timer_on = 1; + #ifdef IDEBUG + long lost_timer_interrupts = 0; +@@ -398,10 +426,27 @@ + mem_write(LDOS_MONTH, (lt->tm_mon + 1) ^ 0x50); + mem_write(LDOS_DAY, lt->tm_mday); + mem_write(LDOS_YEAR, lt->tm_year - 80); ++ ++ mem_write(NEWDOS_DATETIME_VALID_ADDR, NEWDOS_DATETIME_VALID_BYTE); ++ mem_write(NEWDOS_MONTH, lt->tm_mon + 1); ++ mem_write(NEWDOS_DAY, lt->tm_mday); ++ mem_write(NEWDOS_YEAR, lt->tm_year % 100); ++ mem_write(NEWDOS_HOUR, lt->tm_hour); ++ mem_write(NEWDOS_MIN, lt->tm_min); ++ mem_write(NEWDOS_SEC, lt->tm_sec); + } else { + mem_write(LDOS3_MONTH, (lt->tm_mon + 1) ^ 0x50); + mem_write(LDOS3_DAY, lt->tm_mday); + mem_write(LDOS3_YEAR, lt->tm_year - 80); ++ ++ mem_write(NEWDOS3_DATETIME_VALID_ADDR, NEWDOS_DATETIME_VALID_BYTE); ++ mem_write(NEWDOS3_MONTH, lt->tm_mon + 1); ++ mem_write(NEWDOS3_DAY, lt->tm_mday); ++ mem_write(NEWDOS3_YEAR, lt->tm_year % 100); ++ mem_write(NEWDOS3_HOUR, lt->tm_hour); ++ mem_write(NEWDOS3_MIN, lt->tm_min); ++ mem_write(NEWDOS3_SEC, lt->tm_sec); ++ + if (trs_model >= 4) { + extern Uchar memory[]; + memory[LDOS4_MONTH] = lt->tm_mon + 1; diff --git a/app-emulation/xtrs/xtrs-4.9c-r1.ebuild b/app-emulation/xtrs/xtrs-4.9c-r1.ebuild new file mode 100644 index 000000000000..e8d63a2273a8 --- /dev/null +++ b/app-emulation/xtrs/xtrs-4.9c-r1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xtrs/xtrs-4.9c-r1.ebuild,v 1.1 2008/03/06 22:35:53 lavajoe 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 ~x86-fbsd" +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" + epatch "${FILESDIR}/${P}-newdos-datetime.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." +} |