Skip to content

283. On the Harmony 650 a changed delay is live straight after the write, and a restart resets the clock

todo.md 1.4.2: the first write to arch 14 that changes something, one device's power on delay raised and then put back, to see what a remote that keeps its settings in memory does with a new configuration. The prediction written beforehand, from the image, was wrong, and a blind reviewer reading the same image made the same one, so the disagreement is between the 0.2 build as read and the unit, and not a slip in one reading.

The edit

On arch 14 a delay is a state variable, section 234, so the edit is a base slot 13 record's first and not the 0x7C byte setPowerOnDelay edits on the other architectures. The Denon receiver's PowerOnDelay record is entry 65 at 0x6C778, first 60 tenths, raised to 90. With the trailer checksum that is two bytes in two erase blocks, 0x060000 and 0x100000; the configuration's first block is untouched, so the drop's flag is spent on 0x060000 and the settings store is not consulted, section 282. write-config.ts did the whole sequence, drop, two erases each checked on both neighbours, write, whole read back identical, and restart. A region read afterwards, fourteen blocks from 0x030000, differs from the one before in exactly those two bytes.

What the 0.2 image says

The variables are at data 0xE10, one byte each below narrow and two above, in a 192 byte allocation, so the Denon's is the word at 0xE54. The seeder at 0x16024 has two callers, the boot path at 0x14F9C and 0x0F390, and does this:

  1. An entry gate: unless 0x68B bit 2 or bit 1 is set, meaning the user container or the one at 0x020000 validated, it skips the loop.
  2. A sum: an XOR seeded 0xA5 over the 174 bytes from 0xE22, compared with the byte at 0xED2. A match sets 0xD2D, a scratch byte used elsewhere too, and a set 0xD2D makes the loop store nothing. The loop has no other skip than a first of 0xFEFE.
  3. A paint: 0xFE over everything above the table's size, or above byte 18 when bit 4 of 0x68B is clear and bit 1 set, then the sum restamped at 0x1613A.

Every store, 0x16474, restamps the sum at 0x164C0. The third direct writer of 0xED2 is an INCF at 0x14F8E, on the boot path, when the user container fails validation; that path clears bit 4 and so ends in the paint from byte 18, erasing the configuration's variables rather than reloading them. The sum starts eighteen bytes into the array, so the clock and the firmware's own variables are outside it. This is section 138's warm start on the Harmony One, found here for arch 14, whose guard section 274 had located and not traced.

The later builds add a second writer, and it is the one that answers for them. On the Harmony 700's 2.8 and the Harmony 650's own 0.4 package the variables are at 0x900, the sum covers 237 bytes from 0x912, and the boot path reads a flag, clears it and increments the sum before the seeder runs: 0x1621E to 0x16228 on the 700, flag 0x1E9 and sum 0x1EC, and 0x15FD4 to 0x15FDE on the 0.4, flag 0x0E9 and sum 0x0EC. The flag's only writer is the cache drop, 0x0C3EC on both. So on those builds a drop followed by a restart reloads every variable by design, which is what section 282 said was unread there. The 0.2 builds, which this unit runs, have no such flag, and read alone they predict that RESET, which keeps data memory, leaves the old value in force until a battery pull.

What the remote did

The variables were read live over USB, READ_MISC selector 7, before and after each step, with the unit identified off its identity block each time.

flash 0xE54 clock, from 0xE10 sum at 0xED2
before 60 60 09:17:54 0xA5
after the write and its restart 90 90 08:40:10 0xC3
just before a restart alone 90 90 08:45:06 0xC3
after the restart alone 90 90 08:39:54 0xC3
after the revert and its restart 60 60 08:39:54 0xA5

The new value was in force straight after the restart, in both directions, so on this unit a configuration written this way takes effect without a battery pull. The sum moved by exactly 60 ^ 90 each way, which is the store's restamp and the control that the address read is the variable. The other delays read what the configuration states throughout: television 50, set top box 15, PS3 15, Kodi 0.

