diff options
author | ryoon <ryoon@pkgsrc.org> | 2015-10-11 00:52:23 +0000 |
---|---|---|
committer | ryoon <ryoon@pkgsrc.org> | 2015-10-11 00:52:23 +0000 |
commit | ca7ac52be38aa17ae726f40551d72e9a71bf141a (patch) | |
tree | d90da0bc1b2f2fe350c5a3553a760841b6bf0758 /emulators/8086tiny | |
parent | 0ae5f8cb274c27c101b8380458809accd71539c1 (diff) | |
download | pkgsrc-ca7ac52be38aa17ae726f40551d72e9a71bf141a.tar.gz |
Import 8086tiny-1.25 as emulators/8086tiny.
8086tiny is a free, open source PC XT-compatible emulator/virtual
machine written in C. It is, we believe, the smallest of its kind
(the fully-commented source is around 28K). Despite its size,
8086tiny provides a highly accurate 8086 CPU emulation, together
with support for PC peripherals including XT-style keyboard,
floppy/hard disk, clock, timers, audio, and Hercules/CGA graphics.
8086tiny is powerful enough to run software like AutoCAD, Windows
3.0, and legacy PC games: the 8086tiny distribution includes Alley
Cat, the author's favorite PC game of all time.
8086tiny is highly portable and runs on practically any little
endian machine, from simple 32-bit MCUs upwards. 8086tiny has
successfully been deployed on 32-bit/64-bit Intel machines (Windows,
Mac OS X and Linux), Nexus 4/ARM (Android), iPad 3 and iPhone 5S
(iOS), and Raspberry Pi (Linux).
The philosophy of 8086tiny is to keep the code base as small as
possible, and through the open source license and repository on
GitHub encourage individual developers to tune and extend it as
per their specific requirements, adding support, for example, for
more complex instruction sets (e.g. Pentium) or peripherals (e.g.
mouse). Any questions, comments or suggestions are very welcome in
our forum.
Diffstat (limited to 'emulators/8086tiny')
-rw-r--r-- | emulators/8086tiny/DESCR | 23 | ||||
-rw-r--r-- | emulators/8086tiny/Makefile | 44 | ||||
-rw-r--r-- | emulators/8086tiny/PLIST | 6 | ||||
-rw-r--r-- | emulators/8086tiny/distinfo | 7 | ||||
-rw-r--r-- | emulators/8086tiny/files/README.in | 28 | ||||
-rw-r--r-- | emulators/8086tiny/files/run-8086tiny-freedos.sh.in | 8 | ||||
-rw-r--r-- | emulators/8086tiny/patches/patch-8086tiny.c | 14 | ||||
-rw-r--r-- | emulators/8086tiny/patches/patch-Makefile | 15 |
8 files changed, 145 insertions, 0 deletions
diff --git a/emulators/8086tiny/DESCR b/emulators/8086tiny/DESCR new file mode 100644 index 00000000000..58b0c150221 --- /dev/null +++ b/emulators/8086tiny/DESCR @@ -0,0 +1,23 @@ +8086tiny is a free, open source PC XT-compatible emulator/virtual +machine written in C. It is, we believe, the smallest of its kind +(the fully-commented source is around 28K). Despite its size, +8086tiny provides a highly accurate 8086 CPU emulation, together +with support for PC peripherals including XT-style keyboard, +floppy/hard disk, clock, timers, audio, and Hercules/CGA graphics. +8086tiny is powerful enough to run software like AutoCAD, Windows +3.0, and legacy PC games: the 8086tiny distribution includes Alley +Cat, the author's favorite PC game of all time. + +8086tiny is highly portable and runs on practically any little +endian machine, from simple 32-bit MCUs upwards. 8086tiny has +successfully been deployed on 32-bit/64-bit Intel machines (Windows, +Mac OS X and Linux), Nexus 4/ARM (Android), iPad 3 and iPhone 5S +(iOS), and Raspberry Pi (Linux). + +The philosophy of 8086tiny is to keep the code base as small as +possible, and through the open source license and repository on +GitHub encourage individual developers to tune and extend it as +per their specific requirements, adding support, for example, for +more complex instruction sets (e.g. Pentium) or peripherals (e.g. +mouse). Any questions, comments or suggestions are very welcome in +our forum. diff --git a/emulators/8086tiny/Makefile b/emulators/8086tiny/Makefile new file mode 100644 index 00000000000..c3f9876e2be --- /dev/null +++ b/emulators/8086tiny/Makefile @@ -0,0 +1,44 @@ +# $NetBSD: Makefile,v 1.1 2015/10/11 00:52:23 ryoon Exp $ + +DISTNAME= 8086tiny_125 +PKGNAME= ${DISTNAME:S/tiny_1/tiny-1./} +CATEGORIES= emulators +MASTER_SITES= http://www.megalith.co.uk/8086tiny/downloads/ +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER= ryoon@NetBSD.org +HOMEPAGE= http://www.megalith.co.uk/8086tiny/ +COMMENT= PC XT-compatible emulator/virtual machine written in C +LICENSE= mit + +WRKSRC= ${WRKDIR} + +USE_TOOLS+= sed + +BUILD_TARGET= 8086tiny +LDFLAGS.NetBSD= -lcompat + +INSTALLATION_DIRS= bin share/8086tiny + +post-build: + ${SED} -e 's,@SH@,${SH},' -e 's,@PREFIX@,${PREFIX},'\ + ${FILESDIR}/run-8086tiny-freedos.sh.in \ + > ${WRKSRC}/run-8086tiny-freedos.sh + ${SED} -e 's,@PREFIX@,${PREFIX},'\ + ${FILESDIR}/README.in \ + > ${WRKSRC}/README + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/8086tiny \ + ${DESTDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/bios \ + ${DESTDIR}${PREFIX}/share/8086tiny + ${INSTALL_DATA} ${WRKSRC}/fd.img \ + ${DESTDIR}${PREFIX}/share/8086tiny/freedos.img + ${INSTALL_SCRIPT} ${WRKSRC}/run-8086tiny-freedos.sh \ + ${DESTDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/README \ + ${DESTDIR}${PREFIX}/share/8086tiny + +.include "../../devel/SDL/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/emulators/8086tiny/PLIST b/emulators/8086tiny/PLIST new file mode 100644 index 00000000000..1f324013055 --- /dev/null +++ b/emulators/8086tiny/PLIST @@ -0,0 +1,6 @@ +@comment $NetBSD: PLIST,v 1.1 2015/10/11 00:52:23 ryoon Exp $ +bin/8086tiny +bin/run-8086tiny-freedos.sh +share/8086tiny/README +share/8086tiny/bios +share/8086tiny/freedos.img diff --git a/emulators/8086tiny/distinfo b/emulators/8086tiny/distinfo new file mode 100644 index 00000000000..77d3971ec00 --- /dev/null +++ b/emulators/8086tiny/distinfo @@ -0,0 +1,7 @@ +$NetBSD: distinfo,v 1.1 2015/10/11 00:52:23 ryoon Exp $ + +SHA1 (8086tiny_125.tar.bz2) = 7380a29cff8beba76dadee47f76445c6e24ee39a +RMD160 (8086tiny_125.tar.bz2) = d15e2c551aab6f7e12c1dc6ba9cf545539c85ff5 +Size (8086tiny_125.tar.bz2) = 1402403 bytes +SHA1 (patch-8086tiny.c) = 032e20accb7ad02da8080eb65ee6279a2420b961 +SHA1 (patch-Makefile) = fd6b2bf262419642995934eb15e5fd108a0dca3d diff --git a/emulators/8086tiny/files/README.in b/emulators/8086tiny/files/README.in new file mode 100644 index 00000000000..e0be02ec20a --- /dev/null +++ b/emulators/8086tiny/files/README.in @@ -0,0 +1,28 @@ +$NetBSD: README.in,v 1.1 2015/10/11 00:52:23 ryoon Exp $ + +To run FreeDOS, please perform the following steps. + +1. Create working directory in your home directory. + + $ mkdir ~/8086tiny + +2. Copy @PREFIX@/share/8086tiny/bios and @PREFIX@/share/8086tiny/freedos.img + to your working directory. + + $ cd ~/8086tiny + $ cp @PREFIX@/share/8086tiny/bios . + $ cp @PREFIX@/share/8086tiny/freedos.img . + +3. Run 8086tiny + + $ @PREFIX@/bin/run-8086tiny-freedos.sh + +4. You will get FreeDOS command prompt. + +5. To shutdown 8086tiny, run a:\quitemu.com command. + + A:\> quitemu + +Note: If you want to use HDD image, run + + $ 8086tiny bios freedos.img hd.img diff --git a/emulators/8086tiny/files/run-8086tiny-freedos.sh.in b/emulators/8086tiny/files/run-8086tiny-freedos.sh.in new file mode 100644 index 00000000000..65d9759cb22 --- /dev/null +++ b/emulators/8086tiny/files/run-8086tiny-freedos.sh.in @@ -0,0 +1,8 @@ +#! @SH@ +# $NetBSD: run-8086tiny-freedos.sh.in,v 1.1 2015/10/11 00:52:23 ryoon Exp $ +clear +stty cbreak raw -echo min 0 +@PREFIX@/bin/8086tiny \ + ./bios \ + ./freedos.img +stty cooked echo diff --git a/emulators/8086tiny/patches/patch-8086tiny.c b/emulators/8086tiny/patches/patch-8086tiny.c new file mode 100644 index 00000000000..4192c6ef874 --- /dev/null +++ b/emulators/8086tiny/patches/patch-8086tiny.c @@ -0,0 +1,14 @@ +$NetBSD: patch-8086tiny.c,v 1.1 2015/10/11 00:52:23 ryoon Exp $ + +for ftime(3) under NetBSD. + +--- 8086tiny.c.orig 2014-03-19 23:04:53.000000000 +0000 ++++ 8086tiny.c +@@ -6,6 +6,7 @@ + // This work is licensed under the MIT License. See included LICENSE.TXT. + + #include <time.h> ++#include <sys/types.h> + #include <sys/timeb.h> + #include <memory.h> + diff --git a/emulators/8086tiny/patches/patch-Makefile b/emulators/8086tiny/patches/patch-Makefile new file mode 100644 index 00000000000..6e4686268b2 --- /dev/null +++ b/emulators/8086tiny/patches/patch-Makefile @@ -0,0 +1,15 @@ +$NetBSD: patch-Makefile,v 1.1 2015/10/11 00:52:23 ryoon Exp $ + +* Pass LDFLAGS for NetBSD's libcompat for ftime(3). + +--- Makefile.orig 2014-03-18 04:39:36.000000000 +0000 ++++ Makefile +@@ -13,7 +13,7 @@ OPTS_NOGFX=-DNO_GRAPHICS + OPTS_SLOWCPU=-DGRAPHICS_UPDATE_DELAY=25000 + + 8086tiny: 8086tiny.c +- ${CC} 8086tiny.c ${OPTS_SDL} ${OPTS_ALL} -o 8086tiny ++ ${CC} 8086tiny.c ${OPTS_SDL} ${OPTS_ALL} -o 8086tiny ${LDFLAGS} + strip 8086tiny + + 8086tiny_slowcpu: 8086tiny.c |