Korg DW-8000 DWGS chip — register description

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).

Overview

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.

Register map

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:

Write sequences

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.

Frequency data format

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):

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.

Waveform data format

Update timing

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).

Related control