[Tiptoi] oid code structure

Yim Taka haqmedia at hotmail.com
Fr Aug 5 13:56:08 CEST 2016


Hi,

Thanks for all your helpful comments.

I manged to get the correct values using:

- for the code i wanted i used the lookup table to get the matching value

- converted this number to binary

- calculated the check sum for this value using the below code (taken from the javascript)


            int checksum = 0;
            checksum = (((sval >> 2) ^ (sval >> 8) ^ (sval >> 12) ^ (sval >> 14)) & 0x01) << 1;
            checksum |= (((sval) ^ (sval >> 4) ^ (sval >> 6) ^ (sval >> 10)) & 0x01);
            checksum ^= 0x02; //needs to be tested
- the checksum is the first data dot

- the rest of the dots are the value of the data dots in pairs


an example:

i want the oid graphics for the tiptoid oid code: 42

 - the table returns value: 272

- in binary this value becomes:  0000000100010000

- the checksum of 272 is: 1

- we take 2 each time from 0000000100010000 and convert to a number so

00 = 0

00 = 0

00 = 0

01 = 1

00 = 0

01 = 1

00 = 0

00 = 0


so the sequence is 00010100, we add the checkvalue to the start and the final code is:

100

010

100


we can now draw the bits where 0 = bottom right, 1 = bottom left, 2 = top left and 3 = top right.


Thanks again for all your help.  I will try to see if the printed code works with the pen.


________________________________
From: tiptoi <tiptoi-bounces at lists.nomeata.de> on behalf of Tobias Bäumer <to_b at gmx.de>
Sent: 05 August 2016 11:06
To: Die Mailingliste für Tiptoi-Bastler
Subject: Re: [Tiptoi] oid code structure

Die Prüfziffer-Berechnung für den Ting-Stift haben wir aus dem Mikrocontroller-Forum.
Mir ist dann aufgefallen, dass die für den TipToi immer genau das Gegenteil ist.
Das bewirkt übrigens, dass die Systeme untereinander inkompatibel sind.
Die Berechnung mag auch einfacher gehen, aber ich habe einfach die Formel vom Ting genommen. Dann noch XOR mit 1 und die Ziffer passt.
Die Prüfziffer springt - das sieht man schön, wenn man mehrere Werte der Reihe nach durchgeht.
Ich könnte den Decoder mal umbauen, damit die echten Werte angezeigt werden - dafür müsste ich das Mapping mal in JavaScript packen.
Besteht da Interesse?


Am 4. August 2016 14:03:33 MESZ, schrieb St_Germain at web.de:
Hallo Zusammen,

my english is terribale: so follow me in german..

Ich verstehe das XOR und ADD nicht...
Aber kann es eine einfache "Quersumme" oder ein "Mod 2" sein?

Im Wikipedia habe ich noch gefunden:
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).

Hat das Paritätsbit immer einen anderen Zustand in den Grafiken?

St_germain (Ingo)
Gesendet: Donnerstag, 04. August 2016 um 13:28 Uhr
Von: "Ulrich Sibiller" <ulrich.sibiller at gmail.com>
An: "Die Mailingliste für Tiptoi-Bastler" <tiptoi at lists.nomeata.de>
Betreff: Re: [Tiptoi] oid code structure
On Thu, Aug 4, 2016 at 12:57 PM, Yim Taka <haqmedia at hotmail.com> wrote:
> I am developing some software to help create the codes and overlay ontop of
> graphics but i am having trouble understanding how the codes are generated.
> When i zoom in onto the dots in the file 'oid-table.png' inside the
> tttool-win32-1.6.1 folder the codes do not match those generated by the
> oid-decoder.html. Does anyone have any information on how the codes are
> generated? I understand the top row of 4 dots is alignment and the left row
> is also aligment and the 3x3 grid left is the data, but how is this data
> converted to an oid value?

There's a document in the docs directory of the git repo explaining
that: https://github.com/entropia/tip-toi-reveng/blob/master/docs/The_Code.pdf
[https://avatars2.githubusercontent.com/u/2362112?v=3&s=400]<https://github.com/entropia/tip-toi-reveng/blob/master/docs/The_Code.pdf>

entropia/tip-toi-reveng<https://github.com/entropia/tip-toi-reveng/blob/master/docs/The_Code.pdf>
github.com
tip-toi-reveng - Trying to understand the file format of Tip Toi




Please note: the number you get out of there is not the number the pen
reports, there's a mapping table inside tttool for that (should be
https://github.com/entropia/tip-toi-reveng/blob/master/src/KnownCodes.hs).

Uli

--
tiptoi mailing list
tiptoi at lists.nomeata.de
https://lists.nomeata.de/mailman/listinfo/tiptoi

--
tiptoi mailing list
tiptoi at lists.nomeata.de
https://lists.nomeata.de/mailman/listinfo/tiptoi
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <https://lists.nomeata.de/pipermail/tiptoi/attachments/20160805/17ebd802/attachment.htm>


Mehr Informationen über die Mailingliste tiptoi