chiark / gitweb /
Remove "example" file and include it in decode-pctb-marketdata
[ypp-sc-tools.web-live.git] / pctb / decode-pctb-marketdata
index 0c0fe38..68cf060 100755 (executable)
@@ -95,3 +95,92 @@ $r= read STDIN,$b,1;
 STDIN->error and die $!;
 STDIN->eof or die;
 $b and die;
+
+
+
+
+#
+#
+#Version number (3 ascii digits) followed
+#by LF (i.e. 0x0A).  Current version is\
+# 005
+#
+#  0000   30 30 35 0a                                        005.
+#
+## of shops/stalls (in ascii)  + LF
+#  0000               31 0a                                      1.           
+#
+#list of shop names in ascii (without the
+#possessive part and by specifying the \
+#shop type in an abbreviated way which is
+#mentioned below).  The shop names are
+#separated \ by line feeds (0x0A).  To
+#specify the shop type append the "^"
+#character and then \ one of the
+#following characters depending upon the
+#shop type:
+#   Apothecary = A
+#   Distillery = D
+#   Furnisher = F
+#   Iron Monger = I
+#   Shipyard = S
+#   Tailor = T
+#   Weavery = W
+#
+#  0000                     4f 6c  64 20 49 72 6f 6e 73 69         Ol d Ironsi
+#  0010   64 65 73 0a                                        des.              
+#
+## of buy offers (in binary)
+#  0010               05 00                                 
+#
+#commodIndex offerCount                                       buy 0/5
+#  0010                     0a 00  01 00                      Grog x 1
+#[shopIndex val amt]                   
+#  0010                                  01 00 1d 00 75 00    OI 29 qty 75
+#
+#commodIndex offerCount                                       buy 1/5
+#  0020   0b 00 01 00                                         Fine x 1
+#[shopIndex val amt]... (all in binar\ y)
+#  0020               01 00 33 00  e9 03                      OI 51 qty 0x3e9
+#
+#commodIndex offerCount                                       buy 2/5
+#  0020                                  0c 00 01 00          Small shot x 1
+#[shopIndex val amt]
+#  0020                                              01 00    OI
+#  0030   0f 00 e9 03                                         15 qty 0x3e9
+#
+#commodIndex offerCount                                       buy 3/5
+#  0030               0d 00 01 00                             Medium shot x 1
+#[shopIndex val amt]
+#  0030                            01 00 1c 00 e9 03          OI 28 qty 0x3e9
+#
+#commodIndex offerCount                                       buy 4/5
+#  0030                                              0e 00    Large shot
+#  0040   01 00                                                          x 1
+#[shopIndex val amt]
+#  0040         01 00 26 00 e9 03                             OI 38 0x3e9
+#
+#
+## of sell offers (in binary)
+#  0040                            04 00
+#
+#commodIndex offerCount                                       sell 0/4
+#  0040                                  09 00 01 00          Swill x 1
+#[shopIndex val amt]
+#  0040                                              01 00    OI 
+#  0050   17 00 e8 03                                         23 0x3e8
+#commodIndex offerCount                                       sell 1/4
+#  0050               0a 00 01 00                             Grog x 1
+#[shopIndex val amt]
+#  0050                            01 00 1e 00 73 03          OI 30 qty 0x373
+#commodIndex offerCount                                       sell 2/4
+#  0050                                              0c 00    Small shot
+#  0060   01 00                                               x 1
+#[shopIndex val amt]
+#  0060         01 00 10 00 07 00                             OI 16 qty 7
+#commodIndex offerCount                                       sell 3/4
+#  0060                            0d 00 01 00                Medium shot x 1
+#[shopIndex val amt]
+#  0060                                        01 00 1e 00    OI 30
+#  0070   02 00                                               qty 2
+#