On Wed 16 May 2012 at 00:36:16 +0200, Clarke Rob (KVYD) wrote: > If you look at the binary representations of these numbers, it does not > follow the model. If the bitmask of the odd writes controls the > counters, then the observed period should always be >= the period of the > counter, but never less. With the numbers in the table, the sequence is: This list is slightly deceptive, in the same sense that some of my previous lists were, in the sense that the initial value is 214, and the 214 you list here is the first "changed" value. So if I prepend another 214 here: 11010110 214 > 11010110 214 > 11000110 198 > 11010100 212 > 01010100 84 > 00000110 6 > 00100111 39 > 00110011 51 > > Notice that bit 1 is high, then low, for only two iterations, whereas we > had previously assumed the sequence to be three. Bugger. then this might fix the number of 1s, but alas not the number of 0s... (Very observant of you, by the way!) I've been staring at the value 212, where the emulated values return 214 instead (i.e. bit #1 is still 1 there though it should have toggled to 0). One of the things I tried in my code was if (some of) the even values might do something we didn't detect yet. Such as advancing the counters but not latching a new output value. But I didn't come up with a model that worked. For reference, here is a log of the values as read/written by the C-code versions of the dongle check, up to the point where failure is detected. (I didn't look at any value "in the future" of this) The Write: line lists the bits indicating which counters should advance, and their new counts. Read: $d6 Start big loop (B = 0x40). Write: $80 (even value) d7 * d7 -> b4 91 -> b5 91 Read: $d6 Write: $ac (even value ignored) Read: $d6 Write: $91 145 (advance = $47 0 1 0 0 0 1 1 1) (next value: $d6 214) Read: $d6 Write: $ac (even value) Read: $d6 90 -> 10 == 10 <- D6 under mask 10 Start big loop (B = 0x20). Write: $40 (even value ignored) b5 * 91 -> 66 85 -> e7 85 Read: $d6 Write: $ac (even value ignored) Read: $d6 Write: $85 133 (advance = $53 0 2 0 1 0 1 2 2) (next value: $c6 198) Read: $c6 Write: $8c (even value) Read: $c6 84 -> 00 == 00 <- C6 under mask 10 90 -> 80 == 80 <- C6 under mask 80 Start big loop (B = 0x10). Write: $20 (even value ignored) e7 * 85 -> 78 03 -> 7b 03 Read: $c6 Write: $8c (even value ignored) Read: $c6 Write: $03 3 (advance = $d5 1 3 0 2 0 2 2 3) (next value: $d6 214) Read: $d6 Write: $ac (even value) Read: $d6 12 -> 10 == 10 <- D6 under mask 10 84 -> 80 == 80 <- D6 under mask 80 Answer returned from the call of X6702() is 254. This might have been what was expected: Write: $03 3 (advance = $?? 1 3 0 2 0 2 3 3) (next value: $d4 212) ^ +- advanced one more, so bit changes > Could someone with a real machine write these sequences of odd bytes and > report back the read values please? > > 145, 133, 3, 113, 225, 209, 67 > > 41, 41, 41, 41, 41, 41, 41, 41, 41, 41 > > 213,213,215,213,213,215,213,213,215 I'll try that tomorrow night. Maybe someone else gets to it sooner. > Cheers, > Rob -Olaf. -- ___ Olaf 'Rhialto' Seibert -- There's no point being grown-up if you \X/ rhialto/at/xs4all.nl -- can't be childish sometimes. -The 4th Doctor Message was sent through the cbm-hackers mailing listReceived on 2012-05-16 00:00:14
Archive generated by hypermail 2.2.0.