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

MacFIBS 2.0.3 (Mac 68k): what the client expects from a FIBS server

Status: research notes, 2026-11-21. Every fact carries a source tag like [S1] (list in section a). Anything not backed by a source is marked UNVERIFIED. Code locations are given as CODE n:offset (offset within the resource data) or A5-xxxx (initialised globals).

Method: static analysis only. The application was downloaded as MacBinary, split into forks with a Python script, and its resource fork was read in Python: string and dialog resources, the compressed DATA 0 resource (decoded with the same algorithm as the loader in CODE 1:0x136), and a 68020 disassembly (capstone 5) of the parser and network segments. The binary carries MacsBug function names (ParseEnglish__11CFIBSParserFv and so on), so every routine named below is the author's own name. Nothing was run and no server was contacted.

Key findings in brief

  1. Transport: MacTCP TCP through TurboTCP 2.0. The host field is one string, host[ port]. A single space separates an optional decimal port. With no port given, MacFIBS connects to port 23, not 4321. The shipped default is fraggel65.mdstud.chalmers.se 4321 [S1][S2]. A user reaches ParlorNet by typing ourhost 6505 in the Connect dialog. No patching is needed.
  2. Login: MacFIBS waits for a partial line (no newline yet) that starts with login:. It then sends one line, connect <name> <password> (TinyMUD style), or guest when the name is guest [S1]. It never answers a password: prompt. A FIBS-compatible adapter **must accept connect name password** at the login prompt.
  3. Lines: commands go out terminated by a bare CR (\r, no LF). Incoming text may end lines with CR, LF or CR LF [S1]. The adapter must treat a lone CR as end of line.
  4. No prompts: a line is parsed only if its first non-space character is a letter, a digit or *. A telnet-mode > prompt glued to the front of a message hides that message from the parser [S1]. The User Guide requires toggle telnet NO [S2]. FIBS suppresses the prompt for connect logins [S3]. The adapter should send no > prompts to a session that logged in with connect.
  5. Parser shape: each line is split into words on space, tab and CR. Dispatch goes by exact word count (1 to 9, and 10 or more), then by strcmp on given words, prefix match on the whole line, or strstr (substring, not at column 0). About 110 English messages are recognised [S1][S2]. Section e lists every pattern with its required word count. A message with one word more or fewer than FIBS's wording goes to the wrong handler and is only shown as text.
  6. Board: board: must be at column 0 and the line needs all 53 colon-separated fields. MacFIBS normalises any colour and direction itself: it mirrors if direction is +1 and negates if colour is -1. So seat 1 can be sent as X moving 1 to 24 [S1]. Moves go back as move 13 7 8 7 (from/to pairs, bar, off). The numbers are translated back into the server's orientation [S1].
  7. Verdict: fully compatible with the planned FIBS adapter (backgammon-network.md section h). It needs three things beyond McLean's spec: the connect login, CR-only input lines, and the post-login line ** User <name> ... that triggers the client's set / toggle / rawwho sequence. Confidence high for the strings and dispatch rules, which were read from code. Medium for the exact FIBS 1995 wording of a few lines the client only partly checks (section h).

(a) Sources

(b) Connection

ItemValueSource
StackMacTCP 2.0 via TurboTCP 2.0 (CTCPEndpoint, CTCPStream, CTCPResolverCall). Works over MacPPP/SLIP, not over a serial "dumb terminal" session[S1] CODE 5, CODE 9; [S2]
Default host stringfraggel65.mdstud.chalmers.se 4321 (resource FInf 128, field "FIBS IP Name")[S1]
Host string syntaxOpenUserHost__12CTCPEndpointFPcUsUc (CODE 5:0x58d4) copies characters up to the first space as the host, then reads the rest as a decimal port. A dotted IP address works (DNR StrToAddr). The User Guide recommends 129.16.235.90 4321 when DNS fails[S1]; [S2]
Default port if omitted23 (ConnectToFIBS__11CFIBSParserFP12CConnectInfo, CODE 5:0x30d4, passes 0x17)[S1]
Command timeout60 s (TOut 128 = 0x003C)[S1]
Client to server line endbare CR. Every command string ends \r and is sent as is by SendCString[S1] A5 strings, CODE 5:0x2f2e
Server to client line endCR, LF or CR LF. HandleDataArrived__18CTelnetInterpreter (CODE 5:0x3d78) turns LF into CR and ends a line at each CR. Empty lines are ignored. A BEL (0x07) byte beeps and is dropped[S1]
Telnet optionsIAC is parsed. Any WILL x or DO x gets IAC WONT x back (CODE 5:0x3ffe, 0x405a). Sending no IAC at all is simplest[S1]
Line bufferabout 2 KB (0x122..0x94a in the parser object). Tokens in the board line are cut at 32 characters[S1]
Partial lineswhen a TCP read ends without CR, the partial text is offered to HandlePartialLine, which only looks for login:[S1] CODE 5:0x6ee

