From b915bbbcbef8c394efd2fc402c2ae652e89cc563 Mon Sep 17 00:00:00 2001 From: Cryan209 Date: Tue, 8 Sep 2026 08:55:31 +1200 Subject: [PATCH] Locate 3.0.13's tone generators: ANSam at 9f62, the 2250 Hz at d354 docs/ata-answer-tone-302.md recorded what ATA puts on the line but attributed neither burst to code, and called the 2250 Hz an identification against the standard only. Both are now located, statically and at runtime. 3.0.13 relocates 3.1.2's oscillator family but keeps its data cells, which is why the two images agree on the tones while sharing no addresses: arm routine 86dc (was 86d1), plain oscillator 875a (874f), pair 874e (8743), reversals 8744 (8739), ANSam 871d/8721/8723 (8712/8716/8718) - all writing increment 0x3f2, amplitude 0x3f3, phase 0x3c0 through the mixer's 0x39a callback slot. ANSam is armed at 0x9f62 with the same constants 3.1.2 uses at 9f40: #4aab, #0ca7, #06cf, and 8723's #0089 for the 15.05 Hz modulation. The 2250 Hz tone is armed at 0xd354, reached from 0x9ffc in the answer state machine: "lacc #5000; b 86dc". It is a *branch*, not a call, which is why enumerating callers of the arm routine finds five literal frequencies and misses this one; searching for every word equal to 86dc is what found it. 0x5000/65536*7200 is 2250.00 Hz exactly. One earlier guess is corrected. A cell at 0x3ef advancing by 0x5555 was read as a 2400 Hz carrier, suggesting V.22's carrier rotated 90 degrees per symbol. 0x3ee:0x3ef is a 32-bit accumulator advanced by 0x01555555; 0x5555 is only its low half's delta. The tone is a plain oscillator generated directly - so the signal is what V.22 unscrambled binary 1 looks like, while the implementation is not a modulator. Runtime confirms the static read: mid-burst 0x3f2 = 0x5000, 0x3f3 = 0x0898 (the arm routine's own literal) and 0x39a = 0x875a. Co-Authored-By: Claude Opus 5 --- .../ata-answer-tone-302-01/manifest.json | 22 +++-- docs/answer-tone.md | 9 +- docs/ata-answer-tone-302.md | 82 +++++++++++++++++-- 3 files changed, 98 insertions(+), 15 deletions(-) diff --git a/artifacts/ata-answer-tone-302-01/manifest.json b/artifacts/ata-answer-tone-302-01/manifest.json index eb2b24a..9e21f99 100644 --- a/artifacts/ata-answer-tone-302-01/manifest.json +++ b/artifacts/ata-answer-tone-302-01/manifest.json @@ -21,7 +21,8 @@ "2131.25": 0.0184 }, "identification": "V.8 ANSam: 2100 Hz answer tone with 15.05 Hz amplitude modulation", - "basis": "carrier measured 2101.15 Hz here and 2098.90 Hz in the --exchange-hotline run, i.e. within 1.2 Hz of 2100 either way; the AM sidebands pull a finite-window peak search slightly, so treat the carrier as 2100 +/- 1.5 Hz rather than the printed decimals. First-order sidebands at +/-15.05 Hz near 10%, second-order near 1%; matches the 3.1.2 firmware-rendered ANSam in artifacts/answer-tone-01 (0.101/0.100)" + "basis": "carrier measured 2101.15 Hz here and 2098.90 Hz in the --exchange-hotline run, i.e. within 1.2 Hz of 2100 either way; the AM sidebands pull a finite-window peak search slightly, so treat the carrier as 2100 +/- 1.5 Hz rather than the printed decimals. First-order sidebands at +/-15.05 Hz near 10%, second-order near 1%; matches the 3.1.2 firmware-rendered ANSam in artifacts/answer-tone-01 (0.101/0.100)", + "armed_by": "0x9f62: lacc #4aab (2100.04 Hz at 7200) -> call 86dc; splk @75,#0ca7 (3239 samples, 449.9 ms reversal); splk @1a,#8721/#871d (the ANSam callbacks, whose 8723 adds increment 0x0089 = 15.05 Hz and multiplies the carrier); splk @73,#06cf" }, { "start_s": 5.83, @@ -31,8 +32,9 @@ "2234.95": 0.0141, "2265.05": 0.014 }, - "identification": "consistent with V.22/V.22bis unscrambled binary 1 (channel 2 carrier 2400 Hz less 150 Hz)", - "basis": "measured 2250.00 Hz with no modulation sidebands. This is a match against the standard, NOT a firmware attribution: the 3.0.13 code that arms it has not been located" + "identification": "a pure 2250 Hz tone, armed as a single oscillator. The signal is what V.22/V.22bis unscrambled binary 1 looks like on the line (channel 2 carrier 2400 Hz less 150 Hz, i.e. 90 degrees per symbol at 600 baud), but the firmware generates it directly rather than by running the modulator", + "basis": "located statically and confirmed at runtime: mid-burst the emulator shows 0x3f2 = 0x5000, 0x3f3 = 0x0898 and 0x39a = 0x875a", + "armed_by": "0x9ffc in the answer state machine calls 0xd354, which is 'lacc #5000; b 86dc' - a tail-call, which is why a search for 'call 86dc' misses it. 0x5000/65536*7200 = 2250.00 Hz exactly. 86dc stores the increment at 0x3f2, installs the plain oscillator 875a in the mixer callback slot 0x39a, sets amplitude 0x3f3 to its own literal 0x0898, and clears the phase 0x3c0" } ], "reproduced": "the same sequence appears with --exchange-hotline in place of --ring, at the same onsets, durations and levels; the 2250 Hz burst is byte-identical between the two runs", @@ -40,6 +42,16 @@ "caveats": [ "The harness tone generator was deleted before these runs (commit 797ed28), so only the C52 program could have produced these samples; the codec, ASIC transport and line remain models.", "Neither run is a true exchange-side answer. The CLI's --ring drives the ring detector at port 0x14 but never puts LineExchange into 'ringing' - only the SIP inbound path calls exchange.ring() - so bridge.set_line_hook labels the seizure 'originate'. The supervisor obeyed ATA and armed these tones regardless.", - "The 3.0.13 oscillator addresses are unlocated. The 3.1.2 answer-tone family (874f/8739/8712, docs/answer-tone.md) does not transplant: none of those addresses hold the same words in this image." - ] + "The 3.0.13 oscillator family is now located (see oscillator_family) and shares 3.1.2's data cells, though the code addresses differ throughout." + ], + "oscillator_family": { + "comment": "3.0.13 relocates 3.1.2 (docs/answer-tone.md) but keeps the same data cells", + "arm_routine": "86dc (3.1.2: 86d1)", + "one_oscillator": "875a (874f)", + "pair_oscillator": "874e (8743)", + "phase_reversals": "8744 (8739)", + "ansam": "871d / 8721 / 8723 (8712 / 8716 / 8718)", + "silence": "8139", + "cells": "increment 0x3f2, amplitude 0x3f3, phase 0x3c0, output 0x3c7, callback slots 0x39a and 0x39b - identical in both builds" + } } diff --git a/docs/answer-tone.md b/docs/answer-tone.md index bb4e5e1..18c0622 100644 --- a/docs/answer-tone.md +++ b/docs/answer-tone.md @@ -91,9 +91,12 @@ transmits 1440 words, and the result is simply the wrong signal. the way that site arms it. *Closed on the other image, 2026-09-08.* `ATA` on `IDSDL302.ROM` (DSP 3.0.13) - emits ANSam in the full emulator, supervisor and all - see - [ata-answer-tone-302.md](ata-answer-tone-302.md). That does not locate 3.1.2's - path to `9f40`; the two builds share no addresses here. + emits ANSam in the full emulator, supervisor and all, from its own analogue of + this site at `0x9f62` - and follows it with a 2250 Hz tone armed at `0xd354`. + See [ata-answer-tone-302.md](ata-answer-tone-302.md), which also maps 3.0.13's + oscillator family onto this one: the code addresses differ throughout, but the + data cells - increment `0x3f2`, amplitude `0x3f3`, phase `0x3c0` - are the + same in both builds. That does not locate 3.1.2's own path to `9f40`. * **ANSam renders too.** *Corrected.* This section used to say the `8712` and `8716` variants could not be rendered, and blamed missing delay-line state. The real cause was a bug in this repository's C5x core: `MADD` and `MADS` diff --git a/docs/ata-answer-tone-302.md b/docs/ata-answer-tone-302.md index 620685b..3ddb378 100644 --- a/docs/ata-answer-tone-302.md +++ b/docs/ata-answer-tone-302.md @@ -31,10 +31,78 @@ worth something, because these are **different images with different code**. None of 3.1.2's oscillator addresses hold the same words in 3.0.13, so this is not the same routine measured twice. -The 2250 Hz burst is an identification against the standard, **not a firmware -attribution**. V.22's channel 2 carrier is 2400 Hz and unscrambled binary 1 is -150 Hz below it, which is exactly what was measured; but the 3.0.13 code that -arms it has not been located, and nothing here traces it. +Both are now located in the firmware. See +[the generators](#the-generators-and-what-arms-them) below. + +## The generators, and what arms them + +3.0.13 relocates 3.1.2's oscillator family but **keeps the same data cells**, +which is why the two agree even though `dsp-map-302.md` warns that the mailbox +cells differ. The mixer at `80e0`/`80e4` calls whatever sits in `@1a`/`@1b` +(`0x39a`/`0x39b` at DP 7), exactly as 3.1.2's does. + +| role | 3.1.2 | 3.0.13 | +|---|---|---| +| arm routine | `86d1` | `86dc` | +| one oscillator | `874f` | `875a` | +| pair oscillator | `8743` | `874e` | +| phase reversals | `8739` | `8744` | +| ANSam (15.05 Hz AM) | `8712` / `8716` / `8718` | `871d` / `8721` / `8723` | + +Cells, identical in both: increment `0x3f2`, amplitude `0x3f3`, phase `0x3c0`, +output `0x3c7`. + +### ANSam, at `0x9f62` + +The direct analogue of 3.1.2's `9f40`, with the same constants: + +```text +9f64: lacc #4aab ; 2100.04 Hz at 7200 +9f66: call 86dc +9f6a: splk @75, #0ca7 ; 3239 samples = 449.9 ms reversal +9f70: splk @1a, #8744 ; reversals +9f77: splk @1a, #8721 ; ANSam +9f7a: splk @1a, #871d ; ANSam +9f7c: splk @73, #06cf +``` + +`8723` loads increment `0x0089` - 15.05 Hz - and multiplies the carrier by it. +At runtime `0x3c0` advances by `0x4aab` per sample and `0x3f4` by `0x0089`. + +### The 2250 Hz tone, at `0xd354`, reached from `0x9ffc` + +```text +9ffa: splk @2b, #0096 ; state timer +9ffc: call d354 + d354: lacc #5000 ; 0x5000/65536*7200 = 2250.00 Hz exactly + d356: b 86dc ; a tail-call - see below +``` + +`86dc` then stores the increment at `0x3f2`, installs the **plain** oscillator +`875a` in the callback slot, sets the amplitude to its own literal `0x0898`, +and clears the phase. + +Two things are worth recording. First, `d354` ends in `b 86dc`, not +`call 86dc`; a search for calls to the arm routine finds the five literal +callers (375, 600, 1650, 2025 and 2100 Hz) and **misses this one entirely**. +Searching for every word equal to `86dc` is what found it. + +Second, this corrects an earlier guess in this repository's history. A cell at +`0x3ef` was seen advancing by `0x5555` and read as a 2400 Hz carrier, which +suggested the tone was V.22's carrier rotated 90 degrees per symbol. That was +wrong: `0x3ee:0x3ef` is a *32-bit* accumulator (`d901`) advanced by +`0x01555555`, and `0x5555` is merely its low half's delta. The tone is a plain +oscillator, generated directly. + +So the *signal* is what V.22 unscrambled binary 1 looks like on the line - +2400 Hz less 150 Hz, which is 90 degrees per symbol at 600 baud - but the +*implementation* is a single tone, not a running modulator. + +### Confirmed at runtime + +Mid-burst the emulator shows `0x3f2 = 0x5000`, `0x3f3 = 0x0898` and +`0x39a = 0x875a`: the increment, the arm routine's own amplitude literal, and +the plain oscillator. Static and dynamic agree. ## It is the ATA handler, not the scenario @@ -67,8 +135,8 @@ with a paired instance, or an exchange the CLI can ring directly. * **Not hardware.** The codec, ASIC transport and line are models. No board was measured. -* **Not a located generator.** The 3.0.13 oscillator, its arming site, and the - supervisor state that reaches it are all unlocated. This documents what the - line carries, not which instructions put it there. +* **Not a located caller for every path.** The oscillators and their arming + sites are located above; what reaches `0x9ffc` and `0x9f62` in the + supervisor's answer sequence is followed only as far as the state timer. * **Not a completed handshake.** Two tones went out. Nothing here shows a far end answering them or a carrier training.