Skip to content

Configuration

Andrew edited this page Apr 11, 2020 · 17 revisions

TOS Configuration

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

SERDISK.CFG structure:

[Drive letter][Disk buffer]

Drive letter

Valid drive identifiers are C-P.

Disk buffer

Value Disk size Buffer RAM
5 512 MiB 32 KiB
4 256 MiB 16 KiB
3 128 MiB 8 KiB
2 64 MiB 4 KiB
1 32 MiB 0 KiB

Examples:

M5

Drive letter M with a maximum size of 512MiB

P3

Driver letter P with a maximum size of 128MiB

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

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
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
port Any present serial port name COM1 (Windows) /dev/ttyS0 (Linux) The COM port used for serial communication
baud-rate 0 - 19200 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 Verbose | Info | Warn | Error Info Controls the amount of information shown to the user
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.

Options (default):
--disk-size <disk_size_in_MiB>
--root-directory-sectors <sectors>
--port [port_name]
--baud-rate <baud_rate>
--data-bits <data_bits>
--stop-bits [stop_bits]
--parity [parity}
--handshake [handshake]
--logging-level [logging_level]
--log-filename [log_file_name]

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": ".",
  "LoggingLevel": "Info",

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

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

The values given in this file will override the application defaults.
Command-line parameters will override the values in the configuration file.

Clone this wiki locally