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

Reversi The Eclipse 1.2 as an IOS client: what it sends and what it parses

Status: 2026-11-21. Read from the PowerPC code of the user's copy (PEF code offsets below; names such as IOSComm::ProcessLine are descriptive, the binary has no symbols). The 68k build is the same source. Facts are from the code unless marked UNVERIFIED. Strings in "quotes" are exact; LF is 0x0A, CR is 0x0D.

Classes: IOSComm (an LThread; vtable data 0xdadc) runs the session; MyTelnet (0x18308) owns the PowerPlant TCP endpoint and a receive buffer; the "Players & Command Window" (PPob 5: player list PLis, output text, command line, buttons Talk To / Observe / Match) handles the buttons in its ListenToMessage at 0xa598; one game window per game number.

1. Bytes on the wire

2. Login

IOSComm::Run 0x19c70, after connecting:

  1. Reads single characters and matches three strings anywhere in the byte stream, each with its own counter (a mismatch resets that counter): login:, password:, <ios>.
  2. On login: it sends the user name + LF CR. On password: it sends the password + LF CR (empty if none was typed). It answers every occurrence, so a server that repeats login: after a refused name gets the same name again, forever.
  3. **The login phase ends only when <ios> has been seen.** Until then nothing else is sent and no line is parsed.
  4. Then it sends set trust 1 LF CR and posts 'Updt' to the Players window, which sends who LF CR, empties the player list and adds a placeholder row named -------- (double-clicking that row sends fi --------).
  5. Main loop: read a line, ProcessLine; repeat. Optional idle rule (a preference): 20 minutes (72000 ticks) after "Your Turn" with no move, it sends resign and quit.

The name is at most 8 characters and is compared case-sensitively with the names in board lines and prompts, so the server must use it exactly as typed.

3. Commands Eclipse sends

All end in LF CR.

whentextcode
prompt login:<name>0x19e34
prompt password:<password>0x19eb0
after <ios>set trust 10x19ff8
login done ('Updt')who0xb710
double-click a player rowfi <name> (row text up to the first space)0xa6bc
Match button, dialog OKmatch <b> <OTim> <OInc> <ODef> <opponent> <YTim> <YInc> <YDef> <c>0xb36c
accept dialog for an offeraccept <name> or decline <name>0x1adac, 0x1ae10
Talk To + typed texttell <name> <text>0xb4bc, 0x9cf8
command linethe typed text as is (the user typed help)0x9cf8
Observe buttonob <n>, or board <n> if a window for game n is already open0xb690, 0xb678
click a square on my turnPM <sq> <value> <time>, %+5.2f %8.2f: PM D3 +0.00 4.270x735c
pass (menu) on my turnPM ps +0.00 <time>0x51a0
Resign (menu)resign0x53a4
close a game windowresign if I play in it, ob <n> if I watch it0x1b5cc, 0x1b67c
Log off command ('LoOf') / idle rulequit (idle rule: resign then quit)0x161b4, 0x1a06c

Details:

