Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion fuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,15 @@ static int parse_nonoption_args( int argc, char **argv, int first_arg,
static int do_start_files( start_files_t *start_files );

#ifdef UI_WIN32
/* The Win32 UI supplies WinMain(), which calls this */
int fuse_main(int argc, char **argv)
#else
#elif defined UI_COCOA
/* fusepb/main.m supplies main() and Emulator.m calls fuse_init() itself, so
this entry point goes unused; it is renamed only to avoid colliding with
the one in main.m */
int old_main(int argc, char **argv)
#else
int main(int argc, char **argv)
#endif
{
int r = 0;
Expand Down
2 changes: 1 addition & 1 deletion fusepb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ settings.h: ../settings.dat settings-header.pl
cd .. && perl -Iperl fusepb/settings-header.pl settings.dat > fusepb/settings.h

settings.m: ../settings.dat ../settings.pl
cd .. && perl -Iperl settings.pl settings.dat > fusepb/settings.m
cd .. && perl -Iperl settings.pl --cocoa settings.dat > fusepb/settings.m

options_cocoa.h: ../perl/cpp-perl.pl config.h ../ui/cocoa/options-cocoa-header.pl ../ui/options.dat ../perl/Fuse.pm ../perl/Fuse/Dialog.pm
cd .. && perl perl/cpp-perl.pl fusepb/config.h ui/options.dat | perl -Iperl ui/cocoa/options-cocoa-header.pl - public > fusepb/$@.tmp && mv fusepb/$@.tmp fusepb/$@
Expand Down
3 changes: 3 additions & 0 deletions fusepb/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@
/* Defined if svgalib UI in use */
/* #undef UI_SVGA */

/* Defined if the Cocoa (macOS) UI is in use */
#define UI_COCOA 1

/* Defined if Win32 UI in use */
/* #undef UI_WIN32 */

Expand Down
6 changes: 4 additions & 2 deletions machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,12 @@ machine_register_startup( void )
NULL, machine_end );
}

#ifndef __APPLE__
/* The Cocoa app implements this in fusepb/FuseMenus.m; every other build,
macOS autotools included, needs the stub. */
#ifndef UI_COCOA
void
SetEmulationHz( float hz )
{
(void)hz;
}
#endif
#endif /* #ifndef UI_COCOA */
1 change: 0 additions & 1 deletion menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ MENU_CALLBACK( menu_machine_profiler_stop )
#if !defined( UI_WIN32 )
MENU_CALLBACK( menu_machine_debuglog )
{
(void)action;
}
#endif /* !defined( UI_WIN32 ) */

Expand Down
2 changes: 2 additions & 0 deletions menu_data.dat
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ Media/IDE/ZXMMC/_Commit, Item,, menu_media_ide_commit,, 9
Media/IDE/ZXMMC/_Eject, Item,, menu_media_ide_eject,, 9

_Help, Branch
#ifdef UI_WIN32
Help/_Check for Updates..., Item,, menu_help_check_for_updates
#endif /* #ifdef UI_WIN32 */
Help/_Keyboard..., Item
Help/_About..., Item
11 changes: 8 additions & 3 deletions peripherals/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ if BUILD_SPECCYBOOT
fuse_SOURCES += peripherals/nic/enc28j60.c
endif

# The xfs core (RAM-backed filesystem engine) is always built: the GDB vfile
# debugger feature, which is compiled unconditionally, depends on it. Only the
# network engines (xfs_https.c) and their HTTP/TLS/SSH stack are Spectranet-only.
fuse_SOURCES += \
peripherals/fs/xfs.c \
peripherals/fs/xfs_worker.c \
peripherals/fs/xfs_fs.c

if BUILD_SPECTRANET
fuse_SOURCES += \
peripherals/flash/am29f010.c \
Expand All @@ -84,9 +92,6 @@ fuse_SOURCES += \
peripherals/nic/engines/parson.c \
peripherals/nic/spectranext_controller.c \
peripherals/nic/spectranext_stdout.c \
peripherals/fs/xfs.c \
peripherals/fs/xfs_worker.c \
peripherals/fs/xfs_fs.c \
peripherals/fs/xfs_https.c \
peripherals/http/httpc.c \
peripherals/http/http_sck.c \
Expand Down
4 changes: 4 additions & 0 deletions peripherals/fs/xfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ void xfs_handle_mount(volatile struct xfs_registers_t* registers)
return;
}
}
#ifdef BUILD_SPECTRANET
/* The http/https engines live in xfs_https.c, which is built only with
Spectranet as it needs the HTTP client and the mbedTLS stack. */
else if (strcmp(protocol, "https") == 0)
{
XFS_DEBUG("xfs: mount https hostname='%s' path='%s' mount_point=%d\n", hostname, path, mount_point);
Expand All @@ -115,6 +118,7 @@ void xfs_handle_mount(volatile struct xfs_registers_t* registers)
XFS_DEBUG("xfs: mount http hostname='%s' path='%s' mount_point=%d\n", hostname, path, mount_point);
engine = &http_engine;
}
#endif /* #ifdef BUILD_SPECTRANET */
else
{
XFS_DEBUG("xfs: mount failed: unknown protocol '%s' mount_point=%d\n", protocol, mount_point);
Expand Down
4 changes: 4 additions & 0 deletions rzx.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
#ifndef FUSE_RZX_H
#define FUSE_RZX_H

#ifdef HAVE_LIB_GLIB
#include <glib.h>
#endif /* #ifdef HAVE_LIB_GLIB */

#include "libspectrum.h"

/* The offset used to get the count of instructions from the R register */
Expand Down
Loading
Loading