/* csa.txt */
/* written by CSA */
/* edited by N.Sekita 98.06.25-98.07.03 */

[1] Communication Protocol (CSA format '91)

 Initial Board

   9    8    7    6    5    4    3    2    1
+--------------------------------------------+       White in hand:
| KY | KE | GI | KI | OU | KI | GI | KE | KY |  1   +------------------+
+--------------------------------------------+      |                  |
|    | HI |    |    |    |    |    | KA |    |  2   |                  |
+--------------------------------------------+      +------------------+
| FU | FU | FU | FU | FU | FU | FU | FU | FU |  3
+--------------------------------------------
|    |    |    |    |    |    |    |    |    |  4
+--------------------------------------------+
|    |    |    |    |    |    |    |    |    |  5
+--------------------------------------------+
|    |    |    |    |    |    |    |    |    |  6
+--------------------------------------------+
| FU | FU | FU | FU | FU | FU | FU | FU | FU |  7
+--------------------------------------------+      Black in hand:
|    | KA |    |    |    |    |    | HI |    |  8   +------------------+
+--------------------------------------------+      |                  |
| KY | KE | GI | KI | OU | KI | GI | KE | KY |  9   |                  |
+--------------------------------------------+      +------------------+

 Abbreviations are:
	OU = Ou or King
	HI = Hisha or Rook
	RY = Ryu or Promoted Rook
	KA = Kaku or Bishop
	UM = Uma or Promoted Bishop
	KI = Kin or Gold
	GI = Gin or Silver
	NG = Nari-Gin or Promoted Silver
	KE = Keima or Knight
	NK = Nari-Kei or Promoted Knight
	KY = Kyosha or Lance
	NY = Nari-Kyo or Promoted Lance
	FU = Fu or Pawn
	TO = Tokin or Promoted Pawn

  (A) Notation

	Normal moves:
	(1) + or - (Black or White)
	(2) position from (11 to 99 or 00 for Drop)
	(3) position to (11 to 99)
	(4) the abbreviation of a piece (OU to TO)
	A promotion is represented by the abbreviation of the promoted piece.

	Special moves:
	Resign : %TORYO
	Undo   : %MATTA
	Stop   : %CHUDAN

	Terminate code is LF(0x0A).

  (B) Condition

	Serial Port : RS232C
	Baud rate   : 1200bps
	Data bit    : 8 bit
	Parity bit  : none
	Stop bit    : 1 bit
	X on/off    : yes
	Connector   : DSUB25

/*------------------------------------------------------------------------*/

[2] CSA record file format

 (A) Record file includes:
	(1) Players' name
	(2) Initial Board
	(3) First Player's sign (+ for Black, - for White)
	(4) Move and Time
	(5) Comment

  (1) Players' name

	"N+" for Black player, "N-" for White player.

	for example : Black is Nakahara, White is Yonenaga
N+Nakahara
N-Yonenaga

  (2) Initial Board

P1-KY-KE-GI-KI-OU-KI-GI-KE-KY
P2 * -HI *  *  *  *  * -KA *
P3-FU-FU-FU-FU-FU-FU-FU-FU-FU
P4 *  *  *  *  *  *  *  *  *
P5 *  *  *  *  *  *  *  *  *
P6 *  *  *  *  *  *  *  *  *
P7+FU+FU+FU+FU+FU+FU+FU+FU+FU
P8 * +KA *  *  *  *  * +HI *
P9+KY+KE+GI+KI+OU+KI+GI+KE+KY

  (4) Move and Time

	Move notation is same as Communication Protocol described above.
	Time notation is "T" plus number of seconds consumed.

  (5) Comment

	Comment starts "'" to the end of the line.

 (B) Example of the CSA style record file

' ----------"example.csa"-----------------
' Players name
N+Nakahara
N-Yonenaga
' initial board
P1-KY-KE-GI-KI-OU-KI-GI-KE-KY
P2 * -HI *  *  *  *  * -KA *
P3-FU-FU-FU-FU-FU-FU-FU-FU-FU
P4 *  *  *  *  *  *  *  *  *
P5 *  *  *  *  *  *  *  *  *
P6 *  *  *  *  *  *  *  *  *
P7+FU+FU+FU+FU+FU+FU+FU+FU+FU
P8 * +KA *  *  *  *  * +HI *
P9+KY+KE+GI+KI+OU+KI+GI+KE+KY
' First Player
+
' Move and time
+2726FU
T12
-3334FU
T6
%CHUDAN

/* end of csa.txt */
