ParlorNet
Turn-based game server for any computer, old or new
Clients | Protocols | Browsers | Telnet programs | Docs | Source

Outland Backgammon (Mac, 1994-95): what the client expects from the Outland server

Status: research notes, 2026-11-21, second pass the same day. Static analysis only: resources, strings and disassembly of the Outland client software. No client was run and no server was contacted (the service closed in the late 1990s). Every fact carries a source tag like [S3] (list in section 1) and, for code, an address. Anything not settled by the code is marked UNVERIFIED. The ParlorNet adapter built on these notes is adapters/outland.py (section 9).

Method: the Outland Gateway 1.3.2 ships as a fat application. Its PowerPC code (PEF data fork) has named imports (CMRead, PPCWrite, ...) and assertion strings that name the C source files (DataLink.c, CConnect.c, CUpdate.c, MonacoConnLib.c, CTBConnLib.c), so the PowerPC build was read for the Gateway; addresses PEF 0x.... are offsets into its code section, and TOC+0x.... are its globals. Backgammon is 68k only and keeps its MacsBug/C++ symbol names (handle_go__Fv, SendDone__Fs, Dump__5boardFP10boardimage, ...); addresses CODE 1 0x.... are offsets into that segment after the 4-byte segment header, and A5-0x.... are its globals. The 68k Gateway segments (gw_*) were not compared byte by byte with the PowerPC build (UNVERIFIED that they are identical; both come from one source tree by the file names).

