WTG Imppa. Your work assembling this summary is the GP.
If you dissect the "anatomy" of the shotcode, you can see that there are only two (2) rings of data bits. You can think of the shotcode as a black circle (the "bullseye") with six rings around it, or you could consider it to be seven (7!) circles of decreasing diameter placed on top of one another. Since we like the number 7 here, let's go with that.
The first attached image provides numbers for each of the seven zones. (Please note that I do not have nor have I read the Shotcode specification, which undoubtedly defines these differently.)
Zones 4-7 appear to be constant and are likely used for image alignment and adjustment by the scanning software or "reader". Zones 2 and 3 contain our data. The circle is composed of 24 slices (15 arc degrees each). This provides for 48 separate bits of data, represented by 24 sectors in each of the "rings" created by these "data zones". The Wikipedia article linked by Imppa explains that the Shotcode contains only 40 bits of data. This makes sense: 8 bits are either reserved for a checksum, special flags, or simply for marking the beginning/end of the data. With forty bits remaining, the maximum number of unique "Shotcodes" that could be represented would be 2 to the power of 40 (2^40) or 1,099,511,627,776. The Shotcode FAQ states:
Our current distribution supports over 1.000.000.000.000 ShotCodes.
So far, so good.
The only remaining questions needing to be answered as far as converting the Shotcode to a 40-bit number are:
- What is the "polarity" of the Shotcode "bits"? (Does black equal 1 or does it equal 0?)
- What order should the bits be read? (Which bit is the first one?)
We also haven't talked about Zone 1. It's possible that Zone 1 is used to mark the starting bit. For example, the period in "Shotcode.com" could mark the first bit in each ring.
If we were to observe that 8 bits in every Shotcode are always set to the same values, we could perhaps deduce that these are the "extra" bits and perhaps they mark the start of the data.
In any event, knowing that there are 48 bits allows us to construct a number- however arbitrary- from the Shotcode found in the Reach Beta. At the very least, we could use this to check whether or not we have reconstructed our "clear version" of the Shotcode properly. To do this, I created the second attached image which overlays a map of the 24 Shotcode Sectors over the image we have of the in-game shotcode. This gives us a common frame of reference to refer to the "bits".
If we were to start from Zone 2, Sector 1 and assign the black sectors to bit value 1, I would guess that the 24 bit number in Zone 2 would be:
Bits: 010111101010110001010101
Decimal Bytes: 94 172 85
Hex Bytes: 5E AC 55
Doing the same for Zone 3 would result in:
Bits: 101111100111111110101010
Decimal Bytes: 190 127 170
Hex Bytes: BE 7F AA
So our full "SGP Shotcode Format" 48-bit number in hexadecimal is:
5E AC 55 BE 7F AA
If you follow the same procedure with the reconstructed Shotcode image provided by Zoidberg25 on BNET, you'll get the same number. This confirms that his reconstructed image is bit-for-bit identical with respect to the encoded data in the original in-game image... or at least he is 100% in agreement with my interpretation of it!
(
http://img534.imageshack.us/img534/9088/shotcode.jpg)
If you do this with JoeRogaine's "rough copy" image that Impaa posted here, you'll get a different number. He codes Sector 18 as black in Zone 3, which results in:
Binary: 010111101010110001010101101111100111111111101010
Hex: 5E AC 55 BE 7F EA
So if nothing else, the "SGP Shotcode Format" allows us compare shotcodes numerically and discuss/debate what we feel the proper values of the bits should be.
What would be nice is to have is the actual Shotcode binary translation method, and the ability to specify that number directly to a Shotcode reader. This way, we could take the cell phone camera out of the equation and be sure that we were getting the proper URL back from web service.
Thanks again, Imppa... and thanks to the work of JoeRogaine and Zoidberg25 over on BNET... as well as DeathBringer669 for the clear in-game image.
I need sleep, so someone else needs to take over from here...