Every restart put the clock back to the configuration's stamp, 08:39:42, which base slot 3 and base slot 13's records 0 to 6 both carry, read 12 to 28 seconds afterwards. So a configuration written without restamping leaves the remote showing its stamp time, and a writer for this model has to stamp it, as the rails already say. Which of the two the clock comes from is not settled here.

Variables 7 to 12 say nothing about this. They read 1 0 3 4 10 4 after the write restarts and 1 0 0 4 10 4 after the bare restart below, where the configuration states 0 0 5 0 0 0, but the boot writes variable 11 to 10 at 0x14FAC straight after the seeder, and 7, 9, 10 and 12 have writers elsewhere.

A bare restart undoes what an activity changed

The first of the two experiments the review named was run. The remote cannot be used while it is on the cable, so Danny unplugged the 650, started TV kijken, and plugged it back in. The variables were read at rest, after that, and ten seconds after the escape's restart with nothing written:

  • At rest the array from byte 18 equals the configuration's first values except three unnamed variables, indices 44, 46 and 69, which read 1, 1 and 0xFEFD where the records state 0; the first and last are their record's maximum. None of the three has a direct access in the image, so whatever sets them does so indirectly.
  • After the activity CurrentActivityState read 2 where its idle value is 3, eight variables in the summed span had moved, all narrow, indices 32, 34, 39, 47, 51, 54, 55 and 56, and the stored sum was restamped to match. So plugging the cable back in kept the running state.
  • After the bare restart the array from byte 18 equals the state at rest byte for byte: CurrentActivityState 3 again, every moved variable back, the same three unnamed variables included.

Each stored sum equals 0xA5 XOR its own snapshot's bytes 18 to 107, which is the firmware's sum if the 84 bytes after the array are still painted 0xFE; those were not read. So on this unit's 0.2 build a restart with nothing written puts back every variable the activity changed, although the sum matched just before it. Seven of the eight moved variables have a first of 0, so this alone cannot tell a reload from a clear; CurrentActivityState's 3 is its first and also its maximum, and no direct writer of it is in the image. What carries "from the configuration" is the delay above, which went to 90 and back to 60 with the flash across a restart. Either data memory does not survive this restart, or something at boot spoils or bypasses the sum; which is open.

The clock went back twice. It read 09:06:34 at rest, then 08:41:40 after the replug, the stamp plus 1 minute 58 seconds, then the stamp plus 12 seconds after the bare restart. So a clock reset happened during the unplug or the replug too. If it was at the replug, the clock was reset while the activity's variables were kept, which would separate the clock's reset from the reload; which of the two it was is not decided by these reads.

Leads not yet read: whatever the bootloader below 0x9000 does to data memory before the application starts, which is not in these images; whether the software stack from 0xE00 reaches the summed span; the seeder's second caller at 0x0F390; and any indirect writer the tracer cannot see. A dump of data 0x000 to 0xDFF before and after a third bare restart: 712 nonzero bytes identical, 46 changed, 0x800 to 0xCFF zero both times. On its own that cannot tell memory kept from memory rebuilt identically.

The infrared ring at 0x500 to 0x5FF came through the restart unchanged, so the restart does not clear all of data memory. The page is the sender's ring, 256 bytes with a count at 0x75E, a read index at 0x75F and a write index at 0x760. Three stores address it through its own write index, 0x11E4C and 0x11E5E in the word push 0x11E32 and 0x11E8E in the byte push 0x11E74, whose four calls are all in the feeder from 0x1683C that reads a configuration duration block; 33 accesses read it, in the players the low priority interrupt dispatches; and nothing names the page by bank, by an absolute store or by LFSR. Stores through a pointer held in a variable are not traced, and the closure below does not need them to be absent.

The closure is the content. Read from its oldest byte, at offset 104, the whole ring equals 256 contiguous bytes of the configuration at 0x45D17: the last 256 of the 616 byte block at 0x45BAF, terminator included, and 616 is 104 past two turns of the ring, which is where one send of that block from index 0 stops. The block is named by one record only, Denon record 36, as its send once block. The sender's own state agrees on both sides of the restart: the last word pushed, 0x3F7 and 0x3F8, is the terminator, and 0x3DE is 0xFF, idle. The three indices read 0 on both sides too, which says nothing about the boot, since 0x10CF2 clears them at the end of every send as well as at startup, where it is the boot's only contact with the ring. For the ring to have been rebuilt at boot, the boot would have to send exactly that record's block from index 0, and nothing found at startup starts a send.

