hate to say it again, but I think its:0xC02200E00xC02200E80x38 blinks means: 0x38*sizeof(int) = 0xE0
NEW: I used a very simple transfer protocol - just 0 - short delay, 1 long delay, and begin of string very long delay, so it looks like:led on, very long delay, led off, bit, led on, bit, led off, bit, led on ....In my program is like: long is 2*short, and very long is 4*short.
#define LEDSPEED (1<<ledspeed)#define LEDWSPEED (1<<ledwspeed)#define LED ((int*) 0xC02200A0)#define LEDBLUE ((int*) 0xC0220000)#define LEDLONG delay(LEDSPEED<<1)#define LEDSHORT delay(LEDSPEED)#define LEDWLONG delay(LEDWSPEED)#define LEDON *LED = 0x46#define LEDOFF *LED = 0x44#define LEDBIT(x) if (c & x) LEDLONG; else LEDSHORT;int send_string(char* str){ char c; LEDON; LEDWLONG; for (; *str; str++) { c=*str; LEDOFF; LEDBIT(0x80); LEDON; LEDBIT(0x40); LEDOFF; LEDBIT(0x20); LEDON; LEDBIT(0x10); LEDOFF; LEDBIT(0x08); LEDON; LEDBIT(0x04); LEDOFF; LEDBIT(0x02); LEDON; LEDBIT(0x01); } LEDOFF; LEDSHORT;}char *base64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="int send_base64(char* start,int len){char base[78]; base[76] = '\n'; base[77] = 0; char* end = start + len; unsigned int mask; unsigned int b, i=0; for (; start < end; start+=3) { b = ((*start)<<16)+((*(start+1))<<8)+(*(start+2)); base[i+3] = base64[b & 0x3F]; b = b>>6; base[i+2] = base64[b & 0x3F]; b = b>>6; base[i+1] = base64[b & 0x3F]; b = b>>6; base[i ] = base64[b & 0x3F]; i += 4; if (i >= 76) { send_string(base); i=0; } } if (i) { for (; i<76; i++) base[i]='='; send_string(base); }}int delay(int i){ while (i--) { asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); }}
How much data (from the firmware section) would be needed to reverse the encryption of the payload in the firmware update?
Started by ASalina « 1 2 3 4 » DSLR Hack development
Started by broadstairs RAW Shooting and Processing
Started by Nexious General Help and Assistance on using CHDK stable releases
Started by q1144529 General Discussion and Assistance
Started by rsfjr General Help and Assistance on using CHDK stable releases