debian/0000755000000000000000000000000012261204533007164 5ustar debian/spectemu-x11.menu0000644000000000000000000000030212261204270012277 0ustar ?package(spectemu-x11):needs="x11" section="Applications/Emulators" \ title="Spectemu" longtitle="Spectemu ZX-Spectrum emulator" \ command="x-terminal-emulator -T spectemu -e /usr/bin/xspect" debian/rules0000755000000000000000000000242612261204270010246 0ustar #!/usr/bin/make -f tmp = debian/tmp ctmp = debian/spectemu-common xtmp = debian/spectemu-x11 export DEB_CFLAGS_MAINT_APPEND := -Wall export DEB_CXXFLAGS_MAINT_APPEND := -Wall %: dh $@ --with autoreconf autoreconf: autoreconf -f -i cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub . override_dh_autoreconf: dh_autoreconf debian/rules -- autoreconf override_dh_auto_configure: dh_auto_configure -- --datadir=/etc --with-readline override_dh_auto_build: $(MAKE) all tapeout $(MAKE) $(shell dpkg-buildflags --export=configure) -C utils override_dh_auto_clean: [ ! -f Makefile ] || $(MAKE) realclean $(MAKE) -C utils clean override_dh_auto_install: # datadir is deliberately different here because we're splitting it, # and this makes the split more convenient. dh_auto_install -- prefix=`pwd`/$(tmp)/usr \ datadir=`pwd`/$(tmp)/usr/share/spectemu override_dh_install: mv -f $(tmp)/usr/share/spectemu/spectemu.cfg $(ctmp)/etc/spectemu/ dh_install mv -f $(tmp)/usr/share/man/man1/xspect.1 \ $(ctmp)/usr/share/man/man1/spectemu.1 # dh_compress won't do these for us, as the package split causes # them to be broken symlinks. ln -sf spectemu.1.gz $(xtmp)/usr/share/man/man1/xspect.1.gz override_dh_installdocs: dh_installdocs --link-doc=spectemu-common debian/spectemu-common.install0000644000000000000000000000025412261204270013666 0ustar usr/share/man/man1/tapeout.1 usr/share/spectemu tapeout usr/bin utils/filt utils/spload utils/spt2tap utils/tap2spt utils/taplist utils/recs utils/tzxlist usr/lib/spectemu debian/spectemu-common.docs0000644000000000000000000000003012261204270013140 0ustar README README.Z80 TODO debian/README.Debian0000644000000000000000000000075712261204270011234 0ustar spectemu for Debian ------------------- This is spectemu, a ZX Spectrum emulator. It comes in an X11 version and, on some architectures (currently only amd64 and i386) an SVGAlib version as well. The various programs in the utils/ directory of the source tree (some of which are mentioned in the README) are installed in /usr/lib/spectemu to avoid polluting the namespace of /usr/bin with things like 'filt' and 'recs'. -- Colin Watson , Sat, 7 Apr 2001 20:33:36 +0100 debian/.git-dpm0000644000000000000000000000042512261204270010525 0ustar # see git-dpm(1) from git-dpm package c277da91203920f27b1941bb7fc38d2c7d4a19f2 c277da91203920f27b1941bb7fc38d2c7d4a19f2 53a0dfc2ff61282de0e5d40b8ad6073333b985d1 53a0dfc2ff61282de0e5d40b8ad6073333b985d1 spectemu_0.94a.orig.tar.gz 1ae4e6df89c51125d5b6190110f14b32e449fe07 212336 debian/spectemu-x11.install0000644000000000000000000000001712261204270013004 0ustar usr/bin/xspect debian/copyright0000644000000000000000000000170412261204270011117 0ustar This package was debianized by John Travers jtravs@debian.org on Mon, 15 Feb 1999 15:55:04 +0000, and is now maintained by Colin Watson . It was downloaded from http://www.inf.bme.hu/~mszeredi/spectemu/ Upstream Author: Miklos Szeredi Copyright (C) 1998 Miklos Szeredi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in '/usr/share/common-licenses/GPL'. debian/spectemu-common.dirs0000644000000000000000000000007112261204270013156 0ustar etc/spectemu usr/bin usr/lib/spectemu usr/share/spectemu debian/spectemu-common.postrm0000644000000000000000000000017012261204270013541 0ustar #! /bin/sh set -e if [ "$1" = purge ]; then rmdir --ignore-fail-on-non-empty /etc/spectemu fi #DEBHELPER# exit 0 debian/spectemu-x11.dirs0000644000000000000000000000002312261204270012274 0ustar usr/share/man/man1 debian/source/0000755000000000000000000000000012261204270010462 5ustar debian/source/format0000644000000000000000000000001412261204270011670 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012261204270010611 5ustar debian/patches/missing-includes.patch0000644000000000000000000000316612261204270015115 0ustar From b907d752c4848650b3222fb6531109feca85ae81 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 2 Jan 2014 06:28:15 +0000 Subject: Add various missing #include directives Forwarded: no Last-Update: 2014-01-02 Patch-Name: missing-includes.patch --- sp_to_s.c | 1 + spconf.c | 1 + spperif.c | 5 +++++ sptiming.c | 1 + utils/recs.c | 2 ++ 5 files changed, 10 insertions(+) diff --git a/sp_to_s.c b/sp_to_s.c index 5baa191..b11d936 100644 --- a/sp_to_s.c +++ b/sp_to_s.c @@ -18,6 +18,7 @@ * */ +#include #include #define MAX_TOK_NUM 256 diff --git a/spconf.c b/spconf.c index 7449b1b..68eb4e2 100644 --- a/spconf.c +++ b/spconf.c @@ -28,6 +28,7 @@ #include "snapshot.h" /* for SN_Z80 and SN_SNA */ #include "tapefile.h" /* for TAP_TAP and TAP_TZX */ +#include #include #include #include diff --git a/spperif.c b/spperif.c index ad23969..9665289 100644 --- a/spperif.c +++ b/spperif.c @@ -18,6 +18,11 @@ * */ +#include +#include +#include +#include + #include "spperif.h" #include "z80.h" diff --git a/sptiming.c b/sptiming.c index fe6be8c..1b781e4 100644 --- a/sptiming.c +++ b/sptiming.c @@ -27,6 +27,7 @@ #include #include #else +#include #include #endif diff --git a/utils/recs.c b/utils/recs.c index 4d7e29a..4f36e57 100644 --- a/utils/recs.c +++ b/utils/recs.c @@ -1,5 +1,7 @@ #include #include +#include +#include #include #include debian/patches/external-rom-image.patch0000644000000000000000000000531312261204270015331 0ustar From f2c9ba737a04fa012d5d755dc15fcc424171a06a Mon Sep 17 00:00:00 2001 From: Philip Kendall Date: Thu, 2 Jan 2014 06:28:16 +0000 Subject: Load the ROM image from a file rather than linking it directly The Spectrum ROM is non-free, so this allows spectemu to be in contrib and merely read non-free files rather than also being in non-free itself. Bug-Debian: http://bugs.debian.org/134261 Forwarded: no Last-Update: 2010-03-28 Patch-Name: external-rom-image.patch --- Makefile.in | 9 ++++++--- spperif.c | 28 +++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/Makefile.in b/Makefile.in index 872f874..bab432a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -7,10 +7,13 @@ bindir = @bindir@ mandir = @mandir@/man1 srcdir = @srcdir@ +ROM_IMAGE = /usr/share/spectrum-roms/48.rom + CC = @CC@ CPP = @CPP@ CFLAGS = @CFLAGS@ -CPPFLAGS = @DEFS@ @CPPFLAGS@ @X_CFLAGS@ -DDATADIR=\""$(datadir)"\" +CPPFLAGS = @DEFS@ @CPPFLAGS@ @X_CFLAGS@ -DDATADIR=\""$(datadir)"\" \ + -DROM_IMAGE=\""$(ROM_IMAGE)"\" INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ @@ -57,10 +60,10 @@ install_data: install: installdirs install_prog install_man install_data -z80_c_objs=z80.o z80optab.o z80_step.o spperif.o spect.o rom_imag.o \ +z80_c_objs=z80.o z80optab.o z80_step.o spperif.o spect.o \ z80_op1.o z80_op2.o z80_op3.o z80_op4.o z80_op5.o z80_op6.o -z80_i386_objs=z80.o spperif.o rom_imag.o i386emul.o +z80_i386_objs=z80.o spperif.o i386emul.o spect_objs=spmain.o spscr.o spkey.o spsound.o sptape.o tapefile.o \ snapshot.o compr.o sptiming.o interf.o misc.o spconf.o \ diff --git a/spperif.c b/spperif.c index 9665289..5645837 100644 --- a/spperif.c +++ b/spperif.c @@ -26,8 +26,6 @@ #include "spperif.h" #include "z80.h" -extern unsigned char rom_imag[]; - int SPNM(quick_load) = 0; int SPNM(load_trapped); @@ -72,6 +70,30 @@ void SPNM(init_screen_mark)(void) SPNM(border_update) = 1; } +static void init_rom(void) +{ + FILE *fp; + + fp = fopen(ROM_IMAGE, "rb"); + if(fp == NULL) { + fprintf(stderr, "Could not open file %s: %s\n", ROM_IMAGE, + strerror(errno)); + exit(1); + } + + if(fread(PRNM(proc).mem, 1, 0x4000, fp) != 0x4000) { + fprintf(stderr, "Error reading from %s: %s\n", ROM_IMAGE, strerror(errno)); + fclose(fp); + exit(1); + } + + if(fclose(fp)) { + fprintf(stderr, "Error closing %s: %s\n", ROM_IMAGE, strerror(errno)); + } + + return; +} + void SPNM(init)(void) { int i; @@ -98,7 +120,7 @@ void SPNM(init)(void) SPNM(scline) = 0; - for(i = 0; i < 0x4000; i++) PRNM(proc).mem[i] = rom_imag[i]; + init_rom(); SPNM(init_screen_mark)(); } debian/patches/cxx-g++.patch0000644000000000000000000000103712261204270013007 0ustar From e5744c43fe7af086039f9036acf86866de53a08d Mon Sep 17 00:00:00 2001 From: Kaare Hviid Date: Thu, 2 Jan 2014 06:28:17 +0000 Subject: Set CXX to g++, not gcc Bug-Debian: http://bugs.debian.org/270651 Forwarded: no Last-Update: 2010-03-28 Patch-Name: cxx-g++.patch --- utils/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/Makefile b/utils/Makefile index af4f661..3be3041 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -1,5 +1,5 @@ CC=gcc -CXX=gcc +CXX=g++ FLAGS=-Wall CPPFLAGS= debian/patches/no-termcap.patch0000644000000000000000000000200312261204270013672 0ustar From c277da91203920f27b1941bb7fc38d2c7d4a19f2 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 2 Jan 2014 06:28:19 +0000 Subject: Linking against libreadline does not require -ltermcap Pointed out by Sven Joachim. Forwarded: no Last-Update: 2011-10-21 Patch-Name: no-termcap.patch --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 76b06fb..ee47c6a 100644 --- a/configure.in +++ b/configure.in @@ -134,11 +134,11 @@ AC_ARG_WITH(readline, [if test "$withval" = no; then withrl=no; fi]) if test "$withrl" = yes; then - AC_CHECK_LIB(readline, readline, have_rl=yes, have_rl=no, -ltermcap) + AC_CHECK_LIB(readline, readline, have_rl=yes, have_rl=no) if test "$have_rl" = yes; then AC_CHECK_HEADER(readline/readline.h, [ AC_DEFINE(HAVE_READLINE) - rllibs="-lreadline -ltermcap"], [ + rllibs="-lreadline"], [ AC_MSG_WARN([make sure 'readline.h' is in a 'readline' subdirectory])]) fi fi debian/patches/series0000644000000000000000000000011712261204270012025 0ustar missing-includes.patch external-rom-image.patch cxx-g++.patch no-termcap.patch debian/compat0000644000000000000000000000000212261204270010360 0ustar 9 debian/control0000644000000000000000000000505512261204270010572 0ustar Source: spectemu Section: contrib/otherosfs Priority: optional Maintainer: Colin Watson Standards-Version: 3.5.6 Build-Depends: dpkg-dev (>= 1.16.1~), debhelper (>= 9~), libreadline-dev, x11proto-core-dev, libx11-dev, libxt-dev, libxext-dev, dh-autoreconf, autotools-dev Vcs-Git: git://anonscm.debian.org/users/cjwatson/spectemu.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=users/cjwatson/spectemu.git Package: spectemu-common Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: spectemu-x11 Replaces: xspectemu Description: Fast 48k ZX Spectrum Emulator (common files) Spectemu emulates the 48k ZX Spectrum, which uses the Z80 microprocessor. This package contains common configuration files and utilities which are or can be used by either the X11 or the SVGAlib frontend. . It emulates the Z80 processor as well as the 48k Spectrum's other hardware: keyboard, screen, sound, tape I/O. The emulation is very close to the real thing, but it is still quite fast (It was reported to be working well on a laptop with 486 at 25MHz!). On the other hand, the user interface is not the best. . Features include: - Sound support through Linux kernel sound-card driver. - Snapshot saving and loading (.Z80 and .SNA format) - Tape emulation: loading from tape files (.TAP and .TZX format) - Optional quick loading of tapes. - Saving to tape files. - Separate utility to save tape files to real tape - Configurable with config files and from command line Package: spectemu-x11 Architecture: any Depends: spectemu-common (= ${binary:Version}), spectrum-roms, ${shlibs:Depends}, ${misc:Depends} Conflicts: xspectemu Replaces: xspectemu Provides: xspectemu Description: Fast 48k ZX Spectrum Emulator for X11 xspect is the X11 version of Spectemu which emulates the 48k ZX Spectrum, which uses the Z80 microprocessor. . It emulates the Z80 processor as well as the 48k Spectrum's other hardware: keyboard, screen, sound, tape I/O. The emulation is very close to the real thing, but it is still quite fast (It was reported to be working well on a laptop with 486 at 25MHz!). On the other hand, the user interface is not the best. . Features include: - Sound support through Linux kernel sound-card driver. - Snapshot saving and loading (.Z80 and .SNA format) - Tape emulation: loading from tape files (.TAP and .TZX format) - Optional quick loading of tapes. - Saving to tape files. - Separate utility to save tape files to real tape - Configurable with config files and from command line debian/changelog0000644000000000000000000002131412261204435011040 0ustar spectemu (0.94a-18) unstable; urgency=medium * Switch to git; adjust Vcs-* fields. * Add a couple more inclusions for exit(). -- Colin Watson Thu, 02 Jan 2014 06:37:16 +0000 spectemu (0.94a-17) unstable; urgency=low [ Colin Watson ] * Build-depend on debhelper (>= 9~) directly rather than requiring a Lintian override for use of 8.9.0. [ Moritz Muehlenhoff ] * Remove the spectemu-svga package, since svgalib is scheduled for removal (closes: #711115). -- Colin Watson Fri, 07 Jun 2013 16:49:20 +0100 spectemu (0.94a-16) unstable; urgency=low * Use dh-autoreconf. * Remove config-guess-sub.patch in favour of updating config.guess and config.sub automatically at build time. dh_autoreconf does not take care of that by default because spectemu does not use automake. -- Colin Watson Sat, 09 Feb 2013 19:27:10 +0000 spectemu (0.94a-15) unstable; urgency=low * Fix passing of build flags to utils/Makefile. -- Colin Watson Fri, 22 Jun 2012 14:06:14 +0100 spectemu (0.94a-14) unstable; urgency=low * Drop -ltermcap rather than unnecessarily build-depending on libncurses5-dev. Thanks, Sven Joachim. -- Colin Watson Fri, 21 Oct 2011 11:12:10 +0100 spectemu (0.94a-13) unstable; urgency=low * Explicitly build-depend on libncurses5-dev, since libreadline6-dev no longer depends on it. * Use dpkg-buildflags and debhelper 9 to set default compiler flags. -- Colin Watson Thu, 20 Oct 2011 13:03:28 +0100 spectemu (0.94a-12) unstable; urgency=low * Use architecture restriction in spectemu-common's Suggests field rather than a substvar; this is sanctioned by policy 3.9.1. * Update Vcs-Bzr field for Alioth changes. -- Colin Watson Sun, 24 Jul 2011 13:44:12 +0100 spectemu (0.94a-11) unstable; urgency=low * Convert to source format 3.0 (quilt) and DEP-3 patch tagging. -- Colin Watson Sun, 09 May 2010 13:38:05 +0100 spectemu (0.94a-10) unstable; urgency=low * Build-depend on libreadline-dev, not libreadline5-dev (closes: #553856). * Use 'dh_installdocs --link-doc' option from debhelper 7.4.2. -- Colin Watson Wed, 17 Feb 2010 14:23:29 +0000 spectemu (0.94a-9) unstable; urgency=low * Update DEB_BUILD_OPTIONS parsing code from policy 3.8.0. * Imported into a branch on bzr.debian.org; add Vcs-Bzr control field. * Convert to debhelper 7. I made extensive use of override targets, so this requires 7.0.50. * Build-depend on x11proto-core-dev rather than the transitional x-dev package. * Quote value of needs= in spectemu-svga.menu. * Update config.guess and config.sub from autotools-dev 20090611.1. -- Colin Watson Mon, 07 Sep 2009 01:58:23 +0100 spectemu (0.94a-8) unstable; urgency=low * Build-depend on libsvga1-dev rather than svgalibg1-dev, and build spectemu-svga for amd64 too (closes: #483448). -- Colin Watson Wed, 28 May 2008 22:04:57 +0100 spectemu (0.94a-7) unstable; urgency=low * Use autotools-dev's recommended ./configure options to set the host type. -- Colin Watson Mon, 19 Nov 2007 08:27:23 +0000 spectemu (0.94a-6) unstable; urgency=low * Update to section structure from menu 2.1.35. * Capitalise title fields in menu files, add longtitle fields, and add "(SVGA)" to spectemu-svga's menu file. * Use the ${binary:Version} substvar rather than ${Source-Version}. * Don't ignore 'make clean' errors other than a missing Makefile. -- Colin Watson Thu, 05 Jul 2007 12:34:13 +0100 spectemu (0.94a-5) unstable; urgency=low * Build-depend on x-dev, libx11-dev, libxt-dev, and libxext-dev rather than the transitional xlibs-dev package. * Use debhelper v4. -- Colin Watson Fri, 16 Dec 2005 13:16:04 +0000 spectemu (0.94a-4) unstable; urgency=low * Build-depend on libreadline5-dev (closes: #326277). * Drop old HAVE_CONFIG_H workaround; bug #125398 was fixed a long time ago. * Update config.guess and config.sub from autotools-dev 20050803.1. * Include in spconf.c for exit(). -- Colin Watson Sat, 3 Sep 2005 23:04:13 +0100 spectemu (0.94a-3) unstable; urgency=low * Set CXX to g++, not gcc (closes: #270651). * Quote values in menu file. -- Colin Watson Sat, 11 Sep 2004 18:43:38 +0100 spectemu (0.94a-2) unstable; urgency=low * Drop versioned fileutils dependency from before potato; coreutils provides that now anyway (closes: #175711). -- Colin Watson Tue, 7 Jan 2003 20:25:29 +0000 spectemu (0.94a-1) unstable; urgency=low * It seems that the Spectrum ROM is non-free (can't sell, can't embed in hardware), although Amstrad don't mind them being redistributed. I've split the ROM into a separate spectrum-roms package, and this package is now in contrib rather than main (closes: #134261). * New repacked upstream source without the Spectrum ROM. * The ROM is now loaded from a file rather than being linked directly into the emulator executable (thanks, Philip Kendall). * Remove Emacs local variables from this changelog. * Remove /etc/spectemu on purge, depending on fileutils (>= 4.0-5) for the --ignore-fail-if-non-empty option. * Update config.guess and config.sub from autotools-dev 20020201.1. -- Colin Watson Sun, 3 Mar 2002 23:10:22 +0000 spectemu (0.94-8) unstable; urgency=low * Correct capitalization of MHz in package descriptions (thanks, Matt Zimmerman; closes: #125373, #125374, #125375). * Evil hack to work around readline HAVE_CONFIG_H breakage (see bug #125398). -- Colin Watson Tue, 18 Dec 2001 01:08:36 +0000 spectemu (0.94-7) unstable; urgency=low * Support cross-compilation the right way, with dpkg-architecture. -- Colin Watson Mon, 8 Oct 2001 02:07:49 +0100 spectemu (0.94-6) unstable; urgency=low * debian/rules: Empty DH_OPTIONS in install target (closes: #112939). -- Colin Watson Thu, 20 Sep 2001 19:32:39 +0100 spectemu (0.94-5) unstable; urgency=low * Revert dh_gencontrol hack now that debhelper is fixed, and build-depend on a fixed version. * Build-depend on libreadline4-dev as a real alternative for the virtual libreadline-dev. * Fix "Upstream Author(s)" dh_make-ism. * Policy version 3.5.6. -- Colin Watson Sun, 16 Sep 2001 04:35:05 +0100 spectemu (0.94-4) unstable; urgency=low * Add to substvars using a documented interface this time, now that debhelper has reminded me that using undocumented ones is a bad idea. * Hacked around debhelper bug #89311. * Lose debian/dirs in favour of debian/spectemu-common.dirs. -- Colin Watson Tue, 29 May 2001 18:50:58 +0100 spectemu (0.94-3) unstable; urgency=low * svgalib is no longer built for alpha. * Updated to policy version 3.5.2: no changes required. * Added lintian override for /usr/bin/vgaspect being setuid root. * Use debhelper's --same-arch flag more consistently. -- Colin Watson Sat, 7 Apr 2001 20:48:31 +0100 spectemu (0.94-2) unstable; urgency=low * Taking over as maintainer, with John Travers' consent. * Updated to policy version 3.5.0: - FHS updates. - Build dependencies. - Support for DEB_BUILD_OPTIONS. * Use debhelper v3. * Call the source package spectemu, and build X11 and SVGAlib versions (closes: #37663). All the packages at least replace xspectemu, even spectemu-svga; the latter is to avoid problems on some architectures where vgaspect was accidentally included in the xspectemu package. spectemu-x11 conflicts with and provides xspectemu. * debian/rules: clean target now does so properly. * debian/copyright: Updated download URL and GPL pointer. * Install upstream changelog only once. * Removed README.DOS. :) * Build-depend on readline-dev so that readline support gets used (closes: #64626). * Use x-terminal-emulator rather than xterm in menu entry (closes: #59008). * Build tapeout utility (since vgaspect is now included in spectemu-svga, this closes: #45538). * Install configuration file in /etc/spectemu, and make it a conffile. * Build utils/* and install them in /usr/lib/spectemu. Add a note to README.Debian explaining why ('filt' and 'recs' would cause namespace pollution). -- Colin Watson Fri, 16 Feb 2001 02:56:57 +0000 xspectemu (0.94-1) unstable; urgency=low * Initial Release. -- John Travers Mon, 15 Feb 1999 15:55:04 +0000