From d88cedc838256c93e2f02a1ce7435d826425bcdf Mon Sep 17 00:00:00 2001 From: Thomas Gellekum Date: Wed, 29 Oct 1997 09:07:09 +0000 Subject: Import atari800 port. This is an emulator of the old 8bit computer. PR: 3411 Submitted by: Joel Sutton --- emulators/atari800/Makefile | 78 +++++++++++++++++++++++++++++ emulators/atari800/distinfo | 2 + emulators/atari800/files/atari800.cfg | 20 ++++++++ emulators/atari800/files/config.h | 19 +++++++ emulators/atari800/files/patch-aa | 94 +++++++++++++++++++++++++++++++++++ emulators/atari800/files/patch-ab | 19 +++++++ emulators/atari800/files/patch-ac | 53 ++++++++++++++++++++ emulators/atari800/files/patch-ad | 19 +++++++ emulators/atari800/files/patch-ae | 59 ++++++++++++++++++++++ emulators/atari800/pkg-comment | 1 + emulators/atari800/pkg-descr | 40 +++++++++++++++ emulators/atari800/pkg-plist | 17 +++++++ 12 files changed, 421 insertions(+) create mode 100644 emulators/atari800/Makefile create mode 100644 emulators/atari800/distinfo create mode 100644 emulators/atari800/files/atari800.cfg create mode 100644 emulators/atari800/files/config.h create mode 100644 emulators/atari800/files/patch-aa create mode 100644 emulators/atari800/files/patch-ab create mode 100644 emulators/atari800/files/patch-ac create mode 100644 emulators/atari800/files/patch-ad create mode 100644 emulators/atari800/files/patch-ae create mode 100644 emulators/atari800/pkg-comment create mode 100644 emulators/atari800/pkg-descr create mode 100644 emulators/atari800/pkg-plist diff --git a/emulators/atari800/Makefile b/emulators/atari800/Makefile new file mode 100644 index 000000000000..05897cd10518 --- /dev/null +++ b/emulators/atari800/Makefile @@ -0,0 +1,78 @@ +# New ports collection makefile for: Atari800-0.8.0 +# Version required: 0.8.1 +# Date created: 29th April, 1997 +# Whom: Joel Sutton +# +# $Id$ +# + +DISTNAME= Atari800-0.8.1 +PKGNAME= atari800-0.8.1 +CATEGORIES= emulators +MASTER_SITES= http://www.signus.demon.co.uk/david/atari/ +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${EXTRA_FILES} + +MAINTAINER= sutton@aardvark.apana.org.au + +BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip +LIB_DEPENDS= xview:${PORTSDIR}/x11/xview-lib + +RESTRICTED= "xf25 contains copyright ROMs and cannot be distributed" +NO_PACKAGE= ${RESTRICTED} + +EXTRA_FILES= xf25.zip +EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} + +# Source building +# +ALL_TARGET= freebsd-xview + +# Installation +# +# Install and mkdir needed for 2.1.5R standard bsd.port.mk file. Other +# variables are needed for the post-install target. +# +ATARI_DOC= ${PREFIX}/share/doc/atari +ATARI_ROM= ataribas.rom atariosb.rom atarixl.rom +ATARI_LIB= ${PREFIX}/lib/atari +SED_CONFIG= ${ATARI_LIB:S/\//\\\//g}\/ +DOC_FILES= BUGS CHANGES COPYING CREDITS INSTALL README TODO USAGE +MAN1= atari800.1 + +# Unpack roms from xf25.zip Atari Emulator for DOS and process the +# configuration file to include the right paths for the rom files. +# +post-extract: + @${ECHO_MSG} "===> Unzipping ROM files" + unzip -Lo ${DISTDIR}/${DIST_SUBDIR}/${EXTRA_FILES} ${ATARI_ROM} -d ${WRKSRC}/ + + @${ECHO_MSG} "===> Processing configuration file" + ${SED} "s/GUMBY/${SED_CONFIG}/g" < ${FILESDIR}/atari800.cfg \ + > ${WRKSRC}/atari800.cfg + + @${ECHO_MSG} "===> Copying config.h to work directory" + ${CP} ${FILESDIR}/config.h ${WRKSRC}/ + +# Install roms, extra docs and config file. +# +post-install: + @${ECHO_MSG} "===> Installing ROM files" + -${MKDIR} ${ATARI_LIB} + for file in ${ATARI_ROM} ; do \ + ${INSTALL_DATA} ${WRKSRC}/$$file ${ATARI_LIB}/ ;\ + done + +.if !defined(NOPORTDOCS) + @${ECHO_MSG} "===> Installing distribution document files" + -${MKDIR} ${ATARI_DOC} + for file in ${DOC_FILES} ; do \ + ${INSTALL_DATA} ${WRKSRC}/$$file ${ATARI_DOC}/ ;\ + done + ${INSTALL_DATA} ${PKGDIR}/DESCR ${ATARI_DOC}/README.FreeBSD +.endif + + @${ECHO_MSG} "===> Installing configuration file" + ${INSTALL} -c -o root -g wheel -m 664 ${WRKSRC}/atari800.cfg \ + ${ATARI_LIB}/ + +.include diff --git a/emulators/atari800/distinfo b/emulators/atari800/distinfo new file mode 100644 index 000000000000..532c494cc715 --- /dev/null +++ b/emulators/atari800/distinfo @@ -0,0 +1,2 @@ +MD5 (Atari800-0.8.1.tar.gz) = 378dda73440159ec0228ef84cb693b17 +MD5 (xf25.zip) = 4dc3b6b4313e9596c4d474785a37b94d diff --git a/emulators/atari800/files/atari800.cfg b/emulators/atari800/files/atari800.cfg new file mode 100644 index 000000000000..fb85692e7271 --- /dev/null +++ b/emulators/atari800/files/atari800.cfg @@ -0,0 +1,20 @@ +Atari 800 Emulator, Version 0.8.0 +OS/A_ROM= +OS/B_ROM=GUMBY/atariosb.rom +XL/XE_ROM=GUMBY/atarixl.rom +BASIC_ROM=GUMBY/ataribas.rom +5200_ROM= +DISK_DIR=GUMBY/ +ROM_DIR=GUMBY/ +H1_DIR= +H2_DIR= +H3_DIR= +H4_DIR= +PRINT_COMMAND=lpr %s +SCREEN_REFRESH_RATIO=1 +DEFAULT_SYSTEM=Atari XL +DEFAULT_TV_MODE=PAL +HOLD_OPTION=0 +ENABLE_C000_RAM=0 +ENABLE_SIO_PATCH=1 +ENABLE_XCOLPF1=0 diff --git a/emulators/atari800/files/config.h b/emulators/atari800/files/config.h new file mode 100644 index 000000000000..65625dc40f97 --- /dev/null +++ b/emulators/atari800/files/config.h @@ -0,0 +1,19 @@ +/* + FreeBSD ports collection version of config.h + by Joel Sutton 22nd April 1997 + + This file has been created to simplify installation of the Atari + Emulator. Voxware does work and if you wish to install it + uncomment the #define line below. Other options are not yet + supported. + + */ + +#ifndef __CONFIG__ +#define __CONFIG__ +/* #define LINUX_JOYSTICK */ +/* #define DIRECT_VIDEO */ +/* #define JOYMOUSE */ +/* #define VOXWARE */ +#define UNALIGNED_LONG_OK +#endif diff --git a/emulators/atari800/files/patch-aa b/emulators/atari800/files/patch-aa new file mode 100644 index 000000000000..297c96a19043 --- /dev/null +++ b/emulators/atari800/files/patch-aa @@ -0,0 +1,94 @@ +*** Makefile.orig Sat Apr 19 07:41:29 1997 +--- Makefile Tue Apr 22 22:02:13 1997 +*************** +*** 3,8 **** +--- 3,11 ---- + # -lnsl which is required for the Sun versions. Remove them + # if they cause a problem on your system. + # ++ # Patched by Joel Sutton Tue Apr 22, 1997 ++ # Fixed install target. Added hooks for config file paths. ++ # Disabled configure. + + CC = gcc + CPPFLAGS = $(OTHER) +*************** +*** 16,21 **** +--- 19,31 ---- + LIB_PATH = ${PREFIX}/lib + MAN_PATH = ${PREFIX}/man + ++ INSTALL = install -c -o bin -g bin ++ INSTALL_DATA = ${INSTALL} -m 644 ++ INSTALL_PROGRAM = ${INSTALL} -m 555 ++ INSTALL_MAN = ${INSTALL} -m 444 ++ ++ CONFIG =${PREFIX}/lib/atari/atari800.cfg ++ + default : + @echo "To build the Atari 800 Emulator, type:" + @echo "make " +*************** +*** 248,254 **** + platform.h + + config config.h : configure +! ./configure + + configure : configure.o prompts.o + $(LD) $(LDFLAGS) configure.o prompts.o $(LDLIBS) -o configure +--- 258,264 ---- + platform.h + + config config.h : configure +! # ./configure + + configure : configure.o prompts.o + $(LD) $(LDFLAGS) configure.o prompts.o $(LDLIBS) -o configure +*************** +*** 331,337 **** + $(CC) $(CPPFLAGS) $(CFLAGS) prompts.c + + rt-config.o : rt-config.c $(INCLUDES) +! $(CC) $(CPPFLAGS) $(CFLAGS) rt-config.c + + sound.o : sound.c $(INCLUDES) + $(CC) $(CPPFLAGS) $(CFLAGS) sound.c +--- 341,347 ---- + $(CC) $(CPPFLAGS) $(CFLAGS) prompts.c + + rt-config.o : rt-config.c $(INCLUDES) +! $(CC) $(CPPFLAGS) $(CFLAGS) -DATARI_CONFIG=\"${CONFIG}\" rt-config.c + + sound.o : sound.c $(INCLUDES) + $(CC) $(CPPFLAGS) $(CFLAGS) sound.c +*************** +*** 341,347 **** + + clean : + rm -f configure +! rm -f config.h + rm -f core + rm -f *.o + +--- 351,357 ---- + + clean : + rm -f configure +! # rm -f config.h + rm -f core + rm -f *.o + +*************** +*** 350,354 **** + chmod 4755 ${BIN_PATH}/atari800 + + install : +! cp atari800 ${BIN_PATH}/atari800 +! cp atari800.man ${MAN_PATH}/man1/atari800.1 +--- 360,364 ---- + chmod 4755 ${BIN_PATH}/atari800 + + install : +! ${INSTALL_PROGRAM} atari800 ${BIN_PATH}/atari800 +! ${INSTALL_MAN} atari800.man ${MAN_PATH}/man1/atari800.1 diff --git a/emulators/atari800/files/patch-ab b/emulators/atari800/files/patch-ab new file mode 100644 index 000000000000..15c13272debe --- /dev/null +++ b/emulators/atari800/files/patch-ab @@ -0,0 +1,19 @@ +*** sound.c.orig Sun Apr 20 23:19:13 1997 +--- sound.c Sun Apr 20 23:19:28 1997 +*************** +*** 3,9 **** + #ifdef VOXWARE + #include + #include +! #include + + #include "pokey11.h" + +--- 3,9 ---- + #ifdef VOXWARE + #include + #include +! #include + + #include "pokey11.h" + diff --git a/emulators/atari800/files/patch-ac b/emulators/atari800/files/patch-ac new file mode 100644 index 000000000000..9e4e58feea4a --- /dev/null +++ b/emulators/atari800/files/patch-ac @@ -0,0 +1,53 @@ +*** prompts.c.orig Sun Apr 20 23:32:27 1997 +--- prompts.c Sun Apr 20 23:34:30 1997 +*************** +*** 10,16 **** + char gash[128]; + + printf (message, string); +! gets (gash); + if (strlen(gash) > 0) + strcpy (string, gash); + } +--- 10,16 ---- + char gash[128]; + + printf (message, string); +! fgets (gash,128,stdin); + if (strlen(gash) > 0) + strcpy (string, gash); + } +*************** +*** 20,26 **** + char gash[128]; + + printf (message, *num); +! gets (gash); + if (strlen(gash) > 0) + sscanf (gash,"\n%d", num); + } +--- 20,26 ---- + char gash[128]; + + printf (message, *num); +! fgets (gash,128,stdin); + if (strlen(gash) > 0) + sscanf (gash,"\n%d", num); + } +*************** +*** 33,39 **** + do + { + printf (message, *yn); +! gets (gash); + + if (strlen(gash) > 0) + t_yn = gash[0]; +--- 33,39 ---- + do + { + printf (message, *yn); +! fgets (gash,128,stdin); + + if (strlen(gash) > 0) + t_yn = gash[0]; diff --git a/emulators/atari800/files/patch-ad b/emulators/atari800/files/patch-ad new file mode 100644 index 000000000000..7b586ec4aa06 --- /dev/null +++ b/emulators/atari800/files/patch-ad @@ -0,0 +1,19 @@ +*** rt-config.c.orig Sun Apr 20 23:38:04 1997 +--- rt-config.c Sun Apr 20 23:39:04 1997 +*************** +*** 32,38 **** + int enable_xcolpf1; + + static char *rtconfig_filename1 = "atari800.cfg"; +! static char *rtconfig_filename2 = "/etc/atari800.cfg"; + + int RtConfigLoad (char *rtconfig_filename) + { +--- 32,38 ---- + int enable_xcolpf1; + + static char *rtconfig_filename1 = "atari800.cfg"; +! static char *rtconfig_filename2 = ATARI_CONFIG ; + + int RtConfigLoad (char *rtconfig_filename) + { diff --git a/emulators/atari800/files/patch-ae b/emulators/atari800/files/patch-ae new file mode 100644 index 000000000000..fd52e55c419b --- /dev/null +++ b/emulators/atari800/files/patch-ae @@ -0,0 +1,59 @@ +*** monitor.c.orig Tue Apr 22 20:58:59 1997 +--- monitor.c Tue Apr 22 21:13:57 1997 +*************** +*** 1,3 **** +--- 1,8 ---- ++ /* ++ Patched by Joel Sutton 22nd April, 1997 ++ Replaced gets with fgets. Added a newline chop feature. ++ */ ++ + #include + #include + #include +*************** +*** 95,106 **** + + printf ("> "); + fflush(stdout); +! if (gets (s) == NULL) + { + printf("\n> CONT\n"); + strcpy(s, "CONT"); + } + + for (p=0;s[p]!=0;p++) + if (islower(s[p])) + s[p] = toupper(s[p]); +--- 100,113 ---- + + printf ("> "); + fflush(stdout); +! if (fgets (s,256,stdin) == NULL) + { + printf("\n> CONT\n"); + strcpy(s, "CONT"); + } + ++ s[strlen(s)-1]='\0'; /* fgets provision */ ++ + for (p=0;s[p]!=0;p++) + if (islower(s[p])) + s[p] = toupper(s[p]); +*************** +*** 186,192 **** + char gash[4]; + + printf ("Press return to continue: "); +! gets (gash); + nlines = 0; + } + } +--- 193,199 ---- + char gash[4]; + + printf ("Press return to continue: "); +! fgets (gash,256,stdin); + nlines = 0; + } + } diff --git a/emulators/atari800/pkg-comment b/emulators/atari800/pkg-comment new file mode 100644 index 000000000000..b1079aac50d4 --- /dev/null +++ b/emulators/atari800/pkg-comment @@ -0,0 +1 @@ +Atari 8-bit computer emulator diff --git a/emulators/atari800/pkg-descr b/emulators/atari800/pkg-descr new file mode 100644 index 000000000000..5a4e31b6e745 --- /dev/null +++ b/emulators/atari800/pkg-descr @@ -0,0 +1,40 @@ +You've found David Firth's Atari 800 emulator which can emulate the +8-bit Atari 800 and XL series of home computers. + +Please refer to /usr/local/share/doc/atari (or equivalent on your +system) for the distribution documents. A man page has also been +installed. The system wide configuration file can be found at +/usr/local/lib/atari/atari800.cfg (or similar) which you will probably +want to copy to your home directory, at some stage, to personalise the +settings. + +If you're at all serious about your emulator then you SHOULD check out +these URL's in the order they're written: + + http://www.signus.demon.co.uk/david/ + http://zippy.sonoma.edu/~kendrick/nbs/new_and_emu.html + ftp://ftp.hackerz.com/hackerz/atari/web/index.html + comp.sys.atari.8bit + +This should get you started and provide you with numerous links to +other web sites. + +The ROM's for the Atari computers are, unfortunately, copyright. This +port will attempt to down-load another freeware Atari emulator for DOS +called PC Xformer 2.5 which contains copies of these ROM files. If you +would like to take a further look at XF2.5 you should find it in your +distfiles directory (if it successfully down-loaded :->). For more info +on this emulator check out "http://www.halcyon.com/brasoft/". + +If you have any general Atari questions then you might get a more +fruitful response by posting them to the news group, as the emulation +and questions mailing list won't be up-to-date with all things +Atari. However the FreeBSD emulation mailing list is dedicated to +discussing the emulation of other O/S's so don't be shy. Please check +Section 25 of the handbook for information on the mailing lists. + +Share and enjoy, + +Joel... +:-> +suttonj@interconnect.com.au diff --git a/emulators/atari800/pkg-plist b/emulators/atari800/pkg-plist new file mode 100644 index 000000000000..4d89a58f9f03 --- /dev/null +++ b/emulators/atari800/pkg-plist @@ -0,0 +1,17 @@ +bin/atari800 +lib/atari/atari800.cfg +lib/atari/ataribas.rom +lib/atari/atariosb.rom +lib/atari/atarixl.rom +man/man1/atari800.1.gz +share/doc/atari/BUGS +share/doc/atari/CHANGES +share/doc/atari/COPYING +share/doc/atari/CREDITS +share/doc/atari/INSTALL +share/doc/atari/README +share/doc/atari/TODO +share/doc/atari/USAGE +share/doc/atari/README.FreeBSD +@dirrm lib/atari +@dirrm share/doc/atari -- cgit v1.2.3