mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
Adding a layout to the Roland D-70 driver. (#13212)
Support moving sliders with mouse click & drag. Note 1: LEDs declared and positioned in the layout, but the driver still does not control them. Note 2: The rotary encoder is also not functional yet. I'll leave that one to a future separate commit.
This commit is contained in:
parent
53d73e817f
commit
eb17a74dcc
633
src/mame/layout/d70.lay
Normal file
633
src/mame/layout/d70.lay
Normal file
@ -0,0 +1,633 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
license:CC0-1.0
|
||||
copyright-holders:Felipe Sanches, m1macrophage
|
||||
-->
|
||||
<mamelayout version="2">
|
||||
|
||||
<!-- define elements -->
|
||||
|
||||
<element name="red_led" defstate="0">
|
||||
<rect state="1">
|
||||
<color red="1" green="0.0" blue="0.0" />
|
||||
</rect>
|
||||
<rect state="0">
|
||||
<color red="0.2" green="0.0" blue="0.0" />
|
||||
</rect>
|
||||
</element>
|
||||
|
||||
<element name="cpanel">
|
||||
<rect><color red="0.13" green="0.13" blue="0.11"/></rect>
|
||||
</element>
|
||||
|
||||
<element name="clear_rect">
|
||||
<rect><color red="0.8" green="0.8" blue="0.8"/></rect>
|
||||
</element>
|
||||
|
||||
<element name="grey_rect">
|
||||
<rect><color red="0.4" green="0.4" blue="0.4" /></rect>
|
||||
</element>
|
||||
|
||||
<element name="brown_line">
|
||||
<rect><color red="0.72" green="0.45" blue="0.13" /></rect>
|
||||
</element>
|
||||
|
||||
<element name="light_grey_disk">
|
||||
<disk><color red="0.2" green="0.2" blue="0.2"/></disk>
|
||||
</element>
|
||||
|
||||
<element name="dark_grey_disk">
|
||||
<disk><color red="0.1" green="0.1" blue="0.1"/></disk>
|
||||
</element>
|
||||
|
||||
<element name="slider-well">
|
||||
<rect><color red="0.04" green="0.05" blue="0.05"/></rect>
|
||||
</element>
|
||||
|
||||
<element name="slider-wider-well">
|
||||
<rect><color red="0.13" green="0.15" blue="0.15"/></rect>
|
||||
</element>
|
||||
|
||||
<element name="slider-knob">
|
||||
<rect><color red="0.18" green="0.2" blue="0.18"/></rect>
|
||||
</element>
|
||||
|
||||
<element name="lcd_border">
|
||||
<rect><color red="0.06" green="0.06" blue="0.04"/></rect>
|
||||
</element>
|
||||
|
||||
<element name="lcd_bg">
|
||||
<rect><color red="0.62" green="0.71" blue="0.53"/></rect>
|
||||
</element>
|
||||
|
||||
<element name="button">
|
||||
<rect state="0"><color red="0.25" green="0.25" blue="0.25"/></rect>
|
||||
<rect state="1"><color red="0.5" green="0.5" blue="0.5"/></rect>
|
||||
</element>
|
||||
|
||||
<element name="tone_display_text"><text string="TONE DISPLAY"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="midi_out_text"><text string="MIDI OUT"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="effect_ctrl_text"><text string="EFFECT/CTRL"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="part_text"><text string="PART"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="user_text"><text string="USER"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="f1_text"><text string="F1"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="f2_text"><text string="F2"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="f3_text"><text string="F3"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="f4_text"><text string="F4"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="f5_text"><text string="F5"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="exit_text"><text string="EXIT"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="dec_text"><text string="DEC"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="del_text"><text string="DEL"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="inc_text"><text string="INC"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="ins_text"><text string="INS"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="tone_palette_text"><text string="TONE PALETTE"><color red="0.72" green="0.45" blue="0.13" /></text></element>
|
||||
<element name="lower_text"><text string="LOWER"><color red="0.72" green="0.45" blue="0.13" /></text></element>
|
||||
<element name="upper_text"><text string="UPPER"><color red="0.72" green="0.45" blue="0.13" /></text></element>
|
||||
<element name="level_text"><text string="LEVEL"><color red="0.72" green="0.45" blue="0.13" /></text></element>
|
||||
<element name="pan_text"><text string="PAN"><color red="0.72" green="0.45" blue="0.13" /></text></element>
|
||||
<element name="tuning_text"><text string="TUNING"><color red="0.72" green="0.45" blue="0.13" /></text></element>
|
||||
<element name="cutoff_text"><text string="CUTOFF"><color red="0.72" green="0.45" blue="0.13" /></text></element>
|
||||
<element name="resonance_text"><text string="RESONANCE"><color red="0.72" green="0.45" blue="0.13" /></text></element>
|
||||
<element name="attack_text"><text string="ATTACK"><color red="0.72" green="0.45" blue="0.13" /></text></element>
|
||||
<element name="release_text"><text string="RELEASE"><color red="0.72" green="0.45" blue="0.13" /></text></element>
|
||||
<element name="solo_text"><text string="SOLO"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="portamento_text"><text string="PORTAMENTO"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="mode_text"><text string="MODE"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="play_text"><text string="PLAY"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="edit_text"><text string="EDIT"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="pcm_card_text"><text string="PCM CARD"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="panic_text"><text string="PANIC"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="rom_play_text"><text string="ROM PLAY"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="lower_1_text"><text string="1"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="lower_2_text"><text string="2"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="upper_3_text"><text string="3"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="upper_4_text"><text string="4"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="tone_zone_select_text"><text string="TONE/ZONE SELECT"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="performance_text"><text string="PERFORMANCE"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="patch_text"><text string="PATCH"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="tone_text"><text string="TONE"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="a_slash_text"><text string="A/"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="b_text"><text string="B"><color red="1.0" green="0.2" blue="0.2" /></text></element>
|
||||
<element name="int_slash_text"><text string="INT/"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="card_text"><text string="CARD"><color red="1.0" green="0.2" blue="0.2" /></text></element>
|
||||
<element name="command_text"><text string="COMMAND"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="write_text"><text string="WRITE"><color red="1.0" green="0.2" blue="0.2" /></text></element>
|
||||
<element name="enter_text"><text string="ENTER"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="caps_text"><text string="CAPS"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="space_text"><text string="SPACE"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="a_b_text"><text string="A B"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="c_d_text"><text string="C D"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="e_f_text"><text string="E F"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="g_h_text"><text string="G H"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="i_j_text"><text string="I J"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="k_l_text"><text string="K L"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="bank_text"><text string="BANK"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="1_text"><text string="1"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="2_text"><text string="2"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="3_text"><text string="3"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="4_text"><text string="4"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="5_text"><text string="5"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="6_text"><text string="6"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="7_text"><text string="7"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="8_text"><text string="8"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="m_n_text"><text string="M N"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="o_p_text"><text string="O P"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="q_r_text"><text string="Q R"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="s_t_text"><text string="S T"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="u_v_text"><text string="U V"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="dash_w_text"><text string="- W"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="9_x_text"><text string="9 X"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="0_y_text"><text string="0 Y"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="1_z_text"><text string="1 Z"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="2_slash_text"><text string="2 /"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="3_plus_text"><text string="3 +"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="4_times_text"><text string="4 *"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="5_hash_text"><text string="5 #"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="6_dot_text"><text string="6 ."><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="7_comma_text"><text string="7 ,"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="8_exclam_text"><text string="8 !"><color red="0.4" green="0.4" blue="0.4" /></text></element>
|
||||
<element name="number_text"><text string="NUMBER"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
<element name="value_text"><text string="VALUE"><color red="0.8" green="0.8" blue="0.8" /></text></element>
|
||||
|
||||
<element name="double_page_icon_grey">
|
||||
<image><data><![CDATA[
|
||||
<svg width="11" height="12" viewBox="0 0 2.910422 3.175">
|
||||
<path style="stroke:#d1d1d1;fill:none;stroke-width:0.29;" d="m 1.66,0.17 -1.52,0.4 V 2.9 l 1.52,-0.4 z m -0.4,2.52 v 0.3 l 1.52,-0.4 V 0.27 l -1.2,0.3" />
|
||||
</svg>
|
||||
]]></data></image>
|
||||
</element>
|
||||
|
||||
<element name="double_page_icon_brown">
|
||||
<image><data><![CDATA[
|
||||
<svg width="11" height="12" viewBox="0 0 2.910422 3.175">
|
||||
<path style="stroke:#b77222;fill:none;stroke-width:0.29;" d="m 1.66,0.17 -1.52,0.4 V 2.9 l 1.52,-0.4 z m -0.4,2.52 v 0.3 l 1.52,-0.4 V 0.27 l -1.2,0.3" />
|
||||
</svg>
|
||||
]]></data></image>
|
||||
</element>
|
||||
|
||||
<element name="triple_page_icon_grey">
|
||||
<image><data><![CDATA[
|
||||
<svg width="15" height="12" viewBox="0 0 4.3750049 3.500126">
|
||||
<path style="stroke:#d1d1d1;fill:none;stroke-width:0.29" d="M 2.57,3 V 3.3 L 4.23,2.9 V 0.4 L 3,0.7 M 1.8,0.18 0.15,0.6 V 3.1 L 1.8,2.68 Z M 1.36,2.89 V 3.2 L 3,2.78 V 0.29 L 1.8,0.58" />
|
||||
</svg>
|
||||
]]></data></image>
|
||||
</element>
|
||||
|
||||
|
||||
<element name="grey_arrows">
|
||||
<image><data><![CDATA[
|
||||
<svg width="90" height="110" viewBox="0 0 23.8125 29.1">
|
||||
<path style="fill:#d1d1d1;stroke-width:0.264" d="m 13.23,25.43 -1.32,3.67 -1.32,-3.67 z m 0,-21.76 L 11.9,0 10.58,3.67 Z m 6.88,9.94 3.7,1.3 -3.7,1.3 z m -16.4,0 L 0,14.92 3.7,16.23 Z" />
|
||||
</svg>
|
||||
]]></data></image>
|
||||
</element>
|
||||
|
||||
<!-- build screen -->
|
||||
|
||||
<view name="Internal Layout">
|
||||
<bounds left="0" right="1048" top="0" bottom="524" />
|
||||
|
||||
<element ref="cpanel"><bounds x="8" y="8" width="1032" height="300" /></element>
|
||||
<element ref="lcd_border"><bounds x="178" y="16" width="632" height="200" /></element>
|
||||
<element ref="lcd_bg"><bounds x="254" y="48" width="488" height="136" /></element>
|
||||
<screen index="0"><bounds x="258" y="52" width="480" height="128" /></screen>
|
||||
|
||||
<element ref="cpanel"><bounds x="8" y="316" width="464" height="200" /></element>
|
||||
|
||||
<element ref="cpanel"><bounds x="480" y="316" width="560" height="200" /></element>
|
||||
<!-- white rect around "performance ... int/card" labels-->
|
||||
<element ref="clear_rect"><bounds x="497" y="363" width="244" height="13" /></element>
|
||||
<element ref="cpanel"><bounds x="498" y="364" width="242" height="11" /></element>
|
||||
<!-- white rect around "command write enter" labels-->
|
||||
<element ref="clear_rect"><bounds x="743" y="363" width="138" height="13" /></element>
|
||||
<element ref="cpanel"><bounds x="744" y="364" width="136" height="11" /></element>
|
||||
<!-- white line over "patch tone a/b" labels-->
|
||||
<element ref="clear_rect"><bounds x="555" y="365" width="132" height="1" /></element>
|
||||
|
||||
|
||||
<element ref="tone_display_text"><bounds x="39" y="92" width="69" height="10"/></element>
|
||||
<element ref="double_page_icon_grey"><bounds x="112" y="90" width="11" height="12"/></element>
|
||||
|
||||
<element ref="midi_out_text"><bounds x="51" y="140" width="47" height="10"/></element>
|
||||
<element ref="double_page_icon_grey"><bounds x="102" y="138" width="11" height="12"/></element>
|
||||
|
||||
<element ref="effect_ctrl_text"><bounds x="45" y="188" width="64" height="10"/></element>
|
||||
<element ref="triple_page_icon_grey"><bounds x="113" y="185" width="15" height="12"/></element>
|
||||
|
||||
<element ref="part_text"><bounds x="62" y="236" width="25" height="10"/></element>
|
||||
<element ref="double_page_icon_grey"><bounds x="90" y="235" width="11" height="12"/></element>
|
||||
|
||||
<element ref="user_text"><bounds x="194" y="236" width="26" height="10"/></element>
|
||||
<element ref="f1_text"><bounds x="309" y="236" width="11" height="10"/></element>
|
||||
<element ref="f2_text"><bounds x="399" y="236" width="11" height="10"/></element>
|
||||
<element ref="f3_text"><bounds x="489" y="236" width="11" height="10"/></element>
|
||||
<element ref="f4_text"><bounds x="579" y="236" width="11" height="10"/></element>
|
||||
<element ref="f5_text"><bounds x="669" y="236" width="11" height="10"/></element>
|
||||
<element ref="exit_text"><bounds x="770" y="236" width="22" height="10"/></element>
|
||||
|
||||
<element ref="grey_arrows"><bounds x="894" y="89" width="90" height="110"/></element>
|
||||
|
||||
<element ref="dec_text"><bounds x="891" y="236" width="19" height="10"/></element>
|
||||
<element ref="del_text"><bounds x="891" y="273" width="18" height="10"/></element>
|
||||
<element ref="inc_text"><bounds x="968" y="236" width="16" height="10"/></element>
|
||||
<element ref="ins_text"><bounds x="968" y="273" width="16" height="10"/></element>
|
||||
|
||||
|
||||
<element ref="brown_line"><bounds x="31" y="336" width="173" height="1" /></element>
|
||||
<element ref="brown_line"><bounds x="271" y="336" width="177" height="1" /></element>
|
||||
<element ref="tone_palette_text"><bounds x="206" y="331" width="62" height="9"/></element>
|
||||
|
||||
<element ref="brown_line"><bounds x="200" y="346" width="39" height="1" /></element>
|
||||
<element ref="brown_line"><bounds x="273" y="346" width="39" height="1" /></element>
|
||||
<element ref="lower_text"><bounds x="242" y="341" width="29" height="9"/></element>
|
||||
|
||||
<element ref="brown_line"><bounds x="337" y="346" width="39" height="1" /></element>
|
||||
<element ref="brown_line"><bounds x="409" y="346" width="39" height="1" /></element>
|
||||
<element ref="upper_text"><bounds x="379" y="341" width="27" height="9"/></element>
|
||||
|
||||
|
||||
<element ref="slider-wider-well" id="SLIDER4"><bounds x="200" y="349" width="43" height="97"/></element>
|
||||
<element ref="slider-well"><bounds x="217" y="357" width="10" height="82"/></element>
|
||||
<element ref="slider-knob">
|
||||
<animate inputtag="SLIDER4" inputmask="0x7f"/>
|
||||
<bounds state="100" x="203" y="352" width="37" height="24"/>
|
||||
<bounds state="0" x="203" y="417" width="37" height="24"/>
|
||||
</element>
|
||||
|
||||
<element ref="slider-wider-well" id="SLIDER5"><bounds x="269" y="349" width="43" height="97"/></element>
|
||||
<element ref="slider-well"><bounds x="286" y="357" width="10" height="82"/></element>
|
||||
<element ref="slider-knob">
|
||||
<animate inputtag="SLIDER5" inputmask="0x7f"/>
|
||||
<bounds state="100" x="272" y="352" width="37" height="24"/>
|
||||
<bounds state="0" x="272" y="417" width="37" height="24"/>
|
||||
</element>
|
||||
|
||||
<element ref="slider-wider-well" id="SLIDER6"><bounds x="337" y="349" width="43" height="97"/></element>
|
||||
<element ref="slider-well"><bounds x="354" y="357" width="10" height="82"/></element>
|
||||
<element ref="slider-knob">
|
||||
<animate inputtag="SLIDER6" inputmask="0x7f"/>
|
||||
<bounds state="100" x="340" y="352" width="37" height="24"/>
|
||||
<bounds state="0" x="340" y="417" width="37" height="24"/>
|
||||
</element>
|
||||
|
||||
<element ref="slider-wider-well" id="SLIDER7"><bounds x="405" y="349" width="43" height="97"/></element>
|
||||
<element ref="slider-well"><bounds x="422" y="357" width="10" height="82"/></element>
|
||||
<element ref="slider-knob">
|
||||
<animate inputtag="SLIDER7" inputmask="0x7f"/>
|
||||
<bounds state="100" x="408" y="352" width="37" height="24"/>
|
||||
<bounds state="0" x="408" y="417" width="37" height="24"/>
|
||||
</element>
|
||||
|
||||
|
||||
<element ref="lower_1_text"><bounds x="220" y="455" width="6" height="10"/></element>
|
||||
<element ref="lower_2_text"><bounds x="287" y="455" width="6" height="10"/></element>
|
||||
<element ref="upper_3_text"><bounds x="355" y="455" width="6" height="10"/></element>
|
||||
<element ref="upper_4_text"><bounds x="423" y="455" width="6" height="10"/></element>
|
||||
|
||||
<element ref="clear_rect"><bounds x="200" y="481" width="82" height="1" /></element>
|
||||
<element ref="clear_rect"><bounds x="366" y="481" width="82" height="1" /></element>
|
||||
<element ref="tone_zone_select_text"><bounds x="281" y="480" width="87" height="9"/></element>
|
||||
|
||||
<element ref="clear_rect"><bounds x="30" y="455" width="54" height="1" /></element>
|
||||
<element ref="clear_rect"><bounds x="109" y="455" width="55" height="1" /></element>
|
||||
<element ref="mode_text"><bounds x="86" y="450" width="21" height="8"/></element>
|
||||
|
||||
<element ref="level_text"><bounds x="40" y="368" width="19" height="8"/></element>
|
||||
<element ref="cutoff_text"><bounds x="37" y="398" width="24" height="8"/></element>
|
||||
<element ref="solo_text"><bounds x="41" y="428" width="16" height="8"/></element>
|
||||
<element ref="play_text"><bounds x="42" y="458" width="15" height="8"/></element>
|
||||
|
||||
<element ref="pan_text"><bounds x="91" y="368" width="12" height="8"/></element>
|
||||
<element ref="resonance_text"><bounds x="78" y="398" width="38" height="8"/></element>
|
||||
<element ref="portamento_text"><bounds x="76" y="428" width="43" height="8"/></element>
|
||||
<element ref="edit_text"><bounds x="91" y="458" width="14" height="8"/></element>
|
||||
|
||||
<element ref="tuning_text"><bounds x="128" y="368" width="23" height="8"/></element>
|
||||
<element ref="double_page_icon_brown"><bounds x="154" y="367" width="7" height="8"/></element>
|
||||
|
||||
<element ref="attack_text"><bounds x="134" y="398" width="24" height="8"/></element>
|
||||
<element ref="release_text"><bounds x="132" y="428" width="27" height="8"/></element>
|
||||
<element ref="pcm_card_text"><bounds x="130" y="458" width="33" height="8"/></element>
|
||||
|
||||
<element ref="grey_rect"><bounds x="48" y="477" width="99" height="15" /></element>
|
||||
<element ref="cpanel"><bounds x="49" y="476" width="97" height="15" /></element>
|
||||
<element ref="cpanel"><bounds x="80" y="487" width="36" height="8" /></element>
|
||||
<element ref="rom_play_text"><bounds x="82" y="489" width="32" height="8"/></element>
|
||||
|
||||
<element ref="grey_rect"><bounds x="48" y="477" width="50" height="7" /></element>
|
||||
<element ref="cpanel"><bounds x="49" y="476" width="48" height="7" /></element>
|
||||
<element ref="cpanel"><bounds x="63" y="480" width="24" height="8" /></element>
|
||||
<element ref="panic_text"><bounds x="65" y="481" width="20" height="8"/></element>
|
||||
|
||||
<element ref="performance_text"><bounds x="500" y="366" width="47" height="8"/></element>
|
||||
<element ref="patch_text"><bounds x="562" y="366" width="19" height="8"/></element>
|
||||
<element ref="tone_text"><bounds x="612" y="366" width="17" height="8"/></element>
|
||||
<element ref="a_slash_text"><bounds x="663" y="366" width="6" height="8"/></element>
|
||||
<element ref="b_text"><bounds x="670" y="366" width="4" height="8"/></element>
|
||||
<element ref="int_slash_text"><bounds x="702" y="366" width="12" height="8"/></element>
|
||||
<element ref="card_text"><bounds x="714" y="366" width="17" height="8"/></element>
|
||||
<element ref="command_text"><bounds x="748" y="366" width="33" height="8"/></element>
|
||||
<element ref="write_text"><bounds x="804" y="366" width="20" height="8"/></element>
|
||||
<element ref="enter_text"><bounds x="852" y="366" width="20" height="8"/></element>
|
||||
|
||||
|
||||
<element ref="caps_text"><bounds x="515" y="389" width="16" height="8"/></element>
|
||||
<element ref="space_text"><bounds x="562" y="389" width="19" height="8"/></element>
|
||||
<element ref="a_b_text"><bounds x="625" y="389" width="14" height="8"/></element>
|
||||
<element ref="c_d_text"><bounds x="673" y="389" width="14" height="8"/></element>
|
||||
<element ref="e_f_text"><bounds x="722" y="389" width="13" height="8"/></element>
|
||||
<element ref="g_h_text"><bounds x="769" y="389" width="14" height="8"/></element>
|
||||
<element ref="i_j_text"><bounds x="821" y="389" width="9" height="8"/></element>
|
||||
<element ref="k_l_text"><bounds x="867" y="389" width="13" height="8"/></element>
|
||||
|
||||
<element ref="clear_rect"><bounds x="506" y="423" width="173" height="1" /></element>
|
||||
<element ref="clear_rect"><bounds x="704" y="423" width="176" height="1" /></element>
|
||||
<element ref="bank_text"><bounds x="682" y="418" width="20" height="9"/></element>
|
||||
|
||||
<element ref="1_text"><bounds x="522" y="428" width="4" height="8"/></element>
|
||||
<element ref="2_text"><bounds x="570" y="428" width="4" height="8"/></element>
|
||||
<element ref="3_text"><bounds x="619" y="428" width="4" height="8"/></element>
|
||||
<element ref="4_text"><bounds x="667" y="428" width="4" height="8"/></element>
|
||||
<element ref="5_text"><bounds x="715" y="428" width="4" height="8"/></element>
|
||||
<element ref="6_text"><bounds x="763" y="428" width="4" height="8"/></element>
|
||||
<element ref="7_text"><bounds x="812" y="428" width="4" height="8"/></element>
|
||||
<element ref="8_text"><bounds x="860" y="428" width="4" height="8"/></element>
|
||||
|
||||
<element ref="m_n_text"><bounds x="527" y="449" width="15" height="8"/></element>
|
||||
<element ref="o_p_text"><bounds x="576" y="449" width="14" height="8"/></element>
|
||||
<element ref="q_r_text"><bounds x="625" y="449" width="15" height="8"/></element>
|
||||
<element ref="s_t_text"><bounds x="674" y="449" width="13" height="8"/></element>
|
||||
<element ref="u_v_text"><bounds x="722" y="449" width="14" height="8"/></element>
|
||||
<element ref="dash_w_text"><bounds x="770" y="449" width="14" height="8"/></element>
|
||||
<element ref="9_x_text"><bounds x="819" y="449" width="14" height="8"/></element>
|
||||
<element ref="0_y_text"><bounds x="867" y="449" width="14" height="8"/></element>
|
||||
|
||||
<element ref="1_text"><bounds x="522" y="458" width="4" height="8"/></element>
|
||||
<element ref="2_text"><bounds x="570" y="458" width="4" height="8"/></element>
|
||||
<element ref="3_text"><bounds x="619" y="458" width="4" height="8"/></element>
|
||||
<element ref="4_text"><bounds x="667" y="458" width="4" height="8"/></element>
|
||||
<element ref="5_text"><bounds x="715" y="458" width="4" height="8"/></element>
|
||||
<element ref="6_text"><bounds x="763" y="458" width="4" height="8"/></element>
|
||||
<element ref="7_text"><bounds x="812" y="458" width="4" height="8"/></element>
|
||||
<element ref="8_text"><bounds x="860" y="458" width="4" height="8"/></element>
|
||||
|
||||
<element ref="1_z_text"><bounds x="529" y="479" width="13" height="8"/></element>
|
||||
<element ref="2_slash_text"><bounds x="578" y="479" width="11" height="8"/></element>
|
||||
<element ref="3_plus_text"><bounds x="625" y="479" width="14" height="8"/></element>
|
||||
<element ref="4_times_text"><bounds x="674" y="479" width="12" height="8"/></element>
|
||||
<element ref="5_hash_text"><bounds x="722" y="479" width="14" height="8"/></element>
|
||||
<element ref="6_dot_text"><bounds x="771" y="479" width="11" height="8"/></element>
|
||||
<element ref="7_comma_text"><bounds x="820" y="479" width="11" height="8"/></element>
|
||||
<element ref="8_exclam_text"><bounds x="868" y="479" width="11" height="8"/></element>
|
||||
|
||||
<element ref="clear_rect"><bounds x="506" y="488" width="166" height="1" /></element>
|
||||
<element ref="clear_rect"><bounds x="713" y="488" width="167" height="1" /></element>
|
||||
<element ref="number_text"><bounds x="674" y="486" width="38" height="9"/></element>
|
||||
|
||||
<element ref="value_text"><bounds x="960" y="352" width="24" height="9"/></element>
|
||||
<element name="value_dial" ref="light_grey_disk"><bounds x="919" y="363" width="106" height="106"/></element>
|
||||
<element name="value_dial_finger" ref="dark_grey_disk"><bounds x="931" y="381" width="32" height="32"/></element>
|
||||
|
||||
|
||||
<!-- PERFORMANCE -->
|
||||
<element ref="button" inputtag="KEY0" inputmask="0x80"><bounds x="505" y="379" width="37" height="9"/></element>
|
||||
<element name="LP26" ref="red_led"><bounds x="518" y="380" width="10" height="3" /></element>
|
||||
|
||||
<!-- PATCH -->
|
||||
<element ref="button" inputtag="KEY0" inputmask="0x40"><bounds x="553" y="379" width="37" height="9"/></element>
|
||||
<element name="LP31" ref="red_led"><bounds x="566" y="380" width="10" height="3" /></element>
|
||||
|
||||
<!-- TONE -->
|
||||
<element ref="button" inputtag="KEY0" inputmask="0x20"><bounds x="602" y="379" width="37" height="9"/></element>
|
||||
<element name="LP32" ref="red_led"><bounds x="615" y="380" width="10" height="3" /></element>
|
||||
|
||||
<!-- A/B -->
|
||||
<element ref="button" inputtag="KEY0" inputmask="0x10"><bounds x="650" y="379" width="37" height="9"/></element>
|
||||
<element name="LP33" ref="red_led"><bounds x="663" y="380" width="10" height="3" /></element>
|
||||
|
||||
<!-- INT/CARD -->
|
||||
<element ref="button" inputtag="KEY0" inputmask="0x08"><bounds x="698" y="379" width="37" height="9"/></element>
|
||||
<element name="LP34" ref="red_led"><bounds x="711" y="380" width="10" height="3" /></element>
|
||||
|
||||
<!-- COMMAND -->
|
||||
<element ref="button" inputtag="KEY0" inputmask="0x04"><bounds x="747" y="379" width="37" height="9"/></element>
|
||||
<element name="LP35" ref="red_led"><bounds x="760" y="380" width="10" height="3" /></element>
|
||||
|
||||
<!-- WRITE -->
|
||||
<element ref="button" inputtag="KEY0" inputmask="0x02"><bounds x="795" y="379" width="37" height="9"/></element>
|
||||
<element name="LP36" ref="red_led"><bounds x="808" y="380" width="10" height="3" /></element>
|
||||
|
||||
<!-- ENTER -->
|
||||
<element ref="button" inputtag="KEY0" inputmask="0x01"><bounds x="843" y="379" width="37" height="9"/></element>
|
||||
<element name="LP37" ref="red_led"><bounds x="856" y="380" width="10" height="3" /></element>
|
||||
|
||||
|
||||
<!-- Bank 1 --><element ref="button" inputtag="KEY1" inputmask="0x80"><bounds x="505" y="439" width="37" height="9"/></element>
|
||||
<!-- Bank 2 --><element ref="button" inputtag="KEY1" inputmask="0x40"><bounds x="553" y="439" width="37" height="9"/></element>
|
||||
<!-- Bank 3 --><element ref="button" inputtag="KEY1" inputmask="0x20"><bounds x="602" y="439" width="37" height="9"/></element>
|
||||
<!-- Bank 4 --><element ref="button" inputtag="KEY1" inputmask="0x10"><bounds x="650" y="439" width="37" height="9"/></element>
|
||||
<!-- Bank 5 --><element ref="button" inputtag="KEY1" inputmask="0x08"><bounds x="698" y="439" width="37" height="9"/></element>
|
||||
<!-- Bank 6 --><element ref="button" inputtag="KEY1" inputmask="0x04"><bounds x="747" y="439" width="37" height="9"/></element>
|
||||
<!-- Bank 7 --><element ref="button" inputtag="KEY1" inputmask="0x02"><bounds x="795" y="439" width="37" height="9"/></element>
|
||||
<!-- Bank 8 --><element ref="button" inputtag="KEY1" inputmask="0x01"><bounds x="843" y="439" width="37" height="9"/></element>
|
||||
|
||||
|
||||
<!-- Number 1 --><element ref="button" inputtag="KEY2" inputmask="0x80"><bounds x="505" y="469" width="37" height="9"/></element>
|
||||
<!-- Number 2 --><element ref="button" inputtag="KEY2" inputmask="0x40"><bounds x="553" y="469" width="37" height="9"/></element>
|
||||
<!-- Number 3 --><element ref="button" inputtag="KEY2" inputmask="0x20"><bounds x="602" y="469" width="37" height="9"/></element>
|
||||
<!-- Number 4 --><element ref="button" inputtag="KEY2" inputmask="0x10"><bounds x="650" y="469" width="37" height="9"/></element>
|
||||
<!-- Number 5 --><element ref="button" inputtag="KEY2" inputmask="0x08"><bounds x="698" y="469" width="37" height="9"/></element>
|
||||
<!-- Number 6 --><element ref="button" inputtag="KEY2" inputmask="0x04"><bounds x="747" y="469" width="37" height="9"/></element>
|
||||
<!-- Number 7 --><element ref="button" inputtag="KEY2" inputmask="0x02"><bounds x="795" y="469" width="37" height="9"/></element>
|
||||
<!-- Number 8 --><element ref="button" inputtag="KEY2" inputmask="0x01"><bounds x="843" y="469" width="37" height="9"/></element>
|
||||
|
||||
|
||||
<!-- DEC/DEL --><element ref="button" inputtag="KEY3" inputmask="0x80"><bounds x="871" y="252" width="59" height="13"/></element>
|
||||
<!-- INC/INS --><element ref="button" inputtag="KEY3" inputmask="0x40"><bounds x="947" y="252" width="59" height="13"/></element>
|
||||
<!-- Down --><element ref="button" inputtag="KEY3" inputmask="0x20"><bounds x="909" y="204" width="59" height="13"/></element>
|
||||
<!-- Left --><element ref="button" inputtag="KEY3" inputmask="0x10"><bounds x="871" y="157" width="59" height="13"/></element>
|
||||
<!-- Right --><element ref="button" inputtag="KEY3" inputmask="0x08"><bounds x="947" y="157" width="59" height="13"/></element>
|
||||
<!-- Up --><element ref="button" inputtag="KEY3" inputmask="0x04"><bounds x="909" y="108" width="59" height="13"/></element>
|
||||
|
||||
<!-- MIDI OUT -->
|
||||
<element ref="button" inputtag="KEY3" inputmask="0x02"><bounds x="53" y="157" width="59" height="13"/></element>
|
||||
<element name="LP03" ref="red_led"><bounds x="75" y="158" width="15" height="5" /></element>
|
||||
|
||||
<!-- TONE DISPLAY -->
|
||||
<element ref="button" inputtag="KEY3" inputmask="0x01"><bounds x="53" y="108" width="59" height="13"/></element>
|
||||
<element name="LP02" ref="red_led"><bounds x="75" y="109" width="15" height="5" /></element>
|
||||
|
||||
|
||||
<!-- EXIT --><element ref="button" inputtag="KEY4" inputmask="0x80"><bounds x="751" y="252" width="59" height="13"/></element>
|
||||
<!-- F5 --><element ref="button" inputtag="KEY4" inputmask="0x40"><bounds x="645" y="252" width="59" height="13"/></element>
|
||||
<!-- F4 --><element ref="button" inputtag="KEY4" inputmask="0x20"><bounds x="555" y="252" width="59" height="13"/></element>
|
||||
<!-- F3 --><element ref="button" inputtag="KEY4" inputmask="0x10"><bounds x="465" y="252" width="59" height="13"/></element>
|
||||
<!-- F2 --><element ref="button" inputtag="KEY4" inputmask="0x08"><bounds x="375" y="252" width="59" height="13"/></element>
|
||||
<!-- F1 --><element ref="button" inputtag="KEY4" inputmask="0x04"><bounds x="285" y="252" width="59" height="13"/></element>
|
||||
|
||||
<!-- USER -->
|
||||
<element ref="button" inputtag="KEY4" inputmask="0x02"><bounds x="177" y="252" width="59" height="13"/></element>
|
||||
<element name="LP00" ref="red_led"><bounds x="199" y="253" width="15" height="5" /></element>
|
||||
|
||||
<!-- PART -->
|
||||
<element ref="button" inputtag="KEY4" inputmask="0x01"><bounds x="53" y="252" width="59" height="13"/></element>
|
||||
<element name="LP01" ref="red_led"><bounds x="75" y="253" width="15" height="5" /></element>
|
||||
|
||||
|
||||
<!-- EDIT -->
|
||||
<element ref="button" inputtag="KEY5" inputmask="0x80"><bounds x="79" y="467" width="37" height="9"/></element>
|
||||
<element name="LP04" ref="red_led"><bounds x="92" y="468" width="10" height="3" /></element>
|
||||
|
||||
<!-- PORTAMENTO -->
|
||||
<element ref="button" inputtag="KEY5" inputmask="0x40"><bounds x="79" y="438" width="37" height="9"/></element>
|
||||
<element name="LP05" ref="red_led"><bounds x="92" y="439" width="10" height="3" /></element>
|
||||
|
||||
<!-- RESONANCE -->
|
||||
<element ref="button" inputtag="KEY5" inputmask="0x20"><bounds x="79" y="408" width="37" height="9"/></element>
|
||||
<element name="LP06" ref="red_led"><bounds x="92" y="409" width="10" height="3" /></element>
|
||||
|
||||
<!-- PAN -->
|
||||
<element ref="button" inputtag="KEY5" inputmask="0x10"><bounds x="79" y="378" width="37" height="9"/></element>
|
||||
<element name="LP07" ref="red_led"><bounds x="92" y="379" width="10" height="3" /></element>
|
||||
|
||||
<!-- TUNING -->
|
||||
<element ref="button" inputtag="KEY5" inputmask="0x08"><bounds x="127" y="378" width="37" height="9"/></element>
|
||||
<element name="LP13" ref="red_led"><bounds x="140" y="379" width="10" height="3" /></element>
|
||||
|
||||
<!-- ATTACK -->
|
||||
<element ref="button" inputtag="KEY5" inputmask="0x04"><bounds x="127" y="408" width="37" height="9"/></element>
|
||||
<element name="LP12" ref="red_led"><bounds x="140" y="409" width="10" height="3" /></element>
|
||||
|
||||
<!-- RELEASE -->
|
||||
<element ref="button" inputtag="KEY5" inputmask="0x02"><bounds x="127" y="438" width="37" height="9"/></element>
|
||||
<element name="LP11" ref="red_led"><bounds x="140" y="439" width="10" height="3" /></element>
|
||||
|
||||
<!-- PCM CARD -->
|
||||
<element ref="button" inputtag="KEY5" inputmask="0x01"><bounds x="127" y="467" width="37" height="9"/></element>
|
||||
<element name="LP10" ref="red_led"><bounds x="140" y="468" width="10" height="3" /></element>
|
||||
|
||||
|
||||
<!-- PLAY -->
|
||||
<element ref="button" inputtag="KEY6" inputmask="0x80"><bounds x="30" y="467" width="37" height="9"/></element>
|
||||
<element name="LP20" ref="red_led"><bounds x="43" y="468" width="10" height="3" /></element>
|
||||
|
||||
<!-- SOLO -->
|
||||
<element ref="button" inputtag="KEY6" inputmask="0x40"><bounds x="30" y="438" width="37" height="9"/></element>
|
||||
<element name="LP21" ref="red_led"><bounds x="43" y="439" width="10" height="3" /></element>
|
||||
|
||||
<!-- CUTOFF -->
|
||||
<element ref="button" inputtag="KEY6" inputmask="0x20"><bounds x="30" y="408" width="37" height="9"/></element>
|
||||
<element name="LP22" ref="red_led"><bounds x="43" y="409" width="10" height="3" /></element>
|
||||
|
||||
<!-- LEVEL -->
|
||||
<element ref="button" inputtag="KEY6" inputmask="0x10"><bounds x="30" y="378" width="37" height="9"/></element>
|
||||
<element name="LP23" ref="red_led"><bounds x="43" y="379" width="10" height="3" /></element>
|
||||
|
||||
<!-- UPPER (4) -->
|
||||
<element ref="button" inputtag="KEY6" inputmask="0x08"><bounds x="407" y="467" width="37" height="9"/></element>
|
||||
<element name="LP16" ref="red_led"><bounds x="420" y="468" width="10" height="3" /></element>
|
||||
|
||||
<!-- UPPER (3) -->
|
||||
<element ref="button" inputtag="KEY6" inputmask="0x04"><bounds x="339" y="467" width="37" height="9"/></element>
|
||||
<element name="LP17" ref="red_led"><bounds x="352" y="468" width="10" height="3" /></element>
|
||||
|
||||
<!-- LOWER (2) -->
|
||||
<element ref="button" inputtag="KEY6" inputmask="0x02"><bounds x="271" y="467" width="37" height="9"/></element>
|
||||
<element name="LP15" ref="red_led"><bounds x="284" y="468" width="10" height="3" /></element>
|
||||
|
||||
<!-- LOWER (1) -->
|
||||
<element ref="button" inputtag="KEY6" inputmask="0x01"><bounds x="203" y="467" width="37" height="9"/></element>
|
||||
<element name="LP14" ref="red_led"><bounds x="216" y="468" width="10" height="3" /></element>
|
||||
|
||||
|
||||
<!-- EFFECT/CTRL -->
|
||||
<element ref="button" inputtag="KEY7" inputmask="0x01"><bounds x="53" y="204" width="59" height="13"/></element>
|
||||
<element name="LP24" ref="red_led"><bounds x="75" y="205" width="15" height="5" /></element>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<script><![CDATA[
|
||||
file:set_resolve_tags_callback(
|
||||
function()
|
||||
-- These constants need to match the "slider" and
|
||||
-- "slider-knob" element attributes.
|
||||
local slider_height <const> = 82
|
||||
local knob_height <const> = 24
|
||||
local knob_slider_delta_y <const> = 5 -- slider y - knob y
|
||||
|
||||
local slider_deadzone <const> = math.floor(knob_height / 2) - knob_slider_delta_y
|
||||
|
||||
-- Local state used by the pointer update handler.
|
||||
local sliders = {}
|
||||
local slider_fields = {}
|
||||
local selected = 0
|
||||
|
||||
-- Gather relevant elements and inputs into local state.
|
||||
local view = file.views["Internal Layout"]
|
||||
for i = 1, #view.items do
|
||||
local item = view.items:at(i)
|
||||
if item.id ~= nil and string.find(item.id, "SLIDER") == 1 then
|
||||
local port_tag = item.id
|
||||
local port = file.device:ioport(port_tag)
|
||||
local field = nil
|
||||
if port ~= nil then
|
||||
for k, val in pairs(port.fields) do
|
||||
field = val
|
||||
break
|
||||
end
|
||||
if field == nil then
|
||||
print("LAYOUT ERROR - Port does not have a field: " .. port_tag)
|
||||
end
|
||||
else
|
||||
print("LAYOUT ERROR - Port not found: " .. port_tag)
|
||||
end
|
||||
table.insert(sliders, item)
|
||||
table.insert(slider_fields, field)
|
||||
end
|
||||
end
|
||||
|
||||
view:set_pointer_updated_callback(
|
||||
function(type, id, dev, x, y, btn, dn, up, cnt)
|
||||
-- No button pressed. Reset state.
|
||||
if btn & 1 == 0 then
|
||||
selected = 0
|
||||
return
|
||||
end
|
||||
|
||||
-- Button just pressed. Find affected slider.
|
||||
if dn & 1 ~= 0 then
|
||||
for i = 1, #sliders do
|
||||
if sliders[i].bounds:includes(x, y) then
|
||||
selected = i
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- No slider selected. Nothing to do.
|
||||
if selected <= 0 then
|
||||
return
|
||||
end
|
||||
|
||||
-- A slider is selected. Update state and, indirectly,
|
||||
-- slider knob position, based on the pointer's Y position.
|
||||
|
||||
-- It is assumed the attached IO field is an IPT_ADJUSTER
|
||||
-- with a range of 0-100 (the default).
|
||||
|
||||
local bbox = sliders[selected].bounds
|
||||
local scale_factor = bbox.height / slider_height
|
||||
local min_y = bbox.y0 + slider_deadzone * scale_factor
|
||||
local max_y = bbox.y1 - slider_deadzone * scale_factor
|
||||
|
||||
local new_value = 100 - 100 * (y - min_y) / (max_y - min_y)
|
||||
new_value = math.floor(new_value + 0.5)
|
||||
if new_value < 0 then new_value = 0 end
|
||||
if new_value > 100 then new_value = 100 end
|
||||
slider_fields[selected].user_value = new_value
|
||||
end)
|
||||
end)
|
||||
]]></script>
|
||||
|
||||
</mamelayout>
|
@ -23,6 +23,7 @@
|
||||
#include "screen.h"
|
||||
#include "softlist_dev.h"
|
||||
#include "speaker.h"
|
||||
#include "d70.lh"
|
||||
|
||||
#include "multibyte.h"
|
||||
|
||||
@ -84,12 +85,14 @@ static INPUT_PORTS_START(d70)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 8") PORT_CODE(KEYCODE_8)
|
||||
|
||||
PORT_START("KEY3")
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Inc/Ins") PORT_CODE(KEYCODE_H)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Dec/Del") PORT_CODE(KEYCODE_J)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("S") PORT_CODE(KEYCODE_DOWN)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A") PORT_CODE(KEYCODE_LEFT)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D") PORT_CODE(KEYCODE_RIGHT)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("W") PORT_CODE(KEYCODE_UP)
|
||||
// NOTE: Signals for DEC and INC buttons seem to be incorrectly described
|
||||
// (swapped) on the schematics available in the service manual.
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Dec/Del") PORT_CODE(KEYCODE_H)
|
||||
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Inc/Ins") PORT_CODE(KEYCODE_J)
|
||||
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN)
|
||||
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Up") PORT_CODE(KEYCODE_UP)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Midi Out") PORT_CODE(KEYCODE_N)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tone Display") PORT_CODE(KEYCODE_B)
|
||||
|
||||
@ -111,7 +114,7 @@ static INPUT_PORTS_START(d70)
|
||||
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tuning") PORT_CODE(KEYCODE_V)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Attack")
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Release")
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Pcm Card") PORT_CODE(KEYCODE_C)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PCM Card") PORT_CODE(KEYCODE_C)
|
||||
|
||||
PORT_START("KEY6")
|
||||
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Play") PORT_CODE(KEYCODE_Z)
|
||||
@ -132,8 +135,38 @@ static INPUT_PORTS_START(d70)
|
||||
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
|
||||
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Effect/Ctrl") PORT_CODE(KEYCODE_M)
|
||||
|
||||
PORT_START("PROTECT_SW")
|
||||
PORT_DIPNAME(0x01, 0x01, "Memory Protect Switch")
|
||||
PORT_DIPSETTING( 0x00, DEF_STR(On))
|
||||
PORT_DIPSETTING( 0x01, DEF_STR(Off))
|
||||
|
||||
PORT_START("SLIDER0")
|
||||
PORT_ADJUSTER(100, "MODU")
|
||||
|
||||
PORT_START("SLIDER1")
|
||||
PORT_ADJUSTER(100, "AFTER")
|
||||
|
||||
PORT_START("SLIDER2")
|
||||
PORT_ADJUSTER(100, "C2")
|
||||
|
||||
PORT_START("SLIDER3")
|
||||
PORT_ADJUSTER(100, "C1")
|
||||
|
||||
PORT_START("SLIDER4")
|
||||
PORT_ADJUSTER(100, "LOWER (1)")
|
||||
|
||||
PORT_START("SLIDER5")
|
||||
PORT_ADJUSTER(100, "LOWER (2)")
|
||||
|
||||
PORT_START("SLIDER6")
|
||||
PORT_ADJUSTER(100, "UPPER (3)")
|
||||
|
||||
PORT_START("SLIDER7")
|
||||
PORT_ADJUSTER(100, "UPPER (4)")
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
class roland_d70_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -150,6 +183,9 @@ public:
|
||||
m_lcd(*this, "lcd"),
|
||||
m_midi_timer(*this, "midi_timer"),
|
||||
m_keys(*this, "KEY%u", 0),
|
||||
m_sliders(*this, "SLIDER%u", 0),
|
||||
m_protect_sw(*this, "PROTECT_SW"),
|
||||
m_selected_slider(0),
|
||||
m_sw_scan_index(0),
|
||||
m_sw_scan_bank(-1),
|
||||
m_sw_scan_state(0xff),
|
||||
@ -175,7 +211,9 @@ private:
|
||||
void ksga_io_w(offs_t offset, u8 data);
|
||||
u16 port0_r();
|
||||
u8 port1_r();
|
||||
u8 port2_r();
|
||||
void port1_w(u8 data);
|
||||
void port2_w(u8 data);
|
||||
u8 dsp_io_r(offs_t offset);
|
||||
void dsp_io_w(offs_t offset, u8 data);
|
||||
u8 tvf_io_r(offs_t offset);
|
||||
@ -210,9 +248,12 @@ private:
|
||||
required_device<t6963c_device> m_lcd;
|
||||
required_device<timer_device> m_midi_timer;
|
||||
required_ioport_array<8> m_keys;
|
||||
required_ioport_array<8> m_sliders;
|
||||
required_ioport m_protect_sw;
|
||||
|
||||
u8 m_sound_io_buffer[0x100];
|
||||
u8 m_dsp_io_buffer[0x80];
|
||||
u8 m_selected_slider;
|
||||
int m_sw_scan_index;
|
||||
int m_sw_scan_bank;
|
||||
u8 m_sw_scan_state;
|
||||
@ -327,6 +368,17 @@ void roland_d70_state::port1_w(u8 data) {
|
||||
m_ram[0x0f / 2] = (m_ram[0x0f / 2] & 0x00ff) | (u16(m_sw_scan_current_out) << 8);
|
||||
}
|
||||
|
||||
u8 roland_d70_state::port2_r() {
|
||||
u8 value = m_selected_slider << 5;
|
||||
if (m_protect_sw->read())
|
||||
value |= (1 << 4);
|
||||
return value;
|
||||
}
|
||||
|
||||
void roland_d70_state::port2_w(u8 data) {
|
||||
m_selected_slider = data >> 5;
|
||||
}
|
||||
|
||||
u8 roland_d70_state::dsp_io_r(offs_t offset) {
|
||||
return m_dsp_io_buffer[offset];
|
||||
}
|
||||
@ -415,11 +467,14 @@ void roland_d70_state::snd_io_w(offs_t offset, u8 data) {
|
||||
m_sound_io_buffer[offset] = data;
|
||||
}
|
||||
|
||||
u8 roland_d70_state::ach0_r() { return 128; }
|
||||
u8 roland_d70_state::ach1_r() { return 128; }
|
||||
u8 roland_d70_state::ach2_r() { return 128; }
|
||||
u8 roland_d70_state::ach3_r() { return 128; }
|
||||
u8 roland_d70_state::ach4_r() { return 128; }
|
||||
u8 roland_d70_state::ach0_r() {
|
||||
return m_sliders[m_selected_slider & 7]->read();
|
||||
}
|
||||
|
||||
u8 roland_d70_state::ach1_r() { return 128; } // TODO: EXT PEDAL
|
||||
u8 roland_d70_state::ach2_r() { return 128; } // TODO: BENDER
|
||||
u8 roland_d70_state::ach3_r() { return 128; } // TODO: BATTERY
|
||||
u8 roland_d70_state::ach4_r() { return 128; } // TODO: RAM CARD (VBB)
|
||||
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(roland_d70_state::samples_timer_cb) {
|
||||
}
|
||||
@ -450,6 +505,8 @@ void roland_d70_state::d70(machine_config &config) {
|
||||
maincpu.in_p0_cb().set(FUNC(roland_d70_state::port0_r));
|
||||
maincpu.in_p1_cb().set(FUNC(roland_d70_state::port1_r));
|
||||
maincpu.out_p1_cb().set(FUNC(roland_d70_state::port1_w));
|
||||
maincpu.in_p2_cb().set(FUNC(roland_d70_state::port2_r));
|
||||
maincpu.out_p2_cb().set(FUNC(roland_d70_state::port2_w));
|
||||
maincpu.ach0_cb().set(FUNC(roland_d70_state::ach0_r));
|
||||
maincpu.ach1_cb().set(FUNC(roland_d70_state::ach1_r));
|
||||
maincpu.ach2_cb().set(FUNC(roland_d70_state::ach2_r));
|
||||
@ -486,6 +543,8 @@ void roland_d70_state::d70(machine_config &config) {
|
||||
|
||||
MIDI_PORT(config, "mdout", midiout_slot, "midiout");
|
||||
MIDI_PORT(config, "mdthru", midiout_slot, "midiout");
|
||||
|
||||
config.set_default_layout(layout_d70);
|
||||
}
|
||||
|
||||
void roland_d70_state::init_d70() {
|
||||
|
Loading…
Reference in New Issue
Block a user