Skip to content

virusLib: name ControlCommand 109 as DSP_CLOCK_ADJUSTMENT - #282

Open
insolentconstruct wants to merge 1 commit into
dsp56300:mainfrom
insolentconstruct:virus/dsp-clock-adjustment-enum
Open

virusLib: name ControlCommand 109 as DSP_CLOCK_ADJUSTMENT#282
insolentconstruct wants to merge 1 commit into
dsp56300:mainfrom
insolentconstruct:virus/dsp-clock-adjustment-enum

Conversation

@insolentconstruct

Copy link
Copy Markdown

microcontroller.cpp's sendInitControlCommands boot array already carries a comment against
this exact page and index (0x734x, 109) describing it as a DSP clock adjustment in percent,
default 0x64 = 100%, maximum 0x79 = 121%. Only the enumerator was still unattributed, so the
name and the neighbouring comment disagreed with each other.

Rather than take the comment's word for it, the command was exercised against the emulated DSP.
Sent via PARAM_CHANGE_D, it reprograms the PLL: values 100, 110 and 121 produce PLL MF
register values 0x8e, 0x98 and 0xa3 (133.594, 143.002 and 153.35 MHz) — an exact
mf = value + 42 relationship, tighter than the comment's "roughly".

As a control, sending the same value to the neighbouring unnamed index 108 produced the same
generic clock-recompute log line but left the clock at its default — so the effect belongs to
index 109 specifically, and is not a side effect of any write to that page.

No behaviour change — the enumerator's value is untouched, only its name.

@insolentconstruct
insolentconstruct force-pushed the virus/dsp-clock-adjustment-enum branch from b30ae68 to 3952fc6 Compare August 1, 2026 04:53
The boot array in microcontroller.cpp's sendInitControlCommands already carries
a comment for this exact page and index (0x734x, 109) describing it as a DSP
clock adjustment in percent, default 0x64 = 100%, maximum 0x79 = 121%. Only the
enumerator was still unattributed, so the name and the comment disagreed.

Checked against the emulated DSP rather than taken from the comment: sending the
command via PARAM_CHANGE_D reprograms the PLL. Values 100, 110 and 121 yield PLL
MF register values 0x8e, 0x98 and 0xa3 (133.594, 143.002 and 153.35 MHz), an
exact mf = value + 42 relationship — tighter than the comment's "roughly".

As a control, the same value sent to the neighbouring unnamed index 108 produced
the same generic clock-recompute log line but left the clock at its default,
so the effect belongs to index 109 specifically and is not a side effect of any
write to that page.

No behaviour change; the enumerator value is untouched.
@insolentconstruct
insolentconstruct force-pushed the virus/dsp-clock-adjustment-enum branch from 3952fc6 to 07ce459 Compare August 1, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant