Skip to content

Commit 11f951b

Browse files
committed
Merge tag 'fuse-1.5.6'
Tag Fuse 1.5.6
2 parents 6bb4806 + 6942a61 commit 11f951b

32 files changed

Lines changed: 307 additions & 224 deletions

ChangeLog

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
2018-08-06 Philip Kendall <philip-fuse@shadowmagic.org.uk>
2+
3+
* Fuse 1.5.6 released.
4+
5+
* Emulation core improvements:
6+
* Z80 flags register is now correct after SCF and CCF (Sergio
7+
Baldoví).
8+
9+
* Miscellaneous improvements:
10+
* Factor out common paths code between Linux and generic UNIX (Alberto
11+
Garcia and Fredrick Meunier).
12+
* More improvements disabling phantom typist after finishing loading
13+
TAP or standard ROM TZX files (thanks, Alberto Garcia) (Fredrick
14+
Meunier).
15+
* Saving and loading binary data no longer increments tstate count
16+
or triggers breakpoints (thanks, Sergio Baldoví) (Philip Kendall).
17+
* "Variant" Alkatraz loaders (e.g. Gauntlet 3 and Shadow Dancer),
18+
"Variant" Search Loader programs (e.g. Lotus Esprit Turbo
19+
Challenge and Space Crusade) and Dinaload loaders (e.g. Astro Marine
20+
Corps) are now accelerated (Philip Kendall).
21+
* Stop RZX playback/recording on machine reset/change (Sergio
22+
Baldoví).
23+
* Various minor bugfixes.
24+
125
2018-07-01 Philip Kendall <philip-fuse@shadowmagic.org.uk>
226

327
* Fuse 1.5.5 released.

README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The Free Unix Spectrum Emulator (Fuse) 1.5.5
1+
The Free Unix Spectrum Emulator (Fuse) 1.5.6
22
============================================
33

