Based on the OS ROM disassembly (ROM version 0713,
out/dw8k-as-20261119.asm). All statements are derived from the
code; the single inference made is marked
(italic).
The DWGS ("Digital Waveform Generator") is the tone-generation ASIC that plays the single-cycle sampled waveforms. It provides 16 independent waveform channels, organized as 8 voice channels × 2 oscillator groups:
Evidence for the voice pairing: the eight note-assign handlers
(PTCHLFO1_SET…PTCHLFO4_SET, KEYGRP_SET)
program exactly the pair $4020+2v / $4021+2v of the
assigned voice v (e.g. VOICE7_APPLY writes
DWGS1F_L_E/DWGS2F_L_E = $402E/$402F),
and the per-tick pitch engine PTCHEG_STEP0…7 maintains the
same pairing.
| Address | Bits | R/W | Function |
|---|---|---|---|
$4020, $4022…$402E (even) |
D7–D0 | W | Frequency data low byte, osc 1, channels 0–7
($4020+2n) |
$4021, $4023…$402F (odd) |
D7–D0 | W | Frequency data low byte, osc 2, channels 0–7
($4021+2n) |
PORT6 = $0017, pins P60–P67 |
→ freq D15–D8 | W | Frequency data high byte (shared by all 16 channels) |
$4030, $4032…$403E (even) |
D7–D0 (3 used) | W | Waveform select, osc 1, channels 0–7 |
$4031, $4033…$403F (odd) |
D7–D0 (3 used) | W | Waveform select, osc 2, channels 0–7 |
ADSEL = $40E0 bit 3 |
— | W | Osc 1 waveform bank: 0 = waveforms 1–8, 1 = waveforms 9–16 |
ADSEL = $40E0 bit 4 |
— | W | Osc 2 waveform bank: 0 = waveforms 1–8, 1 = waveforms 9–16 |
Notes:
$4020–$403F.INIT_HW sets DDR6 = $FF ("P60–67
DWGS out"): P60–P67 are configured as outputs.$4020–$403F (the
WAVESEL_APPLY loop runs CPX #DAC =
$4040, i.e. it also touches $403F).FREQ_CALC/GLIDE_CALC store the high
byte (A) of the frequency word to PORT6
(FREQ_CALC: LDD #$F27B; STAA PORT6 for the
clamp case).Frequency update (per channel pair, MSB first):
PORT6 (P60–P67) ← freq word D15–D8 ; shared high-byte latch
$4020+2n ← freq word D7–D0 ; osc 1 low byte (completes the word)
PORT6 ← osc2 freq word D15–D8 ; (+$01 if detune param EB0C ≠ 0)
$4021+2n ← osc2 freq word D7–D0
The high byte is always written before the low byte
(FREQ_CALC/GLIDE_CALC do STAA PORT6,
the caller then does STAB $4020+2n). From this ordering it is
inferred that the low-byte write latches the complete
16-bit word into the channel's frequency register.
GLIDE_CALC (per-tick path) performs both oscillator writes in one
call and returns the osc 2 low byte in B to the caller.
Waveform update (per program, all 16 channels):
ADSEL ← (arp LED state) | bank bits ; bit3 = osc1 bank, bit4 = osc2 bank
loop X = $4030 … $403F:
$4030+2i ← osc1 wave code ; A = (EB01 & $07)
$4031+2i ← osc2 wave code ; B = (EB09 & $07)
(WAVESEL_APPLY, EDB7.) The same value is additionally written to
ARPLED ($40DE), which shares the tempo-LED bit with
ADSEL.
16-bit word per channel (phase increment / frequency code).
Pitch domain: 16-bit pitch value; note-on paths compute
pitch = note_value × 64
(TBA / CLRB / LSRD / LSRD), i.e. one octave =
$0300, 64 units per semitone. Osc pitch offsets
(OSC1F_L/OSC2F_L = base + PTCHOFF1/2,
where PTCHOFF2 = t_interval[EB0B] + t_detune[EB0C]) and the
portamento/autobend ramps add to this.
Conversion (FREQ_CALC at $D1E4,
GLIDE_CALC at $DF03):
pitch ≥ $2100 → clamp to word
$F27B (max: MSB $F2 → PORT6, LSB
$7B → freq port);q = pitch / $0300 (0…10),
r = pitch & $0FFE (even remainder);word = dwgs_tuning[r/2] >> (10 − q);dwgs_tuning ($F950):
384 + 1 words covering exactly one octave
($793D → $F27B, the table doubles over
its length = 21/384 per entry = 32 entries per semitone,
indexed 2 pitch units per entry); the 385th word is the guard needed by
the interpolation read;FREQ_CALC (note-on / portamento program paths) uses even
remainders only (no interpolation); GLIDE_CALC (per-tick
pitch engine) interpolates linearly between adjacent
table words for odd remainders
(LDD $00,X; ADDD $02,X; RORA; RORB).
Ramp bottom: the autobend ramp-down paths
(LD1D2/LD1DB and friends) write word 0
(PORT6 = 0, low byte = 0) when the ramp completes.
Osc 2 detune: when the detune parameter EB0C ≠ 0,
FREQ_MSB_SET adds +$01 to the osc 2 frequency word
(MSB increment) in addition to the interval/detune pitch offset.
wave_param & $07 (osc 1 = param 1
EB01, osc 2 = param 8 EB09); in test mode
(boot switch state $0C → SYSEXV5 ≠ 0)
bit 3 is forced on (|$08).code | bank<<3 (16 possible single-cycle waveforms).
With 1-based front-panel numbering this corresponds to waveform
code + (bank ? 8 : 0) + 1; the ROM alone does not pin down
the 1-based offset.| Event | Writer | Registers touched |
|---|---|---|
Note-on, single-voice assign (TBL_PTCH dispatch) |
voice handler (PTCHLFO*_SET/KEYGRP_SET tail)
via FREQ_CALC |
pair $4020+2v / $4021+2v (PORT6 twice) |
Note-on, poly/unison (POLY_VOICE_ALL) |
PITCHACC_SETALL |
all 8 osc 1 low bytes, then all 8 osc 2 low bytes, same value |
| Per timer tick | pitch engine PTCHEG_STEP0…7 (one voice per tick,
cyclic PTCHEG_LINK RTI chaining) via
GLIDE_CALC |
pair of voice n; ramps the per-voice accumulator toward
EGWK_n, applies the unison spread
(PANELST & $06 ≠ 0, i.e. poly-2/unison modes
→ offsets −3,−2,−1,0,+1,+2,+3,0), then writes |
| Program change / wave param change | WAVESEL_APPLY (via PROG_SETUP_CHN chain) |
all 16 waveform registers + ADSEL bank bits |
The per-tick frequency updates execute in the timer RTI context; note-on
frequency programming (PITCHACC_SETALL) runs with interrupts
enabled (CLI before the FREQ_CALC/store sequence).
$40E0) is a shared latch: bits 2–0
select the A/D mux input (0=bender, 1=MG, 2=edit slider, 3=tune,
4=pressure), bits 4/3 = the DWGS waveform banks (above), bit 5 = VCF EG
polarity, bit 6 = arpeggiator reset, bit 7 = arpeggiator tempo LED.DWGFREQ ($0075) / DWGPRM
($0076) hold the codes from t_dwgs_oct /
t_VCA_velsens ($01–$07 /
$80–$87; $87 also serves as the noise
code, selected when NOISESEL ≠ 0). They are latched into
EGVCA0–7 ($3A55+2v) and driven on
PORT2 ($0003, P20/P21/P22/P27) by the EG
engine as the velocity-sensitivity control for the selected DWGS
channel.