Skip to content

Configuration

Andrew edited this page Oct 15, 2022 · 17 revisions

TOS Configuration

SERDISK3.TOS will load configuration settings from SERDISK.CFG, if present.

SERDISK.CFG structure:

[Disk letter][Large disk][Port]

Drive letter

Valid drive identifiers are C-P.

Disk buffer

# Maximum disk size
0 32MiB or as set by HDD driver
1 512 MiB

!! Important !!

When using a separate hard disk driver such as ICD or AHDI, always leave this setting as 0 and configure the disk buffer with the tools included with your drivers.

e.g. for AHDI

AHDI configuration screen

and for ICD

ICD configuration screen

As a guide, the sector sizes should be:

Maximum disk size Sector size
512 MiB 8192
256 MiB 4096
128 MiB 2048
64 MiB 1024
32 MiB 512

Please check your driver documentation for details.

Serial port

Sets the serial port to use.

# Serial port
1 ST/STe/Falcon modem port
6 TT modem-1 port
7 TT modem-2 port
8 TT serial-1 port
9 TT serial-2 port

Examples:

Config Description
M11 Drive letter M with a maximum size of 512MiB on the modem port.
P06 Driver letter P with a maximum size of 32MiB (unless a HDD driver is installed) on TT modem-1 port.

If no configuration file is present, the virtual disk will be mounted as drive M with a maximum size of 32MiB.

PC Configuration

Parameters

Parameter Valid values Default Description
disk-size 32 - 512 32 The size of the virtual disk in MiB. Maximum is 512MiB for TOS version 1.04+, otherwise 256MiB
tos-version TOS100 | TOS104 TOS104 Sets disk compatibility mode to TOS 1.0/1.02 or TOS 1.04+ (see disk-size parameter)
root-directory-sectors Any number 8 The number of available sectors for file and folder entries in the root directory. Larger values allow more files in the root directory
compression True | False True Enables or disables compression when sending and receiving data
port Any present serial port name COM1 (Windows)
/dev/ttyS0 (Linux)
/dev/cu.usbserial (macOS)
The COM port used for serial communication
baud-rate 300 - 19200 (ST/STe)
300 - 115200 (Mega STe/TT/Falcon)
9600 The data rate used to communicate with TOS. Higher values require hardware modifications. This must match the setting in TOS
data-bits 5 - 8 8 The number of data bits used for a character. This must match the setting in TOS
stop-bits None | One | Two | OnePointFive One Number of bits to be sent after each character. Used for synchronisation. This must match the setting in TOS
parity None | Odd | Even None Parity used for basic error checking. This must match the setting in TOS
handshake None | XOnXOff | RequestToSend | RequestToSendXOnXOff None aka flow control. Used for managing data transmission. This must match the setting in TOS. RequestToSend = Rts/Cts in TOS
logging-level All | Debug | Info Info Controls the amount of information recorded
log-filename Valid path to a new or existing file N/A Specifies a file to write logging data

Configuration

SerialDisk will look for its settings in the following locations in turn.

  • Command-line parameters
  • Configuration file
  • Application default settings

Any settings provided in a higher level will override those below it.

Command-line parameters

These values have the highest precedence and will override any other specified configuration options. Use SerialDisk --help to view available parameters.

Configuration file

An optional configuration file serialdisk.config can be created in the same location as the executable. It is a JSON-formatted text file with the following structure:

{
  "LocalDirectoryName": ".",
  "IsCompressionEnabled": true,
  "LoggingLevel": 0,

  "SerialSettings": {
    "PortName": "COM1",
    "BaudRate": 9600,
    "DataBits": 8,
    "StopBits": "One",
    "Parity": "None",
    "Handshake": "None"
  },

  "DiskSettings": {
    "DiskSizeMiB": 32,
    "RootDirectorySectors": 8
  }
}