The Acorn Terminal Interface Protocol (Acorn TIP) is used to communicate between a terminal emulator and a protocol module. It is possible to integrate your own terminal emulators and protocol modules with those provided by the TCP/IP Protocol Suite.
The purpose of a Protocol Module is to convert one of the many different protocols computers use for input and output to the Acorn TIP.
It is strongly advised that before developing a Protocol Module, you should first familiarise yourself with how a RISC OS relocatable module works. Your protocol module must conform to the standards specified.
Your Protocol Module must support all service calls detailed.
Your Protocol Module must support various SWIs, and they vary based on the functionality it will provide. These must be at the defined offsets from your module’s SWI base number, which is allocated by RISC OS Open. To support many of these SWIs you will need to send suitable commands over the physical connection to the remote host.
Offset | SWI name | Supports sending of data | Supports sending of data & file transfer | Supports receipt of data | Supports receipt of data & file transfer | Optional |
---|---|---|---|---|---|---|
0 | Protocol_OpenLogicalLink? | ✔ | ✔ | ✔ | ✔ | - |
1 | Protocol_CloseLogicalLink? | ✔ | ✔ | ✔ | ✔ | - |
2 | Protocol_GetProtocolMenu? | ✔ | ✔ | ✔ | ✔ | - |
3 | Protocol_OpenConnection? | ✔ | ✔ | ✔ | ✔ | - |
4 | Protocol_CloseConnection? | ✔ | ✔ | ✔ | ✔ | - |
5 | Protocol_TransmitData? | ✔ | ✔ | - | - | - |
6 | Protocol_DataRequest? | - | - | ✔ | ✔ | - |
7 | Protocol_MenuItemSelected? | ✔ | ✔ | ✔ | ✔ | - |
8 | Protocol_UnknownEvent? | ✔ | ✔ | ✔ | ✔ | - |
9 | Protocol_GetLinkState? | ✔ | ✔ | ✔ | ✔ | - |
10 | Protocol_Break? | ✔ | ✔ | ✔ | ✔ | - |
11 | Protocol_SendFile? | - | ✔ | - | - | - |
12 | Protocol_SendFileData? | - | ✔ | - | - | - |
13 | Protocol_AbortTransfer? | - | ✔ | - | ✔ | - |
14 | Protocol_GetFileInfo? | - | - | - | ✔ | - |
15 | Protocol_GetFileData? | - | - | - | ✔ | - |
17 | Protocol_GetFile? | - | - | - | ✔ | - |
18 | Protocol_DirOp? | - | - | - | ✔ |
Your protocol module must keep two different types of data structure constantly updated, as terminal emulators may directly access these any time they need to. These are:
Offset | Contents |
---|---|
0 | Pointer to protocol name string |
4 | Pointer to protocol version string |
8 | Pointer to protocol copyright string |
12 | Maximum number of connections allowed by module |
16 | Current number of open connections |
The three strings are all null-terminated, and have a maximum length of 30 characters. More information is available on Protocol_OpenLogicalLink? (Offset 0).
Bit | Meaning when set |
---|---|
0 | Data is pending |
1 | File is pending |
2 | Paused operation is to continue |
For more infomation, please see Protocol_OpenConnection?.
All protocol modules must (if physically possible) support multiple logical links, and multiple connections.
There are various functions that your Terminal Emulator will need to support. This section details which SWI calls you need to use for many such functions, and outlines how to use them.
To find what protocols are available and compatible with the needs of your emulator, you must:
For your user to choose a protocol, you’ll probably want to give them a menu of the ones you found to be available. Once they’ve made the choice, you can then issue Service_ProtocolNameToNumber to find the base SWI number of their chosen protocol module. You can then use this base number to call Protocol_OpenLogicalLink?, since its offset from the base number you just found is zero.
You can also use the facilities outlined in the section below entitled Protocol Modules and the
Wimp to provide menus so that your user can set up the way the protocol and connection will work.