# Econet support for BeebEm,
# by Rob O'Donnell. robert@irrelevant.com.
#
# This file contains basic configuration options for the Econet emulation.
# Lines starting # are comments.
#
# When BeebEm starts up it will search for the first free local port number
# listed in this file.  This means that multiple instances of BeebEm can be
# run on a single PC and they will have different station numbers.
#
# It is also possible to specify the station number on the BeebEm command
# line.  BeebEm will look up the port number associated with the station
# in this file.  e.g.
#   BeebEm -ecostn 101
#
# Note that the IP address 127.0.0.1 always refers to the local PC.  If you
# are running BeebEm on two or more PCs change 127.0.0.1 to a real IP
# address to allow them to find each other.
# 
# If you are using AUN mode and set both LEARN and STRICT modes on, AND you
# have a valid AUNMap file that covers the address range of the machine you
# are running this on, then you may not need any data at the end of this
# file, as BeebEm will assume a station number based on your IP address.
#
# General Config Options
#
# Currently these are all experimental and features are not guaranteed to work.
#
# AUN mode - attempts to converse in a mode compatable with AUN (Acorn
# Universal Networking) protocol, and thus can talk to real machines (that talk
# on ethernet).  Setting this to zero will revert to (Pre BeebEm 4.11) mode where
# ethernet traffic exactly replicates traditional econet packets.
#
# Note that stations that wish to communicate with real hardware will
# likely need to use port 32768, and, to avoid problems with some utilities,
# a station number matching the last octet of the IP address, with your IP range
# specified in the Map file on all machines, as is normal for AUN.  You can
# thus only have one such station per IP address on your computer. You CAN
# have more than one IP address per network interface, and, of course,
# multiple network interfaces in a machine.
#
# See also AUNMap file (format "AddMap 192.168.0.0 128")
#
# Another note - because of the way the 4-way handshake to AUN translation works,
# software that determines existence of the remote station by sending a scout will
# fail with false-positives.  Only immediate instructions wait for the remote
# station to reply before returning an ack to the Beeb.
#
#
AUNMODE 1
#
# LEARN mode - adds to list of hosts specified here based on packets received.
LEARN 1
#
# STRICT AUN mode - Hosts on IP address a.b.c.d must be station d on network c
# Setting this allows the host to guess the address of unknown stations. (w/port 32768)
# Hosts specified in this file always override this, but try not to differ too much
# as you can get a mismatch between what each side of the conversation thinks it's
# station number is! You might also get a clash!
AUNSTRICT 1
#
# AUN networks are always 128+, Econet networks are always 1+.
# Set this to 1 to add/subtract 128 on translation, so AUN net 130.x will
# appear to the emulated Beeb as 2.x, and vice-versa.
# THIS IS UNTESTED FOR ALL BUT NETWORK 0/128 - Beebs expect Nets > 0 to be
# accessed via a gateway on their local segment.
MASSAGENETS 1
#
# The following affect internal timing within the emulation.  
# Adjusting can easily break things.  Defaults usually work on my laptop (at spd 1.0 fps 20-40).
# Symptoms of breaking include hanging, No Reply, Line Jammed, and just garbage on *CAT
#
FLAGFILLTIMEOUT 500000 # default 500000. 100000 works.. YMMV. Saves fail first...
SCOUTACKTIMEOUT 5000   # default 5000. 500 may work, and is much faster!
TIMEBETWEENBYTES 128   # default 128. Cannot seem to get it to work at anything else
FOURWAYTIMEOUT 500000  # default 500000. Works best when same as or less than flagfilltimeout! 50000
#
#
# List of reachable computers
# =-=-=-=-=-=-=-=-=-=-=-=-=-=
# 
# If you are using AUN mode with LEARN & AUNSTRICT turned on, these entries should
# be considered 'override' entries.  Use them to specify non-default IP or ports.
# If any of the above are turned off, then each and every machine you wish to communicate
# with should be listed below, and all systems need this file to be the same.
#
# Format of data lines is:
# net stn ip port
#
# Lines without exactly four parameters separated by spaces will be ignored.
#
# You almost certainly want to keep network numbers as zero in this file.
# 
# Change from V4.11 - only the specified address is bound to.  i.e. if you specify
# the locahost address 127.0.0.1 you will not be able to connect from any other
# IP.  (This is probably best regarded as a bugfix!)  You can therefore specify
# multiple instances of BeebEm on the same port number, but only as long as each
# has its own IP address.
# (See Local Area connection>Properties>General>Internet Protocol>Properties>
# Advanced>Add to add more IP addresses to a Windows PC. ifconfig alias on linux/unix)
#
# Example network configuration.
# Fileserver (station ID 254) and 4 stations on the local PC:
# 0 254 127.0.0.1 32768
# Stations:
# 0 101 127.0.0.1 10101
# 0 102 127.0.0.1 10102
# 0 103 127.0.0.1 10103
# 0 104 127.0.0.1 10104

# Rob's laptop:
# 0 254 192.168.0.68 32768
# 0 101 192.168.0.65 32768
# 0 102 192.168.0.68 10102
# 0 103 192.168.0.68 10103
# 0 104 192.168.0.68 10104

# Example of stations on another PC:
# 0 10 192.168.0.10 32768
# 0 11 192.168.0.11 32768
