summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/modena.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/modena.cpp')
-rw-r--r--src/mame/drivers/modena.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mame/drivers/modena.cpp b/src/mame/drivers/modena.cpp
index 61601a7e8c5..2c2ccc3fb9b 100644
--- a/src/mame/drivers/modena.cpp
+++ b/src/mame/drivers/modena.cpp
@@ -12,6 +12,8 @@
#include "machine/nvram.h"
#include "machine/mmboard.h"
#include "machine/timer.h"
+#include "sound/dac.h"
+#include "sound/volt_reg.h"
#include "speaker.h"
#include "mephisto_modena.lh"
@@ -24,7 +26,7 @@ public:
: driver_device(mconfig, type, tag)
, m_maincpu(*this, "maincpu")
, m_board(*this, "board")
- , m_beeper(*this, "beeper")
+ , m_dac(*this, "dac")
, m_keys(*this, "KEY")
, m_digits(*this, "digit%u", 0U)
, m_leds1(*this, "led%u", 100U)
@@ -48,7 +50,7 @@ protected:
private:
required_device<cpu_device> m_maincpu;
required_device<mephisto_board_device> m_board;
- required_device<beep_device> m_beeper;
+ required_device<dac_bit_interface> m_dac;
required_ioport m_keys;
output_finder<4> m_digits;
output_finder<8> m_leds1;
@@ -88,7 +90,7 @@ WRITE8_MEMBER(mephisto_modena_state::modena_led_w)
WRITE8_MEMBER(mephisto_modena_state::modena_io_w)
{
m_io_ctrl = data;
- m_beeper->set_state(BIT(data, 6));
+ m_dac->write(BIT(data, 6));
}
WRITE8_MEMBER(mephisto_modena_state::modena_digits_w)
@@ -154,8 +156,9 @@ void mephisto_modena_state::modena(machine_config &config)
config.set_default_layout(layout_mephisto_modena);
/* sound hardware */
- SPEAKER(config, "mono").front_center();
- BEEP(config, m_beeper, 3250).add_route(ALL_OUTPUTS, "mono", 1.0);
+ SPEAKER(config, "speaker").front_center();
+ DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25);
+ VOLTAGE_REGULATOR(config, "vref").add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT);
}