Specifications

Remote Control and Receiver-Transceiver Specifications and Requirements
for Windows Media Center in Windows Operating Systems
120
for (int i = 0; i < 8; i++) {
// save the bytes
data[i] = getNextByteFromSource();
// compute a simple checksum
checksum = checksum << 1;
checksum ^= data[i];
}
// One byte of padding
getNextByteFromSource();
// Last byte is expected checksum
byte expectedChecksum = getNextByteFromSource();
// Make sure the checksum is correct
if ( checksum != expectedChecksum ) {
sendToHost(RSP_BOOT_BADSERIALCHECKSUM);
return;
}
// Make sure we've been authorized to write.
// (protects against random jumps)
if ( writeAuth != EMULATOR_WRITEAUTHSEQ ) {
sendToHost(RSP_BOOT_BADWRITEAUTH);
return;
}
// Finally, program the hardware
writeBlock(address,data);
}
It is recommended that you put writeAuth checks throughout your firmware writing code, which
helps to prevent a random jump from writing random values to your flash memory.
Wake Programming Example Sequence
This section contains an example programming sequence to further explain the communication
that initiates wake programming. One example is for a device that relies solely on
CMD_BOOT_SETWAKEPATTERN for wake programming, and does not have any wake
firmware in the registry. The second example is for a device that relies on
CMD_BOOT_WRITEBLOCK with wake firmware stored in the host registry.
Example #1 No Wake Firmware in Registry
1. Host Sends: 0xff 0xfe (CMD_PORT_SYS, CMD_RESET)
2. (Device enters bootloader)
3. Host Sends: 0xf5 (CMD_BOOT_GETVERSION)
4. Device Responds: 0x04, 0x01 (RSP_BOOT_VERSION,1)
5. Host Sends: 0xef, 0x01,0x0c,0x03 (CMD_BOOT_SETWAKEPATTERN, RC6, Sleep Toggle,
Address 3)
6. Device Responds: 0xef (RSP_BOOT_SETWAKEPATTERN)
7. Host Sends: 0xf4 (CMD_BOOT_EXIT)
8. (Device resets itself)