(c) Login and start-up sequence

From HandlePartialLine (CODE 5:0x6ee), HandleLogin__11CFIBSParserFv (CODE 5:0x3130), ParseStarStar (CODE 5:0xc90), Parse2 (CODE 5:0x13f2) and ParseToggleSettings (CODE 5:0x28cc) [S1]:

  1. Connect. MacFIBS sends nothing.
  2. Server text. Anything is shown in the Terminal window. A partial line that **starts with login:** (strncmp, 6 characters) while the client is not yet logged in triggers the login.
  3. Client sends connect <name> <password>\r, or guest\r if the name field is exactly guest (case-sensitive). The Terminal window echoes the password as bullets. The User Guide tells new users to log in as guest and register by hand in the Terminal window [S2].
  4. The server must then send a line whose first word is ** and second word is User, with at least three words. MacFIBS marks itself logged in and sends set\r [S1]. FIBS/W's login script waits for the word authenticated. [S4]. So the FIBS line was very probably ** User <name> authenticated. (UNVERIFIED as one string; either way, ** User <name> authenticated. satisfies both clients).
  5. Reply to set: two-word lines boardstyle: N, linelength: N, pagelength: N, ..., timezone: X (McLean's layout). If boardstyle is not 3, MacFIBS sends set boardstyle 3\r. If linelength or pagelength is not 0, it sends set linelength 0\r / set pagelength 0\r. On the first timezone: line of the session it sends toggle\r [S1]. The words must be split by spaces or tabs, not glued (timezone:UTC would be one word and is ignored).
  6. Reply to toggle: two-word lines <name> YES|NO for allowpip autoboard autodouble automove bell crawford double greedy moreboards notify ratings ready report silent telnet wrap. Each sets the matching Settings menu item. On the wrap line of the first session, if the user's preference asks for it, MacFIBS sends rawwho\r [S1].
  7. rawwho reply: nine-word lines starting who: (section e), ended by a one-word line who:end, which refreshes the Player window [S1].

What MacFIBS does not do: it never sends toggle telnet, toggle moreboards or toggle autoboard by itself. It only reads them. The User Guide asks the user to set telnet NO, autoboard YES, moreboards YES and wrap NO once, by hand [S2]. The adapter should give connect sessions these values by default: no prompt, board after every move, board after every roll, no wrapping.

(d) Commands MacFIBS sends

All end with a bare CR [S1] (A5 string table, MENU 128-205, CODE 5, CODE 7).

CommandWhen
connect <name> <password> / guestlogin (section c)
set, set boardstyle 3, set linelength 0, set pagelength 0, toggle, rawwhostart-up (section c)
toggle <x> for allowpip autoboard autodouble automove bell crawford double greedy moreboards notify ratings ready report silent telnet wrapSettings menu (only ready, double, greedy, allowpip, automove, autodouble, crawford, silent, notify, report, ratings, bell appear in the menu)
roll, doubleRoll-or-double floating window, Game menu
accept, reject, redoubledouble offered (redouble button in the dialog, STR# 1001)
accept, rejectresign offered
join, leave"Type 'join' ..." dialog (STR# 1000)
resign n, resign g, resign bResign dialog
move <from> <to> [<from> <to> ...]after the user drags checkers and clicks the dice. Points are decimal, bar, off, each preceded by one space, e.g. move 13 7 8 7, move bar 22 13 11, move 6 off 5 off (CODE 7:0x924; tables at A5-0e12 / A5-0daa map the client's internal points back to the server's numbering, using the board line's direction)
boardBoard menu "Refresh Board", and automatically after You're now watching, after "running match was loaded"
show games, show saved, show watchers, unwatchGame menu
invite <name> ..., join <name>, watch <name>, whois <name>, look <name>, gag <name>, blind <name>, rawwho, rawwho <name>Player menu. With "Update New Logins", MacFIBS sends rawwho <name> after each <name> logs in. [S2]. The exact argument layout of invite (name and length) is UNVERIFIED (string invite found, builder not traced)
chat linethe Chat popup's text is prepended to the typed line: Kibitz <text>, Say <text>, Whisper <text>, Shout <text>, Tell <name> <text> [S2]. Whether the first letter is sent capitalised as in the menu is UNVERIFIED. The adapter should match command words case-insensitively
byeDisconnect
anything typed in the Terminal windowsent verbatim with CR

(e) Messages MacFIBS parses

Dispatch (HandleLine CODE 5:0x77c, ParseEnglish CODE 5:0x858) [S1]:

**Chat (3 or more words, ParseEnglish):**

PatternEffect
w2 = says:chat from w1 (also used for tell delivered to you)
w2 = shouts:shout from w1
w2 = kibitzes:kibitz from w1
w2 = kibitz:recognised, not shown in the Chat window
w2 = whispers:whisper from w1
w2 = is, w3 = away:away message from w1
w2 begins f and line prefix Message fromstored message, sender = w3 (Message from <name>: ..., trailing : or . stripped from names)
w1 begins F, w3 begins (, prefix Fromstored message, sender = w2 (From <name> (<date>): ...; layout UNVERIFIED beyond these checks)

**** lines (ParseStarStar, CODE 5:0xc90):** w2 = User triggers login completion (section c). w2 = You, w3 = tell is shown as chat (your own tell echoed). Each of these prefixes updates a menu check mark or the player list:

** You gag              ** You ungag            ** You blind            ** You unblind
** Use 'toggle ready' first
** You are now playing a                      (match start: StartPlaying, set players playing)
...contains " has joined you for a"            (match start, the other side)
** You terminated the game   / contains "has left the game."
** You don't allow the use of the server's 'pip' command.
** You allow the use the server's 'pip' command.      (sic: "use the")
** The board won't be refreshed after every move.
** The board will be refreshed after every move.
** You agree that doublets during opening double the cube.
** You don't agree that doublets during opening double the cube.
** Forced moves won't be done automatically.
** Forced moves will be done automatically.
** Your terminal won't ring the bell if someone talks to you or invites you
** Your terminal will ring the bell if someone talks to you or invites you
** You would like to play without using the Crawford rule.
** You insist on playing with the Crawford rule.
** You won't be asked if you want to double.
** You will be asked if you want to double.
** Will use automatic greedy bearoffs.
** Won't use automatic greedy bearoffs.
** Will send rawboards after rolling.
** Won't send rawboards after rolling.
** You won't be notified when new users log in.
** You'll be notified when new users log in.
** You'll see how the rating changes are calculated.
** You won't see how the rating changes are calculated.
** You're now ready to invite or join someone.
** You're now refusing to play with someone.
** You won't be informed about starting and ending matches.
** You will be informed about starting and ending matches.
** You won't hear what other players shout.
** You will hear what other players shout.
** You use a client program and will receive extra 'newlines'.
** You use telnet and don't need extra 'newlines'.
** The server will wrap long lines.
** Your terminal knows how to wrap long lines.
...contains "is refusing games."

These are FIBS's own toggle replies, copied into the client. The adapter should emit them verbatim for toggle commands, because the Settings menu relies on them.

By word count (Parse1 ... ParseLongLine, CODE 5:0x139e-0x2398):

WordsPattern (example)Effect
1who:endend of rawwho list, refresh Player window
2<toggle> YES / <toggle> NOsettings menu state (section c)
2turn: <name>. (w1 = turn:)plays the start-of-match sound (match synopsis line)
2boardstyle: N, linelength: N, pagelength: N, timezone: Xstart-up corrections (section c)
2<name> doubles. (w2 = doubles.)cube offered by w1 (opponent or you)
3<name> logs in. / <name> logs out.player list add / remove (and a per-player login sound)
3<name> can't move.dice cleared, board redrawn
3<name> drops connection.player removed
4contains logs in again.player list update
4prefix You're now watching (You're now watching <name>.)watching state; client sends board
4prefix Network error with (Network error with <name>)remove w4
4prefix You stop watchingleave watching state
4contains stops watching / is watching / starts watchingshown in Chat window
4contains accepts the double. (<name> accepts the double.)cube value doubled locally, ownership updated
5w2 = roll or rolls: You roll 3 and 1. / <name> rolls 3 and 1.HandleDiceRoll: first characters of w3 and w5 must be digits. If w1 equals the stored opponent name, the dice are the opponent's, else yours. Doubles mean 4 moves
5prefix Connection with (Connection with <name> timed out.)remove w3
5prefix There are messages for you:shown in Chat window
6contains doubles. Type 'accept' or 'reject'. (<name> doubles. Type 'accept' or 'reject'.)Accept / Reject / Redouble dialog. Cube value is doubled locally (cap 64)
6prefix Starting a new game with new-game sound
6contains just registered and logs in.player added
7prefix It's your turn to roll or double. or It's your turn. Please roll or doubleRoll / Double floating window
7contains You're not watching anymore. (e.g. <name> logs out. You're not watching anymore.)leave watching, clear board
7contains logs out. The game was saved. (<name> logs out. The game was saved.)match interrupted, board cleared, both players marked ready
8w1 all digitsa row of the human who table (ParseWho, below)
8prefix You win the (You win the 3 point match 3-1 .)match over notice (if playing), board cleared
8contains wins the and point match (<name> wins the 3 point match 3-1 .)same, opponent won
8contains are resuming their (<a> and <b> are resuming their 5-point match.) or start a + point match (<a> and <b> start a 5 point match.)mark w1 and w3 playing (needs toggle report)
8w2 = wins, w3 = the (other forms)mark you and the opponent ready
8w1 = No, w2 = S (No S username rating exp login idle from)who header, display only
9w1 = who:a rawwho row (ParseRawWho, below)
9w2 = wants and contains wants to resume a saved match with you.invitation dialog
9w2 = has and contains Your running match was loaded (<name> has joined you. Your running match was loaded.)start playing, client sends board
9prefix You win the game and get (You win the game and get 1 point. Congratulations!)game-over handling
9w2 = wants, contains wants to play a (<name> wants to play a 5-point match with you., hyphenated form)invitation dialog
9w1 all digitshuman who row
10+prefix You are now playing with and contains Your running match was loaded.start playing, client sends board
10+contains wants to resign. (<name> wants to resign. You will win 1 point. Type 'accept' or 'reject'.)Accept / Reject dialog (when playing)
10+w1 = Type, w2 = 'join' (Type 'join' if you want to play the next game, type 'leave' if you don't.)Join / Leave dialog
10+contains wants to play a (<name> wants to play a 5 point match with you.)invitation dialog
10+w2 = wins, w3 = a (<a> wins a 5 point match against <b> 5-2 .)mark w1 and w8 ready (needs toggle report)

Not parsed at all (shown as text only): You roll / rolls lines with other word counts, <name> moves ..., Please move n pieces., You double. Please wait ..., You accept the double. The cube shows n., <name> wins the game and gets n points. Sorry., score in n point match: ..., the match synopsis apart from turn:. The board state comes only from board lines, so these lines can use FIBS wording freely.

Who rows. ParseRawWho (9 words, w1 = who:): w4 = name, w3 = status (first character R ready, P playing, - not ready; second character W watching), w5 = rating (string), w6 = experience (number), w9 = location. w2, w7 and w8 are ignored [S1]. The 1995 rawwho layout is not documented elsewhere (backgammon-network.md g1). A line such as who: 1 R- alice 1500.00 23 0 0 host.example satisfies the client. The adapter defines the ignored fields. ParseWho (human who, 8 or 9 words, w1 numeric): status = w2, name = w(n-5), rating = w(n-4), experience = w(n-3), location = w(n).

(f) The board line

IsRawBoard (CODE 5:0x287c) requires the line to begin with board: at column 0. UpdatePosition__13CGamePositionFPCc (CODE 5:0x363a) then reads, separated by :: tag, player name, opponent name, match length, two scores, 26 positions, turn, four dice (player 2, opponent 2), cube, three booleans (may double, may double, was doubled), colour, direction, home, bar, two on-home counts, two on-bar counts, can-move, forced-move, did-Crawford, redoubles. That is 53 fields in McLean's order (backgammon-network.md section b) [S1]. Names are cut at 32 characters. Numbers go through StringToNum.

After reading [S1]:

So the adapter can send seat 0 as O (colour 1, direction -1) and seat 1 as X (colour -1, direction 1) with our absolute point numbers, as proposed in backgammon-network.md section i. MacFIBS's move command uses the server's numbering for that player (CODE 7 picks the table by direction).

The dice in the board line and the roll(s) lines both feed the dice display. can move (field 51) feeds the move counter.

(g) A session the adapter would need to produce

C: is what MacFIBS sends (CR-terminated); S: is server output (CR LF). Board lines abbreviated.

S: <banner lines, our own wording>
S: login:                                   (no newline)
C: connect alice secret1
S: ** User alice authenticated.
C: set
S: Settings of variables:
S: boardstyle: 3
S: linelength: 0
S: pagelength: 0
S: redoubles:  none
S: sortwho:    login
S: timezone:   UTC
C: toggle
S: The current settings are:
S: allowpip        YES
S: autoboard       YES
S: autodouble      NO
S: automove        NO
S: bell            NO
S: crawford        YES
S: double          YES
S: greedy          NO
S: moreboards      YES
S: notify          YES
S: ratings         NO
S: ready           NO
S: report          YES
S: silent          NO
S: telnet          NO
S: wrap            NO
C: rawwho
S: who: 1 R- bob 1500.00 0 0 0 host.example
S: who: 2 -- alice 1500.00 0 0 0 host.example
S: who:end
S: bob wants to play a 1 point match with you.
S: Type 'join bob' to accept.
C: join bob
S: ** You are now playing a 1 point match with bob
S: Starting a new game with bob.
S: You rolled 6, bob rolled 2
S: It's your turn to move.
S: board:You:bob:1:0:0:0:-2:0:0:0:0:5:0:3:0:0:0:-5:5:0:0:0:-3:0:-5:0:0:0:0:2:0:1:6:2:0:0:1:1:1:0:1:-1:0:25:0:0:0:0:2:0:0:0
C: move 13 7 8 7
S: board:You:bob:1:0:0:...
S: bob rolls 5 and 4.
S: board:You:bob:1:0:0:...
S: bob moves 1-5 12-16 .
S: board:You:bob:1:0:0:...
S: It's your turn. Please roll or double
C: roll
S: You roll 3 and 1.
S: board:You:bob:1:0:0:...
S: Please move 2 pieces.
...
S: You win the game and get 1 point. Congratulations!
S: You win the 1 point match 1-0 .

Word counts that matter in this session: bob wants to play a 1 point match with you. (10 words, contains wants to play a), It's your turn. Please roll or double (7), You roll 3 and 1. (5), You win the game and get 1 point. Congratulations! (9), You win the 1 point match 1-0 . (8, the space before the final . is FIBS's and keeps the count at 8).

(h) Unverified items

  1. The full text of the post-login line. MacFIBS needs only ** User plus one more word. ** User <name> authenticated. is inferred from MacFIBS and FIBS/W together.
  2. The chat command words as sent (Kibitz vs kibitz). The adapter should match command words case-insensitively.
  3. invite argument layout, and whether MacFIBS sends invite <name> <n> or invite <name> for resume (builder in the Player segment not traced).
  4. FIBS's real 1995 rawwho layout. MacFIBS reads only w3 to w6 and w9.
  5. Message from / From stored-message layouts beyond the words checked.
  6. Whether the client handles a board line glued to another message (McLean's "spanner"). It will not: the second message becomes part of the board's last field. The adapter should always end lines properly.
  7. Behaviour when who:end or timezone: never arrives. The client simply does not send the next start-up command. The adapter should always send them.

(i) Feasibility verdict

Yes, with the FIBS adapter. Requirements specific to MacFIBS, in order of importance:

  1. Accept connect <name> <password> as a one-line login at login: (and guest). Send no > prompts on such sessions.
  2. Accept a bare CR as a line terminator.
  3. After a successful login, send ** User <name> authenticated.. Answer set and toggle with FIBS's two-column layouts, ending with timezone: and wrap respectively. Implement rawwho with nine-word who: rows and a who:end line.
  4. Default autoboard and moreboards on, and telnet and wrap off, for these sessions.
  5. Use FIBS's exact wording, and therefore word counts, for the messages in section e. The board line is the source of truth for position, dice, cube and score.

The user only has to type host port in the Connect dialog. Port 4321 is not required.

(j) MacFIBS 3 r6 (3.0.6), run against ParlorNet

Status: tested on 2026-11-22. The 68K build of MacFIBS 3 r6 (January 1998) ran in Basilisk II under Mac OS 7.6.1 with Open Transport, and connected to a local ParlorNet with the FIBS adapter on port 6505. Everything the client and the server sent was logged by a relay between them. Where the program came from, and how the copy was checked, is in SOURCES.md. Some details below were read from the program's own code and strings: the DATA 0 resource decodes with the same loader as 2.0.3's, and the 68K code in CODE 1 is not compressed.

Setting it up

On its first launch MacFIBS 3 opens its Preferences. The Server pane has a "Name or IP Address" field and a separate "Port Number" field, so the host and port are no longer typed together as in 2.0.3. The Logging In pane holds the user name and password. File > Connect then opens a Connect dialog that shows the server and offers the name and password again. The program is shareware, and its ReadMe asks players to register once they have played more than ten games.

Lines on the wire

MacFIBS 3 ends every command with CR LF, where 2.0.3 sent a bare CR. It answers login: with one line. Without CLIP it sends connect <name> <password>, the same as 2.0.3. With CLIP it sends login MacFIBS_3.0.6 1008 <name> <password>.

It no longer starts up on ** User <name> authenticated.. It waits for a line that starts with ** Last login:, which FIBS sent right after the ** User line. Then it sends rawwho, show games, show saved, set and toggle, one at a time, each a second or two after the one before. It still corrects boardstyle, linelength and pagelength if set shows other values, and it sets autoboard to YES if toggle shows NO. ParlorNet now sends ** Last login: not shown on this server. after the ** User line. Without that line MacFIBS 3 logs in and then sends nothing more, and its player list stays empty.

Moves go out as move 19 21 19 21 17 19 17 19, from and to pairs in the server's numbering, as in 2.0.3. A tell typed into a chat window goes out as Tell <name> <text>, with a capital T. Lines typed into the Terminal window go out as typed.

The hidden CLIP setting

The Preferences resource (PPob 8000) has a "Use CLIP" checkbox, but it is marked invisible, and no code shows it. Its value is stored in the preferences file, in the byte after the port number. With that byte set, MacFIBS sends the CLIP login line above. The parser then treats every line whose first word is a number as a CLIP message and takes the number as the message code. No part of the program acts on those codes, so the CLIP welcome, the 5 player rows and the 12 chat lines are all dropped. With real CLIP replies, MacFIBS 3 showed no players and never sent its start-up commands.

ParlorNet therefore answers a CLIP login whose client name starts with MacFIBS_3 the same way as a connect login, with English lines and no prompts. With that in place, the CLIP setting behaves exactly like the normal one.

What was tried

Once the server sends the same lines in both modes, the two modes behave the same. Each item below names the mode it was tried in.

Client behaviour seen during the tests

This doc on GitHub


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