[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[820] vendor/fuse-emulator/current
Brought to you by:
fredm
|
From: <fr...@us...> - 2016-08-22 12:00:13
|
Revision: 820
http://sourceforge.net/p/fuse-for-macosx/code/820
Author: fredm
Date: 2016-08-22 12:00:10 +0000 (Mon, 22 Aug 2016)
Log Message:
-----------
Load . into vendor/fuse-emulator/current.
Modified Paths:
--------------
vendor/fuse-emulator/current/fuse/ChangeLog
vendor/fuse-emulator/current/fuse/Makefile.am
vendor/fuse-emulator/current/fuse/README
vendor/fuse-emulator/current/fuse/configure.ac
vendor/fuse-emulator/current/fuse/debugger/breakpoint.c
vendor/fuse-emulator/current/fuse/debugger/breakpoint.h
vendor/fuse-emulator/current/fuse/hacking/ChangeLog
vendor/fuse-emulator/current/fuse/lib/compressed/disk_plus3.szx
vendor/fuse-emulator/current/fuse/lib/uncompressed/disk_plus3.szx
vendor/fuse-emulator/current/fuse/machines/specplus3.c
vendor/fuse-emulator/current/fuse/man/fuse.1
vendor/fuse-emulator/current/fuse/peripherals/Makefile.am
vendor/fuse-emulator/current/fuse/peripherals/disk/disk.c
vendor/fuse-emulator/current/fuse/peripherals/disk/disk.h
vendor/fuse-emulator/current/fuse/peripherals/disk/upd_fdc.c
vendor/fuse-emulator/current/fuse/sound/coreaudiosound.c
vendor/fuse-emulator/current/fuse/tape.c
vendor/fuse-emulator/current/fuse/ui/gtk/fileselector.c
vendor/fuse-emulator/current/fuse/ui/options.dat
vendor/fuse-emulator/current/fuse/ui/widget/browse.c
vendor/fuse-emulator/current/fuse/ui/win32/fileselector.c
vendor/fuse-emulator/current/fuse/utils.c
vendor/fuse-emulator/current/fuse/z80/z80_debugger_variables.c
vendor/fuse-emulator/current/fuse/z80/z80_internals.h
vendor/fuse-emulator/current/libspectrum/ChangeLog
vendor/fuse-emulator/current/libspectrum/Makefile.am
vendor/fuse-emulator/current/libspectrum/README
vendor/fuse-emulator/current/libspectrum/configure.ac
vendor/fuse-emulator/current/libspectrum/doc/libspectrum.3
vendor/fuse-emulator/current/libspectrum/doc/libspectrum.txt
vendor/fuse-emulator/current/libspectrum/hacking/ChangeLog
vendor/fuse-emulator/current/libspectrum/internals.h
vendor/fuse-emulator/current/libspectrum/libspectrum.c
vendor/fuse-emulator/current/libspectrum/libspectrum.h.in
vendor/fuse-emulator/current/libspectrum/myglib/ghash.c
vendor/fuse-emulator/current/libspectrum/pzx_read.c
vendor/fuse-emulator/current/libspectrum/tape.c
vendor/fuse-emulator/current/libspectrum/tape_block.c
vendor/fuse-emulator/current/libspectrum/tape_block.h
vendor/fuse-emulator/current/libspectrum/test/Makefile.am
vendor/fuse-emulator/current/libspectrum/test/test.c
vendor/fuse-emulator/current/libspectrum/test/test.h
vendor/fuse-emulator/current/libspectrum/test/test_edges.c
vendor/fuse-emulator/current/libspectrum/tzx_write.c
vendor/fuse-emulator/current/libspectrum/utilities.c
vendor/fuse-emulator/current/libspectrum/zlib.c
Added Paths:
-----------
vendor/fuse-emulator/current/fuse/peripherals/disk/trdos.c
vendor/fuse-emulator/current/fuse/peripherals/disk/trdos.h
vendor/fuse-emulator/current/libspectrum/test/no-pilot-gdb.tzx
vendor/fuse-emulator/current/libspectrum/test/zero-tail.pzx
vendor/fuse-emulator/current/libspectrum/zip.c
vendor/fuse-emulator/current/libspectrum/zip.h
Removed Paths:
-------------
vendor/fuse-emulator/current/fuse/m4/glib-2.0.m4
vendor/fuse-emulator/current/fuse/m4/libxml.m4
Modified: vendor/fuse-emulator/current/fuse/ChangeLog
===================================================================
--- vendor/fuse-emulator/current/fuse/ChangeLog 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/ChangeLog 2016-08-22 12:00:10 UTC (rev 820)
@@ -1,3 +1,29 @@
+2016-08-21 Philip Kendall <phi...@sh...>
+
+ * Fuse 1.2.2 released.
+
+ * New features:
+ * Support loading first tape, snapshot, dock cartridge or RZX file
+ found inside .zip files (Patrik Rak and Sergio Baldoví).
+ * Support auto-booting TR-DOS disk images without a boot file (thanks,
+ windale, BogDan Vatra and Fredrick Meunier) (Sergio Baldoví).
+
+ * Emulation core improvements:
+ * Change microphone state when 0 tstate pulses do not have the no edge
+ flag set (Fredrick Meunier).
+
+ * Machine specific improvements:
+ * Fix +3 disk autoload (thanks, windale and BogDan Vatra) (Sergio
+ Baldoví and Fredrick Meunier).
+ * Fix floppy drive selection when resetting a +3 (thanks, windale and
+ BogDan Vatra) (Sergio Baldoví).
+
+ * Miscellaneous improvements:
+ * WidgetUI: Use description for tape blocks where available (Fredrick
+ Meunier).
+ * Use pkg-config to detect libpng and libxml2 (Alberto Garcia).
+ * Various minor bugfixes.
+
2016-07-17 Philip Kendall <phi...@sh...>
* Fuse 1.2.1 released.
@@ -1325,4 +1351,4 @@
* Version 0.1.0 released.
-$Id: ChangeLog 5686 2016-07-17 10:37:50Z fredm $
+$Id: ChangeLog 5761 2016-08-21 05:10:02Z fredm $
Modified: vendor/fuse-emulator/current/fuse/Makefile.am
===================================================================
--- vendor/fuse-emulator/current/fuse/Makefile.am 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/Makefile.am 2016-08-22 12:00:10 UTC (rev 820)
@@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in
## Copyright (c) 1999-2015 Philip Kendall
-## $Id: Makefile.am 5677 2016-07-09 13:58:02Z fredm $
+## $Id: Makefile.am 5735 2016-08-14 13:02:21Z fredm $
## 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
@@ -133,9 +133,7 @@
keysyms.pl \
m4/ax_create_stdint_h.m4 \
m4/ax_pthread.m4 \
- m4/glib-2.0.m4 \
m4/gtk-2.0.m4 \
- m4/libxml.m4 \
m4/pkg.m4 \
m4/sdl.m4 \
menu_data.dat \
Modified: vendor/fuse-emulator/current/fuse/README
===================================================================
--- vendor/fuse-emulator/current/fuse/README 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/README 2016-08-22 12:00:10 UTC (rev 820)
@@ -1,4 +1,4 @@
-The Free Unix Spectrum Emulator (Fuse) 1.2.1
+The Free Unix Spectrum Emulator (Fuse) 1.2.2
============================================
Fuse (the Free Unix Spectrum Emulator) was originally, and somewhat
@@ -108,6 +108,6 @@
<http://www.worldofspectrum.org/forums/>.
Philip Kendall <phi...@sh...>
-17th July, 2016
+21st August, 2016
-$Id: README 5686 2016-07-17 10:37:50Z fredm $
+$Id: README 5761 2016-08-21 05:10:02Z fredm $
Modified: vendor/fuse-emulator/current/fuse/configure.ac
===================================================================
--- vendor/fuse-emulator/current/fuse/configure.ac 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/configure.ac 2016-08-22 12:00:10 UTC (rev 820)
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-dnl $Id: configure.ac 5686 2016-07-17 10:37:50Z fredm $
+dnl $Id: configure.ac 5761 2016-08-21 05:10:02Z fredm $
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@@ -20,12 +20,12 @@
dnl E-mail: phi...@sh...
dnl Package version
-m4_define([fuse_version], [1.2.1])
+m4_define([fuse_version], [1.2.2])
dnl Product full version
m4_define([fuse_major_version], [1])
m4_define([fuse_minor_version], [2])
-m4_define([fuse_micro_version], [1])
+m4_define([fuse_micro_version], [2])
m4_define([fuse_nano_version], [0])
m4_define([fuse_full_version], [fuse_major_version.fuse_minor_version.fuse_micro_version.fuse_nano_version])
m4_define([fuse_rc_version], [fuse_major_version,fuse_minor_version,fuse_micro_version,fuse_nano_version])
@@ -507,40 +507,17 @@
libpng=yes)
AC_MSG_RESULT($libpng)
if test "$libpng" = yes; then
- AC_PATH_PROG([LIBPNG_CONFIG], [libpng-config])
- if test -n "$LIBPNG_CONFIG"; then
- PNG_CFLAGS=`libpng-config --cflags`
- PNG_LIBS=`libpng-config --ldflags`
- AC_DEFINE([USE_LIBPNG], 1, [Defined if we're going to be using the installed libpng])
- else
- ac_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $PNG_CFLAGS"
- ac_save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$PNG_LIBS $LDFLAGS"
+ PKG_CHECK_MODULES(
+ [PNG],
+ [libpng],
+ [AC_DEFINE([USE_LIBPNG], 1, [Defined if we're going to be using the installed libpng])],
+ [AC_MSG_WARN([libpng not found - saving screenshots disabled])]
+ )
+fi
- AC_CHECK_LIB( png, png_write_png,
- [AC_CHECK_HEADER(
- png.h,
- [AC_DEFINE([USE_LIBPNG], 1, [Defined if we're going to be using the installed libpng]) PNG_LIBS='-lpng -lm -lz'],
- [AC_CHECK_HEADERS(libpng/png.h,
- [CPPFLAGS="$ac_save_CPPFLAGS $PNG_CFLAGS/libpng"
- AC_DEFINE([USE_LIBPNG], 1, [Defined if we're going to be using the installed libpng]) PNG_LIBS='-lpng -lm -lz'],
- [AC_MSG_WARN(png.h not found - saving screenshots disabled)
- PNG_LIBS='']
- )],
- )],
- [AC_MSG_WARN(png_write_png not found - saving screenshots disabled)
- PNG_LIBS='']
- )
+AC_SUBST(PNG_CFLAGS)
+AC_SUBST(PNG_LIBS)
- CPPFLAGS="$ac_save_CPPFLAGS"
- LDFLAGS="$ac_save_LDFLAGS"
- fi
-
- AC_SUBST(PNG_CFLAGS)
- AC_SUBST(PNG_LIBS)
-fi
-
dnl Check if a version of libasound which supplies pcm is available
AC_MSG_CHECKING(whether ALSA requested)
AC_ARG_WITH(alsa,
@@ -595,7 +572,7 @@
dnl Check if CoreAudio is available
AC_CHECK_HEADER(
- CoreAudio/AudioHardware.h,
+ AudioToolbox/AudioToolbox.h,
[coreaudio_available=yes],,
)
@@ -632,7 +609,7 @@
SOUND_LIBADD='sound/sunsound.$(OBJEXT)' SOUND_LIBS=''
AC_MSG_RESULT(OpenBSD)
elif test "$coreaudio_available" = yes; then
- SOUND_LIBADD='sound/coreaudiosound.$(OBJEXT)' SOUND_LIBS='-framework CoreAudio -framework AudioUnit -framework CoreServices' sound_fifo=yes
+ SOUND_LIBADD='sound/coreaudiosound.$(OBJEXT)' SOUND_LIBS='-framework CoreAudio -framework AudioUnit' sound_fifo=yes
AC_MSG_RESULT(CoreAudio)
elif test "$wii" = yes; then
SOUND_LIBADD='sound/wiisound.$(OBJEXT)' SOUND_LIBS='' sound_fifo=yes
@@ -737,11 +714,17 @@
libxml2=yes)
AC_MSG_RESULT($libxml2)
if test "$libxml2" = yes; then
- AM_PATH_XML2(2.0.0,AC_DEFINE([HAVE_LIB_XML2], 1,
- [Defined if we've got libxml2]),
- AC_MSG_WARN(libxml2 not found - config file will use ini format))
+ PKG_CHECK_MODULES(
+ [XML],
+ [libxml-2.0],
+ [AC_DEFINE([HAVE_LIB_XML2], 1, [Defined if we've got libxml2])],
+ [AC_MSG_WARN([libxml2 not found - config file will use ini format])]
+ )
fi
+AC_SUBST(XML_CFLAGS)
+AC_SUBST(XML_LIBS)
+
dnl Work out which timer routines to use
AC_MSG_CHECKING(which timer routines to use)
if test "$UI" = sdl; then
Modified: vendor/fuse-emulator/current/fuse/debugger/breakpoint.c
===================================================================
--- vendor/fuse-emulator/current/fuse/debugger/breakpoint.c 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/debugger/breakpoint.c 2016-08-22 12:00:10 UTC (rev 820)
@@ -136,8 +136,8 @@
int
debugger_breakpoint_add_time( debugger_breakpoint_type type,
- libspectrum_dword tstates, size_t ignore,
- debugger_breakpoint_life life,
+ libspectrum_dword breakpoint_tstates,
+ size_t ignore, debugger_breakpoint_life life,
debugger_expression *condition )
{
debugger_breakpoint_value value;
@@ -153,8 +153,8 @@
}
value.time.triggered = 0;
- value.time.tstates = tstates;
- value.time.initial_tstates = tstates;
+ value.time.tstates = breakpoint_tstates;
+ value.time.initial_tstates = breakpoint_tstates;
return breakpoint_add( type, value, ignore, life, condition );
}
Modified: vendor/fuse-emulator/current/fuse/debugger/breakpoint.h
===================================================================
--- vendor/fuse-emulator/current/fuse/debugger/breakpoint.h 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/debugger/breakpoint.h 2016-08-22 12:00:10 UTC (rev 820)
@@ -136,7 +136,7 @@
int
debugger_breakpoint_add_time(
- debugger_breakpoint_type type, libspectrum_dword tstates,
+ debugger_breakpoint_type type, libspectrum_dword breakpoint_tstates,
size_t ignore, debugger_breakpoint_life life, debugger_expression *condition
);
Modified: vendor/fuse-emulator/current/fuse/hacking/ChangeLog
===================================================================
--- vendor/fuse-emulator/current/fuse/hacking/ChangeLog 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/hacking/ChangeLog 2016-08-22 12:00:10 UTC (rev 820)
@@ -5178,7 +5178,7 @@
20160526 debugger/commandl.l,man/fuse.1: allow strings with escaped spaces in
the debugger (bug #337) (Sergio).
20160528 ChangeLog: add even more recent changes (Fred).
-20160528 deugger/system_variable.c: include file (thanks, Fred) (Phil).
+20160528 debugger/system_variable.c: include file (thanks, Fred) (Phil).
20160529 Makefile.am,lib/Makefile.am,z80/Makefile.am: distribute
m4/ax_create_stdint_h.m4,lib/tests/success.d80.bz2 and z80/tests/README
(Sergio).
@@ -5368,3 +5368,42 @@
(Fred).
20160717 ChangeLog,README,configure.ac,man/fuse.1: update release dates and mark
this release as 1.2.1 (Fred).
+20160719 z80/{z80_debugger_variables.c,z80_internals.h}: include header for
+ z80_debugger_variables_init() definition (Fred).
+20160719 debugger/breakpoint.[ch]: rename local argument shadowing global
+ variable (Fred).
+20160719 ui/widget/browse.c: use description for tape blocks where available
+ (Fred).
+20160726 configure.ac,sound/coreaudiosound.c: remove lingering references to
+ deprecated Carbon APIs (Fred).
+20160731 Makefile.am,m4/glib-2.0.m4: remove the unused (since r5349) glib-2.0.m4
+ file (from patch #375) (Alberto Garcia).
+20160801 ui/{gtk,win32}/fileselector.c: add ".zip" to the file filters in
+ open file dialogs (thanks, Phil) (Sergio).
+20160807 utils.c: remove redundant whitespace (Fred).
+20160807 machines/specplus3.c: fix +3 disk autoload (part of bug #356)
+ (thanks, windale and BogDan Vatra) (Fred).
+20160807 peripherals/disk/upd_fdc.c: fix floppy drive selection when resetting a
+ +3 (part of bug #356) (thanks, windale and BogDan Vatra) (Sergio).
+20160807 lib/{compressed,uncompressed}/disk_plus3.szx: update disk_plus3.szx to
+ set PC = 0x08E8 as the proper entry point for "Loader" menu option
+ (part of bug #356) (thanks, windale and BogDan Vatra) (Sergio).
+20160812 tape.c: change microphone state when 0 tstate pulses do not have the no
+ edge flag set (Fred).
+20160812 Makefile.am,configure.ac,m4/libxml.m4: use pkg-config to detect libpng
+ and libxml2 (more from patch #375) (Alberto Garcia).
+20160816 ChangeLog,README,configure.ac,man/fuse.1: bump versions to 1.2.2(-pre1)
+ (Fred).
+20160816 man/fuse.1,peripherals/{Makefile.am,disk/{disk.[ch],trdos.[ch]}}:
+ insert a boot loader in TRD/SCL disk images when autoload is enabled
+ (part of feature request #90) (thanks, windale, BogDan and Fred)
+ (Sergio).
+20160817 ChangeLog: tweak zip support description (disks are not supported)
+ (Sergio).
+20160817 man/fuse.1: document zip compression support (Sergio).
+20160817 ui/gtk/fileselector.c: add ".png" to the file filters in save file
+ dialogs and check the support for ".svg" files (Sergio).
+20160820 ui/options.dat: fix mnemonics in drives setup to avoid collisions
+ (Sergio).
+20160821 ChangeLog,README,configure.ac,man/fuse.1: update release dates and mark
+ this release as 1.2.2 (Fred).
Modified: vendor/fuse-emulator/current/fuse/lib/compressed/disk_plus3.szx
===================================================================
(Binary files differ)
Modified: vendor/fuse-emulator/current/fuse/lib/uncompressed/disk_plus3.szx
===================================================================
(Binary files differ)
Deleted: vendor/fuse-emulator/current/fuse/m4/glib-2.0.m4
===================================================================
--- vendor/fuse-emulator/current/fuse/m4/glib-2.0.m4 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/m4/glib-2.0.m4 2016-08-22 12:00:10 UTC (rev 820)
@@ -1,214 +0,0 @@
-# Configure paths for GLIB
-# Owen Taylor 1997-2001
-
-# Taken from Glib 2.4.2 by PAK 2004/07/06
-
-dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
-dnl gthread is specified in MODULES, pass to pkg-config
-dnl
-AC_DEFUN([AM_PATH_GLIB_2_0],
-[dnl
-dnl Get the cflags and libraries from pkg-config
-dnl
-AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
- , enable_glibtest=yes)
-
- pkg_config_args=glib-2.0
- for module in . $4
- do
- case "$module" in
- gmodule)
- pkg_config_args="$pkg_config_args gmodule-2.0"
- ;;
- gobject)
- pkg_config_args="$pkg_config_args gobject-2.0"
- ;;
- gthread)
- pkg_config_args="$pkg_config_args gthread-2.0"
- ;;
- esac
- done
-
- AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-
- no_glib=""
-
- if test x$PKG_CONFIG != xno ; then
- if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
- :
- else
- echo *** pkg-config too old; version 0.7 or better required.
- no_glib=yes
- PKG_CONFIG=no
- fi
- else
- no_glib=yes
- fi
-
- min_glib_version=ifelse([$1], ,2.0.0,$1)
- AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
-
- if test x$PKG_CONFIG != xno ; then
- ## don't try to run the test against uninstalled libtool libs
- if $PKG_CONFIG --uninstalled $pkg_config_args; then
- echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
- enable_glibtest=no
- fi
-
- if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
- :
- else
- no_glib=yes
- fi
- fi
-
- if test x"$no_glib" = x ; then
- GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
- GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
- GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
-
- GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
- GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
- glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_glibtest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GLIB_CFLAGS"
- LIBS="$GLIB_LIBS $LIBS"
-dnl
-dnl Now check if the installed GLIB is sufficiently new. (Also sanity
-dnl checks the results of pkg-config to some extent)
-dnl
- rm -f conf.glibtest
- AC_TRY_RUN([
-#include <glib.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main ()
-{
- int major, minor, micro;
- char *tmp_version;
-
- system ("touch conf.glibtest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = g_strdup("$min_glib_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
- printf("%s, bad version string\n", "$min_glib_version");
- exit(1);
- }
-
- if ((glib_major_version != $glib_config_major_version) ||
- (glib_minor_version != $glib_config_minor_version) ||
- (glib_micro_version != $glib_config_micro_version))
- {
- printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
- $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
- glib_major_version, glib_minor_version, glib_micro_version);
- printf ("*** was found! If pkg-config was correct, then it is best\n");
- printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
- printf("*** required on your system.\n");
- printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
- printf("*** to point to the correct configuration files\n");
- }
- else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
- (glib_minor_version != GLIB_MINOR_VERSION) ||
- (glib_micro_version != GLIB_MICRO_VERSION))
- {
- printf("*** GLIB header files (version %d.%d.%d) do not match\n",
- GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
- printf("*** library (version %d.%d.%d)\n",
- glib_major_version, glib_minor_version, glib_micro_version);
- }
- else
- {
- if ((glib_major_version > major) ||
- ((glib_major_version == major) && (glib_minor_version > minor)) ||
- ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
- glib_major_version, glib_minor_version, glib_micro_version);
- printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
- major, minor, micro);
- printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
- printf("*** correct copy of pkg-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- }
- return 1;
-}
-],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_glib" = x ; then
- AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** A new enough version of pkg-config was not found."
- echo "*** See http://www.freedesktop.org/software/pkgconfig/"
- else
- if test -f conf.glibtest ; then
- :
- else
- echo "*** Could not run GLIB test program, checking why..."
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GLIB_CFLAGS"
- LIBS="$LIBS $GLIB_LIBS"
- AC_TRY_LINK([
-#include <glib.h>
-#include <stdio.h>
-], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding GLIB or finding the wrong"
- echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- GLIB_CFLAGS=""
- GLIB_LIBS=""
- GLIB_GENMARSHAL=""
- GOBJECT_QUERY=""
- GLIB_MKENUMS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(GLIB_CFLAGS)
- AC_SUBST(GLIB_LIBS)
- AC_SUBST(GLIB_GENMARSHAL)
- AC_SUBST(GOBJECT_QUERY)
- AC_SUBST(GLIB_MKENUMS)
- rm -f conf.glibtest
-])
Deleted: vendor/fuse-emulator/current/fuse/m4/libxml.m4
===================================================================
--- vendor/fuse-emulator/current/fuse/m4/libxml.m4 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/m4/libxml.m4 2016-08-22 12:00:10 UTC (rev 820)
@@ -1,190 +0,0 @@
-# Configure paths for LIBXML2
-# Toshio Kuratomi 2001-04-21
-# Adapted from:
-# Configure paths for GLIB
-# Owen Taylor 97-11-3
-# Modified to use CPPFLAGS instead of CFLAGS
-# Mike Hommey 2004-05-26
-
-# Taken from libxml2 2.6.10 by PAK 2004/07/06
-
-dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for XML, and define XML_CFLAGS and XML_LIBS
-dnl
-AC_DEFUN([AM_PATH_XML2],[
-AC_ARG_WITH(xml-prefix,
- [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
- xml_config_prefix="$withval", xml_config_prefix="")
-AC_ARG_WITH(xml-exec-prefix,
- [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
- xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
-AC_ARG_ENABLE(xmltest,
- [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
- enable_xmltest=yes)
-
- if test x$xml_config_exec_prefix != x ; then
- xml_config_args="$xml_config_args"
- if test x${XML2_CONFIG+set} != xset ; then
- XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
- fi
- fi
- if test x$xml_config_prefix != x ; then
- xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
- if test x${XML2_CONFIG+set} != xset ; then
- XML2_CONFIG=$xml_config_prefix/bin/xml2-config
- fi
- fi
-
- AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
- min_xml_version=ifelse([$1], ,2.0.0,[$1])
- AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
- no_xml=""
- if test "$XML2_CONFIG" = "no" ; then
- no_xml=yes
- else
- XML_CFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
- XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
- xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_xmltest" = "xyes" ; then
- ac_save_CPPFLAGS="$CPPFLAGS"
- ac_save_LIBS="$LIBS"
- CPPFLAGS="$CPPFLAGS $XML_CFLAGS"
- LIBS="$XML_LIBS $LIBS"
-dnl
-dnl Now check if the installed libxml is sufficiently new.
-dnl (Also sanity checks the results of xml2-config to some extent)
-dnl
- rm -f conf.xmltest
- AC_TRY_RUN([
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <libxml/xmlversion.h>
-
-int
-main()
-{
- int xml_major_version, xml_minor_version, xml_micro_version;
- int major, minor, micro;
- char *tmp_version;
-
- system("touch conf.xmltest");
-
- /* Capture xml2-config output via autoconf/configure variables */
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = (char *)strdup("$min_xml_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
- printf("%s, bad version string from xml2-config\n", "$min_xml_version");
- exit(1);
- }
- free(tmp_version);
-
- /* Capture the version information from the header files */
- tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
- if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
- printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
- exit(1);
- }
- free(tmp_version);
-
- /* Compare xml2-config output to the libxml headers */
- if ((xml_major_version != $xml_config_major_version) ||
- (xml_minor_version != $xml_config_minor_version) ||
- (xml_micro_version != $xml_config_micro_version))
- {
- printf("*** libxml header files (version %d.%d.%d) do not match\n",
- xml_major_version, xml_minor_version, xml_micro_version);
- printf("*** xml2-config (version %d.%d.%d)\n",
- $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
- return 1;
- }
-/* Compare the headers to the library to make sure we match */
- /* Less than ideal -- doesn't provide us with return value feedback,
- * only exits if there's a serious mismatch between header and library.
- */
- LIBXML_TEST_VERSION;
-
- /* Test that the library is greater than our minimum version */
- if ((xml_major_version > major) ||
- ((xml_major_version == major) && (xml_minor_version > minor)) ||
- ((xml_major_version == major) && (xml_minor_version == minor) &&
- (xml_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
- xml_major_version, xml_minor_version, xml_micro_version);
- printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
- major, minor, micro);
- printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
- printf("*** correct copy of xml2-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- return 1;
-}
-],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
-
- if test "x$no_xml" = x ; then
- AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$XML2_CONFIG" = "no" ; then
- echo "*** The xml2-config script installed by LIBXML could not be found"
- echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the XML2_CONFIG environment variable to the"
- echo "*** full path to xml2-config."
- else
- if test -f conf.xmltest ; then
- :
- else
- echo "*** Could not run libxml test program, checking why..."
- CPPFLAGS="$CPPFLAGS $XML_CFLAGS"
- LIBS="$LIBS $XML_LIBS"
- AC_TRY_LINK([
-#include <libxml/xmlversion.h>
-#include <stdio.h>
-], [ LIBXML_TEST_VERSION; return 0;],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
- echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
- echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
- echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
-
- XML_CFLAGS=""
- XML_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(XML_CFLAGS)
- AC_SUBST(XML_LIBS)
- rm -f conf.xmltest
-])
Modified: vendor/fuse-emulator/current/fuse/machines/specplus3.c
===================================================================
--- vendor/fuse-emulator/current/fuse/machines/specplus3.c 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/machines/specplus3.c 2016-08-22 12:00:10 UTC (rev 820)
@@ -69,6 +69,7 @@
static const fdd_params_t *ui_drive_get_params_a( void );
static const fdd_params_t *ui_drive_get_params_b( void );
static int ui_drive_inserted( const ui_media_drive_info_t *drive, int new );
+static int ui_drive_autoload( void );
static ui_media_drive_info_t ui_drives[ SPECPLUS3_NUM_DRIVES ] = {
{
@@ -83,6 +84,7 @@
/* .is_available = */ &ui_drive_is_available,
/* .get_params = */ &ui_drive_get_params_a,
/* .insert_hook = */ &ui_drive_inserted,
+ /* .autoload_hook = */ &ui_drive_autoload,
},
{
/* .name = */ "+3 Disk B:",
@@ -96,6 +98,7 @@
/* .is_available = */ &ui_drive_is_available,
/* .get_params = */ &ui_drive_get_params_b,
/* .insert_hook = */ &ui_drive_inserted,
+ /* .autoload_hook = */ &ui_drive_autoload,
},
};
@@ -179,7 +182,8 @@
fdd_init( &specplus3_drives[ 0 ], FDD_SHUGART, dt, 1 );
dt = &fdd_params[ option_enumerate_diskoptions_drive_plus3b_type() ];
- fdd_init( &specplus3_drives[ 1 ], dt->enabled ? FDD_SHUGART : FDD_TYPE_NONE, dt, 1 );
+ fdd_init( &specplus3_drives[ 1 ], dt->enabled ? FDD_SHUGART : FDD_TYPE_NONE,
+ dt, 1 );
}
static int
@@ -362,14 +366,16 @@
}
libspectrum_byte
-specplus3_fdc_status( libspectrum_word port GCC_UNUSED, libspectrum_byte *attached )
+specplus3_fdc_status( libspectrum_word port GCC_UNUSED,
+ libspectrum_byte *attached )
{
*attached = 0xff; /* TODO: check this */
return upd_fdc_read_status( specplus3_fdc );
}
libspectrum_byte
-specplus3_fdc_read( libspectrum_word port GCC_UNUSED, libspectrum_byte *attached )
+specplus3_fdc_read( libspectrum_word port GCC_UNUSED,
+ libspectrum_byte *attached )
{
*attached = 0xff; /* TODO: check this */
return upd_fdc_read_data( specplus3_fdc );
@@ -437,3 +443,35 @@
{
return 0;
}
+
+static int
+ui_drive_autoload( void )
+{
+ int error;
+ utils_file snap;
+ libspectrum_id_t type;
+
+ /* Look for an autoload snap. Try .szx first, then .z80 */
+ type = LIBSPECTRUM_ID_SNAPSHOT_SZX;
+ error = utils_read_auxiliary_file( "disk_plus3.szx", &snap,
+ UTILS_AUXILIARY_LIB );
+ if( error == -1 ) {
+ type = LIBSPECTRUM_ID_SNAPSHOT_Z80;
+ error = utils_read_auxiliary_file( "disk_plus3.z80", &snap,
+ UTILS_AUXILIARY_LIB );
+ }
+
+ /* If we couldn't find either, give up */
+ if( error == -1 ) {
+ ui_error( UI_ERROR_ERROR, "Couldn't find autoload snap for +3 disk" );
+ return 1;
+ }
+ if( error ) return error;
+
+ error = snapshot_read_buffer( snap.buffer, snap.length, type );
+ if( error ) { utils_close_file( &snap ); return error; }
+
+ utils_close_file( &snap );
+
+ return 0;
+}
Modified: vendor/fuse-emulator/current/fuse/man/fuse.1
===================================================================
--- vendor/fuse-emulator/current/fuse/man/fuse.1 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/man/fuse.1 2016-08-22 12:00:10 UTC (rev 820)
@@ -23,7 +23,7 @@
.\" E-mail: phi...@sh...
.\"
.\"
-.TH fuse 1 "17th July, 2016" "Version 1.2.1" "Emulators"
+.TH fuse 1 "21st August, 2016" "Version 1.2.2" "Emulators"
.\"
.\"------------------------------------------------------------------
.\"
@@ -68,9 +68,10 @@
See the
.B "COMPRESSED FILES"
section for details on reading files compressed with
-.IR bzip2 "(3)"
+.IR bzip2 "(3),"
+.IR gzip "(3)"
or
-.IR gzip "(3)."
+.IR zip "(3)."
.\"
.\"------------------------------------------------------------------
.\"
@@ -121,7 +122,8 @@
Specify whether tape and disk files should be automatically loaded
when they are opened using the
.I "File, Open..."
-menu option. (Enabled by default, but you can use
+menu option. In the case of TRD/SCL disk images, inserts also a boot
+loader file when none is available. (Enabled by default, but you can use
.RB ` \-\-no\-auto\-load '
to disable). Same as the Media Options dialog's
.I "Auto-load media"
@@ -5006,7 +5008,9 @@
.PP
.I .TRD
.RS
-TR-DOS disk image; for detailed information please see
+TR-DOS disk image. TRD and SCL sectors are loaded interleaved, therefore
+you might experience problems with TR\-DOS ROMs that use the turbo
+format (sequential sectors); for detailed information please see
.I http://web.archive.org/web/20070808150548/http://www.ramsoft.bbk.org/tech/tr\-info.zip
.RE
.PP
@@ -5142,11 +5146,13 @@
Assuming the appropriate libraries were available when
.IR libspectrum (3)
was compiled, snapshots, tape images, dock cartridges and input
-recording files can be read from files compressed with
-.IR bzip2 (3)
+recording files (RZX) can be read from files compressed with
+.IR bzip2 "(3),"
+.IR gzip (3)
or
-.IR gzip (3)
-just as if they were uncompressed.
+.IR zip (3)
+just as if they were uncompressed. In the zip case, only the first
+supported file found inside the archive is loaded.
There is currently no support for reading compressed +3, DISCiPLE/+D
or Beta disk images.
.\"
@@ -5185,7 +5191,8 @@
.IR libspectrum "(3),"
.IR ogg123 "(1),"
.IR xspect "(1),"
-.IR xzx "(1)."
+.IR xzx "(1),"
+.IR zip "(3)."
.PP
The comp.sys.sinclair Spectrum FAQ, at
.br
Modified: vendor/fuse-emulator/current/fuse/peripherals/Makefile.am
===================================================================
--- vendor/fuse-emulator/current/fuse/peripherals/Makefile.am 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/peripherals/Makefile.am 2016-08-22 12:00:10 UTC (rev 820)
@@ -3,7 +3,7 @@
## Copyright (c) 2015 Stuart Brady
## Copyright (c) 2015 Sergio Baldoví
-## $Id: Makefile.am 5434 2016-05-01 04:22:45Z fredm $
+## $Id: Makefile.am 5755 2016-08-17 12:10:38Z fredm $
## 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
@@ -47,6 +47,7 @@
peripherals/disk/fdd.c \
peripherals/disk/opus.c \
peripherals/disk/plusd.c \
+ peripherals/disk/trdos.c \
peripherals/disk/upd_fdc.c \
peripherals/disk/wd_fdc.c \
peripherals/ide/divide.c \
@@ -90,6 +91,7 @@
peripherals/disk/fdd.h \
peripherals/disk/opus.h \
peripherals/disk/plusd.h \
+ peripherals/disk/trdos.h \
peripherals/disk/upd_fdc.h \
peripherals/disk/wd_fdc.h \
peripherals/ide/divide.h \
Modified: vendor/fuse-emulator/current/fuse/peripherals/disk/disk.c
===================================================================
--- vendor/fuse-emulator/current/fuse/peripherals/disk/disk.c 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/peripherals/disk/disk.c 2016-08-22 12:00:10 UTC (rev 820)
@@ -36,6 +36,7 @@
#include "crc.h"
#include "disk.h"
#include "settings.h"
+#include "trdos.h"
#include "ui/ui.h"
#include "utils.h"
@@ -133,6 +134,26 @@
return 0;
}
+void
+position_context_save( const disk_t *d, disk_position_context_t *c )
+{
+ c->track = d->track;
+ c->clocks = d->clocks;
+ c->fm = d->fm;
+ c->weak = d->weak;
+ c->i = d->i;
+}
+
+void
+position_context_restore( disk_t *d, const disk_position_context_t *c )
+{
+ d->track = c->track;
+ d->clocks = c->clocks;
+ d->fm = c->fm;
+ d->weak = c->weak;
+ d->i = c->i;
+}
+
static int
id_read( disk_t *d, int *head, int *track, int *sector, int *length )
{
@@ -1209,10 +1230,176 @@
return d->status = DISK_OK;
}
+/* 1 RANDOMIZE USR 15619: REM : RUN " " */
+static libspectrum_byte beta128_boot_loader[] = {
+ 0x00, 0x01, 0x1c, 0x00, 0xf9, 0xc0, 0x31, 0x35, 0x36, 0x31, 0x39, 0x0e,
+ 0x00, 0x00, 0x03, 0x3d, 0x00, 0x3a, 0xea, 0x3a, 0xf7, 0x22, 0x20, 0x20,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x0d,
+};
+
static int
+trdos_insert_basic_file( disk_t *d, trdos_spec_t *spec,
+ const libspectrum_byte *data, unsigned int size )
+{
+ unsigned int fat_sector, fat_entry, n_sec, n_bytes, n_copied;
+ int i, t, s, slen, len_pre_dam, len_pre_data;
+ disk_gap_t *g = &gaps[ GAP_TRDOS ];
+ trdos_dirent_t entry;
+ libspectrum_byte trailing_data[] = { 0x80, 0xaa, 0x01, 0x00 }; /* line 1 */
+
+ /* Check free FAT entries (we don't purge deleted files) */
+ if( spec->file_count >= 128 )
+ return DISK_UNSUP;
+
+ /* Check free sectors */
+ n_sec = ( size + ARRAY_SIZE( trailing_data ) + 255 ) / 256;
+ if( spec->free_sectors < n_sec )
+ return DISK_UNSUP;
+
+ /* Calculate sector raw length */
+ slen = calc_sectorlen( ( d->density != DISK_SD && d->density != DISK_8_SD ),
+ 256, GAP_TRDOS );
+
+ /* Calculate initial gap before data in a sector */
+ len_pre_dam = 0;
+ len_pre_dam += g->sync_len + ( g->mark >= 0 ? 3 : 0 ) + 7; /* ID */
+ len_pre_dam += g->len[2]; /* GAP II */
+
+ len_pre_data = len_pre_dam;
+ len_pre_data += g->sync_len + ( g->mark >= 0 ? 3 : 0 ) + 1; /* DAM */
+
+ /* Write file data */
+ n_copied = 0;
+ s = spec->first_free_sector;
+ t = spec->first_free_track;
+ DISK_SET_TRACK_IDX( d, t );
+
+ for( i = 0; i < n_sec; i++ ) {
+ memset( head, 0, 256 );
+ n_bytes = 0;
+
+ /* Copy chunk of file body */
+ if( n_copied < size ) {
+ n_bytes = ( size - n_copied > 256 )? 256 : size - n_copied;
+ memcpy( head, data + n_copied, n_bytes );
+ n_copied += n_bytes;
+ }
+
+ /* Copy trailing parameters */
+ if( n_copied >= size ) {
+ while( n_copied - size < ARRAY_SIZE( trailing_data ) && n_bytes < 256 ) {
+ head[ n_bytes ] = trailing_data[ n_copied - size ];
+ n_copied++;
+ n_bytes++;
+ }
+ }
+
+ /* Write buffer to disk */
+ d->i = g->len[1] + ( s % 8 * 2 + s / 8 ) * slen; /* 1 9 2 10 3 ... */
+ d->i += len_pre_dam;
+ data_add( d, NULL, head, 256, NO_DDAM, GAP_TRDOS, CRC_OK, NO_AUTOFILL,
+ NULL );
+
+ /* Next sector */
+ s = ( s + 1 ) % 16;
+
+ /* Next track */
+ if( s == 0 ) {
+ t = t + 1;
+ if( t >= d->cylinders ) return DISK_UNSUP;
+ DISK_SET_TRACK_IDX( d, t );
+ }
+ }
+
+ /* Write FAT entry */
+ memcpy( entry.filename, "boot ", 8 );
+ entry.file_extension = 'B';
+ entry.param1 = size; /* assumes variables = 0 */
+ entry.param2 = size;
+ entry.file_length = n_sec;
+ entry.start_sector = spec->first_free_sector;
+ entry.start_track = spec->first_free_track;
+
+ /* Copy sector to buffer, modify and write back to disk recalculating CRCs */
+ DISK_SET_TRACK_IDX( d, 0 );
+ fat_sector = spec->file_count / 16;
+ d->i = g->len[1] + ( ( fat_sector ) % 8 * 2 + ( fat_sector ) / 8 ) * slen;
+ memcpy( head, d->track + d->i + len_pre_data, 256 );
+
+ fat_entry = spec->file_count % 16;
+ trdos_write_dirent( head + fat_entry * 16, &entry );
+
+ d->i += len_pre_dam;
+ data_add( d, NULL, head, 256, NO_DDAM, GAP_TRDOS, CRC_OK, NO_AUTOFILL, NULL );
+
+ /* Write specification sector */
+ spec->file_count += 1;
+ spec->free_sectors -= n_sec;
+ spec->first_free_sector = s;
+ spec->first_free_track = t;
+ trdos_write_spec( head, spec );
+
+ d->i = g->len[1] + slen + len_pre_dam; /* sector-9: 1 9 2 10 3 ... */
+ data_add( d, NULL, head, 256, NO_DDAM, GAP_TRDOS, CRC_OK, NO_AUTOFILL, NULL );
+
+ return DISK_OK;
+}
+
+static void
+trdos_insert_boot_loader( disk_t *d )
+{
+ trdos_spec_t spec;
+ trdos_boot_info_t info;
+ int slen, del;
+
+ /* TR-DOS specification sector */
+ DISK_SET_TRACK_IDX( d, 0 );
+ if( !id_seek( d, 9 ) || !datamark_read( d, &del ) )
+ return;
+
+ if( trdos_read_spec( &spec, d->track + d->i ) )
+ return;
+
+ /* Check free FAT entries (we don't purge deleted files) */
+ if( spec.file_count >= 128 )
+ return;
+
+ /* Check there is at least one free sector */
+ if( spec.free_sectors == 0 )
+ return;
+ /* TODO: stealth mode? some boot loaders hide between sectors 10-16 */
+
+ /* Calculate sector raw length */
+ slen = calc_sectorlen( ( d->density != DISK_SD && d->density != DISK_8_SD ),
+ 256, GAP_TRDOS );
+
+ /* Read FAT entries */
+ if( !id_seek( d, 1 ) || !datamark_read( d, &del ) )
+ return;
+
+ if( trdos_read_fat( &info, d->track + d->i, slen ) )
+ return;
+
+ /* Check actual boot file (nothing to do) */
+ if( info.have_boot_file )
+ return;
+
+ /* Insert a simple boot loader that runs the first program */
+ if( info.basic_files_count >= 1 ) {
+ memcpy( beta128_boot_loader + 22, info.first_basic_file, 8 );
+
+ trdos_insert_basic_file( d, &spec, beta128_boot_loader,
+ ARRAY_SIZE( beta128_boot_loader ) );
+ }
+
+ /* TODO: use also a boot loader that can handle multiple basic pograms */
+}
+
+static int
open_trd( buffer_t *buffer, disk_t *d )
{
int i, j, sectors, seclen;
+ disk_position_context_t context;
if( buffseek( buffer, 8*256, SEEK_CUR ) == -1 )
return d->status = DISK_OPEN;
@@ -1243,10 +1430,17 @@
for( i = 0; i < d->cylinders; i++ ) {
for( j = 0; j < d->sides; j++ ) {
if( trackgen( d, buffer, j, i, 1, sectors, seclen,
- NO_PREINDEX, GAP_TRDOS, INTERLEAVE_2, 0x00 ) )
- return d->status = DISK_GEOM;
+ NO_PREINDEX, GAP_TRDOS, INTERLEAVE_2, 0x00 ) )
+ return d->status = DISK_GEOM;
}
}
+
+ if( settings_current.auto_load ) {
+ position_context_save( d, &context );
+ trdos_insert_boot_loader( d );
+ position_context_restore( d, &context );
+ }
+
return d->status = DISK_OK;
}
@@ -1567,6 +1761,7 @@
{
int i, j, s, sectors, seclen;
int scl_deleted, scl_files, scl_i;
+ disk_position_context_t context;
d->sides = 2;
d->cylinders = 80;
@@ -1657,9 +1852,16 @@
/* now we continue with the data */
for( i = 1; i < d->sides * d->cylinders; i++ ) {
if( trackgen( d, buffer, i % 2, i / 2, 1, 16, 256,
- NO_PREINDEX, GAP_TRDOS, INTERLEAVE_2, 0x00 ) )
+ NO_PREINDEX, GAP_TRDOS, INTERLEAVE_2, 0x00 ) )
return d->status = DISK_OPEN;
}
+
+ if( settings_current.auto_load ) {
+ position_context_save( d, &context );
+ trdos_insert_boot_loader( d );
+ position_context_restore( d, &context );
+ }
+
return d->status = DISK_OK;
}
Modified: vendor/fuse-emulator/current/fuse/peripherals/disk/disk.h
===================================================================
--- vendor/fuse-emulator/current/fuse/peripherals/disk/disk.h 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/peripherals/disk/disk.h 2016-08-22 12:00:10 UTC (rev 820)
@@ -130,6 +130,14 @@
#define DISK_SET_TRACK( d, head, cyl ) \
DISK_SET_TRACK_IDX( (d), (d)->sides * cyl + head )
+typedef struct disk_position_context_t {
+ libspectrum_byte *track; /* current track data bytes */
+ libspectrum_byte *clocks; /* clock marks bits */
+ libspectrum_byte *fm; /* FM/MFM marks bits */
+ libspectrum_byte *weak; /* weak marks bits/weak data */
+ int i; /* index for track and clocks */
+} disk_position_context_t;
+
const char *disk_strerror( int error );
/* create an unformatted disk sides -> (1/2) cylinders -> track/side,
dens -> 'density' related to unformatted length of a track (SD = 3125,
Added: vendor/fuse-emulator/current/fuse/peripherals/disk/trdos.c
===================================================================
--- vendor/fuse-emulator/current/fuse/peripherals/disk/trdos.c (rev 0)
+++ vendor/fuse-emulator/current/fuse/peripherals/disk/trdos.c 2016-08-22 12:00:10 UTC (rev 820)
@@ -0,0 +1,142 @@
+/* trdos.c: Routines for handling the TR-DOS filesystem
+ Copyright (c) 2016 Sergio Baldoví
+
+ $Id: trdos.c 5755 2016-08-17 12:10:38Z fredm $
+
+ 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.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Author contact information:
+
+ E-mail: ser...@gm...
+
+*/
+
+#include <config.h>
+
+#include <string.h>
+#include "trdos.h"
+
+int
+trdos_read_spec( trdos_spec_t *spec, const libspectrum_byte *src )
+{
+ if( *src ) return -1;
+
+ spec->first_free_sector = src[225];
+ spec->first_free_track = src[226];
+ spec->disk_type = src[227];
+ spec->file_count = src[228];
+ spec->free_sectors = src[229] + src[230] * 0x100;
+ spec->id = src[231];
+ if( spec->id != 16 ) return -1;
+
+ memcpy( spec->password, src + 234, 9 );
+ spec->deleted_files = src[244];
+ memcpy( spec->disk_label, src + 245, 8 );
+
+ return 0;
+}
+
+void
+trdos_write_spec( libspectrum_byte *dest, const trdos_spec_t *spec )
+{
+ memset( dest, 0, 256 );
+ dest[225] = spec->first_free_sector;
+ dest[226] = spec->first_free_track;
+ dest[227] = spec->disk_type;
+ dest[228] = spec->file_count;
+ dest[229] = spec->free_sectors & 0xff;
+ dest[230] = spec->free_sectors >> 8;
+ dest[231] = spec->id;
+ memcpy( dest + 234, spec->password, 9 );
+ dest[244] = spec->deleted_files;
+ memcpy( dest + 245, spec->disk_label, 8 );
+}
+
+int
+trdos_read_dirent( trdos_dirent_t *entry, const libspectrum_byte *src )
+{
+ memcpy( entry->filename, src, 8 );
+ entry->file_extension = src[8];
+ entry->param1 = src[9] + src[10] * 0x100;
+ entry->param2 = src[11] + src[12] * 0x100;
+ entry->file_length = src[13];
+ entry->start_sector = src[14];
+ entry->start_track = src[15];
+
+ return entry->filename[0]? 0 : 1;
+}
+
+void
+trdos_write_dirent( libspectrum_byte *dest, const trdos_dirent_t *entry )
+{
+ memcpy( dest, entry->filename, 8 );
+ dest[8] = entry->file_extension;
+ dest[9] = entry->param1 & 0xff;
+ dest[10] = entry->param1 >> 8;
+ dest[11] = entry->param2 & 0xff;
+ dest[12] = entry->param2 >> 8;
+ dest[13] = entry->file_length;
+ dest[14] = entry->start_sector;
+ dest[15] = entry->start_track;
+}
+
+int
+trdos_read_fat( trdos_boot_info_t *info, const libspectrum_byte *sectors,
+ unsigned int seclen )
+{
+ int i, j, error;
+ trdos_dirent_t entry;
+ const libspectrum_byte *sector;
+
+ info->have_boot_file = 0;
+ info->basic_files_count = 0;
+
+ /* FAT sectors */
+ for( i = 0; i < 8; i++ ) {
+ sector = sectors + i * seclen * 2; /* interleaved */
+
+ /* Note: some TR-DOS versions like 5.04T have a turbo format with
+ sequential sectors: 1, 2, 3, ..., 8, 9, 10, ...
+ The SCL/TRD image formats can't specify a format mode and Fuse
+ load the sectors as interleaved: 1, 9, 2, 10, 3, ...
+ */
+
+ /* FAT entries */
+ for( j = 0; j < 16; j++ ) {
+ error = trdos_read_dirent( &entry, sector + j * 16 );
+ if( error ) return 0;
+
+ /* Basic files */
+ if( entry.filename[0] > 0x01 &&
+ entry.file_extension == 'B' ) {
+
+ /* Boot file */
+ if( !info->have_boot_file &&
+ !strncmp( (const char *)entry.filename, "boot ", 8 ) ) {
+ info->have_boot_file = 1;
+ }
+
+ /* First basic program */
+ if( info->basic_files_count == 0 ) {
+ memcpy( info->first_basic_file, entry.filename, 8 );
+ }
+
+ info->basic_files_count++;
+ }
+ }
+ }
+
+ return 0;
+}
Added: vendor/fuse-emulator/current/fuse/peripherals/disk/trdos.h
===================================================================
--- vendor/fuse-emulator/current/fuse/peripherals/disk/trdos.h (rev 0)
+++ vendor/fuse-emulator/current/fuse/peripherals/disk/trdos.h 2016-08-22 12:00:10 UTC (rev 820)
@@ -0,0 +1,77 @@
+/* trdos.h: Routines for handling the TR-DOS filesystem
+ Copyright (c) 2016 Sergio Baldoví
+
+ $Id: trdos.h 5755 2016-08-17 12:10:38Z fredm $
+
+ 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.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Author contact information:
+
+ E-mail: ser...@gm...
+
+*/
+
+#ifndef FUSE_TRDOS_H
+#define FUSE_TRDOS_H
+
+#include <config.h>
+
+#include <libspectrum.h>
+
+typedef struct trdos_spec_t {
+ libspectrum_byte first_free_sector; /* 0 to 15 */
+ libspectrum_byte first_free_track; /* 0 to ? */
+ libspectrum_byte disk_type;
+ libspectrum_byte file_count;
+ libspectrum_word free_sectors;
+ libspectrum_byte id;
+ char password[9]; /* not null-terminated */
+ libspectrum_byte deleted_files;
+ char disk_label[8]; /* not null-terminated */
+} trdos_spec_t;
+
+typedef struct trdos_dirent_t {
+ char filename[8]; /* not null-terminated */
+ char file_extension;
+ libspectrum_word param1;
+ libspectrum_word param2;
+ libspectrum_byte file_length; /* in sectors */
+ libspectrum_byte start_sector; /* 0 to 15 */
+ libspectrum_byte start_track; /* 0 to ? */
+} trdos_dirent_t;
+
+typedef struct trdos_boot_info_t {
+ int have_boot_file;
+ int basic_files_count;
+ char first_basic_file[8]; /* not null-terminated */
+} trdos_boot_info_t;
+
+int
+trdos_read_spec( trdos_spec_t *spec, const libspectrum_byte *src );
+
+void
+trdos_write_spec( libspectrum_byte *dest, const trdos_spec_t *spec );
+
+int
+trdos_read_dirent( trdos_dirent_t *entry, const libspectrum_byte *src );
+
+void
+trdos_write_dirent( libspectrum_byte *dest, const trdos_dirent_t *entry );
+
+int
+trdos_read_fat( trdos_boot_info_t *info, const libspectrum_byte *sectors,
+ unsigned int seclen );
+
+#endif /* #ifndef FUSE_TRDOS_H */
Modified: vendor/fuse-emulator/current/fuse/peripherals/disk/upd_fdc.c
===================================================================
--- vendor/fuse-emulator/current/fuse/peripherals/disk/upd_fdc.c 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/peripherals/disk/upd_fdc.c 2016-08-22 12:00:10 UTC (rev 820)
@@ -130,10 +130,14 @@
upd_fdc_master_reset( upd_fdc *f )
{
int i;
+
+ f->current_drive = f->drive[0];
+
+ /* Caution with mirrored drives! The plus3 only use the US0 pin to select
+ drives, so drive 2 := drive 0 and drive 3 := drive 1 */
for( i = 0; i < 4; i++ )
if( f->drive[i] != NULL )
- fdd_select( f->drive[i], i == 0 ? 1 : 0 );
- f->current_drive = f->drive[0];
+ fdd_select( f->drive[i], f->drive[i] == f->current_drive ? 1 : 0 );
f->main_status = UPD_FDC_MAIN_DATAREQ;
for( i = 0; i < 4; i++ )
Modified: vendor/fuse-emulator/current/fuse/sound/coreaudiosound.c
===================================================================
--- vendor/fuse-emulator/current/fuse/sound/coreaudiosound.c 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/sound/coreaudiosound.c 2016-08-22 12:00:10 UTC (rev 820)
@@ -24,9 +24,7 @@
#include <AssertMacros.h>
-#include <AudioUnit/AudioComponent.h>
-#include <AudioUnit/AudioUnit.h>
-#include <CoreAudio/AudioHardware.h>
+#include <AudioToolbox/AudioToolbox.h>
#include "settings.h"
#include "sfifo.h"
Modified: vendor/fuse-emulator/current/fuse/tape.c
===================================================================
--- vendor/fuse-emulator/current/fuse/tape.c 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/tape.c 2016-08-22 12:00:10 UTC (rev 820)
@@ -823,6 +823,7 @@
/* Invert the microphone state */
if( edge_tstates ||
+ !( flags & LIBSPECTRUM_TAPE_FLAGS_NO_EDGE ) ||
( flags & ( LIBSPECTRUM_TAPE_FLAGS_STOP |
LIBSPECTRUM_TAPE_FLAGS_LEVEL_LOW |
LIBSPECTRUM_TAPE_FLAGS_LEVEL_HIGH ) ) ) {
Modified: vendor/fuse-emulator/current/fuse/ui/gtk/fileselector.c
===================================================================
--- vendor/fuse-emulator/current/fuse/ui/gtk/fileselector.c 2016-08-22 11:59:47 UTC (rev 819)
+++ vendor/fuse-emulator/current/fuse/ui/gtk/fileselector.c 2016-08-22 12:00:10 UTC (rev 820)
@@ -43,6 +43,11 @@
static void add_filter_snapshot_files( GtkFileFilter *filter );
static void add_filter_tape_files( GtkFileFilter *filter );
+#if defined LIBSPECTRUM_SUPPORTS_BZ2_COMPRESSION || \
+ defined LIBSPECTRUM_SUPPORTS_ZLIB_COMPRESSION
+static void add_filter_compressed_files( GtkFileFilter *filter );
+#endif
+
static char*
run_dialog( const char *title, GtkFileChooserAction action )
{
@@ -64,7 +69,8 @@
gtk_dialog_set_default_response( GTK_DIALOG( dialog ), GTK_RESPONSE_ACCEPT );
- /* TODO: select filter based on UI operation */
+ /* TODO: select filter based on UI operation (snapshot, recording, screenshot) */
+ /* TODO: custom filter based file action (open, save) */
add_filter_defaults( dialog );
if( current_folder )
@@ -107,6 +113,10 @@
filter = gtk_file_filter_new();
gtk_file_filter_set_name( filter, "Supported Files" );
add_filter_auxiliary_files( filter );
+#if defined LIBSPECTRUM_SUPPORTS_BZ2_COMPRESSION || \
+ defined LIBSPECTRUM_SUPPORTS_ZLIB_COMPRESSION
+ add_filter_compressed_files( filter );
+#endif
add_filter_disk_files( filter );
add_filter_dock_files( filter );
add_filter_harddisk_files( filter );
@@ -127,16 +137,24 @@
gtk_file_chooser_add_filter( GTK_FILE_CHOOSER( file_chooser ), filter );
filter = gtk_file_filter_new();
- gtk_file_filter_set_name( filter, "Disk Files" );
- add_filter_disk_files( filter );
+ gtk_file_filter_set_name( filter, "Cartridge Files" );
+ add_filter_dock_files( filter );
gtk_file_chooser_add_filter( GTK_FILE_CHOOSER( file_chooser ), filter );
+#if defin...
[truncated message content] |