Skip to content

Commit 230d990

Browse files
committed
Show floppy and cartridge if they are loaded.
1 parent 2b3c7ff commit 230d990

File tree

7 files changed

+200
-65
lines changed

7 files changed

+200
-65
lines changed

src/mame/ensoniq/esq5505.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,9 @@ void esq5505_state::cartridge_loaded(bool loaded)
336336
// On VFX and later, DUART input bit 1 is 0 for cartridge present.
337337
LOG("ip1 -> %d\n", state);
338338
m_duart->ip1_w(state);
339+
340+
// Also upadte the panel.
341+
m_panel->set_cartridge_loaded(loaded);
339342
}
340343

341344
void esq5505_state::cartridge_load(ensoniq_vfx_cartridge *cart)
@@ -404,6 +407,9 @@ void esq5505_state::floppy_loaded(bool loaded)
404407

405408
LOG("Floppy %s\n", loaded ? "Inserted" : "Ejected");
406409
update_floppy_inputs();
410+
411+
// Also update the panel.
412+
m_panel->set_floppy_loaded(loaded);
407413
}
408414
else
409415
{

src/mame/ensoniq/esqpanel.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,7 @@ esqpanel2x40_vfx_device::esqpanel2x40_vfx_device(const machine_config &mconfig,
766766
m_panel_type(panel_type),
767767
m_vfd(*this, "vfd"),
768768
m_lights(*this, "lights"),
769+
m_media(*this, "media"),
769770
m_buttons_0(*this, "buttons_0"),
770771
m_buttons_32(*this, "buttons_32"),
771772
m_analog_data_entry(*this, "analog_data_entry"),
@@ -787,6 +788,11 @@ bool esqpanel2x40_vfx_device::write_contents(std::ostream &o)
787788
return true;
788789
}
789790

791+
void esqpanel2x40_vfx_device::update_media()
792+
{
793+
m_media = (m_floppy_loaded << 1) | (m_cartridge_loaded);
794+
}
795+
790796
void esqpanel2x40_vfx_device::update_lights()
791797
{
792798
// set the lights according to their status and blink phase.
@@ -817,6 +823,7 @@ void esqpanel2x40_vfx_device::device_start()
817823
{
818824
esqpanel_device::device_start();
819825

826+
m_media.resolve();
820827
m_lights.resolve();
821828

822829
m_blink_timer = timer_alloc(FUNC(esqpanel2x40_vfx_device::update_blink), this);
@@ -960,6 +967,18 @@ INPUT_CHANGED_MEMBER(esqpanel2x40_vfx_device::key_change)
960967
}
961968
}
962969

970+
void esqpanel2x40_vfx_device::set_cartridge_loaded(bool loaded)
971+
{
972+
m_cartridge_loaded = loaded;
973+
update_media();
974+
}
975+
976+
void esqpanel2x40_vfx_device::set_floppy_loaded(bool loaded)
977+
{
978+
m_floppy_loaded = loaded;
979+
update_media();
980+
}
981+
963982
void esqpanel2x40_vfx_device::set_floppy_active(bool floppy_active)
964983
{
965984
m_floppy_active = floppy_active;

src/mame/ensoniq/esqpanel.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ class esqpanel_device : public device_t, public device_serial_interface
3737
virtual void key_down(uint8_t key, uint8_t velocity);
3838
virtual void key_pressure(uint8_t key, uint8_t pressure);
3939
virtual void key_up(uint8_t key);
40+
virtual void set_cartridge_loaded(bool loaded) { }
41+
virtual void set_floppy_loaded(bool loaded) { }
4042
virtual void set_floppy_active(bool floppy_active) { }
4143

4244
protected:
@@ -115,6 +117,8 @@ class esqpanel2x40_vfx_device : public esqpanel_device {
115117
DECLARE_INPUT_CHANGED_MEMBER(patch_select_change);
116118
DECLARE_INPUT_CHANGED_MEMBER(analog_value_change);
117119
DECLARE_INPUT_CHANGED_MEMBER(key_change);
120+
void set_cartridge_loaded(bool loaded) override;
121+
void set_floppy_loaded(bool loaded) override;
118122
void set_floppy_active(bool floppy_active) override;
119123

120124
void set_family_member(int family_member);
@@ -151,14 +155,18 @@ class esqpanel2x40_vfx_device : public esqpanel_device {
151155
required_device<esq2x40_vfx_device> m_vfd;
152156

153157
output_finder<> m_lights;
158+
output_finder<> m_media;
154159

155160
required_ioport m_buttons_0;
156161
required_ioport m_buttons_32;
157162
required_ioport m_analog_data_entry;
158163
required_ioport m_analog_volume;
159164

165+
bool m_cartridge_loaded = false;
166+
bool m_floppy_loaded = false;
160167
bool m_floppy_active = false;
161168

169+
void update_media();
162170
TIMER_CALLBACK_MEMBER(update_blink);
163171
void update_lights();
164172

src/mame/layout/sd1.lay

Lines changed: 47 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,26 @@
6868
]]></data>
6969
</image>
7070
</element>
71+
<element name="media_cartridge">
72+
<image state="0" statemask="0x0001">
73+
<data>
74+
<![CDATA[
75+
<svg x="0" y="0" width="53" height="24" viewBox="0 0 53 24">
76+
<rect x="0" y="0" width="53" height="24" rx="0" fill="#303030" stroke="none" />
77+
</svg>
78+
]]></data>
79+
</image>
80+
<image state="0x0001" statemask="0x0001">
81+
<data>
82+
<![CDATA[
83+
<svg x="0" y="0" width="53" height="24" viewBox="0 0 53 24">
84+
<rect x="0" y="0" width="53" height="24" rx="0" fill="#101010" stroke="none" />
85+
<path d="M1.5 14l1 10h48l1 -10 -1 -9h-48z" fill="#444444" stroke="none" />
86+
<rect x="10.5" y="14" width="32" height="10" rx="0" fill="#bbbbbb" stroke="none" />
87+
</svg>
88+
]]></data>
89+
</image>
90+
</element>
7191
<element name="drawing_fake_ensoniq">
7292
<image>
7393
<bounds x="0" y="0" width="72" height="13" />
@@ -93,7 +113,7 @@
93113
]]></data>
94114
</image>
95115
</element>
96-
<element name="drawing_wheel_and_floppy_area">
116+
<element name="drawing_wheel_and_floppy_drive_area">
97117
<image>
98118
<bounds x="0" y="0" width="118" height="161" />
99119
<data>
@@ -106,18 +126,32 @@
106126
]]></data>
107127
</image>
108128
</element>
109-
<element name="drawing_floppy">
110-
<image>
111-
<bounds x="0" y="0" width="102" height="36" />
129+
<element name="media_floppy">
130+
<image state="0" statemask="0x0002">
112131
<data>
113132
<![CDATA[
114133
<svg x="0" y="0" width="102" height="36" viewBox="0 0 102 36">
115134
<rect x="0" y="0" width="102" height="5" rx="0" fill="#444444" stroke="none" />
116135
<rect x="0" y="5" width="102" height="31" rx="0" fill="#333333" stroke="none" />
117-
<path d="M 3 6 H 74 V 3 H 99 V 20 H 74 V 16 H 3 Z" fill="#2a2a2a" stroke="none" />
118-
<path d="M 5 9 H 97 V 13 H 5 Z" fill="#222222" stroke="none" />
136+
<rect x="4" y="7" width="94" height="8" rx="0" fill="#222222" stroke="none" />
137+
<path d="M 3 6 H 74 V 3 H 99 V 20 H 74 V 16 H 3 Z M 5 9 H 97 V 16 H 74 V 13 H 5 Z" fill="#2a2a2a" fill-rule="evenodd" stroke="none" />
119138
<path d="M 63 22.5 H 68 V 24.5 H 63 Z" fill="#112211" stroke="none" />
120-
<path d="M 74 21 h 25 v 26 H 74 Z" fill="#2a2a2a" stroke="none" />
139+
<rect x="74" y="21" width="25" height="2" rx="0" fill="#444444" stroke="none" />
140+
</svg>
141+
]]></data>
142+
</image>
143+
<image state="0x0002" statemask="0x0002">
144+
<data>
145+
<![CDATA[
146+
<svg x="0" y="0" width="102" height="36" viewBox="0 0 102 36">
147+
<rect x="0" y="0" width="102" height="5" rx="0" fill="#444444" stroke="none" />
148+
<rect x="0" y="5" width="102" height="31" rx="0" fill="#333333" stroke="none" />
149+
<rect x="4" y="7" width="94" height="8" rx="0" fill="#222222" stroke="none" />
150+
<rect x="6" y="12" width="90" height="3.5" rx="0" fill="#024d96" stroke="none" />
151+
<rect x="16" y="12" width="70" height="3.5" rx="0" fill="#bbbbbb" stroke="none" />
152+
<path d="M 3 6 H 74 V 3 H 99 V 20 H 74 V 16 H 3 Z M 5 9 H 97 V 16 H 74 V 13 H 5 Z" fill="#2a2a2a" fill-rule="evenodd" stroke="none" />
153+
<path d="M 63 22.5 H 68 V 24.5 H 63 Z" fill="#112211" stroke="none" />
154+
<rect x="74" y="21" width="25" height="10" rx="0" fill="#444444" stroke="none" />
121155
</svg>
122156
]]></data>
123157
</image>
@@ -175,11 +209,6 @@
175209
<color red="0.062745" green="0.062745" blue="0.062745" />
176210
</rect>
177211
</element>
178-
<element name="rect_body_up">
179-
<rect>
180-
<color red="0.18824" green="0.18824" blue="0.18824" />
181-
</rect>
182-
</element>
183212
<element name="rect_body">
184213
<rect>
185214
<color red="0.12549" green="0.12549" blue="0.12549" />
@@ -2563,10 +2592,10 @@
25632592
<bounds x="479" y="102" width="24.5" height="1.2" />
25642593
</element>
25652594
<element ref="rect_body_down">
2566-
<bounds x="720" y="22" width="56" height="27" />
2595+
<bounds x="720" y="22" width="57" height="28" />
25672596
</element>
2568-
<element ref="rect_body_up">
2569-
<bounds x="721.5" y="23.5" width="53" height="24" />
2597+
<element name="media" ref="media_cartridge">
2598+
<bounds x="722" y="24" width="53" height="24" />
25702599
</element>
25712600
<element ref="rect_body">
25722601
<bounds x="0" y="121.5" width="845" height="170" />
@@ -2586,10 +2615,10 @@
25862615
<element ref="drawing_storage_cutout">
25872616
<bounds x="-127" y="13" width="118" height="96" />
25882617
</element>
2589-
<element ref="drawing_wheel_and_floppy_area">
2618+
<element ref="drawing_wheel_and_floppy_drive_area">
25902619
<bounds x="-127" y="129.5" width="118" height="162" />
25912620
</element>
2592-
<element ref="drawing_floppy">
2621+
<element name="media" ref="media_floppy">
25932622
<bounds x="-119" y="129.5" width="102" height="13" />
25942623
</element>
25952624
<element ref="ellipse_screwhead">
@@ -2599,7 +2628,7 @@
25992628
<bounds x="837" y="129.5" width="6" height="6" />
26002629
</element>
26012630
<element ref="text_L_cartridge">
2602-
<bounds x="720" y="16.877" width="56" height="4.4412" />
2631+
<bounds x="720" y="16.877" width="57" height="4.4412" />
26032632
</element>
26042633
<element ref="text_S_music_production_synthesizer">
26052634
<bounds x="13" y="7" width="88" height="4.4412" />

