Previous 199869 Revisions Next

r44528 Wednesday 27th January, 2016 at 18:25:06 UTC by hap
fidel*: small fix with VSC/CSC sound
[src/mame/drivers]fidel6502.cpp fidelz80.cpp

trunk/src/mame/drivers/fidel6502.cpp
r253039r253040
4545   optional_device<generic_slot_device> m_cart;
4646   optional_device<speaker_sound_device> m_speaker;
4747   optional_device<timer_device> m_irq_off;
48
48   
4949   // model CSC
50   void csc_update_7442();
5051   void csc_prepare_display();
5152   DECLARE_READ8_MEMBER(csc_speech_r);
5253   DECLARE_WRITE8_MEMBER(csc_pia0_pa_w);
r253039r253040
8081
8182// misc handlers
8283
84void fidel6502_state::csc_update_7442()
85{
86   // 7442 0-8: led select, input mux
87   m_inp_mux = 1 << m_led_select & 0x3ff;
88   
89   // 7442 9: buzzer speaker out
90   m_speaker->level_w(m_inp_mux >> 9 & 1);
91}
92
8393void fidel6502_state::csc_prepare_display()
8494{
85   // 7442 output, also update input mux (9 is unused)
86   m_inp_mux = (1 << m_led_select) & 0x1ff;
95   csc_update_7442();
8796
8897   // 4 7seg leds + H
8998   for (int i = 0; i < 4; i++)
r253039r253040
126135
127136   // d1: TSI START line
128137   m_speech->start_w(data >> 1 & 1);
129
130   // d4: tone line
131   m_speaker->level_w(data >> 4 & 1);
138   
139   // d4: lower TSI volume
140   m_speech->set_output_gain(0, (data & 0x10) ? 0.5 : 1.0);
132141}
133142
134143READ8_MEMBER(fidel6502_state::csc_pia0_pb_r)
trunk/src/mame/drivers/fidelz80.cpp
r253039r253040
366366PA7 - 7seg segments A
367367
368368PB0 - A12 on speech ROM (if used... not used on this model, ROM is 4K)
369PB1 - START line on S14001A
369PB1 - START line on TSI
370370PB2 - white wire
371PB3 - BUSY line from S14001A
372PB4 - Tone line (toggle to make a tone in the speaker)
371PB3 - BUSY line from TSI
372PB4 - hi/lo TSI speaker volume
373373PB5 - button row 9
374374PB6 - selection jumper (resistor to 5V)
375375PB7 - selection jumper (resistor to ground)
r253039r253040
4224226 - LED column G, button column G
4234237 - LED column H, button column H
4244248 - button column I
4259 -
4259 - Tone line (toggle to make a tone in the buzzer)
426426
427427The rows/columns are indicated on the game board:
428428
r253039r253040
593593
594594PB.0 - button column I
595595PB.1 - button column J
596PB.2 - Tone line (toggle to make tone in the speaker)
596PB.2 - hi/lo TSI speaker volume
597597PB.3 - violet wire
598598PB.4 - white wire (and TSI BUSY line)
599599PB.5 - selection jumper input (see below)
r253039r253040
703703#include "machine/i8255.h"
704704#include "machine/i8243.h"
705705#include "machine/z80pio.h"
706#include "sound/speaker.h"
707706#include "sound/beep.h"
708707
709708#include "includes/fidelz80.h"
r253039r253040
724723      m_z80pio(*this, "z80pio"),
725724      m_ppi8255(*this, "ppi8255"),
726725      m_i8243(*this, "i8243"),
727      m_speaker(*this, "speaker"),
728726      m_beeper_off(*this, "beeper_off"),
729727      m_beeper(*this, "beeper")
730728   { }
r253039r253040
734732   optional_device<z80pio_device> m_z80pio;
735733   optional_device<i8255_device> m_ppi8255;
736734   optional_device<i8243_device> m_i8243;
737   optional_device<speaker_sound_device> m_speaker;
738735   optional_device<timer_device> m_beeper_off;
739736   optional_device<beep_device> m_beeper;
740737
r253039r253040
11021099   // d0,d1: input mux highest bits
11031100   m_inp_mux = (m_inp_mux & 0xff) | (data << 8 & 0x300);
11041101
1105   // d2: tone line
1106   m_speaker->level_w(data >> 2 & 1);
1107
11081102   // d6: TSI START line
11091103   m_speech->start_w(data >> 6 & 1);
1104
1105   // d2: lower TSI volume
1106   m_speech->set_output_gain(0, (data & 4) ? 0.5 : 1.0);
11101107}
11111108
11121109
r253039r253040
12741271   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_E)
12751272
12761273   PORT_START("IN.1")
1277   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CB") PORT_CODE(KEYCODE_Z)
1274   PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Speak") PORT_CODE(KEYCODE_SPACE)
12781275   PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DM") PORT_CODE(KEYCODE_M)
12791276   PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_B)
12801277   PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_F)
r253039r253040
15411538   MCFG_SPEAKER_STANDARD_MONO("mono")
15421539   MCFG_SOUND_ADD("speech", S14001A, 25000) // R/C circuit, around 25khz
15431540   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.75)
1544
1545   MCFG_SOUND_ADD("speaker", SPEAKER_SOUND, 0)
1546   MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
15471541MACHINE_CONFIG_END
15481542
15491543static MACHINE_CONFIG_START( vbrc, fidelz80_state )


Previous 199869 Revisions Next


© 1997-2024 The MAME Team