More decompiling work
This commit is contained in:
@@ -270,6 +270,80 @@ class SerialPseudocodeTest(unittest.TestCase):
|
||||
},
|
||||
"evidence_addresses_hex": ["H'BBD6", "H'BE29"],
|
||||
},
|
||||
"gate_queue_model": {
|
||||
"predicates": [
|
||||
{
|
||||
"name": "main_loop_may_enter_report_builder",
|
||||
"condition_candidate": "FAA2 == 0 && F9C0 == 0 && ((FAA5.bit7 == 0) || (F9C3 == 0))",
|
||||
"summary": "loc_3FD3 gates loc_BAF2.",
|
||||
},
|
||||
{
|
||||
"name": "queue_has_pending_report",
|
||||
"condition_candidate": "F9B5 != F9B0",
|
||||
"summary": "Queue non-empty path stages through BB43/BA26.",
|
||||
},
|
||||
{
|
||||
"name": "periodic_resend_may_fire",
|
||||
"condition_candidate": "(FAA5 & FAA3 & 0x80) != 0 && F9C6 == 0 && F9C8 != 0",
|
||||
"summary": "BE9E/BED5 resend gate.",
|
||||
},
|
||||
],
|
||||
"session_effects": [
|
||||
{
|
||||
"name": "rx_completion_sets_session_timer",
|
||||
"summary": "RX completion sets F9C5.",
|
||||
},
|
||||
{
|
||||
"name": "session_timeout_clears_gate_and_queue",
|
||||
"summary": "loc_3FEF clears F9B5/F9B0 and clears or sets FAA5.",
|
||||
},
|
||||
{
|
||||
"name": "host_ack_can_advance_queue",
|
||||
"summary": "Commands 0x05/0x06 can ack or advance F9B5.",
|
||||
"command_values_hex": ["H'05", "H'06"],
|
||||
},
|
||||
],
|
||||
"caveat": "Many panel controls may require host/session traffic before reporting; observed autonomous call/cam-power indexes are runtime/capture overlays, not ROM constants.",
|
||||
"evidence_addresses_hex": ["H'3FD3", "H'3FEB", "H'BAF2", "H'BB43", "H'BE9E", "H'BED5"],
|
||||
},
|
||||
"tx_report_model": {
|
||||
"entry_label": "loc_BB43",
|
||||
"value_source_candidate": "current_value_table_candidate",
|
||||
"observed_capture_overlay_candidates": [
|
||||
{
|
||||
"name_candidate": "heartbeat_or_idle_report_candidate",
|
||||
"observed_frames_hex": ["00 00 00 00 80 DA"],
|
||||
},
|
||||
{
|
||||
"name_candidate": "call_button_report_candidate",
|
||||
"observed_frames_hex": ["00 00 15 80 00 CF", "00 00 15 00 00 4F"],
|
||||
},
|
||||
{
|
||||
"name_candidate": "camera_power_report_candidate",
|
||||
"observed_frames_hex": ["00 00 07 80 00 DD"],
|
||||
},
|
||||
],
|
||||
"observed_autonomous_output_caveat": "Observed autonomous output is limited to heartbeat/call/cam-power; other controls may require host/device requests first.",
|
||||
"evidence_addresses_hex": ["H'BB20", "H'BB43"],
|
||||
},
|
||||
"periodic_resend_model": {
|
||||
"period_timer": {
|
||||
"reload_value_hex": "H'01F4",
|
||||
"summary": "Candidate periodic report/heartbeat timer reload.",
|
||||
},
|
||||
"resend_countdown": {
|
||||
"reload_value_hex": "H'14",
|
||||
"summary": "Candidate periodic resend countdown.",
|
||||
},
|
||||
"pending_mask": {
|
||||
"mask_hex": "H'80",
|
||||
"summary": "Candidate autonomous report pending mask.",
|
||||
},
|
||||
"resend_path": {
|
||||
"summary": "Candidate periodic resend path feeding TX staging.",
|
||||
},
|
||||
"evidence_addresses_hex": ["H'BE90", "H'BED5"],
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -287,6 +361,19 @@ class SerialPseudocodeTest(unittest.TestCase):
|
||||
self.assertIn("serial_session_flags_candidate H'FAA2: reads 1, writes 2; bits 7", text)
|
||||
self.assertIn("retry/error model candidate:", text)
|
||||
self.assertIn("checksum path: 0x5A-seeded XOR over RX[0..4] differs from RX[5] -> loc_BE29", text)
|
||||
self.assertIn("gate/queue state machine candidate:", text)
|
||||
self.assertIn("main_loop_may_enter_report_builder: FAA2 == 0 && F9C0 == 0", text)
|
||||
self.assertIn("queue_has_pending_report: F9B5 != F9B0", text)
|
||||
self.assertIn("host_ack_can_advance_queue: Commands 0x05/0x06 can ack or advance F9B5", text)
|
||||
self.assertIn("static bool sci1_candidate_main_report_gate_open(void)", text)
|
||||
self.assertIn("static bool sci1_candidate_report_queue_nonempty(void)", text)
|
||||
self.assertIn("static bool sci1_candidate_periodic_resend_gate_open(void)", text)
|
||||
self.assertIn("TX/autonomous report model candidate:", text)
|
||||
self.assertIn("loc_BB43 -> loc_BA26: bytes 0..2 encode candidate logical index/report id; bytes 3..4 come from current_value_table_candidate", text)
|
||||
self.assertIn("heartbeat_or_idle_report_candidate: 00 00 00 00 80 DA", text)
|
||||
self.assertIn("heartbeat/periodic resend candidate:", text)
|
||||
self.assertIn("F9C6 reload H'01F4", text)
|
||||
self.assertIn("BED5 resend path", text)
|
||||
self.assertIn("candidate effect: table_write_candidate; target primary_value_table_candidate", text)
|
||||
|
||||
def test_tx_only_option_omits_rx_functions(self):
|
||||
|
||||
Reference in New Issue
Block a user