Fuse gets a debugger!

Fuse (Free Unix Spectrum Emulator) is a great ZX Spectrum emulator for Unix. Sadly it currently lacks a debugger/monitor (but do not let that stop you; it has many other good features). While trying to make my very own Spectrum game (for the MiniGame competition ) I found that I missed the debugger feature. Being such a weak soul (i.e. easily sidetracked from the task at hand) I spent an entire evening / night adding one. I did not have the time to learn how to add a new interface to Fuse so I settled for adding an UDP socket instead. This socket functions that a debugging port that receives commands such as "halt execution" from an external debugger.

Disclaimer

#include <disclaimer.h> /* Your on you own _but_ it works on my Dell Inspiron running Suse 8.0 */

Technical data of debugging port

The debugging port is as previously stated an UDP socket using port 3490 for listening to those commands. Responses to certain commands are sent as an UDP message to port 3491. All commands are sent as character strings. The following commands are supported.

The i, m and s commands returns an information block, a block of data containing information about the current status of the emulated Spectrum (see debugger.py for definition of the contents).

Download and install patch

Download the patch and install it by issuing the commands ...

# tar xfz fuse-0.4.2.tar.gz
# patch -p0 < fuse-0.4.2_debugger.patch
# cd fuse-4.2.0
# ./configure
# make
# make install (as root)

Debugging client

As a debugging client I have implemented a "simple" Python script ( debugger.py). This script adds (apart for giving the user access to the commands supported by the debugging port of Fuse) disassembly functionality. Using the command d (or d nnnn) and s will print the disassembled code on the screen. Give it a try and use the '?' for online help.

What is missing?

The debugger is missing the following features :