home

emulator

tapes

information

help

contact

Help: Network

Techinical Spec for Networking on the emulator, using TCP/IP.

Objective

To allow to 2 ZX Spectrums to communicate with one another using the ZX Spectrums I/O.

The network I/F must be enabled on the emulator, Go to Menu | Hardware.
IMPORTANT NOTE: Communications are set on port 1982 ONLY (for security reasons), Remember you may need to add the emulator IP/PORT and/or remote computer IP/PORT to your firewall.

Using the Network Interface


To create a host IN (0x0A) and the network adapter will listen for connections on TCP/IP PORT 1982,
looping IN (0x0A) will tell you when a client has connected, bit 1 = 1.

To create a client, OUT (0x0B) transmit IP address you would like to connect to then,
loop IN (0x0A) until bit 1 = 1 connected.

IN PORTS

IN (0x0A)
Status Register

BIT (0 = no 1 = yes)
1 Is connected ?
2 Has an error occured, if so error you must read recieve buffer IN (0x0B), until this error flag = 0
3 Is there data to Receive
4 Is there data to Transmitp
5 Result data waiting ?


IN (0x0B)
Recieve Buffer (Byte) - Byte sent from peer

IN (0x0C)
Command Result data

OUT PORTS

OUT (0x0A)
Command Port

Command (0 - 255) + command data length to follow (0-255) + command data if required

ID cmd Len result Len
0x00 0x00 0x03 Reset Reset all network adapter info, returns the result stream header ( "net" = 110, 101, 116 ) to signify net work adapter is plugged in.
0x01 0x00 0x00 Cmd Reset Reset current command and / or result.
0x02 0x04 0x00 Set IP Set IP of host to connect to (Client mode)
0x03 0x00 0x00

Connect

Start connection process, if host IP set (Client mode) else (Host mode)
0x04 0x00 0x00 Disconnect Disconnect from remote ZX Spectrum
0x05 0x00 0x00 Clear Clear "Receive" data buffer
0x06 0x00 0x00 Clear Clear "Transmit" data buffer
0x07 0x00 0x00 Clear Clear "Result" data buffer
0x08 0x00 0x04 Get inet IP Get Internet IP Address
0x09 0x00 0x04 Get local IP Get Local IP Address

Port 0x0B
Transmit Buffer (Byte) to peer

Port (0x0C)
Current command data


Basic Example

An example is included with the emulator "network.sna", This will connect 2 spectrums and communicate back and forth in Spectrum BASIC.

If you write a program or game using the network capabilities please get in touch with us

NOTE: The information here is accurate at time of writing, But is subject to change without notice as the software is continually updated.



Thanks for reading, please if you can help out do so - Enjoy ZXSpectrum4.net Team.

Help Navigation

Question Introduction
  System Requirements

Question Getting Started
  Loading a tape
  Saving a game
  Using a joystick

Question FAQ
  Frequently Asked Questions

Question The Menu System
  Hardware
  Fast Loading
  Mouse
  Poke

Question ZX Spectrum Keyboard
  Spectrum Keyboard Layout

Question TV Screen
  TV Screen Layout

Question Tape Deck
  Tape Deck Layout


Advanced User Tools

Question Sound Lab - SL ZX4 RS-1

Question Tape Preservation & Restoration

Question Printer

Question Network

Question Z80 Assembler

Question Debugger

Question Poke / Cheat / Trainer

 


Share this page with your freinds



FAQ