Sun Oct 11 00:52:23 2015 UTC ()
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.


(ryoon)
diff -r0 -r1.1 pkgsrc/emulators/8086tiny/DESCR
diff -r0 -r1.1 pkgsrc/emulators/8086tiny/Makefile
diff -r0 -r1.1 pkgsrc/emulators/8086tiny/PLIST
diff -r0 -r1.1 pkgsrc/emulators/8086tiny/distinfo
diff -r0 -r1.1 pkgsrc/emulators/8086tiny/files/README.in
diff -r0 -r1.1 pkgsrc/emulators/8086tiny/files/run-8086tiny-freedos.sh.in
diff -r0 -r1.1 pkgsrc/emulators/8086tiny/patches/patch-8086tiny.c
diff -r0 -r1.1 pkgsrc/emulators/8086tiny/patches/patch-Makefile

File Added: pkgsrc/emulators/8086tiny/DESCR
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.

File Added: pkgsrc/emulators/8086tiny/Makefile
# $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"

File Added: pkgsrc/emulators/8086tiny/PLIST
@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

File Added: pkgsrc/emulators/8086tiny/distinfo
$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

File Added: pkgsrc/emulators/8086tiny/files/README.in
$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

File Added: pkgsrc/emulators/8086tiny/files/run-8086tiny-freedos.sh.in
#! @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

File Added: pkgsrc/emulators/8086tiny/patches/patch-8086tiny.c
$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>
 

File Added: pkgsrc/emulators/8086tiny/patches/patch-Makefile
$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