summaryrefslogtreecommitdiff
path: root/libsidplay2/sidplay-libs-2.1.0/libsidplay/include
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2009-08-16 20:56:21 +0200
committerGravatar waker <wakeroid@gmail.com>2009-08-16 21:14:59 +0200
commit1cdc11fdf2b5f01c3dd9370f5adc3b05159fe55c (patch)
tree4637a616e1efbb19eadcbe8f7546e324e6f1bd7b /libsidplay2/sidplay-libs-2.1.0/libsidplay/include
parent1e7c5ae1fa743a73fbc0c1831201271691c6ae95 (diff)
moved libsidplay2
Diffstat (limited to 'libsidplay2/sidplay-libs-2.1.0/libsidplay/include')
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/Makefile.am2
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/Makefile.in426
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/config.h33
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidenv.h131
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Buffer.h121
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Makefile.am6
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Makefile.in360
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/SidTune.h356
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/SmartPtr.h228
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/c64env.h46
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/component.h33
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/event.h138
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sid2types.h87
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidbuilder.h77
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidconfig.h33
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidendian.h415
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidint.h24
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidplay2.h73
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidtypes.h62
-rw-r--r--libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidusage.h72
20 files changed, 2723 insertions, 0 deletions
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/Makefile.am b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/Makefile.am
new file mode 100644
index 00000000..9ccc23eb
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/Makefile.am
@@ -0,0 +1,2 @@
+SUBDIRS = sidplay
+EXTRA_DIST = config.h sidenv.h
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/Makefile.in b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/Makefile.in
new file mode 100644
index 00000000..16cc3cde
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/Makefile.in
@@ -0,0 +1,426 @@
+# Makefile.in generated by automake 1.7.1 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBVERSION = @LIBVERSION@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SID_HAVE_BOOL = @SID_HAVE_BOOL@
+SID_HAVE_STDBOOL_H = @SID_HAVE_STDBOOL_H@
+SID_SIZEOF_CHAR = @SID_SIZEOF_CHAR@
+SID_SIZEOF_INT = @SID_SIZEOF_INT@
+SID_SIZEOF_LONG_INT = @SID_SIZEOF_LONG_INT@
+SID_SIZEOF_SHORT_INT = @SID_SIZEOF_SHORT_INT@
+SID_WORDS_ENDIANESS = @SID_WORDS_ENDIANESS@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builders = @builders@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = sidplay
+EXTRA_DIST = config.h sidenv.h
+subdir = include
+mkinstalldirs = $(SHELL) $(top_srcdir)/unix/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/unix/config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+ ps-recursive install-info-recursive uninstall-info-recursive \
+ all-recursive install-data-recursive install-exec-recursive \
+ installdirs-recursive install-recursive uninstall-recursive \
+ check-recursive installcheck-recursive
+DIST_COMMON = Makefile.am Makefile.in
+DIST_SUBDIRS = $(SUBDIRS)
+all: all-recursive
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $$MAKEFLAGS; amf=$$2; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" \
+ distdir=../$(distdir)/$$subdir \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+
+distclean-am: clean-am distclean-generic distclean-libtool \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-recursive
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-recursive
+
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+ clean-generic clean-libtool clean-recursive ctags \
+ ctags-recursive distclean distclean-generic distclean-libtool \
+ distclean-recursive distclean-tags distdir dvi dvi-am \
+ dvi-recursive info info-am info-recursive install install-am \
+ install-data install-data-am install-data-recursive \
+ install-exec install-exec-am install-exec-recursive \
+ install-info install-info-am install-info-recursive install-man \
+ install-recursive install-strip installcheck installcheck-am \
+ installdirs installdirs-am installdirs-recursive \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-recursive pdf pdf-am \
+ pdf-recursive ps ps-am ps-recursive tags tags-recursive \
+ uninstall uninstall-am uninstall-info-am \
+ uninstall-info-recursive uninstall-recursive
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/config.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/config.h
new file mode 100644
index 00000000..2e5c8ba4
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/config.h
@@ -0,0 +1,33 @@
+/***************************************************************************
+ config.h - Redirect to real config.h
+ -------------------
+ begin : Tues Dec 4 2001
+ copyright : (C) 2001 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+/***************************************************************************
+ * $Log: config.h,v $
+ * Revision 1.6 2001/12/07 00:40:22 s_a_white
+ * Windows fixes.
+ *
+ * Revision 1.5 2001/12/05 23:34:58 s_a_white
+ * Now redirects to real config.h
+ *
+ ***************************************************************************/
+
+#if defined(HAVE_UNIX)
+# include "../unix/config.h"
+#elif defined(HAVE_MSWINDOWS)
+# include "../win/VC/config.h"
+#else
+# error Platform no supported!
+#endif
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidenv.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidenv.h
new file mode 100644
index 00000000..0f02e31c
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidenv.h
@@ -0,0 +1,131 @@
+/***************************************************************************
+ environment.h - This is the environment file which
+ defines all the standard functions
+ to be inherited by the ICs.
+ -------------------
+ begin : Thu May 11 2000
+ copyright : (C) 2000 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+/***************************************************************************
+ * $Log: sidenv.h,v $
+ * Revision 1.5 2002/01/29 21:53:25 s_a_white
+ * Fixed envSleep
+ *
+ * Revision 1.4 2002/01/29 08:02:22 s_a_white
+ * PSID sample improvements.
+ *
+ * Revision 1.3 2001/07/14 13:09:35 s_a_white
+ * Removed cache parameters.
+ *
+ * Revision 1.2 2000/12/11 19:10:59 s_a_white
+ * AC99 Update.
+ *
+ ***************************************************************************/
+
+#ifndef _environment_h_
+#define _environment_h_
+
+#include "sidtypes.h"
+
+/*
+// Enviroment functions - THESE FUNTIONS MUST BE PROVIDED
+// TO ALLOW THE COMPONENTS TO SPEAK TO EACH OTHER. ENVP
+// CAN BE USED TO CREATE VERSIONS OF THESE FUNTIONS
+// WHICH ACCESS MEMBER FUNTIONS OF OTHER C++ OBJECTS!
+extern void reset (void);
+extern uint8_t readMemByte (uint_least16_t addr);
+extern void writeMemByte (uint_least16_t addr, uint8_t data);
+
+// Interrupts - You must raise the interrupt(s)
+// every cycle if you have not yet been serviced
+extern void triggerIRQ (void);
+extern void triggerNMI (void);
+extern void triggerRST (void);
+extern void clearIRQ (void);
+
+// Sidplay compatibily funtions
+extern bool checkBankJump (uint_least16_t addr);
+extern uint8_t readEnvMemByte (uint_least16_t addr);
+*/
+
+class C64Environment
+{
+/*
+protected:
+ // Eniviroment functions
+ virtual inline void envReset (void)
+ { ::reset (); }
+ virtual inline uint8_t envReadMemByte (uint_least16_t addr)
+ { ::readMemByte (addr); }
+ virtual inline void envWriteMemByte (uint_least16_t addr, uint8_t data)
+ { ::writeMemByte (addr, data); }
+
+ // Interrupts
+ virtual inline void encTriggerIRQ (void)
+ { ::triggerIRQ (); }
+ virtual inline void envTriggerNMI (void)
+ { ::triggerNMI (); }
+ virtual inline void envTriggerRST (void)
+ { ::triggerRST (); }
+ virtual inline void envClearIRQ (void)
+ { ::clearIRQ (); }
+
+ // Sidplay compatibily funtions
+ virtual inline bool envCheckBankJump (uint_least16_t addr)
+ { ::checkBankJump (); }
+ virtual inline uint8_t envReadMemDataByte (uint_least16_t addr)
+ { ::readMemDataByte (); }
+ */
+
+private:
+ C64Environment *m_envp;
+
+ // Sidplay2 Player Environemnt
+public:
+ virtual ~C64Environment () {}
+ virtual void setEnvironment (C64Environment *envp)
+ {
+ m_envp = envp;
+ }
+
+protected:
+ // Eniviroment functions
+ virtual inline void envReset (void)
+ { m_envp->envReset (); }
+ virtual inline uint8_t envReadMemByte (uint_least16_t addr)
+ { return m_envp->envReadMemByte (addr); }
+ virtual inline void envWriteMemByte (uint_least16_t addr, uint8_t data)
+ { m_envp->envWriteMemByte (addr, data); }
+
+ // Interrupts
+ virtual inline void envTriggerIRQ (void)
+ { m_envp->envTriggerIRQ (); }
+ virtual inline void envTriggerNMI (void)
+ { m_envp->envTriggerNMI (); }
+ virtual inline void envTriggerRST (void)
+ { m_envp->envTriggerRST (); }
+ virtual inline void envClearIRQ (void)
+ { m_envp->envClearIRQ (); }
+
+ // Sidplay compatibily funtions
+ virtual inline bool envCheckBankJump (uint_least16_t addr)
+ { return m_envp->envCheckBankJump (addr); }
+ virtual inline uint8_t envReadMemDataByte (uint_least16_t addr)
+ { return m_envp->envReadMemDataByte (addr); }
+ virtual inline void envSleep (void)
+ { m_envp->envSleep (); }
+ virtual inline void envLoadFile (char *file)
+ { m_envp->envLoadFile (file); }
+};
+
+#endif // _environment_h_
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Buffer.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Buffer.h
new file mode 100644
index 00000000..8e766e1c
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Buffer.h
@@ -0,0 +1,121 @@
+/*
+ * /home/ms/files/source/libsidtune/RCS/Buffer.h,v
+ *
+ * Copyright (C) Michael Schwendt <mschwendt@yahoo.com>
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef BUFFER_H
+#define BUFFER_H
+
+#include <assert.h>
+#include "sidtypes.h"
+
+template <class T> class Buffer_sidtt
+{
+ public:
+ Buffer_sidtt(void) : dummy(0)
+ {
+ kill();
+ }
+
+ Buffer_sidtt(T* inBuf, uint_least32_t inLen) : dummy(0)
+ {
+ kill();
+ if (inBuf!=0 && inLen!=0)
+ {
+ buf = inBuf;
+ bufLen = inLen;
+ }
+ }
+
+ bool assign(T* newBuf, uint_least32_t newLen)
+ {
+ erase();
+ buf = newBuf;
+ bufLen = newLen;
+ return (buf!=0);
+ }
+
+ T* get(void) const { return buf; }
+ uint_least32_t len(void) const { return bufLen; }
+
+ T* xferPtr(void)
+ {
+ T* tmpBuf = buf;
+ buf = 0;
+ return tmpBuf;
+ }
+
+ uint_least32_t xferLen(void)
+ {
+ uint_least32_t tmpBufLen = bufLen;
+ bufLen = 0;
+ return tmpBufLen;
+ }
+
+ T& operator[](uint_least32_t index)
+ {
+ if (index < bufLen)
+ return buf[index];
+ else
+ return dummy;
+ }
+
+ bool isEmpty(void) const { return (buf==0); }
+
+ void erase(void)
+ {
+ if (buf!=0 && bufLen!=0)
+ {
+#ifndef SID_HAVE_BAD_COMPILER
+ delete[] buf;
+#else
+ delete[] (void *) buf;
+#endif
+ }
+ kill();
+ }
+
+ ~Buffer_sidtt(void)
+ {
+ erase();
+ }
+
+ private:
+ T* buf;
+ uint_least32_t bufLen;
+ T dummy;
+
+ void kill(void)
+ {
+ buf = 0;
+ bufLen = 0;
+ }
+
+ private: // prevent copying
+ // SAW - Need function body so code can be fully instatiated
+ // for exporting from dll. Use asserts in debug mode as these
+ // should not be used.
+ Buffer_sidtt(const Buffer_sidtt&) : dummy (0) { assert(0); }
+ Buffer_sidtt& operator=(Buffer_sidtt& b)
+ {
+ assert(0);
+ return b;
+ }
+};
+
+#endif /* BUFFER_H */
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Makefile.am b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Makefile.am
new file mode 100644
index 00000000..adb87b6a
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Makefile.am
@@ -0,0 +1,6 @@
+EXTRA_DIST=sidconfig.h sidint.h
+
+sidplayincludedir = $(includedir)/sidplay
+sidplayinclude_HEADERS = sidendian.h sidplay2.h \
+sidtypes.h sid2types.h SidTune.h Buffer.h SmartPtr.h \
+c64env.h component.h event.h sidbuilder.h sidusage.h
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Makefile.in b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Makefile.in
new file mode 100644
index 00000000..f19799ca
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/Makefile.in
@@ -0,0 +1,360 @@
+# Makefile.in generated by automake 1.7.1 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+ACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBVERSION = @LIBVERSION@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SID_HAVE_BOOL = @SID_HAVE_BOOL@
+SID_HAVE_STDBOOL_H = @SID_HAVE_STDBOOL_H@
+SID_SIZEOF_CHAR = @SID_SIZEOF_CHAR@
+SID_SIZEOF_INT = @SID_SIZEOF_INT@
+SID_SIZEOF_LONG_INT = @SID_SIZEOF_LONG_INT@
+SID_SIZEOF_SHORT_INT = @SID_SIZEOF_SHORT_INT@
+SID_WORDS_ENDIANESS = @SID_WORDS_ENDIANESS@
+STRIP = @STRIP@
+VERSION = @VERSION@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builders = @builders@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+EXTRA_DIST = sidconfig.h sidint.h
+
+sidplayincludedir = $(includedir)/sidplay
+sidplayinclude_HEADERS = sidendian.h sidplay2.h \
+sidtypes.h sid2types.h SidTune.h Buffer.h SmartPtr.h \
+c64env.h component.h event.h sidbuilder.h sidusage.h
+
+subdir = include/sidplay
+mkinstalldirs = $(SHELL) $(top_srcdir)/unix/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/unix/config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+HEADERS = $(sidplayinclude_HEADERS)
+
+DIST_COMMON = $(sidplayinclude_HEADERS) Makefile.am Makefile.in
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/sidplay/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+sidplayincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+install-sidplayincludeHEADERS: $(sidplayinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(sidplayincludedir)
+ @list='$(sidplayinclude_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(sidplayincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(sidplayincludedir)/$$f"; \
+ $(sidplayincludeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(sidplayincludedir)/$$f; \
+ done
+
+uninstall-sidplayincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sidplayinclude_HEADERS)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(sidplayincludedir)/$$f"; \
+ rm -f $(DESTDIR)$(sidplayincludedir)/$$f; \
+ done
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+ esac; \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(sidplayincludedir)
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-generic distclean-libtool \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-sidplayincludeHEADERS
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am uninstall-sidplayincludeHEADERS
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool ctags distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am info \
+ info-am install install-am install-data install-data-am \
+ install-exec install-exec-am install-info install-info-am \
+ install-man install-sidplayincludeHEADERS install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-info-am uninstall-sidplayincludeHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/SidTune.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/SidTune.h
new file mode 100644
index 00000000..f544afb6
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/SidTune.h
@@ -0,0 +1,356 @@
+/*
+ * /home/ms/files/source/libsidtune/RCS/SidTune.h,v
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef SIDTUNE_H
+#define SIDTUNE_H
+
+
+#include "sidtypes.h"
+#include "Buffer.h"
+#include "SmartPtr.h"
+
+#include <fstream>
+
+
+const uint_least16_t SIDTUNE_MAX_SONGS = 256;
+// Also PSID file format limit.
+
+const uint_least16_t SIDTUNE_MAX_CREDIT_STRINGS = 10;
+const uint_least16_t SIDTUNE_MAX_CREDIT_STRLEN = 80+1;
+// 80 characters plus terminating zero.
+
+const uint_least32_t SIDTUNE_MAX_MEMORY = 65536;
+const uint_least32_t SIDTUNE_MAX_FILELEN = 65536+2+0x7C;
+// C64KB+LOAD+PSID
+
+const int SIDTUNE_SPEED_VBI = 0; // Vertical-Blanking-Interrupt
+const int SIDTUNE_SPEED_CIA_1A = 60; // CIA 1 Timer A
+
+const int SIDTUNE_CLOCK_UNKNOWN = 0x00;
+const int SIDTUNE_CLOCK_PAL = 0x01; // These are also used in the
+const int SIDTUNE_CLOCK_NTSC = 0x02; // emulator engine!
+const int SIDTUNE_CLOCK_ANY = (SIDTUNE_CLOCK_PAL | SIDTUNE_CLOCK_NTSC);
+
+const int SIDTUNE_SIDMODEL_UNKNOWN = 0x00;
+const int SIDTUNE_SIDMODEL_6581 = 0x01; // These are also used in the
+const int SIDTUNE_SIDMODEL_8580 = 0x02; // emulator engine!
+const int SIDTUNE_SIDMODEL_ANY = (SIDTUNE_SIDMODEL_6581 | SIDTUNE_SIDMODEL_8580);
+
+const int SIDTUNE_COMPATIBILITY_C64 = 0x00; // File is C64 compatible
+const int SIDTUNE_COMPATIBILITY_PSID = 0x01; // File is PSID specific
+const int SIDTUNE_COMPATIBILITY_R64 = 0x02; // File is Real C64 only
+
+
+// Required to export template
+#ifndef _SidTune_cpp_
+extern
+#endif
+template class SID_EXTERN Buffer_sidtt<const uint_least8_t>;
+
+struct SidTuneInfo
+{
+ // An instance of this structure is used to transport values to
+ // and from SidTune objects.
+
+ // You must read (i.e. activate) sub-song specific information
+ // via:
+ // const SidTuneInfo& tuneInfo = SidTune[songNumber];
+ // const SidTuneInfo& tuneInfo = SidTune.getInfo();
+ // void SidTune.getInfo(tuneInfo&);
+
+ // Consider the following fields as read-only, because the SidTune class
+ // does not provide an implementation of: bool setInfo(const SidTuneInfo&).
+ // Currently, the only way to get the class to accept values which
+ // are written to these fields is by creating a derived class.
+
+ const char* formatString; // the name of the identified file format
+ const char* statusString; // error/status message of last operation
+
+ const char* speedString; // describing the speed a song is running at
+
+ uint_least16_t loadAddr;
+ uint_least16_t initAddr;
+ uint_least16_t playAddr;
+
+ uint_least16_t songs;
+ uint_least16_t startSong;
+
+ // The SID chip base address(es) used by the sidtune.
+ uint_least16_t sidChipBase1; // 0xD400 (normal, 1st SID)
+ uint_least16_t sidChipBase2; // 0xD?00 (2nd SID) or 0 (no 2nd SID)
+
+ // Available after song initialization.
+ //
+ uint_least16_t irqAddr; // if (playAddr == 0), interrupt handler has been
+ // installed and starts calling the C64 player
+ // at this address
+ uint_least16_t currentSong; // the one that has been initialized
+ uint_least8_t songSpeed; // intended speed, see top
+ uint_least8_t clockSpeed; // -"-
+ uint_least8_t relocStartPage; // First available page for relocation
+ uint_least8_t relocPages; // Number of pages available for relocation
+ bool musPlayer; // whether Sidplayer routine has been installed
+ int sidModel; // Sid Model required for this sid
+ int compatibility; // compatibility requirements
+ bool fixLoad; // whether load address might be duplicate
+ uint_least16_t songLength; // --- not yet supported ---
+ //
+ // Song title, credits, ...
+ // 0 = Title, 1 = Author, 2 = Copyright/Publisher
+ //
+ uint_least8_t numberOfInfoStrings; // the number of available text info lines
+ char* infoString[SIDTUNE_MAX_CREDIT_STRINGS];
+ //
+ uint_least16_t numberOfCommentStrings; // --- not yet supported ---
+ char ** commentString; // --- not yet supported ---
+ //
+ uint_least32_t dataFileLen; // length of single-file sidtune file
+ uint_least32_t c64dataLen; // length of raw C64 data without load address
+ char* path; // path to sidtune files; "", if cwd
+ char* dataFileName; // a first file: e.g. "foo.c64"; "", if none
+ char* infoFileName; // a second file: e.g. "foo.sid"; "", if none
+ //
+};
+
+
+class SID_EXTERN SidTune
+{
+
+ public: // ----------------------------------------------------------------
+
+ // If your opendir() and readdir()->d_name return path names
+ // that contain the forward slash (/) as file separator, but
+ // your operating system uses a different character, there are
+ // extra functions that can deal with this special case. Set
+ // separatorIsSlash to true if you like path names to be split
+ // correctly.
+ // You do not need these extra functions if your systems file
+ // separator is the forward slash.
+ //
+ // Load a sidtune from a file.
+ //
+ // To retrieve data from standard input pass in filename "-".
+ // If you want to override the default filename extensions use this
+ // contructor. Please note, that if the specified ``sidTuneFileName''
+ // does exist and the loader is able to determine its file format,
+ // this function does not try to append any file name extension.
+ // See ``sidtune.cpp'' for the default list of file name extensions.
+ // You can specific ``sidTuneFileName = 0'', if you do not want to
+ // load a sidtune. You can later load one with open().
+ SidTune(const char* fileName, const char **fileNameExt = 0,
+ const bool separatorIsSlash = false);
+
+ // Load a single-file sidtune from a memory buffer.
+ // Currently supported: PSID format
+ SidTune(const uint_least8_t* oneFileFormatSidtune, const uint_least32_t sidtuneLength);
+
+ virtual ~SidTune();
+
+ // The sidTune class does not copy the list of file name extensions,
+ // so make sure you keep it. If the provided pointer is 0, the
+ // default list will be activated. This is a static list which
+ // is used by all SidTune objects.
+ void setFileNameExtensions(const char **fileNameExt);
+
+ // Load a sidtune into an existing object.
+ // From a file.
+ bool load(const char* fileName, const bool separatorIsSlash = false);
+
+ // From a buffer.
+ bool read(const uint_least8_t* sourceBuffer, const uint_least32_t bufferLen);
+
+ // Select sub-song (0 = default starting song)
+ // and retrieve active song information.
+ const SidTuneInfo& operator[](const uint_least16_t songNum);
+
+ // Select sub-song (0 = default starting song)
+ // and return active song number out of [1,2,..,SIDTUNE_MAX_SONGS].
+ uint_least16_t selectSong(const uint_least16_t songNum);
+
+ // Retrieve sub-song specific information.
+ // Beware! Still member-wise copy!
+ const SidTuneInfo& getInfo();
+
+ // Get a copy of sub-song specific information.
+ // Beware! Still member-wise copy!
+ void getInfo(SidTuneInfo&);
+
+ // Determine current state of object (true = okay, false = error).
+ // Upon error condition use ``getInfo'' to get a descriptive
+ // text string in ``SidTuneInfo.statusString''.
+ operator bool() { return status; }
+ bool getStatus() { return status; }
+
+ // Whether sidtune uses two SID chips.
+ bool isStereo()
+ {
+ return (info.sidChipBase1!=0 && info.sidChipBase2!=0);
+ }
+
+ // Copy sidtune into C64 memory (64 KB).
+ bool placeSidTuneInC64mem(uint_least8_t* c64buf);
+
+ // --- file save & format conversion ---
+
+ // These functions work for any successfully created object.
+ // overWriteFlag: true = Overwrite existing file.
+ // false = Default, return error when file already
+ // exists.
+ // One could imagine an "Are you sure ?"-checkbox before overwriting
+ // any file.
+ // returns: true = Successful, false = Error condition.
+ bool saveC64dataFile( const char* destFileName, const bool overWriteFlag = false );
+ bool saveSIDfile( const char* destFileName, const bool overWriteFlag = false );
+ bool savePSIDfile( const char* destFileName, const bool overWriteFlag = false );
+
+ // This function can be used to remove a duplicate C64 load address in
+ // the C64 data (example: FE 0F 00 10 4C ...). A duplicate load address
+ // of offset 0x02 is indicated by the ``fixLoad'' flag in the SidTuneInfo
+ // structure.
+ //
+ // The ``force'' flag here can be used to remove the first load address
+ // and set new INIT/PLAY addresses regardless of whether a duplicate
+ // load address has been detected and indicated by ``fixLoad''.
+ // For instance, some position independent sidtunes contain a load address
+ // of 0xE000, but are loaded to 0x0FFE and call the player code at 0x1000.
+ //
+ // Do not forget to save the sidtune file.
+ void fixLoadAddress(const bool force = false, uint_least16_t initAddr = 0,
+ uint_least16_t playAddr = 0);
+
+ // Does not affect status of object, and therefore can be used
+ // to load files. Error string is put into info.statusString, though.
+ bool loadFile(const char* fileName, Buffer_sidtt<const uint_least8_t>& bufferRef);
+
+ bool saveToOpenFile( std::ofstream& toFile, const uint_least8_t* buffer, uint_least32_t bufLen );
+
+ protected: // -------------------------------------------------------------
+
+ SidTuneInfo info;
+ bool status;
+
+ uint_least8_t songSpeed[SIDTUNE_MAX_SONGS];
+ uint_least8_t clockSpeed[SIDTUNE_MAX_SONGS];
+ uint_least16_t songLength[SIDTUNE_MAX_SONGS];
+
+ // holds text info from the format headers etc.
+ char infoString[SIDTUNE_MAX_CREDIT_STRINGS][SIDTUNE_MAX_CREDIT_STRLEN];
+
+ // See instructions at top.
+ bool isSlashedFileName;
+
+ public:
+ // For files with header: offset to real data
+ uint_least32_t fileOffset;
+ protected:
+
+ // Needed for MUS/STR player installation.
+ uint_least16_t musDataLen;
+
+ public:
+ Buffer_sidtt<const uint_least8_t> cache;
+
+ protected:
+
+ // Filename extensions to append for various file types.
+ static const char** fileNameExtensions;
+
+ // --- protected member functions ---
+
+ // Convert 32-bit PSID-style speed word to internal tables.
+ void convertOldStyleSpeedToTables(uint_least32_t speed,
+ int clock = SIDTUNE_CLOCK_PAL);
+
+ // Check SidTuneInfo fields for all real c64 only formats
+ bool checkRealC64Info(uint_least32_t speed);
+ // Check the init address is legal for real C64 only tunes
+ bool checkRealC64Init(void);
+ // Check for valid relocation information
+ bool checkRelocInfo(void);
+ // Common address resolution procedure
+ bool resolveAddrs(const uint_least8_t* c64data);
+
+ // Support for various file formats.
+
+ virtual bool PSID_fileSupport(const void* buffer, const uint_least32_t bufLen);
+ virtual bool PSID_fileSupportSave(std::ofstream& toFile, const uint_least8_t* dataBuffer);
+
+ virtual bool SID_fileSupport(const void* dataBuffer, uint_least32_t dataBufLen,
+ const void* sidBuffer, uint_least32_t sidBufLen);
+ virtual bool SID_fileSupportSave(std::ofstream& toFile);
+
+ virtual bool MUS_fileSupport(Buffer_sidtt<const uint_least8_t>& musBufRef,
+ Buffer_sidtt<const uint_least8_t>& strBufRef);
+ virtual bool MUS_detect(const void* buffer, const uint_least32_t bufLen,
+ uint_least32_t& voice3Index);
+ virtual bool MUS_mergeParts(Buffer_sidtt<const uint_least8_t>& musBufRef,
+ Buffer_sidtt<const uint_least8_t>& strBufRef);
+ virtual void MUS_setPlayerAddress();
+ virtual void MUS_installPlayer(uint_least8_t *c64buf);
+ virtual int MUS_decodePetLine(SmartPtr_sidtt<const uint_least8_t>&, char*);
+
+ virtual bool INFO_fileSupport(const void* dataBuffer, uint_least32_t dataBufLen,
+ const void* infoBuffer, uint_least32_t infoBufLen);
+
+ // Error and status message strings.
+ static const char* txt_songNumberExceed;
+ static const char* txt_empty;
+ static const char* txt_unrecognizedFormat;
+ static const char* txt_noDataFile;
+ static const char* txt_notEnoughMemory;
+ static const char* txt_cantLoadFile;
+ static const char* txt_cantOpenFile;
+ static const char* txt_fileTooLong;
+ static const char* txt_dataTooLong;
+ static const char* txt_cantCreateFile;
+ static const char* txt_fileIoError;
+ static const char* txt_VBI;
+ static const char* txt_CIA;
+ static const char* txt_noErrors;
+ static const char* txt_na;
+ static const char* txt_badAddr;
+ static const char* txt_badReloc;
+
+ private: // ---------------------------------------------------------------
+
+ void init();
+ void cleanup();
+#if !defined(SIDTUNE_NO_STDIN_LOADER)
+ void getFromStdIn();
+#endif
+ void getFromFiles(const char* name);
+
+ void deleteFileNameCopies();
+
+ // Try to retrieve single-file sidtune from specified buffer.
+ void getFromBuffer(const uint_least8_t* const buffer, const uint_least32_t bufferLen);
+
+ // Cache the data of a single-file or two-file sidtune and its
+ // corresponding file names.
+ bool acceptSidTune(const char* dataFileName, const char* infoFileName,
+ Buffer_sidtt<const uint_least8_t>& buf);
+
+ bool createNewFileName(Buffer_sidtt<char>& destString,
+ const char* sourceName, const char* sourceExt);
+
+ private: // prevent copying
+ SidTune(const SidTune&);
+ SidTune& operator=(SidTune&);
+};
+
+#endif /* SIDTUNE_H */
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/SmartPtr.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/SmartPtr.h
new file mode 100644
index 00000000..0cc7c046
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/SmartPtr.h
@@ -0,0 +1,228 @@
+/* Simple smart pointer class. */
+
+#ifndef SMARTPTR_H
+#define SMARTPTR_H
+
+typedef unsigned long int ulint_smartpt;
+
+template <class T>
+class SmartPtrBase_sidtt
+{
+ public:
+
+ /* --- constructors --- */
+
+ SmartPtrBase_sidtt(T* buffer, ulint_smartpt bufferLen, bool bufOwner = false) : dummy(0)
+ {
+ doFree = bufOwner;
+ if ( bufferLen >= 1 )
+ {
+ pBufCurrent = ( bufBegin = buffer );
+ bufEnd = bufBegin + bufferLen;
+ bufLen = bufferLen;
+ status = true;
+ }
+ else
+ {
+ pBufCurrent = ( bufBegin = ( bufEnd = 0 ));
+ bufLen = 0;
+ status = false;
+ }
+ }
+
+ /* --- destructor --- */
+
+ virtual ~SmartPtrBase_sidtt()
+ {
+ if ( doFree && (bufBegin != 0) )
+ {
+#ifndef SID_HAVE_BAD_COMPILER
+ delete[] bufBegin;
+#else
+ delete[] (void*)bufBegin;
+#endif
+ }
+ }
+
+ /* --- public member functions --- */
+
+ virtual T* tellBegin() { return bufBegin; }
+ virtual ulint_smartpt tellLength() { return bufLen; }
+ virtual ulint_smartpt tellPos() { return (ulint_smartpt)(pBufCurrent-bufBegin); }
+
+ virtual bool checkIndex(ulint_smartpt index)
+ {
+ return ((pBufCurrent+index)<bufEnd);
+ }
+
+ virtual bool reset()
+ {
+ if ( bufLen >= 1 )
+ {
+ pBufCurrent = bufBegin;
+ return (status = true);
+ }
+ else
+ {
+ return (status = false);
+ }
+ }
+
+ virtual bool good()
+ {
+ return (pBufCurrent<bufEnd);
+ }
+
+ virtual bool fail()
+ {
+ return (pBufCurrent==bufEnd);
+ }
+
+ virtual void operator ++()
+ {
+ if ( good() )
+ {
+ pBufCurrent++;
+ }
+ else
+ {
+ status = false;
+ }
+ }
+
+ virtual void operator ++(int)
+ {
+ if ( good() )
+ {
+ pBufCurrent++;
+ }
+ else
+ {
+ status = false;
+ }
+ }
+
+ virtual void operator --()
+ {
+ if ( !fail() )
+ {
+ pBufCurrent--;
+ }
+ else
+ {
+ status = false;
+ }
+ }
+
+ virtual void operator --(int)
+ {
+ if ( !fail() )
+ {
+ pBufCurrent--;
+ }
+ else
+ {
+ status = false;
+ }
+ }
+
+ virtual void operator +=(ulint_smartpt offset)
+ {
+ if (checkIndex(offset))
+ {
+ pBufCurrent += offset;
+ }
+ else
+ {
+ status = false;
+ }
+ }
+
+ virtual void operator -=(ulint_smartpt offset)
+ {
+ if ((pBufCurrent-offset) >= bufBegin)
+ {
+ pBufCurrent -= offset;
+ }
+ else
+ {
+ status = false;
+ }
+ }
+
+ virtual T operator*()
+ {
+ if ( good() )
+ {
+ return *pBufCurrent;
+ }
+ else
+ {
+ status = false;
+ return dummy;
+ }
+ }
+
+ virtual T& operator [](ulint_smartpt index)
+ {
+ if (checkIndex(index))
+ {
+ return pBufCurrent[index];
+ }
+ else
+ {
+ status = false;
+ return dummy;
+ }
+ }
+
+ virtual operator bool() { return status; }
+ protected:
+
+ T* bufBegin;
+ T* bufEnd;
+ T* pBufCurrent;
+ ulint_smartpt bufLen;
+ bool status;
+ bool doFree;
+ T dummy;
+
+};
+
+
+template <class T>
+class SmartPtr_sidtt : public SmartPtrBase_sidtt<T>
+{
+ public:
+
+ /* --- constructors --- */
+
+ SmartPtr_sidtt(T* buffer, ulint_smartpt bufferLen, bool bufOwner = false)
+ : SmartPtrBase_sidtt<T>(buffer, bufferLen, bufOwner)
+ {
+ }
+
+ SmartPtr_sidtt()
+ : SmartPtrBase_sidtt<T>(0,0)
+ {
+ }
+
+ void setBuffer(T* buffer, ulint_smartpt bufferLen)
+ {
+ if ( bufferLen >= 1 )
+ {
+ this->pBufCurrent = ( this->bufBegin = buffer );
+ this->bufEnd = this->bufBegin + bufferLen;
+ this->bufLen = bufferLen;
+ this->status = true;
+ }
+ else
+ {
+ this->pBufCurrent = this->bufBegin = this->bufEnd = 0;
+ this->bufLen = 0;
+ this->status = false;
+ }
+ }
+};
+
+#endif /* SMARTPTR_H */
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/c64env.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/c64env.h
new file mode 100644
index 00000000..044dd0d0
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/c64env.h
@@ -0,0 +1,46 @@
+/***************************************************************************
+ c64env.h - The C64 environment interface.
+ -------------------
+ begin : Fri Apr 4 2001
+ copyright : (C) 2001 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef _c64env_h_
+#define _c64env_h_
+
+#include "sidtypes.h"
+#include "event.h"
+
+/* An implementation of of this class can be created to perform the C64
+ specifics. A pointer to this child class can then be passed to
+ each of the conponents so they can interact with it.
+*/
+
+class c64env
+{
+private:
+ EventContext &m_context;
+
+public:
+ c64env (EventContext *context)
+ :m_context (*context) {}
+ EventContext &context (void) const { return m_context; }
+ virtual void interruptIRQ (bool state) = 0;
+ virtual void interruptNMI (void) = 0;
+ virtual void interruptRST (void) = 0;
+ virtual void signalBA (bool state) = 0;
+ virtual void signalAEC (bool state) = 0;
+ virtual uint8_t readMemRamByte (uint_least16_t addr) = 0;
+};
+
+#endif // _c64env_h_
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/component.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/component.h
new file mode 100644
index 00000000..ee8a76c1
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/component.h
@@ -0,0 +1,33 @@
+/***************************************************************************
+ component.h - Standard IC interface functions.
+ -------------------
+ begin : Fri Apr 4 2001
+ copyright : (C) 2001 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef _component_h_
+#define _component_h_
+
+#include "sidtypes.h"
+
+class component
+{
+public:
+ virtual void reset (void) = 0;
+ virtual uint8_t read (uint_least8_t addr) = 0;
+ virtual void write (uint_least8_t addr, uint8_t data) = 0;
+ virtual const char *credits (void) = 0;
+ virtual const char *error (void) = 0;
+};
+
+#endif // _component_h_
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/event.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/event.h
new file mode 100644
index 00000000..b89af24e
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/event.h
@@ -0,0 +1,138 @@
+/***************************************************************************
+ event.h - Event scheduler (based on alarm
+ from Vice)
+ -------------------
+ begin : Wed May 9 2001
+ copyright : (C) 2001 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef _event_h_
+#define _event_h_
+
+#include <stdio.h>
+#include "sidtypes.h"
+
+typedef uint_fast32_t event_clock_t;
+#define EVENT_CONTEXT_MAX_PENDING_EVENTS 0x100
+
+class SID_EXTERN Event
+{
+private:
+ friend class EventScheduler;
+ const char * const m_name;
+ event_clock_t m_clk;
+
+ /* This variable is set by the event context
+ when it is scheduled */
+ bool m_pending;
+
+ /* Link to the next and previous events in the
+ list. */
+ Event *m_next, *m_prev;
+
+public:
+ Event(const char * const name)
+ : m_name(name),
+ m_pending(false) {}
+
+ virtual void event (void) = 0;
+};
+
+// Public Event Context
+class EventContext
+{
+public:
+ virtual void cancel (Event *event) = 0;
+ virtual void schedule (Event *event, event_clock_t cycles) = 0;
+ virtual event_clock_t getTime (void) const = 0;
+ virtual event_clock_t getTime (event_clock_t clock) const = 0;
+};
+
+// Private Event Context Object (The scheduler)
+class EventScheduler: public EventContext
+{
+private:
+ const char * const m_name;
+ event_clock_t m_eventClk, m_schedClk;
+ uint m_pendingEventClk;
+ uint m_pendingEventCount;
+
+ class SID_EXTERN EventDummy: public Event
+ {
+ private:
+ void event (void) {;}
+ public:
+ EventDummy () : Event("Bad Event: Dummy") {;}
+ } m_pendingEvents;
+
+ class SID_EXTERN EventTimeWarp: public Event
+ {
+ private:
+ EventScheduler &m_scheduler;
+
+ void event (void)
+ {
+ m_scheduler.timeWarp ();
+ }
+
+ public:
+ EventTimeWarp (EventScheduler *context)
+ :Event("Time Warp"),
+ m_scheduler(*context)
+ {;}
+ } m_timeWarp;
+ friend class EventTimeWarp;
+
+private:
+ void timeWarp (void);
+ void dispatch (void)
+ {
+ Event &e = *m_pendingEvents.m_next;
+ cancelPending (e);
+ //printf ("Event \"%s\"\n", e.m_name);
+ e.event ();
+ }
+
+ void cancelPending (Event &event)
+ {
+ event.m_pending = false;
+ event.m_prev->m_next = event.m_next;
+ event.m_next->m_prev = event.m_prev;
+ m_pendingEventClk = m_pendingEvents.m_next->m_clk;
+ m_pendingEventCount--;
+ }
+
+public:
+ EventScheduler (const char * const name);
+ void cancel (Event *event);
+ void reset (void);
+ void schedule (Event *event, event_clock_t cycles);
+
+ void clock (void)
+ {
+ if (m_pendingEventCount)
+ {
+ event_clock_t delta = m_pendingEventClk - m_eventClk;
+ m_schedClk += delta;
+ m_eventClk += delta;
+ dispatch ();
+ }
+ }
+
+ event_clock_t getTime (void) const
+ { return m_schedClk; }
+ event_clock_t getTime (event_clock_t clock) const
+ { return m_schedClk - clock; }
+};
+
+#endif // _event_h_
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sid2types.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sid2types.h
new file mode 100644
index 00000000..55cbe75c
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sid2types.h
@@ -0,0 +1,87 @@
+/***************************************************************************
+ sid2types.h - sidplay2 specific types
+ -------------------
+ begin : Fri Aug 10 2001
+ copyright : (C) 2001 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef _sid2types_h_
+#define _sid2types_h_
+
+#include "sidtypes.h"
+#include "event.h"
+
+class sidbuilder;
+struct SidTuneInfo;
+
+typedef enum {sid2_playing = 0, sid2_paused, sid2_stopped} sid2_player_t;
+typedef enum {sid2_left = 0, sid2_mono, sid2_stereo, sid2_right} sid2_playback_t;
+typedef enum {sid2_envPS = 0, sid2_envTP, sid2_envBS, sid2_envR,
+ sid2_envTR} sid2_env_t;
+typedef enum {SID2_MODEL_CORRECT, SID2_MOS6581, SID2_MOS8580} sid2_model_t;
+typedef enum {SID2_CLOCK_CORRECT, SID2_CLOCK_PAL, SID2_CLOCK_NTSC} sid2_clock_t;
+
+typedef enum
+{ // Soundcard sample format
+ SID2_LITTLE_SIGNED,
+ SID2_LITTLE_UNSIGNED,
+ SID2_BIG_SIGNED,
+ SID2_BIG_UNSIGNED
+} sid2_sample_t;
+
+/* Environment Modes
+sid2_envPS = Playsid
+sid2_envTP = Sidplay - Transparent Rom
+sid2_envBS = Sidplay - Bankswitching
+sid2_envR = Sidplay2 - Real C64 Environment
+*/
+
+struct sid2_config_t
+{
+ sid2_clock_t clockDefault; // Intended tune speed when unknown
+ bool clockForced;
+ sid2_clock_t clockSpeed; // User requested emulation speed
+ sid2_env_t environment;
+ bool forceDualSids;
+ uint_least32_t frequency;
+ uint_least8_t optimisation;
+ sid2_playback_t playback;
+ int precision;
+ sid2_model_t sidDefault; // Intended sid model when unknown
+ sidbuilder *sidEmulation;
+ sid2_model_t sidModel; // User requested sid model
+ bool sidSamples;
+ uint_least32_t leftVolume;
+ uint_least32_t rightVolume;
+ sid2_sample_t sampleFormat;
+};
+
+struct sid2_info_t
+{
+ const char **credits;
+ uint channels;
+ uint_least16_t driverAddr;
+ uint_least16_t driverLength;
+ const char *name;
+ const SidTuneInfo *tuneInfo; // May not need this
+ const char *version;
+ // load, config and stop calls will reset this
+ // and remove all pending events! 10th sec resolution.
+ EventContext *eventContext;
+ uint maxsids;
+ sid2_env_t environment;
+ // Random delay used before starting the sid
+ uint_least16_t rnddelay;
+};
+
+#endif // _sid2types_h_
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidbuilder.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidbuilder.h
new file mode 100644
index 00000000..8dde0548
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidbuilder.h
@@ -0,0 +1,77 @@
+/***************************************************************************
+ sidbuilder.h - Sid Builder Classes
+ -------------------
+ begin : Sat May 6 2001
+ copyright : (C) 2000 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef _sidbuilder_h_
+#define _sidbuilder_h_
+
+#include "sid2types.h"
+#include "component.h"
+#include "c64env.h"
+
+
+// Inherit this class to create a new SID emulations for libsidplay2.
+class sidbuilder;
+class sidemu: public component
+{
+private:
+ sidbuilder *m_builder;
+
+public:
+ sidemu (sidbuilder *builder)
+ :m_builder (builder) {;}
+ virtual ~sidemu () {;}
+
+ // Standard component functions
+ void reset () { reset (0); }
+ virtual void reset (uint8_t volume) = 0;
+ virtual uint8_t read (uint_least8_t addr) = 0;
+ virtual void write (uint_least8_t addr, uint8_t data) = 0;
+ virtual const char *credits (void) = 0;
+
+ // Standard SID functions
+ virtual int_least32_t output (uint_least8_t bits) = 0;
+ virtual void voice (uint_least8_t num,
+ uint_least8_t vol,
+ bool mute) = 0;
+ virtual void gain (int_least8_t precent) = 0;
+ sidbuilder *builder (void) const { return m_builder; }
+};
+
+
+class sidbuilder
+{
+private:
+ const char * const m_name;
+
+protected:
+ bool m_status;
+
+public:
+ // Determine current state of object (true = okay, false = error).
+ sidbuilder(const char * const name)
+ : m_name(name), m_status (true) {;}
+ virtual ~sidbuilder() {;}
+
+ virtual sidemu *lock (c64env *env, sid2_model_t model) = 0;
+ virtual void unlock (sidemu *device) = 0;
+ const char *name (void) const { return m_name; }
+ virtual const char *error (void) const = 0;
+ virtual const char *credits (void) = 0;
+ operator bool() const { return m_status; }
+};
+
+#endif // _sidbuilder_h_
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidconfig.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidconfig.h
new file mode 100644
index 00000000..fa8af23e
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidconfig.h
@@ -0,0 +1,33 @@
+/***************************************************************************
+ sidconfig.h - Redirect to real sidconfig.h
+ -------------------
+ begin : Tues Dec 4 2001
+ copyright : (C) 2001 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+/***************************************************************************
+ * $Log: sidconfig.h,v $
+ * Revision 1.5 2001/12/07 00:40:22 s_a_white
+ * Windows fixes.
+ *
+ * Revision 1.4 2001/12/05 23:37:39 s_a_white
+ * Now redirects to real sidfig.hy/i
+ *
+ ***************************************************************************/
+
+#if defined(HAVE_UNIX)
+# include "../../unix/sidconfig.h"
+#elif defined(HAVE_MSWINDOWS)
+# include "../../win/VC/sidconfig.h"
+#else
+# error Platform not supported!
+#endif
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidendian.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidendian.h
new file mode 100644
index 00000000..9fa8582d
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidendian.h
@@ -0,0 +1,415 @@
+/***************************************************************************
+ sidendian.h - Improtant endian functions
+ -------------------
+ begin : Mon Jul 3 2000
+ copyright : (C) 2000 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+/***************************************************************************
+ * $Log: sidendian.h,v $
+ * Revision 1.5 2001/07/03 22:44:13 s_a_white
+ * Added endian_16 to convert a 16 bit value to an array of 8s.
+ *
+ * Revision 1.4 2001/05/07 16:27:24 s_a_white
+ * Fix optimisation issues with gcc 2.96.
+ *
+ * Revision 1.3 2001/03/25 19:46:12 s_a_white
+ * _endian_h_ changed to _sidendian_h_.
+ *
+ * Revision 1.2 2001/03/10 19:49:32 s_a_white
+ * Removed bad include.
+ *
+ * Revision 1.1 2001/03/02 19:04:38 s_a_white
+ * Include structure modified for better compatibility
+ *
+ * Revision 1.5 2001/01/07 16:01:33 s_a_white
+ * sidendian.h is now installed, therefore endian defines updated.
+ *
+ * Revision 1.4 2000/12/13 17:53:01 s_a_white
+ * Fixes some of the endian calls.
+ *
+ * Revision 1.3 2000/12/12 19:39:15 s_a_white
+ * Removed bad const.
+ *
+ * Revision 1.2 2000/12/11 19:10:59 s_a_white
+ * AC99 Update.
+ *
+ ***************************************************************************/
+
+#ifndef _sidendian_h_
+#define _sidendian_h_
+
+// NOTE: The optimisations in this file rely on the structure of memory
+// e.g. 2 shorts being contained in 1 long. Although these sizes are
+// checked to make sure the optimisation is ok, gcc 2.96 (and above)
+// introduced better optimisations. This results in caching of values
+// in internal registers and therefore writes to ram through the aliases
+// not being reflected in the CPU regs. The use of the volatile keyword
+// fixes this.
+
+#include "sidtypes.h"
+
+#if defined(SID_WORDS_BIGENDIAN)
+/* byte-order: HIHI..3210..LO */
+#elif defined(SID_WORDS_LITTLEENDIAN)
+/* byte-order: LO..0123..HIHI */
+#else
+ #error Please check source code configuration!
+#endif
+
+/*
+Labeling:
+0 - LO
+1 - HI
+2 - HILO
+3 - HIHI
+*/
+
+///////////////////////////////////////////////////////////////////
+// INT16 FUNCTIONS
+///////////////////////////////////////////////////////////////////
+// Set the lo byte (8 bit) in a word (16 bit)
+inline void endian_16lo8 (uint_least16_t &word, uint8_t byte)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS)
+# if defined(SID_WORDS_LITTLEENDIAN)
+ ((volatile uint8_t *) &word)[0] = byte;
+# else
+ ((volatile uint8_t *) &word)[1] = byte;
+# endif
+ word = *((volatile uint_least16_t *) &word);
+#else
+ word &= 0xff00;
+ word |= byte;
+#endif
+}
+
+// Get the lo byte (8 bit) in a word (16 bit)
+inline uint8_t endian_16lo8 (uint_least16_t word)
+{
+ return (uint8_t) word;
+}
+
+// Set the hi byte (8 bit) in a word (16 bit)
+inline void endian_16hi8 (uint_least16_t &word, uint8_t byte)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS)
+# if defined(SID_WORDS_LITTLEENDIAN)
+ ((volatile uint8_t *) &word)[1] = byte;
+# else
+ ((volatile uint8_t *) &word)[0] = byte;
+# endif
+ word = *((volatile uint_least16_t *) &word);
+#else
+ word &= 0x00ff;
+ word |= (uint_least16_t) byte << 8;
+#endif
+}
+
+// Set the hi byte (8 bit) in a word (16 bit)
+inline uint8_t endian_16hi8 (uint_least16_t word)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS)
+# if defined(SID_WORDS_LITTLEENDIAN)
+ return ((uint8_t *) &word)[1];
+# else
+ return ((uint8_t *) &word)[0];
+# endif
+#else
+ return (uint8_t) (word >> 8);
+#endif
+}
+
+// Swap word endian.
+inline void endian_16swap8 (uint_least16_t &word)
+{
+ uint8_t lo = endian_16lo8 (word);
+ uint8_t hi = endian_16hi8 (word);
+ endian_16lo8 (word, hi);
+ endian_16hi8 (word, lo);
+}
+
+// Convert high-byte and low-byte to 16-bit word.
+inline uint_least16_t endian_16 (uint8_t hi, uint8_t lo)
+{
+ uint_least16_t word;
+ endian_16lo8 (word, lo);
+ endian_16hi8 (word, hi);
+ return word;
+}
+
+// Convert high-byte and low-byte to 16-bit little endian word.
+inline void endian_16 (uint8_t ptr[2], uint_least16_t word)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS)
+ *((uint_least16_t *) ptr) = word;
+#else
+# if defined(SID_WORDS_BIGENDIAN)
+ ptr[0] = endian_16hi8 (word);
+ ptr[1] = endian_16lo8 (word);
+# else
+ ptr[0] = endian_16lo8 (word);
+ ptr[1] = endian_16hi8 (word);
+# endif
+#endif
+}
+
+inline void endian_16 (char ptr[2], uint_least16_t word)
+{
+ endian_16 ((uint8_t *) ptr, word);
+}
+
+// Convert high-byte and low-byte to 16-bit little endian word.
+inline uint_least16_t endian_little16 (const uint8_t ptr[2])
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS) && \
+ defined(SID_WORDS_LITTLEENDIAN)
+ return *((uint_least16_t *) ptr);
+#else
+ return endian_16 (ptr[1], ptr[0]);
+#endif
+}
+
+// Write a little-endian 16-bit word to two bytes in memory.
+inline void endian_little16 (uint8_t ptr[2], uint_least16_t word)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS) && \
+ defined(SID_WORDS_LITTLEENDIAN)
+ *((uint_least16_t *) ptr) = word;
+#else
+ ptr[0] = endian_16lo8 (word);
+ ptr[1] = endian_16hi8 (word);
+#endif
+}
+
+// Convert high-byte and low-byte to 16-bit big endian word.
+inline uint_least16_t endian_big16 (const uint8_t ptr[2])
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS) && \
+ defined(SID_WORDS_BIGENDIAN)
+ return *((uint_least16_t *) ptr);
+#else
+ return endian_16 (ptr[0], ptr[1]);
+#endif
+}
+
+// Write a little-big 16-bit word to two bytes in memory.
+inline void endian_big16 (uint8_t ptr[2], uint_least16_t word)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS) && \
+ defined(SID_WORDS_BIGENDIAN)
+ *((uint_least16_t *) ptr) = word;
+#else
+ ptr[0] = endian_16hi8 (word);
+ ptr[1] = endian_16lo8 (word);
+#endif
+}
+
+
+///////////////////////////////////////////////////////////////////
+// INT32 FUNCTIONS
+///////////////////////////////////////////////////////////////////
+// Set the lo word (16bit) in a dword (32 bit)
+inline void endian_32lo16 (uint_least32_t &dword, uint_least16_t word)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS)
+# if defined(SID_WORDS_LITTLEENDIAN)
+ ((volatile uint_least16_t *) &dword)[0] = word;
+# else
+ ((volatile uint_least16_t *) &dword)[1] = word;
+# endif
+ dword = *((volatile uint_least32_t *) &dword);
+#else
+ dword &= (uint_least32_t) 0xffff0000;
+ dword |= word;
+#endif
+}
+
+// Get the lo word (16bit) in a dword (32 bit)
+inline uint_least16_t endian_32lo16 (uint_least32_t dword)
+{
+ return (uint_least16_t) dword & 0xffff;
+}
+
+// Set the hi word (16bit) in a dword (32 bit)
+inline void endian_32hi16 (uint_least32_t &dword, uint_least16_t word)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS)
+# if defined(SID_WORDS_LITTLEENDIAN)
+ ((volatile uint_least16_t *) &dword)[1] = word;
+# else
+ ((volatile uint_least16_t *) &dword)[0] = word;
+# endif
+ dword = *((volatile uint_least32_t *) &dword);
+#else
+ dword &= (uint_least32_t) 0x0000ffff;
+ dword |= (uint_least32_t) word << 16;
+#endif
+}
+
+// Get the hi word (16bit) in a dword (32 bit)
+inline uint_least16_t endian_32hi16 (uint_least32_t dword)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS)
+# if defined(SID_WORDS_LITTLEENDIAN)
+ return ((uint_least16_t *) &dword)[1];
+# else
+ return ((uint_least16_t *) &dword)[0];
+# endif
+#else
+ return (uint_least16_t) (dword >> 16);
+#endif
+}
+
+// Set the lo byte (8 bit) in a dword (32 bit)
+inline void endian_32lo8 (uint_least32_t &dword, uint8_t byte)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS)
+# if defined(SID_WORDS_LITTLEENDIAN)
+ ((volatile uint8_t *) &dword)[0] = byte;
+# else
+ ((volatile uint8_t *) &dword)[3] = byte;
+# endif
+ dword = *((volatile uint_least32_t *) &dword);
+#else
+ dword &= (uint_least32_t) 0xffffff00;
+ dword |= (uint_least32_t) byte;
+#endif
+}
+
+// Get the lo byte (8 bit) in a dword (32 bit)
+inline uint8_t endian_32lo8 (uint_least32_t dword)
+{
+ return (uint8_t) dword;
+}
+
+// Set the hi byte (8 bit) in a dword (32 bit)
+inline void endian_32hi8 (uint_least32_t &dword, uint8_t byte)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS)
+# if defined(SID_WORDS_LITTLEENDIAN)
+ ((volatile uint8_t *) &dword)[1] = byte;
+# else
+ ((volatile uint8_t *) &dword)[2] = byte;
+# endif
+ dword = *((volatile uint_least32_t *) &dword);
+#else
+ dword &= (uint_least32_t) 0xffff00ff;
+ dword |= (uint_least32_t) byte << 8;
+#endif
+}
+
+// Get the hi byte (8 bit) in a dword (32 bit)
+inline uint8_t endian_32hi8 (uint_least32_t dword)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS)
+# if defined(SID_WORDS_LITTLEENDIAN)
+ return ((uint8_t *) &dword)[1];
+# else
+ return ((uint8_t *) &dword)[2];
+# endif
+#else
+ return (uint8_t) (dword >> 8);
+#endif
+}
+
+// Swap hi and lo words endian in 32 bit dword.
+inline void endian_32swap16 (uint_least32_t &dword)
+{
+ uint_least16_t lo = endian_32lo16 (dword);
+ uint_least16_t hi = endian_32hi16 (dword);
+ endian_32lo16 (dword, hi);
+ endian_32hi16 (dword, lo);
+}
+
+// Swap word endian.
+inline void endian_32swap8 (uint_least32_t &dword)
+{
+ uint_least16_t lo, hi;
+ lo = endian_32lo16 (dword);
+ hi = endian_32hi16 (dword);
+ endian_16swap8 (lo);
+ endian_16swap8 (hi);
+ endian_32lo16 (dword, hi);
+ endian_32hi16 (dword, lo);
+}
+
+// Convert high-byte and low-byte to 32-bit word.
+inline uint_least32_t endian_32 (uint8_t hihi, uint8_t hilo, uint8_t hi, uint8_t lo)
+{
+ uint_least32_t dword;
+ uint_least16_t word;
+ endian_32lo8 (dword, lo);
+ endian_32hi8 (dword, hi);
+ endian_16lo8 (word, hilo);
+ endian_16hi8 (word, hihi);
+ endian_32hi16 (dword, word);
+ return dword;
+}
+
+// Convert high-byte and low-byte to 32-bit little endian word.
+inline uint_least32_t endian_little32 (const uint8_t ptr[4])
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS) && \
+ defined(SID_WORDS_LITTLEENDIAN)
+ return *((uint_least32_t *) ptr);
+#else
+ return endian_32 (ptr[3], ptr[2], ptr[1], ptr[0]);
+#endif
+}
+
+// Write a little-endian 32-bit word to four bytes in memory.
+inline void endian_little32 (uint8_t ptr[4], uint_least32_t dword)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS) && \
+ defined(SID_WORDS_LITTLEENDIAN)
+ *((uint_least32_t *) ptr) = dword;
+#else
+ uint_least16_t word;
+ ptr[0] = endian_32lo8 (dword);
+ ptr[1] = endian_32hi8 (dword);
+ word = endian_32hi16 (dword);
+ ptr[2] = endian_16lo8 (word);
+ ptr[3] = endian_16hi8 (word);
+#endif
+}
+
+// Convert high-byte and low-byte to 32-bit big endian word.
+inline uint_least32_t endian_big32 (const uint8_t ptr[4])
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS) && \
+ defined(SID_WORDS_BIGENDIAN)
+ return *((uint_least32_t *) ptr);
+#else
+ return endian_32 (ptr[0], ptr[1], ptr[2], ptr[3]);
+#endif
+}
+
+// Write a big-endian 32-bit word to four bytes in memory.
+inline void endian_big32 (uint8_t ptr[4], uint_least32_t dword)
+{
+#if defined(SID_OPTIMISE_MEMORY_ACCESS) && \
+ defined(SID_WORDS_BIGENDIAN)
+ *((uint_least32_t *) ptr) = dword;
+#else
+ uint_least16_t word;
+ word = endian_32hi16 (dword);
+ ptr[1] = endian_16lo8 (word);
+ ptr[0] = endian_16hi8 (word);
+ ptr[2] = endian_32hi8 (dword);
+ ptr[3] = endian_32lo8 (dword);
+#endif
+}
+
+#endif // _sidendian_h_
+
+
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidint.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidint.h
new file mode 100644
index 00000000..c2387d78
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidint.h
@@ -0,0 +1,24 @@
+/***************************************************************************
+ sidint.h - redirect to os dependent sidint
+ -------------------
+ begin : Wed Dec 26 2001
+ copyright : (C) 2001 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#if defined(HAVE_UNIX)
+# include "../../unix/sidint.h"
+#elif defined(HAVE_MSWINDOWS)
+# include "../../win/VC/sidint.h"
+#else
+# error Platform not supported!
+#endif
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidplay2.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidplay2.h
new file mode 100644
index 00000000..ccb54bca
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidplay2.h
@@ -0,0 +1,73 @@
+/***************************************************************************
+ sidplay2.h - Public sidplay header
+ -------------------
+ begin : Fri Jun 9 2000
+ copyright : (C) 2000 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef _sidplay2_h_
+#define _sidplay2_h_
+
+#include "sidtypes.h"
+#include "SidTune.h"
+#include "sidbuilder.h"
+
+#ifndef SIDPLAY2_DEFAULTS
+#define SIDPLAY2_DEFAULTS
+ // Default settings
+ const uint_least32_t SID2_DEFAULT_SAMPLING_FREQ = 44100;
+ const uint_least8_t SID2_DEFAULT_PRECISION = 16;
+ const uint_least8_t SID2_DEFAULT_OPTIMISATION = 0;
+ const bool SID2_DEFAULT_SID_SAMPLES = true; // Samples through sid
+ // Maximum values
+ const uint_least8_t SID2_MAX_PRECISION = 16;
+ const uint_least8_t SID2_MAX_OPTIMISATION = 2;
+#endif // SIDPLAY2_DEFAULTS
+
+// Private Sidplayer
+namespace SIDPLAY2_NAMESPACE
+{
+ class Player;
+}
+
+class SID_EXTERN sidplay2
+{
+private:
+ SIDPLAY2_NAMESPACE::Player &sidplayer;
+
+public:
+ sidplay2 ();
+ virtual ~sidplay2 ();
+
+ const sid2_config_t &config (void) const;
+ const sid2_info_t &info (void) const;
+
+ int config (const sid2_config_t &cfg);
+ const char *error (void) const;
+ int fastForward (uint percent);
+ int load (SidTune *tune);
+ void pause (void);
+ uint_least32_t play (void *buffer, uint_least32_t length);
+ sid2_player_t state (void) const;
+ void stop (void);
+ void debug (bool enable);
+
+ // Timer functions with respect to 10ths of a second
+ uint_least32_t time (void) const;
+ uint_least32_t mileage (void) const;
+
+ operator bool() const { return (&sidplayer ? true: false); }
+ bool operator!() const { return (&sidplayer ? false: true); }
+};
+
+#endif // _sidplay2_h_
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidtypes.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidtypes.h
new file mode 100644
index 00000000..788c21ab
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidtypes.h
@@ -0,0 +1,62 @@
+/***************************************************************************
+ sidtypes.h - type definition file
+ -------------------
+ begin : Mon Jul 3 2000
+ copyright : (C) 2000 by Simon White
+ email : s_a_white@email.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef _sidtypes_h_
+#define _sidtypes_h_
+
+#include "sidint.h"
+#include "sidconfig.h"
+
+#if SID_SIZEOF_CHAR == 1
+# if (SID_SIZEOF_SHORT_INT == 2) || (SID_SIZEOF_INT == 2)
+# if (SID_SIZEOF_INT == 4) || (SID_SIZEOF_LONG_INT == 4)
+//# define SID_OPTIMISE_MEMORY_ACCESS
+# endif
+# endif
+#endif
+
+#if SID_SIZEOF_CHAR != 1
+# error Code cannot work correctly on this platform as no real 8 bit data type supported!
+#endif
+
+#ifndef SID_HAVE_BOOL
+# ifdef SID_HAVE_STDBOOL_H
+# include <stdbool.h>
+# else
+ typedef int bool;
+# define true 1
+# define false 0
+# endif /* SID_HAVE_STDBOOL_H */
+#endif /* HAVE_BOOL */
+
+/* Custom types */
+typedef int sid_fc_t[2];
+typedef struct
+{
+ sid_fc_t cutoff[0x800];
+ uint_least16_t points;
+} sid_filter_t;
+#define sid_filter_t sid_filter_t
+
+typedef unsigned int uint;
+typedef float float32_t;
+typedef double float64_t;
+
+#define SID_FOREVER for(;;)
+#define SID_SWAP(x,y) ((x)^=(y)^=(x)^=(y))
+
+#endif /* _sidtypes_h_ */
diff --git a/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidusage.h b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidusage.h
new file mode 100644
index 00000000..7d35e676
--- /dev/null
+++ b/libsidplay2/sidplay-libs-2.1.0/libsidplay/include/sidplay/sidusage.h
@@ -0,0 +1,72 @@
+/***************************************************************************
+ sidusage.h - sid usage definitions
+ -------------------
+ begin : Tues Nov 19 2002
+ copyright : (C) 2002 by Simon White
+ email : sidplay2@yahoo.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+#ifndef _sidusage_h_
+#define _sidusage_h_
+
+#include "sidtypes.h"
+
+enum
+{
+ SID_READ = 1 << 0,
+ SID_WRITE = 1 << 1,
+ SID_EXECUTE = 1 << 2,
+ SID_STACK = 1 << 3,
+ SID_SAMPLE = 1 << 4,
+ SID_BAD_READ = 1 << 5,
+ SID_BAD_EXECUTE = 1 << 6,
+
+ // Next byte provides extended information
+ SID_EXTENSION = 1 << 7,
+
+ // Once SID_EXTENSION has been tested for, you
+ // are recommened to throw that bit away and
+ // assign it the following meaning where
+ // appropriate. This bit is not saved to file.
+ SID_LOAD_IMAGE = 1 << 7
+};
+
+enum
+{
+ SID_IRQ = 1 << 0, // Play == 0
+ SID_IRQ_RTI = 1 << 1, // Switch out kernal with no I flag
+ SID_IRQ_IFLAG = 1 << 2, // Bad I flag
+ SID_IRQ_DISABLE = 1 << 3, // Permently disables IRQ source
+ SID_IRQ_NOACK = 1 << 4, // Dosen't acknowledge IRQ source
+ SID_NMI = 1 << 5, // Enables NMI IRQs
+ SID_EXECUTE_IO = 1 << 6, // Execution in IO (under)
+ SID_EXECUTE_ROM = 1 << 7, // Execution in ROM (under)
+ SID_IRQ_OTHER = 1 << 8, // Enabled alternative IRQ
+ SID_BAD_STACK = 1 << 9, // Tune corrupts stack contents
+ SID_INSTR_EX = 1 << 10, // Extended 6510 instructions
+ SID_INSTR_ILL = 1 << 11, // Illegal 6510 instructions
+ //SID_PSID_RANDOM = 1 << 12, // PSID Random extension
+ SID_INSTR_BRK = 1 << 13 // 6510 BRK, indications of a bad tune...
+};
+
+// All unused have a reserved meaning and must contain
+// a zero value
+typedef struct sid_usage_t
+{
+ uint_least32_t flags;
+ // The next value may change to 16 bits
+ uint_least8_t memory[0x10000];
+ char md5[33]; // MD5 key
+ uint_least16_t length; // usage scan length
+} sid_usage_t;
+
+#endif // _sidusage_h_