src/mame/layout/sd132.lay

Lines changed: 47 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,26 @@
6868
]]></data>
6969
</image>
7070
</element>
71+
<element name="media_cartridge">
72+
<image state="0" statemask="0x0001">
73+
<data>
74+
<![CDATA[
75+
<svg x="0" y="0" width="53" height="24" viewBox="0 0 53 24">
76+
<rect x="0" y="0" width="53" height="24" rx="0" fill="#303030" stroke="none" />
77+
</svg>
78+
]]></data>
79+
</image>
80+
<image state="0x0001" statemask="0x0001">
81+
<data>
82+
<![CDATA[
83+
<svg x="0" y="0" width="53" height="24" viewBox="0 0 53 24">
84+
<rect x="0" y="0" width="53" height="24" rx="0" fill="#101010" stroke="none" />
85+
<path d="M1.5 14l1 10h48l1 -10 -1 -9h-48z" fill="#444444" stroke="none" />
86+
<rect x="10.5" y="14" width="32" height="10" rx="0" fill="#bbbbbb" stroke="none" />
87+
</svg>
88+
]]></data>
89+
</image>
90+
</element>
7191
<element name="drawing_fake_ensoniq">
7292
<image>
7393
<bounds x="0" y="0" width="72" height="13" />
@@ -93,7 +113,7 @@
93113
]]></data>
94114
</image>
95115
</element>
96-
<element name="drawing_wheel_and_floppy_area">
116+
<element name="drawing_wheel_and_floppy_drive_area">
97117
<image>
98118
<bounds x="0" y="0" width="118" height="161" />
99119
<data>
@@ -106,18 +126,32 @@
106126
]]></data>
107127
</image>
108128
</element>
109-
<element name="drawing_floppy">
110-
<image>
111-
<bounds x="0" y="0" width="102" height="36" />
129+
<element name="media_floppy">
130+
<image state="0" statemask="0x0002">
112131
<data>
113132
<![CDATA[
114133
<svg x="0" y="0" width="102" height="36" viewBox="0 0 102 36">
115134
<rect x="0" y="0" width="102" height="5" rx="0" fill="#444444" stroke="none" />
116135
<rect x="0" y="5" width="102" height="31" rx="0" fill="#333333" stroke="none" />
117-
<path d="M 3 6 H 74 V 3 H 99 V 20 H 74 V 16 H 3 Z" fill="#2a2a2a" stroke="none" />
118-
<path d="M 5 9 H 97 V 13 H 5 Z" fill="#222222" stroke="none" />
136+
<rect x="4" y="7" width="94" height="8" rx="0" fill="#222222" stroke="none" />
137+
<path d="M 3 6 H 74 V 3 H 99 V 20 H 74 V 16 H 3 Z M 5 9 H 97 V 16 H 74 V 13 H 5 Z" fill="#2a2a2a" fill-rule="evenodd" stroke="none" />
119138
<path d="M 63 22.5 H 68 V 24.5 H 63 Z" fill="#112211" stroke="none" />
120-
<path d="M 74 21 h 25 v 26 H 74 Z" fill="#2a2a2a" stroke="none" />
139+
<rect x="74" y="21" width="25" height="2" rx="0" fill="#444444" stroke="none" />
140+
</svg>
141+
]]></data>
142+
</image>
143+
<image state="0x0002" statemask="0x0002">
144+
<data>
145+
<![CDATA[
146+
<svg x="0" y="0" width="102" height="36" viewBox="0 0 102 36">
147+
<rect x="0" y="0" width="102" height="5" rx="0" fill="#444444" stroke="none" />
148+
<rect x="0" y="5" width="102" height="31" rx="0" fill="#333333" stroke="none" />
149+
<rect x="4" y="7" width="94" height="8" rx="0" fill="#222222" stroke="none" />
150+
<rect x="6" y="12" width="90" height="3.5" rx="0" fill="#024d96" stroke="none" />
151+
<rect x="16" y="12" width="70" height="3.5" rx="0" fill="#bbbbbb" stroke="none" />
152+
<path d="M 3 6 H 74 V 3 H 99 V 20 H 74 V 16 H 3 Z M 5 9 H 97 V 16 H 74 V 13 H 5 Z" fill="#2a2a2a" fill-rule="evenodd" stroke="none" />
153+
<path d="M 63 22.5 H 68 V 24.5 H 63 Z" fill="#112211" stroke="none" />
154+
<rect x="74" y="21" width="25" height="10" rx="0" fill="#444444" stroke="none" />
121155
</svg>
122156
]]></data>
123157
</image>
@@ -175,11 +209,6 @@
175209
<color red="0.062745" green="0.062745" blue="0.062745" />
176210
</rect>
177211
</element>
178-
<element name="rect_body_up">
179-
<rect>
180-
<color red="0.18824" green="0.18824" blue="0.18824" />
181-
</rect>
182-
</element>
183212
<element name="rect_body">
184213
<rect>
185214
<color red="0.12549" green="0.12549" blue="0.12549" />
@@ -2566,10 +2595,10 @@
25662595
<bounds x="479" y="102" width="24.5" height="1.2" />
25672596
</element>
25682597
<element ref="rect_body_down">
2569-
<bounds x="720" y="22" width="56" height="27" />
2598+
<bounds x="720" y="22" width="57" height="28" />
25702599
</element>
2571-
<element ref="rect_body_up">
2572-
<bounds x="721.5" y="23.5" width="53" height="24" />
2600+
<element name="media" ref="media_cartridge">
2601+
<bounds x="722" y="24" width="53" height="24" />
25732602
</element>
25742603
<element ref="rect_body">
25752604
<bounds x="0" y="121.5" width="845" height="170" />
@@ -2592,10 +2621,10 @@
25922621
<element ref="drawing_storage_cutout">
25932622
<bounds x="-127" y="13" width="118" height="96" />
25942623
</element>
2595-
<element ref="drawing_wheel_and_floppy_area">
2624+
<element ref="drawing_wheel_and_floppy_drive_area">
25962625
<bounds x="-127" y="129.5" width="118" height="162" />
25972626
</element>
2598-
<element ref="drawing_floppy">
2627+
<element name="media" ref="media_floppy">
25992628
<bounds x="-119" y="129.5" width="102" height="13" />
26002629
</element>
26012630
<element ref="ellipse_screwhead">
@@ -2605,7 +2634,7 @@
26052634
<bounds x="837" y="129.5" width="6" height="6" />
26062635
</element>
26072636
<element ref="text_L_cartridge">
2608-
<bounds x="720" y="16.877" width="56" height="4.4412" />
2637+
<bounds x="720" y="16.877" width="57" height="4.4412" />
26092638
</element>
26102639
<element ref="text_S_music_production_synthesizer">
26112640
<bounds x="13" y="7" width="88" height="4.4412" />

0 commit comments

Comments
 (0)