diff --git a/build/rom_decompiled.json b/build/rom_decompiled.json index 094af3e..d3819d1 100644 --- a/build/rom_decompiled.json +++ b/build/rom_decompiled.json @@ -189442,6 +189442,118 @@ ], "confidence": "candidate-medium", "caveat": "Role is inferred from references in the serial handler region and remains a state-variable candidate." + }, + { + "kind": "serial_state_variable_candidate", + "name_candidate": "autonomous_report_period_timer_candidate", + "address": 63942, + "address_hex": "H'F9C6", + "access_count": 3, + "read_count": 1, + "write_count": 2, + "bit_candidates": [], + "immediate_values": [ + 500 + ], + "immediate_values_hex": [ + "H'01F4" + ], + "accesses": [ + { + "instruction_address": 47942, + "instruction_address_hex": "H'BB46", + "access": "write", + "mnemonic": "MOV:G.W", + "instruction": "MOV:G.W #H'01F4, @H'F9C6", + "immediate": 500, + "immediate_hex": "H'01F4" + }, + { + "instruction_address": 48821, + "instruction_address_hex": "H'BEB5", + "access": "read", + "mnemonic": "TST.W", + "instruction": "TST.W @H'F9C6" + }, + { + "instruction_address": 48837, + "instruction_address_hex": "H'BEC5", + "access": "write", + "mnemonic": "MOV:G.W", + "instruction": "MOV:G.W #H'01F4, @H'F9C6", + "immediate": 500, + "immediate_hex": "H'01F4" + } + ], + "evidence_addresses": [ + 47942, + 48821, + 48837 + ], + "evidence_addresses_hex": [ + "H'BB46", + "H'BEB5", + "H'BEC5" + ], + "confidence": "candidate-medium", + "caveat": "Role is inferred from references in the serial handler region and remains a state-variable candidate." + }, + { + "kind": "serial_state_variable_candidate", + "name_candidate": "autonomous_report_resend_countdown_candidate", + "address": 63944, + "address_hex": "H'F9C8", + "access_count": 3, + "read_count": 1, + "write_count": 2, + "bit_candidates": [], + "immediate_values": [ + 20, + 65535 + ], + "immediate_values_hex": [ + "H'0014", + "H'FFFF" + ], + "accesses": [ + { + "instruction_address": 47948, + "instruction_address_hex": "H'BB4C", + "access": "write", + "mnemonic": "MOV:G.B", + "instruction": "MOV:G.B #H'14, @H'F9C8", + "immediate": 20, + "immediate_hex": "H'14" + }, + { + "instruction_address": 48827, + "instruction_address_hex": "H'BEBB", + "access": "read", + "mnemonic": "TST.B", + "instruction": "TST.B @H'F9C8" + }, + { + "instruction_address": 48833, + "instruction_address_hex": "H'BEC1", + "access": "write", + "mnemonic": "ADD:Q.B", + "instruction": "ADD:Q.B #-1, @H'F9C8", + "immediate": 65535, + "immediate_hex": "H'FFFF" + } + ], + "evidence_addresses": [ + 47948, + 48827, + 48833 + ], + "evidence_addresses_hex": [ + "H'BB4C", + "H'BEBB", + "H'BEC1" + ], + "confidence": "candidate-medium", + "caveat": "Role is inferred from references in the serial handler region and remains a state-variable candidate." } ], "send_builder": { @@ -195581,6 +195693,471 @@ "confidence": "candidate-medium", "caveat": "The retry/error model is inferred from checksum branch targets, retry-counter state, and response staging; exact host-visible semantics remain candidate phrasing." }, + "gate_queue_model": { + "kind": "serial_gate_queue_state_machine_candidate", + "summary": "Conservative model for autonomous report gating, queue cursor comparison, periodic resend, and RX/session side effects.", + "predicates": [ + { + "name": "main_loop_may_enter_report_builder", + "entry_label": "loc_3FD3", + "target_label": "loc_BAF2", + "condition_candidate": "FAA2 == 0 && F9C0 == 0 && ((FAA5.bit7 == 0) || (F9C3 == 0))", + "summary": "Main-loop report gate; session must be idle, TX busy timer clear, and RX gate open.", + "state_addresses_hex": [ + "H'FAA2", + "H'FAA5", + "H'F9C3", + "H'F9C0" + ], + "evidence_addresses": [ + 16339, + 16343, + 16345, + 16349, + 16351, + 16355, + 16357, + 16361, + 16363 + ] + }, + { + "name": "queue_has_pending_report", + "entry_label": "loc_BAF2", + "condition_candidate": "F9B5 != F9B0", + "summary": "Queue/pending cursor gate; non-empty state stages through BB43 before loc_BA26.", + "state_addresses_hex": [ + "H'F9B5", + "H'F9B0" + ], + "staging_path": [ + "loc_BAF2", + "loc_BB43", + "loc_BA26" + ], + "evidence_addresses": [ + 47858, + 47862, + 47864, + 47868, + 47870, + 47872, + 47876, + 47878, + 47880, + 47884, + 47886, + 47889, + 47891, + 47893, + 47895, + 47897, + 47900, + 47904, + 47908, + 47910, + 47913, + 47915, + 47919, + 47923, + 47925, + 47929, + 47933, + 47935, + 47939 + ] + }, + { + "name": "periodic_resend_may_fire", + "entry_label": "loc_BE9E", + "target_label": "loc_BED5", + "condition_candidate": "(FAA5 & FAA3 & 0x80) != 0 && F9C6 == 0 && F9C8 != 0 after countdown", + "summary": "Resend gate masks pending state with FAA5, checks F9C6/F9C8, then calls BA26 at BED5.", + "state_addresses_hex": [ + "H'FAA5", + "H'FAA3", + "H'F9C6", + "H'F9C8" + ], + "evidence_addresses": [ + 48798, + 48802, + 48805, + 48809, + 48813, + 48815, + 48819, + 48821, + 48825, + 48827, + 48831, + 48833, + 48837, + 48843, + 48847, + 48849, + 48853 + ] + } + ], + "session_effects": [ + { + "name": "rx_completion_sets_session_timer", + "summary": "RX completion sets F9C5 (observed reload H'14) after the sixth byte is captured.", + "state_addresses_hex": [ + "H'F9C5" + ], + "evidence_addresses": [ + 48030 + ] + }, + { + "name": "session_timeout_clears_gate_and_queue", + "entry_label": "loc_3FEF", + "summary": "When F9C5 is clear, loc_3FEF clears F9B5/F9B0 and clears FAA5.bit7; when nonzero, it sets FAA5.bit7.", + "state_addresses_hex": [ + "H'F9C5", + "H'F9B5", + "H'F9B0", + "H'FAA5" + ], + "evidence_addresses": [ + 16367, + 16371, + 16373, + 16377, + 16381, + 16385, + 16387, + 16389, + 16391 + ] + }, + { + "name": "host_ack_can_advance_queue", + "summary": "Commands 0x05/0x06 are modeled as acknowledgement paths that can clear pending state or advance F9B5.", + "command_values_hex": [ + "H'05", + "H'06" + ], + "state_addresses_hex": [ + "H'F9B5" + ], + "evidence_addresses": [ + 48136, + 48140, + 48202, + 48204, + 48207, + 48209 + ] + } + ], + "caveat": "Many panel controls may require host/session traffic before reporting. Observed autonomous call/camera-power indexes are runtime/capture overlays, not ROM constants.", + "confidence": "candidate-medium", + "evidence_addresses": [ + 16339, + 16343, + 16345, + 16349, + 16351, + 16355, + 16357, + 16361, + 16363, + 16367, + 16371, + 16373, + 16377, + 16381, + 16385, + 16387, + 16389, + 16391, + 47858, + 47862, + 47864, + 47868, + 47870, + 47872, + 47876, + 47878, + 47880, + 47884, + 47886, + 47889, + 47891, + 47893, + 47895, + 47897, + 47900, + 47904, + 47908, + 47910, + 47913, + 47915, + 47919, + 47923, + 47925, + 47929, + 47933, + 47935, + 47939, + 48798, + 48802, + 48805, + 48809, + 48813, + 48815, + 48819, + 48821, + 48825, + 48827, + 48831, + 48833, + 48837, + 48843, + 48847, + 48849, + 48853 + ], + "evidence_addresses_hex": [ + "H'3FD3", + "H'3FD7", + "H'3FD9", + "H'3FDD", + "H'3FDF", + "H'3FE3", + "H'3FE5", + "H'3FE9", + "H'3FEB", + "H'3FEF", + "H'3FF3", + "H'3FF5", + "H'3FF9", + "H'3FFD", + "H'4001", + "H'4003", + "H'4005", + "H'4007", + "H'BAF2", + "H'BAF6", + "H'BAF8", + "H'BAFC", + "H'BAFE", + "H'BB00", + "H'BB04", + "H'BB06", + "H'BB08", + "H'BB0C", + "H'BB0E", + "H'BB11", + "H'BB13", + "H'BB15", + "H'BB17", + "H'BB19", + "H'BB1C", + "H'BB20", + "H'BB24", + "H'BB26", + "H'BB29", + "H'BB2B", + "H'BB2F", + "H'BB33", + "H'BB35", + "H'BB39", + "H'BB3D", + "H'BB3F", + "H'BB43", + "H'BE9E", + "H'BEA2", + "H'BEA5", + "H'BEA9", + "H'BEAD", + "H'BEAF", + "H'BEB3", + "H'BEB5", + "H'BEB9", + "H'BEBB", + "H'BEBF", + "H'BEC1", + "H'BEC5", + "H'BECB", + "H'BECF", + "H'BED1", + "H'BED5" + ] + }, + "tx_report_model": { + "kind": "bb43_to_ba26_tx_report_model_candidate", + "direction": "device_to_host_autonomous_report_candidate", + "entry_label": "loc_BB43", + "entry_address": 47939, + "entry_address_hex": "H'BB43", + "send_builder": "loc_BA26", + "send_builder_address": 47654, + "send_builder_address_hex": "H'BA26", + "response_candidates": [ + "response_at_BB43" + ], + "summary": "TX report bytes 0..2 are computed encoded logical index/report id bytes, bytes 3..4 come from current_value_table_candidate, and byte5 is the 0x5A XOR checksum.", + "byte_roles": [ + { + "offset": 0, + "field_candidate": "encoded_logical_index_or_report_id_byte0", + "source_candidate": "computed from candidate logical index/report id" + }, + { + "offset": 1, + "field_candidate": "encoded_logical_index_or_report_id_byte1", + "source_candidate": "computed from candidate logical index/report id" + }, + { + "offset": 2, + "field_candidate": "encoded_logical_index_or_report_id_byte2", + "source_candidate": "computed from candidate logical index/report id" + }, + { + "offset": 3, + "field_candidate": "current_value_hi", + "source_candidate": "current_value_table_candidate high byte", + "table_candidate": "current_value_table_candidate" + }, + { + "offset": 4, + "field_candidate": "current_value_lo", + "source_candidate": "current_value_table_candidate low byte", + "table_candidate": "current_value_table_candidate" + }, + { + "offset": 5, + "field_candidate": "checksum", + "source_candidate": "0x5A XOR TX[0..4]" + } + ], + "value_source_candidate": "current_value_table_candidate", + "checksum_formula": "checksum = 0x5A ^ byte0 ^ byte1 ^ byte2 ^ byte3 ^ byte4", + "observed_capture_overlay_candidates": [ + { + "logical_index": 0, + "name_candidate": "heartbeat_or_idle_report_candidate", + "observed_frames_hex": [ + "00 00 00 00 80 DA" + ], + "observed_period_ms_candidate": 700 + }, + { + "logical_index": 21, + "name_candidate": "call_button_report_candidate", + "observed_frames_hex": [ + "00 00 15 80 00 CF", + "00 00 15 00 00 4F" + ] + }, + { + "logical_index": 7, + "name_candidate": "camera_power_report_candidate", + "observed_frames_hex": [ + "00 00 07 80 00 DD" + ] + } + ], + "observed_autonomous_output_caveat": "Real captures supplied so far show only heartbeat/idle, call, and camera-power autonomous TX frames. Other panel controls may require a host/device request or state transition before the firmware reports them.", + "confidence": "candidate-medium", + "caveat": "This is a TX/report model for the BB43 -> BA26 path, separate from RX command dispatch. Observed report names are a capture overlay candidate only, not hard-coded source truth.", + "evidence_addresses": [ + 47900, + 47904, + 47915, + 47929, + 47935, + 47939 + ], + "evidence_addresses_hex": [ + "H'BB1C", + "H'BB20", + "H'BB2B", + "H'BB39", + "H'BB3F", + "H'BB43" + ] + }, + "periodic_resend_model": { + "kind": "autonomous_periodic_resend_model_candidate", + "period_timer": { + "address": 63942, + "address_hex": "H'F9C6", + "reload_value_candidate": 500, + "reload_value_hex": "H'01F4", + "summary": "Candidate periodic report/heartbeat timer reload.", + "evidence_addresses": [ + 47942, + 48837 + ], + "evidence_addresses_hex": [ + "H'BB46", + "H'BEC5" + ] + }, + "resend_countdown": { + "address": 63944, + "address_hex": "H'F9C8", + "reload_value_candidate": 20, + "reload_value_hex": "H'14", + "summary": "Candidate periodic resend countdown/retry spacing value.", + "evidence_addresses": [ + 47948 + ], + "evidence_addresses_hex": [ + "H'BB4C" + ] + }, + "pending_mask": { + "address": 64163, + "address_hex": "H'FAA3", + "mask_candidate": 128, + "mask_hex": "H'80", + "summary": "Candidate bit/mask that marks an autonomous report pending.", + "evidence_addresses": [ + 47953, + 48843 + ], + "evidence_addresses_hex": [ + "H'BB51", + "H'BECB" + ] + }, + "resend_path": { + "entry_label": "loc_BED5", + "entry_address": 48853, + "entry_address_hex": "H'BED5", + "summary": "Candidate periodic resend path feeding the TX staging/send-builder flow.", + "evidence_addresses": [ + 48853 + ], + "evidence_addresses_hex": [ + "H'BED5" + ] + }, + "evidence_addresses": [ + 47942, + 48837, + 47948, + 47953, + 48843, + 48853 + ], + "evidence_addresses_hex": [ + "H'BB46", + "H'BEC5", + "H'BB4C", + "H'BB51", + "H'BECB", + "H'BED5" + ], + "confidence": "candidate-medium", + "caveat": "Timer and resend roles are inferred from constants/state references around F9C6, F9C8, FAA3, and loc_BED5; exact scheduling units remain candidate phrasing." + }, "evidence": [ { "kind": "rx_frame_reconstruction_present", @@ -195713,6 +196290,26 @@ ], "response_count": 5 }, + { + "kind": "bb43_autonomous_tx_report_path", + "summary": "BB43 stages a candidate device-to-host report before loc_BA26; this is separate from RX command dispatch.", + "addresses": [ + 47900, + 47904, + 47915, + 47929, + 47935, + 47939 + ], + "addresses_hex": [ + "H'BB1C", + "H'BB20", + "H'BB2B", + "H'BB39", + "H'BB3F", + "H'BB43" + ] + }, { "kind": "rx_payload_bytes_read", "summary": "RX[1..4] are read in the command-processing region", @@ -204581,6 +205178,118 @@ ], "confidence": "candidate-medium", "caveat": "Role is inferred from references in the serial handler region and remains a state-variable candidate." + }, + { + "kind": "serial_state_variable_candidate", + "name_candidate": "autonomous_report_period_timer_candidate", + "address": 63942, + "address_hex": "H'F9C6", + "access_count": 3, + "read_count": 1, + "write_count": 2, + "bit_candidates": [], + "immediate_values": [ + 500 + ], + "immediate_values_hex": [ + "H'01F4" + ], + "accesses": [ + { + "instruction_address": 47942, + "instruction_address_hex": "H'BB46", + "access": "write", + "mnemonic": "MOV:G.W", + "instruction": "MOV:G.W #H'01F4, @H'F9C6", + "immediate": 500, + "immediate_hex": "H'01F4" + }, + { + "instruction_address": 48821, + "instruction_address_hex": "H'BEB5", + "access": "read", + "mnemonic": "TST.W", + "instruction": "TST.W @H'F9C6" + }, + { + "instruction_address": 48837, + "instruction_address_hex": "H'BEC5", + "access": "write", + "mnemonic": "MOV:G.W", + "instruction": "MOV:G.W #H'01F4, @H'F9C6", + "immediate": 500, + "immediate_hex": "H'01F4" + } + ], + "evidence_addresses": [ + 47942, + 48821, + 48837 + ], + "evidence_addresses_hex": [ + "H'BB46", + "H'BEB5", + "H'BEC5" + ], + "confidence": "candidate-medium", + "caveat": "Role is inferred from references in the serial handler region and remains a state-variable candidate." + }, + { + "kind": "serial_state_variable_candidate", + "name_candidate": "autonomous_report_resend_countdown_candidate", + "address": 63944, + "address_hex": "H'F9C8", + "access_count": 3, + "read_count": 1, + "write_count": 2, + "bit_candidates": [], + "immediate_values": [ + 20, + 65535 + ], + "immediate_values_hex": [ + "H'0014", + "H'FFFF" + ], + "accesses": [ + { + "instruction_address": 47948, + "instruction_address_hex": "H'BB4C", + "access": "write", + "mnemonic": "MOV:G.B", + "instruction": "MOV:G.B #H'14, @H'F9C8", + "immediate": 20, + "immediate_hex": "H'14" + }, + { + "instruction_address": 48827, + "instruction_address_hex": "H'BEBB", + "access": "read", + "mnemonic": "TST.B", + "instruction": "TST.B @H'F9C8" + }, + { + "instruction_address": 48833, + "instruction_address_hex": "H'BEC1", + "access": "write", + "mnemonic": "ADD:Q.B", + "instruction": "ADD:Q.B #-1, @H'F9C8", + "immediate": 65535, + "immediate_hex": "H'FFFF" + } + ], + "evidence_addresses": [ + 47948, + 48827, + 48833 + ], + "evidence_addresses_hex": [ + "H'BB4C", + "H'BEBB", + "H'BEC1" + ], + "confidence": "candidate-medium", + "caveat": "Role is inferred from references in the serial handler region and remains a state-variable candidate." } ], "retry_error_model": { @@ -204771,6 +205480,471 @@ "confidence": "candidate-medium", "caveat": "The retry/error model is inferred from checksum branch targets, retry-counter state, and response staging; exact host-visible semantics remain candidate phrasing." }, + "gate_queue_model": { + "kind": "serial_gate_queue_state_machine_candidate", + "summary": "Conservative model for autonomous report gating, queue cursor comparison, periodic resend, and RX/session side effects.", + "predicates": [ + { + "name": "main_loop_may_enter_report_builder", + "entry_label": "loc_3FD3", + "target_label": "loc_BAF2", + "condition_candidate": "FAA2 == 0 && F9C0 == 0 && ((FAA5.bit7 == 0) || (F9C3 == 0))", + "summary": "Main-loop report gate; session must be idle, TX busy timer clear, and RX gate open.", + "state_addresses_hex": [ + "H'FAA2", + "H'FAA5", + "H'F9C3", + "H'F9C0" + ], + "evidence_addresses": [ + 16339, + 16343, + 16345, + 16349, + 16351, + 16355, + 16357, + 16361, + 16363 + ] + }, + { + "name": "queue_has_pending_report", + "entry_label": "loc_BAF2", + "condition_candidate": "F9B5 != F9B0", + "summary": "Queue/pending cursor gate; non-empty state stages through BB43 before loc_BA26.", + "state_addresses_hex": [ + "H'F9B5", + "H'F9B0" + ], + "staging_path": [ + "loc_BAF2", + "loc_BB43", + "loc_BA26" + ], + "evidence_addresses": [ + 47858, + 47862, + 47864, + 47868, + 47870, + 47872, + 47876, + 47878, + 47880, + 47884, + 47886, + 47889, + 47891, + 47893, + 47895, + 47897, + 47900, + 47904, + 47908, + 47910, + 47913, + 47915, + 47919, + 47923, + 47925, + 47929, + 47933, + 47935, + 47939 + ] + }, + { + "name": "periodic_resend_may_fire", + "entry_label": "loc_BE9E", + "target_label": "loc_BED5", + "condition_candidate": "(FAA5 & FAA3 & 0x80) != 0 && F9C6 == 0 && F9C8 != 0 after countdown", + "summary": "Resend gate masks pending state with FAA5, checks F9C6/F9C8, then calls BA26 at BED5.", + "state_addresses_hex": [ + "H'FAA5", + "H'FAA3", + "H'F9C6", + "H'F9C8" + ], + "evidence_addresses": [ + 48798, + 48802, + 48805, + 48809, + 48813, + 48815, + 48819, + 48821, + 48825, + 48827, + 48831, + 48833, + 48837, + 48843, + 48847, + 48849, + 48853 + ] + } + ], + "session_effects": [ + { + "name": "rx_completion_sets_session_timer", + "summary": "RX completion sets F9C5 (observed reload H'14) after the sixth byte is captured.", + "state_addresses_hex": [ + "H'F9C5" + ], + "evidence_addresses": [ + 48030 + ] + }, + { + "name": "session_timeout_clears_gate_and_queue", + "entry_label": "loc_3FEF", + "summary": "When F9C5 is clear, loc_3FEF clears F9B5/F9B0 and clears FAA5.bit7; when nonzero, it sets FAA5.bit7.", + "state_addresses_hex": [ + "H'F9C5", + "H'F9B5", + "H'F9B0", + "H'FAA5" + ], + "evidence_addresses": [ + 16367, + 16371, + 16373, + 16377, + 16381, + 16385, + 16387, + 16389, + 16391 + ] + }, + { + "name": "host_ack_can_advance_queue", + "summary": "Commands 0x05/0x06 are modeled as acknowledgement paths that can clear pending state or advance F9B5.", + "command_values_hex": [ + "H'05", + "H'06" + ], + "state_addresses_hex": [ + "H'F9B5" + ], + "evidence_addresses": [ + 48136, + 48140, + 48202, + 48204, + 48207, + 48209 + ] + } + ], + "caveat": "Many panel controls may require host/session traffic before reporting. Observed autonomous call/camera-power indexes are runtime/capture overlays, not ROM constants.", + "confidence": "candidate-medium", + "evidence_addresses": [ + 16339, + 16343, + 16345, + 16349, + 16351, + 16355, + 16357, + 16361, + 16363, + 16367, + 16371, + 16373, + 16377, + 16381, + 16385, + 16387, + 16389, + 16391, + 47858, + 47862, + 47864, + 47868, + 47870, + 47872, + 47876, + 47878, + 47880, + 47884, + 47886, + 47889, + 47891, + 47893, + 47895, + 47897, + 47900, + 47904, + 47908, + 47910, + 47913, + 47915, + 47919, + 47923, + 47925, + 47929, + 47933, + 47935, + 47939, + 48798, + 48802, + 48805, + 48809, + 48813, + 48815, + 48819, + 48821, + 48825, + 48827, + 48831, + 48833, + 48837, + 48843, + 48847, + 48849, + 48853 + ], + "evidence_addresses_hex": [ + "H'3FD3", + "H'3FD7", + "H'3FD9", + "H'3FDD", + "H'3FDF", + "H'3FE3", + "H'3FE5", + "H'3FE9", + "H'3FEB", + "H'3FEF", + "H'3FF3", + "H'3FF5", + "H'3FF9", + "H'3FFD", + "H'4001", + "H'4003", + "H'4005", + "H'4007", + "H'BAF2", + "H'BAF6", + "H'BAF8", + "H'BAFC", + "H'BAFE", + "H'BB00", + "H'BB04", + "H'BB06", + "H'BB08", + "H'BB0C", + "H'BB0E", + "H'BB11", + "H'BB13", + "H'BB15", + "H'BB17", + "H'BB19", + "H'BB1C", + "H'BB20", + "H'BB24", + "H'BB26", + "H'BB29", + "H'BB2B", + "H'BB2F", + "H'BB33", + "H'BB35", + "H'BB39", + "H'BB3D", + "H'BB3F", + "H'BB43", + "H'BE9E", + "H'BEA2", + "H'BEA5", + "H'BEA9", + "H'BEAD", + "H'BEAF", + "H'BEB3", + "H'BEB5", + "H'BEB9", + "H'BEBB", + "H'BEBF", + "H'BEC1", + "H'BEC5", + "H'BECB", + "H'BECF", + "H'BED1", + "H'BED5" + ] + }, + "tx_report_model": { + "kind": "bb43_to_ba26_tx_report_model_candidate", + "direction": "device_to_host_autonomous_report_candidate", + "entry_label": "loc_BB43", + "entry_address": 47939, + "entry_address_hex": "H'BB43", + "send_builder": "loc_BA26", + "send_builder_address": 47654, + "send_builder_address_hex": "H'BA26", + "response_candidates": [ + "response_at_BB43" + ], + "summary": "TX report bytes 0..2 are computed encoded logical index/report id bytes, bytes 3..4 come from current_value_table_candidate, and byte5 is the 0x5A XOR checksum.", + "byte_roles": [ + { + "offset": 0, + "field_candidate": "encoded_logical_index_or_report_id_byte0", + "source_candidate": "computed from candidate logical index/report id" + }, + { + "offset": 1, + "field_candidate": "encoded_logical_index_or_report_id_byte1", + "source_candidate": "computed from candidate logical index/report id" + }, + { + "offset": 2, + "field_candidate": "encoded_logical_index_or_report_id_byte2", + "source_candidate": "computed from candidate logical index/report id" + }, + { + "offset": 3, + "field_candidate": "current_value_hi", + "source_candidate": "current_value_table_candidate high byte", + "table_candidate": "current_value_table_candidate" + }, + { + "offset": 4, + "field_candidate": "current_value_lo", + "source_candidate": "current_value_table_candidate low byte", + "table_candidate": "current_value_table_candidate" + }, + { + "offset": 5, + "field_candidate": "checksum", + "source_candidate": "0x5A XOR TX[0..4]" + } + ], + "value_source_candidate": "current_value_table_candidate", + "checksum_formula": "checksum = 0x5A ^ byte0 ^ byte1 ^ byte2 ^ byte3 ^ byte4", + "observed_capture_overlay_candidates": [ + { + "logical_index": 0, + "name_candidate": "heartbeat_or_idle_report_candidate", + "observed_frames_hex": [ + "00 00 00 00 80 DA" + ], + "observed_period_ms_candidate": 700 + }, + { + "logical_index": 21, + "name_candidate": "call_button_report_candidate", + "observed_frames_hex": [ + "00 00 15 80 00 CF", + "00 00 15 00 00 4F" + ] + }, + { + "logical_index": 7, + "name_candidate": "camera_power_report_candidate", + "observed_frames_hex": [ + "00 00 07 80 00 DD" + ] + } + ], + "observed_autonomous_output_caveat": "Real captures supplied so far show only heartbeat/idle, call, and camera-power autonomous TX frames. Other panel controls may require a host/device request or state transition before the firmware reports them.", + "confidence": "candidate-medium", + "caveat": "This is a TX/report model for the BB43 -> BA26 path, separate from RX command dispatch. Observed report names are a capture overlay candidate only, not hard-coded source truth.", + "evidence_addresses": [ + 47900, + 47904, + 47915, + 47929, + 47935, + 47939 + ], + "evidence_addresses_hex": [ + "H'BB1C", + "H'BB20", + "H'BB2B", + "H'BB39", + "H'BB3F", + "H'BB43" + ] + }, + "periodic_resend_model": { + "kind": "autonomous_periodic_resend_model_candidate", + "period_timer": { + "address": 63942, + "address_hex": "H'F9C6", + "reload_value_candidate": 500, + "reload_value_hex": "H'01F4", + "summary": "Candidate periodic report/heartbeat timer reload.", + "evidence_addresses": [ + 47942, + 48837 + ], + "evidence_addresses_hex": [ + "H'BB46", + "H'BEC5" + ] + }, + "resend_countdown": { + "address": 63944, + "address_hex": "H'F9C8", + "reload_value_candidate": 20, + "reload_value_hex": "H'14", + "summary": "Candidate periodic resend countdown/retry spacing value.", + "evidence_addresses": [ + 47948 + ], + "evidence_addresses_hex": [ + "H'BB4C" + ] + }, + "pending_mask": { + "address": 64163, + "address_hex": "H'FAA3", + "mask_candidate": 128, + "mask_hex": "H'80", + "summary": "Candidate bit/mask that marks an autonomous report pending.", + "evidence_addresses": [ + 47953, + 48843 + ], + "evidence_addresses_hex": [ + "H'BB51", + "H'BECB" + ] + }, + "resend_path": { + "entry_label": "loc_BED5", + "entry_address": 48853, + "entry_address_hex": "H'BED5", + "summary": "Candidate periodic resend path feeding the TX staging/send-builder flow.", + "evidence_addresses": [ + 48853 + ], + "evidence_addresses_hex": [ + "H'BED5" + ] + }, + "evidence_addresses": [ + 47942, + 48837, + 47948, + 47953, + 48843, + 48853 + ], + "evidence_addresses_hex": [ + "H'BB46", + "H'BEC5", + "H'BB4C", + "H'BB51", + "H'BECB", + "H'BED5" + ], + "confidence": "candidate-medium", + "caveat": "Timer and resend roles are inferred from constants/state references around F9C6, F9C8, FAA3, and loc_BED5; exact scheduling units remain candidate phrasing." + }, "confidence": "medium-high", "confidence_score": 0.9, "caveat": "Semantic names are candidates only. The analyzer reports byte roles, command values, dispatch targets, and response staging patterns observed in code; it does not prove source-level intent or protocol documentation." diff --git a/build/rom_serial_gate.json b/build/rom_serial_gate.json new file mode 100644 index 0000000..352c791 --- /dev/null +++ b/build/rom_serial_gate.json @@ -0,0 +1,1867 @@ +{ + "caveats": [ + "Observed report indexes 0x0007 and 0x0015 are capture overlays/runtime queue entries; this analyzer does not treat them as statically proven ROM constants.", + "Queue entries near F870 are reached through RAM-indexed addressing; static JSON proves the access pattern, not the runtime queue contents.", + "Branch predicates are summarized from local instruction order and targets; this is not an emulator trace." + ], + "evidence": { + "queue_send_gate_loc_BAF2": { + "items": [ + { + "address": 47858, + "address_hex": "H'BAF2", + "present": true, + "targets_hex": [], + "text": "MOV:G.B @H'F9B5, R1" + }, + { + "address": 47864, + "address_hex": "H'BAF8", + "present": true, + "targets_hex": [], + "text": "CMP:G.B @H'F9B0, R1" + }, + { + "address": 47868, + "address_hex": "H'BAFC", + "present": true, + "targets_hex": [ + "H'BB00" + ], + "text": "BNE loc_BB00" + }, + { + "address": 47870, + "address_hex": "H'BAFE", + "present": true, + "targets_hex": [ + "H'BB56" + ], + "text": "BRA loc_BB56" + }, + { + "address": 47872, + "address_hex": "H'BB00", + "present": true, + "targets_hex": [], + "text": "BSET.B #3, @H'FAA2" + }, + { + "address": 47880, + "address_hex": "H'BB08", + "present": true, + "targets_hex": [], + "text": "MOV:G.W @(-H'0790,R0), R0" + }, + { + "address": 47900, + "address_hex": "H'BB1C", + "present": true, + "targets_hex": [], + "text": "MOV:G.B R1, @H'F850" + }, + { + "address": 47904, + "address_hex": "H'BB20", + "present": true, + "targets_hex": [], + "text": "MOV:G.B R5, @H'F852" + }, + { + "address": 47915, + "address_hex": "H'BB2B", + "present": true, + "targets_hex": [], + "text": "MOV:G.B R5, @H'F851" + }, + { + "address": 47929, + "address_hex": "H'BB39", + "present": true, + "targets_hex": [], + "text": "MOV:G.B R4, @H'F854" + }, + { + "address": 47935, + "address_hex": "H'BB3F", + "present": true, + "targets_hex": [], + "text": "MOV:G.B R4, @H'F853" + }, + { + "address": 47939, + "address_hex": "H'BB43", + "present": true, + "targets_hex": [ + "H'BA26" + ], + "text": "BSR loc_BA26" + }, + { + "address": 47942, + "address_hex": "H'BB46", + "present": true, + "targets_hex": [], + "text": "MOV:G.W #H'01F4, @H'F9C6" + }, + { + "address": 47948, + "address_hex": "H'BB4C", + "present": true, + "targets_hex": [], + "text": "MOV:G.B #H'14, @H'F9C8" + }, + { + "address": 47953, + "address_hex": "H'BB51", + "present": true, + "targets_hex": [], + "text": "MOV:G.B #H'80, @H'FAA3" + } + ], + "present": true, + "queue_table_candidate": { + "addressing_text": "MOV:G.W @(-H'0790,R0), R0", + "base_address_hex": "H'F870", + "evidence_address_hex": "H'BB08", + "index_address_hex": "H'F9B5" + }, + "send_call_address_hex": "H'BB43", + "send_subroutine_hex": "H'BA26", + "staging_addresses_hex": [ + "H'F850", + "H'F851", + "H'F852", + "H'F853", + "H'F854" + ], + "summary": "F9B5 is compared against F9B0; inequality enters the send path, reads a queued word via the F9B5-derived index around F870, stages F850-F854, and calls BA26 at BB43.", + "title": "loc_BAF2 queue send gate" + }, + "resend_gate_path": { + "items": [ + { + "address": 48798, + "address_hex": "H'BE9E", + "present": true, + "targets_hex": [], + "text": "MOV:G.B @H'FAA5, R0" + }, + { + "address": 48805, + "address_hex": "H'BEA5", + "present": true, + "targets_hex": [], + "text": "AND.B @H'FAA3, R0" + }, + { + "address": 48809, + "address_hex": "H'BEA9", + "present": true, + "targets_hex": [], + "text": "MOV:G.B R0, @H'FAA3" + }, + { + "address": 48815, + "address_hex": "H'BEAF", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'FAA2" + }, + { + "address": 48821, + "address_hex": "H'BEB5", + "present": true, + "targets_hex": [], + "text": "TST.W @H'F9C6" + }, + { + "address": 48827, + "address_hex": "H'BEBB", + "present": true, + "targets_hex": [], + "text": "TST.B @H'F9C8" + }, + { + "address": 48837, + "address_hex": "H'BEC5", + "present": true, + "targets_hex": [], + "text": "MOV:G.W #H'01F4, @H'F9C6" + }, + { + "address": 48843, + "address_hex": "H'BECB", + "present": true, + "targets_hex": [], + "text": "BTST.B #7, @H'FAA3" + }, + { + "address": 48849, + "address_hex": "H'BED1", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'F9C3" + }, + { + "address": 48853, + "address_hex": "H'BED5", + "present": true, + "targets_hex": [ + "H'BA26" + ], + "text": "BSR loc_BA26" + } + ], + "present": true, + "resend_call_address_hex": "H'BED5", + "send_subroutine_hex": "H'BA26", + "summary": "BE9E masks FAA5 with FAA3, waits for F9C6/F9C8 timeout gates, then if FAA3.bit7 remains set clears F9C3 and calls BA26 from BED5.", + "title": "resend gate/path" + }, + "rx_session_maintenance": { + "items": [ + { + "address": 16367, + "address_hex": "H'3FEF", + "present": true, + "targets_hex": [], + "text": "TST.B @H'F9C5" + }, + { + "address": 16373, + "address_hex": "H'3FF5", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'F9B5" + }, + { + "address": 16377, + "address_hex": "H'3FF9", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'F9B0" + }, + { + "address": 16381, + "address_hex": "H'3FFD", + "present": true, + "targets_hex": [], + "text": "BCLR.B #7, @H'FAA5" + }, + { + "address": 16391, + "address_hex": "H'4007", + "present": true, + "targets_hex": [], + "text": "BSET.B #7, @H'FAA5" + }, + { + "address": 48075, + "address_hex": "H'BBCB", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'F9C3" + }, + { + "address": 48143, + "address_hex": "H'BC0F", + "present": true, + "targets_hex": [], + "text": "TST.B @H'FAA2" + }, + { + "address": 48149, + "address_hex": "H'BC15", + "present": true, + "targets_hex": [], + "text": "BSET.B #7, @H'FAA2" + }, + { + "address": 48179, + "address_hex": "H'BC33", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'FAA2" + }, + { + "address": 48220, + "address_hex": "H'BC5C", + "present": true, + "targets_hex": [], + "text": "BCLR.B #3, @H'FAA2" + }, + { + "address": 48227, + "address_hex": "H'BC63", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'FAA3" + }, + { + "address": 48336, + "address_hex": "H'BCD0", + "present": true, + "targets_hex": [], + "text": "BCLR.B #7, @H'FAA2" + }, + { + "address": 48381, + "address_hex": "H'BCFD", + "present": true, + "targets_hex": [], + "text": "BCLR.B #7, @H'FAA2" + }, + { + "address": 48388, + "address_hex": "H'BD04", + "present": true, + "targets_hex": [], + "text": "BCLR.B #7, @H'FAA2" + }, + { + "address": 48493, + "address_hex": "H'BD6D", + "present": true, + "targets_hex": [], + "text": "ADD:Q.B #1, @H'F9B5" + }, + { + "address": 48497, + "address_hex": "H'BD71", + "present": true, + "targets_hex": [], + "text": "BCLR.B #7, @H'F9B5" + }, + { + "address": 48501, + "address_hex": "H'BD75", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'FAA3" + }, + { + "address": 48505, + "address_hex": "H'BD79", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'FAA2" + }, + { + "address": 48584, + "address_hex": "H'BDC8", + "present": true, + "targets_hex": [], + "text": "ADD:Q.B #1, @H'F9B5" + }, + { + "address": 48588, + "address_hex": "H'BDCC", + "present": true, + "targets_hex": [], + "text": "BCLR.B #7, @H'F9B5" + }, + { + "address": 48592, + "address_hex": "H'BDD0", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'FAA3" + }, + { + "address": 48596, + "address_hex": "H'BDD4", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'FAA2" + }, + { + "address": 48627, + "address_hex": "H'BDF3", + "present": true, + "targets_hex": [], + "text": "ADD:Q.B #1, @H'F9B5" + }, + { + "address": 48631, + "address_hex": "H'BDF7", + "present": true, + "targets_hex": [], + "text": "BCLR.B #7, @H'F9B5" + }, + { + "address": 48635, + "address_hex": "H'BDFB", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'FAA3" + }, + { + "address": 48639, + "address_hex": "H'BDFF", + "present": true, + "targets_hex": [], + "text": "CLR.B @H'FAA2" + } + ], + "present": true, + "summary": "F9C5 timeout maintenance clears F9B5/F9B0 and FAA5.bit7; RX command processing uses FAA2 as an in-session latch and paths advance F9B5/F9B0 or clear FAA3/FAA2.", + "title": "RX/session maintenance" + }, + "scheduler_gate_loc_3FD3": { + "items": [ + { + "address": 16339, + "address_hex": "H'3FD3", + "present": true, + "targets_hex": [], + "text": "TST.B @H'FAA2" + }, + { + "address": 16343, + "address_hex": "H'3FD7", + "present": true, + "targets_hex": [ + "H'3FEE" + ], + "text": "BNE loc_3FEE" + }, + { + "address": 16345, + "address_hex": "H'3FD9", + "present": true, + "targets_hex": [], + "text": "BTST.B #7, @H'FAA5" + }, + { + "address": 16349, + "address_hex": "H'3FDD", + "present": true, + "targets_hex": [ + "H'3FE5" + ], + "text": "BEQ loc_3FE5" + }, + { + "address": 16351, + "address_hex": "H'3FDF", + "present": true, + "targets_hex": [], + "text": "TST.B @H'F9C3" + }, + { + "address": 16355, + "address_hex": "H'3FE3", + "present": true, + "targets_hex": [ + "H'3FEE" + ], + "text": "BNE loc_3FEE" + }, + { + "address": 16357, + "address_hex": "H'3FE5", + "present": true, + "targets_hex": [], + "text": "TST.B @H'F9C0" + }, + { + "address": 16361, + "address_hex": "H'3FE9", + "present": true, + "targets_hex": [ + "H'3FEE" + ], + "text": "BNE loc_3FEE" + }, + { + "address": 16363, + "address_hex": "H'3FEB", + "present": true, + "targets_hex": [ + "H'BAF2" + ], + "text": "BSR loc_BAF2" + } + ], + "present": true, + "required_addresses_hex": [ + "H'3FD3", + "H'3FD7", + "H'3FD9", + "H'3FDD", + "H'3FDF", + "H'3FE3", + "H'3FE5", + "H'3FE9", + "H'3FEB" + ], + "summary": "Requires FAA2 == 0, allows the FAA5.bit7 path only when F9C3 == 0, then requires F9C0 == 0 before BSR loc_BAF2.", + "title": "loc_3FD3 gate into loc_BAF2" + } + }, + "kind": "serial_gate", + "state_accesses": [ + { + "accesses": [ + { + "access": "read", + "address": 15968, + "address_hex": "H'3E60", + "function": "loc_3E54", + "text": "MOV:G.B @H'F9B0, R1" + }, + { + "access": "read_write", + "address": 15994, + "address_hex": "H'3E7A", + "function": "loc_3E54", + "text": "ADD:Q.B #1, @H'F9B0" + }, + { + "access": "read_write", + "address": 15998, + "address_hex": "H'3E7E", + "function": "loc_3E54", + "text": "BCLR.B #7, @H'F9B0" + }, + { + "access": "read", + "address": 16002, + "address_hex": "H'3E82", + "function": "loc_3E54", + "text": "MOV:G.B @H'F9B0, R0" + }, + { + "access": "write", + "address": 16377, + "address_hex": "H'3FF9", + "function": "loc_3FEF", + "text": "CLR.B @H'F9B0" + }, + { + "access": "read", + "address": 16473, + "address_hex": "H'4059", + "function": "loc_4046", + "text": "MOV:G.B @H'F9B0, R2" + }, + { + "access": "read_write", + "address": 16492, + "address_hex": "H'406C", + "function": "loc_4046", + "text": "ADD:Q.B #1, @H'F9B0" + }, + { + "access": "read_write", + "address": 16496, + "address_hex": "H'4070", + "function": "loc_4046", + "text": "BCLR.B #7, @H'F9B0" + }, + { + "access": "read", + "address": 47864, + "address_hex": "H'BAF8", + "function": "loc_BAF2", + "text": "CMP:G.B @H'F9B0, R1" + } + ], + "address": 63920, + "address_hex": "H'F9B0", + "read_count": 4, + "read_write_count": 4, + "sample_accesses": [ + { + "access": "read", + "address": 15968, + "address_hex": "H'3E60", + "function": "loc_3E54", + "text": "MOV:G.B @H'F9B0, R1" + }, + { + "access": "read_write", + "address": 15994, + "address_hex": "H'3E7A", + "function": "loc_3E54", + "text": "ADD:Q.B #1, @H'F9B0" + }, + { + "access": "read_write", + "address": 15998, + "address_hex": "H'3E7E", + "function": "loc_3E54", + "text": "BCLR.B #7, @H'F9B0" + }, + { + "access": "read", + "address": 16002, + "address_hex": "H'3E82", + "function": "loc_3E54", + "text": "MOV:G.B @H'F9B0, R0" + }, + { + "access": "write", + "address": 16377, + "address_hex": "H'3FF9", + "function": "loc_3FEF", + "text": "CLR.B @H'F9B0" + }, + { + "access": "read", + "address": 16473, + "address_hex": "H'4059", + "function": "loc_4046", + "text": "MOV:G.B @H'F9B0, R2" + } + ], + "write_count": 1 + }, + { + "accesses": [ + { + "access": "read", + "address": 10252, + "address_hex": "H'280C", + "function": "loc_2806", + "text": "CMP:G.B @H'F9B4, R1" + }, + { + "access": "read", + "address": 16038, + "address_hex": "H'3EA6", + "function": "loc_3E54", + "text": "MOV:G.B @H'F9B4, R1" + }, + { + "access": "read_write", + "address": 16067, + "address_hex": "H'3EC3", + "function": "loc_3E54", + "text": "ADD:Q.B #1, @H'F9B4" + }, + { + "access": "read_write", + "address": 16071, + "address_hex": "H'3EC7", + "function": "loc_3E54", + "text": "BCLR.B #5, @H'F9B4" + }, + { + "access": "read", + "address": 48760, + "address_hex": "H'BE78", + "function": "loc_BE70", + "text": "MOV:G.B @H'F9B4, R1" + }, + { + "access": "read_write", + "address": 48789, + "address_hex": "H'BE95", + "function": "loc_BE70", + "text": "ADD:Q.B #1, @H'F9B4" + }, + { + "access": "read_write", + "address": 48793, + "address_hex": "H'BE99", + "function": "loc_BE70", + "text": "BCLR.B #5, @H'F9B4" + } + ], + "address": 63924, + "address_hex": "H'F9B4", + "read_count": 3, + "read_write_count": 4, + "sample_accesses": [ + { + "access": "read", + "address": 10252, + "address_hex": "H'280C", + "function": "loc_2806", + "text": "CMP:G.B @H'F9B4, R1" + }, + { + "access": "read", + "address": 16038, + "address_hex": "H'3EA6", + "function": "loc_3E54", + "text": "MOV:G.B @H'F9B4, R1" + }, + { + "access": "read_write", + "address": 16067, + "address_hex": "H'3EC3", + "function": "loc_3E54", + "text": "ADD:Q.B #1, @H'F9B4" + }, + { + "access": "read_write", + "address": 16071, + "address_hex": "H'3EC7", + "function": "loc_3E54", + "text": "BCLR.B #5, @H'F9B4" + }, + { + "access": "read", + "address": 48760, + "address_hex": "H'BE78", + "function": "loc_BE70", + "text": "MOV:G.B @H'F9B4, R1" + }, + { + "access": "read_write", + "address": 48789, + "address_hex": "H'BE95", + "function": "loc_BE70", + "text": "ADD:Q.B #1, @H'F9B4" + } + ], + "write_count": 0 + }, + { + "accesses": [ + { + "access": "read", + "address": 15960, + "address_hex": "H'3E58", + "function": "loc_3E54", + "text": "MOV:G.B @H'F9B5, R0" + }, + { + "access": "read", + "address": 16011, + "address_hex": "H'3E8B", + "function": "loc_3E54", + "text": "CMP:G.B @H'F9B5, R0" + }, + { + "access": "write", + "address": 16373, + "address_hex": "H'3FF5", + "function": "loc_3FEF", + "text": "CLR.B @H'F9B5" + }, + { + "access": "read", + "address": 16479, + "address_hex": "H'405F", + "function": "loc_4046", + "text": "CMP:G.B @H'F9B5, R2" + }, + { + "access": "read", + "address": 47858, + "address_hex": "H'BAF2", + "function": "loc_BAF2", + "text": "MOV:G.B @H'F9B5, R1" + }, + { + "access": "read_write", + "address": 48493, + "address_hex": "H'BD6D", + "function": "loc_BBAB", + "text": "ADD:Q.B #1, @H'F9B5" + }, + { + "access": "read_write", + "address": 48497, + "address_hex": "H'BD71", + "function": "loc_BBAB", + "text": "BCLR.B #7, @H'F9B5" + }, + { + "access": "read_write", + "address": 48584, + "address_hex": "H'BDC8", + "function": "loc_BBAB", + "text": "ADD:Q.B #1, @H'F9B5" + }, + { + "access": "read_write", + "address": 48588, + "address_hex": "H'BDCC", + "function": "loc_BBAB", + "text": "BCLR.B #7, @H'F9B5" + }, + { + "access": "read_write", + "address": 48627, + "address_hex": "H'BDF3", + "function": "loc_BBAB", + "text": "ADD:Q.B #1, @H'F9B5" + }, + { + "access": "read_write", + "address": 48631, + "address_hex": "H'BDF7", + "function": "loc_BBAB", + "text": "BCLR.B #7, @H'F9B5" + } + ], + "address": 63925, + "address_hex": "H'F9B5", + "read_count": 4, + "read_write_count": 6, + "sample_accesses": [ + { + "access": "read", + "address": 15960, + "address_hex": "H'3E58", + "function": "loc_3E54", + "text": "MOV:G.B @H'F9B5, R0" + }, + { + "access": "read", + "address": 16011, + "address_hex": "H'3E8B", + "function": "loc_3E54", + "text": "CMP:G.B @H'F9B5, R0" + }, + { + "access": "write", + "address": 16373, + "address_hex": "H'3FF5", + "function": "loc_3FEF", + "text": "CLR.B @H'F9B5" + }, + { + "access": "read", + "address": 16479, + "address_hex": "H'405F", + "function": "loc_4046", + "text": "CMP:G.B @H'F9B5, R2" + }, + { + "access": "read", + "address": 47858, + "address_hex": "H'BAF2", + "function": "loc_BAF2", + "text": "MOV:G.B @H'F9B5, R1" + }, + { + "access": "read_write", + "address": 48493, + "address_hex": "H'BD6D", + "function": "loc_BBAB", + "text": "ADD:Q.B #1, @H'F9B5" + } + ], + "write_count": 1 + }, + { + "accesses": [ + { + "access": "read", + "address": 10246, + "address_hex": "H'2806", + "function": "loc_2806", + "text": "MOV:G.B @H'F9B9, R1" + }, + { + "access": "write", + "address": 10274, + "address_hex": "H'2822", + "function": "loc_2806", + "text": "MOV:G.B R1, @H'F9B9" + }, + { + "access": "read", + "address": 16030, + "address_hex": "H'3E9E", + "function": "loc_3E54", + "text": "MOV:G.B @H'F9B9, R0" + }, + { + "access": "read", + "address": 48752, + "address_hex": "H'BE70", + "function": "loc_BE70", + "text": "MOV:G.B @H'F9B9, R3" + } + ], + "address": 63929, + "address_hex": "H'F9B9", + "read_count": 3, + "read_write_count": 0, + "sample_accesses": [ + { + "access": "read", + "address": 10246, + "address_hex": "H'2806", + "function": "loc_2806", + "text": "MOV:G.B @H'F9B9, R1" + }, + { + "access": "write", + "address": 10274, + "address_hex": "H'2822", + "function": "loc_2806", + "text": "MOV:G.B R1, @H'F9B9" + }, + { + "access": "read", + "address": 16030, + "address_hex": "H'3E9E", + "function": "loc_3E54", + "text": "MOV:G.B @H'F9B9, R0" + }, + { + "access": "read", + "address": 48752, + "address_hex": "H'BE70", + "function": "loc_BE70", + "text": "MOV:G.B @H'F9B9, R3" + } + ], + "write_count": 1 + }, + { + "accesses": [ + { + "access": "read", + "address": 16357, + "address_hex": "H'3FE5", + "function": "loc_3FD3", + "text": "TST.B @H'F9C0" + }, + { + "access": "read", + "address": 47654, + "address_hex": "H'BA26", + "function": "loc_BA26", + "text": "TST.B @H'F9C0" + }, + { + "access": "write", + "address": 47660, + "address_hex": "H'BA2C", + "function": "loc_BA26", + "text": "MOV:G.B #H'64, @H'F9C0" + }, + { + "access": "write", + "address": 47778, + "address_hex": "H'BAA2", + "function": "vec_sci1_txi_BA84", + "text": "MOV:G.B #H'1F, @H'F9C0" + }, + { + "access": "write", + "address": 47834, + "address_hex": "H'BADA", + "function": "vec_sci1_txi_BA84", + "text": "MOV:G.B #H'09, @H'F9C0" + }, + { + "access": "write", + "address": 47841, + "address_hex": "H'BAE1", + "function": "vec_sci1_txi_BA84", + "text": "MOV:G.B #H'09, @H'F9C0" + }, + { + "access": "write", + "address": 47848, + "address_hex": "H'BAE8", + "function": "vec_sci1_txi_BA84", + "text": "MOV:G.B #H'F0, @H'F9C0" + }, + { + "access": "write", + "address": 48669, + "address_hex": "H'BE1D", + "function": "loc_BBAB", + "text": "MOV:G.B #H'1F, @H'F9C0" + }, + { + "access": "write", + "address": 48702, + "address_hex": "H'BE3E", + "function": "loc_BBAB", + "text": "MOV:G.B #H'1F, @H'F9C0" + }, + { + "access": "read", + "address": 48878, + "address_hex": "H'BEEE", + "function": "vec_frt1_ocia_BEEA", + "text": "TST.B @H'F9C0" + }, + { + "access": "read_write", + "address": 48884, + "address_hex": "H'BEF4", + "function": "vec_frt1_ocia_BEEA", + "text": "ADD:Q.B #-1, @H'F9C0" + } + ], + "address": 63936, + "address_hex": "H'F9C0", + "read_count": 3, + "read_write_count": 1, + "sample_accesses": [ + { + "access": "read", + "address": 16357, + "address_hex": "H'3FE5", + "function": "loc_3FD3", + "text": "TST.B @H'F9C0" + }, + { + "access": "read", + "address": 47654, + "address_hex": "H'BA26", + "function": "loc_BA26", + "text": "TST.B @H'F9C0" + }, + { + "access": "write", + "address": 47660, + "address_hex": "H'BA2C", + "function": "loc_BA26", + "text": "MOV:G.B #H'64, @H'F9C0" + }, + { + "access": "write", + "address": 47778, + "address_hex": "H'BAA2", + "function": "vec_sci1_txi_BA84", + "text": "MOV:G.B #H'1F, @H'F9C0" + }, + { + "access": "write", + "address": 47834, + "address_hex": "H'BADA", + "function": "vec_sci1_txi_BA84", + "text": "MOV:G.B #H'09, @H'F9C0" + }, + { + "access": "write", + "address": 47841, + "address_hex": "H'BAE1", + "function": "vec_sci1_txi_BA84", + "text": "MOV:G.B #H'09, @H'F9C0" + } + ], + "write_count": 7 + }, + { + "accesses": [ + { + "access": "read", + "address": 16351, + "address_hex": "H'3FDF", + "function": "loc_3FD3", + "text": "TST.B @H'F9C3" + }, + { + "access": "read", + "address": 16466, + "address_hex": "H'4052", + "function": "loc_4046", + "text": "TST.B @H'F9C3" + }, + { + "access": "read", + "address": 47760, + "address_hex": "H'BA90", + "function": "vec_sci1_txi_BA84", + "text": "TST.B @H'F9C3" + }, + { + "access": "write", + "address": 47991, + "address_hex": "H'BB77", + "function": "vec_sci1_rxi_BB67", + "text": "CLR.B @H'F9C3" + }, + { + "access": "read", + "address": 47997, + "address_hex": "H'BB7D", + "function": "vec_sci1_rxi_BB67", + "text": "CMP:G.B #H'05, @H'F9C3" + }, + { + "access": "read", + "address": 48010, + "address_hex": "H'BB8A", + "function": "vec_sci1_rxi_BB67", + "text": "MOV:G.B @H'F9C3, R1" + }, + { + "access": "write", + "address": 48022, + "address_hex": "H'BB96", + "function": "vec_sci1_rxi_BB67", + "text": "MOV:G.B R1, @H'F9C3" + }, + { + "access": "read", + "address": 48043, + "address_hex": "H'BBAB", + "function": "loc_BBAB", + "text": "CMP:G.B #H'06, @H'F9C3" + }, + { + "access": "write", + "address": 48075, + "address_hex": "H'BBCB", + "function": "loc_BBAB", + "text": "CLR.B @H'F9C3" + }, + { + "access": "write", + "address": 48849, + "address_hex": "H'BED1", + "function": "loc_BE9E", + "text": "CLR.B @H'F9C3" + } + ], + "address": 63939, + "address_hex": "H'F9C3", + "read_count": 6, + "read_write_count": 0, + "sample_accesses": [ + { + "access": "read", + "address": 16351, + "address_hex": "H'3FDF", + "function": "loc_3FD3", + "text": "TST.B @H'F9C3" + }, + { + "access": "read", + "address": 16466, + "address_hex": "H'4052", + "function": "loc_4046", + "text": "TST.B @H'F9C3" + }, + { + "access": "read", + "address": 47760, + "address_hex": "H'BA90", + "function": "vec_sci1_txi_BA84", + "text": "TST.B @H'F9C3" + }, + { + "access": "write", + "address": 47991, + "address_hex": "H'BB77", + "function": "vec_sci1_rxi_BB67", + "text": "CLR.B @H'F9C3" + }, + { + "access": "read", + "address": 47997, + "address_hex": "H'BB7D", + "function": "vec_sci1_rxi_BB67", + "text": "CMP:G.B #H'05, @H'F9C3" + }, + { + "access": "read", + "address": 48010, + "address_hex": "H'BB8A", + "function": "vec_sci1_rxi_BB67", + "text": "MOV:G.B @H'F9C3, R1" + } + ], + "write_count": 4 + }, + { + "accesses": [ + { + "access": "read", + "address": 16367, + "address_hex": "H'3FEF", + "function": "loc_3FEF", + "text": "TST.B @H'F9C5" + }, + { + "access": "write", + "address": 48030, + "address_hex": "H'BB9E", + "function": "vec_sci1_rxi_BB67", + "text": "MOV:G.B #H'14, @H'F9C5" + }, + { + "access": "write", + "address": 48868, + "address_hex": "H'BEE4", + "function": "loc_BE9E", + "text": "CLR.B @H'F9C5" + }, + { + "access": "read", + "address": 48945, + "address_hex": "H'BF31", + "function": "vec_frt2_ocia_BF23", + "text": "TST.B @H'F9C5" + }, + { + "access": "read_write", + "address": 48951, + "address_hex": "H'BF37", + "function": "vec_frt2_ocia_BF23", + "text": "ADD:Q.B #-1, @H'F9C5" + } + ], + "address": 63941, + "address_hex": "H'F9C5", + "read_count": 2, + "read_write_count": 1, + "sample_accesses": [ + { + "access": "read", + "address": 16367, + "address_hex": "H'3FEF", + "function": "loc_3FEF", + "text": "TST.B @H'F9C5" + }, + { + "access": "write", + "address": 48030, + "address_hex": "H'BB9E", + "function": "vec_sci1_rxi_BB67", + "text": "MOV:G.B #H'14, @H'F9C5" + }, + { + "access": "write", + "address": 48868, + "address_hex": "H'BEE4", + "function": "loc_BE9E", + "text": "CLR.B @H'F9C5" + }, + { + "access": "read", + "address": 48945, + "address_hex": "H'BF31", + "function": "vec_frt2_ocia_BF23", + "text": "TST.B @H'F9C5" + }, + { + "access": "read_write", + "address": 48951, + "address_hex": "H'BF37", + "function": "vec_frt2_ocia_BF23", + "text": "ADD:Q.B #-1, @H'F9C5" + } + ], + "write_count": 2 + }, + { + "accesses": [ + { + "access": "write", + "address": 47942, + "address_hex": "H'BB46", + "function": "loc_BAF2", + "text": "MOV:G.W #H'01F4, @H'F9C6" + }, + { + "access": "read", + "address": 48821, + "address_hex": "H'BEB5", + "function": "loc_BE9E", + "text": "TST.W @H'F9C6" + }, + { + "access": "write", + "address": 48837, + "address_hex": "H'BEC5", + "function": "loc_BE9E", + "text": "MOV:G.W #H'01F4, @H'F9C6" + }, + { + "access": "read", + "address": 48898, + "address_hex": "H'BF02", + "function": "vec_frt1_ocia_BEEA", + "text": "TST.W @H'F9C6" + }, + { + "access": "read_write", + "address": 48904, + "address_hex": "H'BF08", + "function": "vec_frt1_ocia_BEEA", + "text": "ADD:Q.W #-1, @H'F9C6" + } + ], + "address": 63942, + "address_hex": "H'F9C6", + "read_count": 2, + "read_write_count": 1, + "sample_accesses": [ + { + "access": "write", + "address": 47942, + "address_hex": "H'BB46", + "function": "loc_BAF2", + "text": "MOV:G.W #H'01F4, @H'F9C6" + }, + { + "access": "read", + "address": 48821, + "address_hex": "H'BEB5", + "function": "loc_BE9E", + "text": "TST.W @H'F9C6" + }, + { + "access": "write", + "address": 48837, + "address_hex": "H'BEC5", + "function": "loc_BE9E", + "text": "MOV:G.W #H'01F4, @H'F9C6" + }, + { + "access": "read", + "address": 48898, + "address_hex": "H'BF02", + "function": "vec_frt1_ocia_BEEA", + "text": "TST.W @H'F9C6" + }, + { + "access": "read_write", + "address": 48904, + "address_hex": "H'BF08", + "function": "vec_frt1_ocia_BEEA", + "text": "ADD:Q.W #-1, @H'F9C6" + } + ], + "write_count": 2 + }, + { + "accesses": [ + { + "access": "write", + "address": 47948, + "address_hex": "H'BB4C", + "function": "loc_BAF2", + "text": "MOV:G.B #H'14, @H'F9C8" + }, + { + "access": "read", + "address": 48827, + "address_hex": "H'BEBB", + "function": "loc_BE9E", + "text": "TST.B @H'F9C8" + }, + { + "access": "read_write", + "address": 48833, + "address_hex": "H'BEC1", + "function": "loc_BE9E", + "text": "ADD:Q.B #-1, @H'F9C8" + } + ], + "address": 63944, + "address_hex": "H'F9C8", + "read_count": 1, + "read_write_count": 1, + "sample_accesses": [ + { + "access": "write", + "address": 47948, + "address_hex": "H'BB4C", + "function": "loc_BAF2", + "text": "MOV:G.B #H'14, @H'F9C8" + }, + { + "access": "read", + "address": 48827, + "address_hex": "H'BEBB", + "function": "loc_BE9E", + "text": "TST.B @H'F9C8" + }, + { + "access": "read_write", + "address": 48833, + "address_hex": "H'BEC1", + "function": "loc_BE9E", + "text": "ADD:Q.B #-1, @H'F9C8" + } + ], + "write_count": 1 + }, + { + "accesses": [ + { + "access": "read", + "address": 16339, + "address_hex": "H'3FD3", + "function": "loc_3FD3", + "text": "TST.B @H'FAA2" + }, + { + "access": "read", + "address": 47748, + "address_hex": "H'BA84", + "function": "vec_sci1_txi_BA84", + "text": "BTST.B #3, @H'FAA2" + }, + { + "access": "read_write", + "address": 47766, + "address_hex": "H'BA96", + "function": "vec_sci1_txi_BA84", + "text": "BCLR.B #3, @H'FAA2" + }, + { + "access": "read_write", + "address": 47872, + "address_hex": "H'BB00", + "function": "loc_BAF2", + "text": "BSET.B #3, @H'FAA2" + }, + { + "access": "read", + "address": 48143, + "address_hex": "H'BC0F", + "function": "loc_BBAB", + "text": "TST.B @H'FAA2" + }, + { + "access": "read_write", + "address": 48149, + "address_hex": "H'BC15", + "function": "loc_BBAB", + "text": "BSET.B #7, @H'FAA2" + }, + { + "access": "write", + "address": 48179, + "address_hex": "H'BC33", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA2" + }, + { + "access": "read_write", + "address": 48220, + "address_hex": "H'BC5C", + "function": "loc_BBAB", + "text": "BCLR.B #3, @H'FAA2" + }, + { + "access": "read_write", + "address": 48336, + "address_hex": "H'BCD0", + "function": "loc_BBAB", + "text": "BCLR.B #7, @H'FAA2" + }, + { + "access": "read_write", + "address": 48381, + "address_hex": "H'BCFD", + "function": "loc_BBAB", + "text": "BCLR.B #7, @H'FAA2" + }, + { + "access": "read_write", + "address": 48388, + "address_hex": "H'BD04", + "function": "loc_BBAB", + "text": "BCLR.B #7, @H'FAA2" + }, + { + "access": "read", + "address": 48487, + "address_hex": "H'BD67", + "function": "loc_BBAB", + "text": "BTST.B #3, @H'FAA2" + }, + { + "access": "write", + "address": 48505, + "address_hex": "H'BD79", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA2" + }, + { + "access": "read", + "address": 48578, + "address_hex": "H'BDC2", + "function": "loc_BBAB", + "text": "BTST.B #3, @H'FAA2" + }, + { + "access": "write", + "address": 48596, + "address_hex": "H'BDD4", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA2" + }, + { + "access": "read", + "address": 48621, + "address_hex": "H'BDED", + "function": "loc_BBAB", + "text": "BTST.B #3, @H'FAA2" + }, + { + "access": "write", + "address": 48639, + "address_hex": "H'BDFF", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA2" + }, + { + "access": "write", + "address": 48711, + "address_hex": "H'BE47", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA2" + }, + { + "access": "write", + "address": 48815, + "address_hex": "H'BEAF", + "function": "loc_BE9E", + "text": "CLR.B @H'FAA2" + } + ], + "address": 64162, + "address_hex": "H'FAA2", + "read_count": 6, + "read_write_count": 7, + "sample_accesses": [ + { + "access": "read", + "address": 16339, + "address_hex": "H'3FD3", + "function": "loc_3FD3", + "text": "TST.B @H'FAA2" + }, + { + "access": "read", + "address": 47748, + "address_hex": "H'BA84", + "function": "vec_sci1_txi_BA84", + "text": "BTST.B #3, @H'FAA2" + }, + { + "access": "read_write", + "address": 47766, + "address_hex": "H'BA96", + "function": "vec_sci1_txi_BA84", + "text": "BCLR.B #3, @H'FAA2" + }, + { + "access": "read_write", + "address": 47872, + "address_hex": "H'BB00", + "function": "loc_BAF2", + "text": "BSET.B #3, @H'FAA2" + }, + { + "access": "read", + "address": 48143, + "address_hex": "H'BC0F", + "function": "loc_BBAB", + "text": "TST.B @H'FAA2" + }, + { + "access": "read_write", + "address": 48149, + "address_hex": "H'BC15", + "function": "loc_BBAB", + "text": "BSET.B #7, @H'FAA2" + } + ], + "write_count": 6 + }, + { + "accesses": [ + { + "access": "write", + "address": 47770, + "address_hex": "H'BA9A", + "function": "vec_sci1_txi_BA84", + "text": "CLR.B @H'FAA3" + }, + { + "access": "write", + "address": 47953, + "address_hex": "H'BB51", + "function": "loc_BAF2", + "text": "MOV:G.B #H'80, @H'FAA3" + }, + { + "access": "write", + "address": 48227, + "address_hex": "H'BC63", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA3" + }, + { + "access": "write", + "address": 48501, + "address_hex": "H'BD75", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA3" + }, + { + "access": "write", + "address": 48592, + "address_hex": "H'BDD0", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA3" + }, + { + "access": "write", + "address": 48635, + "address_hex": "H'BDFB", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA3" + }, + { + "access": "write", + "address": 48707, + "address_hex": "H'BE43", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA3" + }, + { + "access": "read", + "address": 48805, + "address_hex": "H'BEA5", + "function": "loc_BE9E", + "text": "AND.B @H'FAA3, R0" + }, + { + "access": "write", + "address": 48809, + "address_hex": "H'BEA9", + "function": "loc_BE9E", + "text": "MOV:G.B R0, @H'FAA3" + }, + { + "access": "read", + "address": 48843, + "address_hex": "H'BECB", + "function": "loc_BE9E", + "text": "BTST.B #7, @H'FAA3" + } + ], + "address": 64163, + "address_hex": "H'FAA3", + "read_count": 2, + "read_write_count": 0, + "sample_accesses": [ + { + "access": "write", + "address": 47770, + "address_hex": "H'BA9A", + "function": "vec_sci1_txi_BA84", + "text": "CLR.B @H'FAA3" + }, + { + "access": "write", + "address": 47953, + "address_hex": "H'BB51", + "function": "loc_BAF2", + "text": "MOV:G.B #H'80, @H'FAA3" + }, + { + "access": "write", + "address": 48227, + "address_hex": "H'BC63", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA3" + }, + { + "access": "write", + "address": 48501, + "address_hex": "H'BD75", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA3" + }, + { + "access": "write", + "address": 48592, + "address_hex": "H'BDD0", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA3" + }, + { + "access": "write", + "address": 48635, + "address_hex": "H'BDFB", + "function": "loc_BBAB", + "text": "CLR.B @H'FAA3" + } + ], + "write_count": 8 + }, + { + "accesses": [ + { + "access": "read", + "address": 16345, + "address_hex": "H'3FD9", + "function": "loc_3FD3", + "text": "BTST.B #7, @H'FAA5" + }, + { + "access": "read_write", + "address": 16381, + "address_hex": "H'3FFD", + "function": "loc_3FEF", + "text": "BCLR.B #7, @H'FAA5" + }, + { + "access": "read_write", + "address": 16391, + "address_hex": "H'4007", + "function": "loc_3FEF", + "text": "BSET.B #7, @H'FAA5" + }, + { + "access": "read", + "address": 16460, + "address_hex": "H'404C", + "function": "loc_4046", + "text": "BTST.B #7, @H'FAA5" + }, + { + "access": "read", + "address": 47754, + "address_hex": "H'BA8A", + "function": "vec_sci1_txi_BA84", + "text": "BTST.B #7, @H'FAA5" + }, + { + "access": "read", + "address": 48685, + "address_hex": "H'BE2D", + "function": "loc_BBAB", + "text": "BTST.B #7, @H'FAA5" + }, + { + "access": "read", + "address": 48798, + "address_hex": "H'BE9E", + "function": "loc_BE9E", + "text": "MOV:G.B @H'FAA5, R0" + } + ], + "address": 64165, + "address_hex": "H'FAA5", + "read_count": 5, + "read_write_count": 2, + "sample_accesses": [ + { + "access": "read", + "address": 16345, + "address_hex": "H'3FD9", + "function": "loc_3FD3", + "text": "BTST.B #7, @H'FAA5" + }, + { + "access": "read_write", + "address": 16381, + "address_hex": "H'3FFD", + "function": "loc_3FEF", + "text": "BCLR.B #7, @H'FAA5" + }, + { + "access": "read_write", + "address": 16391, + "address_hex": "H'4007", + "function": "loc_3FEF", + "text": "BSET.B #7, @H'FAA5" + }, + { + "access": "read", + "address": 16460, + "address_hex": "H'404C", + "function": "loc_4046", + "text": "BTST.B #7, @H'FAA5" + }, + { + "access": "read", + "address": 47754, + "address_hex": "H'BA8A", + "function": "vec_sci1_txi_BA84", + "text": "BTST.B #7, @H'FAA5" + }, + { + "access": "read", + "address": 48685, + "address_hex": "H'BE2D", + "function": "loc_BBAB", + "text": "BTST.B #7, @H'FAA5" + } + ], + "write_count": 0 + } + ], + "state_addresses": [ + { + "address": 63920, + "address_hex": "H'F9B0", + "symbol": "ram_F9B0" + }, + { + "address": 63924, + "address_hex": "H'F9B4", + "symbol": "ram_F9B4" + }, + { + "address": 63925, + "address_hex": "H'F9B5", + "symbol": "ram_F9B5" + }, + { + "address": 63929, + "address_hex": "H'F9B9", + "symbol": "ram_F9B9" + }, + { + "address": 63936, + "address_hex": "H'F9C0", + "symbol": "ram_F9C0" + }, + { + "address": 63939, + "address_hex": "H'F9C3", + "symbol": "ram_F9C3" + }, + { + "address": 63941, + "address_hex": "H'F9C5", + "symbol": "ram_F9C5" + }, + { + "address": 63942, + "address_hex": "H'F9C6", + "symbol": "ram_F9C6" + }, + { + "address": 63944, + "address_hex": "H'F9C8", + "symbol": "ram_F9C8" + }, + { + "address": 64162, + "address_hex": "H'FAA2", + "symbol": "ram_FAA2" + }, + { + "address": 64163, + "address_hex": "H'FAA3", + "symbol": "ram_FAA3" + }, + { + "address": 64165, + "address_hex": "H'FAA5", + "symbol": "ram_FAA5" + } + ], + "summary": { + "basis": "address-driven static evidence from decompiler JSON", + "confidence": "high", + "state_machine_candidate": "autonomous serial TX/report queue gate" + } +} diff --git a/build/rom_serial_gate.txt b/build/rom_serial_gate.txt new file mode 100644 index 0000000..3e38a8e --- /dev/null +++ b/build/rom_serial_gate.txt @@ -0,0 +1,105 @@ +H8/536 Serial Gate/Queue State-Machine Reconstruction + +Summary: autonomous serial TX/report queue gate +Confidence: high + +Evidence: +- loc_3FD3 gate into loc_BAF2: present + Requires FAA2 == 0, allows the FAA5.bit7 path only when F9C3 == 0, then requires F9C0 == 0 before BSR loc_BAF2. + - H'3FD3: TST.B @H'FAA2 + - H'3FD7: BNE loc_3FEE + - H'3FD9: BTST.B #7, @H'FAA5 + - H'3FDD: BEQ loc_3FE5 + - H'3FDF: TST.B @H'F9C3 + - H'3FE3: BNE loc_3FEE + - H'3FE5: TST.B @H'F9C0 + - H'3FE9: BNE loc_3FEE + - H'3FEB: BSR loc_BAF2 +- loc_BAF2 queue send gate: present + F9B5 is compared against F9B0; inequality enters the send path, reads a queued word via the F9B5-derived index around F870, stages F850-F854, and calls BA26 at BB43. + - H'BAF2: MOV:G.B @H'F9B5, R1 + - H'BAF8: CMP:G.B @H'F9B0, R1 + - H'BAFC: BNE loc_BB00 + - H'BAFE: BRA loc_BB56 + - H'BB00: BSET.B #3, @H'FAA2 + - H'BB08: MOV:G.W @(-H'0790,R0), R0 + - H'BB1C: MOV:G.B R1, @H'F850 + - H'BB20: MOV:G.B R5, @H'F852 + - H'BB2B: MOV:G.B R5, @H'F851 + - H'BB39: MOV:G.B R4, @H'F854 + - H'BB3F: MOV:G.B R4, @H'F853 + - H'BB43: BSR loc_BA26 + - H'BB46: MOV:G.W #H'01F4, @H'F9C6 + - H'BB4C: MOV:G.B #H'14, @H'F9C8 + - H'BB51: MOV:G.B #H'80, @H'FAA3 +- resend gate/path: present + BE9E masks FAA5 with FAA3, waits for F9C6/F9C8 timeout gates, then if FAA3.bit7 remains set clears F9C3 and calls BA26 from BED5. + - H'BE9E: MOV:G.B @H'FAA5, R0 + - H'BEA5: AND.B @H'FAA3, R0 + - H'BEA9: MOV:G.B R0, @H'FAA3 + - H'BEAF: CLR.B @H'FAA2 + - H'BEB5: TST.W @H'F9C6 + - H'BEBB: TST.B @H'F9C8 + - H'BEC5: MOV:G.W #H'01F4, @H'F9C6 + - H'BECB: BTST.B #7, @H'FAA3 + - H'BED1: CLR.B @H'F9C3 + - H'BED5: BSR loc_BA26 +- RX/session maintenance: present + F9C5 timeout maintenance clears F9B5/F9B0 and FAA5.bit7; RX command processing uses FAA2 as an in-session latch and paths advance F9B5/F9B0 or clear FAA3/FAA2. + - H'3FEF: TST.B @H'F9C5 + - H'3FF5: CLR.B @H'F9B5 + - H'3FF9: CLR.B @H'F9B0 + - H'3FFD: BCLR.B #7, @H'FAA5 + - H'4007: BSET.B #7, @H'FAA5 + - H'BBCB: CLR.B @H'F9C3 + - H'BC0F: TST.B @H'FAA2 + - H'BC15: BSET.B #7, @H'FAA2 + - H'BC33: CLR.B @H'FAA2 + - H'BC5C: BCLR.B #3, @H'FAA2 + - H'BC63: CLR.B @H'FAA3 + - H'BCD0: BCLR.B #7, @H'FAA2 + - H'BCFD: BCLR.B #7, @H'FAA2 + - H'BD04: BCLR.B #7, @H'FAA2 + - H'BD6D: ADD:Q.B #1, @H'F9B5 + - H'BD71: BCLR.B #7, @H'F9B5 + - H'BD75: CLR.B @H'FAA3 + - H'BD79: CLR.B @H'FAA2 + - H'BDC8: ADD:Q.B #1, @H'F9B5 + - H'BDCC: BCLR.B #7, @H'F9B5 + - H'BDD0: CLR.B @H'FAA3 + - H'BDD4: CLR.B @H'FAA2 + - H'BDF3: ADD:Q.B #1, @H'F9B5 + - H'BDF7: BCLR.B #7, @H'F9B5 + - H'BDFB: CLR.B @H'FAA3 + - H'BDFF: CLR.B @H'FAA2 + +State address readers/writers: +- H'F9B0: reads=4 writes=1 read/write=4 + H'3E60 read MOV:G.B @H'F9B0, R1; H'3E7A read_write ADD:Q.B #1, @H'F9B0; H'3E7E read_write BCLR.B #7, @H'F9B0; H'3E82 read MOV:G.B @H'F9B0, R0; H'3FF9 write CLR.B @H'F9B0; H'4059 read MOV:G.B @H'F9B0, R2 +- H'F9B4: reads=3 writes=0 read/write=4 + H'280C read CMP:G.B @H'F9B4, R1; H'3EA6 read MOV:G.B @H'F9B4, R1; H'3EC3 read_write ADD:Q.B #1, @H'F9B4; H'3EC7 read_write BCLR.B #5, @H'F9B4; H'BE78 read MOV:G.B @H'F9B4, R1; H'BE95 read_write ADD:Q.B #1, @H'F9B4 +- H'F9B5: reads=4 writes=1 read/write=6 + H'3E58 read MOV:G.B @H'F9B5, R0; H'3E8B read CMP:G.B @H'F9B5, R0; H'3FF5 write CLR.B @H'F9B5; H'405F read CMP:G.B @H'F9B5, R2; H'BAF2 read MOV:G.B @H'F9B5, R1; H'BD6D read_write ADD:Q.B #1, @H'F9B5 +- H'F9B9: reads=3 writes=1 read/write=0 + H'2806 read MOV:G.B @H'F9B9, R1; H'2822 write MOV:G.B R1, @H'F9B9; H'3E9E read MOV:G.B @H'F9B9, R0; H'BE70 read MOV:G.B @H'F9B9, R3 +- H'F9C0: reads=3 writes=7 read/write=1 + H'3FE5 read TST.B @H'F9C0; H'BA26 read TST.B @H'F9C0; H'BA2C write MOV:G.B #H'64, @H'F9C0; H'BAA2 write MOV:G.B #H'1F, @H'F9C0; H'BADA write MOV:G.B #H'09, @H'F9C0; H'BAE1 write MOV:G.B #H'09, @H'F9C0 +- H'F9C3: reads=6 writes=4 read/write=0 + H'3FDF read TST.B @H'F9C3; H'4052 read TST.B @H'F9C3; H'BA90 read TST.B @H'F9C3; H'BB77 write CLR.B @H'F9C3; H'BB7D read CMP:G.B #H'05, @H'F9C3; H'BB8A read MOV:G.B @H'F9C3, R1 +- H'F9C5: reads=2 writes=2 read/write=1 + H'3FEF read TST.B @H'F9C5; H'BB9E write MOV:G.B #H'14, @H'F9C5; H'BEE4 write CLR.B @H'F9C5; H'BF31 read TST.B @H'F9C5; H'BF37 read_write ADD:Q.B #-1, @H'F9C5 +- H'F9C6: reads=2 writes=2 read/write=1 + H'BB46 write MOV:G.W #H'01F4, @H'F9C6; H'BEB5 read TST.W @H'F9C6; H'BEC5 write MOV:G.W #H'01F4, @H'F9C6; H'BF02 read TST.W @H'F9C6; H'BF08 read_write ADD:Q.W #-1, @H'F9C6 +- H'F9C8: reads=1 writes=1 read/write=1 + H'BB4C write MOV:G.B #H'14, @H'F9C8; H'BEBB read TST.B @H'F9C8; H'BEC1 read_write ADD:Q.B #-1, @H'F9C8 +- H'FAA2: reads=6 writes=6 read/write=7 + H'3FD3 read TST.B @H'FAA2; H'BA84 read BTST.B #3, @H'FAA2; H'BA96 read_write BCLR.B #3, @H'FAA2; H'BB00 read_write BSET.B #3, @H'FAA2; H'BC0F read TST.B @H'FAA2; H'BC15 read_write BSET.B #7, @H'FAA2 +- H'FAA3: reads=2 writes=8 read/write=0 + H'BA9A write CLR.B @H'FAA3; H'BB51 write MOV:G.B #H'80, @H'FAA3; H'BC63 write CLR.B @H'FAA3; H'BD75 write CLR.B @H'FAA3; H'BDD0 write CLR.B @H'FAA3; H'BDFB write CLR.B @H'FAA3 +- H'FAA5: reads=5 writes=0 read/write=2 + H'3FD9 read BTST.B #7, @H'FAA5; H'3FFD read_write BCLR.B #7, @H'FAA5; H'4007 read_write BSET.B #7, @H'FAA5; H'404C read BTST.B #7, @H'FAA5; H'BA8A read BTST.B #7, @H'FAA5; H'BE2D read BTST.B #7, @H'FAA5 + +Caveats: +- Observed report indexes 0x0007 and 0x0015 are capture overlays/runtime queue entries; this analyzer does not treat them as statically proven ROM constants. +- Queue entries near F870 are reached through RAM-indexed addressing; static JSON proves the access pattern, not the runtime queue contents. +- Branch predicates are summarized from local instruction order and targets; this is not an emulator trace. diff --git a/build/rom_serial_pseudocode.c b/build/rom_serial_pseudocode.c index 7ee574a..2754b1e 100644 --- a/build/rom_serial_pseudocode.c +++ b/build/rom_serial_pseudocode.c @@ -174,16 +174,36 @@ extern volatile u8 MEM8[0x10000]; * evidence: H'BE70 * - serial_tx_busy_timer_candidate H'F9C0: reads 2, writes 8 * evidence: H'BA26, H'BA2C, H'BAA2, H'BADA, H'BAE1, H'BAE8, H'BE1D, H'BE3E, H'BEEE, H'BEF4 - * - serial_session_flags_candidate H'FAA2: reads 5, writes 13; bits 3, 7 - * evidence: H'BA84, H'BA96, H'BB00, H'BC0F, H'BC15, H'BC33, H'BC5C, H'BCD0, H'BCFD, H'BD04, H'BD67, H'BD79, H'BDC2, H'BDD4, H'BDED, H'BDFF, H'BE47, H'BEAF - * - serial_pending_mask_candidate H'FAA3: reads 1, writes 9; bits 7 - * evidence: H'BA9A, H'BB51, H'BC63, H'BD75, H'BDD0, H'BDFB, H'BE43, H'BEA5, H'BEA9, H'BECB - * - ... 3 more state-variable candidates + * - autonomous_report_period_timer_candidate H'F9C6: reads 1, writes 2 + * evidence: H'BB46, H'BEB5, H'BEC5 + * - autonomous_report_resend_countdown_candidate H'F9C8: reads 1, writes 2 + * evidence: H'BB4C, H'BEBB, H'BEC1 + * - ... 5 more state-variable candidates * retry/error model candidate: * - checksum path: 0x5A-seeded XOR over RX[0..4] differs from RX[5] -> loc_BE29 * - retry path: counter H'FAA6, threshold 2; Candidate retry path clears/consults serial flags, increments FAA6, compares it with 2, and when still below the apparent limit stages a command 0x07 response. * - command 0x07 path: Candidate retransmit/explicit command 0x07 path either copies previous TX frame bytes back to F850-F854 or stages an observed 0x07 response before loc_BA26. * - evidence: H'BBD8, H'BBDC, H'BBE0, H'BBE4, H'BBE8, H'BBEC, H'BBF0, H'BE4D, H'BE56, H'BE5E, H'BE66, H'BE52, H'BE5A, H'BE62, H'BE6A, H'BE29, H'BE2D, H'BE33, H'BE37, H'BE43, H'BE47, H'BE05, H'BE0D, H'BE15, H'BE09, H'BE11, H'BE19, H'BE22 + * gate/queue state machine candidate: + * - main_loop_may_enter_report_builder: FAA2 == 0 && F9C0 == 0 && ((FAA5.bit7 == 0) || (F9C3 == 0)); Main-loop report gate; session must be idle, TX busy timer clear, and RX gate open. + * - queue_has_pending_report: F9B5 != F9B0; Queue/pending cursor gate; non-empty state stages through BB43 before loc_BA26. + * - periodic_resend_may_fire: (FAA5 & FAA3 & 0x80) != 0 && F9C6 == 0 && F9C8 != 0 after countdown; Resend gate masks pending state with FAA5, checks F9C6/F9C8, then calls BA26 at BED5. + * - rx_completion_sets_session_timer: RX completion sets F9C5 (observed reload H'14) after the sixth byte is captured. + * - session_timeout_clears_gate_and_queue: When F9C5 is clear, loc_3FEF clears F9B5/F9B0 and clears FAA5.bit7; when nonzero, it sets FAA5.bit7. + * - host_ack_can_advance_queue: Commands 0x05/0x06 are modeled as acknowledgement paths that can clear pending state or advance F9B5.; commands H'05, H'06 + * - caveat: Many panel controls may require host/session traffic before reporting. Observed autonomous call/camera-power indexes are runtime/capture overlays, not ROM constants. + * - evidence: H'3FD3, H'3FD7, H'3FD9, H'3FDD, H'3FDF, H'3FE3, H'3FE5, H'3FE9, H'3FEB, H'3FEF, H'3FF3, H'3FF5, H'3FF9, H'3FFD, H'4001, H'4003, H'4005, H'4007, H'BAF2, H'BAF6, H'BAF8, H'BAFC, H'BAFE, H'BB00, H'BB04, H'BB06, H'BB08, H'BB0C, H'BB0E, H'BB11, H'BB13, H'BB15, H'BB17, H'BB19, H'BB1C, H'BB20, H'BB24, H'BB26, H'BB29, H'BB2B, H'BB2F, H'BB33, H'BB35, H'BB39, H'BB3D, H'BB3F, H'BB43, H'BE9E, H'BEA2, H'BEA5, H'BEA9, H'BEAD, H'BEAF, H'BEB3, H'BEB5, H'BEB9, H'BEBB, H'BEBF, H'BEC1, H'BEC5, H'BECB, H'BECF, H'BED1, H'BED5 + * TX/autonomous report model candidate: + * - loc_BB43 -> loc_BA26: bytes 0..2 encode candidate logical index/report id; bytes 3..4 come from current_value_table_candidate; byte5 is 0x5A XOR checksum + * - observed overlay candidates: heartbeat_or_idle_report_candidate: 00 00 00 00 80 DA; call_button_report_candidate: 00 00 15 80 00 CF, 00 00 15 00 00 4F; camera_power_report_candidate: 00 00 07 80 00 DD + * - caveat: Real captures supplied so far show only heartbeat/idle, call, and camera-power autonomous TX frames. Other panel controls may require a host/device request or state transition before the firmware reports them. + * - evidence: H'BB1C, H'BB20, H'BB2B, H'BB39, H'BB3F, H'BB43 + * heartbeat/periodic resend candidate: + * - F9C6 reload H'01F4: Candidate periodic report/heartbeat timer reload. + * - F9C8 reload H'14: Candidate periodic resend countdown/retry spacing value. + * - FAA3 mask H'80: Candidate bit/mask that marks an autonomous report pending. + * - BED5 resend path: Candidate periodic resend path feeding the TX staging/send-builder flow. + * - evidence: H'BB46, H'BEC5, H'BB4C, H'BB51, H'BECB, H'BED5 */ static u8 sci1_rx_candidate_command(void) @@ -213,6 +233,29 @@ static u16 sci1_rx_candidate_logical_index(void) return 0x01FFu; } +static bool sci1_candidate_main_report_gate_open(void) +{ + bool session_idle = MEM8[0xFAA2u] == 0u; + bool rx_gate_open = (MEM8[0xFAA5u] & 0x80u) == 0u || MEM8[0xF9C3u] == 0u; + bool tx_timer_clear = MEM8[0xF9C0u] == 0u; + + return session_idle && rx_gate_open && tx_timer_clear; +} + +static bool sci1_candidate_report_queue_nonempty(void) +{ + return MEM8[0xF9B5u] != MEM8[0xF9B0u]; +} + +static bool sci1_candidate_periodic_resend_gate_open(void) +{ + bool pending = (MEM8[0xFAA5u] & MEM8[0xFAA3u] & 0x80u) != 0u; + bool period_elapsed = MEM8[0xF9C6u] == 0u && MEM8[0xF9C7u] == 0u; + bool resend_countdown_active = MEM8[0xF9C8u] != 0u; + + return pending && period_elapsed && resend_countdown_active; +} + void sci1_process_candidate_protocol_command(void) { u8 command = sci1_rx_candidate_command(); diff --git a/build/rom_table_xrefs.json b/build/rom_table_xrefs.json new file mode 100644 index 0000000..7a2ec02 --- /dev/null +++ b/build/rom_table_xrefs.json @@ -0,0 +1,2991 @@ +{ + "kind": "table_xrefs", + "tables": [ + { + "name": "primary_value_table_candidate", + "logical_base_address": 57344, + "logical_base_address_hex": "H'E000", + "logical_range_end": 58367, + "logical_range_end_hex": "H'E3FF", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "element_candidate": "word_value", + "direct_addresses": [ + 63744 + ], + "direct_addresses_hex": [ + "H'F900" + ], + "direct_range_end": 63775, + "direct_range_end_hex": "H'F91F", + "access_count": 31, + "read_count": 21, + "write_count": 10, + "read_write_candidate_count": 0, + "dynamic_index_count": 11, + "static_offsets": [ + 0, + 4, + 6, + 70, + 128, + 258, + 292, + 294, + 334, + 366, + 370, + 492, + 544 + ], + "static_offsets_hex": [ + "H'0000", + "H'0004", + "H'0006", + "H'0046", + "H'0080", + "H'0102", + "H'0124", + "H'0126", + "H'014E", + "H'016E", + "H'0172", + "H'01EC", + "H'0220" + ], + "functions": [ + { + "start": 48043, + "start_hex": "H'BBAB", + "label": "loc_BBAB", + "access_count": 5, + "reads": 1, + "writes": 4 + }, + { + "start": 9808, + "start_hex": "H'2650", + "label": "loc_2650", + "access_count": 3, + "reads": 3, + "writes": 0 + }, + { + "start": 16534, + "start_hex": "H'4096", + "label": "loc_4096", + "access_count": 3, + "reads": 0, + "writes": 3 + }, + { + "start": 6037, + "start_hex": "H'1795", + "label": "loc_1795", + "access_count": 2, + "reads": 2, + "writes": 0 + }, + { + "start": 6619, + "start_hex": "H'19DB", + "label": "loc_19DB", + "access_count": 2, + "reads": 2, + "writes": 0 + }, + { + "start": 6709, + "start_hex": "H'1A35", + "label": "loc_1A35", + "access_count": 2, + "reads": 2, + "writes": 0 + }, + { + "start": 18682, + "start_hex": "H'48FA", + "label": "loc_48FA", + "access_count": 2, + "reads": 2, + "writes": 0 + }, + { + "start": 15769, + "start_hex": "H'3D99", + "label": "vec_ad_adi_3D99", + "access_count": 2, + "reads": 2, + "writes": 0 + }, + { + "start": null, + "start_hex": null, + "label": "", + "access_count": 1, + "reads": 0, + "writes": 1 + }, + { + "start": 5893, + "start_hex": "H'1705", + "label": "loc_1705", + "access_count": 1, + "reads": 1, + "writes": 0 + }, + { + "start": 5965, + "start_hex": "H'174D", + "label": "loc_174D", + "access_count": 1, + "reads": 1, + "writes": 0 + }, + { + "start": 6089, + "start_hex": "H'17C9", + "label": "loc_17C9", + "access_count": 1, + "reads": 1, + "writes": 0 + }, + { + "start": 6139, + "start_hex": "H'17FB", + "label": "loc_17FB", + "access_count": 1, + "reads": 1, + "writes": 0 + }, + { + "start": 6189, + "start_hex": "H'182D", + "label": "loc_182D", + "access_count": 1, + "reads": 1, + "writes": 0 + }, + { + "start": 6289, + "start_hex": "H'1891", + "label": "loc_1891", + "access_count": 1, + "reads": 1, + "writes": 0 + }, + { + "start": 6375, + "start_hex": "H'18E7", + "label": "loc_18E7", + "access_count": 1, + "reads": 1, + "writes": 0 + }, + { + "start": 16396, + "start_hex": "H'400C", + "label": "loc_400C", + "access_count": 1, + "reads": 0, + "writes": 1 + }, + { + "start": 16501, + "start_hex": "H'4075", + "label": "loc_4075", + "access_count": 1, + "reads": 0, + "writes": 1 + } + ], + "accesses": [ + { + "instruction_address": 5900, + "instruction_address_hex": "H'170C", + "mnemonic": "BTST.W", + "operands": "#15, @H'E14E", + "instruction": "BTST.W #15, @H'E14E", + "references": [ + 57678 + ], + "references_hex": [ + "H'E14E" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 5893, + "function_start_hex": "H'1705", + "function_label": "loc_1705", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57678, + "direct_address_hex": "H'E14E", + "logical_address": 57678, + "logical_address_hex": "H'E14E", + "index": 334, + "offset": 334, + "offset_hex": "H'014E", + "access": "read" + }, + { + "instruction_address": 5978, + "instruction_address_hex": "H'175A", + "mnemonic": "BTST.W", + "operands": "#13, @H'E16E", + "instruction": "BTST.W #13, @H'E16E", + "references": [ + 57710 + ], + "references_hex": [ + "H'E16E" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 5965, + "function_start_hex": "H'174D", + "function_label": "loc_174D", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57710, + "direct_address_hex": "H'E16E", + "logical_address": 57710, + "logical_address_hex": "H'E16E", + "index": 366, + "offset": 366, + "offset_hex": "H'016E", + "access": "read" + }, + { + "instruction_address": 6044, + "instruction_address_hex": "H'179C", + "mnemonic": "BTST.W", + "operands": "#13, @H'E172", + "instruction": "BTST.W #13, @H'E172", + "references": [ + 57714 + ], + "references_hex": [ + "H'E172" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 6037, + "function_start_hex": "H'1795", + "function_label": "loc_1795", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57714, + "direct_address_hex": "H'E172", + "logical_address": 57714, + "logical_address_hex": "H'E172", + "index": 370, + "offset": 370, + "offset_hex": "H'0172", + "access": "read" + }, + { + "instruction_address": 6055, + "instruction_address_hex": "H'17A7", + "mnemonic": "BTST.W", + "operands": "#15, @H'E220", + "instruction": "BTST.W #15, @H'E220", + "references": [ + 57888 + ], + "references_hex": [ + "H'E220" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 6037, + "function_start_hex": "H'1795", + "function_label": "loc_1795", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57888, + "direct_address_hex": "H'E220", + "logical_address": 57888, + "logical_address_hex": "H'E220", + "index": 544, + "offset": 544, + "offset_hex": "H'0220", + "access": "read" + }, + { + "instruction_address": 6096, + "instruction_address_hex": "H'17D0", + "mnemonic": "BTST.W", + "operands": "#12, @H'E126", + "instruction": "BTST.W #12, @H'E126", + "references": [ + 57638 + ], + "references_hex": [ + "H'E126" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 6089, + "function_start_hex": "H'17C9", + "function_label": "loc_17C9", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57638, + "direct_address_hex": "H'E126", + "logical_address": 57638, + "logical_address_hex": "H'E126", + "index": 294, + "offset": 294, + "offset_hex": "H'0126", + "access": "read" + }, + { + "instruction_address": 6146, + "instruction_address_hex": "H'1802", + "mnemonic": "BTST.W", + "operands": "#12, @H'E126", + "instruction": "BTST.W #12, @H'E126", + "references": [ + 57638 + ], + "references_hex": [ + "H'E126" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 6139, + "function_start_hex": "H'17FB", + "function_label": "loc_17FB", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57638, + "direct_address_hex": "H'E126", + "logical_address": 57638, + "logical_address_hex": "H'E126", + "index": 294, + "offset": 294, + "offset_hex": "H'0126", + "access": "read" + }, + { + "instruction_address": 6202, + "instruction_address_hex": "H'183A", + "mnemonic": "BTST.W", + "operands": "#5, @H'E126", + "instruction": "BTST.W #5, @H'E126", + "references": [ + 57638 + ], + "references_hex": [ + "H'E126" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 6189, + "function_start_hex": "H'182D", + "function_label": "loc_182D", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57638, + "direct_address_hex": "H'E126", + "logical_address": 57638, + "logical_address_hex": "H'E126", + "index": 294, + "offset": 294, + "offset_hex": "H'0126", + "access": "read" + }, + { + "instruction_address": 6302, + "instruction_address_hex": "H'189E", + "mnemonic": "BTST.W", + "operands": "#5, @H'E126", + "instruction": "BTST.W #5, @H'E126", + "references": [ + 57638 + ], + "references_hex": [ + "H'E126" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 6289, + "function_start_hex": "H'1891", + "function_label": "loc_1891", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57638, + "direct_address_hex": "H'E126", + "logical_address": 57638, + "logical_address_hex": "H'E126", + "index": 294, + "offset": 294, + "offset_hex": "H'0126", + "access": "read" + }, + { + "instruction_address": 6388, + "instruction_address_hex": "H'18F4", + "mnemonic": "BTST.W", + "operands": "#5, @H'E126", + "instruction": "BTST.W #5, @H'E126", + "references": [ + 57638 + ], + "references_hex": [ + "H'E126" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 6375, + "function_start_hex": "H'18E7", + "function_label": "loc_18E7", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57638, + "direct_address_hex": "H'E126", + "logical_address": 57638, + "logical_address_hex": "H'E126", + "index": 294, + "offset": 294, + "offset_hex": "H'0126", + "access": "read" + }, + { + "instruction_address": 6627, + "instruction_address_hex": "H'19E3", + "mnemonic": "MOV:G.W", + "operands": "@(-H'2000,R3), R0", + "instruction": "MOV:G.W @(-H'2000,R3), R0", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 6619, + "function_start_hex": "H'19DB", + "function_label": "loc_19DB", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'2000,R3)", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 6659, + "instruction_address_hex": "H'1A03", + "mnemonic": "CMP:G.W", + "operands": "@(-H'2000,R3), R1", + "instruction": "CMP:G.W @(-H'2000,R3), R1", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 6619, + "function_start_hex": "H'19DB", + "function_label": "loc_19DB", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'2000,R3)", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 6717, + "instruction_address_hex": "H'1A3D", + "mnemonic": "MOV:G.W", + "operands": "@(-H'2000,R3), R0", + "instruction": "MOV:G.W @(-H'2000,R3), R0", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 6709, + "function_start_hex": "H'1A35", + "function_label": "loc_1A35", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'2000,R3)", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 6763, + "instruction_address_hex": "H'1A6B", + "mnemonic": "CMP:G.W", + "operands": "@(-H'2000,R3), R0", + "instruction": "CMP:G.W @(-H'2000,R3), R0", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 6709, + "function_start_hex": "H'1A35", + "function_label": "loc_1A35", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'2000,R3)", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 9815, + "instruction_address_hex": "H'2657", + "mnemonic": "MOV:G.W", + "operands": "@H'E124, R0", + "instruction": "MOV:G.W @H'E124, R0", + "references": [ + 57636 + ], + "references_hex": [ + "H'E124" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 9808, + "function_start_hex": "H'2650", + "function_label": "loc_2650", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57636, + "direct_address_hex": "H'E124", + "logical_address": 57636, + "logical_address_hex": "H'E124", + "index": 292, + "offset": 292, + "offset_hex": "H'0124", + "access": "read" + }, + { + "instruction_address": 9839, + "instruction_address_hex": "H'266F", + "mnemonic": "BTST.W", + "operands": "#13, @H'E004", + "instruction": "BTST.W #13, @H'E004", + "references": [ + 57348 + ], + "references_hex": [ + "H'E004" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 9808, + "function_start_hex": "H'2650", + "function_label": "loc_2650", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57348, + "direct_address_hex": "H'E004", + "logical_address": 57348, + "logical_address_hex": "H'E004", + "index": 4, + "offset": 4, + "offset_hex": "H'0004", + "access": "read" + }, + { + "instruction_address": 9867, + "instruction_address_hex": "H'268B", + "mnemonic": "CMP:G.W", + "operands": "@H'E124, R0", + "instruction": "CMP:G.W @H'E124, R0", + "references": [ + 57636 + ], + "references_hex": [ + "H'E124" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 9808, + "function_start_hex": "H'2650", + "function_label": "loc_2650", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57636, + "direct_address_hex": "H'E124", + "logical_address": 57636, + "logical_address_hex": "H'E124", + "index": 292, + "offset": 292, + "offset_hex": "H'0124", + "access": "read" + }, + { + "instruction_address": 15834, + "instruction_address_hex": "H'3DDA", + "mnemonic": "MOV:G.W", + "operands": "@H'E102, R0", + "instruction": "MOV:G.W @H'E102, R0", + "references": [ + 57602 + ], + "references_hex": [ + "H'E102" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 15769, + "function_start_hex": "H'3D99", + "function_label": "vec_ad_adi_3D99", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57602, + "direct_address_hex": "H'E102", + "logical_address": 57602, + "logical_address_hex": "H'E102", + "index": 258, + "offset": 258, + "offset_hex": "H'0102", + "access": "read" + }, + { + "instruction_address": 15866, + "instruction_address_hex": "H'3DFA", + "mnemonic": "CMP:G.W", + "operands": "@H'E102, R1", + "instruction": "CMP:G.W @H'E102, R1", + "references": [ + 57602 + ], + "references_hex": [ + "H'E102" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 15769, + "function_start_hex": "H'3D99", + "function_label": "vec_ad_adi_3D99", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57602, + "direct_address_hex": "H'E102", + "logical_address": 57602, + "logical_address_hex": "H'E102", + "index": 258, + "offset": 258, + "offset_hex": "H'0102", + "access": "read" + }, + { + "instruction_address": 16268, + "instruction_address_hex": "H'3F8C", + "mnemonic": "CLR.W", + "operands": "@(-H'2000,R0)", + "instruction": "CLR.W @(-H'2000,R0)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'2000,R0)", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "index_register": "R0", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 16428, + "instruction_address_hex": "H'402C", + "mnemonic": "CLR.W", + "operands": "@H'E046", + "instruction": "CLR.W @H'E046", + "references": [ + 57414 + ], + "references_hex": [ + "H'E046" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 16396, + "function_start_hex": "H'400C", + "function_label": "loc_400C", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57414, + "direct_address_hex": "H'E046", + "logical_address": 57414, + "logical_address_hex": "H'E046", + "index": 70, + "offset": 70, + "offset_hex": "H'0046", + "access": "write" + }, + { + "instruction_address": 16503, + "instruction_address_hex": "H'4077", + "mnemonic": "CLR.W", + "operands": "@(-H'2000,R0)", + "instruction": "CLR.W @(-H'2000,R0)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 16501, + "function_start_hex": "H'4075", + "function_label": "loc_4075", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'2000,R0)", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "index_register": "R0", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 16534, + "instruction_address_hex": "H'4096", + "mnemonic": "MOV:G.W", + "operands": "#H'0080, @H'E000", + "instruction": "MOV:G.W #H'0080, @H'E000", + "references": [ + 57344 + ], + "references_hex": [ + "H'E000" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 16534, + "function_start_hex": "H'4096", + "function_label": "loc_4096", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57344, + "direct_address_hex": "H'E000", + "logical_address": 57344, + "logical_address_hex": "H'E000", + "index": 0, + "offset": 0, + "offset_hex": "H'0000", + "access": "write" + }, + { + "instruction_address": 16540, + "instruction_address_hex": "H'409C", + "mnemonic": "MOV:G.W", + "operands": "#H'8000, @H'E006", + "instruction": "MOV:G.W #H'8000, @H'E006", + "references": [ + 57350 + ], + "references_hex": [ + "H'E006" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 16534, + "function_start_hex": "H'4096", + "function_label": "loc_4096", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57350, + "direct_address_hex": "H'E006", + "logical_address": 57350, + "logical_address_hex": "H'E006", + "index": 6, + "offset": 6, + "offset_hex": "H'0006", + "access": "write" + }, + { + "instruction_address": 16546, + "instruction_address_hex": "H'40A2", + "mnemonic": "MOV:G.W", + "operands": "#H'FFFF, @H'E080", + "instruction": "MOV:G.W #H'FFFF, @H'E080", + "references": [ + 57472 + ], + "references_hex": [ + "H'E080" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 16534, + "function_start_hex": "H'4096", + "function_label": "loc_4096", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57472, + "direct_address_hex": "H'E080", + "logical_address": 57472, + "logical_address_hex": "H'E080", + "index": 128, + "offset": 128, + "offset_hex": "H'0080", + "access": "write" + }, + { + "instruction_address": 18703, + "instruction_address_hex": "H'490F", + "mnemonic": "BTST.W", + "operands": "#13, @H'E1EC", + "instruction": "BTST.W #13, @H'E1EC", + "references": [ + 57836 + ], + "references_hex": [ + "H'E1EC" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 18682, + "function_start_hex": "H'48FA", + "function_label": "loc_48FA", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57836, + "direct_address_hex": "H'E1EC", + "logical_address": 57836, + "logical_address_hex": "H'E1EC", + "index": 492, + "offset": 492, + "offset_hex": "H'01EC", + "access": "read" + }, + { + "instruction_address": 18709, + "instruction_address_hex": "H'4915", + "mnemonic": "MOV:G.W", + "operands": "@H'E1EC, R0", + "instruction": "MOV:G.W @H'E1EC, R0", + "references": [ + 57836 + ], + "references_hex": [ + "H'E1EC" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 18682, + "function_start_hex": "H'48FA", + "function_label": "loc_48FA", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "direct_logical_address_access", + "direct_address": 57836, + "direct_address_hex": "H'E1EC", + "logical_address": 57836, + "logical_address_hex": "H'E1EC", + "index": 492, + "offset": 492, + "offset_hex": "H'01EC", + "access": "read" + }, + { + "instruction_address": 48245, + "instruction_address_hex": "H'BC75", + "mnemonic": "MOV:G.W", + "operands": "R0, @(-H'2000,R4)", + "instruction": "MOV:G.W R0, @(-H'2000,R4)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'2000,R4)", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "index_register": "R4", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 48277, + "instruction_address_hex": "H'BC95", + "mnemonic": "MOV:G.W", + "operands": "R0, @(-H'2000,R4)", + "instruction": "MOV:G.W R0, @(-H'2000,R4)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'2000,R4)", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "index_register": "R4", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 48364, + "instruction_address_hex": "H'BCEC", + "mnemonic": "MOV:G.W", + "operands": "@(-H'2000,R4), R0", + "instruction": "MOV:G.W @(-H'2000,R4), R0", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'2000,R4)", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "index_register": "R4", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 48410, + "instruction_address_hex": "H'BD1A", + "mnemonic": "MOV:G.W", + "operands": "R0, @(-H'2000,R4)", + "instruction": "MOV:G.W R0, @(-H'2000,R4)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'2000,R4)", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "index_register": "R4", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 48437, + "instruction_address_hex": "H'BD35", + "mnemonic": "MOV:G.W", + "operands": "R0, @(-H'2000,R4)", + "instruction": "MOV:G.W R0, @(-H'2000,R4)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "primary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "primary_value_table_candidate", + "table_base_address": 57344, + "table_base_address_hex": "H'E000", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'2000,R4)", + "negative_offset": 8192, + "negative_offset_hex": "H'2000", + "index_register": "R4", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + } + ] + }, + { + "name": "secondary_value_table_candidate", + "logical_base_address": 58368, + "logical_base_address_hex": "H'E400", + "logical_range_end": 59391, + "logical_range_end_hex": "H'E7FF", + "negative_offset": 7168, + "negative_offset_hex": "H'1C00", + "element_candidate": "word_value", + "direct_addresses": [ + 63808 + ], + "direct_addresses_hex": [ + "H'F940" + ], + "direct_range_end": 63839, + "direct_range_end_hex": "H'F95F", + "access_count": 8, + "read_count": 6, + "write_count": 2, + "read_write_candidate_count": 0, + "dynamic_index_count": 8, + "static_offsets": [], + "static_offsets_hex": [], + "functions": [ + { + "start": 6709, + "start_hex": "H'1A35", + "label": "loc_1A35", + "access_count": 2, + "reads": 2, + "writes": 0 + }, + { + "start": 6812, + "start_hex": "H'1A9C", + "label": "loc_1A9C", + "access_count": 2, + "reads": 2, + "writes": 0 + }, + { + "start": null, + "start_hex": null, + "label": "", + "access_count": 1, + "reads": 1, + "writes": 0 + }, + { + "start": 6562, + "start_hex": "H'19A2", + "label": "loc_19A2", + "access_count": 1, + "reads": 1, + "writes": 0 + }, + { + "start": 16501, + "start_hex": "H'4075", + "label": "loc_4075", + "access_count": 1, + "reads": 0, + "writes": 1 + }, + { + "start": 48043, + "start_hex": "H'BBAB", + "label": "loc_BBAB", + "access_count": 1, + "reads": 0, + "writes": 1 + } + ], + "accesses": [ + { + "instruction_address": 6570, + "instruction_address_hex": "H'19AA", + "mnemonic": "MOV:G.W", + "operands": "@(-H'1C00,R3), R0", + "instruction": "MOV:G.W @(-H'1C00,R3), R0", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 6562, + "function_start_hex": "H'19A2", + "function_label": "loc_19A2", + "table": "secondary_value_table_candidate", + "table_base_address": 58368, + "table_base_address_hex": "H'E400", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1C00,R3)", + "negative_offset": 7168, + "negative_offset_hex": "H'1C00", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 6731, + "instruction_address_hex": "H'1A4B", + "mnemonic": "MOV:G.W", + "operands": "@(-H'1C00,R3), R1", + "instruction": "MOV:G.W @(-H'1C00,R3), R1", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 6709, + "function_start_hex": "H'1A35", + "function_label": "loc_1A35", + "table": "secondary_value_table_candidate", + "table_base_address": 58368, + "table_base_address_hex": "H'E400", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1C00,R3)", + "negative_offset": 7168, + "negative_offset_hex": "H'1C00", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 6747, + "instruction_address_hex": "H'1A5B", + "mnemonic": "MOV:G.W", + "operands": "@(-H'1C00,R3), R1", + "instruction": "MOV:G.W @(-H'1C00,R3), R1", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 6709, + "function_start_hex": "H'1A35", + "function_label": "loc_1A35", + "table": "secondary_value_table_candidate", + "table_base_address": 58368, + "table_base_address_hex": "H'E400", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1C00,R3)", + "negative_offset": 7168, + "negative_offset_hex": "H'1C00", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 6785, + "instruction_address_hex": "H'1A81", + "mnemonic": "AND.W", + "operands": "@(-H'1C00,R3), R1", + "instruction": "AND.W @(-H'1C00,R3), R1", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "table": "secondary_value_table_candidate", + "table_base_address": 58368, + "table_base_address_hex": "H'E400", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1C00,R3)", + "negative_offset": 7168, + "negative_offset_hex": "H'1C00", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 6836, + "instruction_address_hex": "H'1AB4", + "mnemonic": "BTST.W", + "operands": "R0, @(-H'1C00,R3)", + "instruction": "BTST.W R0, @(-H'1C00,R3)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 6812, + "function_start_hex": "H'1A9C", + "function_label": "loc_1A9C", + "table": "secondary_value_table_candidate", + "table_base_address": 58368, + "table_base_address_hex": "H'E400", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1C00,R3)", + "negative_offset": 7168, + "negative_offset_hex": "H'1C00", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 6849, + "instruction_address_hex": "H'1AC1", + "mnemonic": "BTST.W", + "operands": "R0, @(-H'1C00,R3)", + "instruction": "BTST.W R0, @(-H'1C00,R3)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 6812, + "function_start_hex": "H'1A9C", + "function_label": "loc_1A9C", + "table": "secondary_value_table_candidate", + "table_base_address": 58368, + "table_base_address_hex": "H'E400", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1C00,R3)", + "negative_offset": 7168, + "negative_offset_hex": "H'1C00", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 16507, + "instruction_address_hex": "H'407B", + "mnemonic": "CLR.W", + "operands": "@(-H'1C00,R0)", + "instruction": "CLR.W @(-H'1C00,R0)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 16501, + "function_start_hex": "H'4075", + "function_label": "loc_4075", + "table": "secondary_value_table_candidate", + "table_base_address": 58368, + "table_base_address_hex": "H'E400", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1C00,R0)", + "negative_offset": 7168, + "negative_offset_hex": "H'1C00", + "index_register": "R0", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 48613, + "instruction_address_hex": "H'BDE5", + "mnemonic": "MOV:G.W", + "operands": "R0, @(-H'1C00,R4)", + "instruction": "MOV:G.W R0, @(-H'1C00,R4)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "secondary_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "secondary_value_table_candidate", + "table_base_address": 58368, + "table_base_address_hex": "H'E400", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1C00,R4)", + "negative_offset": 7168, + "negative_offset_hex": "H'1C00", + "index_register": "R4", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + } + ] + }, + { + "name": "current_value_table_candidate", + "logical_base_address": 59392, + "logical_base_address_hex": "H'E800", + "logical_range_end": 60415, + "logical_range_end_hex": "H'EBFF", + "negative_offset": 6144, + "negative_offset_hex": "H'1800", + "element_candidate": "word_value", + "direct_addresses": [ + 63776 + ], + "direct_addresses_hex": [ + "H'F920" + ], + "direct_range_end": 63807, + "direct_range_end_hex": "H'F93F", + "access_count": 14, + "read_count": 1, + "write_count": 13, + "read_write_candidate_count": 0, + "dynamic_index_count": 8, + "static_offsets": [ + 0, + 6, + 128, + 258, + 292, + 492 + ], + "static_offsets_hex": [ + "H'0000", + "H'0006", + "H'0080", + "H'0102", + "H'0124", + "H'01EC" + ], + "functions": [ + { + "start": 16534, + "start_hex": "H'4096", + "label": "loc_4096", + "access_count": 3, + "reads": 0, + "writes": 3 + }, + { + "start": 48043, + "start_hex": "H'BBAB", + "label": "loc_BBAB", + "access_count": 3, + "reads": 0, + "writes": 3 + }, + { + "start": null, + "start_hex": null, + "label": "", + "access_count": 1, + "reads": 0, + "writes": 1 + }, + { + "start": 5600, + "start_hex": "H'15E0", + "label": "loc_15E0", + "access_count": 1, + "reads": 0, + "writes": 1 + }, + { + "start": 6619, + "start_hex": "H'19DB", + "label": "loc_19DB", + "access_count": 1, + "reads": 0, + "writes": 1 + }, + { + "start": 6709, + "start_hex": "H'1A35", + "label": "loc_1A35", + "access_count": 1, + "reads": 0, + "writes": 1 + }, + { + "start": 9808, + "start_hex": "H'2650", + "label": "loc_2650", + "access_count": 1, + "reads": 0, + "writes": 1 + }, + { + "start": 16501, + "start_hex": "H'4075", + "label": "loc_4075", + "access_count": 1, + "reads": 0, + "writes": 1 + }, + { + "start": 18682, + "start_hex": "H'48FA", + "label": "loc_48FA", + "access_count": 1, + "reads": 0, + "writes": 1 + }, + { + "start": 47858, + "start_hex": "H'BAF2", + "label": "loc_BAF2", + "access_count": 1, + "reads": 1, + "writes": 0 + } + ], + "accesses": [ + { + "instruction_address": 5613, + "instruction_address_hex": "H'15ED", + "mnemonic": "MOV:G.W", + "operands": "R1, @H'E902", + "instruction": "MOV:G.W R1, @H'E902", + "references": [ + 59650 + ], + "references_hex": [ + "H'E902" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 5600, + "function_start_hex": "H'15E0", + "function_label": "loc_15E0", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "direct_logical_address_access", + "direct_address": 59650, + "direct_address_hex": "H'E902", + "logical_address": 59650, + "logical_address_hex": "H'E902", + "index": 258, + "offset": 258, + "offset_hex": "H'0102", + "access": "write" + }, + { + "instruction_address": 6665, + "instruction_address_hex": "H'1A09", + "mnemonic": "MOV:G.W", + "operands": "R1, @(-H'1800,R3)", + "instruction": "MOV:G.W R1, @(-H'1800,R3)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 6619, + "function_start_hex": "H'19DB", + "function_label": "loc_19DB", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1800,R3)", + "negative_offset": 6144, + "negative_offset_hex": "H'1800", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 6769, + "instruction_address_hex": "H'1A71", + "mnemonic": "MOV:G.W", + "operands": "R0, @(-H'1800,R3)", + "instruction": "MOV:G.W R0, @(-H'1800,R3)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 6709, + "function_start_hex": "H'1A35", + "function_label": "loc_1A35", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1800,R3)", + "negative_offset": 6144, + "negative_offset_hex": "H'1800", + "index_register": "R3", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 9873, + "instruction_address_hex": "H'2691", + "mnemonic": "MOV:G.W", + "operands": "R0, @H'E924", + "instruction": "MOV:G.W R0, @H'E924", + "references": [ + 59684 + ], + "references_hex": [ + "H'E924" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 9808, + "function_start_hex": "H'2650", + "function_label": "loc_2650", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "direct_logical_address_access", + "direct_address": 59684, + "direct_address_hex": "H'E924", + "logical_address": 59684, + "logical_address_hex": "H'E924", + "index": 292, + "offset": 292, + "offset_hex": "H'0124", + "access": "write" + }, + { + "instruction_address": 16272, + "instruction_address_hex": "H'3F90", + "mnemonic": "CLR.W", + "operands": "@(-H'1800,R0)", + "instruction": "CLR.W @(-H'1800,R0)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1800,R0)", + "negative_offset": 6144, + "negative_offset_hex": "H'1800", + "index_register": "R0", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 16511, + "instruction_address_hex": "H'407F", + "mnemonic": "CLR.W", + "operands": "@(-H'1800,R0)", + "instruction": "CLR.W @(-H'1800,R0)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 16501, + "function_start_hex": "H'4075", + "function_label": "loc_4075", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1800,R0)", + "negative_offset": 6144, + "negative_offset_hex": "H'1800", + "index_register": "R0", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 16552, + "instruction_address_hex": "H'40A8", + "mnemonic": "MOV:G.W", + "operands": "#H'0080, @H'E800", + "instruction": "MOV:G.W #H'0080, @H'E800", + "references": [ + 59392 + ], + "references_hex": [ + "H'E800" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 16534, + "function_start_hex": "H'4096", + "function_label": "loc_4096", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "direct_logical_address_access", + "direct_address": 59392, + "direct_address_hex": "H'E800", + "logical_address": 59392, + "logical_address_hex": "H'E800", + "index": 0, + "offset": 0, + "offset_hex": "H'0000", + "access": "write" + }, + { + "instruction_address": 16558, + "instruction_address_hex": "H'40AE", + "mnemonic": "MOV:G.W", + "operands": "#H'8000, @H'E806", + "instruction": "MOV:G.W #H'8000, @H'E806", + "references": [ + 59398 + ], + "references_hex": [ + "H'E806" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 16534, + "function_start_hex": "H'4096", + "function_label": "loc_4096", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "direct_logical_address_access", + "direct_address": 59398, + "direct_address_hex": "H'E806", + "logical_address": 59398, + "logical_address_hex": "H'E806", + "index": 6, + "offset": 6, + "offset_hex": "H'0006", + "access": "write" + }, + { + "instruction_address": 16564, + "instruction_address_hex": "H'40B4", + "mnemonic": "MOV:G.W", + "operands": "#H'FFFF, @H'E880", + "instruction": "MOV:G.W #H'FFFF, @H'E880", + "references": [ + 59520 + ], + "references_hex": [ + "H'E880" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 16534, + "function_start_hex": "H'4096", + "function_label": "loc_4096", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "direct_logical_address_access", + "direct_address": 59520, + "direct_address_hex": "H'E880", + "logical_address": 59520, + "logical_address_hex": "H'E880", + "index": 128, + "offset": 128, + "offset_hex": "H'0080", + "access": "write" + }, + { + "instruction_address": 18717, + "instruction_address_hex": "H'491D", + "mnemonic": "MOV:G.W", + "operands": "R0, @H'E9EC", + "instruction": "MOV:G.W R0, @H'E9EC", + "references": [ + 59884 + ], + "references_hex": [ + "H'E9EC" + ], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [], + "function_start": 18682, + "function_start_hex": "H'48FA", + "function_label": "loc_48FA", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "direct_logical_address_access", + "direct_address": 59884, + "direct_address_hex": "H'E9EC", + "logical_address": 59884, + "logical_address_hex": "H'E9EC", + "index": 492, + "offset": 492, + "offset_hex": "H'01EC", + "access": "write" + }, + { + "instruction_address": 47925, + "instruction_address_hex": "H'BB35", + "mnemonic": "MOV:G.W", + "operands": "@(-H'1800,R0), R4", + "instruction": "MOV:G.W @(-H'1800,R0), R4", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 47858, + "function_start_hex": "H'BAF2", + "function_label": "loc_BAF2", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1800,R0)", + "negative_offset": 6144, + "negative_offset_hex": "H'1800", + "index_register": "R0", + "index": "dynamic", + "offset": "dynamic", + "access": "read" + }, + { + "instruction_address": 48249, + "instruction_address_hex": "H'BC79", + "mnemonic": "MOV:G.W", + "operands": "R0, @(-H'1800,R4)", + "instruction": "MOV:G.W R0, @(-H'1800,R4)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1800,R4)", + "negative_offset": 6144, + "negative_offset_hex": "H'1800", + "index_register": "R4", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 48281, + "instruction_address_hex": "H'BC99", + "mnemonic": "MOV:G.W", + "operands": "R0, @(-H'1800,R4)", + "instruction": "MOV:G.W R0, @(-H'1800,R4)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1800,R4)", + "negative_offset": 6144, + "negative_offset_hex": "H'1800", + "index_register": "R4", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 48414, + "instruction_address_hex": "H'BD1E", + "mnemonic": "MOV:G.W", + "operands": "R0, @(-H'1800,R4)", + "instruction": "MOV:G.W R0, @(-H'1800,R4)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "current_value_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "current_value_table_candidate", + "table_base_address": 59392, + "table_base_address_hex": "H'E800", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1800,R4)", + "negative_offset": 6144, + "negative_offset_hex": "H'1800", + "index_register": "R4", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + } + ] + }, + { + "name": "flag_table_candidate", + "logical_base_address": 60416, + "logical_base_address_hex": "H'EC00", + "logical_range_end": 61439, + "logical_range_end_hex": "H'EFFF", + "negative_offset": 5120, + "negative_offset_hex": "H'1400", + "element_candidate": "bit_flags", + "direct_addresses": [ + 63872 + ], + "direct_addresses_hex": [ + "H'F980" + ], + "direct_range_end": 63903, + "direct_range_end_hex": "H'F99F", + "access_count": 6, + "read_count": 0, + "write_count": 6, + "read_write_candidate_count": 0, + "dynamic_index_count": 5, + "static_offsets": [ + 512 + ], + "static_offsets_hex": [ + "H'0200" + ], + "functions": [ + { + "start": 48043, + "start_hex": "H'BBAB", + "label": "loc_BBAB", + "access_count": 5, + "reads": 0, + "writes": 5 + }, + { + "start": 16501, + "start_hex": "H'4075", + "label": "loc_4075", + "access_count": 1, + "reads": 0, + "writes": 1 + } + ], + "accesses": [ + { + "instruction_address": 16520, + "instruction_address_hex": "H'4088", + "mnemonic": "CLR.W", + "operands": "@(-H'1400,R0)", + "instruction": "CLR.W @(-H'1400,R0)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 16501, + "function_start_hex": "H'4075", + "function_label": "loc_4075", + "table": "flag_table_candidate", + "table_base_address": 60416, + "table_base_address_hex": "H'EC00", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1400,R0)", + "negative_offset": 5120, + "negative_offset_hex": "H'1400", + "index_register": "R0", + "index": 512, + "offset": 512, + "access": "write", + "logical_address": 60928, + "logical_address_hex": "H'EE00" + }, + { + "instruction_address": 48258, + "instruction_address_hex": "H'BC82", + "mnemonic": "BSET.B", + "operands": "#7, @(-H'1400,R5)", + "instruction": "BSET.B #7, @(-H'1400,R5)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "flag_table_candidate", + "table_base_address": 60416, + "table_base_address_hex": "H'EC00", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1400,R5)", + "negative_offset": 5120, + "negative_offset_hex": "H'1400", + "index_register": "R5", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 48285, + "instruction_address_hex": "H'BC9D", + "mnemonic": "BSET.B", + "operands": "#7, @(-H'1400,R5)", + "instruction": "BSET.B #7, @(-H'1400,R5)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "flag_table_candidate", + "table_base_address": 60416, + "table_base_address_hex": "H'EC00", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1400,R5)", + "negative_offset": 5120, + "negative_offset_hex": "H'1400", + "index_register": "R5", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 48418, + "instruction_address_hex": "H'BD22", + "mnemonic": "BSET.B", + "operands": "#7, @(-H'1400,R5)", + "instruction": "BSET.B #7, @(-H'1400,R5)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "flag_table_candidate", + "table_base_address": 60416, + "table_base_address_hex": "H'EC00", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1400,R5)", + "negative_offset": 5120, + "negative_offset_hex": "H'1400", + "index_register": "R5", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 48441, + "instruction_address_hex": "H'BD39", + "mnemonic": "BSET.B", + "operands": "#7, @(-H'1400,R5)", + "instruction": "BSET.B #7, @(-H'1400,R5)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "flag_table_candidate", + "table_base_address": 60416, + "table_base_address_hex": "H'EC00", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1400,R5)", + "negative_offset": 5120, + "negative_offset_hex": "H'1400", + "index_register": "R5", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + }, + { + "instruction_address": 48617, + "instruction_address_hex": "H'BDE9", + "mnemonic": "BSET.B", + "operands": "#6, @(-H'1400,R5)", + "instruction": "BSET.B #6, @(-H'1400,R5)", + "references": [], + "references_hex": [], + "targets": [], + "targets_hex": [], + "label": null, + "semantic_candidates": [ + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + }, + { + "name_candidate": "flag_table_candidate", + "kind": "logical_table_map_candidate", + "confidence": "candidate-medium" + } + ], + "function_start": 48043, + "function_start_hex": "H'BBAB", + "function_label": "loc_BBAB", + "table": "flag_table_candidate", + "table_base_address": 60416, + "table_base_address_hex": "H'EC00", + "kind": "logical_negative_indexed_access", + "operand": "@(-H'1400,R5)", + "negative_offset": 5120, + "negative_offset_hex": "H'1400", + "index_register": "R5", + "index": "dynamic", + "offset": "dynamic", + "access": "write" + } + ] + } + ], + "summary": { + "table_count": 4, + "access_count": 59, + "dynamic_index_count": 32, + "source_instruction_count": 2552 + }, + "lcd_correlation": { + "terms": [ + "CONNECT", + "CONNECT: OK", + "CONNECT: NOT ACT", + "NOT ACT", + "COMM LINK", + "COMPLETED" + ], + "term_hits": [ + { + "term": "CONNECT", + "hit_count": 0, + "hits": [], + "status": "not_found" + }, + { + "term": "CONNECT: OK", + "hit_count": 0, + "hits": [], + "status": "not_found" + }, + { + "term": "CONNECT: NOT ACT", + "hit_count": 0, + "hits": [], + "status": "not_found" + }, + { + "term": "NOT ACT", + "hit_count": 0, + "hits": [], + "status": "not_found" + }, + { + "term": "COMM LINK", + "hit_count": 2, + "hits": [ + { + "address": 30708, + "address_hex": "H'77F4", + "text": "COMM LINK ITEM-1Xw", + "trimmed": "COMM LINK ITEM-1Xw", + "confidence": "high", + "xref_count": 1 + }, + { + "address": 30964, + "address_hex": "H'78F4", + "text": "COMM LINK ITEM-2Xx", + "trimmed": "COMM LINK ITEM-2Xx", + "confidence": "high", + "xref_count": 1 + } + ], + "status": "candidate_hits" + }, + { + "term": "COMPLETED", + "hit_count": 1, + "hits": [ + { + "address": 40997, + "address_hex": "H'A025", + "text": " COMPLETED ", + "trimmed": "COMPLETED", + "confidence": "medium", + "xref_count": 1 + } + ], + "status": "candidate_hits" + } + ], + "display_builder_targets": [ + { + "target": 23185, + "target_hex": "H'5A91", + "xref_count": 165, + "examples": [ + { + "text_address": 25559, + "text_address_hex": "H'63D7", + "trimmed": "OPERATION", + "xref_address": 25572, + "xref_address_hex": "H'63E4" + }, + { + "text_address": 25589, + "text_address_hex": "H'63F5", + "trimmed": "PAINT", + "xref_address": 25602, + "xref_address_hex": "H'6402" + }, + { + "text_address": 25667, + "text_address_hex": "H'6443", + "trimmed": "OPERATION", + "xref_address": 25680, + "xref_address_hex": "H'6450" + }, + { + "text_address": 25697, + "text_address_hex": "H'6461", + "trimmed": "IRIS/M.BLK", + "xref_address": 25710, + "xref_address_hex": "H'646E" + }, + { + "text_address": 25744, + "text_address_hex": "H'6490", + "trimmed": "OPERATION", + "xref_address": 25757, + "xref_address_hex": "H'649D" + }, + { + "text_address": 25774, + "text_address_hex": "H'64AE", + "trimmed": "LOCK", + "xref_address": 25787, + "xref_address_hex": "H'64BB" + }, + { + "text_address": 25903, + "text_address_hex": "H'652F", + "trimmed": "DYNA LATITUDE Xe/", + "xref_address": 25919, + "xref_address_hex": "H'653F" + }, + { + "text_address": 26057, + "text_address_hex": "H'65C9", + "trimmed": "BLACK STR Xe", + "xref_address": 26073, + "xref_address_hex": "H'65D9" + } + ] + }, + { + "target": 24301, + "target_hex": "H'5EED", + "xref_count": 15, + "examples": [ + { + "text_address": 26655, + "text_address_hex": "H'681F", + "trimmed": "AGC GAIN AE Xh", + "xref_address": 26671, + "xref_address_hex": "H'682F" + }, + { + "text_address": 33424, + "text_address_hex": "H'8290", + "trimmed": "RED GREEN BLUE X", + "xref_address": 33440, + "xref_address_hex": "H'82A0" + }, + { + "text_address": 33608, + "text_address_hex": "H'8348", + "trimmed": "RED GREEN BLUE X", + "xref_address": 33624, + "xref_address_hex": "H'8358" + }, + { + "text_address": 33792, + "text_address_hex": "H'8400", + "trimmed": "RED GREEN BLUE X", + "xref_address": 33808, + "xref_address_hex": "H'8410" + }, + { + "text_address": 33976, + "text_address_hex": "H'84B8", + "trimmed": "RED GREEN BLUE X", + "xref_address": 33992, + "xref_address_hex": "H'84C8" + }, + { + "text_address": 34160, + "text_address_hex": "H'8570", + "trimmed": "RED GREEN BLUE X", + "xref_address": 34176, + "xref_address_hex": "H'8580" + }, + { + "text_address": 34344, + "text_address_hex": "H'8628", + "trimmed": "RED GREEN BLUE X", + "xref_address": 34360, + "xref_address_hex": "H'8638" + }, + { + "text_address": 34528, + "text_address_hex": "H'86E0", + "trimmed": "RED GREEN BLUE X", + "xref_address": 34544, + "xref_address_hex": "H'86F0" + } + ] + }, + { + "target": 24100, + "target_hex": "H'5E24", + "xref_count": 14, + "examples": [ + { + "text_address": 26243, + "text_address_hex": "H'6683", + "trimmed": "POINT1 POINT2Xf", + "xref_address": 26259, + "xref_address_hex": "H'6693" + }, + { + "text_address": 26437, + "text_address_hex": "H'6745", + "trimmed": "POINT1 POINT2XgE", + "xref_address": 26453, + "xref_address_hex": "H'6755" + }, + { + "text_address": 35144, + "text_address_hex": "H'8948", + "trimmed": "SAT HUE X", + "xref_address": 35160, + "xref_address_hex": "H'8958" + }, + { + "text_address": 35403, + "text_address_hex": "H'8A4B", + "trimmed": "SAT HUE X", + "xref_address": 35419, + "xref_address_hex": "H'8A5B" + }, + { + "text_address": 36502, + "text_address_hex": "H'8E96", + "trimmed": "FOCUS ZOOM X", + "xref_address": 36518, + "xref_address_hex": "H'8EA6" + }, + { + "text_address": 36722, + "text_address_hex": "H'8F72", + "trimmed": "PAN TILT X", + "xref_address": 36738, + "xref_address_hex": "H'8F82" + }, + { + "text_address": 37141, + "text_address_hex": "H'9115", + "trimmed": "R-Y B-Y X", + "xref_address": 37157, + "xref_address_hex": "H'9125" + }, + { + "text_address": 37335, + "text_address_hex": "H'91D7", + "trimmed": "R-Y B-Y X", + "xref_address": 37351, + "xref_address_hex": "H'91E7" + } + ] + }, + { + "target": 23432, + "target_hex": "H'5B88", + "xref_count": 13, + "examples": [ + { + "text_address": 25937, + "text_address_hex": "H'6551", + "trimmed": "HIGH LOW~XeP", + "xref_address": 25952, + "xref_address_hex": "H'6560" + }, + { + "text_address": 29383, + "text_address_hex": "H'72C7", + "trimmed": "CAM BARS~Xr", + "xref_address": 29398, + "xref_address_hex": "H'72D6" + }, + { + "text_address": 33213, + "text_address_hex": "H'81BD", + "trimmed": "WHITE~X", + "xref_address": 33229, + "xref_address_hex": "H'81CD" + }, + { + "text_address": 34911, + "text_address_hex": "H'885F", + "trimmed": "STD FL~X", + "xref_address": 34926, + "xref_address_hex": "H'886E" + }, + { + "text_address": 35115, + "text_address_hex": "H'892B", + "trimmed": "ON OFF~X", + "xref_address": 35130, + "xref_address_hex": "H'893A" + }, + { + "text_address": 36473, + "text_address_hex": "H'8E79", + "trimmed": "ON CONT1 OFF~X", + "xref_address": 36488, + "xref_address_hex": "H'8E88" + }, + { + "text_address": 36693, + "text_address_hex": "H'8F55", + "trimmed": "ON CONT2 OFF~X", + "xref_address": 36708, + "xref_address_hex": "H'8F64" + }, + { + "text_address": 36946, + "text_address_hex": "H'9052", + "trimmed": "ON IND OFF~X", + "xref_address": 36961, + "xref_address_hex": "H'9061" + } + ] + }, + { + "target": 23697, + "target_hex": "H'5C91", + "xref_count": 10, + "examples": [ + { + "text_address": 27309, + "text_address_hex": "H'6AAD", + "trimmed": "AI BACK.L~Xj", + "xref_address": 27324, + "xref_address_hex": "H'6ABC" + }, + { + "text_address": 27701, + "text_address_hex": "H'6C35", + "trimmed": "RESET REQ~Xl4", + "xref_address": 27716, + "xref_address_hex": "H'6C44" + }, + { + "text_address": 33273, + "text_address_hex": "H'81F9", + "trimmed": "BLACK~X", + "xref_address": 33289, + "xref_address_hex": "H'8209" + }, + { + "text_address": 34971, + "text_address_hex": "H'889B", + "trimmed": "H.SAT SPCL~X", + "xref_address": 34986, + "xref_address_hex": "H'88AA" + }, + { + "text_address": 43482, + "text_address_hex": "H'A9DA", + "trimmed": "ON OFF~X", + "xref_address": 43497, + "xref_address_hex": "H'A9E9" + }, + { + "text_address": 44062, + "text_address_hex": "H'AC1E", + "trimmed": "ON OFF~X", + "xref_address": 44077, + "xref_address_hex": "H'AC2D" + }, + { + "text_address": 44272, + "text_address_hex": "H'ACF0", + "trimmed": "ON OFF~X", + "xref_address": 44287, + "xref_address_hex": "H'ACFF" + }, + { + "text_address": 44668, + "text_address_hex": "H'AE7C", + "trimmed": "ON GRN OFF~X", + "xref_address": 44683, + "xref_address_hex": "H'AE8B" + } + ] + }, + { + "target": 23962, + "target_hex": "H'5D9A", + "xref_count": 5, + "examples": [ + { + "text_address": 36975, + "text_address_hex": "H'906F", + "trimmed": "GATE SIZE X", + "xref_address": 36991, + "xref_address_hex": "H'907F" + }, + { + "text_address": 39370, + "text_address_hex": "H'99CA", + "trimmed": "GATE SIZE X", + "xref_address": 39386, + "xref_address_hex": "H'99DA" + }, + { + "text_address": 44031, + "text_address_hex": "H'ABFF", + "trimmed": "LEVEL X", + "xref_address": 44047, + "xref_address_hex": "H'AC0F" + }, + { + "text_address": 44241, + "text_address_hex": "H'ACD1", + "trimmed": "LEVEL X", + "xref_address": 44257, + "xref_address_hex": "H'ACE1" + }, + { + "text_address": 45990, + "text_address_hex": "H'B3A6", + "trimmed": "LEVEL X", + "xref_address": 46006, + "xref_address_hex": "H'B3B6" + } + ] + } + ], + "lcd_driver_routines": [ + { + "start": 16192, + "start_hex": "H'3F40", + "end": 16244, + "end_hex": "H'3F74", + "role_hint": "lcd_wait_and_transfer", + "roles": [ + "lcd_command_or_address_write", + "lcd_data_read", + "lcd_data_write", + "lcd_status_read" + ] + } + ], + "caveat": "This is a static correlation helper. It reports text/script candidates and LCD driver routines in the same decompile; it does not prove a protocol field directly causes a string." + }, + "caveat": "Static offsets are emitted only when an index register value can be derived from nearby immediate loads in the current JSON. Other indexed accesses are dynamic.", + "source": "build\\rom_decompiled.json" +} \ No newline at end of file diff --git a/build/rom_table_xrefs.txt b/build/rom_table_xrefs.txt new file mode 100644 index 0000000..602fb43 --- /dev/null +++ b/build/rom_table_xrefs.txt @@ -0,0 +1,93 @@ +Table/Index Cross-Reference Report for build\rom_decompiled.json +================================================================ + +Static offsets are emitted only when an index register value can be derived from nearby immediate loads in the current JSON. Other indexed accesses are dynamic. + +LCD correlation hints + term 'CONNECT': no LCD/text candidate hits in current decompile + term 'CONNECT: OK': no LCD/text candidate hits in current decompile + term 'CONNECT: NOT ACT': no LCD/text candidate hits in current decompile + term 'NOT ACT': no LCD/text candidate hits in current decompile + term 'COMM LINK': 2 candidate hit(s): H'77F4 'COMM LINK ITEM-1Xw', H'78F4 'COMM LINK ITEM-2Xx' + term 'COMPLETED': 1 candidate hit(s): H'A025 'COMPLETED' + display builder xrefs: H'5A91:165, H'5EED:15, H'5E24:14, H'5B88:13, H'5C91:10, H'5D9A:5 + LCD driver routines: H'3F40 lcd_wait_and_transfer + caveat: LCD strings can be builder/script output; absence of a literal term does not disprove runtime composition. + +primary_value_table_candidate H'E000-H'E3FF (negative H'2000; direct H'F900-H'F91F) + accesses=31 reads=21 writes=10 dynamic=11 + static offsets: H'0000, H'0004, H'0006, H'0046, H'0080, H'0102, H'0124, H'0126, H'014E, H'016E, H'0172, H'01EC, H'0220 + functions: loc_BBAB:5, loc_2650:3, loc_4096:3, loc_1795:2, loc_19DB:2, loc_1A35:2, loc_48FA:2, vec_ad_adi_3D99:2, :1, loc_1705:1, loc_174D:1, loc_17C9:1 + - H'170C read offset H'014E -> H'E14E; loc_1705; BTST.W #15, @H'E14E + - H'175A read offset H'016E -> H'E16E; loc_174D; BTST.W #13, @H'E16E + - H'179C read offset H'0172 -> H'E172; loc_1795; BTST.W #13, @H'E172 + - H'17A7 read offset H'0220 -> H'E220; loc_1795; BTST.W #15, @H'E220 + - H'17D0 read offset H'0126 -> H'E126; loc_17C9; BTST.W #12, @H'E126 + - H'1802 read offset H'0126 -> H'E126; loc_17FB; BTST.W #12, @H'E126 + - H'183A read offset H'0126 -> H'E126; loc_182D; BTST.W #5, @H'E126 + - H'189E read offset H'0126 -> H'E126; loc_1891; BTST.W #5, @H'E126 + - H'18F4 read offset H'0126 -> H'E126; loc_18E7; BTST.W #5, @H'E126 + - H'19E3 read index dynamic via R3 operand @(-H'2000,R3); loc_19DB; MOV:G.W @(-H'2000,R3), R0 + - H'1A03 read index dynamic via R3 operand @(-H'2000,R3); loc_19DB; CMP:G.W @(-H'2000,R3), R1 + - H'1A3D read index dynamic via R3 operand @(-H'2000,R3); loc_1A35; MOV:G.W @(-H'2000,R3), R0 + - H'1A6B read index dynamic via R3 operand @(-H'2000,R3); loc_1A35; CMP:G.W @(-H'2000,R3), R0 + - H'2657 read offset H'0124 -> H'E124; loc_2650; MOV:G.W @H'E124, R0 + - H'266F read offset H'0004 -> H'E004; loc_2650; BTST.W #13, @H'E004 + - H'268B read offset H'0124 -> H'E124; loc_2650; CMP:G.W @H'E124, R0 + - H'3DDA read offset H'0102 -> H'E102; vec_ad_adi_3D99; MOV:G.W @H'E102, R0 + - H'3DFA read offset H'0102 -> H'E102; vec_ad_adi_3D99; CMP:G.W @H'E102, R1 + - H'3F8C write index dynamic via R0 operand @(-H'2000,R0); ; CLR.W @(-H'2000,R0) + - H'402C write offset H'0046 -> H'E046; loc_400C; CLR.W @H'E046 + - H'4077 write index dynamic via R0 operand @(-H'2000,R0); loc_4075; CLR.W @(-H'2000,R0) + - H'4096 write offset H'0000 -> H'E000; loc_4096; MOV:G.W #H'0080, @H'E000 + - H'409C write offset H'0006 -> H'E006; loc_4096; MOV:G.W #H'8000, @H'E006 + - H'40A2 write offset H'0080 -> H'E080; loc_4096; MOV:G.W #H'FFFF, @H'E080 + - H'490F read offset H'01EC -> H'E1EC; loc_48FA; BTST.W #13, @H'E1EC + - H'4915 read offset H'01EC -> H'E1EC; loc_48FA; MOV:G.W @H'E1EC, R0 + - H'BC75 write index dynamic via R4 operand @(-H'2000,R4); loc_BBAB; MOV:G.W R0, @(-H'2000,R4) + - H'BC95 write index dynamic via R4 operand @(-H'2000,R4); loc_BBAB; MOV:G.W R0, @(-H'2000,R4) + - H'BCEC read index dynamic via R4 operand @(-H'2000,R4); loc_BBAB; MOV:G.W @(-H'2000,R4), R0 + - H'BD1A write index dynamic via R4 operand @(-H'2000,R4); loc_BBAB; MOV:G.W R0, @(-H'2000,R4) + - H'BD35 write index dynamic via R4 operand @(-H'2000,R4); loc_BBAB; MOV:G.W R0, @(-H'2000,R4) + +secondary_value_table_candidate H'E400-H'E7FF (negative H'1C00; direct H'F940-H'F95F) + accesses=8 reads=6 writes=2 dynamic=8 + functions: loc_1A35:2, loc_1A9C:2, :1, loc_19A2:1, loc_4075:1, loc_BBAB:1 + - H'19AA read index dynamic via R3 operand @(-H'1C00,R3); loc_19A2; MOV:G.W @(-H'1C00,R3), R0 + - H'1A4B read index dynamic via R3 operand @(-H'1C00,R3); loc_1A35; MOV:G.W @(-H'1C00,R3), R1 + - H'1A5B read index dynamic via R3 operand @(-H'1C00,R3); loc_1A35; MOV:G.W @(-H'1C00,R3), R1 + - H'1A81 read index dynamic via R3 operand @(-H'1C00,R3); ; AND.W @(-H'1C00,R3), R1 + - H'1AB4 read index dynamic via R3 operand @(-H'1C00,R3); loc_1A9C; BTST.W R0, @(-H'1C00,R3) + - H'1AC1 read index dynamic via R3 operand @(-H'1C00,R3); loc_1A9C; BTST.W R0, @(-H'1C00,R3) + - H'407B write index dynamic via R0 operand @(-H'1C00,R0); loc_4075; CLR.W @(-H'1C00,R0) + - H'BDE5 write index dynamic via R4 operand @(-H'1C00,R4); loc_BBAB; MOV:G.W R0, @(-H'1C00,R4) + +current_value_table_candidate H'E800-H'EBFF (negative H'1800; direct H'F920-H'F93F) + accesses=14 reads=1 writes=13 dynamic=8 + static offsets: H'0000, H'0006, H'0080, H'0102, H'0124, H'01EC + functions: loc_4096:3, loc_BBAB:3, :1, loc_15E0:1, loc_19DB:1, loc_1A35:1, loc_2650:1, loc_4075:1, loc_48FA:1, loc_BAF2:1 + - H'15ED write offset H'0102 -> H'E902; loc_15E0; MOV:G.W R1, @H'E902 + - H'1A09 write index dynamic via R3 operand @(-H'1800,R3); loc_19DB; MOV:G.W R1, @(-H'1800,R3) + - H'1A71 write index dynamic via R3 operand @(-H'1800,R3); loc_1A35; MOV:G.W R0, @(-H'1800,R3) + - H'2691 write offset H'0124 -> H'E924; loc_2650; MOV:G.W R0, @H'E924 + - H'3F90 write index dynamic via R0 operand @(-H'1800,R0); ; CLR.W @(-H'1800,R0) + - H'407F write index dynamic via R0 operand @(-H'1800,R0); loc_4075; CLR.W @(-H'1800,R0) + - H'40A8 write offset H'0000 -> H'E800; loc_4096; MOV:G.W #H'0080, @H'E800 + - H'40AE write offset H'0006 -> H'E806; loc_4096; MOV:G.W #H'8000, @H'E806 + - H'40B4 write offset H'0080 -> H'E880; loc_4096; MOV:G.W #H'FFFF, @H'E880 + - H'491D write offset H'01EC -> H'E9EC; loc_48FA; MOV:G.W R0, @H'E9EC + - H'BB35 read index dynamic via R0 operand @(-H'1800,R0); loc_BAF2; MOV:G.W @(-H'1800,R0), R4 + - H'BC79 write index dynamic via R4 operand @(-H'1800,R4); loc_BBAB; MOV:G.W R0, @(-H'1800,R4) + - H'BC99 write index dynamic via R4 operand @(-H'1800,R4); loc_BBAB; MOV:G.W R0, @(-H'1800,R4) + - H'BD1E write index dynamic via R4 operand @(-H'1800,R4); loc_BBAB; MOV:G.W R0, @(-H'1800,R4) + +flag_table_candidate H'EC00-H'EFFF (negative H'1400; direct H'F980-H'F99F) + accesses=6 reads=0 writes=6 dynamic=5 + static offsets: H'0200 + functions: loc_BBAB:5, loc_4075:1 + - H'4088 write offset H'0200 -> H'EE00; loc_4075; CLR.W @(-H'1400,R0) + - H'BC82 write index dynamic via R5 operand @(-H'1400,R5); loc_BBAB; BSET.B #7, @(-H'1400,R5) + - H'BC9D write index dynamic via R5 operand @(-H'1400,R5); loc_BBAB; BSET.B #7, @(-H'1400,R5) + - H'BD22 write index dynamic via R5 operand @(-H'1400,R5); loc_BBAB; BSET.B #7, @(-H'1400,R5) + - H'BD39 write index dynamic via R5 operand @(-H'1400,R5); loc_BBAB; BSET.B #7, @(-H'1400,R5) + - H'BDE9 write index dynamic via R5 operand @(-H'1400,R5); loc_BBAB; BSET.B #6, @(-H'1400,R5) diff --git a/h8536/protocol_capture.py b/h8536/protocol_capture.py new file mode 100644 index 0000000..0620977 --- /dev/null +++ b/h8536/protocol_capture.py @@ -0,0 +1,534 @@ +from __future__ import annotations + +import argparse +import json +import re +import sys +from dataclasses import dataclass +from pathlib import Path +from typing import Any, Iterable, Mapping, TextIO + +try: # Keep this module useful even when copied away from the decompiler tree. + from . import protocol_trace as _protocol_trace +except ImportError: # pragma: no cover - exercised only outside package imports. + _protocol_trace = None + + +CHECKSUM_SEED = getattr(_protocol_trace, "CHECKSUM_SEED", 0x5A) +FRAME_LENGTH = getattr(_protocol_trace, "FRAME_LENGTH", 6) +CAPTURE_LINE_RE = re.compile( + r"^\s*(?P