From: <sba...@us...> - 2015-05-10 21:38:04
|
Revision: 5246 http://sourceforge.net/p/fuse-emulator/code/5246 Author: sbaldovi Date: 2015-05-10 21:38:02 +0000 (Sun, 10 May 2015) Log Message: ----------- Add pkg.m4 for PKG_CHECK_MODULES in case the platform doesn't have pkg-config installed. Modified Paths: -------------- trunk/libspectrum/Makefile.am trunk/libspectrum/hacking/ChangeLog Added Paths: ----------- trunk/libspectrum/m4/pkg.m4 Modified: trunk/libspectrum/Makefile.am =================================================================== --- trunk/libspectrum/Makefile.am 2015-05-10 21:33:15 UTC (rev 5245) +++ trunk/libspectrum/Makefile.am 2015-05-10 21:38:02 UTC (rev 5246) @@ -107,6 +107,7 @@ dll.c \ generate.pl.in \ m4/audiofile.m4 \ + m4/pkg.m4 \ make-perl.c \ tape_accessors.pl \ tape_accessors.txt \ Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2015-05-10 21:33:15 UTC (rev 5245) +++ trunk/libspectrum/hacking/ChangeLog 2015-05-10 21:38:02 UTC (rev 5246) @@ -1008,3 +1008,5 @@ 20150506 libspectrum.h.in: add missing compatibility comments (Stuart). 20150507 libspectrum.{c,h.in}: add Didaktik disk class and image format (part of patch #331) (Gergely Szasz). +20150510 Makefile.am,m4/pkg.m4: add pkg.m4 for PKG_CHECK_MODULES in case the + platform doesn't have pkg-config installed (Sergio). Added: trunk/libspectrum/m4/pkg.m4 =================================================================== --- trunk/libspectrum/m4/pkg.m4 (rev 0) +++ trunk/libspectrum/m4/pkg.m4 2015-05-10 21:38:02 UTC (rev 5246) @@ -0,0 +1,214 @@ +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 1 (pkg-config-0.24) +# +# Copyright © 2004 Scott James Remnant <sc...@ne...>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# PKG_PROG_PKG_CONFIG([MIN-VERSION]) +# ---------------------------------- +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) +AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) +AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])# PKG_PROG_PKG_CONFIG + +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# +# Check to see whether a particular set of modules exists. Similar +# to PKG_CHECK_MODULES(), but does not set variables or print errors. +# +# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +# only at the first occurence in configure.ac, so if the first place +# it's called might be skipped (such as if it is within an "if", you +# have to call PKG_CHECK_EXISTS manually +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_EXISTS], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then + m4_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +# --------------------------------------------- +m4_define([_PKG_CONFIG], +[if test -n "$$1"; then + pkg_cv_[]$1="$$1" + elif test -n "$PKG_CONFIG"; then + PKG_CHECK_EXISTS([$3], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])# _PKG_CONFIG + +# _PKG_SHORT_ERRORS_SUPPORTED +# ----------------------------- +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])# _PKG_SHORT_ERRORS_SUPPORTED + + +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +# [ACTION-IF-NOT-FOUND]) +# +# +# Note that if there is a possibility the first call to +# PKG_CHECK_MODULES might not happen, you should be sure to include an +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +# +# +# -------------------------------------------------------------- +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details.]) + +if test $pkg_failed = yes; then + AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])[]dnl + ]) +elif test $pkg_failed = untried; then + AC_MSG_RESULT([no]) + m4_default([$4], [AC_MSG_FAILURE( +[The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +_PKG_TEXT + +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])# PKG_CHECK_MODULES + + +# PKG_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable pkgconfigdir as the location where a module +# should install pkg-config .pc files. By default the directory is +# $libdir/pkgconfig, but the default can be changed by passing +# DIRECTORY. The user can override through the --with-pkgconfigdir +# parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zu...@us...> - 2015-05-12 23:30:54
|
Revision: 5254 http://sourceforge.net/p/fuse-emulator/code/5254 Author: zubzero Date: 2015-05-12 23:30:51 +0000 (Tue, 12 May 2015) Log Message: ----------- Avoid mixing declarations and code for C89 compilers (Adrien Destugues) Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/pzx_read.c trunk/libspectrum/szx.c trunk/libspectrum/tzx_write.c Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2015-05-12 23:23:49 UTC (rev 5253) +++ trunk/libspectrum/hacking/ChangeLog 2015-05-12 23:30:51 UTC (rev 5254) @@ -1010,3 +1010,5 @@ patch #331) (Gergely Szasz). 20150510 Makefile.am,m4/pkg.m4: add pkg.m4 for PKG_CHECK_MODULES in case the platform doesn't have pkg-config installed (Sergio). +20150512 pzx_read.c,szx.c,tzx_write.c: avoid mixing declarations and code for + C89 compilers (Adrien Destugues) Modified: trunk/libspectrum/pzx_read.c =================================================================== --- trunk/libspectrum/pzx_read.c 2015-05-12 23:23:49 UTC (rev 5253) +++ trunk/libspectrum/pzx_read.c 2015-05-12 23:30:51 UTC (rev 5254) @@ -235,6 +235,15 @@ libspectrum_byte *data; libspectrum_error error; + libspectrum_dword count; + int initial_level; + size_t count_bytes; + size_t bits_in_last_byte; + libspectrum_word tail; + libspectrum_byte p0_count; + libspectrum_byte p1_count; + libspectrum_word *p0_pulses; + libspectrum_word *p1_pulses; /* Check there's enough left in the buffer for all the metadata */ if( data_length < 8 ) { @@ -246,16 +255,16 @@ } /* Get the metadata */ - libspectrum_dword count = libspectrum_read_dword( buffer ); - int initial_level = !!(count & 0x80000000); + count = libspectrum_read_dword( buffer ); + initial_level = !!(count & 0x80000000); count &= 0x7fffffff; - size_t count_bytes = ceil( count / (double)LIBSPECTRUM_BITS_IN_BYTE ); - size_t bits_in_last_byte = + count_bytes = ceil( count / (double)LIBSPECTRUM_BITS_IN_BYTE ); + bits_in_last_byte = count % LIBSPECTRUM_BITS_IN_BYTE ? count % LIBSPECTRUM_BITS_IN_BYTE : LIBSPECTRUM_BITS_IN_BYTE; - libspectrum_word tail = libspectrum_read_word( buffer ); - libspectrum_byte p0_count = **buffer; (*buffer)++; - libspectrum_byte p1_count = **buffer; (*buffer)++; + tail = libspectrum_read_word( buffer ); + p0_count = **buffer; (*buffer)++; + p1_count = **buffer; (*buffer)++; /* need to confirm that we have enough length left for the pulse definitions */ @@ -267,13 +276,11 @@ return LIBSPECTRUM_ERROR_CORRUPT; } - libspectrum_word *p0_pulses; error = pzx_read_data( buffer, block_end, p0_count * sizeof( libspectrum_word ), (libspectrum_byte**)&p0_pulses ); if( error ) return error; - libspectrum_word *p1_pulses; error = pzx_read_data( buffer, block_end, p1_count * sizeof( libspectrum_word ), (libspectrum_byte**)&p1_pulses ); @@ -455,6 +462,7 @@ pzx_context *ctx ) { libspectrum_tape_block *block; + libspectrum_word flags; if( data_length < 2 ) { libspectrum_print_error( LIBSPECTRUM_ERROR_CORRUPT, @@ -462,7 +470,7 @@ return LIBSPECTRUM_ERROR_CORRUPT; } - libspectrum_word flags = libspectrum_read_word( buffer ); + flags = libspectrum_read_word( buffer ); if( flags == PZXF_STOP48 ) { block = libspectrum_tape_block_alloc( LIBSPECTRUM_TAPE_BLOCK_STOP48 ); Modified: trunk/libspectrum/szx.c =================================================================== --- trunk/libspectrum/szx.c 2015-05-12 23:23:49 UTC (rev 5253) +++ trunk/libspectrum/szx.c 2015-05-12 23:30:51 UTC (rev 5254) @@ -577,10 +577,12 @@ /* This is ugly, but I can't see a better way to do it */ if( sizeof( libspectrum_byte ) == sizeof( char ) ) { char *custom = libspectrum_new( char, data_length + 1 ); + char *libspectrum; + memcpy( custom, *buffer, data_length ); custom[data_length] = 0; - char *libspectrum = strstr( custom, libspectrum_string ); + libspectrum = strstr( custom, libspectrum_string ); if( libspectrum ) { int matches, v1, v2, v3; libspectrum += strlen( libspectrum_string ); Modified: trunk/libspectrum/tzx_write.c =================================================================== --- trunk/libspectrum/tzx_write.c 2015-05-12 23:23:49 UTC (rev 5253) +++ trunk/libspectrum/tzx_write.c 2015-05-12 23:30:51 UTC (rev 5254) @@ -971,6 +971,7 @@ { libspectrum_tape_block *pure_data; size_t data_length; + libspectrum_byte *data; /* Pure data block can only have two identical pulses for bit 0 and bit 1 */ if( libspectrum_tape_block_bit0_pulse_count( block ) != 2 || @@ -999,7 +1000,7 @@ /* And the actual data */ data_length = libspectrum_tape_block_data_length( block ); libspectrum_tape_block_set_data_length( pure_data, data_length ); - libspectrum_byte *data = libspectrum_new( libspectrum_byte, data_length ); + data = libspectrum_new( libspectrum_byte, data_length ); memcpy( data, libspectrum_tape_block_data( block ), data_length ); libspectrum_tape_block_set_data( pure_data, data ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sba...@us...> - 2015-05-13 21:29:27
|
Revision: 5257 http://sourceforge.net/p/fuse-emulator/code/5257 Author: sbaldovi Date: 2015-05-13 21:29:24 +0000 (Wed, 13 May 2015) Log Message: ----------- Fix ARRAY_SIZE when using a modern GCC with strict C89 syntax. Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/internals.h Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2015-05-13 21:26:38 UTC (rev 5256) +++ trunk/libspectrum/hacking/ChangeLog 2015-05-13 21:29:24 UTC (rev 5257) @@ -1012,3 +1012,5 @@ platform doesn't have pkg-config installed (Sergio). 20150512 pzx_read.c,szx.c,tzx_write.c: avoid mixing declarations and code for C89 compilers (Adrien Destugues) +20150513 internals.h: fix ARRAY_SIZE when using a modern GCC with strict C89 + syntax (Sergio). Modified: trunk/libspectrum/internals.h =================================================================== --- trunk/libspectrum/internals.h 2015-05-13 21:26:38 UTC (rev 5256) +++ trunk/libspectrum/internals.h 2015-05-13 21:29:24 UTC (rev 5257) @@ -63,14 +63,14 @@ #define BUILD_BUG_ON_ZERO(e) \ (sizeof(struct { int:-!!(e) * 1234; })) -#if GNUC_PREREQ(3, 1) +#if !GNUC_PREREQ(3, 1) || defined( __STRICT_ANSI__ ) + #define MUST_BE_ARRAY(a) \ + BUILD_BUG_ON_ZERO(sizeof(a) % sizeof(*a)) +#else #define SAME_TYPE(a, b) \ __builtin_types_compatible_p(typeof(a), typeof(b)) #define MUST_BE_ARRAY(a) \ BUILD_BUG_ON_ZERO(SAME_TYPE((a), &(*a))) -#else - #define MUST_BE_ARRAY(a) \ - BUILD_BUG_ON_ZERO(sizeof(a) % sizeof(*a)) #endif #define ARRAY_SIZE(a) ( \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zu...@us...> - 2015-06-06 14:41:40
|
Revision: 5290 http://sourceforge.net/p/fuse-emulator/code/5290 Author: zubzero Date: 2015-06-06 14:41:38 +0000 (Sat, 06 Jun 2015) Log Message: ----------- doc/libspectrum.txt: sync with snap_accessors.txt Modified Paths: -------------- trunk/libspectrum/doc/libspectrum.txt trunk/libspectrum/hacking/ChangeLog Modified: trunk/libspectrum/doc/libspectrum.txt =================================================================== --- trunk/libspectrum/doc/libspectrum.txt 2015-06-03 13:50:05 UTC (rev 5289) +++ trunk/libspectrum/doc/libspectrum.txt 2015-06-06 14:41:38 UTC (rev 5290) @@ -575,6 +575,9 @@ * libspectrum_byte out_ay_registerport * libspectrum_byte ay_registers[16] +* libspectrum_byte out_scld_hsr +* libspectrum_byte out_scld_dec + * int interface1_active * int interface1_paged * int interface1_drive_count @@ -584,6 +587,7 @@ * int beta_active * int beta_paged +* int beta_autoboot * int beta_drive_count * int beta_custom_rom * int beta_direction @@ -625,9 +629,6 @@ * libspectrum_byte* opus_rom[1] * libspectrum_byte* opus_ram[1] -* libspectrum_byte out_scld_hsr -* libspectrum_byte out_scld_dec - * int custom_rom * size_t custom_rom_pages * libspectrum_byte* roms[1] @@ -660,12 +661,14 @@ * int interface2_active * libspectrum_byte* interface2_rom[1] -* size_t dock_active +* int dock_active * libspectrum_byte exrom_ram[8] * libspectrum_byte* exrom_cart[8] * libspectrum_byte dock_ram[8] * libspectrum_byte* dock_cart[8] +* int issue2 + * size_t joystick_active_count * libspectrum_joystick joystick_list[ SNAPSHOT_JOYSTICKS ] * int joystick_inputs[ SNAPSHOT_JOYSTICKS ] @@ -683,6 +686,7 @@ * libspectrum_byte* divide_ram[4] * int fuller_box_active + * int melodik_active * int specdrum_active @@ -691,6 +695,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 @@ -705,7 +710,7 @@ * int late_timings -* int zx_printer_enabled +* int zx_printer_active Most of those should be fairly self-explanatory; those which may not be are: @@ -731,7 +736,7 @@ 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 +* `zx_printer_active' being non-zero signals that the emulated Spectrum has a ZX Printer connected. * The `beta_*' functions represent the Betadisk Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2015-06-03 13:50:05 UTC (rev 5289) +++ trunk/libspectrum/hacking/ChangeLog 2015-06-06 14:41:38 UTC (rev 5290) @@ -1014,3 +1014,4 @@ C89 compilers (Adrien Destugues) 20150513 internals.h: fix ARRAY_SIZE when using a modern GCC with strict C89 syntax (Sergio). +20150606 doc/libspectrum.txt: sync with snap_accessors.txt (Stuart). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zu...@us...> - 2015-06-13 00:36:52
|
Revision: 5297 http://sourceforge.net/p/fuse-emulator/code/5297 Author: zubzero Date: 2015-06-13 00:36:49 +0000 (Sat, 13 Jun 2015) Log Message: ----------- Add AX_CREATE_STDINT_H macro from the GNU Autoconf Archive Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog Added Paths: ----------- trunk/libspectrum/m4/ax_create_stdint_h.m4 Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2015-06-12 10:38:24 UTC (rev 5296) +++ trunk/libspectrum/hacking/ChangeLog 2015-06-13 00:36:49 UTC (rev 5297) @@ -1015,3 +1015,5 @@ 20150513 internals.h: fix ARRAY_SIZE when using a modern GCC with strict C89 syntax (Sergio). 20150606 doc/libspectrum.txt: sync with snap_accessors.txt (Stuart). +20150613 m4/ax_create_stdint_h.m4: Add AX_CREATE_STDINT_H macro from the GNU + Autoconf Archive (Stuart). Added: trunk/libspectrum/m4/ax_create_stdint_h.m4 =================================================================== --- trunk/libspectrum/m4/ax_create_stdint_h.m4 (rev 0) +++ trunk/libspectrum/m4/ax_create_stdint_h.m4 2015-06-13 00:36:49 UTC (rev 5297) @@ -0,0 +1,727 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_create_stdint_h.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])] +# +# DESCRIPTION +# +# the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the +# existence of an include file <stdint.h> that defines a set of typedefs, +# especially uint8_t,int32_t,uintptr_t. Many older installations will not +# provide this file, but some will have the very same definitions in +# <inttypes.h>. In other enviroments we can use the inet-types in +# <sys/types.h> which would define the typedefs int8_t and u_int8_t +# respectivly. +# +# This macros will create a local "_stdint.h" or the headerfile given as +# an argument. In many cases that file will just "#include <stdint.h>" or +# "#include <inttypes.h>", while in other environments it will provide the +# set of basic 'stdint's definitions/typedefs: +# +# int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t +# int_least32_t.. int_fast32_t.. intmax_t +# +# which may or may not rely on the definitions of other files, or using +# the AC_CHECK_SIZEOF macro to determine the actual sizeof each type. +# +# if your header files require the stdint-types you will want to create an +# installable file mylib-int.h that all your other installable header may +# include. So if you have a library package named "mylib", just use +# +# AX_CREATE_STDINT_H(mylib-int.h) +# +# in configure.ac and go to install that very header file in Makefile.am +# along with the other headers (mylib.h) - and the mylib-specific headers +# can simply use "#include <mylib-int.h>" to obtain the stdint-types. +# +# Remember, if the system already had a valid <stdint.h>, the generated +# file will include it directly. No need for fuzzy HAVE_STDINT_H things... +# (oops, GCC 4.2.x has deliberatly disabled its stdint.h for non-c99 +# compilation and the c99-mode is not the default. Therefore this macro +# will not use the compiler's stdint.h - please complain to the GCC +# developers). +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim <gu...@gm...> +# +# 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 3 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, see <http://www.gnu.org/licenses/>. +# +# As a special exception, the respective Autoconf Macro's copyright owner +# gives unlimited permission to copy, distribute and modify the configure +# scripts that are the output of Autoconf when processing the Macro. You +# need not follow the terms of the GNU General Public License when using +# or distributing such scripts, even though portions of the text of the +# Macro appear in them. The GNU General Public License (GPL) does govern +# all other use of the material that constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the Autoconf +# Macro released by the Autoconf Archive. When you make and distribute a +# modified version of the Autoconf Macro, you may extend this special +# exception to the GPL to apply to your modified version as well. + +#serial 10 + +AC_DEFUN([AX_CHECK_DATA_MODEL],[ + AC_CHECK_SIZEOF(char) + AC_CHECK_SIZEOF(short) + AC_CHECK_SIZEOF(int) + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(void*) + ac_cv_char_data_model="" + ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char" + ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short" + ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int" + ac_cv_long_data_model="" + ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int" + ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long" + ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp" + AC_MSG_CHECKING([data model]) + case "$ac_cv_char_data_model/$ac_cv_long_data_model" in + 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;; + 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;; + 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;; + 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;; + 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;; + 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;; + 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;; + 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;; + 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;; + 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;; + 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;; + 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;; + 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;; + 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;; + 222/*|333/*|444/*|666/*|888/*) : + ac_cv_data_model="iDSP" ; n="unusual dsptype" ;; + *) ac_cv_data_model="none" ; n="very unusual model" ;; + esac + AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)]) +]) + +dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF]) +AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[ +AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[ + ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h) + AC_MSG_RESULT([(..)]) + for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h sys/types.h]) + do + unset ac_cv_type_uintptr_t + unset ac_cv_type_uint64_t + AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>]) + AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) + m4_ifvaln([$2],[$2]) break + done + AC_MSG_CHECKING([for stdint uintptr_t]) + ]) +]) + +AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[ +AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[ + ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h) + AC_MSG_RESULT([(..)]) + for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h sys/types.h stdint.h]) + do + unset ac_cv_type_uint32_t + unset ac_cv_type_uint64_t + AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>]) + AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>]) + m4_ifvaln([$2],[$2]) break + break; + done + AC_MSG_CHECKING([for stdint uint32_t]) + ]) +]) + +AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[ +AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[ + ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h) + AC_MSG_RESULT([(..)]) + for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do + unset ac_cv_type_u_int32_t + unset ac_cv_type_u_int64_t + AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>]) + AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>]) + m4_ifvaln([$2],[$2]) break + break; + done + AC_MSG_CHECKING([for stdint u_int32_t]) + ]) +]) + +AC_DEFUN([AX_CREATE_STDINT_H], +[# ------ AX CREATE STDINT H ------------------------------------- +AC_MSG_CHECKING([for stdint types]) +ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)` +# try to shortcircuit - if the default include path of the compiler +# can find a "stdint.h" header then we assume that all compilers can. +AC_CACHE_VAL([ac_cv_header_stdint_t],[ +old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS="" +old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS="" +old_CFLAGS="$CFLAGS" ; CFLAGS="" +AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;], +[ac_cv_stdint_result="(assuming C99 compatible system)" + ac_cv_header_stdint_t="stdint.h"; ], +[ac_cv_header_stdint_t=""]) +if test "$GCC" = "yes" && test ".$ac_cv_header_stdint_t" = "."; then +CFLAGS="-std=c99" +AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;], +[AC_MSG_WARN(your GCC compiler has a defunct stdint.h for its default-mode)]) +fi +CXXFLAGS="$old_CXXFLAGS" +CPPFLAGS="$old_CPPFLAGS" +CFLAGS="$old_CFLAGS" ]) + +v="... $ac_cv_header_stdint_h" +if test "$ac_stdint_h" = "stdint.h" ; then + AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)]) +elif test "$ac_stdint_h" = "inttypes.h" ; then + AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)]) +elif test "_$ac_cv_header_stdint_t" = "_" ; then + AC_MSG_RESULT([(putting them into $ac_stdint_h)$v]) +else + ac_cv_header_stdint="$ac_cv_header_stdint_t" + AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)]) +fi + +if test "_$ac_cv_header_stdint_t" = "_" ; then # cannot shortcircuit.. + +dnl .....intro message done, now do a few system checks..... +dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type, +dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW +dnl instead that is triggered with 3 or more arguments (see types.m4) + +inttype_headers=`echo $2 | sed -e 's/,/ /g'` + +ac_cv_stdint_result="(no helpful system typedefs seen)" +AX_CHECK_HEADER_STDINT_X(dnl + stdint.h inttypes.h sys/inttypes.h $inttype_headers, + ac_cv_stdint_result="(seen uintptr_t$and64 in $i)") + +if test "_$ac_cv_header_stdint_x" = "_" ; then +AX_CHECK_HEADER_STDINT_O(dnl, + inttypes.h sys/inttypes.h stdint.h $inttype_headers, + ac_cv_stdint_result="(seen uint32_t$and64 in $i)") +fi + +if test "_$ac_cv_header_stdint_x" = "_" ; then +if test "_$ac_cv_header_stdint_o" = "_" ; then +AX_CHECK_HEADER_STDINT_U(dnl, + sys/types.h inttypes.h sys/inttypes.h $inttype_headers, + ac_cv_stdint_result="(seen u_int32_t$and64 in $i)") +fi fi + +dnl if there was no good C99 header file, do some typedef checks... +if test "_$ac_cv_header_stdint_x" = "_" ; then + AC_MSG_CHECKING([for stdint datatype model]) + AC_MSG_RESULT([(..)]) + AX_CHECK_DATA_MODEL +fi + +if test "_$ac_cv_header_stdint_x" != "_" ; then + ac_cv_header_stdint="$ac_cv_header_stdint_x" +elif test "_$ac_cv_header_stdint_o" != "_" ; then + ac_cv_header_stdint="$ac_cv_header_stdint_o" +elif test "_$ac_cv_header_stdint_u" != "_" ; then + ac_cv_header_stdint="$ac_cv_header_stdint_u" +else + ac_cv_header_stdint="stddef.h" +fi + +AC_MSG_CHECKING([for extra inttypes in chosen header]) +AC_MSG_RESULT([($ac_cv_header_stdint)]) +dnl see if int_least and int_fast types are present in _this_ header. +unset ac_cv_type_int_least32_t +unset ac_cv_type_int_fast32_t +AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>]) +AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>]) +AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>]) + +fi # shortcircut to system "stdint.h" +# ------------------ PREPARE VARIABLES ------------------------------ +if test "$GCC" = "yes" ; then +ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1` +else +ac_cv_stdint_message="using $CC" +fi + +AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl +$ac_cv_stdint_result]) + +dnl ----------------------------------------------------------------- +# ----------------- DONE inttypes.h checks START header ------------- +AC_CONFIG_COMMANDS([$ac_stdint_h],[ +AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h) +ac_stdint=$tmp/_stdint.h + +echo "#ifndef" $_ac_stdint_h >$ac_stdint +echo "#define" $_ac_stdint_h "1" >>$ac_stdint +echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint +echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint +echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint +if test "_$ac_cv_header_stdint_t" != "_" ; then +echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint +echo "#include <stdint.h>" >>$ac_stdint +echo "#endif" >>$ac_stdint +echo "#endif" >>$ac_stdint +else + +cat >>$ac_stdint <<STDINT_EOF + +/* ................... shortcircuit part ........................... */ + +#if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H +#include <stdint.h> +#else +#include <stddef.h> + +/* .................... configured part ............................ */ + +STDINT_EOF + +echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint +if test "_$ac_cv_header_stdint_x" != "_" ; then + ac_header="$ac_cv_header_stdint_x" + echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint +else + echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint +fi + +echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint +if test "_$ac_cv_header_stdint_o" != "_" ; then + ac_header="$ac_cv_header_stdint_o" + echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint +else + echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint +fi + +echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint +if test "_$ac_cv_header_stdint_u" != "_" ; then + ac_header="$ac_cv_header_stdint_u" + echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint +else + echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint +fi + +echo "" >>$ac_stdint + +if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then + echo "#include <$ac_header>" >>$ac_stdint + echo "" >>$ac_stdint +fi fi + +echo "/* which 64bit typedef has been found */" >>$ac_stdint +if test "$ac_cv_type_uint64_t" = "yes" ; then +echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint +fi +if test "$ac_cv_type_u_int64_t" = "yes" ; then +echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint +fi +echo "" >>$ac_stdint + +echo "/* which type model has been detected */" >>$ac_stdint +if test "_$ac_cv_char_data_model" != "_" ; then +echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint +echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint +else +echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint +echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint +fi +echo "" >>$ac_stdint + +echo "/* whether int_least types were detected */" >>$ac_stdint +if test "$ac_cv_type_int_least32_t" = "yes"; then +echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint +fi +echo "/* whether int_fast types were detected */" >>$ac_stdint +if test "$ac_cv_type_int_fast32_t" = "yes"; then +echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint +fi +echo "/* whether intmax_t type was detected */" >>$ac_stdint +if test "$ac_cv_type_intmax_t" = "yes"; then +echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint +else +echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint +fi +echo "" >>$ac_stdint + + cat >>$ac_stdint <<STDINT_EOF +/* .................... detections part ............................ */ + +/* whether we need to define bitspecific types from compiler base types */ +#ifndef _STDINT_HEADER_INTPTR +#ifndef _STDINT_HEADER_UINT32 +#ifndef _STDINT_HEADER_U_INT32 +#define _STDINT_NEED_INT_MODEL_T +#else +#define _STDINT_HAVE_U_INT_TYPES +#endif +#endif +#endif + +#ifdef _STDINT_HAVE_U_INT_TYPES +#undef _STDINT_NEED_INT_MODEL_T +#endif + +#ifdef _STDINT_CHAR_MODEL +#if _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124 +#ifndef _STDINT_BYTE_MODEL +#define _STDINT_BYTE_MODEL 12 +#endif +#endif +#endif + +#ifndef _STDINT_HAVE_INT_LEAST32_T +#define _STDINT_NEED_INT_LEAST_T +#endif + +#ifndef _STDINT_HAVE_INT_FAST32_T +#define _STDINT_NEED_INT_FAST_T +#endif + +#ifndef _STDINT_HEADER_INTPTR +#define _STDINT_NEED_INTPTR_T +#ifndef _STDINT_HAVE_INTMAX_T +#define _STDINT_NEED_INTMAX_T +#endif +#endif + + +/* .................... definition part ............................ */ + +/* some system headers have good uint64_t */ +#ifndef _HAVE_UINT64_T +#if defined _STDINT_HAVE_UINT64_T || defined HAVE_UINT64_T +#define _HAVE_UINT64_T +#elif defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T +#define _HAVE_UINT64_T +typedef u_int64_t uint64_t; +#endif +#endif + +#ifndef _HAVE_UINT64_T +/* .. here are some common heuristics using compiler runtime specifics */ +#if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L +#define _HAVE_UINT64_T +#define _HAVE_LONGLONG_UINT64_T +typedef long long int64_t; +typedef unsigned long long uint64_t; + +#elif !defined __STRICT_ANSI__ +#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__ +#define _HAVE_UINT64_T +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; + +#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__ +/* note: all ELF-systems seem to have loff-support which needs 64-bit */ +#if !defined _NO_LONGLONG +#define _HAVE_UINT64_T +#define _HAVE_LONGLONG_UINT64_T +typedef long long int64_t; +typedef unsigned long long uint64_t; +#endif + +#elif defined __alpha || (defined __mips && defined _ABIN32) +#if !defined _NO_LONGLONG +typedef long int64_t; +typedef unsigned long uint64_t; +#endif + /* compiler/cpu type to define int64_t */ +#endif +#endif +#endif + +#if defined _STDINT_HAVE_U_INT_TYPES +/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */ +typedef u_int8_t uint8_t; +typedef u_int16_t uint16_t; +typedef u_int32_t uint32_t; + +/* glibc compatibility */ +#ifndef __int8_t_defined +#define __int8_t_defined +#endif +#endif + +#ifdef _STDINT_NEED_INT_MODEL_T +/* we must guess all the basic types. Apart from byte-adressable system, */ +/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */ +/* (btw, those nibble-addressable systems are way off, or so we assume) */ + +dnl /* have a look at "64bit and data size neutrality" at */ +dnl /* http://unix.org/version2/whatsnew/login_64bit.html */ +dnl /* (the shorthand "ILP" types always have a "P" part) */ + +#if defined _STDINT_BYTE_MODEL +#if _STDINT_LONG_MODEL+0 == 242 +/* 2:4:2 = IP16 = a normal 16-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned long uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef long int32_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444 +/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */ +/* 4:4:4 = ILP32 = a normal 32-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488 +/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */ +/* 4:8:8 = LP64 = a normal 64-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +/* this system has a "long" of 64bit */ +#ifndef _HAVE_UINT64_T +#define _HAVE_UINT64_T +typedef unsigned long uint64_t; +typedef long int64_t; +#endif +#elif _STDINT_LONG_MODEL+0 == 448 +/* LLP64 a 64-bit system derived from a 32-bit system */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +#ifndef __int8_t_defined +#define __int8_t_defined +typedef char int8_t; +typedef short int16_t; +typedef int int32_t; +#endif +/* assuming the system has a "long long" */ +#ifndef _HAVE_UINT64_T +#define _HAVE_UINT64_T +#define _HAVE_LONGLONG_UINT64_T +typedef unsigned long long uint64_t; +typedef long long int64_t; +#endif +#else +#define _STDINT_NO_INT32_T +#endif +#else +#define _STDINT_NO_INT8_T +#define _STDINT_NO_INT32_T +#endif +#endif + +/* + * quote from SunOS-5.8 sys/inttypes.h: + * Use at your own risk. As of February 1996, the committee is squarely + * behind the fixed sized types; the "least" and "fast" types are still being + * discussed. The probability that the "fast" types may be removed before + * the standard is finalized is high enough that they are not currently + * implemented. + */ + +#if defined _STDINT_NEED_INT_LEAST_T +typedef int8_t int_least8_t; +typedef int16_t int_least16_t; +typedef int32_t int_least32_t; +#ifdef _HAVE_UINT64_T +typedef int64_t int_least64_t; +#endif + +typedef uint8_t uint_least8_t; +typedef uint16_t uint_least16_t; +typedef uint32_t uint_least32_t; +#ifdef _HAVE_UINT64_T +typedef uint64_t uint_least64_t; +#endif + /* least types */ +#endif + +#if defined _STDINT_NEED_INT_FAST_T +typedef int8_t int_fast8_t; +typedef int int_fast16_t; +typedef int32_t int_fast32_t; +#ifdef _HAVE_UINT64_T +typedef int64_t int_fast64_t; +#endif + +typedef uint8_t uint_fast8_t; +typedef unsigned uint_fast16_t; +typedef uint32_t uint_fast32_t; +#ifdef _HAVE_UINT64_T +typedef uint64_t uint_fast64_t; +#endif + /* fast types */ +#endif + +#ifdef _STDINT_NEED_INTMAX_T +#ifdef _HAVE_UINT64_T +typedef int64_t intmax_t; +typedef uint64_t uintmax_t; +#else +typedef long intmax_t; +typedef unsigned long uintmax_t; +#endif +#endif + +#ifdef _STDINT_NEED_INTPTR_T +#ifndef __intptr_t_defined +#define __intptr_t_defined +/* we encourage using "long" to store pointer values, never use "int" ! */ +#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484 +typedef unsigned int uintptr_t; +typedef int intptr_t; +#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444 +typedef unsigned long uintptr_t; +typedef long intptr_t; +#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T +typedef uint64_t uintptr_t; +typedef int64_t intptr_t; +#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */ +typedef unsigned long uintptr_t; +typedef long intptr_t; +#endif +#endif +#endif + +/* The ISO C99 standard specifies that in C++ implementations these + should only be defined if explicitly requested. */ +#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS +#ifndef UINT32_C + +/* Signed. */ +# define INT8_C(c) c +# define INT16_C(c) c +# define INT32_C(c) c +# ifdef _HAVE_LONGLONG_UINT64_T +# define INT64_C(c) c ## L +# else +# define INT64_C(c) c ## LL +# endif + +/* Unsigned. */ +# define UINT8_C(c) c ## U +# define UINT16_C(c) c ## U +# define UINT32_C(c) c ## U +# ifdef _HAVE_LONGLONG_UINT64_T +# define UINT64_C(c) c ## UL +# else +# define UINT64_C(c) c ## ULL +# endif + +/* Maximal type. */ +# ifdef _HAVE_LONGLONG_UINT64_T +# define INTMAX_C(c) c ## L +# define UINTMAX_C(c) c ## UL +# else +# define INTMAX_C(c) c ## LL +# define UINTMAX_C(c) c ## ULL +# endif + + /* literalnumbers */ +#endif +#endif + +/* These limits are merily those of a two complement byte-oriented system */ + +/* Minimum of signed integral types. */ +# define INT8_MIN (-128) +# define INT16_MIN (-32767-1) +# define INT32_MIN (-2147483647-1) +# define INT64_MIN (-__INT64_C(9223372036854775807)-1) +/* Maximum of signed integral types. */ +# define INT8_MAX (127) +# define INT16_MAX (32767) +# define INT32_MAX (2147483647) +# define INT64_MAX (__INT64_C(9223372036854775807)) + +/* Maximum of unsigned integral types. */ +# define UINT8_MAX (255) +# define UINT16_MAX (65535) +# define UINT32_MAX (4294967295U) +# define UINT64_MAX (__UINT64_C(18446744073709551615)) + +/* Minimum of signed integral types having a minimum size. */ +# define INT_LEAST8_MIN INT8_MIN +# define INT_LEAST16_MIN INT16_MIN +# define INT_LEAST32_MIN INT32_MIN +# define INT_LEAST64_MIN INT64_MIN +/* Maximum of signed integral types having a minimum size. */ +# define INT_LEAST8_MAX INT8_MAX +# define INT_LEAST16_MAX INT16_MAX +# define INT_LEAST32_MAX INT32_MAX +# define INT_LEAST64_MAX INT64_MAX + +/* Maximum of unsigned integral types having a minimum size. */ +# define UINT_LEAST8_MAX UINT8_MAX +# define UINT_LEAST16_MAX UINT16_MAX +# define UINT_LEAST32_MAX UINT32_MAX +# define UINT_LEAST64_MAX UINT64_MAX + + /* shortcircuit*/ +#endif + /* once */ +#endif +#endif +STDINT_EOF +fi + if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then + AC_MSG_NOTICE([$ac_stdint_h is unchanged]) + else + ac_dir=`AS_DIRNAME(["$ac_stdint_h"])` + AS_MKDIR_P(["$ac_dir"]) + rm -f $ac_stdint_h + mv $ac_stdint $ac_stdint_h + fi +],[# variables for create stdint.h replacement +PACKAGE="$PACKAGE" +VERSION="$VERSION" +ac_stdint_h="$ac_stdint_h" +_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h) +ac_cv_stdint_message="$ac_cv_stdint_message" +ac_cv_header_stdint_t="$ac_cv_header_stdint_t" +ac_cv_header_stdint_x="$ac_cv_header_stdint_x" +ac_cv_header_stdint_o="$ac_cv_header_stdint_o" +ac_cv_header_stdint_u="$ac_cv_header_stdint_u" +ac_cv_type_uint64_t="$ac_cv_type_uint64_t" +ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t" +ac_cv_char_data_model="$ac_cv_char_data_model" +ac_cv_long_data_model="$ac_cv_long_data_model" +ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t" +ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t" +ac_cv_type_intmax_t="$ac_cv_type_intmax_t" +]) +]) Property changes on: trunk/libspectrum/m4/ax_create_stdint_h.m4 ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Author Date Id Revision \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sba...@us...> - 2015-06-17 21:22:34
|
Revision: 5305 http://sourceforge.net/p/fuse-emulator/code/5305 Author: sbaldovi Date: 2015-06-17 21:22:32 +0000 (Wed, 17 Jun 2015) Log Message: ----------- Enable silent rules for perl and windres commands. Modified Paths: -------------- trunk/libspectrum/Makefile.am trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/test/Makefile.am Modified: trunk/libspectrum/Makefile.am =================================================================== --- trunk/libspectrum/Makefile.am 2015-06-16 22:15:43 UTC (rev 5304) +++ trunk/libspectrum/Makefile.am 2015-06-17 21:22:32 UTC (rev 5305) @@ -80,26 +80,26 @@ AM_CFLAGS = -DLIBSPECTRUM_EXPORTS make-perl$(EXEEXT): $(srcdir)/make-perl.c config.h - $(CC_FOR_BUILD) -I. $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< + $(AM_V_CC)$(CC_FOR_BUILD) -I. $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< libspectrum.h: libspectrum.h.in generate.pl snap_accessors.txt tape_accessors.txt config.h - @PERL@ -p generate.pl $(srcdir) $(srcdir)/libspectrum.h.in > $@.tmp && mv $@.tmp $@ + $(AM_V_GEN)$(PERL) -p generate.pl $(srcdir) $(srcdir)/libspectrum.h.in > $@.tmp && mv $@.tmp $@ generate.pl: make-perl$(EXEEXT) generate.pl.in - ./make-perl$(EXEEXT) > $@ - cat $(srcdir)/generate.pl.in >> $@ + $(AM_V_GEN)./make-perl$(EXEEXT) > $@ + $(AM_V_at)cat $(srcdir)/generate.pl.in >> $@ snap_accessors.c: accessor.pl snap_accessors.txt - @PERL@ $(srcdir)/accessor.pl $(srcdir)/snap_accessors.txt > $@.tmp && mv $@.tmp $@ + $(AM_V_GEN)$(PERL) $(srcdir)/accessor.pl $(srcdir)/snap_accessors.txt > $@.tmp && mv $@.tmp $@ tape_accessors.c: tape_accessors.pl tape_accessors.txt - @PERL@ $(srcdir)/tape_accessors.pl $(srcdir)/tape_accessors.txt > $@.tmp && mv $@.tmp $@ + $(AM_V_GEN)$(PERL) $(srcdir)/tape_accessors.pl $(srcdir)/tape_accessors.txt > $@.tmp && mv $@.tmp $@ tape_set.c: tape_set.pl tape_accessors.txt - @PERL@ $(srcdir)/tape_set.pl $(srcdir)/tape_accessors.txt > $@.tmp && mv $@.tmp $@ + $(AM_V_GEN)$(PERL) $(srcdir)/tape_set.pl $(srcdir)/tape_accessors.txt > $@.tmp && mv $@.tmp $@ windres.o: windres.rc - @WINDRES@ -I. $(srcdir)/windres.rc windres.o + $(AM_V_GEN)$(WINDRES) -I. $(srcdir)/windres.rc windres.o AM_CPPFLAGS = @GLIB_CFLAGS@ @AUDIOFILE_CFLAGS@ Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2015-06-16 22:15:43 UTC (rev 5304) +++ trunk/libspectrum/hacking/ChangeLog 2015-06-17 21:22:32 UTC (rev 5305) @@ -1015,5 +1015,7 @@ 20150513 internals.h: fix ARRAY_SIZE when using a modern GCC with strict C89 syntax (Sergio). 20150606 doc/libspectrum.txt: sync with snap_accessors.txt (Stuart). -20150613 m4/ax_create_stdint_h.m4: Add AX_CREATE_STDINT_H macro from the GNU +20150613 m4/ax_create_stdint_h.m4: add AX_CREATE_STDINT_H macro from the GNU Autoconf Archive (Stuart). +20150617 Makefile.am,test/Makefile.am: enable silent rules for perl and windres + commands (Sergio). Modified: trunk/libspectrum/test/Makefile.am =================================================================== --- trunk/libspectrum/test/Makefile.am 2015-06-16 22:15:43 UTC (rev 5304) +++ trunk/libspectrum/test/Makefile.am 2015-06-17 21:22:32 UTC (rev 5305) @@ -35,7 +35,7 @@ noinst_HEADERS += test/test.h test/complete-tzx.tzx: test/complete-tzx.pl - perl $< > $@.tmp && mv $@.tmp $@ + $(AM_V_GEN)$(PERL) $< > $@.tmp && mv $@.tmp $@ test_test_LDADD = libspectrum.la This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sba...@us...> - 2015-08-30 22:48:14
|
Revision: 5316 http://sourceforge.net/p/fuse-emulator/code/5316 Author: sbaldovi Date: 2015-08-30 22:48:13 +0000 (Sun, 30 Aug 2015) Log Message: ----------- Add mime-type property. Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog Property Changed: ---------------- trunk/libspectrum/test/turbo-zeropilot.tzx Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2015-08-23 22:36:53 UTC (rev 5315) +++ trunk/libspectrum/hacking/ChangeLog 2015-08-30 22:48:13 UTC (rev 5316) @@ -1019,3 +1019,4 @@ Autoconf Archive (Stuart). 20150617 Makefile.am,test/Makefile.am: enable silent rules for perl and windres commands (Sergio). +20150831 test/turbo-zeropilot.tzx: add mime-type property (Sergio). Index: trunk/libspectrum/test/turbo-zeropilot.tzx =================================================================== --- trunk/libspectrum/test/turbo-zeropilot.tzx 2015-08-23 22:36:53 UTC (rev 5315) +++ trunk/libspectrum/test/turbo-zeropilot.tzx 2015-08-30 22:48:13 UTC (rev 5316) Property changes on: trunk/libspectrum/test/turbo-zeropilot.tzx ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -Author Date Id Revision \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-03-25 11:31:33
|
Revision: 5368 http://sourceforge.net/p/fuse-emulator/code/5368 Author: fredm Date: 2016-03-25 11:31:31 +0000 (Fri, 25 Mar 2016) Log Message: ----------- Allow for the possibility that inital_level has the default value. Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/tape_block.c Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-03-25 10:26:28 UTC (rev 5367) +++ trunk/libspectrum/hacking/ChangeLog 2016-03-25 11:31:31 UTC (rev 5368) @@ -1020,3 +1020,5 @@ 20150617 Makefile.am,test/Makefile.am: enable silent rules for perl and windres commands (Sergio). 20150831 test/turbo-zeropilot.tzx: add mime-type property (Sergio). +20160325 tape_block.c: allow for the possibility that inital_level has the + default value (Fred). Modified: trunk/libspectrum/tape_block.c =================================================================== --- trunk/libspectrum/tape_block.c 2016-03-25 10:26:28 UTC (rev 5367) +++ trunk/libspectrum/tape_block.c 2016-03-25 11:31:31 UTC (rev 5368) @@ -381,7 +381,9 @@ } } - state->level = block->initial_level; + if( block->initial_level != -1 ) { + state->level = block->initial_level; + } /* We're just before the start of the data */ state->bytes_through_block = -1; state->bits_through_byte = 7; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <zu...@us...> - 2016-03-29 21:05:36
|
Revision: 5371 http://sourceforge.net/p/fuse-emulator/code/5371 Author: zubzero Date: 2016-03-29 21:05:33 +0000 (Tue, 29 Mar 2016) Log Message: ----------- Refactor frame timings Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/timings.c Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-03-27 22:32:55 UTC (rev 5370) +++ trunk/libspectrum/hacking/ChangeLog 2016-03-29 21:05:33 UTC (rev 5371) @@ -1022,3 +1022,4 @@ 20150831 test/turbo-zeropilot.tzx: add mime-type property (Sergio). 20160325 tape_block.c: allow for the possibility that inital_level has the default value (Fred). +20160329 timings.c: refactor frame timings (Stuart). Modified: trunk/libspectrum/timings.c =================================================================== --- trunk/libspectrum/timings.c 2016-03-27 22:32:55 UTC (rev 5370) +++ trunk/libspectrum/timings.c 2016-03-29 21:05:33 UTC (rev 5371) @@ -29,15 +29,7 @@ #include "internals.h" -/* The frame timings of a machine */ -typedef struct timings_t { - - /* Processor speed in Hz */ - libspectrum_dword processor_speed; - - /* AY clock speed in Hz */ - libspectrum_dword ay_speed; - +typedef struct timings_frame_t { /* Line timings in tstates */ libspectrum_word left_border, horizontal_screen, right_border, horizontal_retrace; @@ -52,49 +44,123 @@ /* How long after interrupt is the top-level pixel of the main screen displayed */ libspectrum_dword top_left_pixel; +} timings_frame_t; +static const timings_frame_t timings_frame_ferranti_5c_6c = +{ + 24, 128, 24, 48, /* Horizontal, 224 clocks per line */ + 48, 192, 48, 24, /* Vertical, 312 lines per frame */ + 32, 14336 +}; + +static const timings_frame_t timings_frame_ferranti_60hz = +{ + 24, 128, 24, 48, /* Horizontal, 224 clocks per line */ + 24, 192, 25, 23, /* Vertical, 264 lines per frame */ + 32, 8960 +}; + +static const timings_frame_t timings_frame_ferranti_7c = +{ + 24, 128, 24, 52, /* Horizontal, 228 clocks per line */ + 48, 192, 48, 23, /* Vertical, 311 lines per frame */ + 36, 14362 +}; + +static const timings_frame_t timings_frame_amstrad_asic = +{ + 24, 128, 24, 52, /* Horizontal, 228 clocks per line */ + 48, 192, 48, 23, /* Vertical, 311 lines per frame */ + 32, 14365 +}; + +static const timings_frame_t timings_frame_timex_scld_50hz = +{ + 24, 128, 24, 48, /* Horizontal, 224 clocks per line */ + 48, 192, 24, 32, /* Vertical, 312 lines per frame */ + 32, 14321 +}; + +static const timings_frame_t timings_frame_timex_scld_60hz = +{ + 24, 128, 24, 48, /* Horizontal, 224 clocks per line */ + 24, 192, 25, 21, /* Vertical, 263 lines per frame */ + 32, 9169 +}; + +static const timings_frame_t timings_frame_se = +{ + 24, 128, 24, 48, /* Horizontal, 224 clocks per line */ + 47, 192, 48, 25, /* Vertical, 312 lines per frame */ + 32, 14336 +}; + +static const timings_frame_t timings_frame_pentagon = +{ + 36, 128, 28, 32, /* Horizontal, 224 clocks per line */ + 64, 192, 48, 16, /* Vertical 320 lines per frame */ + 36, 17988 +}; + +static const timings_frame_t timings_frame_scorpion = +{ + 24, 128, 32, 40, /* Horizontal, 224 clocks per line */ + 48, 192, 48, 24, /* Vertical, 312 lines per frame */ + 36, 14336 +}; + +/* The frame timings of a machine */ +typedef struct timings_t { + + /* Processor speed in Hz */ + libspectrum_dword processor_speed; + + /* AY clock speed in Hz */ + libspectrum_dword ay_speed; + + const timings_frame_t *frame_timings; + } timings_t; /* The actual data from which the full timings are constructed */ -static timings_t base_timings[] = { +static const timings_t base_timings[] = { - /* /- Horizonal -\ /-- Vertical -\ */ /* 48K */ - { 3500000, 0, 24, 128, 24, 48, 48, 192, 48, 24, 32, 14336 }, + { 3500000, 0, &timings_frame_ferranti_5c_6c }, /* TC2048 */ - { 3500000, 0, 24, 128, 24, 48, 48, 192, 48, 24, 32, 14321 }, + { 3500000, 0, &timings_frame_timex_scld_50hz }, /* 128K */ - { 3546900, 1773400, 24, 128, 24, 52, 48, 192, 48, 23, 36, 14362 }, + { 3546900, 1773400, &timings_frame_ferranti_7c }, /* +2 */ - { 3546900, 1773400, 24, 128, 24, 52, 48, 192, 48, 23, 36, 14362 }, + { 3546900, 1773400, &timings_frame_ferranti_7c }, /* Pentagon */ - { 3584000, 1792000, 36, 128, 28, 32, 64, 192, 48, 16, 36, 17988 }, + { 3584000, 1792000, &timings_frame_pentagon }, /* +2A */ - { 3546900, 1773400, 24, 128, 24, 52, 48, 192, 48, 23, 32, 14365 }, + { 3546900, 1773400, &timings_frame_amstrad_asic }, /* +3 */ - { 3546900, 1773400, 24, 128, 24, 52, 48, 192, 48, 23, 32, 14365 }, + { 3546900, 1773400, &timings_frame_amstrad_asic }, /* Unknown machine */ - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 0, 0, NULL }, /* 16K */ - { 3500000, 0, 24, 128, 24, 48, 48, 192, 48, 24, 32, 14336 }, + { 3500000, 0, &timings_frame_ferranti_5c_6c }, /* TC2068 */ - { 3500000, 1750000, 24, 128, 24, 48, 48, 192, 48, 24, 32, 14321 }, + { 3500000, 1750000, &timings_frame_timex_scld_50hz }, /* Scorpion */ - { 3500000, 1750000, 24, 128, 32, 40, 48, 192, 48, 24, 36, 14336 }, + { 3500000, 1750000, &timings_frame_scorpion }, /* +3e */ - { 3546900, 1773400, 24, 128, 24, 52, 48, 192, 48, 23, 32, 14365 }, + { 3546900, 1773400, &timings_frame_amstrad_asic }, /* SE */ - { 3500000, 1750000, 24, 128, 24, 48, 47, 192, 48, 25, 32, 14336 }, + { 3500000, 1750000, &timings_frame_se }, /* TS2068 */ - { 3528000, 1764000, 24, 128, 24, 48, 24, 192, 25, 21, 32, 9169 }, + { 3528000, 1764000, &timings_frame_timex_scld_60hz }, /* Pentagon 512K */ - { 3584000, 1792000, 36, 128, 28, 32, 64, 192, 48, 16, 36, 17988 }, + { 3584000, 1792000, &timings_frame_pentagon }, /* Pentagon 1024K */ - { 3584000, 1792000, 36, 128, 28, 32, 64, 192, 48, 16, 36, 17988 }, + { 3584000, 1792000, &timings_frame_pentagon }, /* 48K NTSC */ - { 3527500, 0, 24, 128, 24, 48, 24, 192, 25, 23, 32, 8960 }, + { 3527500, 0, &timings_frame_ferranti_60hz }, /* 128Ke */ - { 3546900, 1773400, 24, 128, 24, 52, 48, 192, 48, 23, 32, 14365 }, + { 3546900, 1773400, &timings_frame_amstrad_asic }, }; libspectrum_dword @@ -112,84 +178,106 @@ libspectrum_word libspectrum_timings_left_border( libspectrum_machine machine ) { - return base_timings[ machine ].left_border; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->left_border; } libspectrum_word libspectrum_timings_horizontal_screen( libspectrum_machine machine ) { - return base_timings[ machine ].horizontal_screen; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->horizontal_screen; } libspectrum_word libspectrum_timings_right_border( libspectrum_machine machine ) { - return base_timings[ machine ].right_border; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->right_border; } libspectrum_word libspectrum_timings_horizontal_retrace( libspectrum_machine machine ) { - return base_timings[ machine ].horizontal_retrace; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->horizontal_retrace; } libspectrum_word libspectrum_timings_top_border( libspectrum_machine machine ) { - return base_timings[ machine ].top_border; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->top_border; } libspectrum_word libspectrum_timings_vertical_screen( libspectrum_machine machine ) { - return base_timings[ machine ].vertical_screen; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->vertical_screen; } libspectrum_word libspectrum_timings_bottom_border( libspectrum_machine machine ) { - return base_timings[ machine ].bottom_border; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->bottom_border; } libspectrum_word libspectrum_timings_vertical_retrace( libspectrum_machine machine ) { - return base_timings[ machine ].vertical_retrace; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->vertical_retrace; } libspectrum_word libspectrum_timings_interrupt_length( libspectrum_machine machine ) { - return base_timings[ machine ].interrupt_length; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->interrupt_length; } libspectrum_word libspectrum_timings_top_left_pixel( libspectrum_machine machine ) { - return base_timings[ machine ].top_left_pixel; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->top_left_pixel; } libspectrum_word libspectrum_timings_tstates_per_line( libspectrum_machine machine ) { - return base_timings[ machine ].left_border + - base_timings[ machine ].horizontal_screen + - base_timings[ machine ].right_border + - base_timings[ machine ].horizontal_retrace; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->left_border + f->horizontal_screen + f->right_border + + f->horizontal_retrace; } libspectrum_word libspectrum_timings_lines_per_frame( libspectrum_machine machine ) { - return base_timings[ machine ].top_border + - base_timings[ machine ].vertical_screen + - base_timings[ machine ].bottom_border + - base_timings[ machine ].vertical_retrace; + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; + return f->top_border + f->vertical_screen + f->bottom_border + + f->vertical_retrace; } libspectrum_dword libspectrum_timings_tstates_per_frame( libspectrum_machine machine ) { + const timings_frame_t *f = base_timings[ machine ].frame_timings; + if( !f ) return 0; return libspectrum_timings_tstates_per_line( machine ) * ( (libspectrum_dword)libspectrum_timings_lines_per_frame( machine ) ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-04-10 11:17:27
|
Revision: 5381 http://sourceforge.net/p/fuse-emulator/code/5381 Author: fredm Date: 2016-04-10 11:17:24 +0000 (Sun, 10 Apr 2016) Log Message: ----------- Revert revision 4731 / bug #262 as it makes configuring target flags for cross-compilation difficult (patch #357) (BogDan Vatra). Revision Links: -------------- http://sourceforge.net/p/fuse-emulator/code/4731 Modified Paths: -------------- trunk/libspectrum/Makefile.am trunk/libspectrum/hacking/ChangeLog Modified: trunk/libspectrum/Makefile.am =================================================================== --- trunk/libspectrum/Makefile.am 2016-04-09 13:51:28 UTC (rev 5380) +++ trunk/libspectrum/Makefile.am 2016-04-10 11:17:24 UTC (rev 5381) @@ -80,7 +80,7 @@ AM_CFLAGS = -DLIBSPECTRUM_EXPORTS make-perl$(EXEEXT): $(srcdir)/make-perl.c config.h - $(AM_V_CC)$(CC_FOR_BUILD) -I. $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< + $(AM_V_CC)$(CC_FOR_BUILD) -I. -o $@ $< libspectrum.h: libspectrum.h.in generate.pl snap_accessors.txt tape_accessors.txt config.h $(AM_V_GEN)$(PERL) -p generate.pl $(srcdir) $(srcdir)/libspectrum.h.in > $@.tmp && mv $@.tmp $@ Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-04-09 13:51:28 UTC (rev 5380) +++ trunk/libspectrum/hacking/ChangeLog 2016-04-10 11:17:24 UTC (rev 5381) @@ -1023,3 +1023,6 @@ 20160325 tape_block.c: allow for the possibility that inital_level has the default value (Fred). 20160329 timings.c: refactor frame timings (Stuart). +20160410 Makefile.am: revert revision 4731 / bug #262 as it makes configuring + target flags for cross-compilation difficult (patch #357) (BogDan + Vatra). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-04-24 12:33:22
|
Revision: 5386 http://sourceforge.net/p/fuse-emulator/code/5386 Author: fredm Date: 2016-04-24 12:33:20 +0000 (Sun, 24 Apr 2016) Log Message: ----------- Merge libspectrum_1_1_0-branch changes onto trunk. Modified Paths: -------------- trunk/libspectrum/ChangeLog trunk/libspectrum/README trunk/libspectrum/configure.ac trunk/libspectrum/doc/libspectrum.3 trunk/libspectrum/doc/libspectrum.txt trunk/libspectrum/hacking/ChangeLog Property Changed: ---------------- trunk/libspectrum/ Index: trunk/libspectrum =================================================================== --- trunk/libspectrum 2016-04-24 11:52:46 UTC (rev 5385) +++ trunk/libspectrum 2016-04-24 12:33:20 UTC (rev 5386) Property changes on: trunk/libspectrum ___________________________________________________________________ Modified: svn:mergeinfo ## -4,6 +4,7 ## /branches/fmfx-2010-09-14/libspectrum:4160-4662 /branches/libspectrum_0_5_0-branch:3809-3879 /branches/libspectrum_1_0_0-branch:4185-4219 +/branches/libspectrum_1_1_0-branch:4928-5385 /branches/ntsc-2009-04-11/libspectrum:4000-4147 /branches/opus-20090722/libspectrum:4046-4059 /branches/wii-20080828/libspectrum:3757-3946 \ No newline at end of property Modified: trunk/libspectrum/ChangeLog =================================================================== --- trunk/libspectrum/ChangeLog 2016-04-24 11:52:46 UTC (rev 5385) +++ trunk/libspectrum/ChangeLog 2016-04-24 12:33:20 UTC (rev 5386) @@ -1,3 +1,10 @@ +2013-05-24 Philip Kendall <phi...@sh...> + + * libspectrum 1.1.1 released. + + * Decreased libtool version to allow binaries built against + libspectrum 1.0.0 to run with libspectrum 1.1.1. + 2013-05-18 Philip Kendall <phi...@sh...> * libspectrum 1.1.0 released. Modified: trunk/libspectrum/README =================================================================== --- trunk/libspectrum/README 2016-04-24 11:52:46 UTC (rev 5385) +++ trunk/libspectrum/README 2016-04-24 12:33:20 UTC (rev 5386) @@ -1,4 +1,4 @@ -libspectrum 1.1.0 +libspectrum 1.1.1 ================= libspectrum is a library which is designed to make the input and @@ -67,6 +67,6 @@ Then, type "make" and if everything went well, "make install". Philip Kendall <phi...@sh...> -18th May, 2013 +24th May, 2013 $Id$ Modified: trunk/libspectrum/configure.ac =================================================================== --- trunk/libspectrum/configure.ac 2016-04-24 11:52:46 UTC (rev 5385) +++ trunk/libspectrum/configure.ac 2016-04-24 12:33:20 UTC (rev 5386) @@ -22,12 +22,12 @@ dnl E-mail: phi...@sh... dnl Package version -m4_define([libspectrum_version], [1.1.0]) +m4_define([libspectrum_version], [1.1.1]) dnl Product full version m4_define([libspectrum_major_version], [1]) m4_define([libspectrum_minor_version], [1]) -m4_define([libspectrum_micro_version], [0]) +m4_define([libspectrum_micro_version], [1]) m4_define([libspectrum_nano_version], [0]) m4_define([libspectrum_full_version], [libspectrum_major_version.libspectrum_minor_version.libspectrum_micro_version.libspectrum_nano_version]) Modified: trunk/libspectrum/doc/libspectrum.3 =================================================================== --- trunk/libspectrum/doc/libspectrum.3 2016-04-24 11:52:46 UTC (rev 5385) +++ trunk/libspectrum/doc/libspectrum.3 2016-04-24 12:33:20 UTC (rev 5386) @@ -22,7 +22,7 @@ .\" E-mail: phi...@sh... .\" .\" -.TH libspectrum 3 "18th May, 2013" "Version 1.1.0" "Emulators" +.TH libspectrum 3 "24th May, 2013" "Version 1.1.1" "Emulators" .\" .\"------------------------------------------------------------------ .\" Modified: trunk/libspectrum/doc/libspectrum.txt =================================================================== --- trunk/libspectrum/doc/libspectrum.txt 2016-04-24 11:52:46 UTC (rev 5385) +++ trunk/libspectrum/doc/libspectrum.txt 2016-04-24 12:33:20 UTC (rev 5386) @@ -1,4 +1,4 @@ -libspectrum 1.1.0 +libspectrum 1.1.1 ================= libspectrum is a fairly simple library designed to make the handling Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-04-24 11:52:46 UTC (rev 5385) +++ trunk/libspectrum/hacking/ChangeLog 2016-04-24 12:33:20 UTC (rev 5386) @@ -949,6 +949,10 @@ 20130518 doc/libspectrum.txt: update version number for 1.1 release (Sergio). 20130524 Makefile.am: update libtool age to support binaries built against libspectrum 1.0.0 (Stuart). +20130524 ChangeLog,README,configure.ac,doc/libspectrum.{3,txt}, + hacking/ChangeLog: updates for a "1.1.1" release (Stuart). +20130524 doc/libspectrum,README: further updates for 1.1.1(Stuart). +20130524 ChangeLog: fill in date (Stuart). 20130526 Makefile.am: add dll.c into the dist tarball (Sergio). 20130928 configure.ac: use 'subdir-objects' option as advised by automake 1.14 to place object files in subdirectories (Sergio). @@ -1026,3 +1030,6 @@ 20160410 Makefile.am: revert revision 4731 / bug #262 as it makes configuring target flags for cross-compilation difficult (patch #357) (BogDan Vatra). +20160424 ChangeLog,README,configure.ac,doc/libspectrum.{3,txt}, + hacking/ChangeLog: merge libspectrum_1_1_0-branch changes onto trunk + (Fred). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-04-27 11:46:06
|
Revision: 5411 http://sourceforge.net/p/fuse-emulator/code/5411 Author: fredm Date: 2016-04-27 11:46:03 +0000 (Wed, 27 Apr 2016) Log Message: ----------- Fix bugs handling TZX generalised data blocks with empty symbol tables (e.g. ZX81 tapes encoded as in the TZX 1.20 specification) (Andre Leiradella). Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/tape_block.c Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-04-27 11:19:56 UTC (rev 5410) +++ trunk/libspectrum/hacking/ChangeLog 2016-04-27 11:46:03 UTC (rev 5411) @@ -1033,3 +1033,6 @@ 20160424 ChangeLog,README,configure.ac,doc/libspectrum.{3,txt}, hacking/ChangeLog: merge libspectrum_1_1_0-branch changes onto trunk (Fred). +20160427 tape_block.c: fix bugs handling TZX generalised data blocks with empty + symbol tables (e.g. ZX81 tapes encoded as in the TZX 1.20 + specification) (Andre Leiradella). Modified: trunk/libspectrum/tape_block.c =================================================================== --- trunk/libspectrum/tape_block.c 2016-04-27 11:19:56 UTC (rev 5410) +++ trunk/libspectrum/tape_block.c 2016-04-27 11:46:03 UTC (rev 5411) @@ -348,12 +348,20 @@ generalised_data_init( libspectrum_tape_generalised_data_block *block, libspectrum_tape_generalised_data_block_state *state ) { - state->state = LIBSPECTRUM_TAPE_STATE_PILOT; + state->state = block->pilot_table.symbols_in_block ? + LIBSPECTRUM_TAPE_STATE_PILOT : LIBSPECTRUM_TAPE_STATE_DATA1; state->run = 0; state->symbols_through_run = 0; state->edges_through_symbol = 0; + state->current_symbol = 0; + state->symbols_through_stream = 0; + + state->current_byte = 0; + state->bits_through_byte = 0; + state->bytes_through_stream = 0; + return LIBSPECTRUM_ERROR_NONE; } @@ -447,7 +455,8 @@ table->max_pulses = (*ptr)[0]; table->symbols_in_table = (*ptr)[1]; - if( !table->symbols_in_table ) table->symbols_in_table = 256; + if( !table->symbols_in_table && table->symbols_in_block ) + table->symbols_in_table = 256; (*ptr) += 2; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-04-29 12:53:24
|
Revision: 5421 http://sourceforge.net/p/fuse-emulator/code/5421 Author: fredm Date: 2016-04-29 12:53:22 +0000 (Fri, 29 Apr 2016) Log Message: ----------- Have a go at updating copyright dates since v 1.1.1. Modified Paths: -------------- trunk/libspectrum/Makefile.am trunk/libspectrum/accessor.pl trunk/libspectrum/autogen.sh trunk/libspectrum/bzip2.c trunk/libspectrum/configure.ac trunk/libspectrum/creator.c trunk/libspectrum/crypto.c trunk/libspectrum/csw.c trunk/libspectrum/dck.c trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/ide.c trunk/libspectrum/internals.h trunk/libspectrum/libspectrum.c trunk/libspectrum/libspectrum.h.in trunk/libspectrum/make-perl.c trunk/libspectrum/memory.c trunk/libspectrum/microdrive.c trunk/libspectrum/plusd.c trunk/libspectrum/pzx_read.c trunk/libspectrum/rzx.c trunk/libspectrum/szx.c trunk/libspectrum/tape.c trunk/libspectrum/tape_block.c trunk/libspectrum/test/Makefile.am trunk/libspectrum/timings.c trunk/libspectrum/tzx_read.c trunk/libspectrum/warajevo_read.c trunk/libspectrum/wav.c trunk/libspectrum/z80.c trunk/libspectrum/z80em.c trunk/libspectrum/zlib.c trunk/libspectrum/zxs.c Modified: trunk/libspectrum/Makefile.am =================================================================== --- trunk/libspectrum/Makefile.am 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/Makefile.am 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -## Copyright (c) 2001-2013 Philip Kendall +## Copyright (c) 2001-2016 Philip Kendall ## $Id$ Modified: trunk/libspectrum/accessor.pl =================================================================== --- trunk/libspectrum/accessor.pl 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/accessor.pl 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # accessor.pl: generate accessor functions -# Copyright (c) 2003-2009 Philip Kendall +# Copyright (c) 2003-2015 Philip Kendall # $Id$ Modified: trunk/libspectrum/autogen.sh =================================================================== --- trunk/libspectrum/autogen.sh 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/autogen.sh 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,7 +1,7 @@ #!/bin/sh # autogen.sh: autotools invocation -# Copyright (c) 2004 Philip Kendall +# Copyright (c) 2004-2014 Philip Kendall, Sergio Baldoví # $Id$ Modified: trunk/libspectrum/bzip2.c =================================================================== --- trunk/libspectrum/bzip2.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/bzip2.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* bzip2.c: routines for bzip2 decompression of data - Copyright (c) 2003-2005 Philip Kendall + Copyright (c) 2003-2015 Philip Kendall $Id$ Modified: trunk/libspectrum/configure.ac =================================================================== --- trunk/libspectrum/configure.ac 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/configure.ac 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl Copyright (c) 1999-2012 Philip Kendall +dnl Copyright (c) 1999-2013 Philip Kendall dnl $Id$ Modified: trunk/libspectrum/creator.c =================================================================== --- trunk/libspectrum/creator.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/creator.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* creator.c: simple type for storing creator information - Copyright (c) 2003-2005 Philip Kendall + Copyright (c) 2003-2015 Philip Kendall $Id$ Modified: trunk/libspectrum/crypto.c =================================================================== --- trunk/libspectrum/crypto.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/crypto.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* crypto.c: crytography-related functions - Copyright (c) 2002-2005 Philip Kendall + Copyright (c) 2002-2015 Philip Kendall $Id$ Modified: trunk/libspectrum/csw.c =================================================================== --- trunk/libspectrum/csw.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/csw.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* csw.c: Routines for handling CSW raw audio files - Copyright (c) 2002-2007 Darren Salt, Fredrick Meunier + Copyright (c) 2002-2015 Darren Salt, Fredrick Meunier Based on tap.c, copyright (c) 2001 Philip Kendall $Id$ Modified: trunk/libspectrum/dck.c =================================================================== --- trunk/libspectrum/dck.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/dck.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* dck.c: Routines for handling Warajevo DCK files - Copyright (c) 2003 Darren Salt, Fredrick Meunier + Copyright (c) 2003-2015 Darren Salt, Fredrick Meunier $Id$ Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/hacking/ChangeLog 2016-04-29 12:53:22 UTC (rev 5421) @@ -1036,3 +1036,9 @@ 20160427 tape_block.c: fix bugs handling TZX generalised data blocks with empty symbol tables (e.g. ZX81 tapes encoded as in the TZX 1.20 specification) (Andre Leiradella). +20160429 Makefile.am,accessor.pl,autogen.sh,bzip2.c,configure.ac,creator.c, + crypto.c,csw.c,dck.c,ide.c,internals.h,libspectrum.c,libspectrum.h.in, + make-perl.c,memory.c,microdrive.c,plusd.c,pzx_read.c,rzx.c,szx.c, + tape.c,tape_block.c,test/Makefile.am,timings.c,tzx_read.c, + warajevo_read.c,wav.c,z80.c,z80em.c,zlib.c,zxs.c: have a go at updating + copyright dates since v 1.1.1 (Fred). Modified: trunk/libspectrum/ide.c =================================================================== --- trunk/libspectrum/ide.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/ide.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,6 +1,6 @@ /* ide.c: Routines for handling HDF hard disk files Copyright (c) 2003-2004 Garry Lancaster, - 2004 Philip Kendall + 2004,2015 Philip Kendall $Id$ Modified: trunk/libspectrum/internals.h =================================================================== --- trunk/libspectrum/internals.h 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/internals.h 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,6 +1,6 @@ /* internals.h: functions which need to be called inter-file by libspectrum routines, but not by user code - Copyright (c) 2001-2008 Philip Kendall, Darren Salt + Copyright (c) 2001-2015 Philip Kendall, Darren Salt $Id$ Modified: trunk/libspectrum/libspectrum.c =================================================================== --- trunk/libspectrum/libspectrum.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/libspectrum.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* libspectrum.c: Some general routines - Copyright (c) 2001-2009 Philip Kendall, Darren Salt, Fredrick Meunier + Copyright (c) 2001-2015 Philip Kendall, Darren Salt, Fredrick Meunier $Id$ Modified: trunk/libspectrum/libspectrum.h.in =================================================================== --- trunk/libspectrum/libspectrum.h.in 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/libspectrum.h.in 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* libspectrum.h: the library for dealing with ZX Spectrum emulator files - Copyright (c) 2001-2007 Philip Kendall, Darren Salt, Fredrick Meunier + Copyright (c) 2001-2015 Philip Kendall, Darren Salt, Fredrick Meunier $Id$ Modified: trunk/libspectrum/make-perl.c =================================================================== --- trunk/libspectrum/make-perl.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/make-perl.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* make-perl.c: Generate a perl script to create the libspectrum_* typedefs - Copyright (c) 2002-2003 Philip Kendall, Darren Salt + Copyright (c) 2002-2003,2015 Philip Kendall, Darren Salt $Id$ Modified: trunk/libspectrum/memory.c =================================================================== --- trunk/libspectrum/memory.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/memory.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,6 @@ /* memory.c: memory allocator routines Copyright (c) 2008 Philip Kendall + Copyright (c) 2015 Stuart Brady $Id$ Modified: trunk/libspectrum/microdrive.c =================================================================== --- trunk/libspectrum/microdrive.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/microdrive.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* microdrive.c: Routines for handling microdrive images - Copyright (c) 2004-2005 Philip Kendall + Copyright (c) 2004-2015 Philip Kendall $Id$ Modified: trunk/libspectrum/plusd.c =================================================================== --- trunk/libspectrum/plusd.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/plusd.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,6 +1,6 @@ /* plusd.c: Routines for handling DISCiPLE/+D snapshots Copyright (c) 1998,2003 Philip Kendall - Copyright (c) 2007 Stuart Brady + Copyright (c) 2007,2015 Stuart Brady $Id$ Modified: trunk/libspectrum/pzx_read.c =================================================================== --- trunk/libspectrum/pzx_read.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/pzx_read.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,6 +1,6 @@ /* pzx_read.c: Routines for reading .pzx files Copyright (c) 2001, 2002 Philip Kendall, Darren Salt - Copyright (c) 2011 Fredrick Meunier + Copyright (c) 2011-2015 Fredrick Meunier $Id$ Modified: trunk/libspectrum/rzx.c =================================================================== --- trunk/libspectrum/rzx.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/rzx.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* rzx.c: routines for dealing with .rzx files - Copyright (c) 2002-2014 Philip Kendall + Copyright (c) 2002-2015 Philip Kendall $Id$ Modified: trunk/libspectrum/szx.c =================================================================== --- trunk/libspectrum/szx.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/szx.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* szx.c: Routines for .szx snapshots - Copyright (c) 1998-2012 Philip Kendall, Fredrick Meunier, Stuart Brady + Copyright (c) 1998-2015 Philip Kendall, Fredrick Meunier, Stuart Brady $Id$ Modified: trunk/libspectrum/tape.c =================================================================== --- trunk/libspectrum/tape.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/tape.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* tape.c: Routines for handling tape files - Copyright (c) 2001-2008 Philip Kendall, Darren Salt, Fredrick Meunier + Copyright (c) 2001-2014 Philip Kendall, Darren Salt, Fredrick Meunier $Id$ Modified: trunk/libspectrum/tape_block.c =================================================================== --- trunk/libspectrum/tape_block.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/tape_block.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* tape_block.c: one tape block - Copyright (c) 2003-2008 Philip Kendall + Copyright (c) 2003-2016 Philip Kendall $Id$ Modified: trunk/libspectrum/test/Makefile.am =================================================================== --- trunk/libspectrum/test/Makefile.am 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/test/Makefile.am 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -## Copyright (c) 2007 Philip Kendall +## Copyright (c) 2007,2015 Philip Kendall ## $Id$ Modified: trunk/libspectrum/timings.c =================================================================== --- trunk/libspectrum/timings.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/timings.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,6 @@ /* timings.c: Timing routines Copyright (c) 2003 Philip Kendall + Copyright (c) 2016 Stuart Brady $Id$ Modified: trunk/libspectrum/tzx_read.c =================================================================== --- trunk/libspectrum/tzx_read.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/tzx_read.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* tzx_read.c: Routines for reading .tzx files - Copyright (c) 2001-2007 Philip Kendall, Darren Salt + Copyright (c) 2001-2015 Philip Kendall, Darren Salt $Id$ Modified: trunk/libspectrum/warajevo_read.c =================================================================== --- trunk/libspectrum/warajevo_read.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/warajevo_read.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,6 +1,6 @@ /* warajevo_read.c: Routines for reading Warajevo .tap files Copyright (c) 2001, 2002 Philip Kendall, Darren Salt - Copyright (c) 2003 Fredrick Meunier + Copyright (c) 2003-2015 Fredrick Meunier $Id$ Modified: trunk/libspectrum/wav.c =================================================================== --- trunk/libspectrum/wav.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/wav.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* wav.c: Routines for handling WAV raw audio files - Copyright (c) 2007 Fredrick Meunier + Copyright (c) 2007-2015 Fredrick Meunier $Id$ Modified: trunk/libspectrum/z80.c =================================================================== --- trunk/libspectrum/z80.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/z80.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* z80.c: Routines for handling .z80 snapshots - Copyright (c) 2001-2009 Philip Kendall, Darren Salt, Fredrick Meunier + Copyright (c) 2001-2015 Philip Kendall, Darren Salt, Fredrick Meunier $Id$ Modified: trunk/libspectrum/z80em.c =================================================================== --- trunk/libspectrum/z80em.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/z80em.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,4 +1,5 @@ /* z80em.c: Routines for handling Z80Em raw audio files + Copyright (c) 2015 Stuart Brady Copyright (c) 2002 Darren Salt Based on tap.c, copyright (c) 2001 Philip Kendall Modified: trunk/libspectrum/zlib.c =================================================================== --- trunk/libspectrum/zlib.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/zlib.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,6 @@ /* zlib.c: routines for zlib (de)compression of data Copyright (c) 2002 Darren Salt, Philip Kendall + Copyright (c) 2015 Stuart Brady $Id$ Modified: trunk/libspectrum/zxs.c =================================================================== --- trunk/libspectrum/zxs.c 2016-04-29 08:58:33 UTC (rev 5420) +++ trunk/libspectrum/zxs.c 2016-04-29 12:53:22 UTC (rev 5421) @@ -1,5 +1,5 @@ /* zxs.c: Routines for .zxs snapshots - Copyright (c) 1998,2003 Philip Kendall + Copyright (c) 1998,2003,2015 Philip Kendall $Id$ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sba...@us...> - 2016-04-30 06:55:51
|
Revision: 5427 http://sourceforge.net/p/fuse-emulator/code/5427 Author: sbaldovi Date: 2016-04-30 06:55:48 +0000 (Sat, 30 Apr 2016) Log Message: ----------- List more disk formats. Modified Paths: -------------- trunk/libspectrum/README trunk/libspectrum/doc/libspectrum.3 trunk/libspectrum/hacking/ChangeLog Modified: trunk/libspectrum/README =================================================================== --- trunk/libspectrum/README 2016-04-30 06:34:41 UTC (rev 5426) +++ trunk/libspectrum/README 2016-04-30 06:55:48 UTC (rev 5427) @@ -13,8 +13,8 @@ * Tape images: .tzx, .tap, .spc, .sta and .ltp (read/write) and .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). +* Disk images: .dsk (both plain and extended), .d40, .d80, .fdi, .img, + .mgt, .opd, .sad, .scl, .td0, .trd and .udi (identification only). * Timex cartridges: .dck (read only). * IDE hard disk images: .hdf (read/write). * Microdrive cartridge images: .mdr (read/write). Modified: trunk/libspectrum/doc/libspectrum.3 =================================================================== --- trunk/libspectrum/doc/libspectrum.3 2016-04-30 06:34:41 UTC (rev 5426) +++ trunk/libspectrum/doc/libspectrum.3 2016-04-30 06:55:48 UTC (rev 5427) @@ -50,8 +50,8 @@ .IP \(bu 2 Input recordings: .rzx (read/write). .IP \(bu 2 -Disk images: .dsk (both plain and extended), .fdi, .sad, .scl, .td0, .trd -and .udi (identification only). +Disk images: .dsk (both plain and extended), .d40, .d80, .fdi, .img, .mgt, +\[char46]opd, .sad, .scl, .td0, .trd and .udi (identification only). .IP \(bu 2 Timex cartridges: .dck (read only). .IP \(bu 2 Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-04-30 06:34:41 UTC (rev 5426) +++ trunk/libspectrum/hacking/ChangeLog 2016-04-30 06:55:48 UTC (rev 5427) @@ -1035,10 +1035,11 @@ (Fred). 20160427 tape_block.c: fix bugs handling TZX generalised data blocks with empty symbol tables (e.g. ZX81 tapes encoded as in the TZX 1.20 - specification) (Andre Leiradella). + specification) (patch #359) (Andre Leiradella). 20160429 Makefile.am,accessor.pl,autogen.sh,bzip2.c,configure.ac,creator.c, crypto.c,csw.c,dck.c,ide.c,internals.h,libspectrum.c,libspectrum.h.in, make-perl.c,memory.c,microdrive.c,plusd.c,pzx_read.c,rzx.c,szx.c, tape.c,tape_block.c,test/Makefile.am,timings.c,tzx_read.c, warajevo_read.c,wav.c,z80.c,z80em.c,zlib.c,zxs.c: have a go at updating copyright dates since v 1.1.1 (Fred). +20160430 README,doc/libspectrum.3: list more disk formats (Sergio). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sba...@us...> - 2016-05-01 16:22:27
|
Revision: 5437 http://sourceforge.net/p/fuse-emulator/code/5437 Author: sbaldovi Date: 2016-05-01 16:22:24 +0000 (Sun, 01 May 2016) Log Message: ----------- Don't use g_mem_set_vtable on newer GLib and distribute missing macro files. Modified Paths: -------------- trunk/libspectrum/Makefile.am trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/memory.c Modified: trunk/libspectrum/Makefile.am =================================================================== --- trunk/libspectrum/Makefile.am 2016-05-01 07:02:05 UTC (rev 5436) +++ trunk/libspectrum/Makefile.am 2016-05-01 16:22:24 UTC (rev 5437) @@ -107,6 +107,7 @@ dll.c \ generate.pl.in \ m4/audiofile.m4 \ + m4/ax_create_stdint_h.m4 \ m4/pkg.m4 \ make-perl.c \ tape_accessors.pl \ Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-05-01 07:02:05 UTC (rev 5436) +++ trunk/libspectrum/hacking/ChangeLog 2016-05-01 16:22:24 UTC (rev 5437) @@ -1043,3 +1043,5 @@ warajevo_read.c,wav.c,z80.c,z80em.c,zlib.c,zxs.c: have a go at updating copyright dates since v 1.1.1 (Fred). 20160430 README,doc/libspectrum.3: list more disk formats (Sergio). +20160501 Makefile.am,memory.c: don't use g_mem_set_vtable on newer GLib and + distribute missing macro files (Sergio). Modified: trunk/libspectrum/memory.c =================================================================== --- trunk/libspectrum/memory.c 2016-05-01 07:02:05 UTC (rev 5436) +++ trunk/libspectrum/memory.c 2016-05-01 16:22:24 UTC (rev 5437) @@ -115,6 +115,7 @@ libspectrum_free_fn = table->free; #ifdef HAVE_LIB_GLIB +#if !GLIB_CHECK_VERSION( 2, 44, 0 ) { GMemVTable glib_table; @@ -124,5 +125,6 @@ g_mem_set_vtable( &glib_table ); } +#endif /* #if !GLIB_CHECK_VERSION( 2, 44, 0 ) */ #endif /* #ifdef HAVE_LIB_GLIB */ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-05-03 10:56:49
|
Revision: 5447 http://sourceforge.net/p/fuse-emulator/code/5447 Author: fredm Date: 2016-05-03 10:56:47 +0000 (Tue, 03 May 2016) Log Message: ----------- Add skeleton of support for Currah uSource snapshots (patch #363) (Fred and Sergio). Modified Paths: -------------- trunk/libspectrum/accessor.pl trunk/libspectrum/doc/libspectrum.txt trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/sna.c trunk/libspectrum/snap_accessors.txt trunk/libspectrum/snapshot.c trunk/libspectrum/szx.c trunk/libspectrum/z80.c Modified: trunk/libspectrum/accessor.pl =================================================================== --- trunk/libspectrum/accessor.pl 2016-05-02 12:42:26 UTC (rev 5446) +++ trunk/libspectrum/accessor.pl 2016-05-03 10:56:47 UTC (rev 5447) @@ -1,7 +1,7 @@ #!/usr/bin/perl -w # accessor.pl: generate accessor functions -# Copyright (c) 2003-2015 Philip Kendall +# Copyright (c) 2003-2016 Philip Kendall # $Id$ @@ -240,6 +240,13 @@ /* Printer emulation */ int zx_printer_active; + + /* uSource emulation */ + int usource_active; + int usource_paged; + int usource_custom_rom; + libspectrum_byte* usource_rom[1]; + size_t usource_rom_length[1]; /* Length of the ROM */ }; /* Initialise a libspectrum_snap structure */ Modified: trunk/libspectrum/doc/libspectrum.txt =================================================================== --- trunk/libspectrum/doc/libspectrum.txt 2016-05-02 12:42:26 UTC (rev 5446) +++ trunk/libspectrum/doc/libspectrum.txt 2016-05-03 10:56:47 UTC (rev 5447) @@ -712,6 +712,12 @@ * int zx_printer_active +* int usource_active +* int usource_paged +* int usource_custom_rom +* libspectrum_byte* usource_rom[1] +* size_t usource_rom_length[1] + Most of those should be fairly self-explanatory; those which may not be are: Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-05-02 12:42:26 UTC (rev 5446) +++ trunk/libspectrum/hacking/ChangeLog 2016-05-03 10:56:47 UTC (rev 5447) @@ -1045,3 +1045,6 @@ 20160430 README,doc/libspectrum.3: list more disk formats (Sergio). 20160501 Makefile.am,memory.c: don't use g_mem_set_vtable on newer GLib and distribute missing macro files (Sergio). +20160503 accessor.pl,doc/libspectrum.txt,sna.c,snap_accessors.txt,snapshot.c, + szx.c,z80.c: add skeleton of support for Currah uSource snapshots + (patch #363) (Fred and Sergio). Modified: trunk/libspectrum/sna.c =================================================================== --- trunk/libspectrum/sna.c 2016-05-02 12:42:26 UTC (rev 5446) +++ trunk/libspectrum/sna.c 2016-05-03 10:56:47 UTC (rev 5447) @@ -1,5 +1,6 @@ /* sna.c: Routines for handling .sna snapshots Copyright (c) 2001-2002 Philip Kendall + Copyright (c) 2016 Fredrick Meunier $Id$ @@ -335,6 +336,10 @@ if( libspectrum_snap_spectranet_active( snap ) ) *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + /* We don't save the uSource state at all */ + if( libspectrum_snap_usource_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + ptr = *buffer; write_header( buffer, &ptr, length, snap ); Modified: trunk/libspectrum/snap_accessors.txt =================================================================== --- trunk/libspectrum/snap_accessors.txt 2016-05-02 12:42:26 UTC (rev 5446) +++ trunk/libspectrum/snap_accessors.txt 2016-05-03 10:56:47 UTC (rev 5447) @@ -1,5 +1,5 @@ # snap_accessors.txt: simple accessors for libspectrum_snap -# Copyright (c) 2003-2009 Philip Kendall +# Copyright (c) 2003-2016 Philip Kendall # $Id$ @@ -194,3 +194,9 @@ int late_timings int zx_printer_active + +int usource_active +int usource_paged +int usource_custom_rom +libspectrum_byte* usource_rom 1 +size_t usource_rom_length 1 Modified: trunk/libspectrum/snapshot.c =================================================================== --- trunk/libspectrum/snapshot.c 2016-05-02 12:42:26 UTC (rev 5446) +++ trunk/libspectrum/snapshot.c 2016-05-03 10:56:47 UTC (rev 5447) @@ -223,6 +223,12 @@ libspectrum_snap_set_zx_printer_active( snap, 0 ); + libspectrum_snap_set_usource_active( snap, 0 ); + libspectrum_snap_set_usource_paged( snap, 0 ); + libspectrum_snap_set_usource_custom_rom( snap, 0 ); + libspectrum_snap_set_usource_rom( snap, 0, NULL ); + libspectrum_snap_set_usource_rom_length( snap, 0, 0 ); + return snap; } @@ -271,6 +277,9 @@ if( libspectrum_snap_spectranet_ram( snap, 0 ) ) libspectrum_free( libspectrum_snap_spectranet_ram( snap, 0 ) ); + if( libspectrum_snap_usource_rom( snap, 0 ) ) + libspectrum_free( libspectrum_snap_usource_rom( snap, 0 ) ); + libspectrum_free( snap ); return LIBSPECTRUM_ERROR_NONE; Modified: trunk/libspectrum/szx.c =================================================================== --- trunk/libspectrum/szx.c 2016-05-02 12:42:26 UTC (rev 5446) +++ trunk/libspectrum/szx.c 2016-05-03 10:56:47 UTC (rev 5447) @@ -1,5 +1,5 @@ /* szx.c: Routines for .szx snapshots - Copyright (c) 1998-2015 Philip Kendall, Fredrick Meunier, Stuart Brady + Copyright (c) 1998-2016 Philip Kendall, Fredrick Meunier, Stuart Brady $Id$ @@ -2428,6 +2428,10 @@ *out_flags = 0; + /* We don't save the uSource state at all */ + if( libspectrum_snap_usource_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + capabilities = libspectrum_machine_capabilities( libspectrum_snap_machine( snap ) ); @@ -2458,7 +2462,6 @@ if( error ) return error; } - error = write_ram_pages( buffer, &ptr, length, snap, compress ); if( error ) return error; Modified: trunk/libspectrum/z80.c =================================================================== --- trunk/libspectrum/z80.c 2016-05-02 12:42:26 UTC (rev 5446) +++ trunk/libspectrum/z80.c 2016-05-03 10:56:47 UTC (rev 5447) @@ -1,5 +1,5 @@ /* z80.c: Routines for handling .z80 snapshots - Copyright (c) 2001-2015 Philip Kendall, Darren Salt, Fredrick Meunier + Copyright (c) 2001-2016 Philip Kendall, Darren Salt, Fredrick Meunier $Id$ @@ -1182,6 +1182,10 @@ if( libspectrum_snap_spectranet_active( snap ) ) *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + /* .z80 format doesn't save the uSource state at all */ + if( libspectrum_snap_usource_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + error = write_header( buffer, &ptr, length, out_flags, snap ); if( error != LIBSPECTRUM_ERROR_NONE ) return error; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sba...@us...> - 2016-05-08 08:53:57
|
Revision: 5459 http://sourceforge.net/p/fuse-emulator/code/5459 Author: sbaldovi Date: 2016-05-08 08:53:55 +0000 (Sun, 08 May 2016) Log Message: ----------- Use Opus flags when writing chunk. Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/szx.c Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-05-08 07:26:04 UTC (rev 5458) +++ trunk/libspectrum/hacking/ChangeLog 2016-05-08 08:53:55 UTC (rev 5459) @@ -1048,3 +1048,4 @@ 20160503 accessor.pl,doc/libspectrum.txt,sna.c,snap_accessors.txt,snapshot.c, szx.c,z80.c: add skeleton of support for Currah uSource snapshots (patch #363) (Fred and Sergio). +20160508 szx.c: use Opus flags when writing chunk (Sergio). Modified: trunk/libspectrum/szx.c =================================================================== --- trunk/libspectrum/szx.c 2016-05-08 07:26:04 UTC (rev 5458) +++ trunk/libspectrum/szx.c 2016-05-08 08:53:55 UTC (rev 5459) @@ -713,7 +713,7 @@ if( uncompressed_length != expected_length ) { libspectrum_print_error( LIBSPECTRUM_ERROR_UNKNOWN, - "%s:read_plsd_chunk: invalid ROM length " + "%s:read_opus_chunk: invalid ROM length " "in compressed file, should be %lu, file " "has %lu", __FILE__, @@ -3409,9 +3409,9 @@ write_chunk_header( buffer, ptr, length, ZXSTBID_OPUS, block_size ); - if( libspectrum_snap_opus_paged( snap ) ) flags |= ZXSTPLUSDF_PAGED; - if( use_compression ) flags |= ZXSTPLUSDF_COMPRESSED; - if( !libspectrum_snap_opus_direction( snap ) ) flags |= ZXSTPLUSDF_SEEKLOWER; + if( libspectrum_snap_opus_paged( snap ) ) flags |= ZXSTOPUSF_PAGED; + if( use_compression ) flags |= ZXSTOPUSF_COMPRESSED; + if( !libspectrum_snap_opus_direction( snap ) ) flags |= ZXSTOPUSF_SEEKLOWER; if( libspectrum_snap_opus_custom_rom( snap ) ) flags |= ZXSTOPUSF_CUSTOMROM; libspectrum_write_dword( ptr, flags ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-05-11 12:02:15
|
Revision: 5477 http://sourceforge.net/p/fuse-emulator/code/5477 Author: fredm Date: 2016-05-11 12:02:13 +0000 (Wed, 11 May 2016) Log Message: ----------- Add skeleton of support for DISCiPLE snapshots [patches:#365]. Modified Paths: -------------- trunk/libspectrum/accessor.pl trunk/libspectrum/doc/libspectrum.txt trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/sna.c trunk/libspectrum/snap_accessors.txt trunk/libspectrum/snapshot.c trunk/libspectrum/szx.c trunk/libspectrum/z80.c Modified: trunk/libspectrum/accessor.pl =================================================================== --- trunk/libspectrum/accessor.pl 2016-05-11 11:35:35 UTC (rev 5476) +++ trunk/libspectrum/accessor.pl 2016-05-11 12:02:13 UTC (rev 5477) @@ -247,6 +247,22 @@ int usource_custom_rom; libspectrum_byte* usource_rom[1]; size_t usource_rom_length[1]; /* Length of the ROM */ + + /* DISCiPLE emulation */ + int disciple_active; + int disciple_paged; + int disciple_inhibit_button; + int disciple_drive_count; + int disciple_custom_rom; + int disciple_direction; + libspectrum_byte disciple_control; + libspectrum_byte disciple_track; + libspectrum_byte disciple_sector; + libspectrum_byte disciple_data; + libspectrum_byte disciple_status; + libspectrum_byte* disciple_rom[1]; + size_t disciple_rom_length[1]; + libspectrum_byte* disciple_ram[1]; }; /* Initialise a libspectrum_snap structure */ Modified: trunk/libspectrum/doc/libspectrum.txt =================================================================== --- trunk/libspectrum/doc/libspectrum.txt 2016-05-11 11:35:35 UTC (rev 5476) +++ trunk/libspectrum/doc/libspectrum.txt 2016-05-11 12:02:13 UTC (rev 5477) @@ -718,6 +718,21 @@ * libspectrum_byte* usource_rom[1] * size_t usource_rom_length[1] +* int disciple_active +* int disciple_paged +* int disciple_inhibit_button +* int disciple_drive_count +* int disciple_custom_rom +* int disciple_direction +* libspectrum_byte disciple_control +* libspectrum_byte disciple_track +* libspectrum_byte disciple_sector +* libspectrum_byte disciple_data +* libspectrum_byte disciple_status +* libspectrum_byte* disciple_rom[1] +* size_t disciple_rom_length[1] +* libspectrum_byte* disciple_ram[1] + Most of those should be fairly self-explanatory; those which may not be are: Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-05-11 11:35:35 UTC (rev 5476) +++ trunk/libspectrum/hacking/ChangeLog 2016-05-11 12:02:13 UTC (rev 5477) @@ -1049,3 +1049,6 @@ szx.c,z80.c: add skeleton of support for Currah uSource snapshots (patch #363) (Fred and Sergio). 20160508 szx.c: use Opus flags when writing chunk (Sergio). +20160511 accessor.pl,doc/libspectrum.txt,sna.c,snap_accessors.txt,snapshot.c, + szx.c,z80.c: add skeleton of support for DISCiPLE snapshots (patch + #365) (Fred). Modified: trunk/libspectrum/sna.c =================================================================== --- trunk/libspectrum/sna.c 2016-05-11 11:35:35 UTC (rev 5476) +++ trunk/libspectrum/sna.c 2016-05-11 12:02:13 UTC (rev 5477) @@ -340,6 +340,10 @@ if( libspectrum_snap_usource_active( snap ) ) *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + /* We don't save the DISCiPLE state at all */ + if( libspectrum_snap_disciple_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + ptr = *buffer; write_header( buffer, &ptr, length, snap ); Modified: trunk/libspectrum/snap_accessors.txt =================================================================== --- trunk/libspectrum/snap_accessors.txt 2016-05-11 11:35:35 UTC (rev 5476) +++ trunk/libspectrum/snap_accessors.txt 2016-05-11 12:02:13 UTC (rev 5477) @@ -200,3 +200,18 @@ int usource_custom_rom libspectrum_byte* usource_rom 1 size_t usource_rom_length 1 + +int disciple_active +int disciple_paged +int disciple_inhibit_button +int disciple_drive_count +int disciple_custom_rom +size_t disciple_rom_length 1 +int disciple_direction +libspectrum_byte disciple_control +libspectrum_byte disciple_track +libspectrum_byte disciple_sector +libspectrum_byte disciple_data +libspectrum_byte disciple_status +libspectrum_byte* disciple_rom 1 +libspectrum_byte* disciple_ram 1 Modified: trunk/libspectrum/snapshot.c =================================================================== --- trunk/libspectrum/snapshot.c 2016-05-11 11:35:35 UTC (rev 5476) +++ trunk/libspectrum/snapshot.c 2016-05-11 12:02:13 UTC (rev 5477) @@ -229,6 +229,21 @@ libspectrum_snap_set_usource_rom( snap, 0, NULL ); libspectrum_snap_set_usource_rom_length( snap, 0, 0 ); + libspectrum_snap_set_disciple_active( snap, 0 ); + libspectrum_snap_set_disciple_paged( snap, 0 ); + libspectrum_snap_set_disciple_inhibit_button( snap, 0 ); + libspectrum_snap_set_disciple_drive_count( snap, 0 ); + libspectrum_snap_set_disciple_custom_rom( snap, 0 ); + libspectrum_snap_set_disciple_direction( snap, 0 ); + libspectrum_snap_set_disciple_control( snap, 0 ); + libspectrum_snap_set_disciple_track ( snap, 0 ); + libspectrum_snap_set_disciple_sector( snap, 0 ); + libspectrum_snap_set_disciple_data ( snap, 0 ); + libspectrum_snap_set_disciple_status( snap, 0 ); + libspectrum_snap_set_disciple_rom( snap, 0, NULL ); + libspectrum_snap_set_disciple_rom_length( snap, 0, 0 ); + libspectrum_snap_set_disciple_ram( snap, 0, NULL ); + return snap; } @@ -280,6 +295,11 @@ if( libspectrum_snap_usource_rom( snap, 0 ) ) libspectrum_free( libspectrum_snap_usource_rom( snap, 0 ) ); + if( libspectrum_snap_disciple_rom( snap, 0 ) ) + libspectrum_free( libspectrum_snap_disciple_rom( snap, 0 ) ); + if( libspectrum_snap_disciple_ram( snap, 0 ) ) + libspectrum_free( libspectrum_snap_disciple_ram( snap, 0 ) ); + libspectrum_free( snap ); return LIBSPECTRUM_ERROR_NONE; Modified: trunk/libspectrum/szx.c =================================================================== --- trunk/libspectrum/szx.c 2016-05-11 11:35:35 UTC (rev 5476) +++ trunk/libspectrum/szx.c 2016-05-11 12:02:13 UTC (rev 5477) @@ -2432,6 +2432,10 @@ if( libspectrum_snap_usource_active( snap ) ) *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + /* We don't save the DISCiPLE state at all */ + if( libspectrum_snap_disciple_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + capabilities = libspectrum_machine_capabilities( libspectrum_snap_machine( snap ) ); Modified: trunk/libspectrum/z80.c =================================================================== --- trunk/libspectrum/z80.c 2016-05-11 11:35:35 UTC (rev 5476) +++ trunk/libspectrum/z80.c 2016-05-11 12:02:13 UTC (rev 5477) @@ -1186,6 +1186,11 @@ if( libspectrum_snap_usource_active( snap ) ) *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + /* .z80 format doesn't save the DISCiPLE state well but we don't support + what is there either */ + if( libspectrum_snap_disciple_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + error = write_header( buffer, &ptr, length, out_flags, snap ); if( error != LIBSPECTRUM_ERROR_NONE ) return error; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-05-14 12:20:23
|
Revision: 5483 http://sourceforge.net/p/fuse-emulator/code/5483 Author: fredm Date: 2016-05-14 12:20:21 +0000 (Sat, 14 May 2016) Log Message: ----------- Add skeleton of support for Didaktik 80 MDOS 1 snapshots (patch #364). Modified Paths: -------------- trunk/libspectrum/accessor.pl trunk/libspectrum/doc/libspectrum.txt trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/sna.c trunk/libspectrum/snap_accessors.txt trunk/libspectrum/snapshot.c trunk/libspectrum/szx.c trunk/libspectrum/z80.c Modified: trunk/libspectrum/accessor.pl =================================================================== --- trunk/libspectrum/accessor.pl 2016-05-12 11:07:17 UTC (rev 5482) +++ trunk/libspectrum/accessor.pl 2016-05-14 12:20:21 UTC (rev 5483) @@ -263,6 +263,21 @@ libspectrum_byte* disciple_rom[1]; size_t disciple_rom_length[1]; libspectrum_byte* disciple_ram[1]; + + /* Didaktik 80 MDOS 1 emulation */ + int didaktik80_active; + int didaktik80_paged; + int didaktik80_drive_count; + int didaktik80_custom_rom; + int didaktik80_direction; + libspectrum_byte didaktik80_aux; + libspectrum_byte didaktik80_track; + libspectrum_byte didaktik80_sector; + libspectrum_byte didaktik80_data; + libspectrum_byte didaktik80_status; + libspectrum_byte* didaktik80_rom[1]; + size_t didaktik80_rom_length[1]; + libspectrum_byte* didaktik80_ram[1]; }; /* Initialise a libspectrum_snap structure */ Modified: trunk/libspectrum/doc/libspectrum.txt =================================================================== --- trunk/libspectrum/doc/libspectrum.txt 2016-05-12 11:07:17 UTC (rev 5482) +++ trunk/libspectrum/doc/libspectrum.txt 2016-05-14 12:20:21 UTC (rev 5483) @@ -733,6 +733,20 @@ * size_t disciple_rom_length[1] * libspectrum_byte* disciple_ram[1] +* int didaktik80_active; +* int didaktik80_paged; +* int didaktik80_drive_count; +* int didaktik80_custom_rom; +* int didaktik80_direction; +* libspectrum_byte didaktik80_aux; +* libspectrum_byte didaktik80_track; +* libspectrum_byte didaktik80_sector; +* libspectrum_byte didaktik80_data; +* libspectrum_byte didaktik80_status; +* libspectrum_byte* didaktik80_rom[1]; +* size_t didaktik80_rom_length[1]; +* libspectrum_byte* didaktik80_ram[1]; + Most of those should be fairly self-explanatory; those which may not be are: Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-05-12 11:07:17 UTC (rev 5482) +++ trunk/libspectrum/hacking/ChangeLog 2016-05-14 12:20:21 UTC (rev 5483) @@ -1052,3 +1052,6 @@ 20160511 accessor.pl,doc/libspectrum.txt,sna.c,snap_accessors.txt,snapshot.c, szx.c,z80.c: add skeleton of support for DISCiPLE snapshots (patch #365) (Fred). +20160511 accessor.pl,doc/libspectrum.txt,sna.c,snap_accessors.txt,snapshot.c, + szx.c,z80.c: add skeleton of support for Didaktik 80 MDOS 1 snapshots + (patch #364) (Fred). Modified: trunk/libspectrum/sna.c =================================================================== --- trunk/libspectrum/sna.c 2016-05-12 11:07:17 UTC (rev 5482) +++ trunk/libspectrum/sna.c 2016-05-14 12:20:21 UTC (rev 5483) @@ -344,6 +344,10 @@ if( libspectrum_snap_disciple_active( snap ) ) *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + /* We don't save the Didaktik80 state at all */ + if( libspectrum_snap_didaktik80_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + ptr = *buffer; write_header( buffer, &ptr, length, snap ); Modified: trunk/libspectrum/snap_accessors.txt =================================================================== --- trunk/libspectrum/snap_accessors.txt 2016-05-12 11:07:17 UTC (rev 5482) +++ trunk/libspectrum/snap_accessors.txt 2016-05-14 12:20:21 UTC (rev 5483) @@ -215,3 +215,17 @@ libspectrum_byte disciple_status libspectrum_byte* disciple_rom 1 libspectrum_byte* disciple_ram 1 + +int didaktik80_active +int didaktik80_paged +int didaktik80_drive_count +int didaktik80_custom_rom +size_t didaktik80_rom_length 1 +int didaktik80_direction +libspectrum_byte didaktik80_aux +libspectrum_byte didaktik80_track +libspectrum_byte didaktik80_sector +libspectrum_byte didaktik80_data +libspectrum_byte didaktik80_status +libspectrum_byte* didaktik80_rom 1 +libspectrum_byte* didaktik80_ram 1 Modified: trunk/libspectrum/snapshot.c =================================================================== --- trunk/libspectrum/snapshot.c 2016-05-12 11:07:17 UTC (rev 5482) +++ trunk/libspectrum/snapshot.c 2016-05-14 12:20:21 UTC (rev 5483) @@ -244,6 +244,20 @@ libspectrum_snap_set_disciple_rom_length( snap, 0, 0 ); libspectrum_snap_set_disciple_ram( snap, 0, NULL ); + libspectrum_snap_set_didaktik80_active( snap, 0 ); + libspectrum_snap_set_didaktik80_paged( snap, 0 ); + libspectrum_snap_set_didaktik80_drive_count( snap, 0 ); + libspectrum_snap_set_didaktik80_custom_rom( snap, 0 ); + libspectrum_snap_set_didaktik80_direction( snap, 0 ); + libspectrum_snap_set_didaktik80_aux( snap, 0 ); + libspectrum_snap_set_didaktik80_track ( snap, 0 ); + libspectrum_snap_set_didaktik80_sector( snap, 0 ); + libspectrum_snap_set_didaktik80_data ( snap, 0 ); + libspectrum_snap_set_didaktik80_status( snap, 0 ); + libspectrum_snap_set_didaktik80_rom( snap, 0, NULL ); + libspectrum_snap_set_didaktik80_rom_length( snap, 0, 0 ); + libspectrum_snap_set_didaktik80_ram( snap, 0, NULL ); + return snap; } @@ -300,6 +314,11 @@ if( libspectrum_snap_disciple_ram( snap, 0 ) ) libspectrum_free( libspectrum_snap_disciple_ram( snap, 0 ) ); + if( libspectrum_snap_didaktik80_rom( snap, 0 ) ) + libspectrum_free( libspectrum_snap_didaktik80_rom( snap, 0 ) ); + if( libspectrum_snap_didaktik80_ram( snap, 0 ) ) + libspectrum_free( libspectrum_snap_didaktik80_ram( snap, 0 ) ); + libspectrum_free( snap ); return LIBSPECTRUM_ERROR_NONE; Modified: trunk/libspectrum/szx.c =================================================================== --- trunk/libspectrum/szx.c 2016-05-12 11:07:17 UTC (rev 5482) +++ trunk/libspectrum/szx.c 2016-05-14 12:20:21 UTC (rev 5483) @@ -2436,6 +2436,10 @@ if( libspectrum_snap_disciple_active( snap ) ) *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + /* We don't save the Didaktik80 state at all */ + if( libspectrum_snap_didaktik80_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + capabilities = libspectrum_machine_capabilities( libspectrum_snap_machine( snap ) ); Modified: trunk/libspectrum/z80.c =================================================================== --- trunk/libspectrum/z80.c 2016-05-12 11:07:17 UTC (rev 5482) +++ trunk/libspectrum/z80.c 2016-05-14 12:20:21 UTC (rev 5483) @@ -1191,6 +1191,10 @@ if( libspectrum_snap_disciple_active( snap ) ) *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + /* .z80 format doesn't save the Didaktik80 state at all */ + if( libspectrum_snap_didaktik80_active( snap ) ) + *out_flags |= LIBSPECTRUM_FLAG_SNAPSHOT_MAJOR_INFO_LOSS; + error = write_header( buffer, &ptr, length, out_flags, snap ); if( error != LIBSPECTRUM_ERROR_NONE ) return error; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-05-21 06:46:17
|
Revision: 5501 http://sourceforge.net/p/fuse-emulator/code/5501 Author: fredm Date: 2016-05-21 06:46:15 +0000 (Sat, 21 May 2016) Log Message: ----------- Reset uncompressed size when loading Opus and +D custom ROM (from patch #366) (Sergio). Modified Paths: -------------- trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/szx.c Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-05-21 05:38:43 UTC (rev 5500) +++ trunk/libspectrum/hacking/ChangeLog 2016-05-21 06:46:15 UTC (rev 5501) @@ -1055,3 +1055,5 @@ 20160514 accessor.pl,doc/libspectrum.txt,sna.c,snap_accessors.txt,snapshot.c, szx.c,z80.c: add skeleton of support for Didaktik 80 MDOS 1 snapshots (patch #364) (Fred). +20160521 szx.c: reset uncompressed size when loading Opus and +D custom ROM + (from patch #366) (Sergio). Modified: trunk/libspectrum/szx.c =================================================================== --- trunk/libspectrum/szx.c 2016-05-21 05:38:43 UTC (rev 5500) +++ trunk/libspectrum/szx.c 2016-05-21 06:46:15 UTC (rev 5501) @@ -705,6 +705,8 @@ *buffer += disc_ram_length; if( libspectrum_snap_opus_custom_rom( snap ) ) { + uncompressed_length = 0; + error = libspectrum_zlib_inflate( *buffer, disc_rom_length, &rom_data, &uncompressed_length ); if( error ) return error; @@ -894,6 +896,8 @@ *buffer += disc_ram_length; if( libspectrum_snap_plusd_custom_rom( snap ) ) { + uncompressed_length = 0; + error = libspectrum_zlib_inflate( *buffer, disc_rom_length, &rom_data, &uncompressed_length ); if( error ) return error; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sba...@us...> - 2016-05-29 22:05:48
|
Revision: 5551 http://sourceforge.net/p/fuse-emulator/code/5551 Author: sbaldovi Date: 2016-05-29 22:05:45 +0000 (Sun, 29 May 2016) Log Message: ----------- List more disk formats. Modified Paths: -------------- trunk/libspectrum/doc/libspectrum.txt trunk/libspectrum/hacking/ChangeLog Modified: trunk/libspectrum/doc/libspectrum.txt =================================================================== --- trunk/libspectrum/doc/libspectrum.txt 2016-05-29 21:37:50 UTC (rev 5550) +++ trunk/libspectrum/doc/libspectrum.txt 2016-05-29 22:05:45 UTC (rev 5551) @@ -10,8 +10,8 @@ * Tape images: .tzx, .tap, .spc, .sta and .ltp (read/write) and .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). +* Disk images: .dsk (both plain and extended), .d40, .d80, .fdi, .img, .mgt, + .opd, .sad, .scl, .td0, .trd and .udi (identification only). * Timex cartridges: .dck (read only). * IDE hard disk images: .hdf (read/write). * Microdrive cartridge images: .mdr (read/write). Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-05-29 21:37:50 UTC (rev 5550) +++ trunk/libspectrum/hacking/ChangeLog 2016-05-29 22:05:45 UTC (rev 5551) @@ -1057,3 +1057,4 @@ (patch #364) (Fred). 20160521 szx.c: reset uncompressed size when loading Opus and +D custom ROM (from patch #366) (Sergio). +20160530 doc/libspectrum.txt: list more disk formats (Sergio). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-06-07 11:04:01
|
Revision: 5603 http://sourceforge.net/p/fuse-emulator/code/5603 Author: fredm Date: 2016-06-07 11:03:58 +0000 (Tue, 07 Jun 2016) Log Message: ----------- Merge libspectrum_1_2_0-branch back to trunk. Modified Paths: -------------- trunk/libspectrum/ChangeLog trunk/libspectrum/Makefile.am trunk/libspectrum/README trunk/libspectrum/configure.ac trunk/libspectrum/doc/libspectrum.3 trunk/libspectrum/doc/libspectrum.txt trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/snapshot.c Property Changed: ---------------- trunk/libspectrum/ Index: trunk/libspectrum =================================================================== --- trunk/libspectrum 2016-06-07 10:36:29 UTC (rev 5602) +++ trunk/libspectrum 2016-06-07 11:03:58 UTC (rev 5603) Property changes on: trunk/libspectrum ___________________________________________________________________ Modified: svn:mergeinfo ## -6,6 +6,7 ## /branches/libspectrum_0_5_0-branch:3809-3879 /branches/libspectrum_1_0_0-branch:4185-4219 /branches/libspectrum_1_1_0-branch:4928-5385 +/branches/libspectrum_1_2_0-branch:5388-5602 /branches/ntsc-2009-04-11/libspectrum:4000-4147 /branches/opus-20090722/libspectrum:4046-4059 /branches/wii-20080828/libspectrum:3757-3946 \ No newline at end of property Modified: trunk/libspectrum/ChangeLog =================================================================== --- trunk/libspectrum/ChangeLog 2016-06-07 10:36:29 UTC (rev 5602) +++ trunk/libspectrum/ChangeLog 2016-06-07 11:03:58 UTC (rev 5603) @@ -1,3 +1,42 @@ +2016-06-06 Philip Kendall <phi...@sh...> + + * libspectrum 1.2.0 released. + + * Allow finalising RZX recordings (Sergio Baldoví). + + * Support for Didaktik D80 disk class (Gergely Szasz). + + * Use SZX format for interspersed snapshots in RZX recordings (Sergio + Baldoví). + + * Add libspectrum_{new,new0,renew}(), libspectrum_{m,re}alloc_n() + memory macros (Stuart Brady). + + * Rename libspectrum_calloc() to libspectrum_malloc0_n() (Stuart Brady). + + * Various minor bug fixes/improvements: + * Modernise autoconf support (Sergio Baldoví). + * Fix snapshot insertion in RZX recordings (Sergio Baldoví). + * Ensure we have an edge at the end of a tape - fixes loading of Moon + Cresta (Fredrick Meunier). + * Avoid reliance on undefined pointer overflow in buffer length checks + (Stuart Brady). + * Add ARRAY_SIZE macro (Stuart Brady). + * Fix overallocation for uncompressed Z80 v2 data blocks (Stuart + Brady). + * Check for overflow in libspectrum_calloc() (Stuart Brady). + * Replace automatic fallback to GLib replacement with --with-fake-glib + flag (Stuart Brady). + * const and static cleanups (Stuart Brady). + * Fix compilation on systems without stdint.h (Stuart Brady). + * C89 compilation fixes (Adrien Destugues) + * Refactor frame timings (Stuart Brady). + * Add pkg.m4 for PKG_CHECK_MODULES in case the platform doesn't have + pkg-config installed (Sergio Baldoví). + * Enable silent rules for perl and windres commands (Sergio Baldoví). + * Allow for the initial_level of PZX data blocks to have the default + value (Fredrick Meunier). + 2013-05-24 Philip Kendall <phi...@sh...> * libspectrum 1.1.1 released. Modified: trunk/libspectrum/Makefile.am =================================================================== --- trunk/libspectrum/Makefile.am 2016-06-07 10:36:29 UTC (rev 5602) +++ trunk/libspectrum/Makefile.am 2016-06-07 11:03:58 UTC (rev 5603) @@ -63,7 +63,7 @@ zlib.c \ zxs.c -libspectrum_la_LDFLAGS = -version-info 9:0:1 -no-undefined @WINDRES_LDFLAGS@ +libspectrum_la_LDFLAGS = -version-info 10:0:2 -no-undefined @WINDRES_LDFLAGS@ libspectrum_la_LIBADD = @AUDIOFILE_LIBS@ @GLIB_LIBS@ -lm Modified: trunk/libspectrum/README =================================================================== --- trunk/libspectrum/README 2016-06-07 10:36:29 UTC (rev 5602) +++ trunk/libspectrum/README 2016-06-07 11:03:58 UTC (rev 5603) @@ -1,4 +1,4 @@ -libspectrum 1.1.1 +libspectrum 1.2.0 ================= libspectrum is a library which is designed to make the input and @@ -67,6 +67,6 @@ Then, type "make" and if everything went well, "make install". Philip Kendall <phi...@sh...> -24th May, 2013 +6th June, 2016 $Id$ Modified: trunk/libspectrum/configure.ac =================================================================== --- trunk/libspectrum/configure.ac 2016-06-07 10:36:29 UTC (rev 5602) +++ trunk/libspectrum/configure.ac 2016-06-07 11:03:58 UTC (rev 5603) @@ -22,12 +22,12 @@ dnl E-mail: phi...@sh... dnl Package version -m4_define([libspectrum_version], [1.1.1]) +m4_define([libspectrum_version], [1.2.0]) dnl Product full version m4_define([libspectrum_major_version], [1]) -m4_define([libspectrum_minor_version], [1]) -m4_define([libspectrum_micro_version], [1]) +m4_define([libspectrum_minor_version], [2]) +m4_define([libspectrum_micro_version], [0]) m4_define([libspectrum_nano_version], [0]) m4_define([libspectrum_full_version], [libspectrum_major_version.libspectrum_minor_version.libspectrum_micro_version.libspectrum_nano_version]) @@ -35,7 +35,7 @@ [libspectrum_major_version,libspectrum_minor_version,libspectrum_micro_version,libspectrum_nano_version]) dnl Package info -m4_define([libspectrum_copyright], ["(c) 1999-2013 Philip Kendall and others"]) +m4_define([libspectrum_copyright], ["(c) 1999-2016 Philip Kendall and others"]) m4_define([libspectrum_url], [http://fuse-emulator.sourceforge.net/libspectrum.php]) m4_define([libspectrum_bugreport], Modified: trunk/libspectrum/doc/libspectrum.3 =================================================================== --- trunk/libspectrum/doc/libspectrum.3 2016-06-07 10:36:29 UTC (rev 5602) +++ trunk/libspectrum/doc/libspectrum.3 2016-06-07 11:03:58 UTC (rev 5603) @@ -22,7 +22,7 @@ .\" E-mail: phi...@sh... .\" .\" -.TH libspectrum 3 "24th May, 2013" "Version 1.1.1" "Emulators" +.TH libspectrum 3 "6th June, 2016" "Version 1.2.0" "Emulators" .\" .\"------------------------------------------------------------------ .\" Modified: trunk/libspectrum/doc/libspectrum.txt =================================================================== --- trunk/libspectrum/doc/libspectrum.txt 2016-06-07 10:36:29 UTC (rev 5602) +++ trunk/libspectrum/doc/libspectrum.txt 2016-06-07 11:03:58 UTC (rev 5603) @@ -1,4 +1,4 @@ -libspectrum 1.1.1 +libspectrum 1.2.0 ================= libspectrum is a fairly simple library designed to make the handling Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-06-07 10:36:29 UTC (rev 5602) +++ trunk/libspectrum/hacking/ChangeLog 2016-06-07 11:03:58 UTC (rev 5603) @@ -1033,6 +1033,14 @@ 20160424 ChangeLog,README,configure.ac,doc/libspectrum.{3,txt}, hacking/ChangeLog: merge libspectrum_1_1_0-branch changes onto trunk (Fred). +20160424 ChangeLog,Makefile.am,README,configure.ac,doc/libspectrum.txt: + bump version number for 1.2.0 release (Fred). +20160425 snapshot.c: revert [r5161] store PC-1 for all snapshot formats whilst + in the halted state as the matching Fuse changes are reverted for now + (Fred). +20160425 ChangeLog,README: first updates for a "1.2.0" release (Fred). +20160426 Makefile.am: change version to 10:0:2 as the ABI is compatible with + libspectrum 1.1.1 (Sergio). 20160427 tape_block.c: fix bugs handling TZX generalised data blocks with empty symbol tables (e.g. ZX81 tapes encoded as in the TZX 1.20 specification) (patch #359) (Andre Leiradella). @@ -1045,6 +1053,8 @@ 20160430 README,doc/libspectrum.3: list more disk formats (Sergio). 20160501 Makefile.am,memory.c: don't use g_mem_set_vtable on newer GLib and distribute missing macro files (Sergio). +20160501 doc/libspectrum.3: bump more version numbers for 1.2.0 release + (Sergio). 20160503 accessor.pl,doc/libspectrum.txt,sna.c,snap_accessors.txt,snapshot.c, szx.c,z80.c: add skeleton of support for Currah uSource snapshots (patch #363) (Fred and Sergio). @@ -1057,4 +1067,8 @@ (patch #364) (Fred). 20160521 szx.c: reset uncompressed size when loading Opus and +D custom ROM (from patch #366) (Sergio). +20160529 README,doc/libspectrum.3: update release dates (Fred). +20160529 configure.ac: mark this release as 1.2.0-pre1 (Fred). 20160530 doc/libspectrum.txt: list more disk formats (Sergio). +20160606 ChangeLog,README,configure.ac,doc/libspectrum.3: update release dates + and mark this release as 1.2.0 (Fred). Modified: trunk/libspectrum/snapshot.c =================================================================== --- trunk/libspectrum/snapshot.c 2016-06-07 10:36:29 UTC (rev 5602) +++ trunk/libspectrum/snapshot.c 2016-06-07 11:03:58 UTC (rev 5603) @@ -409,13 +409,6 @@ return LIBSPECTRUM_ERROR_LOGIC; } - /* Sadly, virtually all emulators handle saving of PC incorrectly when - * executing a HALT instruction, so it's easiest to deal with this just - * once, so that it affects all snapshot formats. */ - if( libspectrum_snap_halted( snap ) ) { - libspectrum_snap_set_pc( snap, libspectrum_snap_pc( snap ) + 1 ); - } - libspectrum_free( new_buffer ); return error; } @@ -428,7 +421,6 @@ { libspectrum_class_t class; libspectrum_error error; - libspectrum_word orig_pc; error = libspectrum_identify_class( &class, type ); if( error ) return error; @@ -439,29 +431,17 @@ return LIBSPECTRUM_ERROR_INVALID; } - /* Sadly, virtually all emulators handle saving of PC incorrectly when - * executing a HALT instruction, so it's easiest to deal with this just - * once, so that it affects all snapshot formats. */ - orig_pc = libspectrum_snap_pc( snap ); - if( libspectrum_snap_halted( snap ) ) { - libspectrum_snap_set_pc( snap, orig_pc - 1 ); - } - switch( type ) { case LIBSPECTRUM_ID_SNAPSHOT_SNA: - error = libspectrum_sna_write( buffer, length, out_flags, snap, in_flags ); - break; + return libspectrum_sna_write( buffer, length, out_flags, snap, in_flags ); case LIBSPECTRUM_ID_SNAPSHOT_SZX: - error = libspectrum_szx_write( buffer, length, out_flags, snap, creator, - in_flags ); - break; + return libspectrum_szx_write( buffer, length, out_flags, snap, creator, + in_flags ); case LIBSPECTRUM_ID_SNAPSHOT_Z80: - error = libspectrum_z80_write2( buffer, length, out_flags, snap, - in_flags ); - break; + return libspectrum_z80_write2( buffer, length, out_flags, snap, in_flags ); default: libspectrum_print_error( LIBSPECTRUM_ERROR_UNKNOWN, @@ -469,11 +449,6 @@ return LIBSPECTRUM_ERROR_UNKNOWN; } - - /* Put back the correct value of PC, in case snap is needed again */ - libspectrum_snap_set_pc( snap, orig_pc ); - - return error; } /* Given a 48K memory dump `data', place it into the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sba...@us...> - 2016-06-19 16:59:34
|
Revision: 5649 http://sourceforge.net/p/fuse-emulator/code/5649 Author: sbaldovi Date: 2016-06-19 16:59:31 +0000 (Sun, 19 Jun 2016) Log Message: ----------- Completely reintegrate libspectrum_0_5_0-branch. Modified Paths: -------------- trunk/libspectrum/ChangeLog Property Changed: ---------------- trunk/libspectrum/ Index: trunk/libspectrum =================================================================== --- trunk/libspectrum 2016-06-18 21:54:46 UTC (rev 5648) +++ trunk/libspectrum 2016-06-19 16:59:31 UTC (rev 5649) Property changes on: trunk/libspectrum ___________________________________________________________________ Modified: svn:mergeinfo ## -3,7 +3,7 ## /branches/2011-05-04-memory/libspectrum:4419-4550 /branches/2016-05-17-debugger-dereference/libspectrum:5490-5516 /branches/fmfx-2010-09-14/libspectrum:4160-4662 -/branches/libspectrum_0_5_0-branch:3809-3879 +/branches/libspectrum_0_5_0-branch:3809-3956 /branches/libspectrum_1_0_0-branch:4185-4219 /branches/libspectrum_1_1_0-branch:4928-5385 /branches/libspectrum_1_2_0-branch:5387-5603 \ No newline at end of property Modified: trunk/libspectrum/ChangeLog =================================================================== --- trunk/libspectrum/ChangeLog 2016-06-18 21:54:46 UTC (rev 5648) +++ trunk/libspectrum/ChangeLog 2016-06-19 16:59:31 UTC (rev 5649) @@ -104,8 +104,16 @@ * Remove various unused variables, initialisations etc (Fredrick Meunier). -2008-11-30 Philip Kendall <phi...@sh...> +2009-01-14 Philip Kendall <phi...@sh...> + * libspectrum 0.5.0.1 released + + * Loosen signature checks for .dsk files to allow files not strictly + compliant with the specification to work (Gergely Szasz; thanks, + zx81 and Simon Owen). + +2008-12-03 Philip Kendall <phi...@sh...> + * libspectrum 0.5.0 released. * Memory management change: memory allocation functions now abort This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-07-09 11:24:12
|
Revision: 5674 http://sourceforge.net/p/fuse-emulator/code/5674 Author: fredm Date: 2016-07-09 11:24:09 +0000 (Sat, 09 Jul 2016) Log Message: ----------- Bump some version numbers for 1.2.1 release. Modified Paths: -------------- trunk/libspectrum/ChangeLog trunk/libspectrum/README trunk/libspectrum/configure.ac trunk/libspectrum/doc/libspectrum.3 trunk/libspectrum/doc/libspectrum.txt trunk/libspectrum/hacking/ChangeLog Modified: trunk/libspectrum/ChangeLog =================================================================== --- trunk/libspectrum/ChangeLog 2016-07-09 11:05:52 UTC (rev 5673) +++ trunk/libspectrum/ChangeLog 2016-07-09 11:24:09 UTC (rev 5674) @@ -1,3 +1,11 @@ +2016-07-?? Philip Kendall <phi...@sh...> + + * libspectrum 1.2.1 released. + + * Add implementations of g_array_sized_new() and + g_array_remove_index_fast() for glib replacement (thanks, Sergio + Baldoví) (Philip Kendall). + 2016-06-06 Philip Kendall <phi...@sh...> * libspectrum 1.2.0 released. Modified: trunk/libspectrum/README =================================================================== --- trunk/libspectrum/README 2016-07-09 11:05:52 UTC (rev 5673) +++ trunk/libspectrum/README 2016-07-09 11:24:09 UTC (rev 5674) @@ -1,4 +1,4 @@ -libspectrum 1.2.0 +libspectrum 1.2.1 ================= libspectrum is a library which is designed to make the input and Modified: trunk/libspectrum/configure.ac =================================================================== --- trunk/libspectrum/configure.ac 2016-07-09 11:05:52 UTC (rev 5673) +++ trunk/libspectrum/configure.ac 2016-07-09 11:24:09 UTC (rev 5674) @@ -22,12 +22,12 @@ dnl E-mail: phi...@sh... dnl Package version -m4_define([libspectrum_version], [1.2.0]) +m4_define([libspectrum_version], [1.2.1]) dnl Product full version m4_define([libspectrum_major_version], [1]) m4_define([libspectrum_minor_version], [2]) -m4_define([libspectrum_micro_version], [0]) +m4_define([libspectrum_micro_version], [1]) m4_define([libspectrum_nano_version], [0]) m4_define([libspectrum_full_version], [libspectrum_major_version.libspectrum_minor_version.libspectrum_micro_version.libspectrum_nano_version]) Modified: trunk/libspectrum/doc/libspectrum.3 =================================================================== --- trunk/libspectrum/doc/libspectrum.3 2016-07-09 11:05:52 UTC (rev 5673) +++ trunk/libspectrum/doc/libspectrum.3 2016-07-09 11:24:09 UTC (rev 5674) @@ -22,7 +22,7 @@ .\" E-mail: phi...@sh... .\" .\" -.TH libspectrum 3 "6th June, 2016" "Version 1.2.0" "Emulators" +.TH libspectrum 3 "6th June, 2016" "Version 1.2.1" "Emulators" .\" .\"------------------------------------------------------------------ .\" Modified: trunk/libspectrum/doc/libspectrum.txt =================================================================== --- trunk/libspectrum/doc/libspectrum.txt 2016-07-09 11:05:52 UTC (rev 5673) +++ trunk/libspectrum/doc/libspectrum.txt 2016-07-09 11:24:09 UTC (rev 5674) @@ -1,4 +1,4 @@ -libspectrum 1.2.0 +libspectrum 1.2.1 ================= libspectrum is a fairly simple library designed to make the handling Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-07-09 11:05:52 UTC (rev 5673) +++ trunk/libspectrum/hacking/ChangeLog 2016-07-09 11:24:09 UTC (rev 5674) @@ -1075,3 +1075,5 @@ 20160622 make-perl.c,myglib/garray.c: add implementations of g_array_sized_new() and g_array_remove_index_fast(). (Thanks, Sergio) (Phil). +20160709 ChangeLog,README,configure.ac,doc/{libspectrum.3,libspectrum.txt}: + bump some version numbers for 1.2.1 release (Fred). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fr...@us...> - 2016-07-19 10:57:41
|
Revision: 5690 http://sourceforge.net/p/fuse-emulator/code/5690 Author: fredm Date: 2016-07-19 10:57:38 +0000 (Tue, 19 Jul 2016) Log Message: ----------- Merge libspectrum_1_2_0-branch back to trunk for 1.2.1 release. Modified Paths: -------------- trunk/libspectrum/ChangeLog trunk/libspectrum/Makefile.am trunk/libspectrum/README trunk/libspectrum/doc/libspectrum.3 trunk/libspectrum/hacking/ChangeLog Property Changed: ---------------- trunk/libspectrum/ Index: trunk/libspectrum =================================================================== --- trunk/libspectrum 2016-07-19 10:51:41 UTC (rev 5689) +++ trunk/libspectrum 2016-07-19 10:57:38 UTC (rev 5690) Property changes on: trunk/libspectrum ___________________________________________________________________ Modified: svn:mergeinfo ## -8,7 +8,7 ## /branches/libspectrum_0_5_0-branch:3809-3956 /branches/libspectrum_1_0_0-branch:4185-4222 /branches/libspectrum_1_1_0-branch:4928-5385 -/branches/libspectrum_1_2_0-branch:5387-5603 +/branches/libspectrum_1_2_0-branch:5387-5689 /branches/ntsc-2009-04-11/libspectrum:4000-4147 /branches/opus-20090722/libspectrum:4046-4059 /branches/wii-20080828/libspectrum:3757-3946 \ No newline at end of property Modified: trunk/libspectrum/ChangeLog =================================================================== --- trunk/libspectrum/ChangeLog 2016-07-19 10:51:41 UTC (rev 5689) +++ trunk/libspectrum/ChangeLog 2016-07-19 10:57:38 UTC (rev 5690) @@ -1,4 +1,4 @@ -2016-07-?? Philip Kendall <phi...@sh...> +2016-07-17 Philip Kendall <phi...@sh...> * libspectrum 1.2.1 released. Modified: trunk/libspectrum/Makefile.am =================================================================== --- trunk/libspectrum/Makefile.am 2016-07-19 10:51:41 UTC (rev 5689) +++ trunk/libspectrum/Makefile.am 2016-07-19 10:57:38 UTC (rev 5690) @@ -63,7 +63,16 @@ zlib.c \ zxs.c -libspectrum_la_LDFLAGS = -version-info 10:0:2 -no-undefined @WINDRES_LDFLAGS@ +## The version info is made of three components: current, revision and age +## We update the version when we release according to the guide at +## https://autotools.io/libtool/version.html +## The rules of thumb, when dealing with these values are: +## * Always increase the revision value. +## * Increase the current value whenever an interface has been added, removed or +## changed. +## * Increase the age value only if the changes made to the ABI are backward +## compatible. +libspectrum_la_LDFLAGS = -version-info 11:1:3 -no-undefined @WINDRES_LDFLAGS@ libspectrum_la_LIBADD = @AUDIOFILE_LIBS@ @GLIB_LIBS@ -lm Modified: trunk/libspectrum/README =================================================================== --- trunk/libspectrum/README 2016-07-19 10:51:41 UTC (rev 5689) +++ trunk/libspectrum/README 2016-07-19 10:57:38 UTC (rev 5690) @@ -67,6 +67,6 @@ Then, type "make" and if everything went well, "make install". Philip Kendall <phi...@sh...> -6th June, 2016 +17th July, 2016 $Id$ Modified: trunk/libspectrum/doc/libspectrum.3 =================================================================== --- trunk/libspectrum/doc/libspectrum.3 2016-07-19 10:51:41 UTC (rev 5689) +++ trunk/libspectrum/doc/libspectrum.3 2016-07-19 10:57:38 UTC (rev 5690) @@ -22,7 +22,7 @@ .\" E-mail: phi...@sh... .\" .\" -.TH libspectrum 3 "6th June, 2016" "Version 1.2.1" "Emulators" +.TH libspectrum 3 "17th July, 2016" "Version 1.2.1" "Emulators" .\" .\"------------------------------------------------------------------ .\" Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2016-07-19 10:51:41 UTC (rev 5689) +++ trunk/libspectrum/hacking/ChangeLog 2016-07-19 10:57:38 UTC (rev 5690) @@ -1073,7 +1073,13 @@ 20160606 ChangeLog,README,configure.ac,doc/libspectrum.3: update release dates and mark this release as 1.2.0 (Fred). 20160622 make-perl.c,myglib/garray.c: add implementations of - g_array_sized_new() and g_array_remove_index_fast(). (Thanks, Sergio) + g_array_sized_new() and g_array_remove_index_fast() (thanks, Sergio) (Phil). 20160709 ChangeLog,README,configure.ac,doc/{libspectrum.3,libspectrum.txt}: bump some version numbers for 1.2.1 release (Fred). +20160710 README,Makefile.am,configure.ac,doc/libspectrum.3: bump release dates, + mark release as 1.2.1-pre1 and bump libtool version (Fred). +20160712 Makefile.am: add comments on assigning libtool version (thanks, Sergio) + (Fred). +20160717 ChangeLog,README,configure.ac,doc/libspectrum.3: update release dates + and mark this release as 1.2.1 (Fred). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |