Skip to content

Commit 6bcdff5

Browse files
committed
cvs: add 0x1885 sound trigger,
route16: small cleanup
1 parent 98c80be commit 6bcdff5

File tree

5 files changed

+162
-188
lines changed

5 files changed

+162
-188
lines changed

src/mame/misc/cvs.cpp

+13-13
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class cvs_state : public driver_device
196196
required_device<screen_device> m_screen;
197197
required_device<palette_device> m_palette;
198198
required_device_array<dac_byte_interface, 2> m_dac;
199-
required_device_array<beep_device, 4> m_beep;
199+
required_device_array<beep_device, 3> m_beep;
200200
required_device<tms5100_device> m_tms5100;
201201
required_ioport_array<4> m_in;
202202
required_ioport_array<3> m_dsw;
@@ -652,7 +652,7 @@ void cvs_state::_8_bit_dac_data_w(u8 data)
652652
m_dac[0]->write(data);
653653

654654
// data also goes to 8038 oscillator
655-
m_beep[0]->set_clock(data * 4);
655+
m_beep[2]->set_clock(data * 4);
656656
}
657657

658658
void cvs_state::_4_bit_dac_data_w(offs_t offset, u8 data)
@@ -677,12 +677,10 @@ void cvs_state::_4_bit_dac_data_w(offs_t offset, u8 data)
677677

678678
void cvs_state::sh_trigger_w(offs_t offset, u8 data)
679679
{
680-
/* offset 0 is used in darkwar, spacefrt, logger, raiders
681-
* offset 2 is used in darkwar, spacefrt, 8ball, superbik, raiders
682-
* offset 3 is used in cosmos, darkwar, superbik, raiders
683-
*
684-
* offset 1 is only used inadvertedly(?) by logger
685-
*/
680+
// offset 0 is used in darkwar, spacefrt, logger, dazzler, wallst, raiders
681+
// offset 1 is used in logger, wallst
682+
// offset 2 is used in darkwar, spacefrt, 8ball, dazzler, superbik, raiders
683+
// offset 3 is used in cosmos, darkwar, superbik, raiders
686684

687685
data &= 1;
688686

@@ -692,7 +690,10 @@ void cvs_state::sh_trigger_w(offs_t offset, u8 data)
692690
m_sh_trigger[offset] = data;
693691
}
694692

695-
m_beep[offset]->set_state(data);
693+
if (offset != 1)
694+
m_beep[(offset == 0) ? 2 : (offset & 1)]->set_state(data);
695+
else
696+
m_beep[2]->set_output_gain(0, data ? 0.5 : 1.0);
696697
}
697698

698699

@@ -1373,10 +1374,9 @@ void cvs_state::cvs(machine_config &config)
13731374
DAC_8BIT_R2R(config, m_dac[0], 0).add_route(ALL_OUTPUTS, "speaker", 0.15); // unknown DAC
13741375
DAC_4BIT_R2R(config, m_dac[1], 0).add_route(ALL_OUTPUTS, "speaker", 0.20); // unknown DAC
13751376

1376-
BEEP(config, m_beep[0], 0).add_route(ALL_OUTPUTS, "speaker", 0.10); // placeholder
1377-
BEEP(config, m_beep[1], 0).add_route(ALL_OUTPUTS, "speaker", 0.10); // "
1378-
BEEP(config, m_beep[2], 600).add_route(ALL_OUTPUTS, "speaker", 0.15); // "
1379-
BEEP(config, m_beep[3], 150).add_route(ALL_OUTPUTS, "speaker", 0.15); // "
1377+
BEEP(config, m_beep[0], 600).add_route(ALL_OUTPUTS, "speaker", 0.15); // placeholder
1378+
BEEP(config, m_beep[1], 150).add_route(ALL_OUTPUTS, "speaker", 0.15); // "
1379+
BEEP(config, m_beep[2], 0).add_route(ALL_OUTPUTS, "speaker", 0.075); // "
13801380

13811381
TMS5100(config, m_tms5100, 640_kHz_XTAL);
13821382
m_tms5100->data().set(FUNC(cvs_state::speech_rom_read_bit));

src/mame/saitek/minichess.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ template<int N>
109109
void mini_state::seg_w(u8 data)
110110
{
111111
// R2x,R3x: LCD segment data
112-
m_lcd_data = (m_lcd_data & ~(0xf << (N*4))) | (data << (N*4));
112+
const u8 shift = N * 4;
113+
m_lcd_data = (m_lcd_data & ~(0xf << shift)) | (data << shift);
113114
update_lcd();
114115
}
115116

@@ -196,6 +197,7 @@ void mini_state::smchess(machine_config &config)
196197
PWM_DISPLAY(config, m_display).set_size(4, 8);
197198
m_display->set_segmask(0xf, 0x7f);
198199
m_display->set_refresh(attotime::from_hz(30));
200+
199201
config.set_default_layout(layout_saitek_minichess);
200202

201203
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_SVG));

0 commit comments

Comments
 (0)