Skip to content

120. Which key starts which activity: four hops, and the field that says what idle means

An application that reads a config has to be able to say "this is the Watch TV activity and this button starts it". Until now it could do neither half. Section 112 read the drawn text, so the names were readable, and it closed with the honest statement that which activity a drawn name belongs to was not settled, having ruled out two routes: no screen switch reads the CurrentActivityState variable index, and base slot 14's value maps point at targets that draw no text. CLAUDE.md proposed a third, the arch 12 touch hit map, and it was corrected in one sentence: a Harmony 525 has no touch panel at all, it has four keys beside the screen matching four zones on it. That correction is what opened this, because it moved the question from geometry to key bindings, where the format is explicit.

The chain

Four hops, and the length is the finding. Nothing in the format names an activity.

  1. A mode page's tagged list binds a key code to opcode 0x7F, whose operand indexes base slot 10.
  2. That action list carries opcode 0x1F with operand 0xFF | set. docs/config-format.md already records that band as selecting the current binding table entry, the low byte being the index into base slot 9.
  3. That base slot 9 entry has a tagged list of its own, and it carries another 0x7F naming a second base slot 10 list.
  4. That list writes CurrentActivityState with 0x80 | index, and the operand is the activity.

activityBindings in packages/codec/src/inventory.ts walks it. Per container:

arch activities writer lists bindings pages
h700_config 14 5 5 10 3
h700_config_2 14 5 5 10 3
h600_config 14 3 3 6 2
h525_config 9 3 3 3 1
h525_config_2 9 1 1 1 1
one_config 12 8 8 8 3
one_config_unprogrammed 12 1 1 1 1
arch8_config_a 8 1 1 1 1
arch8_config_b 8 2 2 2 1
arch8_config_c 8 3 3 3 1
arch8_config_d 8 3 3 3 1
h525_safemode_ahcm 9 0 1 0 0

Three properties hold in all of them, and each is a way the reading could have failed and did not:

  • Every activity is reachable from a key, and the number of base slot 10 lists that write the variable is the activity count. So there is one list per activity and no spares.
  • All of an activity's keys are on one page, so an activity belongs to one screen. That is what makes "the page that names this activity" a well formed phrase.
  • Every binding is event type 0x80, a press, never a release or a repeat. Section 17's key code split is what makes that checkable, and a chain assembled out of the wrong split would have produced a mixture.

Arch 14 binds two keys per activity and the others one, which matches reference/capabilities.md saying the 600 and 700 have physical activity buttons and soft keys where the 5xx has soft keys only.

The closure: an activity page gets a fresh run of action lists

An activity page's 0x7F operands are a contiguous ascending run of base slot 10 indices, in the tagged list's own order. On the Harmony 525's page 47 that is 0x1D2, 0x1D3, 0x1D4 for three keys; on the One's page 45, 0xF8A to 0xF8E for five.

It holds on 16 of 16 activity pages in the corpus. The control is what makes it evidence: across all 1152 pages with two or more 0x7F entries, 373 are not contiguous, so a third of pages generally fail a property every activity page has. The generator allocates a fresh run of action lists when it lays out an activity menu, and that is a way to recognise one without walking the chain at all.

The idle value, and a field that was unconfirmed for a reason

The writes do not cover the variable's whole range. In h700_config the highest value is 5 and the values written are 0 to 4; in one_config the highest is 8 and the written set is {0,1,2,3,4,5,6,8}, which skips 7. Exactly one value in 0 to highest is never written, in every container.

That value is base slot 13's first field, the u16 at +0x00. Section 60 read it as an initial value and marked it unconfirmed, because nothing had been traced to it: it is at most second in all 735 records and zero in most. Eleven containers of eleven now agree that it is exactly the value no activity binding writes.

The agreement is not arithmetic, and one_config is why. In ten containers first equals second, so any rule of the form "the top value is idle" fits them. In one_config first is 7 while second is 8, and the value 8 is bound to a key while 7 is bound to nothing. So the field states it, and a rule inferred from the other ten would have been wrong about this config while looking right.

This corrects section 86 in place. That section read the count as second on the grounds that "value 0 is no activity running and the rest are the activities". The count is right and the reason was wrong: 0 is an activity in every user config here. There are second + 1 states, one of them idle, so second of them are activities however the values are distributed.

h525_safemode_ahcm is the counterexample that confirms rather than annoys: it is the only container whose lists write the idle value, and the only one with zero activities. Its single list returns the remote to idle rather than starting anything, which is exactly what a safe mode container should do, and it is why "writer lists equals activity count" is 1 against 0 there and nowhere else.

What it does not settle

Which of a page's drawn strings is the activity's name. activityBindings gets to the page; section 121 gets to the string, and to the architecture where it cannot.


Section 119 | the archive | section 121. Section 120 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.