Key findings in brief

  1. Three layers. The game application (Backgammon) never touches the network. It talks to the Outland Gateway application on the same Mac through the PPC Toolbox (a local IPC port). The Gateway runs a reliable framed link over one byte stream to the server, carrying a control channel (0) and up to three service channels (1-3). The byte stream comes from a Communications Toolbox connection tool: Outland TCP Tool (MacTCP), Outland CCL Modem Tool (dial-up) or any other CTB tool, for example the AppleTalk ADSP Tool [S1][S2][S3].
  2. Connection defaults. TCP: host dover.outland.com (199.97.249.2), port 4000; the host and port are fields in the TCP Tool settings dialog. Modem: Outland's Palo Alto number 415-325-9904, or a dial-up shell account from which the user typed telnet dover.outland.com [S1][S3].
  3. Link layer, fully recovered. Each frame is a 4-byte header (sequence, ack, type, channel, 16-bit check), a DLE-stuffed payload and DLE ETX. The check is the low 16 bits of a table CRC-32 plus a direction key: the client sends CRC+1 and accepts CRC+0. There are data, ack, nak and resend frames, sequence numbers mod 16, a window of 8 and at most 512 data bytes per frame (section 3).
  4. Control channel: what gets a player into a game is now settled. There is no separate "signed in" state: the session is up from the moment the byte stream connects, and the **service list Y** is what makes a service openable. The record that lists Backgammon so that it launches is 59 00 0e 01 00 01 42 47 40 53 54 42 42 47: one service, no files to compare (so no update is offered), flag 1 (available), service ID BG@S (Backgammon's Neti 256, which is how the Gateway finds the installed application), creator TBBG (used for the icon). A double-click then sends 81 chan 'BG@S'; the server answers R chan 'BG@S' and the Gateway launches Backgammon (section 4).
  5. Backgammon protocol, recovered in full for two-player games. Fixed 258-byte records: byte 0 a type, byte 1 a player id or flag, then a payload. The server rolls the dice: the opening is a roll record to both players whose two dice decide who starts, and each later turn starts with a go record that carries the board and the dice the player will "roll". Moves travel as a 162-byte board image listing the steps of the turn. Challenges, doubling, resigning, draws, chat and the lobby each have their own types (section 5). Two corrections to the first pass: the challenge response carries its accept flag and colour at bytes 6 and 7, not 4 and 5, and each client takes the colour byte as its own team, so the server gives the challenger the opposite of what the challenged player chose.
  6. Feasibility: built. A ParlorNet adapter needs the link layer, a small control-channel subset (P, the login, W, Y, R/S, T, V, a text window b) and a Backgammon service that maps the records onto backgammon/1 tables. It is adapters/outland.py; what a real Gateway session still has to prove is in section 8.

1. Sources and files

TagWhatNotes
[S1]Outland (fat).sit, HYPERLIB 1997 Winter CD 1, via discmaster.textfiles.com; sha256 88006e24...0ad539, 4,249,237 bytesOutland Gateway 1.3.2 (vers "1.3.2, Copyright 1994-1995 Outland"), Backgammon (creator TBBG, vers bytes 03 11 60 00, resource fork dated 1995-08-16), other games, Outland Manual (DOCMaker, 1995). Unpacked Gateway data fork sha256 45fef93e...b0aa5, Gateway resource fork bb422af0...3de14, Backgammon resource fork 2c031e0b...b70b
[S2]Outland Installer, Macworld CD 1998-02, via discmaster; sha256 79c2bd6f...0af68d, 4,334,947 bytesSame 1995 game set plus Outland TCP Tool 1.0.1 (1994; resource fork sha256 afdf44b3...07d1) and the manual
[S3]Outland Complete Installer, Ian & Stuart's Australian Mac CD (1994-12-26), via discmaster; MacBinary self-extracting archive, sha256 14f46747...e2c9c, 2,785,024 bytesDec 1994 set without Backgammon. Read Me, Documentation/Outland Gateway, Documentation/Outland via Delphi, Outland CCL Modem Tool
[S4]Outland web pages 1996-97 (Wayback), as cited in backgammon-network.md [S12]price, developer kit with a "simple socket interface"

Local copies: a working folder outside the repository (original/ holds the archives, unpacked/ the contents). Download details are in a working folder outside the repository.

2. Connection details

ItemValueSource
TCP hostdover.outland.com, IP 199.97.249.2 (1994-95)Gateway default config string Outland TCP ToolKEY 8838 PORT 4000 ADDRESS "dover.outland.com" (PEF string near 0x28c9d); [S3] Documentation
TCP port4000, editable ("Port:" field, TCP Tool DITL 31700)[S1][S2]
KEY 8838a config-record magic: the TCP Tool's validation code checks the first long of its config is 0x2286 (8838) and fills in port 0xFA0 (4000) as the default. It is not a licence or a network valueTCP Tool cval 0x25c4, 0x2608 [S2]
TCP streamplain MacTCP stream with a DNR lookup ("OpenResolver", "TCPCreate error"). No telnet negotiation code was found in the toolTCP Tool strings [S2]
ModemOutland CCL Modem Tool, default config Port "Modem Port" ModemType "Hayes 1200/2400" PhoneNumber "1-415-325-9904"; uses ARA modem scriptsPEF strings; [S3]
Via a shell accountSettings > Telnet, dial the provider with the CCL tool, log in through a terminal window, type telnet dover.outland.com; "the Outland graphics software then takes over the connection". Delphi users had to turn off host echo (/ECHO HOST)[S3] Outland Gateway, Outland via Delphi
Requirements68020+, System 7, MacTCP 2.0.4+ recommended (2.0.6 in 1995), or a 2400+ bps modem[S1][S3] Read Me
AccountsUS$9.95/month, first 5 hours free; account name (fixed), password, screen name, description; credit card or disk serial number at sign-upmanual [S1]; Gateway STR# 129

For ParlorNet this means no DNS tricks are needed: the user types our host and port into the Gateway's connection settings.

3. Link layer (Gateway DataLink.c)

All of this is from the PowerPC Gateway [S1].

Frame format

byte 0   (seq << 4) | ack          seq: this frame's sequence 0-15; ack: last in-order seq received
byte 1   (type << 4) | channel     type: 0 data, 1 nak, 2 ack, 3 data (resend); channel 0-4 (asserted <= 4)
byte 2-3 check, big-endian
byte 4.. payload, DLE-stuffed: every 0x10 is sent as 0x10 0x10
...      0x10 0x03                 DLE ETX ends the frame

Worked examples (computed with the rule above; the adapter's tests check them):

server -> client, channel 0, seq 0, ack 15, payload "T" (keepalive):
  0f 00 95 ef 54 10 03
server -> client, channel 0, seq 0, payload "P" + 12 34 56 78 + 00 00 00 00:
  0f 00 05 4c 50 12 34 56 78 00 00 00 00 10 03
client -> server, ack of seq 0 (type 2, key 1):
  00 20 32 b4 10 03

Channels

4. Control channel (Gateway CConnect.c, CUpdate.c)

Channel 0 is a byte stream of concatenated commands. The parser (PEF 0x18ec) returns the length used, or 0 if more bytes are needed. Several commands use a variable length field (encoder PEF 0xe70, decoder 0xeec): the value is the length of the whole command; it is one byte v when the command is at most 0x7e bytes (the encoder is called with n = the length without the field and writes n+1), else two bytes 0x80 | (v >> 7), v & 0x7f with v = n+2. Strings are C strings (NUL-terminated) unless noted.

Server -> client (first byte 0x50-0x65)

CmdLayoutEffectSource
P 0x50P key:u32 x:u32 (9 bytes)Start command; must be the first command ("Bad start command." otherwise). Sets the session's started flag (+0xc), keeps the key (+0x10, used to XOR the login), stores x at TOC+0x2cfc, which nothing reads (so x is unused), then sends the login (0x82) at oncePEF 0x1328
T 0x54Tno-op, 1 byte (keepalive)PEF 0xf40
V 0x56V code:u16message by number from STR# 129 (1 account not found, 2 password incorrect, 3 service error, 4 gateway out of date, 6 password changed, 31 welcome, ...). Codes 1, 2 and 4 (not 3) also start a 60-tick disconnect timerPEF 0x11ec; STR# 129
R 0x52R chan:u8 id:u32service channel chan is open for the service id. Asserts that the service was requested (+0x10, set by the open) and is not running, records it on the channel, allows the PPC connection (clConnAllow) and launches the application from its local file record (LaunchApplication, PEF 0x3058)PEF 0xf58
S 0x53S chan:u8 msg:u8 id:u32service channel closed, with a message numberPEF 0x1274
W 0x57W len:u8 string\0 (len counts the whole command; len-2 asserted <= 0x20)copies the string to session+0x74 (C string copy, PEF 0x21340). Probably the screen name (UNVERIFIED use)PEF 0x13b4
X 0x58X varlen bytes (at most 256)stores a longer string, probably the description (UNVERIFIED)PEF 0x1430
a 0x61a sub:u8opens a dialog: 1 new-account form (DLOG 140), 2 credit card form (141), 4 dialog 142, 5 password retry (144), 6 "checking your credit" (146), 7 terms of service windowPEF 0x14d4
b 0x62b sub:u8 len:u16 text\0 (len counts the whole command)sub 1 opens a text window (window 139, Screens.c) and prints the len-5 bytes of text, in 256-byte pieces. Any other sub is assertedPEF 0x16bf8, 0x16af0
c 0x63c varlen time:u32 str str ...player information window ("Last connected on %s at %s")PEF 0x1590
d 0x64d ? len:u16 time:u32 version:u32 datapricing information ("Outland prices have changed ...")PEF 0x1658
e 0x65e type:u8 len:u16 x:u32 text\0queued notice, shown from the idle loop (PEF 0x3930): type 1 is STR# 129/46 "Outland is temporarily unavailable in order to ^1. Please try again in ^2 minutes." with the text and x/60 minutes (at least 5); type 2 is "Outland is going down %s to %s. %s"PEF 0x17e8, 0x1718, 0x3614, 0x37d4
Y 0x59Y len:u16 count:u8, then per service nfiles:u8 flag:u8 id:u32 creator:u32 and nfiles x (kind:u16 version:u32)service list (below)PEF 0xae74
Z [ ^ _ ` ``download and patch of service software (file create, data, size "disk/dl size", completion)PEF 0xb058, 0xb428, 0xbb3c, 0xbbc8, 0xbc38
Q U \ ]not used (the parser reports a bad command)jump table at TOC+0x12d8

The service list and opening a service (settled)

The Gateway keeps a table of 16 service entries (TOC+0x5500, 0x208 bytes each). Fields: +0 in use, +4 flag from the list, +8 a local application is present, +0xc an update is needed, +0x10 open requested, +0x14 running, +0x18 number of listed files, +0x1c number of local file records, +0x2c service ID, +0x30 creator, +0x34 icon, +0x40 process serial number, +0x48 port name, +0x88 listed files (kind, version; at most 4), +0xb8 local file records (0x54 bytes each).

  1. When the byte stream connects (PEF 0x2bc8, session state +8 = 1) the Gateway opens its services window (window 138, PEF 0x167e4), clears the table (every flag back to 0, PEF 0xace0) and scans the Outland Games folder (PEF 0x946c, one call of PEF 0x9228 per file). A file counts if it has a Neti 256 resource (the service ID; GATE is skipped) and a nonzero first long in vers 1 (PEF 0x1a308). Its local record gets kind = the first long of Neti 258 (0 when there is none), version = that vers long, and its FSSpec; kind 0 is the application itself, which also sets +8 and copies Neti 257 (the port name) to +0x48. Backgammon has no Neti 258, so it registers as service BG@S, kind 0, version 0x03116000. The Gateway itself is added as GATE (PEF 0x9bec).
  2. **Y arrives** (PEF 0xae74): checks that the whole command (u16 at byte 1) has arrived; per service, find or create the entry by ID (PEF 0x9d04 / 0x9e88), store the flag (+4) and creator (+0x30) and look up the creator's icon in the desktop database (PEF 0x9b10, default icon suite 134); store the listed files (PEF 0x9e14, assert at most 4); then PEF 0xa414 compares: for each listed file, if no local record of that kind exists or the local version is lower than the listed one, +0xc (update needed) is set. Asserts that the command was consumed exactly. Then, for every entry in use: GATE with an update needed sets TOC+0x54b4 (the Gateway update offer, PEF 0xbd10, STR# 129/12); an entry with a local application is shown in the services window (PEF 0x169ec); an entry without one but with flag set makes the Gateway ask for the software at once (8b id, PEF 0xa068). Finally TOC+0x54b0 is set.
  3. The idle loop (PEF 0x39f8) sees TOC+0x54b0 in session state 1: Gateway update offer if needed, else it sends 8c 03 03 (PEF 0x242c: command 0x8c, sub 3, the variable-length field holding 3). What the server does with it is UNVERIFIED; a server may ignore it.
  4. Double-click on a service (PEF 0xab24): update needed -> update offer (PEF 0xa968, STR# 129/10); another service still opening -> STR# 128/35; no local application -> STR# 128/18; already requested -> STR# 128/20; running -> bring it to the front; flag 0 -> STR# 128/21 "The service you requested is currently unavailable"; no free channel -> STR# 128/33. Otherwise it marks a channel as opening, enables it in the datalink and sends 81 chan id (PEF 0x9f30).

So there is no separate signed-in state to reach: the session runs from the connection, P must come first, the login follows by itself, and a service can be opened as soon as Y has flagged it. The record that makes Backgammon launch rather than offer a download is

59 00 0e 01   00 01 42 47 40 53 54 42 42 47
Y  len  count nfiles=0 flag=1 'BG@S' 'TBBG'

With no files listed nothing is compared, so no update is offered for any version; with flag 1 the double-click sends the open request. If Backgammon is not installed the same entry makes the Gateway send 8b 'BG@S' (a download request), which a server without downloads ignores.

Client -> server (first byte 0x81-0x8e)

CmdLayoutMeaningSource
0x8181 chan:u8 serviceID:u32 (6 bytes)open a service on channel chanPEF 0x9f30, caller 0xab24
0x8282 len:u8 vers:u32 account\0 password\0login, sent right after P. len = whole record (account + password + 8). vers = first long of the Gateway vers 1 resource (01 32 80 02 for 1.3.2). Bytes from offset 6 to the end are XOR-ed with the P key: whole 32-bit big-endian words first, then the remaining bytes with the key's low byte (PEF 0x68f4; a key of 0 leaves them clear)PEF 0x1e94, 0x68f4, 0x1a308
0x8383 chan:u8local application on chan disconnectedPEF 0x1e1c (from "clConnBroken")
0x8484 (1 byte)sent while the user disconnects (PEF 0x2d90 -> 0x312c)PEF 0x1da8
0x8585 len strchange screen name (dialog "Enter your screen name") (UNVERIFIED mapping)PEF 0x206c
0x8686 varlen strchange description (UNVERIFIED mapping)PEF 0x2138
0x8787 len str str (XOR-ed)change password, old and new (UNVERIFIED mapping)PEF 0x1f80
0x8888 b:u8 u32 u32 (10 bytes)update related (CUpdate.c)PEF 0x9fa0
0x8989 (1 byte)update relatedPEF 0xa240
0x8a8a len id:u32 ...update related: the local versions of a service's filesPEF 0xa108
0x8b8b serviceID:u32 (5 bytes)asks for (a newer copy of) a service's softwarePEF 0xa068
0x8c8c sub varlen ...account creation: sub 1 with six XOR-ed strings (new-account form), sub 2 with three (credit card, expiry, serial), sub 3 with nothing (after the service list, above), sub 5 with onePEF 0x222c, 0x24d8, 0x242c, 0x2648
0x8d8d len strlook up another player's information by account namePEF 0x2758
0x8e8e b:u8answer to a server dialog, probably the terms of service (UNVERIFIED)PEF 0x2800

5. Backgammon application protocol (channel 1-3 payload)

Source: Backgammon 68k code [S1]. Record handling: connSetup sets the record length to 0x102 = 258 bytes (CODE 1 0x2d14) and points the record pointer at one buffer, A5-0x1164. connIdle (CODE 1 0x3388) reads one byte, skips zero bytes, reads the remaining 257, and dispatches on byte 0 (table at CODE 1 0x341c). Every send writes the full 258 bytes from the same buffer: a record the client sends keeps whatever the last record left in the bytes its sender does not set. A server therefore reads only the fields each sender sets (listed below) and never trusts the others, for example byte 174 of a move. Multi-byte fields are big-endian (68k).

connMade (CODE 1 0x2e12) sets the network mode to 2 and sends LobbyCheckIn; kYourName and go set it to 9, the mode in which turns are sent to the server.

Record layout

OffsetSizeField
01type
11player id, or flag (watch target, accept flag, turn)
2162payload: a board image (below), a Pascal string (chat, names, log text), or a player record
1641cube value (1, 2, 4, ...)
1651number of doublings so far
1662score of team 1 (White)
1682score of team 0 (Red)
1701die 1 (in the opening: team 1's die)
1711die 2 (in the opening: team 0's die)
1722points won when the game ends (0 during play)
1741id of the player the record is about (the mover); checked against the opponent's id unless watching

Board image (162 bytes at record offset 2)

Dump__5boardFP10boardimage (CODE 1 0x9ac0) and Aquire (0x96c2). The column and move fields are words indexed with a scale of 2 (the extension words 3232, 3262, 3202, 320a have scale bits 01), the screen points longs with scale 4.

Image offsetField
0x00word: number of checker moves in the turn just played (0-4; the board's count, capped at 4)
0x024 words: from column of each move (0-23; -1 or 255 = the bar of team 1, which enters from the -1 side; 24 = the bar of team 0)
0x0a4 words: to column of each move (0-23; -1 or 255 = borne off by team 0; 24 = borne off by team 1)
0x124 longs: screen Point where each dragged checker started (for animation)
0x224 longs: screen Point where it landed
0x3224 words: checker count on columns 0-23
0x6224 words: team owning each column; 2 for an empty column (the column constructor, CODE 1 0xa19c, sets 2, and Take sets 2 again at count 0; Put on a team-2 column takes the new team, 0xa1d8)
0x92 / 0x94count / team: borne-off tray of team 0 (object +0x2a0, team 0)
0x96 / 0x98count / team: borne-off tray of team 1 (+0x29c, team 1)
0x9a / 0x9ccount / team: bar of team 0 (+0x2a8, team 0)
0x9e / 0xa0count / team: bar of team 1 (+0x2a4, team 1)

The tray and bar objects have a fixed team (board constructor, CODE 1 0x7016-0x708a) and take checkers only of that team (0x9e12, 0xa08a), so their team words must be the owning team. The receiver replays the listed moves as an animation (unless the mover is the computer), then takes every column, tray and bar empty and puts the image's counts back (0x98b8-0x9a94): the full position is authoritative. The opening position (__ct__5boardFv, CODE 1 0x6ea8) is: column 0 = 2 of team 1, 5 = 5 of team 0, 7 = 3 of team 0, 11 = 5 of team 1, 12 = 5 of team 0, 16 = 3 of team 1, 18 = 5 of team 1, 23 = 2 of team 0. Team 0 bears off on the -1 side and team 1 on the 24 side. So **column i is backgammon/1 point i+1, and team 0 is seat 0 (moving 24 down to 1). Team 1 is White and team 0 Red**: the challenge dialog (DITL 140) offers "Accept, Play White" as item 1, which makes the player team 1 (below).

Message catalogue

Client -> server (all senders in the binary; "keeps" = bytes left from the previous record):

TypeName (from code)Fields setSource
0x64LobbyCheckInnone; sent when the channel connectsCODE 1 0x2e66
0x6eReEnterLobbynone; after a game is put away0x2ebe
0x6aChallenge[2] opponent id, [4..5] match length (1, 3, 5, 7 or typed)0x2f04
0x6bchallenge response[6] 1 accept / 0 decline, [7] colour: 1 = this player is team 1 (White, item 1), 0 = team 0 (Red, item 4); keeps [1], [2] (the challenger) and [4..5] from the challengehandle_kChallenge 0x3dbc, 0x3e20
0x01start[1] the same colour byte; sent by both players after acceptance; nothing in the client waits for an answer0x3de6, 0x403e
0x34break challengesent when a response comes from someone the player did not challenge; keeps [2]0x3e7e
0x78Watch[1] player id to watch; the client enters watching mode as it sends0x2f4c
0x2bRollNotifynone; the user has rolled the held dice0x334c
0x0aSendDone (move)board image of the turn, cube, doublings, both scores0x301e
0x0cSendDone (game over)as 0x0a, plus [172] the points won0x301e
0x14SendDoublenone0x30ea
0x15 / 0x16double answeraccept / decline0x3134
0x1cSendResign[2..3] level 1 normal, 2 gammon, 3 backgammon0x3184
0x1danswer[2..3] 1 accept / 0 decline to a resignation; [1] 1/0 to a draw offer0x438e, 0x4274
0x1aAskForDrawnone0x31f6
0x32PutBoardAwaynone; the player leaves the game ("a loss will be charged", dialog 150)0x3250, 0x4338
0x37 / 0x3aSendMsg[2] Pascal string, at most 253 characters; 0x37 = game chat, 0x3a = lobby chat. The client prints its own line itself (0x53e4-0x5404), so a server does not echo it0x2f98

Server -> client:

TypeHandlerFields usedEffect
0x6dkYourNameplayer recordown stats every time; own name (MyNameIs, 0xa7a6) only the first time
0x64kInLobbynonenothing
0x65kNewPlayerplayer recordadd a player to the lobby list; after kYourName it also prints "has entered" and plays a sound
0x66kPlayerLeft[1] idremove the player
0x6e / 0x6fkReLobby / kLeftLobbyplayer recordplayer available again / gone to play (MovePlayer 0xb19c with flag 1 / 0)
0x6akChallenge[1] and [2] challenger id, [4..5] match lengthchallenge dialog 140 ("Accept, Play White" / "Accept, Play Red" / "Decline")
0x6bkChlngResp[2] responder id (must be the one challenged, else the client sends 0x34 and goes back to the lobby), [4..5] match length, [6] accepted, [7] the receiver's own teamstart the match, or "Your Challenge has been declined." (dialog 141)
0x34kBreakChallengenonechallenge cancelled
0x79kOkToWatch[1] nonzero = allowedenter watch mode; 0 leaves challenge mode
0x7a / 0x7bkWBlackName / kWWhiteName[1] Pascal stringnames of the watched players
0x7ckTurn[1] teamset whose turn it is: turn = team ([1] != 0) (0x3792, through SwitchTurn)
0x28goboard image, [172] points, [174] mover; cube, doublings, scores only when watching; [170..171] diceyour turn (below)
0x2aroll[170..171] dice, [174] moverthe dice shown; in a new game it is the opening roll (below)
0x14doubleRequestnonecube dialog 135 (DoubleIt, 0x8810); no answer at all once 6 doublings were made
0x15 / 0x16doubleYes / doubleNononetaken: cube x2, doublings +1, back to rolling (0x3856) / dropped: the cube's value to this player, then 0x0c with those points (0x38d0)
0x1a / 0x1bdrawRequest / drawReturn[1] accept flagdialog 151 "quit without being charged a loss" -> 0x1d / accepted: back to the lobby with no result; declined: dialog 152 Play or Resign (Resign sends 0x32)
0x1c / 0x1dresignRequest / resignReturn[2..3] level / accepteddialog per level; accepted: 0x1d 1, the cube x level to this player, 0x0c with those points / declined: alert 159; accepted: nothing (the winner's 0x0c, relayed as a go, ends the game)
0x32lostOpponentnone"lost opponent" message, network play off
0x33OpponentLeftnone"opponent left" message, network play off
0x37 / 0x3amsg / pbmsg[1] sender id, [2] Pascal stringchat into the game / lobby window, prefixed with the sender's name looked up in the lobby list
0x83 / 0x82kPvtNotice / kPubNotice[1] Pascal stringnotice into the game / lobby window
0x85kHighScoreplayer record + [0x2c] rankhigh-score table
0xe7klog[1] 0 open file named by [2], 1 append a score line, 2 closeserver-driven local log file

Player record (types 0x65, 0x6d, 0x6e, 0x6f, 0x85; AddPlayer/MovePlayer, CODE 1 0xafc4, 0xb19c): [2] Pascal string name (33 bytes), [0x23] player id, [0x24] available (nonzero: the list shows a random face 0-3; zero: the icon in [0x25]), [0x25] icon, [0x26] [0x28] [0x2a] three 16-bit statistics (dialog 147 shows rating, wins and losses; which field is which is UNVERIFIED), [0x2c] rank (high scores only). The lobby list survives a game: CloseLobby (0xb4f0) only hides the window.

Game flow as the client implements it

6. Sample session

Bytes on the TCP stream are datalink frames (section 3). Below, ch0> / ch0< are control payloads from / to the client and ch1> / ch1< Backgammon records (258 bytes each, only the meaningful bytes shown). This is what the adapter produces.

(TCP connect)
ch0< 50 k1 k2 k3 k4 00 00 00 00                  P: start, XOR key k
ch0> 82 len 01 32 80 02 <account\0password\0 XOR k>
ch0< 57 06 67 75 73 00                            W "gus"
ch0< 59 00 0e 01 00 01 'BG@S' 'TBBG'              Y: Backgammon, available, no files
ch0> 8c 03 03                                     (ignored)
     (user double-clicks Backgammon)
ch0> 81 01 'BG@S'
ch0< 52 01 'BG@S'                                 R: channel 1 open; the Gateway launches Backgammon
ch1> 64                                           LobbyCheckIn
ch1< 65 .. <player record> (one per player, the player too)   kNewPlayer
ch1< 6d .. <own player record>                    kYourName
     (bob challenges ann; ann picks White)
ch1> 6a .. [2] ann [4..5] 1                       (from bob)
ch1< 6a [1] bob [2] bob [4..5] 1                  (to ann)
ch1> 6b .. [6] 1 [7] 1                            (ann: accept, team 1)
ch1< 6b [2] ann [4..5] 1 [6] 1 [7] 0              (to bob: you are team 0)
ch1> 01 [1] colour  (both)
ch1< 2a [170] 5 [171] 3 [174] opponent  (both)    opening: team 1 (ann) starts with 5-3
ch1> 2b ; 0a <image: ann's moves and position>    (ann)
ch1< 2a [170..171] bob's dice [174] ann           (to ann: bob's roll)
ch1< 28 <ann's image> [170..171] bob's dice [174] ann   (to bob: your turn)
...
ch1< 14 ; ch1> 15                                 (a double offered and taken)
ch1> 0c <image> [172] 2                           (a gammon won)
ch1< 28 <final image> [172] 2 [174] winner        (to the loser)
ch0< 54                                           T keepalive, when idle

7. Unverified items and open questions

Settled in the second pass: the signed-in state (there is none beyond the connection; Y flags the services), the service-list record, the service ID (Neti 256), the second long of P (unused), the variable-length encoding, the length of 0x84 and when it is sent, the payload limit (512), the empty-column team (2), the tray and bar teams, which team is White, the colour byte, the opening, the conversions a server makes (0x0a/0x0c -> go with new dice; the opening and each roll as roll; 0x16 followed by the doubler's 0x0c), and that clients print their own chat. Still open:

  1. Everything here is static: no Gateway or Backgammon has run against a server. Timing (how fast the Gateway acks, whether it splits a 258-byte record across frames when it sends) is untested.
  2. The meaning of 8c 03 03 after the service list, of W and X, and of 0x88-0x8a and 0x8e.
  3. Whether the Gateway sends each control command in its own frame (the adapter parses the fixed-length commands and the login by length and treats anything else as running to the end of its frame).
  4. The icon numbers for [0x25] and the meaning of the three statistics in a player record.
  5. The datalink timers (30-tick ack delay, 480-tick resend) and whether any frame precedes the first P.
  6. The telnet-through-a-shell path: how the Gateway's terminal window hands over to the datalink. Not needed for a TCP server.
  7. Equivalence of the 68k Gateway code with the PowerPC build read here.
  8. How Outland's own server chose dice and who opened a new game in a longer match (the client only needs the opening roll).

Best next step, when the user decides: run the Gateway 1.3.2 and Backgammon in an emulated 68k Mac against the adapter on a test port, with the adapter's log on (it logs every control command and record type).

8. What a real Gateway session must show

9. The ParlorNet adapter

adapters/outland.py implements the above as a client of parlord (docs/adapters.md): link layer, control channel subset (P, login, W, Y with Backgammon only, R/S, T, V, b for text), and the Backgammon records mapped onto backgammon/1 tables. Choices that follow from the protocol:

10. Feasibility verdict

A compatible service is feasible and is built (adapters/outland.py, tested with a scripted Gateway against the core in tests/test_outland.py). Nothing in the client needs Outland's original server code, and nothing is encrypted beyond an XOR with a key the server chooses. Gaps against backgammon/1 are the same as for FIBS (match play, resign levels) plus draws, which backgammon/1 does not have, and the Outland client's own double, which needs the turn's dice before the core has rolled them.

This doc on GitHub


 These pages cover every ParlorNet server. | Source code | ParlorNet is free software.