Discussion:
File formats
(too old to reply)
Alan Grunwald
2011-03-12 12:53:17 UTC
Permalink
My club (in England) purchase duplimated hands from the County. We use
our own home-brew system to publish results on the web. We have been
offered machine-readable files in a variety of formats. with the hand
data and I would like to modify our system to add this to the web pages.

Where can I obtain details of Dealmaster (.dlm) or Duplimate (.dup) files?

Many thanks,
--
Alan
David Babcock
2011-03-12 15:20:39 UTC
Permalink
Post by Alan Grunwald
Where can I obtain details of Dealmaster (.dlm) or Duplimate (.dup) files?
Can't help on those, but either of those can be converted to .pbn (by
BridgeComposer among others: http://www.bridgecomposer.com), and .pbn
is documented at

http://www.tistis.nl/pbn/pbn_v21.txt

Hope this helps.

David
Alan Grunwald
2011-03-12 18:20:19 UTC
Permalink
Post by David Babcock
Post by Alan Grunwald
Where can I obtain details of Dealmaster (.dlm) or Duplimate (.dup) files?
Can't help on those, but either of those can be converted to .pbn (by
BridgeComposer among others: http://www.bridgecomposer.com), and .pbn
is documented at
http://www.tistis.nl/pbn/pbn_v21.txt
Hope this helps.
Thanks David, but I'd really prefer it if I could avoid having to
interface to any additional software if possible.
--
Alan
Steve Foster
2011-03-12 19:40:45 UTC
Permalink
Post by Alan Grunwald
My club (in England) purchase duplimated hands from the County. We
use our own home-brew system to publish results on the web. We have
been offered machine-readable files in a variety of formats. with the
hand data and I would like to modify our system to add this to the
web pages.
Where can I obtain details of Dealmaster (.dlm) or Duplimate (.dup) files?
DLM is the easier format of the two to understand. It uses the Windows
INI text-based structure:

[SECTION]
KEY=VALUE
KEY=VALUE
.
.
.
[SECTION]
KEY=VALUE
.
.

If you're looking to decode it, everything you want is in the
[Document] section. The key fields you need are:

From Board=X
To Board=Y
Board NN=<board data><checksum>

There should be Y+1-X "Board NN" key/value lines.

<board data> is always 26 characters long. Each character is an
alphabetic letter between a and p, representing the numbers 1 to 16.
Each number encodes two hand positions (1="NN" through to 16 ="WW").

Once decoded, you have a 52 character string of hand positions
(N/E/S/W) that maps to a card deck, organised SHDC (4 x AKQJT98765432).

eg:

Board 01=jlifaelnecgmoldfjmcflinlap023

This decodes like this:

j l i f a e l n e c g m o l d f j m c f l i n l a p
SE SW SN EE NN EN SW WE EN NS ES WN WS SW NW EE SE WN NS EE SW SN WE SW
NN WW

And now you have the mapping between hands and cards.

I didn't work out the checksum (but I know both the board data and
board number are incorporated), but that's only critical if you're
trying to _write_ a DLM file.


DUP is an older format, and comes in (at least) two variants.

The original layout was a fixed-width 78 character format, like this:

<North><East><South>

Where each of the North, East and South hands are coded as a sequence
of 13 two-digit numbers, each number being an index into the SDHC 4 x
AKQ... "deck".

The West hand is not represented at all, as by definition it's the
remaining cards.

Each board is on a separate line (CRLF separated), and there's no board
numbering in the format - the first line is board 1, and they go up
from there (until you run out of boards/lines).

eg, if one hand looks like this:

07141517182022272935414452

This decodes thusly:

07 - S8
14 - HA
15 - HK
17 - HJ
18 - HT
20 - H8
22 - H6
27 - DA
29 - DQ
35 - D6
41 - CK
44 - CT
52 - C2


A later version widened the format to 156 characters, like so:

<original 78-char NES
representation><North><East><South><West><Flags><From><To><space>

and removed the CRLF board delimiter (or may have made it optional).

The new <Hand> representation is mostly textual, consisting of 17
characters in total (4 suit markers, each followed by the cards held in
that suit, in SHDC order), like this:

[6]8[3]AKJT86[4]AQ6[5]KT2 (same hand as above)

Each suit marker is a single ASCII character (shown as [X]). I have no
idea why the set isn't sequential.