So what was left was narrower: the variables' bank is cleared, or something at boot spoils or bypasses the sum, or the skip does not do what the image was read to say, which that reading has already got wrong once. The software stack is a candidate for the second: the startup points both of its registers at 0xE00 and it grows upward, so it reaches the clock after 16 bytes and the summed span after 34.

The bank is probably not cleared, read across a fourth bare restart. All 256 bytes from 0xE00, read with the remote at rest either side of write-config.ts --restart-only: nine differ. Three are the clock's seconds, minutes and hours, the other four clock bytes unchanged, and six are at 0xED4 to 0xEE5. What survived the restart is not all evidence alike. The stack's leftovers at 0xE00 to 0xE0F, the same bytes both times with six of them nonzero, the 84 bytes from 0xE7C still reading 0xFE, and the sum at 0xED2, 0xA5 and equal to the XOR over 0xE22 to 0xECF on both sides, are all what a cleared bank would leave too once the seeder had reloaded it, painted its tail and restamped its sum. So they cannot tell a clear from none, and they do not bound how deep the stack goes at boot either. What can tell is 0xEDC to 0xEDF, the second setter's arguments below, written only where that setter is called: 00 01 00 01 either side, variable 1 increased by one, which is the minutes store that ran last before the restart. A clear would zero them, and putting them back takes another minutes store, where the clock shows no minute boundary between its reset to the stamp and the read. That makes the first of the three unlikely rather than impossible, together with the infrared ring above. The painted tail the snapshot closure had to assume is now read painted, either side of this later restart.

And this pair shows the reload running with a sum that was valid before the restart. Variable 44 read 1 before it; after it, the last store that went through the transition branch records 44's old value as 0 at 0xED4 and its new value as 1. The minutes and hours read 39 and 8, their first, where before they read 41 and 9. Nothing in the configuration sets 44 to 0, its one set instruction setting it to 1, and nothing in it sets or steps variable 1 or 2, counted over every instruction it holds and every path to the setters: the set opcodes, the 0x1F band's set and step, the add of 0x70 and 0x71, and 0x1F F7, which queues an instruction it names. The firmware itself only steps the minutes, from 0x106A0, and the instructions it queues from its other call sites were not counted. The store at 0x16474 has three callers, the seeder and the two setters below, by any instruction with a target. So the seeder stored at this boot, although in the last read before the restart the sum matched, and every store since restamps it. Either the verdict at boot was a mismatch, meaning something between that read and the compare changed the sum or the bytes it covers, or the flag the verdict sets was changed before the loop read it, or the loop does not do what the image was read to say. The software stack stays a candidate for the first, since nothing above bounds its depth at boot.

The six changed bytes are among those two setters write, 0x16360 and 0x163AA, where every action list opcode at 0x80 or above goes, from call sites at 0x0E8C4, 0x0EFE8, 0x0EB68 and 0x0EF90: so the configuration's own set variable instructions reach variables the image never names, which is why 44, 46 and 69 had no direct accessor. Each hands an index to the store and then, unless a flag its caller copies from 0x219 is set, calls 0x1613E, the routine that evaluates a variable's transitions; the flag is 0xED8 for the first setter and 0xEDC for the second. The bytes are shared rather than theirs: 0xED4 to 0xED7 are the old and new value 0x1613E compares, the seeder writes 0xEE1 and 0xEE2 too, and 0xEE4 has six other writers. 0xEE1 holds the index the store was handed, which the seeder confirms by putting its loop index there before its call, and still holds it afterwards only for a narrow variable, since for a wide one the store turns it into an offset; 1, 44 and 46 are all narrow. Before the restart the last store was variable 1, the clock's minutes, from 40 to 41 by the second setter's increment. After it 0xEE1 and 0xEE4 read 46 and 0xEE5 44: the last store was 46 set to 1, and it ran no transitions, because 0xEE5 stayed at 44 and its only writers are the first setter's transition branch and the second setter's entry; 0xED8 to 0xEDB read the same on both sides and show nothing by themselves. Before it 44 went from 0 to 1 through the transition branch. Variables 44 and 46 are two of the three the activity experiment found away from their first after a restart, so something sets them after the seeder through the executor's set instruction, most likely the configuration's own, 44's one set instruction setting it to 1; which list does it is unread. A transition at boot putting an activity's variables back, which could have replaced the reload, is ruled out for 44 and the clock by the census above.

