[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[741] trunk
Brought to you by:
fredm
From: <fr...@us...> - 2013-04-20 11:36:01
|
Revision: 741 http://sourceforge.net/p/fuse-for-macosx/code/741 Author: fredm Date: 2013-04-20 11:35:58 +0000 (Sat, 20 Apr 2013) Log Message: ----------- Merge up to vendor revision 4915. Revision Links: -------------- http://sourceforge.net/p/fuse-for-macosx/code/4915 Modified Paths: -------------- trunk/FuseGenerator/FuseGenerator.xcodeproj/project.pbxproj trunk/FuseGenerator/config.h trunk/FuseGenerator/libspectrum.h trunk/FuseImporter/FuseImporter.xcodeproj/project.pbxproj trunk/FuseImporter/config.h trunk/FuseImporter/libspectrum.h trunk/libspectrum/Info.plist trunk/libspectrum/config.h trunk/libspectrum/libspectrum/ChangeLog trunk/libspectrum/libspectrum/README trunk/libspectrum/libspectrum/accessor.pl trunk/libspectrum/libspectrum/configure.ac trunk/libspectrum/libspectrum/csw.c trunk/libspectrum/libspectrum/doc/libspectrum.3 trunk/libspectrum/libspectrum/doc/libspectrum.txt trunk/libspectrum/libspectrum/hacking/ChangeLog trunk/libspectrum/libspectrum/libspectrum.c trunk/libspectrum/libspectrum/libspectrum.h.in trunk/libspectrum/libspectrum/make-perl.c trunk/libspectrum/libspectrum/rzx.c trunk/libspectrum/libspectrum/sna.c trunk/libspectrum/libspectrum/snap_accessors.txt trunk/libspectrum/libspectrum/snapshot.c trunk/libspectrum/libspectrum/szx.c trunk/libspectrum/libspectrum/timings.c trunk/libspectrum/libspectrum/z80.c trunk/libspectrum/libspectrum.h trunk/libspectrum/libspectrum.xcodeproj/project.pbxproj Property Changed: ---------------- trunk/libspectrum/libspectrum/ Modified: trunk/FuseGenerator/FuseGenerator.xcodeproj/project.pbxproj =================================================================== --- trunk/FuseGenerator/FuseGenerator.xcodeproj/project.pbxproj 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/FuseGenerator/FuseGenerator.xcodeproj/project.pbxproj 2013-04-20 11:35:58 UTC (rev 741) @@ -363,7 +363,7 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0450; + LastUpgradeCheck = 0460; }; buildConfigurationList = 2CA326220896AD4900168862 /* Build configuration list for PBXProject "FuseGenerator" */; compatibilityVersion = "Xcode 3.2"; @@ -532,12 +532,18 @@ buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEAD_CODE_STRIPPING = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - SDKROOT = macosx; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx10.7; }; name = Debug; }; @@ -545,12 +551,18 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEAD_CODE_STRIPPING = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNUSED_VARIABLE = YES; - SDKROOT = macosx; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx10.7; }; name = Release; }; Modified: trunk/FuseGenerator/config.h =================================================================== --- trunk/FuseGenerator/config.h 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/FuseGenerator/config.h 2013-04-20 11:35:58 UTC (rev 741) @@ -83,7 +83,7 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.0.0.1a" +#define VERSION "1.1.0" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ Modified: trunk/FuseGenerator/libspectrum.h =================================================================== --- trunk/FuseGenerator/libspectrum.h 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/FuseGenerator/libspectrum.h 2013-04-20 11:35:58 UTC (rev 741) @@ -1,7 +1,7 @@ /* libspectrum.h: the library for dealing with ZX Spectrum emulator files Copyright (c) 2001-2007 Philip Kendall, Darren Salt, Fredrick Meunier - $Id: libspectrum.h.in 4695 2012-05-07 02:03:10Z fredm $ + $Id: libspectrum.h.in 4836 2012-12-31 15:40:10Z zubzero $ 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 @@ -40,10 +40,19 @@ #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN /* Exclude rarely used stuff from Windows - headers */ +/* Exclude rarely used stuff from Windows headers */ +#ifndef WIN32_LEAN_AND_MEAN + +#define WIN32_LEAN_AND_MEAN /**/ #include <windows.h> +#undef WIN32_LEAN_AND_MEAN +#else + +#include <windows.h> + +#endif /* #ifndef WIN32_LEAN_AND_MEAN */ + #ifdef LIBSPECTRUM_EXPORTS #define WIN32_DLL __declspec( dllexport ) #else /* #ifdef LIBSPECTRUM_EXPORTS */ @@ -221,7 +230,7 @@ WIN32_DLL gchar* g_array_free( GArray *array, gboolean free_segment ); #include <TargetConditionals.h> - + #ifdef TARGET_RT_64_BIT #define GINT_TO_POINTER(i) ((gpointer) (glong)(i)) #define GPOINTER_TO_INT(p) ((gint) (glong)(p)) @@ -273,11 +282,11 @@ /* we support files compressed with bz2 */ -#define LIBSPECTRUM_SUPPORTS_BZ2_COMPRESSION (1) +#define LIBSPECTRUM_SUPPORTS_BZ2_COMPRESSION (1) /* we support files wav files */ -#define LIBSPECTRUM_SUPPORTS_AUDIOFILE (1) +#define LIBSPECTRUM_SUPPORTS_AUDIOFILE (1) /* Initialisation */ @@ -365,7 +374,7 @@ /* Below here, present only in 0.2.2 and later */ LIBSPECTRUM_ID_HARDDISK_HDF, /* .hdf hard disk image */ - LIBSPECTRUM_ID_CARTRIDGE_IF2, /* .rom Interface II cartridge image */ + LIBSPECTRUM_ID_CARTRIDGE_IF2, /* .rom Interface 2 cartridge image */ /* Below here, present only in 0.3.0 and later */ @@ -422,7 +431,7 @@ /* Below here, present only in 0.2.2 and later */ LIBSPECTRUM_CLASS_HARDDISK, /* A hard disk image */ - LIBSPECTRUM_CLASS_CARTRIDGE_IF2, /* Interface II cartridges */ + LIBSPECTRUM_CLASS_CARTRIDGE_IF2, /* Interface 2 cartridges */ /* Below here, present only in 0.3.0 and later */ @@ -490,6 +499,8 @@ LIBSPECTRUM_MACHINE_48_NTSC, + LIBSPECTRUM_MACHINE_128E, + } libspectrum_machine; WIN32_DLL const char* libspectrum_machine_name( libspectrum_machine type ); @@ -697,6 +708,8 @@ WIN32_DLL void libspectrum_snap_set_sp( libspectrum_snap *snap, libspectrum_word sp ); WIN32_DLL libspectrum_word libspectrum_snap_pc( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_pc( libspectrum_snap *snap, libspectrum_word pc ); +WIN32_DLL libspectrum_word libspectrum_snap_memptr( libspectrum_snap *snap ); +WIN32_DLL void libspectrum_snap_set_memptr( libspectrum_snap *snap, libspectrum_word memptr ); WIN32_DLL libspectrum_byte libspectrum_snap_iff1( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_iff1( libspectrum_snap *snap, libspectrum_byte iff1 ); WIN32_DLL libspectrum_byte libspectrum_snap_iff2( libspectrum_snap *snap ); @@ -709,6 +722,8 @@ WIN32_DLL void libspectrum_snap_set_halted( libspectrum_snap *snap, int halted ); WIN32_DLL int libspectrum_snap_last_instruction_ei( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_last_instruction_ei( libspectrum_snap *snap, int last_instruction_ei ); +WIN32_DLL int libspectrum_snap_last_instruction_set_f( libspectrum_snap *snap ); +WIN32_DLL void libspectrum_snap_set_last_instruction_set_f( libspectrum_snap *snap, int last_instruction_set_f ); WIN32_DLL libspectrum_byte libspectrum_snap_out_ula( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_out_ula( libspectrum_snap *snap, libspectrum_byte out_ula ); WIN32_DLL libspectrum_byte libspectrum_snap_out_128_memoryport( libspectrum_snap *snap ); @@ -919,6 +934,8 @@ WIN32_DLL void libspectrum_snap_set_spectranet_paged( libspectrum_snap *snap, int spectranet_paged ); WIN32_DLL int libspectrum_snap_spectranet_paged_via_io( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_spectranet_paged_via_io( libspectrum_snap *snap, int spectranet_paged_via_io ); +WIN32_DLL int libspectrum_snap_spectranet_nmi_flipflop( libspectrum_snap *snap ); +WIN32_DLL void libspectrum_snap_set_spectranet_nmi_flipflop( libspectrum_snap *snap, int spectranet_nmi_flipflop ); WIN32_DLL int libspectrum_snap_spectranet_programmable_trap_active( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_spectranet_programmable_trap_active( libspectrum_snap *snap, int spectranet_programmable_trap_active ); WIN32_DLL int libspectrum_snap_spectranet_programmable_trap_msb( libspectrum_snap *snap ); @@ -941,6 +958,10 @@ WIN32_DLL void libspectrum_snap_set_spectranet_flash( libspectrum_snap *snap, int idx, libspectrum_byte* spectranet_flash ); WIN32_DLL libspectrum_byte * libspectrum_snap_spectranet_ram( libspectrum_snap *snap, int idx ); WIN32_DLL void libspectrum_snap_set_spectranet_ram( libspectrum_snap *snap, int idx, libspectrum_byte* spectranet_ram ); +WIN32_DLL int libspectrum_snap_late_timings( libspectrum_snap *snap ); +WIN32_DLL void libspectrum_snap_set_late_timings( libspectrum_snap *snap, int late_timings ); +WIN32_DLL int libspectrum_snap_zx_printer_active( libspectrum_snap *snap ); +WIN32_DLL void libspectrum_snap_set_zx_printer_active( libspectrum_snap *snap, int zx_printer_active ); /* * Tape handling routines Modified: trunk/FuseImporter/FuseImporter.xcodeproj/project.pbxproj =================================================================== --- trunk/FuseImporter/FuseImporter.xcodeproj/project.pbxproj 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/FuseImporter/FuseImporter.xcodeproj/project.pbxproj 2013-04-20 11:35:58 UTC (rev 741) @@ -338,7 +338,7 @@ 089C1669FE841209C02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0450; + LastUpgradeCheck = 0460; }; buildConfigurationList = B6B0E30008CC65D5001D8411 /* Build configuration list for PBXProject "FuseImporter" */; compatibilityVersion = "Xcode 3.2"; @@ -565,9 +565,17 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - SDKROOT = macosx; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx10.7; }; name = Development; }; @@ -575,10 +583,18 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; DEPLOYMENT_POSTPROCESSING = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - SDKROOT = macosx; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx10.7; }; name = Deployment; }; @@ -586,9 +602,17 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - SDKROOT = macosx; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx10.7; }; name = Default; }; Modified: trunk/FuseImporter/config.h =================================================================== --- trunk/FuseImporter/config.h 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/FuseImporter/config.h 2013-04-20 11:35:58 UTC (rev 741) @@ -83,7 +83,7 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.0.0.1a" +#define VERSION "1.1.0" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ Modified: trunk/FuseImporter/libspectrum.h =================================================================== --- trunk/FuseImporter/libspectrum.h 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/FuseImporter/libspectrum.h 2013-04-20 11:35:58 UTC (rev 741) @@ -1,7 +1,7 @@ /* libspectrum.h: the library for dealing with ZX Spectrum emulator files Copyright (c) 2001-2007 Philip Kendall, Darren Salt, Fredrick Meunier - $Id: libspectrum.h.in 4695 2012-05-07 02:03:10Z fredm $ + $Id: libspectrum.h.in 4836 2012-12-31 15:40:10Z zubzero $ 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 @@ -40,10 +40,19 @@ #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN /* Exclude rarely used stuff from Windows - headers */ +/* Exclude rarely used stuff from Windows headers */ +#ifndef WIN32_LEAN_AND_MEAN + +#define WIN32_LEAN_AND_MEAN /**/ #include <windows.h> +#undef WIN32_LEAN_AND_MEAN +#else + +#include <windows.h> + +#endif /* #ifndef WIN32_LEAN_AND_MEAN */ + #ifdef LIBSPECTRUM_EXPORTS #define WIN32_DLL __declspec( dllexport ) #else /* #ifdef LIBSPECTRUM_EXPORTS */ @@ -221,7 +230,7 @@ WIN32_DLL gchar* g_array_free( GArray *array, gboolean free_segment ); #include <TargetConditionals.h> - + #ifdef TARGET_RT_64_BIT #define GINT_TO_POINTER(i) ((gpointer) (glong)(i)) #define GPOINTER_TO_INT(p) ((gint) (glong)(p)) @@ -273,11 +282,11 @@ /* we support files compressed with bz2 */ -#define LIBSPECTRUM_SUPPORTS_BZ2_COMPRESSION (1) +#define LIBSPECTRUM_SUPPORTS_BZ2_COMPRESSION (1) /* we support files wav files */ -#define LIBSPECTRUM_SUPPORTS_AUDIOFILE (1) +#define LIBSPECTRUM_SUPPORTS_AUDIOFILE (1) /* Initialisation */ @@ -365,7 +374,7 @@ /* Below here, present only in 0.2.2 and later */ LIBSPECTRUM_ID_HARDDISK_HDF, /* .hdf hard disk image */ - LIBSPECTRUM_ID_CARTRIDGE_IF2, /* .rom Interface II cartridge image */ + LIBSPECTRUM_ID_CARTRIDGE_IF2, /* .rom Interface 2 cartridge image */ /* Below here, present only in 0.3.0 and later */ @@ -422,7 +431,7 @@ /* Below here, present only in 0.2.2 and later */ LIBSPECTRUM_CLASS_HARDDISK, /* A hard disk image */ - LIBSPECTRUM_CLASS_CARTRIDGE_IF2, /* Interface II cartridges */ + LIBSPECTRUM_CLASS_CARTRIDGE_IF2, /* Interface 2 cartridges */ /* Below here, present only in 0.3.0 and later */ @@ -490,6 +499,8 @@ LIBSPECTRUM_MACHINE_48_NTSC, + LIBSPECTRUM_MACHINE_128E, + } libspectrum_machine; WIN32_DLL const char* libspectrum_machine_name( libspectrum_machine type ); @@ -697,6 +708,8 @@ WIN32_DLL void libspectrum_snap_set_sp( libspectrum_snap *snap, libspectrum_word sp ); WIN32_DLL libspectrum_word libspectrum_snap_pc( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_pc( libspectrum_snap *snap, libspectrum_word pc ); +WIN32_DLL libspectrum_word libspectrum_snap_memptr( libspectrum_snap *snap ); +WIN32_DLL void libspectrum_snap_set_memptr( libspectrum_snap *snap, libspectrum_word memptr ); WIN32_DLL libspectrum_byte libspectrum_snap_iff1( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_iff1( libspectrum_snap *snap, libspectrum_byte iff1 ); WIN32_DLL libspectrum_byte libspectrum_snap_iff2( libspectrum_snap *snap ); @@ -709,6 +722,8 @@ WIN32_DLL void libspectrum_snap_set_halted( libspectrum_snap *snap, int halted ); WIN32_DLL int libspectrum_snap_last_instruction_ei( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_last_instruction_ei( libspectrum_snap *snap, int last_instruction_ei ); +WIN32_DLL int libspectrum_snap_last_instruction_set_f( libspectrum_snap *snap ); +WIN32_DLL void libspectrum_snap_set_last_instruction_set_f( libspectrum_snap *snap, int last_instruction_set_f ); WIN32_DLL libspectrum_byte libspectrum_snap_out_ula( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_out_ula( libspectrum_snap *snap, libspectrum_byte out_ula ); WIN32_DLL libspectrum_byte libspectrum_snap_out_128_memoryport( libspectrum_snap *snap ); @@ -919,6 +934,8 @@ WIN32_DLL void libspectrum_snap_set_spectranet_paged( libspectrum_snap *snap, int spectranet_paged ); WIN32_DLL int libspectrum_snap_spectranet_paged_via_io( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_spectranet_paged_via_io( libspectrum_snap *snap, int spectranet_paged_via_io ); +WIN32_DLL int libspectrum_snap_spectranet_nmi_flipflop( libspectrum_snap *snap ); +WIN32_DLL void libspectrum_snap_set_spectranet_nmi_flipflop( libspectrum_snap *snap, int spectranet_nmi_flipflop ); WIN32_DLL int libspectrum_snap_spectranet_programmable_trap_active( libspectrum_snap *snap ); WIN32_DLL void libspectrum_snap_set_spectranet_programmable_trap_active( libspectrum_snap *snap, int spectranet_programmable_trap_active ); WIN32_DLL int libspectrum_snap_spectranet_programmable_trap_msb( libspectrum_snap *snap ); @@ -941,6 +958,10 @@ WIN32_DLL void libspectrum_snap_set_spectranet_flash( libspectrum_snap *snap, int idx, libspectrum_byte* spectranet_flash ); WIN32_DLL libspectrum_byte * libspectrum_snap_spectranet_ram( libspectrum_snap *snap, int idx ); WIN32_DLL void libspectrum_snap_set_spectranet_ram( libspectrum_snap *snap, int idx, libspectrum_byte* spectranet_ram ); +WIN32_DLL int libspectrum_snap_late_timings( libspectrum_snap *snap ); +WIN32_DLL void libspectrum_snap_set_late_timings( libspectrum_snap *snap, int late_timings ); +WIN32_DLL int libspectrum_snap_zx_printer_active( libspectrum_snap *snap ); +WIN32_DLL void libspectrum_snap_set_zx_printer_active( libspectrum_snap *snap, int zx_printer_active ); /* * Tape handling routines Modified: trunk/libspectrum/Info.plist =================================================================== --- trunk/libspectrum/Info.plist 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/Info.plist 2013-04-20 11:35:58 UTC (rev 741) @@ -23,6 +23,6 @@ <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>0.5.0</string> + <string>1.1.0</string> </dict> </plist> Modified: trunk/libspectrum/config.h =================================================================== --- trunk/libspectrum/config.h 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/config.h 2013-04-20 11:35:58 UTC (rev 741) @@ -86,7 +86,7 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.0.0" +#define VERSION "1.1.0" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ Index: trunk/libspectrum/libspectrum =================================================================== --- trunk/libspectrum/libspectrum 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum 2013-04-20 11:35:58 UTC (rev 741) Property changes on: trunk/libspectrum/libspectrum ___________________________________________________________________ Modified: svn:mergeinfo ## -1,5 +1,5 ## /vendor/fuse-emulator/0.10.0/libspectrum:556-557 /vendor/fuse-emulator/0.10.0-pre1/libspectrum:545-546 -/vendor/fuse-emulator/current/libspectrum:530-717 +/vendor/fuse-emulator/current/libspectrum:530-740 /vendor/fuse-emulator/fuse-1.0.0a/libspectrum:668-669 /vendor/fuse-emulator/fuse-r4617/libspectrum:686 \ No newline at end of property Modified: trunk/libspectrum/libspectrum/ChangeLog =================================================================== --- trunk/libspectrum/libspectrum/ChangeLog 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/ChangeLog 2013-04-20 11:35:58 UTC (rev 741) @@ -1,3 +1,26 @@ +201?-??-?? Philip Kendall <phi...@sh...> + + * libspectrum 1.1.0 released. + + * Support for Spectranet in snapshots (Philip Kendall). + + * Support for Cheetah SpecDrum in snapshots (Fredrick Meunier). + + * Support reading PZX files (Fredrick Meunier). + + * Support for the TZX set signal level block (Fredrick Meunier). + + * Various minor bug fixes/improvements: + * Add support for detecting POK files (Sergio Baldoví). + * Advertise support for bzip2 compressed and wav files (Sergio + Baldoví). + * Drop support for GLib version 1.x (Alberto Garcia). + * Add support for audiofile 0.3.x (Alberto Garcia). + * Load all snapshot RAM pages for machines with more than 128k + (Fredrick Meunier; thanks, ketmar). + * Support more SZX 1.5 features (Fredrick Meunier). + * Modernise autoconf support (Sergio Baldoví). + 2010-12-16 Philip Kendall <phi...@sh...> * libspectrum 1.0.0 released. @@ -310,5 +333,5 @@ * libspectrum separated from Fuse just before the 0.5.0 release of Fuse; see Fuse's ChangeLog for changes up to this point -$Id: ChangeLog 4220 2010-12-17 10:54:29Z fredm $ +$Id: ChangeLog 4801 2012-12-26 10:55:01Z fredm $ Modified: trunk/libspectrum/libspectrum/README =================================================================== --- trunk/libspectrum/libspectrum/README 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/README 2013-04-20 11:35:58 UTC (rev 741) @@ -1,4 +1,4 @@ -libspectrum 1.0.0 +libspectrum 1.1.0 ================= libspectrum is a library which is designed to make the input and @@ -11,7 +11,7 @@ * Snapshots: .z80, .szx, .sna (all read/write), .zxs, .sp., .snp and +D snapshots (read only). * Tape images: .tzx, .tap, .spc, .sta and .ltp (read/write) and - Warajevo .tap, Z80Em and CSW version 1 (read only). + .pzx, Warajevo .tap, Z80Em and CSW version 1 (read only). * Input recordings: .rzx (read/write). * Disk images: .dsk (both plain and extended), .fdi, .sad, .scl, .td0, .trd and .udi (identification only). @@ -67,6 +67,6 @@ Then, type "make" and if everything went well, "make install". Philip Kendall <phi...@sh...> -16 December 2010 +?? ??? 201? -$Id: README 4220 2010-12-17 10:54:29Z fredm $ +$Id: README 4801 2012-12-26 10:55:01Z fredm $ Modified: trunk/libspectrum/libspectrum/accessor.pl =================================================================== --- trunk/libspectrum/libspectrum/accessor.pl 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/accessor.pl 2013-04-20 11:35:58 UTC (rev 741) @@ -3,7 +3,7 @@ # accessor.pl: generate accessor functions # Copyright (c) 2003-2009 Philip Kendall -# $Id: accessor.pl 4624 2012-01-09 20:59:35Z pak21 $ +# $Id: accessor.pl 4904 2013-03-08 20:21:02Z pak21 $ # 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 @@ -67,12 +67,13 @@ libspectrum_byte a_, f_; libspectrum_word bc_, de_, hl_; libspectrum_word ix, iy; libspectrum_byte i, r; - libspectrum_word sp, pc; + libspectrum_word sp, pc, memptr; libspectrum_byte iff1, iff2, im; int halted; /* Is the Z80 currently HALTed? */ int last_instruction_ei; /* Was the last instruction an EI? */ + int last_instruction_set_f; /* Did the last instruction set Flags? */ /* Custom ROM */ int custom_rom; @@ -173,7 +174,7 @@ size_t zxcf_pages; libspectrum_byte *zxcf_ram[ SNAPSHOT_ZXCF_PAGES ]; - /* Interface II cartridge */ + /* Interface 2 cartridge */ int interface2_active; libspectrum_byte *interface2_rom[1]; @@ -221,6 +222,7 @@ int spectranet_active; int spectranet_paged; int spectranet_paged_via_io; + int spectranet_nmi_flipflop; int spectranet_programmable_trap_active; int spectranet_programmable_trap_msb; int spectranet_all_traps_disabled; @@ -232,6 +234,12 @@ libspectrum_byte *spectranet_w5100[1]; libspectrum_byte *spectranet_flash[1]; libspectrum_byte *spectranet_ram[1]; + + /* Timings emulation */ + int late_timings; + + /* Printer emulation */ + int zx_printer_active; }; /* Initialise a libspectrum_snap structure */ Modified: trunk/libspectrum/libspectrum/configure.ac =================================================================== --- trunk/libspectrum/libspectrum/configure.ac 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/configure.ac 2013-04-20 11:35:58 UTC (rev 741) @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. -dnl Copyright (c) 1999-2008 Philip Kendall +dnl Copyright (c) 1999-2012 Philip Kendall -dnl $Id: configure.ac 4778 2012-11-28 23:21:34Z sbaldovi $ +dnl $Id: configure.ac 4847 2013-01-03 09:16:15Z zubzero $ 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 @@ -22,11 +22,11 @@ dnl E-mail: phi...@sh... dnl Package version -m4_define([libspectrum_version], [1.0.0]) +m4_define([libspectrum_version], [1.1.0]) dnl Product full version m4_define([libspectrum_major_version], [1]) -m4_define([libspectrum_minor_version], [0]) +m4_define([libspectrum_minor_version], [1]) m4_define([libspectrum_micro_version], [0]) m4_define([libspectrum_nano_version], [0]) m4_define([libspectrum_full_version], @@ -35,11 +35,11 @@ [libspectrum_major_version,libspectrum_minor_version,libspectrum_micro_version,libspectrum_nano_version]) dnl Package info -m4_define([libspectrum_copyright], ["(c) 1999-2012 Philip Kendall and others"]) +m4_define([libspectrum_copyright], ["(c) 1999-2013 Philip Kendall and others"]) m4_define([libspectrum_url], [http://fuse-emulator.sourceforge.net/libspectrum.php]) m4_define([libspectrum_bugreport], - [http://sourceforge.net/tracker/?group_id=91293&atid=596648]) + [http://sourceforge.net/p/fuse-emulator/bugs/]) AC_INIT([libspectrum],[libspectrum_version],[libspectrum_bugreport], [libspectrum],[libspectrum_url]) @@ -99,6 +99,7 @@ WINDRES_OBJ="windres.o" WINDRES_LDFLAGS="-Xlinker windres.o" fi + AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Exclude rarely used stuff from Windows headers <windows.h>]) ;; esac AC_SUBST(WINDRES_OBJ) @@ -164,14 +165,14 @@ if test "$withval" = no; then glib=no; else glib=yes; fi, glib=yes) AC_MSG_RESULT($glib) -if test "$glib" = yes; then +AS_IF([test "$glib" = yes], [ PKG_CHECK_MODULES( GLIB, glib-2.0, AC_DEFINE([HAVE_LIB_GLIB], 1, [Defined if we've got glib]), glib="no" ) -fi +]) AM_CONDITIONAL(USE_MYGLIB, test "$glib" = no) @@ -201,7 +202,7 @@ if test "$withval" = no; then libaudiofile=no; else libaudiofile=yes; fi, libaudiofile=yes) AC_MSG_RESULT($libaudiofile) -if test "$libaudiofile" = yes; then +AS_IF([test "$libaudiofile" = yes], [ PKG_CHECK_MODULES( AUDIOFILE, audiofile, @@ -214,7 +215,7 @@ AC_DEFINE([HAVE_LIB_AUDIOFILE], 1, [Defined if we've got audiofile]) ) fi -fi +]) AC_CONFIG_FILES([ Makefile Modified: trunk/libspectrum/libspectrum/csw.c =================================================================== --- trunk/libspectrum/libspectrum/csw.c 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/csw.c 2013-04-20 11:35:58 UTC (rev 741) @@ -2,7 +2,7 @@ Copyright (c) 2002-2007 Darren Salt, Fredrick Meunier Based on tap.c, copyright (c) 2001 Philip Kendall - $Id: csw.c 4653 2012-02-03 11:48:30Z fredm $ + $Id: csw.c 4780 2012-11-29 19:09:52Z sbaldovi $ 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 @@ -39,7 +39,6 @@ { libspectrum_tape_block *block = NULL; libspectrum_tape_rle_pulse_block *csw_block; - libspectrum_error error; int compressed; @@ -112,6 +111,8 @@ if( compressed ) { /* Compressed data... */ #ifdef HAVE_ZLIB_H + libspectrum_error error; + csw_block->data = NULL; csw_block->length = 0; error = libspectrum_zlib_inflate( buffer, length, &csw_block->data, Modified: trunk/libspectrum/libspectrum/doc/libspectrum.3 =================================================================== --- trunk/libspectrum/libspectrum/doc/libspectrum.3 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/doc/libspectrum.3 2013-04-20 11:35:58 UTC (rev 741) @@ -27,7 +27,7 @@ .\"------------------------------------------------------------------ .\" .SH NAME -libspectrum \- Sinclair ZX Spectrum support library +libspectrum \(em Sinclair ZX Spectrum support library .\" .\"------------------------------------------------------------------ .\" Modified: trunk/libspectrum/libspectrum/doc/libspectrum.txt =================================================================== --- trunk/libspectrum/libspectrum/doc/libspectrum.txt 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/doc/libspectrum.txt 2013-04-20 11:35:58 UTC (rev 741) @@ -8,7 +8,7 @@ * Snapshots: .z80, .szx, .sna (all read/write), .zxs, .sp., .snp and +D snapshots (read only). * Tape images: .tzx, .tap, .spc, .sta and .ltp (read/write) and - Warajevo .tap, Z80Em and CSW version 1 (read only). + .pzx, Warajevo .tap, Z80Em and CSW version 1 (read only). * Input recordings: .rzx (read/write). * Disk images: .dsk (both plain and extended), .fdi, .sad, .scl, .td0, .trd and .udi (identification only). @@ -43,6 +43,9 @@ the library does not support zlib compression, then the constant will not be defined. +Bzip2 compression is similarly covered by LIBSPECTRUM_SUPPORTS_BZ2_COMPRESSION +and WAV file support is covered by LIBSPECTRUM_SUPPORTS_AUDIOFILE. + Defined types ============= @@ -168,6 +171,7 @@ LIBSPECTRUM_MACHINE_48 48K Spectrum LIBSPECTRUM_MACHINE_48_NTSC NTSC version of 48K Spectrum LIBSPECTRUM_MACHINE_128 (Original) 128K Spectrum +LIBSPECTRUM_MACHINE_128E Spectrum 128Ke LIBSPECTRUM_MACHINE_PLUS2 Spectrum +2 (the grey one) LIBSPECTRUM_MACHINE_PLUS2A Spectrum +2A (the black one) LIBSPECTRUM_MACHINE_PLUS3 Spectrum +3 @@ -273,7 +277,7 @@ LIBSPECTRUM_ID_UNKNOWN Couldn't identify this file LIBSPECTRUM_ID_CARTRIDGE_DCK A .dck Timex dock image -LIBSPECTRUM_ID_CARTRIDGE_IF2 A .rom Interface II cartridge +LIBSPECTRUM_ID_CARTRIDGE_IF2 A .rom Interface 2 cartridge LIBSPECTRUM_ID_COMPRESSED_BZ2 A bzip2 compressed file LIBSPECTRUM_ID_COMPRESSED_GZ A gzip compressed file @@ -346,7 +350,7 @@ LIBSPECTRUM_CLASS_UNKNOWN An unknown file type LIBSPECTRUM_CLASS_CARTRIDGE_TIMEX A Timex dock cartridge -LIBSPECTRUM_CLASS_CARTRIDGE_IF2 An Interface II cartridge +LIBSPECTRUM_CLASS_CARTRIDGE_IF2 An Interface 2 cartridge LIBSPECTRUM_CLASS_DISK_GENERIC A generic disk image LIBSPECTRUM_CLASS_DISK_PLUSD An MGT/+D disk image LIBSPECTRUM_CLASS_DISK_PLUS3 A +3 disk image @@ -552,6 +556,7 @@ * libspectrum_byte r * libspectrum_word sp * libspectrum_word pc +* libspectrum_word memptr * libspectrum_byte iff1 * libspectrum_byte iff2 * libspectrum_byte im @@ -560,6 +565,7 @@ * int halted * int last_instruction_ei +* int last_instruction_set_f * libspectrum_byte out_ula @@ -682,6 +688,25 @@ * int specdrum_active * libspectrum_signed_byte specdrum_dac +* int spectranet_active +* int spectranet_paged +* int spectranet_paged_via_io +* int spectranet_programmable_trap_active +* int spectranet_programmable_trap_msb +* int spectranet_all_traps_disabled +* int spectranet_rst8_trap_disabled +* int spectranet_deny_downstream_a15 +* int spectranet_page_a +* int spectranet_page_b +* libspectrum_word spectranet_programmable_trap +* libspectrum_byte* spectranet_w5100[1] +* libspectrum_byte* spectranet_flash[1] +* libspectrum_byte* spectranet_ram[1] + +* int late_timings + +* int zx_printer_enabled + Most of those should be fairly self-explanatory; those which may not be are: @@ -696,9 +721,19 @@ previously executed was an EI and thus interrupts should not be accepted at this point, but will be after the next opcode. +* `last_instruction_set_f' being non-zero signals that the opcode + previously executed affected the F register. + * `out_plus3_memoryport' should also be used to save the state of the Scorpion's secondary memory control port (0x1ffd). +* `late_timings' being non-zero signals that the emulated Spectrum + should use timings 1 t-state later than usual as in some machines + that have warmed up. + +* `zx_printer_enabled' being non-zero signals that the emulated Spectrum + has a ZX Printer connected. + * The `beta_*' functions represent the Betadisk interface. `beta_paged' is non-zero if the Betadisk ROM is currently paged in between 0x0000 and 0x3fff and `beta_direction' is non-zero @@ -715,6 +750,8 @@ * `exrom_ram' and `dock_ram' are non-zero if the corresponding 8K page of the Timex EXROM or DOCK are writable. +* The `spectranet_*' functions represent the Spectranet interface. + * `joystick_active_count' is the number of joysticks connected to the emulated Spectrum. `joystick_list' gives the type of the joysticks and `joystick_inputs' gives the corresponding connections to the real machines @@ -1789,4 +1826,4 @@ Write `data' to register `reg' of the IDE channel `chn'. -$Id: libspectrum.txt 4433 2011-05-14 05:44:47Z fredm $ +$Id: libspectrum.txt 4860 2013-01-26 11:33:25Z fredm $ Modified: trunk/libspectrum/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/libspectrum/hacking/ChangeLog 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/hacking/ChangeLog 2013-04-20 11:35:58 UTC (rev 741) @@ -905,3 +905,40 @@ 20121129 configure.ac: don't check for windres when not building for Windows hosts. Remove --without-windres option, previously used as a workaround (Sergio). +20121129 csw.c,rzx.c,szx.c: remove unused variables when not linking against + external libraries (Sergio). +20121202 configure.ac: fix the macro expansion of PKG_CHECK_MODULES when using + both --without-glib and --with-libaudiofile options (Sergio). +20121208 configure.ac,libspectrum.h.in: preliminary support for 64-bits binaries + for Windows (patch #3591613) (Sergio). +20121208 README: document support for reading PZX files (Sergio). +20121222 szx.c: split SNET block into SNET, SNEF and SNER so that flash could + theoretically be saved separately (patch #3596469) (Fred). +20121225 accessor.pl,libspectrum.h.in,sna.c,snap_accessors.txt,snapshot.c,szx.c, + z80.c: extend SZX support to version 1.5 draft specs (Fred). +20121226 accessor.pl,snap_accessors.txt,snapshot.c,szx.c: MEMPTR is also in v1.4 + SZX files (Fred). +20121226 make-perl.c: fix typo in comment (Fred). +20121226 szx.c: inline constant in write_snet_chunk() (Fred). +20121226 doc/libspectrum.txt: add some text about changes to the interface + (Fred). +20121226 configure.ac: bump version number to 1.1.0 (Fred). +20121226 doc/libspectrum.txt: tweak PZX text (Fred). +20121226 ChangeLog,README: first updates for a "1.1.0" release (Fred). +20121227 libspectrum.c: set name for Spectrum 128Ke machine type (Sergio). +20121229 doc/libspectrum.1: use an em dash (Stuart). +20121230 timings.c: add timings for 128Ke, copied from those for 128K (Stuart). +20121231 timings.c: 128Ke timings are intended to be based on +2A (Fred). +20121231 libspectrum.c: add 128Ke capabilities as long as it is in the library + (Fred). +20121231 accessor.pl,doc/libspectrum.txt,libspectrum.h.in,sna.c,z80.c: rename + 'Interface II' to 'Interface 2' in comments and documentation (Stuart). +20130103 configure.ac: make some URLs point to the new sourceforge forge and + update copyright date to 2013 (Sergio). +20130103 configure.ac: add trailing slash to URL of bug tracker (Stuart). +20130126 accessor.pl,doc/libspectrum.txt,snap_accessors.txt,snapshot.c,szx.c: + add support for storing ZX Printer state (bug #274) (Fred). +20130130 timings.c: correct video timing for +2A/+3 etc machines (part of + patch #305). +20130307 accessor.pl,snap_accessors.txt,szx.c: implement Spectranet's "suppress + NMI" flipflop (bug #259). Modified: trunk/libspectrum/libspectrum/libspectrum.c =================================================================== --- trunk/libspectrum/libspectrum/libspectrum.c 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/libspectrum.c 2013-04-20 11:35:58 UTC (rev 741) @@ -1,7 +1,7 @@ /* libspectrum.c: Some general routines Copyright (c) 2001-2009 Philip Kendall, Darren Salt, Fredrick Meunier - $Id: libspectrum.c 4759 2012-11-07 12:01:50Z fredm $ + $Id: libspectrum.c 4830 2012-12-30 21:37:36Z 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 @@ -237,6 +237,7 @@ case LIBSPECTRUM_MACHINE_TC2068: return "Timex TC2068"; case LIBSPECTRUM_MACHINE_TS2068: return "Timex TS2068"; case LIBSPECTRUM_MACHINE_128: return "Spectrum 128K"; + case LIBSPECTRUM_MACHINE_128E: return "Spectrum 128Ke"; case LIBSPECTRUM_MACHINE_PLUS2: return "Spectrum +2"; case LIBSPECTRUM_MACHINE_PENT: return "Pentagon 128K"; case LIBSPECTRUM_MACHINE_PENT512: return "Pentagon 512K"; @@ -296,7 +297,7 @@ switch( type ) { case LIBSPECTRUM_MACHINE_128: case LIBSPECTRUM_MACHINE_PLUS2: case LIBSPECTRUM_MACHINE_PLUS2A: case LIBSPECTRUM_MACHINE_PLUS3: - case LIBSPECTRUM_MACHINE_PLUS3E: + case LIBSPECTRUM_MACHINE_PLUS3E: case LIBSPECTRUM_MACHINE_128E: case LIBSPECTRUM_MACHINE_TC2068: case LIBSPECTRUM_MACHINE_TS2068: case LIBSPECTRUM_MACHINE_PENT: case LIBSPECTRUM_MACHINE_PENT512: case LIBSPECTRUM_MACHINE_PENT1024: @@ -311,7 +312,7 @@ switch( type ) { case LIBSPECTRUM_MACHINE_128: case LIBSPECTRUM_MACHINE_PLUS2: case LIBSPECTRUM_MACHINE_PLUS2A: case LIBSPECTRUM_MACHINE_PLUS3: - case LIBSPECTRUM_MACHINE_PLUS3E: + case LIBSPECTRUM_MACHINE_PLUS3E: case LIBSPECTRUM_MACHINE_128E: case LIBSPECTRUM_MACHINE_PENT: case LIBSPECTRUM_MACHINE_PENT512: case LIBSPECTRUM_MACHINE_PENT1024: case LIBSPECTRUM_MACHINE_SCORP: @@ -325,7 +326,7 @@ /* +3 Spectrum-style 0x1ffd memory paging */ switch( type ) { case LIBSPECTRUM_MACHINE_PLUS2A: case LIBSPECTRUM_MACHINE_PLUS3: - case LIBSPECTRUM_MACHINE_PLUS3E: + case LIBSPECTRUM_MACHINE_PLUS3E: case LIBSPECTRUM_MACHINE_128E: capabilities |= LIBSPECTRUM_MACHINE_CAPABILITY_PLUS3_MEMORY; break; default: break; @@ -379,6 +380,7 @@ switch( type ) { case LIBSPECTRUM_MACHINE_PLUS2: case LIBSPECTRUM_MACHINE_PLUS2A: case LIBSPECTRUM_MACHINE_PLUS3: case LIBSPECTRUM_MACHINE_PLUS3E: + case LIBSPECTRUM_MACHINE_128E: capabilities |= LIBSPECTRUM_MACHINE_CAPABILITY_SINCLAIR_JOYSTICK; break; default: break; Modified: trunk/libspectrum/libspectrum/libspectrum.h.in =================================================================== --- trunk/libspectrum/libspectrum/libspectrum.h.in 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/libspectrum.h.in 2013-04-20 11:35:58 UTC (rev 741) @@ -1,7 +1,7 @@ /* libspectrum.h: the library for dealing with ZX Spectrum emulator files Copyright (c) 2001-2007 Philip Kendall, Darren Salt, Fredrick Meunier - $Id: libspectrum.h.in 4695 2012-05-07 02:03:10Z fredm $ + $Id: libspectrum.h.in 4836 2012-12-31 15:40:10Z zubzero $ 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 @@ -40,10 +40,19 @@ #ifdef _WIN32 -#define WIN32_LEAN_AND_MEAN /* Exclude rarely used stuff from Windows - headers */ +/* Exclude rarely used stuff from Windows headers */ +#ifndef WIN32_LEAN_AND_MEAN + +#define WIN32_LEAN_AND_MEAN /**/ #include <windows.h> +#undef WIN32_LEAN_AND_MEAN +#else + +#include <windows.h> + +#endif /* #ifndef WIN32_LEAN_AND_MEAN */ + #ifdef LIBSPECTRUM_EXPORTS #define WIN32_DLL __declspec( dllexport ) #else /* #ifdef LIBSPECTRUM_EXPORTS */ @@ -182,7 +191,7 @@ /* Below here, present only in 0.2.2 and later */ LIBSPECTRUM_ID_HARDDISK_HDF, /* .hdf hard disk image */ - LIBSPECTRUM_ID_CARTRIDGE_IF2, /* .rom Interface II cartridge image */ + LIBSPECTRUM_ID_CARTRIDGE_IF2, /* .rom Interface 2 cartridge image */ /* Below here, present only in 0.3.0 and later */ @@ -239,7 +248,7 @@ /* Below here, present only in 0.2.2 and later */ LIBSPECTRUM_CLASS_HARDDISK, /* A hard disk image */ - LIBSPECTRUM_CLASS_CARTRIDGE_IF2, /* Interface II cartridges */ + LIBSPECTRUM_CLASS_CARTRIDGE_IF2, /* Interface 2 cartridges */ /* Below here, present only in 0.3.0 and later */ @@ -307,6 +316,8 @@ LIBSPECTRUM_MACHINE_48_NTSC, + LIBSPECTRUM_MACHINE_128E, + } libspectrum_machine; WIN32_DLL const char* libspectrum_machine_name( libspectrum_machine type ); Modified: trunk/libspectrum/libspectrum/make-perl.c =================================================================== --- trunk/libspectrum/libspectrum/make-perl.c 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/make-perl.c 2013-04-20 11:35:58 UTC (rev 741) @@ -1,7 +1,7 @@ /* make-perl.c: Generate a perl script to create the libspectrum_* typedefs Copyright (c) 2002-2003 Philip Kendall, Darren Salt - $Id: make-perl.c 4695 2012-05-07 02:03:10Z fredm $ + $Id: make-perl.c 4796 2012-12-26 10:36:57Z 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 @@ -336,7 +336,7 @@ #endif /* #ifdef HAVE_LIBBZ2 */ #ifdef HAVE_LIB_AUDIOFILE - printf( "\n/* we support files wav files */\n" ); + printf( "\n/* we support wav files */\n" ); printf( "#define LIBSPECTRUM_SUPPORTS_AUDIOFILE (1)\n\n" ); #endif /* #ifdef HAVE_LIB_AUDIOFILE */ Modified: trunk/libspectrum/libspectrum/rzx.c =================================================================== --- trunk/libspectrum/libspectrum/rzx.c 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/rzx.c 2013-04-20 11:35:58 UTC (rev 741) @@ -1,7 +1,7 @@ /* rzx.c: routines for dealing with .rzx files Copyright (c) 2002-2008 Philip Kendall - $Id: rzx.c 4548 2011-11-06 21:44:48Z pak21 $ + $Id: rzx.c 4780 2012-11-29 19:09:52Z sbaldovi $ 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 @@ -194,7 +194,9 @@ { size_t i; input_block_t *input; +#ifdef HAVE_GCRYPT_H signature_block_t *signature; +#endif /* #ifdef HAVE_GCRYPT_H */ switch( block->type ) { @@ -216,9 +218,8 @@ return LIBSPECTRUM_ERROR_NONE; case LIBSPECTRUM_RZX_SIGN_END_BLOCK: +#ifdef HAVE_GCRYPT_H signature = &( block->types.signature ); - -#ifdef HAVE_GCRYPT_H gcry_mpi_release( signature->r ); gcry_mpi_release( signature->s ); #endif /* #ifdef HAVE_GCRYPT_H */ @@ -1448,7 +1449,6 @@ rzx_write_input( input_block_t *block, libspectrum_byte **buffer, libspectrum_byte **ptr, size_t *length, int compress ) { - libspectrum_error error; size_t i, size; size_t length_offset, data_offset, flags_offset; libspectrum_byte *length_ptr; @@ -1512,6 +1512,7 @@ /* Compress the data the simple way. Really, we should stream the data */ libspectrum_byte *gzsnap = NULL; size_t gzlength; libspectrum_byte *data_ptr = *buffer + data_offset; + libspectrum_error error; error = libspectrum_zlib_compress( data_ptr, *ptr - data_ptr, &gzsnap, &gzlength ); Modified: trunk/libspectrum/libspectrum/sna.c =================================================================== --- trunk/libspectrum/libspectrum/sna.c 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/sna.c 2013-04-20 11:35:58 UTC (rev 741) @@ -1,7 +1,7 @@ /* sna.c: Routines for handling .sna snapshots Copyright (c) 2001-2002 Philip Kendall - $Id: sna.c 4285 2011-01-31 10:47:01Z fredm $ + $Id: sna.c 4836 2012-12-31 15:40:10Z zubzero $ 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 @@ -310,7 +310,7 @@ if( libspectrum_snap_divide_active( snap ) ) *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; - /* We don't save the Interface II ROM at all */ + /* We don't save the Interface 2 ROM at all */ if( libspectrum_snap_interface2_active( snap ) ) *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; @@ -331,6 +331,10 @@ if( libspectrum_snap_specdrum_active( snap ) ) *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + /* We don't save the Spectranet state at all */ + if( libspectrum_snap_spectranet_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + ptr = *buffer; write_header( buffer, &ptr, length, snap ); @@ -349,6 +353,7 @@ break; case LIBSPECTRUM_MACHINE_128: + case LIBSPECTRUM_MACHINE_128E: case LIBSPECTRUM_MACHINE_PENT512: case LIBSPECTRUM_MACHINE_PENT1024: case LIBSPECTRUM_MACHINE_PLUS2: Modified: trunk/libspectrum/libspectrum/snap_accessors.txt =================================================================== --- trunk/libspectrum/libspectrum/snap_accessors.txt 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/snap_accessors.txt 2013-04-20 11:35:58 UTC (rev 741) @@ -1,7 +1,7 @@ # snap_accessors.txt: simple accessors for libspectrum_snap # Copyright (c) 2003-2009 Philip Kendall -# $Id: snap_accessors.txt 4624 2012-01-09 20:59:35Z pak21 $ +# $Id: snap_accessors.txt 4904 2013-03-08 20:21:02Z pak21 $ # 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 @@ -39,6 +39,7 @@ libspectrum_byte r libspectrum_word sp libspectrum_word pc +libspectrum_word memptr libspectrum_byte iff1 libspectrum_byte iff2 libspectrum_byte im @@ -47,6 +48,7 @@ int halted int last_instruction_ei +int last_instruction_set_f libspectrum_byte out_ula @@ -176,6 +178,7 @@ int spectranet_active int spectranet_paged int spectranet_paged_via_io +int spectranet_nmi_flipflop int spectranet_programmable_trap_active int spectranet_programmable_trap_msb int spectranet_all_traps_disabled @@ -187,3 +190,7 @@ libspectrum_byte* spectranet_w5100 1 libspectrum_byte* spectranet_flash 1 libspectrum_byte* spectranet_ram 1 + +int late_timings + +int zx_printer_active Modified: trunk/libspectrum/libspectrum/snapshot.c =================================================================== --- trunk/libspectrum/libspectrum/snapshot.c 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/snapshot.c 2013-04-20 11:35:58 UTC (rev 741) @@ -1,7 +1,7 @@ /* snapshot.c: Snapshot handling routines Copyright (c) 2001-2009 Philip Kendall, Darren Salt - $Id: snapshot.c 4624 2012-01-09 20:59:35Z pak21 $ + $Id: snapshot.c 4860 2013-01-26 11:33:25Z 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 @@ -64,6 +64,7 @@ libspectrum_snap_set_r ( snap, 0x00 ); libspectrum_snap_set_sp ( snap, 0x0000 ); libspectrum_snap_set_pc ( snap, 0x0000 ); + libspectrum_snap_set_memptr( snap, 0x0000 ); libspectrum_snap_set_iff1( snap, 1 ); libspectrum_snap_set_iff2( snap, 1 ); @@ -71,6 +72,7 @@ libspectrum_snap_set_halted( snap, 0 ); libspectrum_snap_set_last_instruction_ei( snap, 0 ); + libspectrum_snap_set_last_instruction_set_f( snap, 0 ); libspectrum_snap_set_custom_rom( snap, 0 ); libspectrum_snap_set_custom_rom_pages( snap, 0 ); @@ -217,6 +219,10 @@ libspectrum_snap_set_spectranet_flash( snap, 0, NULL ); libspectrum_snap_set_spectranet_ram( snap, 0, NULL ); + libspectrum_snap_set_late_timings( snap, 0 ); + + libspectrum_snap_set_zx_printer_active( snap, 0 ); + return snap; } Modified: trunk/libspectrum/libspectrum/szx.c =================================================================== --- trunk/libspectrum/libspectrum/szx.c 2013-04-20 07:02:15 UTC (rev 740) +++ trunk/libspectrum/libspectrum/szx.c 2013-04-20 11:35:58 UTC (rev 741) @@ -1,7 +1,7 @@ /* szx.c: Routines for .szx snapshots Copyright (c) 1998-2012 Philip Kendall, Fredrick Meunier, Stuart Brady - $Id: szx.c 4758 2012-11-07 11:58:26Z fredm $ + $Id: szx.c 4904 2013-03-08 20:21:02Z pak21 $ 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 @@ -57,12 +57,15 @@ SZX_MACHINE_PENTAGON512, SZX_MACHINE_PENTAGON1024, SZX_MACHINE_48_NTSC, + SZX_MACHINE_128KE, } szx_machine_type; static const char *signature = "ZXST"; static const size_t signature_length = 4; +static const libspectrum_byte ZXSTMF_ALTERNATETIMINGS = 1; + static const char *libspectrum_string = "libspectrum: "; static const libspectrum_byte SZX_VERSION_MAJOR = 1; @@ -75,6 +78,7 @@ #define ZXSTBID_Z80REGS "Z80R" static const libspectrum_byte ZXSTZF_EILAST = 1; static const libspectrum_byte ZXSTZF_HALTED = 2; +static const libspectrum_byte ZXSTZF_FSET = 4; #define ZXSTBID_SPECREGS "SPCR" @@ -124,6 +128,7 @@ #define ZXSTBID_ROM "ROM\0" #define ZXSTBID_ZXPRINTER "ZXPR" +static const libspectrum_word ZXSTPRF_ENABLED = 1; #define ZXSTBID_IF1 "IF1\0" static const libspectrum_word ZXSTIF1F_ENABLED = 1; @@ -133,6 +138,12 @@ #define ZXSTBID_MICRODRIVE "MDRV" #define ZXSTBID_PLUS3DISK "+3\0\0" #define ZXSTBID_DSKFILE "DSK\0" +#define ZXSTBID_LEC "LEC\0" +static const libspectrum_word ZXSTLECF_PAGED = 1; + +#define ZXSTBID_LECRAMPAGE "LCRP" +static const libspectrum_word ZXSTLCRPF_COMPRESSED = 1; + #define ZXSTBID_TIMEXREGS "SCLD" #define ZXSTBID_BETA128 "B128" @@ -199,9 +210,14 @@ static const libspectrum_word ZXSTSNET_ALL_DISABLED = 16; static const libspectrum_word ZXSTSNET_RST8_DISABLED = 32; static const libspectrum_word ZXSTSNET_DENY_DOWNSTREAM_A15 = 64; -static const libspectrum_word ZXSTSNET_FLASH_COMPRESSED = 128; -static const libspectrum_word ZXSTSNET_RAM_COMPRESSED = 256; +static const libspectrum_word ZXSTSNET_NMI_FLIPFLOP = 128; +#define ZXSTBID_SPECTRANETFLASHPAGE "SNEF" +static const libspectrum_byte ZXSTSNEF_FLASH_COMPRESSED = 1; + +#define ZXSTBID_SPECTRANETRAMPAGE "SNER" +static const libspectrum_byte ZXSTSNER_RAM_COMPRESSED = 1; + static libspectrum_error read_chunk( libspectrum_snap *snap, libspectrum_word version, const libspectrum_byte **buffer, const libspectrum_byte *end, @@ -292,6 +308,12 @@ static libspectrum_error write_snet_chunk( libspectrum_byte **buffer, libspectrum_byte **ptr, size_t *length, libspectrum_snap *snap, int compress ); +static libspectrum_error +write_snef_chunk( libspectrum_byte **buffer, libspectrum_byte **ptr, + size_t *length, libspectrum_snap *snap, int compress ); +static libspectrum_error +write_sner_chunk( libspectrum_byte **buffer, libspectrum_byte **ptr, + size_t *length, libspectrum_snap *snap, int compress ); #ifdef HAVE_ZLIB_H @@ -313,6 +335,9 @@ write_dirp_chunk( libspectrum_byte **buffer, libspectrum_byte **ptr, size_t *length, libspectrum_snap *snap, int page, int compress ); +static libspectrum_error +write_zxpr_chunk( libspectrum_byte **buffer, libspectrum_byte **ptr, + size_t *length, int *out_flags, libspectrum_snap *snap ); static void write_chunk_header( libspectrum_byte **buffer, libspectrum_byte **ptr, @@ -1360,14 +1385,20 @@ libspectrum_snap_set_tstates( snap, libspectrum_read_dword( buffer ) ); if( version >= 0x0101 ) { - (*buffer)++; /* Skip dwHoldIntReqCycles */ + (*buffer)++; /* Skip chHoldIntReqCycles */ - /* Flags; ignore the 'last instruction EI' flag for now */ + /* Flags */ + libspectrum_snap_set_last_instruction_ei( snap, **buffer & ZXSTZF_EILAST ); libspectrum_snap_set_halted( snap, **buffer & ZXSTZF_HALTED ); + libspectrum_snap_set_last_instruction_set_f( snap, **buffer & ZXSTZF_FSET ); (*buffer)++; - (*buffer)++; /* Skip the hidden register */ - (*buffer)++; /* Skip the reserved byte */ + if( version >= 0x0104 ) { + libspectrum_snap_set_memptr( snap, libspectrum_read_word( buffer ) ); + } else { + (*buffer)++; /* Skip the hidden register */ + (*buffer)++; /* Skip the reserved byte */ + } } else { *buffer += 4; /* Skip the reserved dword */ @@ -1704,6 +1735,27 @@ } static libspectrum_error +read_zxpr_chunk( libspectrum_snap *snap, libspectrum_word version, + const libspectrum_byte **buffer, + const libspectrum_byte *end GCC_UNUSED, size_t data_length, + szx_context *ctx GCC_UNUSED ) +{ + libspectrum_word flags; + + if( data_length != 2 ) { + libspectrum_print_error( LIBSPECTRUM_ERROR_UNKNOWN, + "%s:read_zxpr_chunk: unknown length %lu", + __FILE__, (unsigned long)data_length ); + return LIBSPECTRUM_ERROR_UNKNOWN; + } + + flags = libspectrum_read_word( buffer ); + libspectrum_snap_set_zx_printer_active( snap, flags & ZXSTPRF_ENABLED ); + + return LIBSPECTRUM_ERROR_NONE; +} + +static libspectrum_error read_if2r_chunk( libspectrum_snap *snap, libspectrum_word version GCC_UNUSED, const libspectrum_byte **buffer, const libspectrum_byte *end GCC_UNUSED, size_t data_length, @@ -1914,9 +1966,8 @@ int compressed, size_t *data_remaining, void (*setter)(libspectrum_snap*, int, libspectrum_byte*) ) { - size_t data_length, uncompressed_length = 0; - libspectrum_error error; - libspectrum_byte *data_out, *uncompressed_data; + size_t data_length; + libspectrum_byte *data_out; const libspectrum_byte *data; if( *data_remaining < 4 ) { @@ -1938,6 +1989,9 @@ if( compressed ) { #ifdef HAVE_ZLIB_H + libspectrum_error error; + size_t uncompressed_length = 0; + libspectrum_byte *uncompressed_data; error = libspectrum_zlib_inflate( *buffer, data_length, &uncompressed_data, &uncompressed_length ); @@ -1989,12 +2043,9 @@ szx_context *ctx GCC_UNUSED ) { libspectrum_word flags; - int flash_compressed, ram_compressed; - libspectrum_error error; libspectrum_byte *w5100; - size_t data_remaining; - if( data_length < 62 ) { + if( data_length < 54 ) { libspectrum_print_error( LIBSPECTRUM_ERROR_UNKNOWN, "read_snet_chunk: length %lu too short", (unsigned long)data_length @@ -2014,8 +2065,7 @@ libspectrum_snap_set_spectranet_all_traps_disabled( snap, flags & ZXSTSNET_ALL_DISABLED ); libspectrum_snap_set_spectranet_rst8_trap_disabled( snap, flags & ZXSTSNET_RST8_DISABLED ); libspectrum_snap_set_spectranet_deny_downstream_a15( snap, flags & ZXSTSNET_DENY_DOWNSTREAM_A15 ); - flash_compressed = flags & ZXSTSNET_FLASH_COMPRESSED; - ram_compressed = flags & ZXSTSNET_RAM_COMPRESSED; + libspectrum_snap_set_spectranet_nmi_flipflop( snap, flags & ZXSTSNET_NMI_FLIPFLOP ); libspectrum_snap_set_spectranet_page_a( snap, **buffer ); (*buffer)++; libspectrum_snap_set_spectranet_page_b( snap, **buffer ); (*buffer)++; @@ -2028,13 +2078,65 @@ memcpy( w5100, *buffer, 0x30 ); (*buffer) += 0x30; - data_remaining = data_length - 54; + return LIBSPECTRUM_ERROR_NONE; +} +static libspectrum_error +read_snef_chunk( libspectrum_snap *snap, libspectrum_word version GCC_UNUSED, + const libspectrum_byte **buffer, + const libspectrum_byte *end GCC_UNUSED, size_t data_length, + szx_context *ctx GCC_UNUSED ) +{ + libspectrum_byte flags; + int flash_compressed; + libspectrum_error error; + size_t data_remaining; + + if( data_length < 5 ) { + libspectrum_print_error( + LIBSPECTRUM_ERROR_UNKNOWN, + "read_snef_chunk: length %lu too short", (unsigned long)data_length + ); + return LIBSPECTRUM_ERROR_UNKNOWN; + } + + flags = **buffer; (*buffer)++; + flash_compressed = flags & ZXSTSNEF_FLASH_COMPRESSED; + + data_remaining = data_length - 1; + error = read_snet_memory( snap, buffer, flash_compressed, &data_remaining, libspectrum_snap_set_spectranet_flash ); if( error ) return error; + return LIBSPECTRUM_ERROR_NONE; +} + +static libspectrum_error +read_sner_chunk( libspectrum_snap *snap, libspectrum_word version GCC_UNUSED, + const libspectrum_byte **buffer, + const libspectrum_byte *end GCC_UNUSED, size_t data_length, + szx_context *ctx GCC_UNUSED ) +{ + libspectrum_byte flags; + int ram_compressed; + libspectrum_error error; + size_t data_remaining; + + if( data_length < 5 ) { + libspectrum_print_error( + LIBSPECTRUM_ERROR_UNKNOWN, + "read_sner_chunk: length %lu too short", (unsigned long)data_length + ); + return LIBSPECTRUM_ERROR_UNKNOWN; + } + + flags = **buffer; (*buffer)++; + ram_compressed = flags & ZXSTSNER_RAM_COMPRESSED; + + data_remaining = data_length - 1; + error = read_snet_memory( snap, buffer, ram_compressed, &data_remaining, libspectrum_snap_set_spectranet_ram ); if( error ) @@ -2064,44 +2166,48 @@ static struct read_chunk_t read_chunks[] = { - { ZXSTBID_AY, read_ay_chunk }, - { ZXSTBID_BETA128, read_b128_chunk }, - { ZXSTBID_BETADISK, skip_chunk }, - { ZXSTBID_COVOX, skip_chunk }, - { ZXSTBID_CREATOR, read_crtr_chunk }, - { ZXSTBID_DIVIDE, read_dide_chunk }, - { ZXSTBID_DIVIDERAMPAGE, read_dirp_chunk }, - { ZXSTBID_DOCK, read_dock_chunk }, - { ZXSTBID_DSKFILE, skip_chunk }, - { ZXSTBID_GS, skip_chunk }, - { ZXSTBID_GSRAMPAGE, skip_chunk }, - { ZXSTBID_IF1, read_if1_chunk }, - { ZXSTBID_IF2ROM, read_if2r_chunk }, - { ZXSTBID_JOYSTICK, read_joy_chunk }, - { ZXSTBID_KEYBOARD, read_keyb_chunk }, - { ZXSTBID_MICRODRIVE, skip_chunk }, - { ZXSTBID_MOUSE, read_amxm_chunk }, - { ZXSTBID_MULTIFACE, skip_chunk }, - { ZXSTBID_OPUS, read_opus_chunk }, - { ZXSTBID_OPUSDISK, skip_chunk }, - { ZXSTBID_PLUS3DISK, skip_chunk }, - { ZXSTBID_PLUSD, read_plsd_chunk }, - { ZXSTBID_PLUSDDISK, skip_chunk }, - { ZXSTBID_RAMPAGE, read_ramp_chunk }, - { ZXSTBID_ROM, read_rom_chunk }, - { ZXSTBID_SIMPLEIDE, read_side_chunk }, - { ZXSTBID_SPECDRUM, read_drum_chunk }, - { ZXSTBID_SPECREGS, read_spcr_chunk }, - { ZXSTBID_SPECTRANET, read_snet_chunk }, - { ZXSTBID_TIMEXREGS, read_scld_chunk }, - { ZXSTBID_USPEECH, skip_chunk }, - { ZXSTBID_Z80REGS, read_z80r_chunk }, - { ZXSTBID_ZXATASPRAMPAGE, read_atrp_chunk }, - { ZXSTBID_ZXATASP, read_zxat_chunk }, - { ZXSTBID_ZXCF, read_zxcf_chunk }, - { ZXSTBID_ZXCFRAMPAGE, read_cfrp_chunk }, - { ZXSTBID_ZXPRINTER, skip_chunk }, - { ZXSTBID_ZXTAPE, skip_chunk }, + { ZXSTBID_AY, read_ay_chunk }, + { ZXSTBID_BETA128, read_b128_chunk }, + { ZXSTBID_BETADISK, skip_chunk }, + { ZXSTBID_COVOX, skip_chunk }, + { ZXSTBID_CREATOR, read_crtr_chunk }, + { ZXSTBID_DIVIDE, read_dide_chunk }, + { ZXSTBID_DIVIDERAMPAGE, read_dirp_chunk }, + { ZXSTBID_DOCK, read_dock_chunk }, + { ZXSTBID_DSKFILE, skip_chunk }, + { ZXSTBID_LEC, skip_chunk }, + { ZXSTBID_LECRAMPAGE, skip_chunk }, + { ZXSTBID_GS, skip_chunk }, + { ZXSTBID_GSRAMPAGE, skip_chunk }, + { ZXSTBID_IF1, read_if1_chunk }, + { ZXSTBID_IF2ROM, read_if2r_chunk }, + { ZXSTBID_JOYSTICK, read_joy_chunk }, + { ZXSTBID_KEYBOARD, read_keyb_chunk }, + { ZXSTBID_MICRODRIVE, skip_chunk }, + { ZXSTB... [truncated message content] |