fidel6502: added 7seg display to fexcel

This commit is contained in:
hap 2016-02-06 02:12:03 +01:00
parent 5b0fcf5997
commit 74630d671b
2 changed files with 117 additions and 64 deletions

View File

@ -41,7 +41,6 @@ public:
TIMER_DEVICE_CALLBACK_MEMBER(irq_off) { m_maincpu->set_input_line(M6502_IRQ_LINE, CLEAR_LINE); }
// CSC
void csc_update_7442();
void csc_prepare_display();
DECLARE_READ8_MEMBER(csc_speech_r);
DECLARE_WRITE8_MEMBER(csc_pia0_pa_w);
@ -62,7 +61,7 @@ public:
DECLARE_WRITE8_MEMBER(sc12_control_w);
DECLARE_READ8_MEMBER(sc12_input_r);
// 6080/6092 (Excellence)
// 6080/6092/6093 (Excellence)
DECLARE_INPUT_CHANGED_MEMBER(fexcelv_bankswitch);
DECLARE_READ8_MEMBER(fexcelv_speech_r);
DECLARE_WRITE8_MEMBER(fexcel_ttl_w);
@ -79,18 +78,13 @@ public:
// misc handlers
void fidel6502_state::csc_update_7442()
void fidel6502_state::csc_prepare_display()
{
// 7442 0-8: led select, input mux
m_inp_mux = 1 << m_led_select & 0x3ff;
// 7442 9: speaker out
m_speaker->level_w(m_inp_mux >> 9 & 1);
}
void fidel6502_state::csc_prepare_display()
{
csc_update_7442();
// 4 7seg leds + H
for (int i = 0; i < 4; i++)
@ -100,7 +94,7 @@ void fidel6502_state::csc_prepare_display()
for (int i = 0; i < 8; i++)
m_display_state[i+4] = (m_inp_mux >> i & 1) ? m_led_data : 0;
set_display_size(8, 12);
set_display_size(8, 4+8);
set_display_segmask(0xf, 0x7f);
display_update();
}
@ -268,7 +262,7 @@ READ8_MEMBER(fidel6502_state::sc12_input_r)
/******************************************************************************
6080/6092 (Excellence)
6080/6092/6093 (Excellence)
******************************************************************************/
// misc handlers
@ -299,15 +293,28 @@ WRITE8_MEMBER(fidel6502_state::fexcel_ttl_w)
// 74259 Q0-Q3: 7442 a0-a3
// 7442 0-8: led data, input mux
UINT16 sel = 1 << (m_led_select & 0xf) & 0x3ff;
UINT8 led_data = sel & 0xff;
m_inp_mux = sel & 0x1ff;
// 7442 9: speaker out (optional?)
m_speaker->level_w(sel >> 9 & 1);
// 74259 Q4,Q5: led select (active low)
display_matrix(9, 2, sel & 0x1ff, ~m_led_select >> 4 & 3);
// 74259 Q4-Q7,Q2,Q1: digit/led select (active low)
UINT8 led_sel = ~BITSWAP8(m_led_select,0,3,1,2,7,6,5,4) & 0x3f;
// a0-a2,d1: digit segment data (optional/model 6093)
m_7seg_data = (m_7seg_data & ~mask) | ((data & 2) ? mask : 0);
UINT8 seg_data = BITSWAP8(m_7seg_data,0,1,3,2,7,5,6,4);
// speech (model 6092)
// update display: 4 7seg leds, 2*8 chessboard leds
for (int i = 0; i < 6; i++)
m_display_state[i] = (led_sel >> i & 1) ? ((i < 2) ? led_data : seg_data) : 0;
set_display_size(8, 2+4);
set_display_segmask(0x3c, 0x7f);
display_update();
// speech (optional/model 6092)
if (m_speech != nullptr)
{
// a0-a2,d2: 74259(2) to speech board
@ -365,7 +372,7 @@ static ADDRESS_MAP_START( sc12_map, AS_PROGRAM, 8, fidel6502_state )
ADDRESS_MAP_END
// 6080/6092 (Excellence)
// 6080/6092/6093 (Excellence)
static ADDRESS_MAP_START( fexcel_map, AS_PROGRAM, 8, fidel6502_state )
AM_RANGE(0x0000, 0x1fff) AM_MIRROR(0x2000) AM_RAM
@ -801,5 +808,5 @@ COMP( 1981, cscfr, csc, 0, csc, cscg, driver_device, 0, "Fideli
COMP( 1984, fscc12, 0, 0, sc12, sc12, driver_device, 0, "Fidelity Electronics", "Sensory Chess Challenger 12-B", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
COMP( 1987, fexcel, 0, 0, fexcel, fexcel, driver_device, 0, "Fidelity Electronics", "Excellence (model 6080)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
COMP( 1987, fexcel, 0, 0, fexcel, fexcel, driver_device, 0, "Fidelity Electronics", "Excellence (model 6080/6093)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )
COMP( 1987, fexcelv, 0, 0, fexcelv, fexcelv, driver_device, 0, "Fidelity Electronics", "Voice Excellence", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK )

View File

@ -5,6 +5,10 @@
<element name="static_black"><rect><color red="0.0" green="0.0" blue="0.0" /></rect></element>
<element name="digit" defstate="0">
<led7seg><color red="1.0" green="0.1" blue="0.15" /></led7seg>
</element>
<element name="led" defstate="0">
<disk state="1"><color red="1.0" green="0.1" blue="0.15" /></disk>
<disk state="0"><color red="0.1" green="0.01" blue="0.015" /></disk>
@ -192,22 +196,40 @@
<text string="CLEAR"><color red="0.17" green="0.15" blue="0.15" /></text>
</element>
<element name="text_tl7"><text string="king"><color red="0.45" green="0.15" blue="0.14" /></text></element>
<element name="text_tl6"><text string="queen"><color red="0.45" green="0.15" blue="0.14" /></text></element>
<element name="text_tl5"><text string="rook"><color red="0.45" green="0.15" blue="0.14" /></text></element>
<element name="text_tl4"><text string="bishop"><color red="0.45" green="0.15" blue="0.14" /></text></element>
<element name="text_tl3"><text string="knight"><color red="0.45" green="0.15" blue="0.14" /></text></element>
<element name="text_tl2"><text string="pion"><color red="0.45" green="0.15" blue="0.14" /></text></element>
<element name="text_tl7">
<rect><color red="0.17" green="0.15" blue="0.15" /></rect>
<text string="king"><color red="0.65" green="0.15" blue="0.14" /></text>
</element>
<element name="text_tl6">
<rect><color red="0.17" green="0.15" blue="0.15" /></rect>
<text string="queen"><color red="0.65" green="0.15" blue="0.14" /></text>
</element>
<element name="text_tl5">
<rect><color red="0.17" green="0.15" blue="0.15" /></rect>
<text string="rook"><color red="0.65" green="0.15" blue="0.14" /></text>
</element>
<element name="text_tl4">
<rect><color red="0.17" green="0.15" blue="0.15" /></rect>
<text string="bishop"><color red="0.65" green="0.15" blue="0.14" /></text>
</element>
<element name="text_tl3">
<rect><color red="0.17" green="0.15" blue="0.15" /></rect>
<text string="knight"><color red="0.65" green="0.15" blue="0.14" /></text>
</element>
<element name="text_tl2">
<rect><color red="0.17" green="0.15" blue="0.15" /></rect>
<text string="pion"><color red="0.65" green="0.15" blue="0.14" /></text>
</element>
<!-- build screen -->
<view name="Internal Layout">
<bounds left="-2" right="100" top="-2" bottom="89" />
<bounds left="-2" right="98" top="-14.5" bottom="89" />
<bezel element="static_black">
<bounds left="-2" right="100" top="-2" bottom="89" />
<bounds left="-2" right="98" top="-14.5" bottom="89" />
</bezel>
<bezel element="white"><bounds x="-2.5" y="-2.5" width="90.5" height="92" /></bezel>
<bezel element="white"><bounds x="-2.5" y="-2" width="101" height="91.5" /></bezel>
<!-- chessboard coords -->
@ -385,52 +407,76 @@
<bezel name="1.6" element="ledg"><bounds x="67.25" y="83" width="1.5" height="1.5" /></bezel>
<bezel name="1.7" element="ledg"><bounds x="77.25" y="83" width="1.5" height="1.5" /></bezel>
<!-- 7seg leds -->
<bezel name="digit2" element="digit">
<bounds x="64.18" y="-12.5" width="5.66" height="8.5" />
</bezel>
<bezel name="digit3" element="digit">
<bounds x="69.84" y="-12.5" width="5.66" height="8.5" />
</bezel>
<bezel name="digit4" element="digit">
<bounds x="78.34" y="-12.5" width="5.66" height="8.5" />
</bezel>
<bezel name="digit5" element="digit">
<bounds x="84" y="-12.5" width="5.66" height="8.5" />
</bezel>
<bezel name="3.7" element="led">
<bounds x="76.76" y="-11" width="0.85" height="0.85" />
</bezel>
<bezel name="2.7" element="led">
<bounds x="76.31" y="-6.35" width="0.85" height="0.85" />
</bezel>
<!-- right side -->
<bezel element="text_tl7"><bounds x="90" y="17" width="8" height="1.7" /></bezel>
<bezel element="text_tl6"><bounds x="90" y="26" width="8" height="1.7" /></bezel>
<bezel element="text_tl5"><bounds x="90" y="35" width="8" height="1.7" /></bezel>
<bezel element="text_tl4"><bounds x="90" y="44" width="8" height="1.7" /></bezel>
<bezel element="text_tl3"><bounds x="90" y="53" width="8" height="1.7" /></bezel>
<bezel element="text_tl2"><bounds x="90" y="62" width="8" height="1.7" /></bezel>
<bezel element="black"><bounds x="86" y="2" width="10" height="82" /></bezel>
<bezel element="redb"><bounds x="90" y="9" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="90" y="19" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="90" y="28" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="90" y="37" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="90" y="46" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="90" y="55" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="90" y="64" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="90" y="73" width="8" height="4" /></bezel>
<bezel element="text_tl7"><bounds x="87" y="17" width="8" height="1.7" /></bezel>
<bezel element="text_tl6"><bounds x="87" y="26" width="8" height="1.7" /></bezel>
<bezel element="text_tl5"><bounds x="87" y="35" width="8" height="1.7" /></bezel>
<bezel element="text_tl4"><bounds x="87" y="44" width="8" height="1.7" /></bezel>
<bezel element="text_tl3"><bounds x="87" y="53" width="8" height="1.7" /></bezel>
<bezel element="text_tl2"><bounds x="87" y="62" width="8" height="1.7" /></bezel>
<bezel element="white"><bounds x="90.3" y="9.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="90.3" y="19.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="90.3" y="28.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="90.3" y="37.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="90.3" y="46.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="90.3" y="55.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="90.3" y="64.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="90.3" y="73.3" width="7.4" height="3.4" /></bezel>
<bezel element="redb"><bounds x="87" y="9" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="87" y="19" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="87" y="28" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="87" y="37" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="87" y="46" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="87" y="55" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="87" y="64" width="8" height="4" /></bezel>
<bezel element="redb"><bounds x="87" y="73" width="8" height="4" /></bezel>
<bezel element="text_t81"><bounds x="90.35" y="9.5" width="7.3" height="1.5" /></bezel>
<bezel element="text_t82"><bounds x="90.35" y="11" width="7.3" height="1.5" /></bezel>
<bezel element="text_t7"><bounds x="90.35" y="20.25" width="7.3" height="1.5" /></bezel>
<bezel element="text_t6"><bounds x="90.35" y="29.25" width="7.3" height="1.5" /></bezel>
<bezel element="text_t5"><bounds x="90.35" y="38.25" width="7.3" height="1.5" /></bezel>
<bezel element="text_t41"><bounds x="90.35" y="46.5" width="7.3" height="1.5" /></bezel>
<bezel element="text_t42"><bounds x="90.35" y="48" width="7.3" height="1.5" /></bezel>
<bezel element="text_t3"><bounds x="90.35" y="56.25" width="7.3" height="1.5" /></bezel>
<bezel element="text_t2"><bounds x="90.35" y="65.25" width="7.3" height="1.5" /></bezel>
<bezel element="text_t1"><bounds x="90.35" y="74.25" width="7.3" height="1.5" /></bezel>
<bezel element="white"><bounds x="87.3" y="9.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="87.3" y="19.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="87.3" y="28.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="87.3" y="37.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="87.3" y="46.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="87.3" y="55.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="87.3" y="64.3" width="7.4" height="3.4" /></bezel>
<bezel element="white"><bounds x="87.3" y="73.3" width="7.4" height="3.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="90" y="9" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="90" y="19" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="90" y="28" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="90" y="37" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="90" y="46" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="90" y="55" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="90" y="64" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="90" y="73" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="text_t81"><bounds x="87.35" y="9.5" width="7.3" height="1.5" /></bezel>
<bezel element="text_t82"><bounds x="87.35" y="11" width="7.3" height="1.5" /></bezel>
<bezel element="text_t7"><bounds x="87.35" y="20.25" width="7.3" height="1.5" /></bezel>
<bezel element="text_t6"><bounds x="87.35" y="29.25" width="7.3" height="1.5" /></bezel>
<bezel element="text_t5"><bounds x="87.35" y="38.25" width="7.3" height="1.5" /></bezel>
<bezel element="text_t41"><bounds x="87.35" y="46.5" width="7.3" height="1.5" /></bezel>
<bezel element="text_t42"><bounds x="87.35" y="48" width="7.3" height="1.5" /></bezel>
<bezel element="text_t3"><bounds x="87.35" y="56.25" width="7.3" height="1.5" /></bezel>
<bezel element="text_t2"><bounds x="87.35" y="65.25" width="7.3" height="1.5" /></bezel>
<bezel element="text_t1"><bounds x="87.35" y="74.25" width="7.3" height="1.5" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x80"><bounds x="87" y="9" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x40"><bounds x="87" y="19" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x20"><bounds x="87" y="28" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x10"><bounds x="87" y="37" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x08"><bounds x="87" y="46" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x04"><bounds x="87" y="55" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x02"><bounds x="87" y="64" width="8" height="4" /><color alpha="0.4" /></bezel>
<bezel element="hlb" inputtag="IN.8" inputmask="0x01"><bounds x="87" y="73" width="8" height="4" /><color alpha="0.4" /></bezel>
</view>