The skip flag is not the seeder's own. 0xD2D is set from the sum's verdict at 0x16048 and read at 0x160DA before each store. None of the routines that run between the two and the loop's end writes it directly, and the word reader writes through its pointer, 0xD2B and 0xD2C in the four reads before the loop and 0xD30 and 0xD31 inside it. But the address has 43 direct accesses across the image, plus pointer writes the tracer cannot see, among them 0x1613E's own three byte read at 0xD2C through 0x17F1C, which covers it, and routines such as 0x10800, which copies the clock's seconds into it, so it is shared scratch. Whether any writer of it can run while the seeder loops is unread, and that is the cheapest test of the second.

A lead for the writer rails, not settled here. On this build the firmware writes variables 13, 16 and 17 directly, at 0xE1D, 0xE20 and 0xE21, beside 7 and 9 to 12, and the sum and the failure path's paint both start at 18. The rail reserves 0 to 12, from arch 12's reading in section 138. Whether a composed variable at 13 to 17 would be overwritten on the Harmony 650 is unmeasured, and it wants reading before step 1.4.3 composes one. Section 284 answered it: 0 to 17 on arch 8, 12 and 14.

Scope, decision 16

  • The measurement: one Harmony 650 on its 0.2 build, one delay raised and put back, and four restarts alone: one read for the clock, one after an activity was started with the variables read, one with only data 0x000 to 0xDFF read, which is where the infrared ring was seen to survive, and one at rest with bank 0xE00 to 0xEFF read either side.
  • The reading: the seeder, its sum and the store are byte identical on the Harmony 600's and the 650's 0.2 builds, asserted range by range. The Harmony 700's 2.8 and the 650's 0.4 package have the same sum at other addresses and the drop's forced reload, which the 0.2 builds lack. What the 600 or the 700 do after a write is not measured, and the 600 may not be written.
  • Arch 12 (Harmony One) keeps its delays inline and needed no reload for section 236's change to be felt; arch 9 (Harmony 525) guards per variable, section 274, and was not written to change anything.

Sources

The firmware, sections 138, 234, 274 and 282, the lab note work/plan-1.4/1.4.2-delay-change-NOTES.md written before the write and holding every reading above, and reads/20260927T1150Z-h650-ram-activity-restart.bin with its notes, the three snapshots. Logitech's client was not consulted: the question was what this unit does with a configuration whose bytes we chose.

Falsification

A write that changes a stated variable and reads back the old value in memory after the restart; a restart that leaves the clock running rather than reloading it; a region read after such a write that differs anywhere but the edited bytes and the trailer; a bare restart after an activity that leaves CurrentActivityState at the activity's value.

Where it lands

  • tests/test_arch14_write_target.py: the sum's span, seed and XORWF on two builds, the entry gate, the guard and the loop's skip past the store, the store's address and restamp, the failed validation path ending in the paint from byte 18, the later builds' drop flag, the two region reads' two byte difference, the record's memory address, and the three snapshots of the activity experiment: each sum against its own array, the eight variables the activity moved, and the restart putting back the state at rest; and the infrared ring's stores in the image, with the dumps showing its contents unchanged across the restart and equal, rotated, to the tail of Denon record 36's send once block; and the bank dump: the nine bytes that changed, the second setter's arguments unchanged, the sum valid and the tail painted on both sides, variable 44 and the clock put back to first with no instruction in the configuration that could, the six non clock bytes among those the two setters write, their conditional call of the transitions, the last stores naming variable 1 and then 46 with its flag set and 44, the skip flag written by nothing the seeder runs directly and copied from the clock at 0x10800 among its other writers, and the firmware's direct writes to variables 13, 16 and 17.
  • packages/lab, tests/lab.py and the golden vectors: h650_delay90_region, the compare base the revert used, excluded from the corpus like h650_config_region. packages/lab and tests/lab.py also name h650_ram_activity_restart, the snapshots, h650_ram_across_restart, the two dumps, and h650_bank_e_across_restart, the variables' bank either side of the fourth, none of them a container.
  • docs/config-format.md beside first, docs/memory-map-600.md, and section 282's scope corrected.

