[gnome-color-manager: 41/80] huey: try to make sense of the register dump
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager: 41/80] huey: try to make sense of the register dump
- Date: Mon, 19 Jul 2010 11:35:54 +0000 (UTC)
commit 708206ba42d6fdc15be593f8906bc6a03ceb0619
Author: Richard Hughes <richard hughsie com>
Date: Sat Jul 17 23:08:42 2010 +0100
huey: try to make sense of the register dump
We've found part of the unlock sequence, and what looks to
be a random 3x3 matrix.
docs/huey/register-dump.txt | 391 +++++++++++++++++++++++++++++++++++++++++++
src/gcm-huey-example.c | 30 +++-
2 files changed, 418 insertions(+), 3 deletions(-)
---
diff --git a/docs/huey/register-dump.txt b/docs/huey/register-dump.txt
new file mode 100644
index 0000000..b82519f
--- /dev/null
+++ b/docs/huey/register-dump.txt
@@ -0,0 +1,391 @@
+0x00 ? ? ? ?
+0x04 > ? ? ?
+0x08 ? ? u ?
+0x0c = ? ? ?
+0x10 ? ? ? ?
+0x14 = ? ? ?
+0x18 ; V ? ?
+0x1c ? s ? ?
+0x20 : ? ? ?
+0x24 > ? ? ?
+0x28 ? ? ? ?
+0x2c ? ? ? ?
+0x30 ? ? J [
+0x34 ? 7 > ?
+0x38 ? ? ?
+0x3c ? ? = ?
+0x40 v ? 9 ?
+0x44 ? , = ?
+0x48 ? ? ; D
+0x4c h ? ? u
+0x50 ? _ ; ?
+0x54 ? ? > u
+0x58 , ? J [
+0x5c ? Z ? ?
+0x60 ? ? ? ?
+0x64 ? ? ? <
+0x68 e ` A <
+0x6c e ` A <
+0x70 ? ? ? ?
+0x74 ? q ?
+0x78 ? ? G r <------ This is the start of the unlock string
+0x7c M b ? ? <--/
+0x80 ? ? ?
+0x84 ? ? ?
+0x88 ? ? 4 ?
+0x8c ? ? ? ?
+0x90 ? ? ? ?
+0x94 : ? ? ?
+0x98 ? ? ? ?
+0x9c ? ? ? ?
+0xa0 ? ? ? ?
+0xa4 ? ? ? ?
+0xa8 ? ? ? ?
+0xac ? ? ? ?
+0xb0 ? ? ? ?
+0xb4 ? ? ? ?
+0xb8 ? ? ? ?
+0xbc ? ? ? ?
+0xc0 ? ? ? ?
+0xc4 ? ? ? ?
+0xc8 ? ? ? ?
+0xcc ? ? ? ?
+0xd0 ? ? ? ?
+0xd4 ? ? ? ?
+0xd8 ? ? ? ?
+0xdc ? ? ? ?
+0xe0 ? ? ? ?
+0xe4 ? ? ? ?
+0xe8 ? ? ? ?
+0xec ? ? ? ?
+0xf0 ? ? ? ?
+0xf4 ? ? ? ?
+0xf8 ? ? ? ?
+0xfc ? ? ? ?
+
+0x00 00 0a c5 92
+0x04 3e 1d ff 12
+0x08 bc 1d 75 b8
+0x0c 3d 1c 00 ce
+0x10 bb 07 ae d4
+0x14 3d f9 e5 3f
+0x18 3b 56 df b3
+0x1c ba 73 e2 87
+0x20 3a ad d5 16
+0x24 3e 81 d9 ff
+0x28 ff ff ff ff
+0x2c ff ff ff ff
+0x30 ff ff 4a 5b
+0x34 1b 37 3e 19
+0x38 98 c5 bc 20
+0x3c 8d c9 3d 12
+0x40 76 a1 39 af
+0x44 db 2c 3d e8
+0x48 be a9 3b 44
+0x4c 68 89 bb 75
+0x50 06 5f 3b 8a
+0x54 a1 7f 3e 75
+0x58 2c 04 4a 5b
+0x5c 1b 5a ff ff
+0x60 ff ff ff ff
+0x64 ff ff ff 3c
+0x68 65 60 41 3c
+0x6c 65 60 41 3c
+0x70 84 eb d9 ff
+0x74 09 71 20 05
+0x78 ff ff 47 72
+0x7c 4d 62 00 0e
+0x80 02 20 f4 ee
+0x84 02 20 f4 ee
+0x88 01 d6 34 00
+0x8c 16 e4 00 ff
+0x90 ff ff ff ff
+0x94 3a a1 01 bf
+0x98 ff ff ff ff
+0x9c ff ff ff ff
+0xa0 ff ff ff ff
+0xa4 ff ff ff ff
+0xa8 ff ff ff ff
+0xac ff ff ff ff
+0xb0 ff ff ff ff
+0xb4 ff ff ff ff
+0xb8 ff ff ff ff
+0xbc ff ff ff ff
+0xc0 ff ff ff ff
+0xc4 ff ff ff ff
+0xc8 ff ff ff ff
+0xcc ff ff ff ff
+0xd0 ff ff ff ff
+0xd4 ff ff ff ff
+0xd8 ff ff ff ff
+0xdc ff ff ff ff
+0xe0 ff ff ff ff
+0xe4 ff ff ff ff
+0xe8 ff ff ff ff
+0xec ff ff ff ff
+0xf0 ff f2 ff ff
+0xf4 ff ff ff ff
+0xf8 ff ff ff ff
+0xfc ff ff ff ff
+
+0x00 00 10 197 146
+0x04 62 29 255 18
+0x08 188 29 117 184
+0x0c 61 28 00 206
+0x10 187 07 174 212
+0x14 61 249 229 63
+0x18 59 86 223 179
+0x1c 186 115 226 135
+0x20 58 173 213 22
+0x24 62 129 217 255
+0x28 255 255 255 255
+0x2c 255 255 255 255
+0x30 255 255 74 91
+0x34 27 55 62 25
+0x38 152 197 188 32
+0x3c 141 201 61 18
+0x40 118 161 57 175
+0x44 219 44 61 232
+0x48 190 169 59 68
+0x4c 104 137 187 117
+0x50 06 95 59 138
+0x54 161 127 62 117
+0x58 44 04 74 91
+0x5c 27 90 255 255
+0x60 255 255 255 255
+0x64 255 255 255 60
+0x68 101 96 65 60
+0x6c 101 96 65 60
+0x70 132 235 217 255
+0x74 09 113 32 05
+0x78 255 255 71 114
+0x7c 77 98 00 14
+0x80 02 32 244 238
+0x84 02 32 244 238
+0x88 01 214 52 00
+0x8c 22 228 00 255
+0x90 255 255 255 255
+0x94 58 161 01 191
+0x98 255 255 255 255
+0x9c 255 255 255 255
+0xa0 255 255 255 255
+0xa4 255 255 255 255
+0xa8 255 255 255 255
+0xac 255 255 255 255
+0xb0 255 255 255 255
+0xb4 255 255 255 255
+0xb8 255 255 255 255
+0xbc 255 255 255 255
+0xc0 255 255 255 255
+0xc4 255 255 255 255
+0xc8 255 255 255 255
+0xcc 255 255 255 255
+0xd0 255 255 255 255
+0xd4 255 255 255 255
+0xd8 255 255 255 255
+0xdc 255 255 255 255
+0xe0 255 255 255 255
+0xe4 255 255 255 255
+0xe8 255 255 255 255
+0xec 255 255 255 255
+0xf0 255 242 255 255
+0xf4 255 255 255 255
+0xf8 255 255 255 255
+0xfc 255 255 255 255
+
+0x00 -1.9442
+0x04 0.0000 <---- A 3x3 matrix?
+0x08 0.1543 <-|
+0x0c -0.0096 <-|
+0x10 0.0381 <-|
+0x14 -0.0021 <-|
+0x18 0.1220 <-|
+0x1c 0.0033 <-|
+0x20 -0.0009 <-|
+0x24 0.0013 <-|
+0x28 0.2536 <-/
+0x2c -nan
+0x30 -nan
+0x34 -nan
+0x38 0.0000
+0x3c -0.0000
+0x40 -0.0000
+0x44 1635019055663975370442683149451264.0000
+0x48 -48481762635939840.0000
+0x4c -0.3305
+0x50 5203377440267420143976448.0000
+0x54 0.0000
+0x58 -0.0000
+0x5c 0.0000
+0x60 0.0000
+0x64 -nan
+0x68 -nan
+0x6c 66188340873952120274944.0000
+0x70 66188340873952120274944.0000
+0x74 -0.0000
+0x78 0.0000
+0x7c -nan
+0x80 236978400.0000
+0x84 0.0000
+0x88 0.0000
+0x8c 0.0000
+0x90 0.0000
+0x94 -nan
+0x98 0.0012
+0x9c -nan
+0xa0 -nan
+0xa4 -nan
+0xa8 -nan
+0xac -nan
+0xb0 -nan
+0xb4 -nan
+0xb8 -nan
+0xbc -nan
+0xc0 -nan
+0xc4 -nan
+0xc8 -nan
+0xcc -nan
+0xd0 -nan
+0xd4 -nan
+0xd8 -nan
+0xdc -nan
+0xe0 -nan
+0xe4 -nan
+0xe8 -nan
+0xec -nan
+0xf0 -nan
+0xf4 -nan
+0xf8 -nan
+0xfc -nan
+
+0x00 ? ? ? ? > ? ? ?
+0x08 ? ? u ? = ? ? ?
+0x10 ? ? ? ? = ? ? ?
+0x18 ; V ? ? ? s ? ?
+0x20 : ? ? ? > ? ? ?
+0x28 ? ? ? ? ? ? ? ?
+0x30 ? ? J [ ? 7 > ?
+0x38 ? ? ? ? ? = ?
+0x40 v ? 9 ? ? , = ?
+0x48 ? ? ; D h ? ? u
+0x50 ? _ ; ? ? ? > u
+0x58 , ? J [ ? Z ? ?
+0x60 ? ? ? ? ? ? ? <
+0x68 e ` A < e ` A <
+0x70 ? ? ? ? ? q ?
+0x78 ? ? G r M b ? ?
+0x80 ? ? ? ? ? ?
+0x88 ? ? 4 ? ? ? ? ?
+0x90 ? ? ? ? : ? ? ?
+0x98 ? ? ? ? ? ? ? ?
+0xa0 ? ? ? ? ? ? ? ?
+0xa8 ? ? ? ? ? ? ? ?
+0xb0 ? ? ? ? ? ? ? ?
+0xb8 ? ? ? ? ? ? ? ?
+0xc0 ? ? ? ? ? ? ? ?
+0xc8 ? ? ? ? ? ? ? ?
+0xd0 ? ? ? ? ? ? ? ?
+0xd8 ? ? ? ? ? ? ? ?
+0xe0 ? ? ? ? ? ? ? ?
+0xe8 ? ? ? ? ? ? ? ?
+0xf0 ? ? ? ? ? ? ? ?
+0xf8 ? ? ? ? ? ? ? ?
+
+0x00 00 0a c5 92 3e 1d ff 12
+0x08 bc 1d 75 b8 3d 1c 00 ce
+0x10 bb 07 ae d4 3d f9 e5 3f
+0x18 3b 56 df b3 ba 73 e2 87
+0x20 3a ad d5 16 3e 81 d9 ff
+0x28 ff ff ff ff ff ff ff ff
+0x30 ff ff 4a 5b 1b 37 3e 19
+0x38 98 c5 bc 20 8d c9 3d 12
+0x40 76 a1 39 af db 2c 3d e8
+0x48 be a9 3b 44 68 89 bb 75
+0x50 06 5f 3b 8a a1 7f 3e 75
+0x58 2c 04 4a 5b 1b 5a ff ff
+0x60 ff ff ff ff ff ff ff 3c
+0x68 65 60 41 3c 65 60 41 3c
+0x70 84 eb d9 ff 09 71 20 05
+0x78 ff ff 47 72 4d 62 00 0e
+0x80 02 20 f4 ee 02 20 f4 ee
+0x88 01 d6 34 00 16 e4 00 ff
+0x90 ff ff ff ff 3a a1 01 bf
+0x98 ff ff ff ff ff ff ff ff <---- uninteresting
+0xa0 ff ff ff ff ff ff ff ff <-|
+0xa8 ff ff ff ff ff ff ff ff <-|
+0xb0 ff ff ff ff ff ff ff ff <-|
+0xb8 ff ff ff ff ff ff ff ff <-|
+0xc0 ff ff ff ff ff ff ff ff <-|
+0xc8 ff ff ff ff ff ff ff ff <-|
+0xd0 ff ff ff ff ff ff ff ff <-|
+0xd8 ff ff ff ff ff ff ff ff <-|
+0xe0 ff ff ff ff ff ff ff ff <-|
+0xe8 ff ff ff ff ff ff ff ff <-|
+0xf0 ff f2 ff ff ff ff ff ff <-|
+0xf8 ff ff ff ff ff ff ff ff <-/
+
+0x00 00 10 197 146 62 29 255 18
+0x08 188 29 117 184 61 28 00 206
+0x10 187 07 174 212 61 249 229 63
+0x18 59 86 223 179 186 115 226 135
+0x20 58 173 213 22 62 129 217 255
+0x28 255 255 255 255 255 255 255 255
+0x30 255 255 74 91 27 55 62 25
+0x38 152 197 188 32 141 201 61 18
+0x40 118 161 57 175 219 44 61 232
+0x48 190 169 59 68 104 137 187 117
+0x50 06 95 59 138 161 127 62 117
+0x58 44 04 74 91 27 90 255 255
+0x60 255 255 255 255 255 255 255 60
+0x68 101 96 65 60 101 96 65 60
+0x70 132 235 217 255 09 113 32 05
+0x78 255 255 71 114 77 98 00 14
+0x80 02 32 244 238 02 32 244 238
+0x88 01 214 52 00 22 228 00 255
+0x90 255 255 255 255 58 161 01 191
+0x98 255 255 255 255 255 255 255 255
+0xa0 255 255 255 255 255 255 255 255
+0xa8 255 255 255 255 255 255 255 255
+0xb0 255 255 255 255 255 255 255 255
+0xb8 255 255 255 255 255 255 255 255
+0xc0 255 255 255 255 255 255 255 255
+0xc8 255 255 255 255 255 255 255 255
+0xd0 255 255 255 255 255 255 255 255
+0xd8 255 255 255 255 255 255 255 255
+0xe0 255 255 255 255 255 255 255 255
+0xe8 255 255 255 255 255 255 255 255
+0xf0 255 242 255 255 255 255 255 255
+0xf8 255 255 255 255 255 255 255 255
+
+0x00 0.0000
+0x08 0.0000
+0x10 0.0000
+0x18 0.0000
+0x20 0.0000
+0x28 0.0000
+0x30 0.0000
+0x38 0.0000
+0x40 0.0000
+0x48 0.0000
+0x50 0.0000
+0x58 0.0000
+0x60 0.0000
+0x68 0.0000
+0x70 0.0000
+0x78 0.0000
+0x80 0.0000
+0x88 0.0000
+0x90 0.0000
+0x98 0.0000
+0xa0 0.0000
+0xa8 0.0000
+0xb0 0.0000
+0xb8 0.0000
+0xc0 0.0000
+0xc8 0.0000
+0xd0 0.0000
+0xd8 0.0000
+0xe0 0.0000
+0xe8 0.0000
+0xf0 0.0000
+0xf8 0.0000
diff --git a/src/gcm-huey-example.c b/src/gcm-huey-example.c
index 217bdff..5f01ef2 100644
--- a/src/gcm-huey-example.c
+++ b/src/gcm-huey-example.c
@@ -485,6 +485,20 @@ out:
return ret;
}
+static gfloat
+data_to_float (guint8 *value)
+{
+ guint32 big;
+ gfloat retval;
+
+ /* first, convert the guchar data into one long int */
+ big = (value[0] << 24) + (value[1] << 16) + (value[2] << 8) + (value[3] << 0);
+
+ /* then convert it to a float */
+ *((guint32 *)(&retval)) = big;
+ return retval;
+}
+
static gboolean
read_registers (GcmPriv *priv, GError **error)
{
@@ -493,9 +507,9 @@ read_registers (GcmPriv *priv, GError **error)
guchar reply[8];
gboolean ret;
gsize reply_read;
- guchar i, j;
- guchar data[72];
- guint len = 0x5a;
+ guint i, j;
+ guint len = 0xff;
+ guchar data[len];
/* We read from 0x04 to 0x72 at startup */
for (i=0x00; i<=len; i++) {
@@ -533,6 +547,16 @@ read_registers (GcmPriv *priv, GError **error)
g_print ("\n");
}
g_print ("\n");
+
+ for (i=0; i<len; i+=4) {
+ g_print ("0x%02x\t", i);
+ g_print ("%.4f ", data_to_float (&data[i]));
+ g_print ("\n");
+ }
+ g_print ("\n");
+
+
+
out:
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]