How to emulate it in Fuse

Fuse (the Free Unix Spectrum Emulator) includes emulation of the SpeccyBoot hardware (Ethernet controller and SPI host). This allows you to try the SpeccyBoot out in an emulated environment — without any Spectrum or SpeccyBoot hardware.

The emulation is based on Ethernet TAP networking and requires a Linux host. (I have verified this using Ubuntu 20.04.)

Configuring your network for TAP

The following example setup involves creating a separate network for the emulated Spectrum. Your Linux machine will get another (virtual) network interface, and this interface is connected to the emulated Spectrum. Your Linux machine will then need to take on the role of providing BOOTP and TFTP services to this Spectrum machine.

  1. First, you need a script for setting up a TAP virtual network interface (say, tap0) on your Linux host. Create a helper script /usr/local/bin/enable_tap.sh with the following content:

    #!/bin/sh
    
    ip tuntap add tap0 mode tap
    ip addr add 192.168.82.1/24 dev tap0
    ip link set up dev tap0

    Don't forget to

    sudo chmod a+x /usr/local/bin/enable_tap.sh
  2. Then add a system service to run this script during boot. Create /etc/systemd/system/tap.service with the following content:

    [Unit]
    Description=TAP interface for SpeccyBoot
    After=network.target
    
    [Service]
    Type=oneshot
    User=root
    ExecStart=/usr/local/bin/enable_tap.sh
    
    [Install]
    WantedBy=multi-user.target
  3. Enable your new TAP service:

    sudo systemctl enable tap

Note that this configuration assumes your new tap0 interface to use the 192.168.82.* subnet. If this is not possible for you (e.g., if you are already using this subnet for other purposes), you will need to modify both this configuration and the BOOTP configuration below.

Configuring BOOTP & TFTP for your local TAP network

This is done much the same way you would configure BOOTP & TFTP for a physical machine. Ensure your BOOTP server does not respond to requests from other machines in the network. (The linked dnsmasq.conf configures dnsmasq to only respond to the SpeccyBoot's MAC address, so that should be fine.)

The TAP interface configuration, as well as the TFTP and BOOTP configurations, take effect upon boot. Hence, you need to reboot your Linux machine at this point.

Running Fuse with SpeccyBoot emulation

Install Fuse:

sudo apt install fuse-emulator-gtk spectrum-roms

The Debian/Ubuntu package doesn't include the SpeccyBoot ROM, so you'll have to build it from source (or use this binary).

Then configure Fuse using either the graphical UI or command line arguments:

fuse --speccyboot --speccyboot-tap=tap0 --rom-speccyboot=speccyboot-fuse.rom

Be sure to select the correct .rom file for emulation, which should have a size of 8 kilobytes (8192 bytes). The Makefile builds two .rom files, and their only difference is that speccyboot-fuse.rom is padded to 8 kilobytes in size.