yamaha/ymdx100.cpp: Implemented most of the Yamaha DX100 emulation. (#9278)

* Includes controls, cassette interface, and an internal layout.
* Currently using YM2151 in place of unemulated YM2164 sound engine.
* Thanks to Devin Acker for assistance.

Machines promoted to working
----------------------
Yamaha DX100 Digital Programmable Algorithm Synthesizer [Pietro Gagliardi]
This commit is contained in:
Pietro Gagliardi 2022-12-05 00:59:21 -05:00 committed by GitHub
parent 75d591ad55
commit 9d31030196
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1525 additions and 17 deletions

999
src/mame/layout/dx100.lay Normal file
View File

@ -0,0 +1,999 @@
<?xml version="1.0"?>
<!--
license:CC0
-->
<mamelayout version="2">
<element name="background">
<rect>
<color red="0.15" green="0.15" blue="0.15" />
</rect>
</element>
<element name="inset-background">
<rect><color red="0.05" green="0.05" blue="0.05" /></rect>
</element>
<element name="button-text-separator-blue">
<rect><color red="0.13" green="0.65" blue="0.9" /></rect>
</element>
<element name="button-text-separator-brown">
<rect><color red="0.72" green="0.48" blue="0.33" /></rect>
</element>
<element name="button-membrane-green" defstate="0">
<rect state="0"><color red="0" green="0.8" blue="0.75" /></rect>
<rect state="1"><color red="0" green="0.7" blue="0.6" /></rect>
</element>
<element name="button-membrane-red" defstate="0">
<rect><color red="1.0" green="0" blue="0" /></rect>
</element>
<element name="button-membrane-blue" defstate="0">
<rect><color red="0.13" green="0.65" blue="0.9" /></rect>
</element>
<element name="button-membrane-brown" defstate="0">
<rect><color red="0.72" green="0.48" blue="0.33" /></rect>
</element>
<!-- Button labels -->
<element name="button-text-white-store"><text align="1" string="STORE" /></element>
<element name="button-text-white-function"><text align="1" string="FUNCTION/" /></element>
<element name="button-text-white-edit"><text align="1" string="EDIT/" /></element>
<element name="button-text-white-compare"><text align="1" string="COMPARE" /></element>
<element name="button-text-white-internal"><text align="1" string="INTERNAL" /></element>
<element name="button-text-play">
<rect></rect>
<text align="0" valign="0" string="PLAY">
<color red="0.15" green="0.15" blue="0.15" />
</text>
</element>
<element name="button-text-white-pitch-b"><text align="1" string="PITCH B" /></element>
<element name="button-text-white-mode"><text align="1" string="MODE" /></element>
<element name="button-text-white-key"><text align="1" string="KEY" /></element>
<element name="button-text-white-shift"><text align="1" string="SHIFT" /></element>
<element name="button-text-white-no"><text align="1" string="NO" /></element>
<element name="button-text-white-off"><text align="1" string="OFF" /></element>
<element name="button-text-white-yes"><text align="1" string="YES" /></element>
<element name="button-text-white-on"><text align="1" string="ON" /></element>
<element name="button-text-white-plus-one"><text align="1" string="+1" /></element>
<element name="button-text-white-minus-one"><text align="1" string="-1" /></element>
<element name="button-text-white-bank"><text align="1" string="BANK" /></element>
<element name="button-text-white-right-a"><text align="2" string="A" /></element>
<element name="button-text-white-right-b"><text align="2" string="B" /></element>
<element name="button-text-white-right-c"><text align="2" string="C" /></element>
<element name="button-text-white-right-d"><text align="2" string="D" /></element>
<!-- Numeric Button Label Numbers -->
<element name="button-number-1"><text align="1" string="1" /></element>
<element name="button-number-2"><text align="1" string="2" /></element>
<element name="button-number-3"><text align="1" string="3" /></element>
<element name="button-number-4"><text align="1" string="4" /></element>
<element name="button-number-5"><text align="1" string="5" /></element>
<element name="button-number-6"><text align="1" string="6" /></element>
<element name="button-number-7"><text align="1" string="7" /></element>
<element name="button-number-8"><text align="1" string="8" /></element>
<element name="button-number-9"><text align="1" string="9" /></element>
<element name="button-number-10"><text align="1" string="10" /></element>
<element name="button-number-11"><text align="1" string="11" /></element>
<element name="button-number-12"><text align="1" string="12" /></element>
<element name="button-number-13"><text align="1" string="13" /></element>
<element name="button-number-14"><text align="1" string="14" /></element>
<element name="button-number-15"><text align="1" string="15" /></element>
<element name="button-number-16"><text align="1" string="16" /></element>
<element name="button-number-17"><text align="1" string="17" /></element>
<element name="button-number-18"><text align="1" string="18" /></element>
<element name="button-number-19"><text align="1" string="19" /></element>
<element name="button-number-20"><text align="1" string="20" /></element>
<element name="button-number-21"><text align="1" string="21" /></element>
<element name="button-number-22"><text align="1" string="22" /></element>
<element name="button-number-23"><text align="1" string="23" /></element>
<element name="button-number-24"><text align="1" string="24" /></element>
<element name="button-text-blue-eg-copy">
<text align="1" string="EG COPY">
<color red="0.13" green="0.65" blue="0.9" />
</text>
</element>
<element name="button-text-blue-1">
<text align="1" string="1"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-2">
<text align="1" string="2"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-3">
<text align="1" string="3"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-4">
<text align="1" string="4"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-operator-ams-on-off">
<text align="1" string="OPERATOR/AMS ON-OFF"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-algorithm">
<text align="1" string="ALGORITHM"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-feedback">
<text align="1" string="FEEDBACK"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-lfo">
<text align="1" string="LFO"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-wave">
<text align="1" string="WAVE"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-speed">
<text align="1" string="SPEED"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-delay">
<text align="1" string="DELAY"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-pmd">
<text align="1" string="PMD"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-amd">
<text align="1" string="AMD"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-sync">
<text align="1" string="SYNC"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-modulation-sensitivity">
<text align="1" string="MODULATION SENSITIVITY"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-pitch">
<text align="1" string="PITCH"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-amplitude">
<text align="1" string="AMPLITUDE"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-eg-bias">
<text align="1" string="EG BIAS"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-key-velocity">
<text align="1" string="KEY VELOCITY"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-brown-master">
<text align="1" string="MASTER"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-tune-adj">
<text align="1" string="TUNE ADJ"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-preset-search">
<text align="1" string="PRESET SEARCH"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-101-124">
<text align="1" string="101~124"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-201-224">
<text align="1" string="201~224"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-301-324">
<text align="1" string="301~324"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-401-424">
<text align="1" string="401~424"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-midi">
<text align="1" string="MIDI"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-on-off">
<text align="1" string="ON-OFF"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-channel">
<text align="1" string="CHANNEL"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-ch-info">
<text align="1" string="CH INFO"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-sys-info">
<text align="1" string="SYS INFO"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-recall">
<text align="1" string="RECALL"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-edit">
<text align="1" string="EDIT"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-init">
<text align="1" string="INIT"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-voice">
<text align="1" string="VOICE"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-bank">
<text align="1" string="BANK"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-poly-mono">
<text align="1" string="POLY/MONO"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-pitch-bend">
<text align="1" string="PITCH BEND"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-range">
<text align="1" string="RANGE"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-portamento">
<text align="1" string="PORTAMENTO"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-mode">
<text align="1" string="MODE"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-time">
<text align="1" string="TIME"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-foot-sw">
<text align="1" string="FOOT SW"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-assign">
<text align="1" string="ASSIGN"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-voice-name">
<text align="1" string="VOICE NAME"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-cursor-right">
<text align="1" string="CURSOR >"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-wheel-range">
<text align="1" string="WHEEL RANGE"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-cassette">
<text align="1" string="CASSETTE"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-save-verify">
<text align="1" string="SAVE/VERIFY"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-load">
<text align="1" string="LOAD"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-load-single">
<text align="1" string="LOAD SINGLE"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-blue-operator">
<text align="1" string="OPERATOR"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-select">
<text align="1" string="SELECT"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-oscillator">
<text align="1" string="OSCILLATOR"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-freq-ratio">
<text align="1" string="FREQ RATIO"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-detune">
<text align="1" string="DETUNE"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-envelope-generator">
<text align="1" string="ENVELOPE GENERATOR"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-ar">
<text align="1" string="AR"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-d1r">
<text align="1" string="D1R"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-d1l">
<text align="1" string="D1L"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-d2r">
<text align="1" string="D2R"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-rr">
<text align="1" string="RR"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-rate">
<text align="1" string="RATE"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-level">
<text align="1" string="LEVEL"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-keyboard-scaling">
<text align="1" string="KEYBOARD SCALING"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-out-level">
<text align="1" string="OUT LEVEL"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-blue-transpose">
<text align="1" string="TRANSPOSE"><color red="0.13" green="0.65" blue="0.9" /></text>
</element>
<element name="button-text-brown-pitch">
<text align="1" string="PITCH"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-amplitude">
<text align="1" string="AMPLITUDE"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-pitch-bias">
<text align="1" string="PITCH BIAS"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-eg-bias">
<text align="1" string="EG BIAS"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-breath-range">
<text align="1" string="BREATH RANGE"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-memory">
<text align="1" string="MEMORY"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-protect">
<text align="1" string="PROTECT"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-mode-set">
<text align="1" string="MODE SET"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="button-text-brown-key-set">
<text align="1" string="KEY SET"><color red="0.72" green="0.48" blue="0.33" /></text>
</element>
<element name="led">
<rect>
<bounds x="0" y="0" width="24" height="4" />
</rect>
</element>
<group name="group-screen-inset">
<element ref="inset-background">
<bounds x="0" y="0" width="500" height="96" />
</element>
<screen index="0">
<bounds x="56" y="26" width="388" height="44" />
</screen>
<element ref="led">
<bounds x="460" y="46" width="24" height="4" />
<animate name="LED" />
<color state="0" red="0.9" green="0.2" blue="0.2" />
<color state="1" red="0.4" green="0.0" blue="0.0" />
</element>
</group>
<!-- Numeric Buttons Row 1 -->
<group name="front-panel-buttons-row-1">
<!-- Pitch Bend Mode -->
<element ref="button-text-blue-operator"><bounds x="0" y="4" width="72" height="16" /></element>
<element ref="button-text-blue-select"><bounds x="0" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_0" inputmask="0x40">
<bounds x="0" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-pitch-b"><bounds x="4" y="34" width="64" height="15" /></element>
<element ref="button-text-white-mode"><bounds x="4" y="49" width="64" height="15" /></element>
<element ref="button-text-brown-mode-set"><bounds x="0" y="64" width="72" height="16" /></element>
<!-- Key Shift -->
<element ref="button-membrane-green" inputtag="P6_0" inputmask="0x80">
<bounds x="80" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-key"><bounds x="84" y="34" width="64" height="15" /></element>
<element ref="button-text-white-shift"><bounds x="84" y="49" width="64" height="15" /></element>
<element ref="button-text-brown-key-set"><bounds x="80" y="64" width="72" height="16" /></element>
<!-- Store -->
<element ref="button-text-blue-eg-copy"><bounds x="168" y="16" width="72" height="16" /></element>
<element ref="button-membrane-red" inputtag="P6_0" inputmask="0x04">
<bounds x="168" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-store"><bounds x="172" y="34" width="64" height="15" /></element>
<!-- Function/Compare -->
<element ref="button-membrane-brown" inputtag="P6_0" inputmask="0x08">
<bounds x="248" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-function"><bounds x="252" y="34" width="64" height="15" /></element>
<element ref="button-text-white-compare"><bounds x="252" y="49" width="64" height="15" /></element>
<!-- Bank A -->
<element ref="button-text-blue-operator-ams-on-off"><bounds x="336" y="0" width="152" height="16" /></element>
<element ref="button-text-separator-blue"><bounds x="336" y="16" width="152" height="1" /></element>
<element ref="button-text-blue-1"><bounds x="336" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_5" inputmask="0x80">
<bounds x="336" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-bank"><bounds x="340" y="34" width="64" height="15" /></element>
<element ref="button-text-white-right-a"><bounds x="340" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-101-124"><bounds x="336" y="64" width="72" height="16" /></element>
<element ref="button-text-separator-brown"><bounds x="336" y="80" width="152" height="1" /></element>
<element ref="button-text-brown-preset-search"><bounds x="336" y="80" width="152" height="16" /></element>
<!-- Bank B -->
<element ref="button-text-blue-2"><bounds x="416" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_5" inputmask="0x40">
<bounds x="416" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-bank"><bounds x="420" y="34" width="64" height="15" /></element>
<element ref="button-text-white-right-b"><bounds x="420" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-201-224"><bounds x="416" y="64" width="72" height="16" /></element>
<!-- Button 1 -->
<element ref="button-text-blue-algorithm"><bounds x="504" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_1" inputmask="0x01">
<bounds x="504" y="32" width="72" height="32" />
</element>
<element ref="button-number-1"><bounds x="508" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-master"><bounds x="504" y="64" width="72" height="16" /></element>
<element ref="button-text-brown-tune-adj"><bounds x="504" y="76" width="72" height="16" /></element>
<!-- Button 2 -->
<element ref="button-text-blue-feedback"><bounds x="584" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_1" inputmask="0x02">
<bounds x="584" y="32" width="72" height="32" />
</element>
<element ref="button-number-2"><bounds x="588" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-on-off"><bounds x="584" y="64" width="72" height="16" /></element>
<element ref="button-text-separator-brown"><bounds x="584" y="80" width="316" height="1" /></element>
<element ref="button-text-brown-midi"><bounds x="584" y="80" width="316" height="16" /></element>
<!-- Button 3 -->
<element ref="button-text-blue-lfo"><bounds x="664" y="0" width="472" height="16" /></element>
<element ref="button-text-separator-blue"><bounds x="664" y="16" width="472" height="1" /></element>
<element ref="button-text-blue-wave"><bounds x="664" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_1" inputmask="0x04">
<bounds x="664" y="32" width="72" height="32" />
</element>
<element ref="button-number-3"><bounds x="668" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-channel"><bounds x="664" y="64" width="72" height="16" /></element>
<!-- Button 4 -->
<element ref="button-text-blue-speed"><bounds x="744" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_1" inputmask="0x08">
<bounds x="744" y="32" width="72" height="32" />
</element>
<element ref="button-number-4"><bounds x="748" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-ch-info"><bounds x="744" y="64" width="72" height="16" /></element>
<!-- Button 5 -->
<element ref="button-text-blue-delay"><bounds x="824" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_1" inputmask="0x10">
<bounds x="824" y="32" width="72" height="32" />
</element>
<element ref="button-number-5"><bounds x="828" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-sys-info"><bounds x="824" y="64" width="72" height="16" /></element>
<!-- Button 6 -->
<element ref="button-text-blue-pmd"><bounds x="904" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_1" inputmask="0x20">
<bounds x="904" y="32" width="72" height="32" />
</element>
<element ref="button-number-6"><bounds x="908" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-recall"><bounds x="904" y="64" width="72" height="16" /></element>
<element ref="button-text-brown-edit"><bounds x="904" y="76" width="72" height="16" /></element>
<!-- Button 7 -->
<element ref="button-text-blue-amd"><bounds x="984" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_1" inputmask="0x40">
<bounds x="984" y="32" width="72" height="32" />
</element>
<element ref="button-number-7"><bounds x="988" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-init"><bounds x="984" y="64" width="72" height="16" /></element>
<element ref="button-text-brown-voice"><bounds x="984" y="76" width="72" height="16" /></element>
<!-- Button 8 -->
<element ref="button-text-blue-sync"><bounds x="1064" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_1" inputmask="0x80">
<bounds x="1064" y="32" width="72" height="32" />
</element>
<element ref="button-number-8"><bounds x="1068" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-load"><bounds x="1064" y="64" width="72" height="16" /></element>
<element ref="button-text-brown-bank"><bounds x="1064" y="76" width="72" height="16" /></element>
<!-- Button 9 -->
<element ref="button-text-blue-modulation-sensitivity"><bounds x="1144" y="0" width="232" height="16" /></element>
<element ref="button-text-separator-blue"><bounds x="1144" y="16" width="232" height="1" /></element>
<element ref="button-text-blue-pitch"><bounds x="1144" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_2" inputmask="0x01">
<bounds x="1144" y="32" width="72" height="32" />
</element>
<element ref="button-number-9"><bounds x="1148" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-save-verify"><bounds x="1144" y="64" width="72" height="16" /></element>
<element ref="button-text-separator-brown"><bounds x="1144" y="80" width="232" height="1" /></element>
<element ref="button-text-brown-cassette"><bounds x="1144" y="80" width="232" height="16" /></element>
<!-- Button 10 -->
<element ref="button-text-blue-amplitude"><bounds x="1224" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_2" inputmask="0x02">
<bounds x="1224" y="32" width="72" height="32" />
</element>
<element ref="button-number-10"><bounds x="1228" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-load"><bounds x="1224" y="64" width="72" height="16" /></element>
<!-- Button 11 -->
<element ref="button-text-blue-eg-bias"><bounds x="1304" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_2" inputmask="0x04">
<bounds x="1304" y="32" width="72" height="32" />
</element>
<element ref="button-number-11"><bounds x="1308" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-load-single"><bounds x="1304" y="64" width="72" height="16" /></element>
<!-- Button 12 -->
<element ref="button-text-blue-key-velocity"><bounds x="1384" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_2" inputmask="0x08">
<bounds x="1384" y="32" width="72" height="32" />
</element>
<element ref="button-number-12"><bounds x="1388" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-memory"><bounds x="1384" y="64" width="72" height="16" /></element>
<element ref="button-text-brown-protect"><bounds x="1384" y="76" width="72" height="16" /></element>
</group>
<!-- Numeric Buttons Row 2 -->
<group name="front-panel-buttons-row-2">
<!-- Data Entry -1 -->
<element ref="button-text-white-no"><bounds x="0" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_0" inputmask="0x02">
<bounds x="0" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-minus-one"><bounds x="4" y="34" width="64" height="28" /></element>
<element ref="button-text-white-off"><bounds x="0" y="64" width="72" height="16" /></element>
<!-- Data Entry +1 -->
<element ref="button-text-white-yes"><bounds x="80" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_0" inputmask="0x01">
<bounds x="80" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-plus-one"><bounds x="84" y="34" width="64" height="28" /></element>
<element ref="button-text-white-on"><bounds x="80" y="64" width="72" height="16" /></element>
<!-- Edit/Compare -->
<element ref="button-membrane-blue" inputtag="P6_0" inputmask="0x10">
<bounds x="168" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-edit"><bounds x="172" y="34" width="64" height="15" /></element>
<element ref="button-text-white-compare"><bounds x="172" y="49" width="64" height="15" /></element>
<!-- Internal -->
<element ref="button-membrane-green" inputtag="P6_0" inputmask="0x20">
<bounds x="248" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-internal"><bounds x="252" y="34" width="64" height="15" /></element>
<element ref="button-text-play"><bounds x="248" y="64" width="72" height="16" /></element>
<!-- Bank C -->
<element ref="button-text-blue-operator-ams-on-off"><bounds x="336" y="0" width="152" height="16" /></element>
<element ref="button-text-separator-blue"><bounds x="336" y="16" width="152" height="1" /></element>
<element ref="button-text-blue-3"><bounds x="336" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_4" inputmask="0x80">
<bounds x="336" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-bank"><bounds x="340" y="34" width="64" height="15" /></element>
<element ref="button-text-white-right-c"><bounds x="340" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-301-324"><bounds x="336" y="64" width="72" height="16" /></element>
<element ref="button-text-separator-brown"><bounds x="336" y="80" width="152" height="1" /></element>
<element ref="button-text-brown-preset-search"><bounds x="336" y="80" width="152" height="16" /></element>
<!-- Bank D -->
<element ref="button-text-blue-4"><bounds x="416" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_4" inputmask="0x40">
<bounds x="416" y="32" width="72" height="32" />
</element>
<element ref="button-text-white-bank"><bounds x="420" y="34" width="64" height="15" /></element>
<element ref="button-text-white-right-d"><bounds x="420" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-401-424"><bounds x="416" y="64" width="72" height="16" /></element>
<!-- Button 13 -->
<element ref="button-text-blue-oscillator"><bounds x="504" y="0" width="152" height="16" /></element>
<element ref="button-text-separator-blue"><bounds x="504" y="16" width="152" height="1" /></element>
<element ref="button-text-blue-freq-ratio"><bounds x="504" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_2" inputmask="0x10">
<bounds x="504" y="32" width="72" height="32" />
</element>
<element ref="button-number-13"><bounds x="508" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-poly-mono"><bounds x="504" y="64" width="72" height="16" /></element>
<!-- Button 14 -->
<element ref="button-text-blue-detune"><bounds x="584" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_2" inputmask="0x20">
<bounds x="584" y="32" width="72" height="32" />
</element>
<element ref="button-number-14"><bounds x="588" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-pitch-bend"><bounds x="584" y="64" width="72" height="16" /></element>
<element ref="button-text-brown-range"><bounds x="584" y="76" width="72" height="16" /></element>
<!-- Button 15 -->
<element ref="button-text-blue-envelope-generator"><bounds x="664" y="0" width="394" height="16" /></element>
<element ref="button-text-separator-blue"><bounds x="664" y="16" width="394" height="1" /></element>
<element ref="button-text-blue-ar"><bounds x="664" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_2" inputmask="0x40">
<bounds x="664" y="32" width="72" height="32" />
</element>
<element ref="button-number-15"><bounds x="668" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-mode"><bounds x="664" y="64" width="72" height="16" /></element>
<element ref="button-text-separator-brown"><bounds x="664" y="80" width="152" height="1" /></element>
<element ref="button-text-brown-portamento"><bounds x="664" y="80" width="152" height="16" /></element>
<!-- Button 16 -->
<element ref="button-text-blue-d1r"><bounds x="744" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_2" inputmask="0x80">
<bounds x="744" y="32" width="72" height="32" />
</element>
<element ref="button-number-16"><bounds x="748" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-time"><bounds x="744" y="64" width="72" height="16" /></element>
<!-- Button 17 -->
<element ref="button-text-blue-d1l"><bounds x="824" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_3" inputmask="0x01">
<bounds x="824" y="32" width="72" height="32" />
</element>
<element ref="button-number-17"><bounds x="828" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-foot-sw"><bounds x="824" y="64" width="72" height="16" /></element>
<element ref="button-text-brown-assign"><bounds x="824" y="76" width="72" height="16" /></element>
<!-- Button 18 -->
<element ref="button-text-blue-d2r"><bounds x="904" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_3" inputmask="0x02">
<bounds x="904" y="32" width="72" height="32" />
</element>
<element ref="button-number-18"><bounds x="908" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-pitch"><bounds x="904" y="64" width="72" height="16" /></element>
<element ref="button-text-separator-brown"><bounds x="904" y="80" width="152" height="1" /></element>
<element ref="button-text-brown-wheel-range"><bounds x="904" y="80" width="152" height="16" /></element>
<!-- Button 19 -->
<element ref="button-text-blue-rr"><bounds x="984" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_3" inputmask="0x04">
<bounds x="984" y="32" width="72" height="32" />
</element>
<element ref="button-number-19"><bounds x="988" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-amplitude"><bounds x="984" y="64" width="72" height="16" /></element>
<!-- Button 20 -->
<element ref="button-text-blue-operator"><bounds x="1064" y="0" width="72" height="16" /></element>
<element ref="button-text-separator-blue"><bounds x="1064" y="16" width="72" height="1" /></element>
<element ref="button-text-blue-out-level"><bounds x="1064" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_3" inputmask="0x08">
<bounds x="1064" y="32" width="72" height="32" />
</element>
<element ref="button-number-20"><bounds x="1068" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-pitch"><bounds x="1064" y="64" width="72" height="16" /></element>
<element ref="button-text-separator-brown"><bounds x="1064" y="80" width="312" height="1" /></element>
<element ref="button-text-brown-breath-range"><bounds x="1064" y="80" width="150" height="16" /></element>
<!-- Button 21 -->
<element ref="button-text-blue-keyboard-scaling"><bounds x="1144" y="0" width="152" height="16" /></element>
<element ref="button-text-separator-blue"><bounds x="1144" y="16" width="152" height="1" /></element>
<element ref="button-text-blue-rate"><bounds x="1144" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_3" inputmask="0x10">
<bounds x="1144" y="32" width="72" height="32" />
</element>
<element ref="button-number-21"><bounds x="1148" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-amplitude"><bounds x="1144" y="64" width="72" height="16" /></element>
<!-- Button 22 -->
<element ref="button-text-blue-level"><bounds x="1224" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_3" inputmask="0x20">
<bounds x="1224" y="32" width="72" height="32" />
</element>
<element ref="button-number-22"><bounds x="1228" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-pitch-bias"><bounds x="1224" y="64" width="72" height="16" /></element>
<!-- Button 23 -->
<element ref="button-text-blue-transpose"><bounds x="1304" y="16" width="72" height="16" /></element>
<element ref="button-membrane-green" inputtag="P6_3" inputmask="0x40">
<bounds x="1304" y="32" width="72" height="32" />
</element>
<element ref="button-number-23"><bounds x="1308" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-eg-bias"><bounds x="1304" y="64" width="72" height="16" /></element>
<!-- Button 24 -->
<element ref="button-membrane-green" inputtag="P6_3" inputmask="0x80">
<bounds x="1384" y="32" width="72" height="32" />
</element>
<element ref="button-number-24"><bounds x="1388" y="34" width="64" height="28" /></element>
<element ref="button-text-brown-voice-name"><bounds x="1384" y="64" width="72" height="16" /></element>
<element ref="button-text-brown-cursor-right"><bounds x="1384" y="76" width="72" height="16" /></element>
</group>
<element name="logo-yamaha">
<text align="1" string="YAMAHA" />
</element>
<element name="logo-dx100">
<text align="1" string="DX100" />
</element>
<element name="logo-digital">
<text align="1" string="DIGITAL PROGRAMMABLE ALGORITHM SYNTHESIZER" />
</element>
<group name="group-logo">
<element ref="logo-yamaha">
<bounds x="0" y="0" width="450" height="32" />
</element>
<element ref="logo-dx100">
<bounds x="0" y="32" width="450" height="48" />
</element>
<element ref="logo-digital">
<bounds x="0" y="80" width="450" height="16"/>
</element>
</group>
<element name="keyfill"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
<element name="whitekey" defstate="0">
<rect state="0"><bounds x="0" y="0" width="45" height="504" /><color red="1.0" green="1.0" blue="1.0" /></rect>
<rect state="1"><bounds x="0" y="0" width="45" height="504" /><color red="0.9" green="0.9" blue="0.9" /></rect>
</element>
<element name="whitekey-l" defstate="0">
<rect state="0"><bounds x="0" y="0" width="45" height="280" /><color red="1.0" green="1.0" blue="1.0" /></rect>
<rect state="0"><bounds x="0" y="280" width="79" height="224" /><color red="1.0" green="1.0" blue="1.0" /></rect>
<rect state="1"><bounds x="0" y="0" width="45" height="280" /><color red="0.9" green="0.9" blue="0.9" /></rect>
<rect state="1"><bounds x="0" y="280" width="79" height="224" /><color red="0.9" green="0.9" blue="0.9" /></rect>
</element>
<element name="whitekey-m" defstate="0">
<rect state="0"><bounds x="13" y="0" width="53" height="280" /><color red="1.0" green="1.0" blue="1.0" /></rect>
<rect state="0"><bounds x="0" y="280" width="79" height="224" /><color red="1.0" green="1.0" blue="1.0" /></rect>
<rect state="1"><bounds x="13" y="0" width="53" height="280" /><color red="0.9" green="0.9" blue="0.9" /></rect>
<rect state="1"><bounds x="0" y="280" width="79" height="224" /><color red="0.9" green="0.9" blue="0.9" /></rect>
</element>
<element name="whitekey-lm" defstate="0">
<rect state="0"><bounds x="10" y="0" width="44" height="280" /><color red="1.0" green="1.0" blue="1.0" /></rect>
<rect state="0"><bounds x="0" y="280" width="79" height="224" /><color red="1.0" green="1.0" blue="1.0" /></rect>
<rect state="1"><bounds x="10" y="0" width="44" height="280" /><color red="0.9" green="0.9" blue="0.9" /></rect>
<rect state="1"><bounds x="0" y="280" width="79" height="224" /><color red="0.9" green="0.9" blue="0.9" /></rect>
</element>
<element name="whitekey-rm" defstate="0">
<rect state="0"><bounds x="22" y="0" width="44" height="280" /><color red="1.0" green="1.0" blue="1.0" /></rect>
<rect state="0"><bounds x="0" y="280" width="79" height="224" /><color red="1.0" green="1.0" blue="1.0" /></rect>
<rect state="1"><bounds x="22" y="0" width="44" height="280" /><color red="0.9" green="0.9" blue="0.9" /></rect>
<rect state="1"><bounds x="0" y="280" width="79" height="224" /><color red="0.9" green="0.9" blue="0.9" /></rect>
</element>
<element name="whitekey-r" defstate="0">
<rect state="0"><bounds x="34" y="0" width="45" height="280" /><color red="1.0" green="1.0" blue="1.0" /></rect>
<rect state="0"><bounds x="0" y="280" width="79" height="224" /><color red="1.0" green="1.0" blue="1.0" /></rect>
<rect state="1"><bounds x="34" y="0" width="45" height="280" /><color red="0.9" green="0.9" blue="0.9" /></rect>
<rect state="1"><bounds x="0" y="280" width="79" height="224" /><color red="0.9" green="0.9" blue="0.9" /></rect>
</element>
<element name="blackkey" defstate="0">
<rect state="0"><bounds x="0" y="0" width="44" height="272" /><color red="0.0" green="0.0" blue="0.0" /></rect>
<rect state="0"><bounds x="4" y="0" width="36" height="268" /><color red="0.1" green="0.1" blue="0.1" /></rect>
<rect state="1"><bounds x="0" y="0" width="44" height="272" /><color red="0.1" green="0.1" blue="0.1" /></rect>
<rect state="1"><bounds x="4" y="0" width="36" height="268" /><color red="0.1" green="0.1" blue="0.1" /></rect>
</element>
<group name="keyboard">
<element ref="keyfill"><bounds x="564" y="494" width="2395" height="524" /></element>
<!-- key layout:
wwwww bbbbbb wwwwwww bbbbbbbb wwwwwwww wwwwwwww bbbbbbbb wwwwwwww bbbbbbbb wwwwwwww bbbbbbbb wwwwwwww
45 44 53 44 45 45 44 44 44 44 44 45
0->45 48->92 95->148 151->195 198->243 243->288 291->335 338->382 385->429 432->476 479->523 526->571
0->79 82->161 164->243 246->325 328->407 410->489 492->571
-->
<!-- octave 0 -->
<element ref="blackkey" inputtag="P6_4" inputmask="0x02"><bounds x="622" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_6" inputmask="0x02"><bounds x="725" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_9" inputmask="0x02"><bounds x="865" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_11" inputmask="0x02"><bounds x="959" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_13" inputmask="0x02"><bounds x="1053" y="504" width="44" height="272" /></element>
<element ref="whitekey-l" inputtag="P6_15" inputmask="0x01"><bounds x="574" y="504" width="79" height="504" /></element>
<element ref="whitekey-m" inputtag="P6_5" inputmask="0x02"><bounds x="656" y="504" width="79" height="504" /></element>
<element ref="whitekey-r" inputtag="P6_7" inputmask="0x02"><bounds x="738" y="504" width="79" height="504" /></element>
<element ref="whitekey-l" inputtag="P6_8" inputmask="0x02"><bounds x="820" y="504" width="79" height="504" /></element>
<element ref="whitekey-lm" inputtag="P6_10" inputmask="0x02"><bounds x="902" y="504" width="79" height="504" /></element>
<element ref="whitekey-rm" inputtag="P6_12" inputmask="0x02"><bounds x="984" y="504" width="79" height="504" /></element>
<element ref="whitekey-r" inputtag="P6_14" inputmask="0x02"><bounds x="1066" y="504" width="79" height="504" /></element>
<!-- octave 1 -->
<element ref="blackkey" inputtag="P6_4" inputmask="0x04"><bounds x="1196" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_6" inputmask="0x04"><bounds x="1299" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_9" inputmask="0x04"><bounds x="1439" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_11" inputmask="0x04"><bounds x="1533" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_13" inputmask="0x04"><bounds x="1627" y="504" width="44" height="272" /></element>
<element ref="whitekey-l" inputtag="P6_15" inputmask="0x02"><bounds x="1148" y="504" width="79" height="504" /></element>
<element ref="whitekey-m" inputtag="P6_5" inputmask="0x04"><bounds x="1230" y="504" width="79" height="504" /></element>
<element ref="whitekey-r" inputtag="P6_7" inputmask="0x04"><bounds x="1312" y="504" width="79" height="504" /></element>
<element ref="whitekey-l" inputtag="P6_8" inputmask="0x04"><bounds x="1394" y="504" width="79" height="504" /></element>
<element ref="whitekey-lm" inputtag="P6_10" inputmask="0x04"><bounds x="1476" y="504" width="79" height="504" /></element>
<element ref="whitekey-rm" inputtag="P6_12" inputmask="0x04"><bounds x="1558" y="504" width="79" height="504" /></element>
<element ref="whitekey-r" inputtag="P6_14" inputmask="0x04"><bounds x="1640" y="504" width="79" height="504" /></element>
<!-- octave 2 -->
<element ref="blackkey" inputtag="P6_4" inputmask="0x08"><bounds x="1770" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_6" inputmask="0x08"><bounds x="1873" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_9" inputmask="0x08"><bounds x="2013" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_11" inputmask="0x08"><bounds x="2107" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_13" inputmask="0x08"><bounds x="2201" y="504" width="44" height="272" /></element>
<element ref="whitekey-l" inputtag="P6_15" inputmask="0x04"><bounds x="1722" y="504" width="79" height="504" /></element>
<element ref="whitekey-m" inputtag="P6_5" inputmask="0x08"><bounds x="1804" y="504" width="79" height="504" /></element>
<element ref="whitekey-r" inputtag="P6_7" inputmask="0x08"><bounds x="1886" y="504" width="79" height="504" /></element>
<element ref="whitekey-l" inputtag="P6_8" inputmask="0x08"><bounds x="1968" y="504" width="79" height="504" /></element>
<element ref="whitekey-lm" inputtag="P6_10" inputmask="0x08"><bounds x="2050" y="504" width="79" height="504" /></element>
<element ref="whitekey-rm" inputtag="P6_12" inputmask="0x08"><bounds x="2132" y="504" width="79" height="504" /></element>
<element ref="whitekey-r" inputtag="P6_14" inputmask="0x08"><bounds x="2214" y="504" width="79" height="504" /></element>
<!-- octave 3 -->
<element ref="blackkey" inputtag="P6_4" inputmask="0x10"><bounds x="2344" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_6" inputmask="0x10"><bounds x="2447" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_9" inputmask="0x10"><bounds x="2587" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_11" inputmask="0x10"><bounds x="2681" y="504" width="44" height="272" /></element>
<element ref="blackkey" inputtag="P6_13" inputmask="0x10"><bounds x="2775" y="504" width="44" height="272" /></element>
<element ref="whitekey-l" inputtag="P6_15" inputmask="0x08"><bounds x="2296" y="504" width="79" height="504" /></element>
<element ref="whitekey-m" inputtag="P6_5" inputmask="0x10"><bounds x="2378" y="504" width="79" height="504" /></element>
<element ref="whitekey-r" inputtag="P6_7" inputmask="0x10"><bounds x="2460" y="504" width="79" height="504" /></element>
<element ref="whitekey-l" inputtag="P6_8" inputmask="0x10"><bounds x="2542" y="504" width="79" height="504" /></element>
<element ref="whitekey-lm" inputtag="P6_10" inputmask="0x10"><bounds x="2624" y="504" width="79" height="504" /></element>
<element ref="whitekey-rm" inputtag="P6_12" inputmask="0x10"><bounds x="2706" y="504" width="79" height="504" /></element>
<element ref="whitekey-r" inputtag="P6_14" inputmask="0x10"><bounds x="2788" y="504" width="79" height="504" /></element>
<!-- final key -->
<element ref="whitekey" inputtag="P6_15" inputmask="0x10"><bounds x="2870" y="504" width="79" height="504" /></element>
</group>
<element name="slider-well">
<rect>
<bounds x="0" y="0" width="72" height="208" />
<color red="0.2" green="0.2" blue="0.2" />
</rect>
<rect>
<bounds x="34" y="48" width="4" height="112" />
<color red="0" green="0" blue="0" />
</rect>
</element>
<element name="slider-nub">
<rect>
<bounds x="0" y="0" width="68" height="10" />
<color red="0" green="0" blue="0" />
</rect>
<rect>
<bounds x="0" y="4" width="68" height="2" />
</rect>
</element>
<element name="slider-tick">
<rect>
<bounds x="0" y="0" width="14" height="1" />
</rect>
</element>
<element name="text-volume"><text align="1" string="VOLUME" /></element>
<element name="text-data-entry"><text align="1" string="DATA ENTRY" /></element>
<element name="text-min"><text align="1" string="MIN" /></element>
<element name="text-max"><text align="1" string="MAX" /></element>
<group name="sliders">
<!-- Volume, which is not emulated in MAME (MAME provides its own volume control) and is therefore pegged to MAX here -->
<element ref="slider-well">
<bounds x="0" y="0" width="72" height="208" />
</element>
<element ref="slider-nub">
<bounds x="2" y="44" width="68" height="6" />
</element>
<element ref="text-volume">
<bounds x="0" y="208" width="72" height="16" />
</element>
<repeat count="13">
<param name="y" start="56" increment="8" />
<element ref="slider-tick">
<bounds x="73" y="~y~" width="14" height="1" />
</element>
</repeat>
<element ref="text-min">
<bounds x="73" y="152" width="14" height="16" />
</element>
<element ref="text-max">
<bounds x="73" y="40" width="14" height="16" />
</element>
<!-- Data Entry -->
<element ref="slider-well">
<bounds x="88" y="0" width="72" height="208" />
</element>
<element ref="slider-nub">
<animate inputtag="AN3" inputmask="0xFF" />
<bounds state="0" x="90" y="156" width="68" height="6" />
<bounds state="255" x="90" y="44" width="68" height="6" />
</element>
<element ref="text-data-entry">
<bounds x="88" y="208" width="72" height="16" />
</element>
<repeat count="13">
<param name="y" start="56" increment="8" />
<element ref="slider-tick">
<bounds x="161" y="~y~" width="14" height="1" />
</element>
</repeat>
</group>
<view name="Standard">
<element ref="background">
<bounds x="0" y="0" width="2228" height="566" />
</element>
<group ref="sliders">
<bounds x="24" y="24" width="175" height="224" />
</group>
<group ref="group-screen-inset">
<bounds x="224" y="24" width="500" height="96" />
</group>
<group ref="front-panel-buttons-row-1">
<bounds x="748" y="24" width="1456" height="96" />
</group>
<group ref="group-logo">
<bounds x="224" y="152" width="500" height="96" />
</group>
<group ref="front-panel-buttons-row-2">
<bounds x="748" y="152" width="1456" height="96" />
</group>
<group ref="keyboard"><bounds x="24" y="280" width="2180" height="262" /></group>
</view>
</mamelayout>

View File

@ -1,12 +1,239 @@
// license:BSD-3-Clause
// copyright-holders:AJR
// copyright-holders:AJR, Pietro Gagliardi
/*******************************************************************************
Skeleton driver for Yamaha DX100 & DX27 FM synthesizers.
Yamaha DX27 and DX100 digital synthesizers
The main differences between DX100 and DX27 are that DX27 has 61 keys
rather than 49, but DX100 is portable and can run on battery power. Their
tone generation capabilities are identical.
The DX27 and DX100 are mid-tier professional synthesizers released by Yamaha
around 1985. The DX27 is a full-size keyboard with 61 full-size keys that can
only run on AC power. The DX100 is a smaller, wearable keyboard with only 49
small-size keys and can run on either AC power or batteries. Both keybaords have
full MIDI in/out/thru, and can also hook up to a Yamaha foot pedal and breath
controller.
Apart from the differences listed above and a few less significant differences,
these two keyboards are largely identical. In fact, they use the exact same
mainboard, with both DX27 and DX100 printed on the silkscreen; a marker was used
to cross out the irrelevant model number during assembly. The front panel and
keyboard decoding circuits differ, as do the LCD/LED screen assemblies.
These two appear to be based on the DX21, a slightly higher-end keyboard released
by Yamaha earlier in 1985 that features a hardware chorus effect (implemented
independently of the FM synthesis chip) and some additional voice parameters (which
appear to be implemented in software). There is also the DX27S, which appears to
be based on the DX27 but adds a few extra features. Neither of these two models
are covered here as of this writing.
The main CPU is a Hitachi HD6303; its I/O circuitry is used extensively.
Some of the controls and inputs are analog; a M58990 ADC chip is used for these.
The FM synthesis chip is the YM2164 "OPP", a proprietary variant of the YM2151
that changes the rate of Timer B, moves the test/LFO reset register, and adds
an additional set of 8 registers used by the breath controller code. This chip
was also used in the DX21 (and possibly also the DX27S), but is perhaps most
famously used by the SFG-05 expansion module for the MSX and the FB-01 standalone
desktop MIDI synthesizer. As these two don't support the breath controller, the
extra registers were totally unused (set to 0 by the firmware), and as a result
sound and behave entirely identically to the YM2151. (Figuring out what these
registers did was part of the impetus for me (Pietro Gagliardi) actually building
this emulation.)
In addition to the independent instruction manuals for the DX27 and DX100, there is
also a single service manual that covers both keyboards (but not the DX27S, curiously
enough). The DX21 service manual comes with an "Overall Circuit Diagram" for that
keyboard; it is likely that the DX27/DX100 service manual also did, but PDFs available
online are missing it. A scan of the DX27/DX100 Overall Circuit Diagram is available
online separately; it does not appear to have spread as far and wide as the rest of the
service manual, but is still readily available.
*** Currently imperfectly emulated
- The cassette interface.
This uses an 8-pin DIN with what appears to be the same pinout as the MSX.
However, the remote lines are completely unused, and the tape player has
to be manually operated. The "dxconvert" project by rarepixel does claim to
support DX100 tape dumps, and does so by using the "castools" project by
joyrex2001, which includes a program to convert wav files storing the raw
tape audio to MSX .cas files. dxconvert uses the command-line parameters
"-p -e 4 -t 10"; I'm not sure how to interpret this, even after reading
the code.
The constant used below for testing against m_cassette->input() was guessed
through trial and error until I could get a successful load at least somewhat
consistently. It still isn't perfect, but I don't know how to refine this
further.
"dxconvert": https://github.com/rarepixel/dxconvert
"castools": https://github.com/joyrex2001/castools
The sample voices that I used to test can be found at
http://robertgomez.org/blog/2017/08/02/some-yamaha-dx100-dx27-synth-patches/
I loaded the wav download here, saved it to another wav,
verified that wav (the DX100 will ask to verify data you just
saved), and then converted both to .cas as described and compared
the two; they are identical.
*** Currently unemulated
- Bit 5 of port 6 is tied to the /G2A and /G2B pins of the two
TC40H138P chips (~~ 74138?) that sit between the panel switches and the CPU.
I don't yet understand how these lines are actually used, but I can still use
the full functions of the keyboard if I just have it return 0 on read, so.
*** CPU ports
Port 2 is arranged as so:
Bit(s) Connection
0 Controls the state of the power LED on the DX100.
The firmware will blink this LED when battery power is low.
This is unused on the DX27.
1 0 (pulled to chassis ground by 220 ohm resistor)
2 500khz clock
3 MIDI In data bit
4 MIDI Out data bit
5 0 if the foot pedal is connected, 1 otherwise.
The manual says to use either the Yamaha FC-4 or Yamaha FC-5 foot pedals
with the DX100.
6 Pulled TODO if the foot pedal is pressed.
7 0 (pulled to chassis ground by 220 ohm resistor)
Port 5 is connected to the panel switches and keyboard keys.
Which sets of buttons are exposed is determined by the low four bits
of port 6. The exact matrix differs between the DX27 and DX100.
Port 6 is arranged as so:
Bit(s) Connection
0-3 Which set of buttons to expose on port 5.
4 Connected to the EOC line of the ADC.
5 (see /G2A and /G2B comment in Currently unemulated)
6 Connected to the REC (TS) line of the cassette interface.
7 Connected to the PLAY (TL) line of the cassette interface.
*** M58990 ports
Port 0 is connected to the pitch wheel.
Port 1 is connected to the mod wheel.
Port 2 is connected to the breath controller.
The manual says to use the Yamaha BC-1 breath controller with the DX100.
Port 3 is connected to the data entry slider.
(TODO port 4 appears to be connected to chassis ground by 220 ohm resistor?)
Port 5 is a voltmeter for the RAM battery.
Port 6 is a voltmeter for system power.
(TODO port 7 appears to be tied to port 6?)
*** Default keyboard layout
For quick testing, the default keyboard button layout will be:
1 2 3 4 5 6 7 8 9 0 - = -> 1 2 3 4 5 6 7 8 9 10 11 12
Q W T Y O P -> PBend KeyShift Store Func BankA BankB
E R U I [ ] -> -1 +1 Edit Internal BankC BankD
Octave 3 will be avaible over [Z S X D C V G B H N J M]
Pitch bend will be ' /
Mod wheel will be ; .
Data entry slider will be L ,
This leaves the breath controller, switches 13-24, and the other
keyboard octaves unmapped by default.
When first starting with a fresh configuration and no NVRAM,
press Y and then O (Func and then BankA) to switch to the
internal voices. Note that some voices may not respond to
the pitch or mod wheels as much as other voices do.
To disable memory protection, press Y, ], and then E (Func,
12 to select the Memory Protection setting, and -1 to turn
it off). Then you can press U (Edit) to edit voice
parameters.
IPT_KEYBOARD is used, so use the UI mode key (default
Scroll Lock) to re-enable the MAME UI.
No, I don't know why some voices (such as Pianobells)
seem to not let you turn off modulation even if you set
the mod wheel to its lowest point. You can set the pitch
sensitivity value ("PMS", Edit/Compare key 9) to 0 to
force it off. This might have to do with the YM2164
moving the LFO Reset register; if not, it might have to
do with the default pitch wheel position not being 0
(see TODO below).
*** Test mode
To enter test mode, hold 1 and 2 on the panel while powering the system
on. You'll see the version number, and then a prompt asking if you want
to enter test mode; press +1 to enter test mode.
If 1 and 3 or 1 and 4 are held instead of 1 and 2, different subsets of the
test mode will run instead. Furthermore, some tests will only be run on
the DX100.
For more details on the individual tests, refer to the service manual.
To make developing this driver easier I wrote an init function for the
DX100 1.1 driver which allows me to pick and choose which tests to actually
run. I've disabled it in the final version of the driver, but here it is
in this comment if you want to run it yourself:
void yamaha_dx100_state::init_dx100()
{
// Since test mode forcibly halts on the first failed test, and we can only choose to not run certain tests, use these blocks of code to skip specific tests.
// The numbering and naming below is from the service manual, which, surprise, doesn't quite line up with the way the tests are written in the code.
u8 *rom = (u8 *) (memregion("program")->base());
auto skip = [rom](u16 whichAddr, u16 jumpTo, u8 extraInst = 0, u16 nop2 = 0) {
if (extraInst != 0) {
rom[whichAddr & 0x7fff] = extraInst;
whichAddr++;
}
rom[whichAddr & 0x7fff] = 0x7e;
rom[(whichAddr + 1) & 0x7fff] = (u8) ((jumpTo >> 8) & 0xff);
rom[(whichAddr + 2) & 0x7fff] = (u8) (jumpTo & 0xff);
if (nop2 != 0) {
rom[nop2 & 0x7fff] = 0x01;
rom[(nop2 + 1) & 0x7fff] = 0x01;
}
};
// 1. Output level, RAM battery voltage
skip(0xc464, 0xc4b3);
// 2. RAM, cassette interface, MIDI in/out, MIDI thru
// This is hard to skip as a unit in the code, so you need to skip them individually:
// Or to only disable a subset of these tests:
// 2a. RAM test
rom[0xc55f & 0x7fff] = 0x39;
// 2b. Cassette interface test (I'm not entirely sure MAME's cassette interface
// supports the direct writing; I *think* this is MSX format?)
rom[0xc66e & 0x7fff] = 0x39;
// 2c. MIDI in/out (I'm not sure why this is failing, but something's not right)
rom[0xc631 & 0x7fff] = 0x39;
// 2d. MIDI thru
skip(0xc6b0, 0xc52a, 0, 0xc4dd);
// 3. LCD test
// This is actually two tests in the code, so you need to skip them individually:
// 2a. LCD solid flashing test
skip(0xc6e1, 0xc52a, 0, 0xc4e6);
// 2b. LCD checkerboard test
skip(0xc6d1, 0xc52a, 0, 0xc4ef);
// 4. Pitch wheel, mod wheel, data entry slider, breath controller, foot switch
// AND (run as part of 4 in the code)
// 5. Foot switch detecting circuit
skip(0xc70f, 0xc7a9);
// Or to only disable a subset of these tests:
// 4a/5. Foot switch tests
skip(0xc7b3, 0xc7a9, 0x38);
// 6. Keyboard
skip(0xc86e, 0xc927);
// 7. LCD contrast
// AND (run as part of 7 in the code)
// 8. Main power, LED flash on low power
skip(0xc927, 0xc98f);
// 9. Panel switches
skip(0xc9d3, 0xca50);
}
*******************************************************************************/
@ -14,6 +241,7 @@
#include "bus/midi/midi.h"
#include "cpu/m6800/m6801.h"
#include "imagedev/cassette.h"
#include "machine/adc0808.h"
#include "machine/clock.h"
#include "machine/nvram.h"
@ -24,6 +252,8 @@
#include "screen.h"
#include "speaker.h"
#include "dx100.lh"
namespace {
class yamaha_dx100_state : public driver_device
@ -32,14 +262,23 @@ public:
yamaha_dx100_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_adc(*this, "adc")
, m_keysbuttons(*this, "P6_%d", 0)
, m_midi_in(true)
, m_led(*this, "LED")
, m_cassette(*this, "cassette")
{
}
void dx100(machine_config &config);
DECLARE_WRITE_LINE_MEMBER(led_w) { m_led = state; }
DECLARE_CUSTOM_INPUT_MEMBER(midi_in_r) { return m_midi_in; }
protected:
virtual void driver_start() override;
virtual void machine_start() override;
virtual void machine_reset() override;
private:
HD44780_PIXEL_UPDATE(lcd_pixel_update);
@ -50,26 +289,46 @@ private:
void mem_map(address_map &map);
required_device<hd6303x_cpu_device> m_maincpu;
required_device<m58990_device> m_adc;
required_ioport_array<16> m_keysbuttons;
bool m_midi_in;
u8 m_port6_val;
// for hooking up the LED to layouts
output_finder<> m_led;
required_device<cassette_image_device> m_cassette;
};
void yamaha_dx100_state::driver_start()
{
m_led.resolve();
}
void yamaha_dx100_state::machine_start()
{
save_item(NAME(m_midi_in));
}
void yamaha_dx100_state::machine_reset()
{
// TODO: figure out the actual power-on state
m_port6_val = 0;
}
HD44780_PIXEL_UPDATE(yamaha_dx100_state::lcd_pixel_update)
{
if (x < 5 && y < 8 && line < 2 && pos < 16)
bitmap.pix(line * 10 + y + 1 + ((y == 7) ? 1 : 0), pos * 6 + x + 1) = state ? 1 : 2;
if (x < 5 && y < 8 && line < 2 && pos < 8)
bitmap.pix(y + 1 + ((y == 7) ? 1 : 0), (line * 8 + pos) * 6 + x + 1) = state ? 1 : 2;
}
void yamaha_dx100_state::palette_init(palette_device &palette)
{
palette.set_pen_color(0, rgb_t(0x00, 0x00, 0x00)); // background
palette.set_pen_color(1, rgb_t(0xff, 0xff, 0xff)); // lcd pixel on
palette.set_pen_color(2, rgb_t(0x18, 0x18, 0x18)); // lcd pixel off
palette.set_pen_color(0, rgb_t(0xff, 0xff, 0xff)); // background
palette.set_pen_color(1, rgb_t(0x00, 0x00, 0x00)); // lcd pixel on
palette.set_pen_color(2, rgb_t(0xe7, 0xe7, 0xe7)); // lcd pixel off
}
WRITE_LINE_MEMBER(yamaha_dx100_state::p22_w)
@ -92,20 +351,263 @@ void yamaha_dx100_state::mem_map(address_map &map)
}
static INPUT_PORTS_START(dx100)
PORT_START("P2")
// TODO: Should 0x02, 0x04, 0x10, and 0x80 be listed here?
// They should be handled by the other interconnections in this file.
// If so, verify the active states of the MIDI ports.
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_NAME("LED") PORT_WRITE_LINE_MEMBER(yamaha_dx100_state, led_w)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED ) // tied to ground
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) // 500khz clock
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(yamaha_dx100_state, midi_in_r)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OUTPUT ) // MIDI out
PORT_CONFNAME( 0x20, 0x00, "Foot Switch" )
PORT_CONFSETTING( 0x00, "Connected" )
PORT_CONFSETTING( 0x20, "Disconnected" )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Foot Switch")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // tied to ground
PORT_START("P6_0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Data Entry +1/Yes/On") PORT_CODE(KEYCODE_R)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Data Entry -1/No/Off") PORT_CODE(KEYCODE_E)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Store/EG Copy") PORT_CODE(KEYCODE_T)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Function/Compare") PORT_CODE(KEYCODE_Y)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Edit/Compare") PORT_CODE(KEYCODE_U)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Internal/Play") PORT_CODE(KEYCODE_I)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pitch B Mode/Operator Select/Mode Set") PORT_CODE(KEYCODE_Q)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Key Shift/Key Set") PORT_CODE(KEYCODE_W)
PORT_START("P6_1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1/Algorithm/Master Tune Adj") PORT_CODE(KEYCODE_1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("2/Feedback/MIDI On/Off") PORT_CODE(KEYCODE_2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("3/LFO Wave/MIDI Channel") PORT_CODE(KEYCODE_3)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("4/LFO Speed/MIDI Ch Info") PORT_CODE(KEYCODE_4)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("5/LFO Delay/MIDI Sys Info") PORT_CODE(KEYCODE_5)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("6/LFO PMD/Recall Edit") PORT_CODE(KEYCODE_6)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("7/LFO AMD/Init Voice") PORT_CODE(KEYCODE_7)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("8/LFO Sync/Edit Bank") PORT_CODE(KEYCODE_8)
PORT_START("P6_2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("9/Modulation Sensitivity Pitch/Cassette Save/Verify") PORT_CODE(KEYCODE_9)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("10/Modulation Sensitivity Velocity/Cassette Load") PORT_CODE(KEYCODE_0)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("11/Modulation Sensitivity EG Bias/Cassette Load Single") PORT_CODE(KEYCODE_MINUS)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("12/Key Velocity/Memory Protect") PORT_CODE(KEYCODE_EQUALS)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("13/Oscillator Freq Ratio/Poly/Mono")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("14/Oscillator Detune/Pitch Bend Range")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("15/Envelope Generator AR/Portamento Mode")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("16/Envelope Generator D1R/Portamento Time")
PORT_START("P6_3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("17/Envelope Generator D1L/Foot Sw Assign")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("18/Envelope Generator D2R/Wheel Range Pitch")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("19/Envelope Generator RR/Wheel Range Amplitude")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("20/Operator Out Level/Breath Range Pitch")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("21/Keyboard Scaling Rate/Breath Range Amplitude")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("22/Keyboard Scaling Level/Breath Range Pitch Bias")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("23/Transpose/Breath Range EG Bias")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("24/Voice Name Cursor >")
PORT_START("P6_4")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C#1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C#2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C#3") PORT_CODE(KEYCODE_S)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C#4")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Bank D/Operator/AMS On/Off 4/Preset Search 401~424") PORT_CODE(KEYCODE_CLOSEBRACE)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Bank C/Operator/AMS On/Off 3/Preset Search 301~324") PORT_CODE(KEYCODE_OPENBRACE)
PORT_START("P6_5")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D3") PORT_CODE(KEYCODE_X)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D4")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Bank B/Operator/AMS On/Off 2/Preset Search 201~224") PORT_CODE(KEYCODE_P)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Bank A/Operator/AMS On/Off 1/Preset Search 101~124") PORT_CODE(KEYCODE_O)
PORT_START("P6_6")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D#1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D#2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D#3") PORT_CODE(KEYCODE_D)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("D#4")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("P6_7")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E3") PORT_CODE(KEYCODE_C)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("E4")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("P6_8")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F3") PORT_CODE(KEYCODE_V)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F4")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("P6_9")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F#1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F#2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F#3") PORT_CODE(KEYCODE_G)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F#4")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("P6_10")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G3") PORT_CODE(KEYCODE_B)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G4")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("P6_11")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G#1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G#2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G#3") PORT_CODE(KEYCODE_H)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("G#4")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("P6_12")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A3") PORT_CODE(KEYCODE_N)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A4")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("P6_13")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A#1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A#2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A#3") PORT_CODE(KEYCODE_J)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("A#4")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("P6_14")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("B1")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("B2")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("B3") PORT_CODE(KEYCODE_M)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("B4")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("P6_15")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C1")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C2")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C3") PORT_CODE(KEYCODE_Z)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C4")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("C5")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("AN0")
// The pitch wheel returns to center once released.
PORT_BIT( 0xff, 0x7f, IPT_AD_STICK_Y ) PORT_NAME("Pitch Wheel") PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_MINMAX(0x00, 0xff) PORT_CODE_INC(KEYCODE_QUOTE) PORT_CODE_DEC(KEYCODE_SLASH)
PORT_START("AN1")
// The mod wheel stays in place to wherever it's set.
// TODO: This should have its initial state be 0, not halfway.
PORT_BIT( 0xff, 0, IPT_PADDLE_V ) PORT_NAME("Modulation Wheel") PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_MINMAX(0x00, 0xff) PORT_CENTERDELTA(0) PORT_CODE_INC(KEYCODE_COLON) PORT_CODE_DEC(KEYCODE_STOP)
PORT_START("AN2")
// TODO: This appears to be inverted; if this is set to 255 it behaves as if
// there was no breath controller? or at least seems to? on instruments like
// 112 Pianobrass if this is set to 0 it acts as if the mod wheel had been turned
// all the way up and enables LFO -- and there's probably a better way we could
// simulate not having a breath controller attached at all???
PORT_BIT( 0xff, 0, IPT_PEDAL ) PORT_NAME("Breath Controller") PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_MINMAX(0x00, 0xff)
PORT_START("AN3")
// The data entry slider stays in place to wherever it's set.
PORT_BIT( 0xff, 0, IPT_POSITIONAL_V ) PORT_NAME("Data Entry Slider") PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_MINMAX(0x00, 0xff) PORT_CENTERDELTA(0) PORT_CODE_INC(KEYCODE_L) PORT_CODE_DEC(KEYCODE_COMMA)
PORT_START("AN5")
PORT_CONFNAME( 0xff, 0x80, "Internal RAM Battery Level" )
// "CNG RAM BATTERY!" displayed unless value is between 0x70 and 0xcc
PORT_CONFSETTING( 0x6f, "Too Low" )
PORT_CONFSETTING( 0x70, "Lowest Allowed" )
PORT_CONFSETTING( 0x80, "Normal" ) // for some arbitrary definition of "normal"
PORT_CONFSETTING( 0xcb, "Highest Allowed" )
PORT_CONFSETTING( 0xcc, "Too High" )
PORT_START("AN6")
PORT_CONFNAME( 0xff, 0x00, "Battery Power Level" )
// Yes, higher values mean lower voltages.
// I think this is opposite to how the RAM battery voltmeter works.
// The weird granularity here is due to the buggy implementation of the
// test in the test mode; all 7V values should LED flash, but some don't.
PORT_CONFSETTING( 0x00, "9V (Normal)" ) // for some arbitrary definition of "normal"
PORT_CONFSETTING( 0x4b, "9V (Lowest Allowed)" )
PORT_CONFSETTING( 0x67, "7V (Highest Allowed Without LED Flash)" )
PORT_CONFSETTING( 0x6b, "7V (Lowest Allowed Without LED Flash)" )
PORT_CONFSETTING( 0x6c, "7V (Highest Allowed With LED Flash)" )
PORT_CONFSETTING( 0x6f, "7V (Lowest Allowed With LED Flash)" )
PORT_CONFSETTING( 0x70, "Less Than 7V" )
INPUT_PORTS_END
void yamaha_dx100_state::dx100(machine_config &config)
{
HD6303X(config, m_maincpu, 7.15909_MHz_XTAL / 2); // HD6303XP
m_maincpu->set_addrmap(AS_PROGRAM, &yamaha_dx100_state::mem_map);
m_maincpu->in_p2_cb().set([this]() -> u8 { return m_midi_in ? 0x04 : 0; });
m_maincpu->in_p6_cb().set("adc", FUNC(m58990_device::eoc_r)).lshift(4);
m_maincpu->in_p2_cb().set_ioport("P2");
m_maincpu->out_p2_cb().set_ioport("P2");
m_maincpu->in_p6_cb().set([this]() -> u8 {
// TODO: The threshold here and the output values below should be double-checked.
u8 casplay = (m_cassette->input() > 0.009) ? 0x80 : 0;
// TODO: Need to verify if this bit is held on output or not
u8 casrec = m_port6_val & 0x40;
u8 adcval = ((u8) (m_adc->eoc_r() << 4)) & 0x10;
u8 port5line = (m_port6_val & 0x2f);
return casplay | casrec | adcval | port5line;
});
m_maincpu->out_p6_cb().set([this](u8 val) {
m_port6_val = val;
m_cassette->output(((m_port6_val & 0x40) != 0) ? -1.0 : 1.0);
});
m_maincpu->in_p5_cb().set([this]() -> u8 {
u8 line = m_port6_val & 0x2f;
// TODO: figure out how the /G2A and /G2B pins are connected
if ((line & 0x20) != 0)
return 0x00;
return (u8) (m_keysbuttons[line]->read() & 0xff);
});
m_maincpu->out_ser_tx_cb().set("mdout", FUNC(midi_port_device::write_txd));
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5518BPL + CR2032T battery
m58990_device &adc(M58990(config, "adc", 7.15909_MHz_XTAL / 8)); // M58990P-1 (clocked by E)
adc.in_callback<5>().set_constant(0x80); // "CNG RAM BATTERY!" displayed unless value is between 0x70 and 0xCC
M58990(config, m_adc, 7.15909_MHz_XTAL / 8); // M58990P-1 (clocked by E)
m_adc->in_callback<0>().set_ioport("AN0"); // pitch wheel
m_adc->in_callback<1>().set_ioport("AN1"); // mod wheel
m_adc->in_callback<2>().set_ioport("AN2"); // breath controller
m_adc->in_callback<3>().set_ioport("AN3"); // data entry slider
m_adc->in_callback<5>().set_ioport("AN5"); // internal RAM battery voltmeter
m_adc->in_callback<6>().set_ioport("AN6"); // battery power voltmeter
CLOCK(config, "subclock", 500_kHz_XTAL).signal_handler().set(FUNC(yamaha_dx100_state::p22_w));
@ -116,14 +618,14 @@ void yamaha_dx100_state::dx100(machine_config &config)
screen.set_refresh_hz(60);
screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */
screen.set_screen_update("lcdc", FUNC(hd44780_device::screen_update));
screen.set_size(6*16+1, 10*2+1);
screen.set_size(6*16+1, 10*1+1);
screen.set_visarea_full();
screen.set_palette("palette");
PALETTE(config, "palette", FUNC(yamaha_dx100_state::palette_init), 3);
hd44780_device &lcdc(HD44780(config, "lcdc", 0)); // HD44780RA00
lcdc.set_lcd_size(2, 16);
lcdc.set_lcd_size(1, 16);
lcdc.set_pixel_update_cb(FUNC(yamaha_dx100_state::lcd_pixel_update));
SPEAKER(config, "lspeaker").front_left();
@ -132,6 +634,12 @@ void yamaha_dx100_state::dx100(machine_config &config)
ym2164_device &ymsnd(YM2164(config, "ymsnd", 7.15909_MHz_XTAL / 2)); // with YM3014 DAC
ymsnd.add_route(0, "lspeaker", 0.60);
ymsnd.add_route(1, "rspeaker", 0.60);
CASSETTE(config, m_cassette);
m_cassette->set_default_state(CASSETTE_STOPPED);
m_cassette->set_interface("ymdx100_cass");
config.set_default_layout(layout_dx100);
}
ROM_START(dx100)
@ -141,4 +649,5 @@ ROM_END
} // anonymous namespace
SYST(1985, dx100, 0, 0, dx100, dx100, yamaha_dx100_state, empty_init, "Yamaha", "DX100 Digital Programmable Algorithm Synthesizer", MACHINE_IS_SKELETON)
SYST(1985, dx100, 0, 0, dx100, dx100, yamaha_dx100_state, empty_init, "Yamaha", "DX100 Digital Programmable Algorithm Synthesizer", MACHINE_IMPERFECT_SOUND)