44
Fuse (the Free Unix Spectrum Emulator) was originally, and somewhat
@@ -111,4 +111,4 @@ Usenet newsgroup `comp.sys.sinclair' or the World of Spectrum forums
111111
<http://www.worldofspectrum.org/forums/>.
112112

113113
Philip Kendall <philip-fuse@shadowmagic.org.uk>
114-
1st July, 2018
114+
6th August, 2018

compat/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ fuse_SOURCES += \
4646
compat/unix/dir.c \
4747
compat/unix/file.c \
4848
compat/unix/osname.c \
49-
compat/linux/paths.c \
49+
compat/linux/relative_paths.c \
50+
compat/unix/paths.c \
5051
compat/unix/timer.c
5152

5253
if HAVE_SOCKETS
@@ -70,6 +71,7 @@ fuse_SOURCES += \
7071
compat/unix/dir.c \
7172
compat/unix/file.c \
7273
compat/unix/osname.c \
74+
compat/unix/relative_paths.c \
7375
compat/unix/paths.c \
7476
compat/unix/timer.c
7577

compat/linux/paths.c

Lines changed: 0 additions & 123 deletions
This file was deleted.

compat/linux/relative_paths.c

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* relative_paths.c: Path-related compatibility routines
2+
Copyright (c) 1999-2012 Philip Kendall
3+
4+
This program is free software; you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation; either version 2 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License along
15+
with this program; if not, write to the Free Software Foundation, Inc.,
16+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17+
18+
Author contact information:
19+
20+
E-mail: philip-fuse@shadowmagic.org.uk
21+
22+
*/
23+
24+
#include <config.h>
25+
26+
#include <errno.h>
27+
#include <string.h>
28+
#include <unistd.h>
29+
30+
#include "fuse.h"
31+
#include "ui/ui.h"
32+
33+
void
34+
get_relative_directory( char *buffer, size_t bufsize )
35+
{
36+
ssize_t retval = readlink( "/proc/self/exe", buffer, bufsize - 1 );
37+
if( retval < 0 ) {
38+
ui_error( UI_ERROR_ERROR, "error getting current working directory: %s",
39+
strerror( -errno ) );
40+
fuse_abort();
41+
}
42+
buffer[ retval ] = '\0';
43+
}

compat/unix/paths.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@
2323

2424
#include <config.h>
2525

26-
#include <errno.h>
2726
#ifdef HAVE_LIBGEN_H
2827
#include <libgen.h>
2928
#endif /* #ifdef HAVE_LIBGEN_H */
3029
#include <stdlib.h>
3130
#include <string.h>
32-
#include <unistd.h>
3331

3432
#include "compat.h"
3533
#include "fuse.h"
3634
#include "ui/ui.h"
3735

36+
void get_relative_directory( char *buffer, size_t bufsize );
37+
3838
const char*
3939
compat_get_temp_path( void )
4040
{
@@ -89,15 +89,7 @@ compat_get_next_path( path_context *ctx )
8989
strncpy( buffer, fuse_progname, PATH_MAX );
9090
buffer[ PATH_MAX - 1 ] = '\0';
9191
} else {
92-
size_t len;
93-
len = PATH_MAX - strlen( fuse_progname ) - strlen( FUSE_DIR_SEP_STR );
94-
if( !getcwd( buffer, len ) ) {
95-
ui_error( UI_ERROR_ERROR, "error getting current working directory: %s",
96-
strerror( errno ) );
97-
return 0;
98-
}
99-
strcat( buffer, FUSE_DIR_SEP_STR );
100-
strcat( buffer, fuse_progname );
92+
get_relative_directory( buffer, PATH_MAX );
10193
}
10294

10395
path2 = dirname( buffer );

compat/unix/relative_paths.c

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/* relative_paths.c: Path-related compatibility routines
2+
Copyright (c) 1999-2012 Philip Kendall
3+
4+
This program is free software; you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation; either version 2 of the License, or
7+
(at your option) any later version.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License along
15+
with this program; if not, write to the Free Software Foundation, Inc.,
16+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17+
18+
Author contact information:
19+
20+
E-mail: philip-fuse@shadowmagic.org.uk
21+
22+
*/
23+
24+
#include <config.h>
25+
26+
#include <errno.h>
27+
#include <string.h>
28+
#include <unistd.h>
29+
30+
#include "fuse.h"
31+
#include "ui/ui.h"
32+
33+
void
34+
get_relative_directory( char *buffer, size_t bufsize )
35+
{
36+
size_t len = bufsize - strlen( fuse_progname ) - strlen( FUSE_DIR_SEP_STR );
37+
if( !getcwd( buffer, len ) ) {
38+
ui_error( UI_ERROR_ERROR, "error getting current working directory: %s",
39+
strerror( -errno ) );
40+
fuse_abort();
41+
}
42+
strcat( buffer, FUSE_DIR_SEP_STR );
43+
strcat( buffer, fuse_progname );
44+
}

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ dnl
1919
dnl E-mail: philip-fuse@shadowmagic.org.uk
2020

2121
dnl Package version
22-
m4_define([fuse_version], [1.5.5])
22+
m4_define([fuse_version], [1.5.6])
2323

2424
dnl Product full version
2525
m4_define([fuse_major_version], [1])
2626
m4_define([fuse_minor_version], [5])
27-
m4_define([fuse_micro_version], [5])
27+
m4_define([fuse_micro_version], [6])
2828
m4_define([fuse_nano_version], [0])
2929
m4_define([fuse_full_version], [fuse_major_version.fuse_minor_version.fuse_micro_version.fuse_nano_version])
3030
m4_define([fuse_rc_version], [fuse_major_version,fuse_minor_version,fuse_micro_version,fuse_nano_version])

loader.c

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ acceleration_detector( libspectrum_word pc )
117117
break;
118118
case 1:
119119
switch( b ) {
120+
case 0x20: state = 40; break; /* JR NZ - variant Alkatraz */
120121
case 0xc8: state = 2; break; /* RET Z */
121122
default: return ACCELERATION_MODE_NONE;
122123
}
@@ -131,6 +132,7 @@ acceleration_detector( libspectrum_word pc )
131132
switch( b ) {
132133
case 0x00: /* Search Loader */
133134
case 0x7f: /* ROM loader and variants */
135+
case 0xff: /* Dinaload */
134136
state = 4; break; /* Data byte */
135137
default: return ACCELERATION_MODE_NONE;
136138
}
@@ -279,6 +281,7 @@ acceleration_detector( libspectrum_word pc )
279281
break;
280282
case 26:
281283
switch( b ) {
284+
case 0x28: state = 12; break; /* JR Z - Space Crusade */
282285
case 0xd8: state = 27; break; /* RET C */
283286
default: return ACCELERATION_MODE_NONE;
284287
}
@@ -352,7 +355,24 @@ acceleration_detector( libspectrum_word pc )
352355
break;
353356
case 39:
354357
switch( b ) {
355-
case 0xf1: return ACCELERATION_MODE_INCREASING; /* Data byte */
358+
case 0xf1: /* Normal data byte */
359+
case 0xf3: /* Variant data byte */
360+
return ACCELERATION_MODE_INCREASING;
361+
default: return ACCELERATION_MODE_NONE;
362+
}
363+
break;
364+
365+
/* "Variant" Alkatraz */
366+
367+
case 40:
368+
switch( b ) {
369+
case 0x01: state = 41; break; /* Data byte of JR NZ */
370+
default: return ACCELERATION_MODE_NONE;
371+
}
372+
break;
373+
case 41:
374+
switch( b ) {
375+
case 0xc9: state = 31; break; /* RET */
356376
default: return ACCELERATION_MODE_NONE;
357377
}
358378
break;

machine.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "movie.h"
4343
#include "peripherals/ula.h"
4444
#include "pokefinder/pokemem.h"
45+
#include "rzx.h"
4546
#include "settings.h"
4647
#include "snapshot.h"
4748
#include "sound.h"
@@ -136,6 +137,10 @@ machine_select( libspectrum_machine type )
136137
int i;
137138
int error;
138139

140+
/* Stop any ongoing RZX */
141+
rzx_stop_recording();
142+
rzx_stop_playback( 1 );
143+
139144
/* We don't want to have to deal with screen size changes in the movie code
140145
and recording movies where we change machines seems pretty obscure */
141146
movie_stop();

0 commit comments

Comments
 (0)