<Flags> is a three character set of flag fields ("YN1" in every DUP
I've looked at).

<From> and <To> are board numbers, formatted as three characters with
leading spaces as necessary (" 1", " 26", "104", etc). Note that the
boards are not individually numbered.

Finally, there's a single padding space (not sure if this can be
anything else, nor why it's even there).

Notice that the absent West hand from the original 78 character
representation *is* defined in the textual version that follows it.
--
Steve Foster
For SSL Certificates, Domains, etc, visit.:
https://netshop.virtual-isp.net
Alan Grunwald
2011-03-13 23:16:06 UTC
Permalink
Post by Steve Foster
Post by Alan Grunwald
My club (in England) purchase duplimated hands from the County. We
use our own home-brew system to publish results on the web. We have
been offered machine-readable files in a variety of formats. with the
hand data and I would like to modify our system to add this to the
web pages.
Where can I obtain details of Dealmaster (.dlm) or Duplimate (.dup) files?
DLM is the easier format of the two to understand. It uses the Windows
[SECTION]
KEY=VALUE
KEY=VALUE
.
.
.
[SECTION]
KEY=VALUE
.
.
If you're looking to decode it, everything you want is in the
From Board=X
To Board=Y
Board NN=<board data><checksum>
There should be Y+1-X "Board NN" key/value lines.
<board data> is always 26 characters long. Each character is an
alphabetic letter between a and p, representing the numbers 1 to 16.
Each number encodes two hand positions (1="NN" through to 16 ="WW").
Once decoded, you have a 52 character string of hand positions
(N/E/S/W) that maps to a card deck, organised SHDC (4 x AKQJT98765432).
Board 01=jlifaelnecgmoldfjmcflinlap023
j l i f a e l n e c g m o l d f j m c f l i n l a p
SE SW SN EE NN EN SW WE EN NS ES WN WS SW NW EE SE WN NS EE SW SN WE SW
NN WW
And now you have the mapping between hands and cards.
I didn't work out the checksum (but I know both the board data and
board number are incorporated), but that's only critical if you're
trying to _write_ a DLM file.
DUP is an older format, and comes in (at least) two variants.
<North><East><South>
Where each of the North, East and South hands are coded as a sequence
of 13 two-digit numbers, each number being an index into the SDHC 4 x
AKQ... "deck".
The West hand is not represented at all, as by definition it's the
remaining cards.
Each board is on a separate line (CRLF separated), and there's no board
numbering in the format - the first line is board 1, and they go up
from there (until you run out of boards/lines).
07141517182022272935414452
07 - S8
14 - HA
15 - HK
17 - HJ
18 - HT
20 - H8
22 - H6
27 - DA
29 - DQ
35 - D6
41 - CK
44 - CT
52 - C2
<original 78-char NES
representation><North><East><South><West><Flags><From><To><space>
and removed the CRLF board delimiter (or may have made it optional).
The new<Hand> representation is mostly textual, consisting of 17
characters in total (4 suit markers, each followed by the cards held in
[6]8[3]AKJT86[4]AQ6[5]KT2 (same hand as above)
Each suit marker is a single ASCII character (shown as [X]). I have no
idea why the set isn't sequential.
<Flags> is a three character set of flag fields ("YN1" in every DUP
I've looked at).
<From> and<To> are board numbers, formatted as three characters with
leading spaces as necessary (" 1", " 26", "104", etc). Note that the
boards are not individually numbered.
Finally, there's a single padding space (not sure if this can be
anything else, nor why it's even there).
Notice that the absent West hand from the original 78 character
representation *is* defined in the textual version that follows it.
Thanks Steve, the .dlm looks slightly easier to deal with.
--
Alan
Sven Pran
2011-03-12 20:45:05 UTC
Permalink
My club (in England) purchase duplimated hands from the County. We use our
own home-brew system to publish results on the web. We have been offered
machine-readable files in a variety of formats. with the hand data and I
would like to modify our system to add this to the web pages.
Where can I obtain details of Dealmaster (.dlm) or Duplimate (.dup) files?
Many thanks,
.dlm is (as far as I know) the property of Jannersten in Sweden. I never
received any answer to my inquiry on the specifications for this file format
so that I could fully support it in my own program.

.dup is defined as follows:
Recordsize 156 bytes
the first 78 bytes consist of ansi characters as follows:
13 pairs of characters specifying the cards held by North
13 pairs of characters specifying the cards held by East
13 pairs of characters specifying the cards held by South
(The cards held by West are not specified in this part of the record)

'01' specifies the Ace of spades, '02' the King of spades and so on until
'13' which specifies the 2 of spades. Then comes '14' specifying the Ace of
hearts, '27' specifying the Ace of Diamonds, '40' specifying the Ace of
clubs and finally '52' specifying the 2 of clubs.

The next 68 bytes contain the same specifications in a different manner
(originally) intended for printout of the hand record: It uses the byte
values $06 to print a spade symbol, $03 to print a heart symbol, $04 to
print a diamonds symbol and $05 to print a clubs symbol. It uses the ansi
characters 'AKQJT98765432' to print card ranks, and the 68 bytes contain in
sequence the four denomination symbols each followed by the rank symbols for
the cards held by North, then the same for the cards held by East, then the
cards held by South and finally the cards held by West. (16 denomination
symbols and 52 card rank symbols total 68 bytes).
Example: $06'AKQ'$03$04'J432'$05AQT954 specifies the hand: / AKQ / / J432 /
AQT954 /

The last 10 bytes of each record are allocated as follows (not always
strictly obeyed, frequently these ten bytes are just filled with spaces):

1 character indicating the source of the record: 'Z' - Random created, 'K' -
Keyed in by an operator or 'R' - Read by a card machine from an existing
deck of cards.

1 character indicating board numbering: 'U' - Up or 'D' - Down

3 characters specifying the board number for the record ('000' to '999')

2 characters specifying the desired number of copies when processed by a
card sorting machine ('00' to '99')

3 characters specifying the highest board number in the set ('000' to
'999').

Hopes this will help you

regards Sven
Alan Grunwald
2011-03-13 23:17:58 UTC
Permalink
Post by Sven Pran
Post by Alan Grunwald
My club (in England) purchase duplimated hands from the County. We use
our own home-brew system to publish results on the web. We have been
offered machine-readable files in a variety of formats. with the hand
data and I would like to modify our system to add this to the web pages.
Where can I obtain details of Dealmaster (.dlm) or Duplimate (.dup) files?
Many thanks,
.dlm is (as far as I know) the property of Jannersten in Sweden. I never
received any answer to my inquiry on the specifications for this file
format so that I could fully support it in my own program.
Recordsize 156 bytes
13 pairs of characters specifying the cards held by North
13 pairs of characters specifying the cards held by East
13 pairs of characters specifying the cards held by South
(The cards held by West are not specified in this part of the record)
'01' specifies the Ace of spades, '02' the King of spades and so on
until '13' which specifies the 2 of spades. Then comes '14' specifying
the Ace of hearts, '27' specifying the Ace of Diamonds, '40' specifying
the Ace of clubs and finally '52' specifying the 2 of clubs.
The next 68 bytes contain the same specifications in a different manner
(originally) intended for printout of the hand record: It uses the byte
values $06 to print a spade symbol, $03 to print a heart symbol, $04 to
print a diamonds symbol and $05 to print a clubs symbol. It uses the
ansi characters 'AKQJT98765432' to print card ranks, and the 68 bytes
contain in sequence the four denomination symbols each followed by the
rank symbols for the cards held by North, then the same for the cards
held by East, then the cards held by South and finally the cards held by
West. (16 denomination symbols and 52 card rank symbols total 68 bytes).
Example: $06'AKQ'$03$04'J432'$05AQT954 specifies the hand: / AKQ / /
J432 / AQT954 /
The last 10 bytes of each record are allocated as follows (not always
1 character indicating the source of the record: 'Z' - Random created,
'K' - Keyed in by an operator or 'R' - Read by a card machine from an
existing deck of cards.
1 character indicating board numbering: 'U' - Up or 'D' - Down
3 characters specifying the board number for the record ('000' to '999')
2 characters specifying the desired number of copies when processed by a
card sorting machine ('00' to '99')
3 characters specifying the highest board number in the set ('000' to
'999').
Hopes this will help you
regards Sven
Thanks Sven, I think I'll go with trying to deal with the .dlm files as
described by Steve Foster in another reply. If I don't manage that, I'll
have a go with the .dup files as you and Steve have described them.
--
Alan
Lorne
2011-03-14 12:08:36 UTC
Permalink
Alan Grunwald" wrote in message news:11Kep.63656$***@newsfe22.ams2...

My club (in England) purchase duplimated hands from the County. We use
our own home-brew system to publish results on the web. We have been
offered machine-readable files in a variety of formats. with the hand
data and I would like to modify our system to add this to the web pages.

Where can I obtain details of Dealmaster (.dlm) or Duplimate (.dup) files?
***************************

Here is the official .dup spec:
http://www.duplimate.com/DuplimateClub/convert.pdf
Alan Grunwald
2011-03-15 19:43:38 UTC
Permalink
Post by Alan Grunwald
My club (in England) purchase duplimated hands from the County. We use
our own home-brew system to publish results on the web. We have been
offered machine-readable files in a variety of formats. with the hand
data and I would like to modify our system to add this to the web pages.
Where can I obtain details of Dealmaster (.dlm) or Duplimate (.dup) files?
***************************
http://www.duplimate.com/DuplimateClub/convert.pdf
Thank you Lorne, I think I actually found
http://www.duplimate.com/DulimateClub when I was searching, but somehow
I failed to guess that convert.pdf held the file format :-)
--
Alan
Steve Foster
2011-03-16 12:35:51 UTC
Permalink
Post by Alan Grunwald
Post by Lorne
http://www.duplimate.com/DuplimateClub/convert.pdf
Thank you Lorne, I think I actually found
http://www.duplimate.com/DulimateClub when I was searching, but
somehow I failed to guess that convert.pdf held the file format :-)
DLM is still simpler, though... <eg>
--
Steve Foster
For SSL Certificates, Domains, etc, visit.:
https://netshop.virtual-isp.net
Continue reading on narkive:
Loading...