<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p>Thanks for all your helpful comments.</p>
<p>I manged to get the correct values using:</p>
<p>- for the code i wanted i used the lookup table to get the matching value</p>
<p>- converted this number to binary</p>
<p>- calculated the check sum for this value using the below code (taken from the javascript)</p>
<p><br>
</p>
<p></p>
<div>            int checksum = 0;</div>
<div>            checksum = (((sval >> 2) ^ (sval >> 8) ^ (sval >> 12) ^ (sval >> 14)) & 0x01) << 1;</div>
<div>            checksum |= (((sval) ^ (sval >> 4) ^ (sval >> 6) ^ (sval >> 10)) & 0x01);</div>
<div>            checksum ^= 0x02; //needs to be tested</div>
- the checksum is the first data dot
<p></p>
<p>- the rest of the dots are the value of the data dots in pairs</p>
<p><br>
</p>
<p>an example:</p>
<p>i want the oid graphics for the tiptoid oid code: 42</p>
<p> - the table returns value: 272</p>
<p>- in binary this value becomes:  <span>0000000100010000</span></p>
<p><span>- the checksum of 272 is: 1</span></p>
<p><span>- we take 2 each time from <span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">0000000100010000 and convert to a
 number so</span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">00
 = 0</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">00
 = 0</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">00
 = 0</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">01
 = 1</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">00
 = 0</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">01
 = 1</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">00
 = 0</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">00
 = 0</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><br>
</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">so
 the sequence is 00010100, we add the checkvalue to the start and the final code is:</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">100</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">010</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">100</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><br>
</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">we
 can now draw the bits where 0 = bottom right, 1 = bottom left, 2 = top left and 3 = top right.</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><br>
</span></span></span></p>
<p><span><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"><span style="font-family: Calibri, Arial, Helvetica, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">Thanks
 again for all your help.  I will try to see if the printed code works with the pen.</span></span></span></p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> tiptoi <tiptoi-bounces@lists.nomeata.de> on behalf of Tobias Bäumer <to_b@gmx.de><br>
