{"id":1133,"date":"2026-11-10T05:53:38","date_gmt":"2026-11-10T05:53:38","guid":{"rendered":"https:\/\/tlindner.macmess.org\/?p=1133"},"modified":"2026-11-10T05:53:38","modified_gmt":"2026-11-10T05:53:38","slug":"ensoniq-mirage-measurements-wanted","status":"publish","type":"post","link":"https:\/\/tlindner.macmess.org\/?p=1133","title":{"rendered":"Ensoniq Mirage: Measurements Wanted"},"content":{"rendered":"<h1>Ensoniq Mirage: Measurements Wanted<\/h1>\n<h2>Why these measurements<\/h2>\n<p>MAME&#8217;s Ensoniq Mirage emulation (<code>ensoniq\/enmirage.cpp<\/code>, <code>sound\/cem3328.cpp<\/code>) works, but several of its numbers are estimates from the schematic and datasheets. Each measurement below replaces one of those estimates with a real value. The most valuable are marked <strong>priority<\/strong>.<\/p>\n<p>Part numbers and pins refer to the DSK-8 main board schematic, drawing 4010003401, sheets 1 (analog, rev G, 1985) and 2 (digital). Please note your board&#8217;s revision if it differs.<\/p>\n<p><strong>Equipment:<\/strong> a two-channel oscilloscope (20 MHz or better), a multimeter, a MIDI interface, and a Mirage OS boot disk. A frequency counter or a scope with a frequency readout saves time.<\/p>\n<p><strong>Safety:<\/strong> the power supply carries mains voltage. Everything here is on the main board&#8217;s low-voltage side (+5 V, +12 V, ?8 V). Clip the scope ground to board ground, never to a supply rail.<\/p>\n<h2>1. VIA and MIDI clocks (priority)<\/h2>\n<p>These confirm that the 6522 VIA runs at 2 MHz and that its PB7 output makes the 500 kHz MIDI clock. MAME&#8217;s change to the 6522 core rests on this. Measure after the OS has loaded from disk.<\/p>\n<table>\n<thead>\n<tr>\n<th>Signal<\/th>\n<th>Where<\/th>\n<th>Record<\/th>\n<th>Expected<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>CAS (VIA ?2)<\/td>\n<td>U9 pin 25, also U12 pin 14<\/td>\n<td>Frequency, duty cycle<\/td>\n<td>2 MHz<\/td>\n<\/tr>\n<tr>\n<td>CPU E (ED)<\/td>\n<td>U15 pin 34<\/td>\n<td>Frequency, phase relative to CAS<\/td>\n<td>2 MHz<\/td>\n<\/tr>\n<tr>\n<td>SERCLK (VIA PB7)<\/td>\n<td>U9 pin 17, also U12 pins 3 and 4<\/td>\n<td>Frequency, duty cycle<\/td>\n<td>500 kHz square wave<\/td>\n<\/tr>\n<tr>\n<td>CA3 (to VIA PB5)<\/td>\n<td>U9 pin 15<\/td>\n<td>Frequency<\/td>\n<td>500 kHz (8 MHz \u00f7 16)<\/td>\n<\/tr>\n<tr>\n<td>8 MHz master<\/td>\n<td>U11 or U13 clock input<\/td>\n<td>Frequency<\/td>\n<td>8 MHz<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Also useful: whether SERCLK is present before the disk loads, and when it first starts.<\/p>\n<h2>2. Filter control voltages<\/h2>\n<p>These check the chain from the CV DAC (U41, AD7524) to each filter&#8217;s control pins. The emulation assumes the DAC spans 0 to +5.08 V (about 19.9 mV per step) and that the hold buffers have unity gain.<\/p>\n<table>\n<thead>\n<tr>\n<th>Signal<\/th>\n<th>Where<\/th>\n<th>Record<\/th>\n<th>Expected<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>DAC reference (CVREF)<\/td>\n<td>U41 pin 15<\/td>\n<td>DC voltage<\/td>\n<td>?5.1 V (zener CR4)<\/td>\n<\/tr>\n<tr>\n<td>CV I\/V output<\/td>\n<td>U56 pin 14<\/td>\n<td>Waveform: the DAC steps as each voice is refreshed<\/td>\n<td>0 to +5.08 V<\/td>\n<\/tr>\n<tr>\n<td>Held cutoff, voice 1 (VF1)<\/td>\n<td>U61 pin 8<\/td>\n<td>DC level and droop between refreshes (AC-coupled)<\/td>\n<td>Steady; droop under 1 step<\/td>\n<\/tr>\n<tr>\n<td>Held resonance, voice 1 (VQ1)<\/td>\n<td>U66 pin 8<\/td>\n<td>DC level<\/td>\n<td>0 to +5.08 V<\/td>\n<\/tr>\n<tr>\n<td>CEM3328 pin 2, voice 1<\/td>\n<td>U67 pin 2<\/td>\n<td>DC level, with VF1 measured at the same moment<\/td>\n<td>0.0355 \u00d7 VF1 ? 0.048 V<\/td>\n<\/tr>\n<tr>\n<td>CEM3328 pin 3 (I_REF), voice 1<\/td>\n<td>U67 pin 3<\/td>\n<td>DC level<\/td>\n<td>About ?7.3 V<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The pin 2 line is the most useful: three or four readings of VF1 against pin 2 confirm the 27K \/ 160K \/ 1K network.<\/p>\n<h2>3. CEM3328 filter response (priority)<\/h2>\n<p>The filter model uses the datasheet&#8217;s typical figures: 20 mV per octave, and about 105 Hz at 0 V on pin 2 with the Mirage&#8217;s parts. A self-oscillating filter makes a clean sine at its cutoff, so its frequency can be read straight off the output.<\/p>\n<ol>\n<li><strong>Cutoff curve.<\/strong> Set a sound&#8217;s resonance to maximum so voice 1 oscillates. Step the filter cutoff parameter through five or more values from low to high. At each step record U67 pin 2 (DC) and the frequency at U67 pin 9 (output). This gives the real scale factor and base frequency.<\/li>\n<li><strong>Oscillation threshold.<\/strong> With the cutoff mid-range, raise resonance one step at a time. Record U67 pin 10 at the first step that oscillates. Datasheet: 2.7 to 3.7 V, typically 3.2 V.<\/li>\n<li><strong>Oscillation level.<\/strong> At maximum resonance, record the peak-to-peak voltage at U67 pin 9. Datasheet: about 2.3 V.<\/li>\n<li><strong>Resonance curve.<\/strong> At three or four resonance settings below oscillation, play a note and record the output level relative to resonance off. The datasheet only calls this a &#8220;reverse audio taper&#8221;, and the model&#8217;s curve is a guess.<\/li>\n<li><strong>Voice-to-voice spread.<\/strong> With all voices at the same cutoff and maximum resonance, record each voice&#8217;s oscillation frequency (VCF1\u20138: U67, U68, U62, U63, U57, U58, U52, U53, pin 9). This shows how far real chips differ.<\/li>\n<\/ol>\n<h2>4. Audio levels (priority)<\/h2>\n<p>The emulation assumes a full-scale voice drives the CEM3328 to its rated 6.5 V p-p, because the DOC&#8217;s output current isn&#8217;t on the schematic. Measuring the real levels replaces that assumption.<\/p>\n<p>Use one sustained note at maximum velocity, with the filter fully open and resonance off. Record peak-to-peak voltage at each point, then repeat with eight notes held.<\/p>\n<table>\n<thead>\n<tr>\n<th>Point<\/th>\n<th>Where<\/th>\n<th>1 note (V p-p)<\/th>\n<th>8 notes (V p-p)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>DOC difference amp output<\/td>\n<td>U46 pin 6 (U47 pin 3)<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Voice 1 audio line (AF1)<\/td>\n<td>U47 pin 13<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>CEM3328 signal input, voice 1<\/td>\n<td>U67 pin 6<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>CEM3328 output, voice 1<\/td>\n<td>U67 pin 9<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Summer output<\/td>\n<td>U56 pin 7<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td>Audio out jack, volume at maximum<\/td>\n<td>J12<\/td>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Please note the volume knob position and the sound used.<\/p>\n<h2>5. Filter calibration at boot<\/h2>\n<p>Right after the OS loads, the firmware tunes each filter: it makes the filter oscillate, counts the cycles through the ADC, and adjusts the cutoff until 4 periods take about 130 ADC reads. MAME has no way to feed real filter output to its ADC, so it substitutes a modeled sine for each oscillating filter.<\/p>\n<ol>\n<li>Trigger on the disk motor stopping after the OS load. Capture the summer output (U56 pin 7) and the ADC input path (U45 pin 13, COM X) for the next second.<\/li>\n<li>Record the waveform&#8217;s amplitude and frequency at the ADC input. The firmware&#8217;s thresholds are $90 and $70, so the signal must swing well past both.<\/li>\n<li>Record whether all eight voices oscillate together, or one at a time. The firmware leaves earlier voices at full resonance while tuning later ones, which suggests all together.<\/li>\n<li>Record each voice&#8217;s final oscillation frequency once calibration ends, from its pin 9.<\/li>\n<\/ol>\n<h2>6. Keyboard controller link<\/h2>\n<p>The keyboard&#8217;s R6500\/11 has an undumped internal ROM, so MAME imitates it from the main CPU&#8217;s side. Each key sends three bytes ($90 down or $80 up, key number 0\u201360, velocity) into the VIA shift register. The CPU acknowledges each byte with a low pulse on CA2. The timing and the velocity values are guesses.<\/p>\n<p>Capture SCLK (U9 pin 18, CB1) and SDATA (U9 pin 19, CB2) on the two channels, then SCLK and SACK (U9 pin 39, CA2).<\/p>\n<ol>\n<li>Shift clock rate, and the gap between bytes within one message.<\/li>\n<li>Whether the controller waits for each CA2 pulse before sending the next byte, and the pulse&#8217;s width.<\/li>\n<li>The velocity byte for a very soft, a medium and a very hard press of the same key. Decode it from SDATA, most significant bit first.<\/li>\n<li>What the sustain pedal sends when pressed and released. The OS understands $B8 and $B9.<\/li>\n<li>Any bytes sent at power-on, before a key is pressed, and the state of VIA PB4 (U9 pin 14, which also resets the controller) during boot.<\/li>\n<\/ol>\n<h2>Sending results<\/h2>\n<p>Partial results help: sections 1, 3 and 4 alone would settle the biggest open questions.<\/p>\n<ul>\n<li>Contact me with your readings.<\/li>\n<li>Attach scope screenshots with the timebase and volts per division visible.<\/li>\n<li>Note your model (DSK-8 or DSK-1), board revision, OS disk version, and the date codes printed on the CEM3328 chips.<\/li>\n<li>If you measure several voices, say which VCF each reading came from.<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Ensoniq Mirage: Measurements Wanted Why these measurements MAME&#8217;s Ensoniq Mirage emulation (ensoniq\/enmirage.cpp, sound\/cem3328.cpp) works, but several of its numbers are estimates from the schematic and datasheets. Each measurement below replaces one of those estimates with a real value. The most &hellip; <a href=\"https:\/\/tlindner.macmess.org\/?p=1133\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1133","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/tlindner.macmess.org\/index.php?rest_route=\/wp\/v2\/posts\/1133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tlindner.macmess.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tlindner.macmess.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tlindner.macmess.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tlindner.macmess.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1133"}],"version-history":[{"count":2,"href":"https:\/\/tlindner.macmess.org\/index.php?rest_route=\/wp\/v2\/posts\/1133\/revisions"}],"predecessor-version":[{"id":1135,"href":"https:\/\/tlindner.macmess.org\/index.php?rest_route=\/wp\/v2\/posts\/1133\/revisions\/1135"}],"wp:attachment":[{"href":"https:\/\/tlindner.macmess.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tlindner.macmess.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tlindner.macmess.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}