4. How a line is classified (IOSComm::ProcessLine, 0x1a4b4)

  1. Prompt removal: while the line starts with <myname>%, skip strlen(myname) + 2 characters (the name, % and one more, normally a space).
  2. Empty line: ignored.
  3. Starts with login: and is longer than 20 characters: finger output, section 5.6.
  4. Starts with <ios>: look at the character at index 6 (after <ios> ):
  5. [ and [GAME: game created/ended, 5.3. Other [: connected/disconnected, 5.2.
  6. PB: board, 5.4.
  7. MATCH: match offer, 5.5.
  8. MOVES of GAME: ignored.
  9. <ios> <name> told...: ignored if a Talk window for <name> is open, else shown.
  10. anything else: shown in the window.
  11. Starts with login blitz stand (first 20 characters): who list, 5.1.
  12. Otherwise find the first of % [ ! ( : in the line:
  13. % at index 10 or more: the line is dropped. % before index 10: shown unless the line ends within two characters after it.
  14. [ before index 10 and not preceded by a space, ! before 10, ( before 10 (except a line starting ()|): shown.
  15. : before index 10: a tell, <name>: <text>; goes to that player's Talk window if one is open, else shown. A line starting ##:() - is ignored.
  16. none of them: shown, except lines starting A B C D E F G H, | | |... (from index 1), 4 | | | |()|##| | | , 5 | | | |##|()| | | , -> ## (these are dropped; they look like the server's help picture of the start position).

"Shown" means appended to the Players & Command window's text.

5. Server lines it understands

5.1 Who list (0x1afe4)

Only when the Players window asked for it (its 'Updt' flag; otherwise the same lines are just shown). After the header line:

  1. One line is read and thrown away.
  2. Each following line is a row, until a line whose text **after its first space starts with players on** (for example 3 players online). That line ends the list.
  3. These lines are read without prompt removal. Every row must contain a space: the end test scans for a space without checking for the end of the string, so an empty line inside the list makes it read stale memory.
  4. A row becomes a list entry of 12 characters: columns 0-7 (the name), a space, and columns 23-25 (the game number, right-aligned, or something ending in - when not playing). Rows are kept sorted by name, case-insensitively, and a second row for the same name only updates the game column.

If the end line never comes, every later line is eaten as a player row.

5.2 Players arriving and leaving (0x1a194, 0x1ae90)

5.3 Games created and ended (0x1a28c)

<ios> [GAME <n> (<black> vs. <white>) (<anything>) <word>

5.4 Board: the PB line (0x1b3e0)

<ios> PB followed by fields read with sscanf(line_after_PB_space, "%3ld %8s %8s %4ld %4ld %3ld %3ld %3ld %3ld %c %c %2ld %2ld %f %4ld") and 64 board characters at a fixed position: column 78 of the line (72 characters after PB), row by row, 8 per row.

fieldmeaning
gamegame number; indexes Eclipse's window table (keep it small)
black, whitenames, at most 8 characters
tb, twseconds used so far by black and white (the window shows h:mm:ss and keeps counting for the side to move)
db, dw, ib, iwtimeout and increment, stored, not shown (UNVERIFIED use)
colour* black to move, anything else white to move
turnY: it is the receiving player's turn (enables clicking and starts the idle clock); else N
move noread, not used for the board
movelast move: row * 10 + column with row 1-8 and column 1-8 (A=1), so D3 = 34; -1 = none or pass (no marker)
value, timeread, not used
cells* black, O white, - empty; the first 8 are row 1, A to H

Behaviour: if no window exists for the game number (and memory allows), one opens. If my name (exactly as typed at login) equals black or white I am a player: closing the window sends resign, and I may move when turn is Y. Otherwise I am an observer and closing sends ob <n>. The title becomes Game <n> <black> vs <white>. plus Your Turn. or <name>s turn.. Each PB redraws the whole board. The textual <ios> BOARD of GAME block is not parsed: its lines are just shown (minus the few filtered lines of section 4).

A line that fits (78 characters before the cells):

<ios> PB  12 eric     steve       0    0 120 120   0   0 * Y  0 -1   0.00    0---------------------------O*------*O---------------------------

Python: "<ios> PB %3d %-8s %-8s %4d %4d %3d %3d %3d %3d %c %c %2d %2d %6.2f %4d" % (...), then pad or cut to exactly 78 characters, then the 64 cells. Values must fit their widths (times up to 9999 s, the four small fields up to 999).

5.5 Match offers (0x1aad8)

<ios> MATCH with, counting from the M:

Example pair:

<ios> MATCH (u) 20 0 120 FROM steve 20 0 120 black
               20 .. 1 0 -1 .. -20

5.6 Finger (0x1b190)

A reply whose first line starts with login: and is longer than 20 characters is shown line by line until a line starting gio=. Without that end line Eclipse waits for it forever, so either end the reply with a gio= line or do not start it with login:.

5.7 Tells

<name>: <text> (the : before index 10, nothing from % [ ! ( before it) goes to the Talk window for <name> if open. Anything else is plain text in the main window.

6. What the ParlorNet adapter (adapters/ios.py, as read on 2026-11-21) sends that Eclipse

does not understand

  1. **No <ios> after login.** Eclipse stays in its login phase for the whole session: it never sends set trust 1 or who, parses nothing, and echoes raw characters (so without CR the text ran together). The help and fi -------- lines in the log came from the command line and the placeholder row, which work without the reader.
  2. Name refused or in use: the adapter writes login: again; Eclipse answers with the same name every time (a loop).
  3. Who list: no throw-away line after the header (the first player row is lost); the end line N players displayed. does not match players on, so every later line is eaten as a row; columns 23-25 hold 0] and p/- from the rating and flag fields, not a game number, so the Game column and Observe are wrong.
  4. No <ios> [name(...) connected / <ios> [name disconnected lines, and [GAME lines only go to the two players, so other users (steve at a web table) never appear in the list after login.
  5. Boards: only the <ios> BOARD of GAME block is sent. Eclipse never opens a game window without PB lines, so it cannot play or watch.
  6. MATCH line: no ) before the numbers (bad parse), and the word is from, not FROM (no Accept dialog).
  7. Eclipse's own match: the adapter takes the first word after match as the opponent; Eclipse puts bronstein/nothing and three numbers first, so the opponent comes out as 20. Its colour is b/w, not white/black.
  8. ob <n>, board <n>, fi <name> are unknown commands (board without a number is known).
  9. Tells arrive as X tells you: text, which never reaches a Talk window.
  10. The (told X) acknowledgement is harmless (shown).

7. Changes the adapter needs (exact formats)

  1. End of login: after a successful login send a line that begins with <ios>, for example <ios> [<name>(-) connected + CR LF (the login matcher consumes <ios>; the rest of the line is shown). Send it before any <ios> [GAME/PB lines of rejoin().
  2. Refused login: do not prompt login: again in the same connection (Eclipse repeats the same name); write the reason and close, or accept the name. Keep password: as is.
  3. Line ends: keep CR LF. Keep the name% prompt (Eclipse removes it) but never put it, or an empty line, inside a who list or between a MATCH line and its second line.
  4. **who reply:**
   login    blitz  stand.  G  M  idle  on for from host
   ----------------------------------------------------
   eric     [   0]+(   0)  12 ...
   steve    [   0]+(   0) --- ...
   2 players online

Rows: name %-8s at 0, then anything without empty lines, with **columns 23-25 = game number %3d or ---**; every row must contain a space. The last line: <count> players online (text after the first space starts with players on). List every player the core knows (IOS sessions, open-table creators, seated players), not only IOS sessions.

  1. Presence: broadcast to all IOS sessions <ios> [<name>(-) connected when a player appears (IOS login, or a new name in the core's table list) and <ios> [<name> disconnected when one leaves. Broadcast <ios> [GAME <n> (<black> vs. <white>) (unrated) created / ... (unrated) ended to all IOS sessions, not only the two players; keep <n> at 999 or below.
  2. Boards: send a PB line (5.4) at game start, after every move or pass, on board <n>, and to observers; Y only to the player whose turn it is, N to everyone else; move field row*10+col of the last move or -1; times in seconds used (0 is fine while parlord has no clock). Send the BOARD block only on request from humans (for example a set variable), since Eclipse just prints it. Send [GAME ... created before the first PB.
  3. Offers: <ios> MATCH (u) <t> <inc> <def> FROM <challenger> <t> <inc> <def> <black|white> followed immediately by <w> .. <w2> <d> <l2> .. <l> (numbers starting at column 15), colour = the challenger's colour. Times: minutes, seconds, seconds.
  4. **Parse Eclipse's match:** tokens after match: skip bronstein; take the first token that is not a number as the opponent; numbers before it are the opponent's time/inc/timeout, after it the challenger's; a final b means the challenger plays black, w white, none random. Keep the old match <name> [time inc def] [white|black] form for telnet users.
  5. New commands: ob <n> toggles watching game n (start sending PB lines with N; again stops); board <n> sends one PB for game n; fi <name> returns plain text lines that do not start with login: (or start with login: and end with a line starting gio=). Ignore fi --------.
  6. Tells: deliver as <sender>: <text> (sender at most 8 characters) so Eclipse routes them to its Talk window; table chat from web players can use the same form.
  7. Passes and resign: PM ps ... can stay a no-op (the core passes); resign when not playing (Eclipse sends it when a finished game's window is closed) should stay a quiet reply.

8. Open points

This doc on GitHub


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