ZXSTSPECTRANET
Dylan Smith's Spectranet Ethernet interface for the 16K, 48K, 128, +2, +2A and +3 ZX Spectrums.
// Spectranet state
#define ZXSTSNETF_PAGED 0x0001
#define ZXSTSNETF_PAGED_VIA_IO 0x0002
#define ZXSTSNETF_PROGRAMMABLE_TRAP_ACTIVE 0x0004
#define ZXSTSNETF_PROGRAMMABLE_TRAP_MSB 0x0008
#define ZXSTSNETF_ALL_DISABLED 0x0010
#define ZXSTSNETF_RST8_DISABLED 0x0020
#define ZXSTSNETF_DENY_DOWNSTREAM_A15 0x0040
#define ZXSTSNETF_FLASH_COMPRESSED 0x0080
#define ZXSTSNETF_RAM_COMPRESSED 0x0100
typedef struct _tagZXSTSPECTRANET
{
ZXSTBLOCK blk;
DWORD dwFlags;
BYTE chPageA;
BYTE chPageB;
WORD wTrap;
BYTE chRegisters[0x30];
DWORD dwcbFlashLength;
BYTE lpchFlash[1];
DWORD dwcbRamLength;
BYTE lpchRam[1];
} ZXSTSPECTRANET, *LPZXSTSPECTRANET;
Members
- blk
The block header. The block id is ZXSTBID_SPECTRANET ('S', 'N', 'E', 'T').
- wFlags
Various flags. This can be any combination of:
Flag
Meaning
ZXSTSNETF_PAGED
The Spectranet is currently paged.
ZXSTSNETF_PAGED_VIA_IO
The Spectranet was paged in via I/O port.
ZX STSNETF_PROGRAMMABLE_TRAP_ACTIVE
The Spectranet's programmable trap is currently active.
ZXSTSNETF_PROGRAMMABLE_TRAP_MSB
The next write to the Spectranet's programmable trap port will set the MSB of the programmable trap address.
ZXSTSNETF_ALL_DISABLED
All the Spectranet's traps are currently disabled.
ZXSTSNETF_RST8_DISABLED
The Spectranet's RST 8 trap is currently disabled.
ZXSTSNETF_DENY_DOWNSTREAM_A15
The Spectranet is forcing the A15 line low for any peripherals connecting via its expansion port.
ZXSTSNETF_FLASH_COMPRESSED
If set, the flash data at lpchFlash is compressed using the Zlib compression library.
ZXSTSNETF_RAM_COMPRESSED
If set, the RAM data at lpchRAM is compressed using the Zlib compression library.
- chPageA
The page currently paged into the Spectranet's page A (0x1000-0x1fff).
- chPageB
The page currently paged into the Spectranet's page B (0x2000-0x2fff).
- wTrap
The current value of the Spectranet's programmable trap.
- chRegisters
The values of the core W5100 registers.
- dwcbFlashLength
The length of the possibly compressed Spectranet flash.
- lpchFlash
contents of the Spectranet's flash. When uncompressed, this must be exactly 0x20000 bytes in length.
- dwcbRamLength
length of the possibly compressed Spectranet RAM.
- lpchRAM
The contents of the Spectranet's RAM. When uncompressed this must be exactly 0x20000 bytes in length.
Remarks
The contents of the W5100's socket registers are not saved - whatever was listening on the other end will have gone away when the snapshot is restored.
Revision history
Available since version 1.5