// Returns the address of the 16-bit Twinkle word, if found // Usually contains 0, but will be non-zero if a new firmware download has been detected word *Twinkle() { static word *twinkle = NULL; if(twinkle == NULL) { short *pTwinkle; InitTAPex (); pTwinkle = (short*)FindInstructionSequence( "2404001c a7808a7e 10000081 00001025 96980006 340fb21a afb80010 afaf0014", "FFFFFFFF FFFF0000 FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF", 0x80180000, 0x80200000, 0, FALSE ); if(pTwinkle == NULL) return 0; twinkle = (word*)(FWgp + pTwinkle[3]); } return twinkle; }