<b>Sent:</b> 05 August 2016 11:06<br>
<b>To:</b> Die Mailingliste für Tiptoi-Bastler<br>
<b>Subject:</b> Re: [Tiptoi] oid code structure</font>
<div> </div>
</div>
<div>Die Prüfziffer-Berechnung für den Ting-Stift haben wir aus dem Mikrocontroller-Forum.<br>
Mir ist dann aufgefallen, dass die für den TipToi immer genau das Gegenteil ist.<br>
Das bewirkt übrigens, dass die Systeme untereinander inkompatibel sind.<br>
Die Berechnung mag auch einfacher gehen, aber ich habe einfach die Formel vom Ting genommen. Dann noch XOR mit 1 und die Ziffer passt.<br>
Die Prüfziffer springt - das sieht man schön, wenn man mehrere Werte der Reihe nach durchgeht.<br>
Ich könnte den Decoder mal umbauen, damit die echten Werte angezeigt werden - dafür müsste ich das Mapping mal in JavaScript packen.<br>
Besteht da Interesse?<br>
<br>
<br>
<div class="gmail_quote">Am 4. August 2016 14:03:33 MESZ, schrieb St_Germain@web.de:
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div style="font-family:Verdana; font-size:12.0px">
<div>Hallo Zusammen,</div>
<div> </div>
<div>my english is terribale: so follow me in german..</div>
<div> </div>
<div>Ich verstehe das XOR und ADD nicht... </div>
<div>Aber kann es eine einfache "Quersumme" oder ein "Mod 2" sein?</div>
<div> </div>
<div>Im Wikipedia habe ich noch gefunden:</div>
<div>Ist das Paritätsbit immer 1, dann spricht man von einer Mark-Parität (es enthält keine Information); ist es immer 0, spricht man von Space-Parität (es stellt einen Leerraum dar).</div>
<div> </div>
<div>Hat das Paritätsbit immer einen anderen Zustand in den Grafiken?</div>
<div>
<div> </div>
<div>St_germain (Ingo)</div>
<div name="quote" style="margin:10px 5px 5px 10px; padding:10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap:break-word">
<div style="margin:0 0 10px 0"><b>Gesendet:</b> Donnerstag, 04. August 2016 um 13:28 Uhr<br>
<b>Von:</b> "Ulrich Sibiller" <ulrich.sibiller@gmail.com><br>
<b>An:</b> "Die Mailingliste für Tiptoi-Bastler" <tiptoi@lists.nomeata.de><br>
<b>Betreff:</b> Re: [Tiptoi] oid code structure</div>
<div name="quoted-content">On Thu, Aug 4, 2016 at 12:57 PM, Yim Taka <haqmedia@hotmail.com> wrote:<br>
> I am developing some software to help create the codes and overlay ontop of<br>
> graphics but i am having trouble understanding how the codes are generated.<br>
> When i zoom in onto the dots in the file 'oid-table.png' inside the<br>
> tttool-win32-1.6.1 folder the codes do not match those generated by the<br>
> oid-decoder.html. Does anyone have any information on how the codes are<br>
> generated? I understand the top row of 4 dots is alignment and the left row<br>
> is also aligment and the 3x3 grid left is the data, but how is this data<br>
> converted to an oid value?<br>
<br>
There's a document in the docs directory of the git repo explaining<br>
that: <a href="https://github.com/entropia/tip-toi-reveng/blob/master/docs/The_Code.pdf" target="_blank" id="LPlnk569047">
https://github.com/entropia/tip-toi-reveng/blob/master/docs/The_Code.pdf</a>
<div id="LPBorder_GT_14703967505550.5177171064679249" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14703967505500.8518901069752436" cellspacing="0" style="width: 90%; position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top-width: 1px; border-top-style: dotted; border-top-color: rgb(200, 200, 200); border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(200, 200, 200); background-color: rgb(255, 255, 255);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="ImageCell_14703967505520.057840254668172664" colspan="1" style="width: 250px; position: relative; display: table-cell; padding-right: 20px;">
<div id="LPImageContainer_14703967505520.9499134732643477" style="height: 250px; position: relative; margin: auto; display: table; width: 250px; background-color: rgb(255, 255, 255);">
<a id="LPImageAnchor_14703967505520.07798346178517801" href="https://github.com/entropia/tip-toi-reveng/blob/master/docs/The_Code.pdf" target="_blank" style="display: table-cell; text-align: center;"><img aria-label="Preview image with link selected. Double-tap to open the link." id="LPThumbnailImageID_14703967505520.8088478051650787" style="display: inline-block; max-width: 250px; max-height: 250px; height: 250px; width: 250px; border-width: 0px; vertical-align: bottom;" width="250" height="250" src="https://avatars2.githubusercontent.com/u/2362112?v=3&s=400"></a></div>
</td>
<td id="TextCell_14703967505530.36693067803328483" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14703967505530.29077038778312203"></div>
<div id="LPTitle_14703967505530.22097458715589835" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14703967505530.4672555369175575" href="https://github.com/entropia/tip-toi-reveng/blob/master/docs/The_Code.pdf" target="_blank" style="text-decoration: none;">entropia/tip-toi-reveng</a></div>
<div id="LPMetadata_14703967505540.47171887540935753" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
github.com</div>
<div id="LPDescription_14703967505540.11828742855519936" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
tip-toi-reveng - Trying to understand the file format of Tip Toi</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<br>
Please note: the number you get out of there is not the number the pen<br>
reports, there's a mapping table inside tttool for that (should be<br>
<a href="https://github.com/entropia/tip-toi-reveng/blob/master/src/KnownCodes.hs" target="_blank">https://github.com/entropia/tip-toi-reveng/blob/master/src/KnownCodes.hs</a>).<br>
<br>
Uli<br>
<br>
--<br>
tiptoi mailing list<br>
tiptoi@lists.nomeata.de<br>
<a href="https://lists.nomeata.de/mailman/listinfo/tiptoi" target="_blank">https://lists.nomeata.de/mailman/listinfo/tiptoi</a></div>
</div>
</div>
</div>
<p style="margin-top:2.5em; margin-bottom:1em; border-bottom:1px solid #000"></p>
<pre class="k9mail">-- <br>tiptoi mailing list<br>tiptoi@lists.nomeata.de<br><a href="https://lists.nomeata.de/mailman/listinfo/tiptoi">https://lists.nomeata.de/mailman/listinfo/tiptoi</a><br></pre>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>