Skip to content

90. READ_MISC selector 0x07 answers on arch 9 and returns zero for every address

Live RAM of a running remote is readable over USB. That is section 48's instrument, it is the capability docs/plans/002-the-roadmap.md accepted in place of the deferred emulator, and it was derived on arch 14 and confirmed on arch 12. It is not true on arch 9, and this section is the measurement, taken on the bench Harmony 525 on 9 August 2026.

The negative that was nearly written down

watch-keys.ts was pointed at 0x2DE and 0x3C8, the previous section's variables, and every button pressed on the 525 left both at 0. Section 48 has a ready made explanation for exactly that result, since a 600 and a One both park in sync mode without running their keypad handler, so the obvious write up was "arch 9 does the same, the ceiling is a property of the family".

The positive control refused it. Watching the five ports and the two latches instead reported every one of them at 0, PORTC included, and PORTC carries the USB data lines of a part that is at that moment answering USB commands. A port that reads zero while it is switching is not a reading, it is an absence.

The calibration

Four banks of the 525's own data memory against the same four on the 600, one byte per exchange:

bank Harmony 525, arch 9 Harmony 600, arch 14
0x100 0 of 256 nonzero 25 of 256
0x300 0 of 256 77 of 256
0x700 0 of 256 41 of 256
0xE00 0 of 256 159 of 256
0xF60, the SFR page 0 of 160 84 of 160

Plus 0x000 and 0x200 on the 525, also entirely zero, and 0x200 on a Harmony One at 107 of 128 nonzero. 1696 distinct addresses on the 525, spanning general purpose banks and the special function register page, every one of them zero.

The remote is not refusing. A refusal arrives as a wrong reply kind or a wrong selector and the library raises on both; what comes back is a well formed 0xC2 misc reply echoing selector 0x07 and carrying a byte, and the byte is always zero. Every other selector in the chain, 0x01, 0x02, 0x06, 0x08, 0x09 and 0x0C, answers the same way.

It is not a selector numbering difference, and that was worth checking. Logitech's own client names selector 6 as the memory one and 7 as something else, where this project derived 7 from the firmware and found 6 to be a different accessor. On an architecture where 7 answers nothing, 6 is the obvious candidate. It is not: over a window that returns 77 live bytes of 160 on a Harmony 600 through selector 7, the 525 returns zero through all nine selectors tried, 0, 1, 2, 4, 5, 6, 7, 8 and 12. Arch 9 serves no misc read at all. The last sentence is wrong and the correction is at the end of this section: selector 1 does serve, and the sweep agreed with itself because the decoder was reading the wrong byte of its reply.

That check needed one correction on the way, and it is the same shape as the rest of this section. The first sweep used 0x300 to 0x35F and reported zero on the 525 and zero on the 600, which looks like agreement and is worthless: that window is genuinely empty on both. A window has to be shown live on the calibration remote before its emptiness anywhere else means anything.

So on arch 9 the selector is accepted and serviced by something that is not an indirect load. What that something is has not been read: the arch 14 primitive is MOVFF x,FSR0L ; MOVFF y,FSR0H ; MOVFF INDF0,z at 0x0CBF4, and a search for that shape in h525_code returns 67 sites, none of them in a USB command handler. Arch 9's READ_MISC body is not located yet, so this section is a measurement and not yet a reading.

What it costs

  • The button mapping experiment is unreachable on arch 9, not merely capped as it is on arch 12 and arch 14. There is no instrument, so there is no ceiling to hit.
  • docs/usb-protocol.md's RAM read is an arch 12 and arch 14 fact, and its own text left room for this: "Whether the upstream number is right for another architecture is not established." It is established now, in the negative, for the number and for the capability together.
  • The emulator argument is per architecture. Decision 5 in docs/decisions.md deferred the emulator partly on live RAM polling, and on arch 9 that leg is missing.

The instrument this needed and did not have

watch-keys.ts reports changes. It therefore cannot distinguish a variable that never moves from an address the remote does not serve, and from the host those two look identical: a log with nothing after the resting line. That is how a wrong negative nearly reached a document, and it is the same shape as section 88's lost first command, where a silence had two causes.

packages/usb/bin/read-ram.ts is the fix, the RAM analogue of read-window.ts: it prints content rather than changes, and --summary answers the question a positive control actually asks, which is whether a window contains anything at all. A watcher says what moved; only a reader says whether anybody is home.

Where it lands

  • docs/usb-protocol.md, where the RAM read gains the architecture it holds on and the one it does not.
  • packages/usb/bin/read-ram.ts, new, and watch-keys.ts, which now wakes the remote first so that the read seeding its resting value is not the command that gets lost.
  • tests/test_usb_firmware.py, which pins the arch 14 primitive's shape and its absence from the arch 9 image, so that finding the arch 9 handler later has something to contradict.

Corrected on 12 August 2026: the handler is read, and one selector does answer

trelowney found the arch 9 handler and pointed out that this project's own decoder would have hidden its answer anyway. Both halves check out against h525_code here, and the reading below is ours from his addresses.

READ_MISC is command 0xB0, which sets state 10 at 0x03090 and puts the selector in 0x27E. The executor is 0x03412 and it is nine instructions of preamble before any selector is examined:

03414: MOVLW 0xC2 ; RCALL 0x03558      emit the reply code
03418: MOVFF 0x27E,0x2AC ; RCALL       echo the selector back
03420: CLRF 0x710 ; CLRF 0x711         clear the two result bytes
03426: MOVF 0x27E,W ; XORLW 0x01
0342A: BNZ 0x03458                     everything but selector 1 skips the body
...
03458: MOVFF 0x711,0x2AC ; RCALL       emit the high byte
0345E: MOVFF 0x710,0x2AC ; RCALL       then the low byte

So the zeros this section measured are the firmware clearing two bytes, which is a stronger negative than the one recorded above and a narrower one. Selector 0x07 is not "serviced by something that is not an indirect load": it is not serviced at all, and neither is any other selector except 0x01. Every sentence above about the ceiling on arch 9 stands, and the reason changes from unexplained to read.

"Arch 9 serves no misc read at all" is wrong, and this project could not have seen otherwise without reading the handler, because the reply is C2 <selector> <high> <low> and decodeReply took the byte after the selector as the value. That byte is the high half. Selector 1's answer came back as zero for the same reason every unimplemented selector did, so the sweep of nine selectors agreed with itself and was measuring the decoder for one of them.

What selector 1 returns is a parameter by index, and the fetch at 0x04B72 has two arms:

the index is what it reads the high byte
below 0x1A0 one byte through INDF0 CLRF then copied, so always zero
0x1A0 or above two bytes into 0x72A and 0x72B a real high half

So "the high byte is always zero" is true of the byte sized parameters and not of the word sized ones, which is why decodeReply now exposes bytes and word and picks between them for nobody. libconcord has carried *rd++ = (rsp[2] << 8) | rsp[3] with a comment about the C2 reply since 2007 and names selector 1 COMMAND_MISC_STATE, so the protocol half is theirs and the firmware half is what is new here.

Unmeasured on our bench, and deliberately marked as such: trelowney reports his 525's selector 1 parameter 0 as C2 01 00 0D, moving with the clock, with the first seven words decoding to a date and time that tracked Concordance's own reading half a minute apart. Nothing here has sent selector 1 to a remote. The decode is fixed and tested; the capability is his measurement, not ours.


Section 89 | the archive | section 91. Section 90 of the findings archive, which is frozen; the reference holds the current answer. The archive on GitHub.