Skip to content

Commit e156fde

Browse files
committed
driveyes: disable sound output for left and right pcbs
1 parent a8a155d commit e156fde

2 files changed

Lines changed: 29 additions & 23 deletions

File tree

src/mame/namco/namcoio_gearbox.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class namcoio_gearbox_device : public device_t
2121
{
2222
public:
2323
// construction/destruction
24-
namcoio_gearbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
24+
namcoio_gearbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
2525

2626
// I/O operations
2727
ioport_value in_r();

src/mame/namco/namcos21_de.cpp

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ see http://www.tvspels-nostalgi.com/driverseye.htm for details about setup (go t
2121
- add communications for Left and Right screen (linked C139 or something else?)
2222
- same flickering polygon glitches as namcos21.cpp
2323
- verify video timing, it's assumed to be the same as namcos21 with a different XTAL
24-
- are the left and right PCB sound outputs N/C?
2524
2625
*/
2726

@@ -59,16 +58,14 @@ class namco_de_pcbstack_device : public device_t
5958
{
6059
public:
6160
// construction/destruction
62-
namco_de_pcbstack_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
61+
namco_de_pcbstack_device(const machine_config &mconfig, const char *tag, device_t *owner, u8 pcb, u32 clock = 0);
6362

6463
protected:
6564
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
6665
virtual void device_start() override ATTR_COLD;
6766
virtual void device_reset() override ATTR_COLD;
6867

6968
private:
70-
INTERRUPT_GEN_MEMBER(irq0_line_hold) { device.execute().set_input_line(0, HOLD_LINE); }
71-
7269
required_device<cpu_device> m_maincpu;
7370
required_device<cpu_device> m_audiocpu;
7471
required_device<cpu_device> m_slave;
@@ -80,7 +77,7 @@ class namco_de_pcbstack_device : public device_t
8077
required_device<c140_device> m_c140;
8178
required_device<ym2151_device> m_ym2151;
8279
required_device_array<mb87077_device, 2> m_mb87077;
83-
required_device_array<mixer_device, 2> m_mixer;
80+
optional_device_array<mixer_device, 2> m_mixer;
8481
required_device<namco_c355spr_device> m_c355spr;
8582
required_device<palette_device> m_palette;
8683
required_device<screen_device> m_screen;
@@ -90,6 +87,7 @@ class namco_de_pcbstack_device : public device_t
9087
required_device<namcos21_3d_device> m_namcos21_3d;
9188
required_device<namcos21_dsp_device> m_namcos21_dsp;
9289

90+
u8 m_pcb = 0;
9391
u16 m_video_enable = 0;
9492

9593
u16 video_enable_r();
@@ -127,7 +125,7 @@ class namco_de_pcbstack_device : public device_t
127125
DEFINE_DEVICE_TYPE(NAMCO_DE_PCB, namco_de_pcbstack_device, "namco_de_pcb", "Namco Driver's Eyes PCB stack")
128126

129127

130-
namco_de_pcbstack_device::namco_de_pcbstack_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
128+
namco_de_pcbstack_device::namco_de_pcbstack_device(const machine_config &mconfig, const char *tag, device_t *owner, u8 pcb, u32 clock) :
131129
device_t(mconfig, NAMCO_DE_PCB, tag, owner, clock),
132130
m_maincpu(*this, "maincpu"),
133131
m_audiocpu(*this, "audiocpu"),
@@ -148,7 +146,8 @@ namco_de_pcbstack_device::namco_de_pcbstack_device(const machine_config &mconfig
148146
m_c140_region(*this, "c140"),
149147
m_dpram(*this, "dpram"),
150148
m_namcos21_3d(*this, "namcos21_3d"),
151-
m_namcos21_dsp(*this, "namcos21dsp")
149+
m_namcos21_dsp(*this, "namcos21dsp"),
150+
m_pcb(pcb)
152151
{
153152
}
154153

@@ -224,28 +223,35 @@ void namco_de_pcbstack_device::device_add_mconfig(machine_config &config)
224223
m_c355spr->set_external_prifill(true);
225224

226225
// sound hardware
227-
SPEAKER(config, "speaker", 4).corners();
228-
229-
MB87077(config, m_mb87077[0]).gain_changed().set(FUNC(namco_de_pcbstack_device::mb87077_gain_changed<0>));
230-
MB87077(config, m_mb87077[1]).gain_changed().set(FUNC(namco_de_pcbstack_device::mb87077_gain_changed<1>));
226+
MB87077(config, m_mb87077[0]);
227+
MB87077(config, m_mb87077[1]);
231228

232229
C140(config, m_c140, 49.152_MHz_XTAL / 384 / 6);
233230
m_c140->set_addrmap(0, &namco_de_pcbstack_device::c140_map);
234231
m_c140->int1_callback().set_inputline(m_audiocpu, M6809_FIRQ_LINE);
235232

236233
YM2151(config, m_ym2151, 3.579545_MHz_XTAL);
237234

238-
for (int i = 0; i < 4; i++)
235+
// left and right PCBs don't output sound
236+
if (m_pcb == 1)
239237
{
240-
m_c140->add_route(i & 1, m_mixer[0], 0.50, i);
241-
m_ym2151->add_route(i & 1, m_mixer[1], 0.30, i);
242-
}
238+
SPEAKER(config, "speaker", 4).corners();
239+
240+
m_mb87077[0]->gain_changed().set(FUNC(namco_de_pcbstack_device::mb87077_gain_changed<0>));
241+
m_mb87077[1]->gain_changed().set(FUNC(namco_de_pcbstack_device::mb87077_gain_changed<1>));
243242

244-
MIXER(config, m_mixer[0]);
245-
MIXER(config, m_mixer[1]);
243+
for (int i = 0; i < 4; i++)
244+
{
245+
m_c140->add_route(i & 1, m_mixer[0], 0.50, i);
246+
m_ym2151->add_route(i & 1, m_mixer[1], 0.30, i);
247+
}
246248

247-
for (int i = 0; i < 8; i++)
248-
m_mixer[i / 4]->add_route(i & 3, "speaker", 0.50, i & 3);
249+
MIXER(config, m_mixer[0]);
250+
MIXER(config, m_mixer[1]);
251+
252+
for (int i = 0; i < 8; i++)
253+
m_mixer[i / 4]->add_route(i & 3, "speaker", 0.50, i & 3);
254+
}
249255
}
250256

251257

@@ -510,10 +516,10 @@ class namcos21_de_state : public driver_device
510516
void namcos21_de_state::driveyes(machine_config &config)
511517
{
512518
NAMCO_DE_PCB(config, m_pcb[0], 0);
513-
NAMCO_DE_PCB(config, m_pcb[1], 0);
514-
NAMCO_DE_PCB(config, m_pcb[2], 0);
519+
NAMCO_DE_PCB(config, m_pcb[1], 1);
520+
NAMCO_DE_PCB(config, m_pcb[2], 2);
515521

516-
NAMCOIO_GEARBOX(config, m_io_gearbox, 0);
522+
NAMCOIO_GEARBOX(config, m_io_gearbox);
517523
}
518524

519525
// stacks with the DSWs set to left or right screen will show 'receive error' because they want comms from the main screen

0 commit comments

Comments
 (0)