The reviewers

Both ran on the whole diff. The blind one reproduced every address and number above and, from the 0.2 image alone, made the same prediction as the lab note, that the old value would survive the restart. The second found the draft wrong in six places: it called the 700 2.8 "the same shape" and missed the drop's forced reload there, which it found and the blind one found independently; it named one other writer of the sum where there are three direct ones; it said the failed validation path forces a reload, where it ends in the paint and erases; it said the discriminating experiment needed a RAM write, where using the remote changes variables inside the sum; it attributed the clock to the records where base slot 3 carries the same stamp; and it offered variables 7 to 12 as a caution where the image shows the boot writing them. It also found three figures missing from the lab note, the memory map header claiming more was read live than was, and two test assertions that stopped short. All corrected.

The addition's reviewers. The blind one reproduced every figure of the activity experiment from the snapshots and the configuration alone, and noticed the clock going back before the activity as well as after the restart. The second found the draft saying a restart reloads "every variable" where eleven of the 85 do not equal their first afterwards, the seconds of the clock, six firmware variables and the three unnamed ones, and the evidence covers the eight the activity moved; it counted sixteen, which a recount put at eleven; the bold sentence presupposing memory survives the restart; "a remote on the cable runs nothing" where its clock ticks; the replug read as settling when the clock was reset; variable 9's reading after the bare restart contradicting the line above it; and the sum closure stating the painted tail as fact where it was not read. All corrected.

The ring's reviewers. The blind one found the same ring, the same three stores and the same startup contact, and matched the whole ring to the Denon block. The second found the draft claiming memory outside the variables is kept where only page 5 was shown; the zero indices offered as the boot's doing where they were zero before the restart too, the sender clearing them after every send; "three stores write into it" stronger than a scan that cannot see stores through a pointer variable; the closure resting on the remote being on the cable rather than on the content; and the stores placed in one routine where they are two push helpers called from the feeder. All corrected, and the tests now assert the rotated ring against the block and the one record that names it.

The bank dump's reviewers. The blind one found the same nine bytes, the same setters and the same flag, and was first to see that the dump shows the reload: 44 was 1 before the restart and 0 as the old value of the boot's store, with the clock back at its stamp, which the draft had called something this pair could not show, along with the firmware's direct writes to 13, 16 and 17. The second found the draft resting "the bank is not cleared" on bytes a clear followed by a reload would leave identical, where the discriminating ones are the second setter's arguments; offering the stack as bounded by the same bytes; stating the setters always run the transitions where a caller's flag can stop them, and did for the boot's last store; a fourth candidate that could not explain the delay or the clock; the setters' working bytes as theirs where they are shared; "stored every minute" with no rate measured; the skip flag's helpers listed four where seven routines are called directly, thirteen with their callees, and the pointer writes the test could not see; "three restarts" over four; and the memory map's rows naming bytes that did not change. It counted seven nonzero stack bytes where there are six. All corrected, the fourth candidate removed by the census, and the tests assert the discriminating bytes, the reload and the conditional call. A second pass on the rewrite found the census narrower in the test than in the prose, missing the add path, the queue path and four instruction sources, all of which it now walks with none hitting; "nothing sets variable 1" silent about the firmware's own minutes step; "the one store" where only the last is visible; 0xED8 offered as evidence though it did not change, where 0xEE5's writers carry it; a skip flag test blind to arithmetic writes; and the restart ordinals disagreeing between files. All corrected.


Section 282 | the archive | section 284. Section 283 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.