Skip to main content

Spectranext Module

This page is a short guide for developers who ship Z80 code (modules, demos, or tests) that run on the Spectrum and talk to the Spectranext controller over the cartridge interface.

Older drafts described a memory-mapped “controller page” at a fixed Spectranet page and direct structure access. That is no longer how you should integrate. Use the supported APIs instead.


C (z88dk)

Use spectranext.h: controller status, Wi‑Fi scan/connect/disconnect, and DNS. The header lists constants, return conventions, and __z88dk_callee signatures.

Full reference: spectranext.h — C API

There you will find:

  • spectranext_detect, spectranext_get_controller_status, spectranext_wifi_*, spectranext_gethostbyname
  • WIFI_*, GETHOSTBYNAME_*, and port/status macros
  • Notes on linking libspectranet.lib vs libspectranet_np.lib and paging

Assembly

Spectranext operations are issued through the Spectranet ROM jump table entry SPECTRANEXT ($3EF0) with an operation ID in A, typically reached via IXCALL ($3FFD). Return paths, PAGEOUT, and register inputs/outputs for each operation are documented in one place:

Syscalls

For RAM registers $3400/$3401 (command/status polling), see I/O Ports.