Skip to content

Commit 9e8abca

Browse files
committed
brikett: less arbitrary speaker timing
1 parent 31f3bfe commit 9e8abca

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/mame/hegenerglaser/brikett.cpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ Mephisto III program module:
6060
- DM74LS373N (latch)
6161
- HCF4556BE (chip select?)
6262
63-
ESB II interface (via module slot):
63+
ESB II board interface (via module slot):
6464
- PCB label: DH 5000 00 111 01
6565
- CD4001, 3*74373, MDP1603-331G (resistor array)
6666
67-
ESB 6000 interface (via external port):
67+
ESB 6000 board interface (via external port):
6868
- PCB label: DH 5000 00 111 12
6969
- TC4081, TC4082, TC4017, 74373, 74374
7070
@@ -92,7 +92,7 @@ hardware is completely different, based on a 68000.
9292
#include "machine/cdp1852.h"
9393
#include "machine/clock.h"
9494
#include "machine/sensorboard.h"
95-
#include "sound/dac.h"
95+
#include "sound/spkrdev.h"
9696
#include "video/pwm.h"
9797

9898
#include "speaker.h"
@@ -112,7 +112,7 @@ class brikett_state : public driver_device
112112
brikett_state(const machine_config &mconfig, device_type type, const char *tag) :
113113
driver_device(mconfig, type, tag),
114114
m_maincpu(*this, "maincpu"),
115-
m_irq_clock(*this, "nmi_clock"),
115+
m_irq_clock(*this, "irq_clock"),
116116
m_extport(*this, "extport"),
117117
m_board(*this, "board"),
118118
m_display(*this, "display"),
@@ -144,7 +144,7 @@ class brikett_state : public driver_device
144144
optional_device<sensorboard_device> m_board;
145145
required_device<mephisto_display1_device> m_display;
146146
optional_device<pwm_display_device> m_led_pwm;
147-
required_device<dac_1bit_device> m_dac;
147+
required_device<speaker_sound_device> m_dac;
148148
optional_ioport_array<4+2> m_inputs;
149149

150150
emu_timer *m_speaker_off;
@@ -173,7 +173,7 @@ class brikett_state : public driver_device
173173
void esb6_w(u8 data);
174174
int esb6_r();
175175

176-
TIMER_CALLBACK_MEMBER(speaker_off) { m_dac->write(0); }
176+
TIMER_CALLBACK_MEMBER(speaker_off) { m_dac->level_w(0); }
177177
};
178178

179179

@@ -241,8 +241,8 @@ u8 brikett_state::sound_r()
241241
// port 1 read enables the speaker
242242
if (!machine().side_effects_disabled())
243243
{
244-
m_dac->write(1);
245-
m_speaker_off->adjust(attotime::from_usec(25));
244+
m_dac->level_w(1);
245+
m_speaker_off->adjust(attotime::from_ticks(8, m_maincpu->clock()));
246246
}
247247

248248
return 0xff;
@@ -503,7 +503,7 @@ void brikett_state::mephistoj(machine_config &config)
503503

504504
// sound hardware
505505
SPEAKER(config, "speaker").front_center();
506-
DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
506+
SPEAKER_SOUND(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.5);
507507
}
508508

509509
void brikett_state::mephisto(machine_config &config)

0 commit comments

Comments
 (0)