diff options
author | 2019-03-26 11:13:37 +1100 | |
---|---|---|
committer | 2019-03-26 11:13:37 +1100 | |
commit | 97b67170277437131adf6ed4d60139c172529e4f (patch) | |
tree | 7a5cbf608f191075f1612b1af15832c206a3fe2d /src/devices/bus/spectrum/specdrum.cpp | |
parent | b380514764cf857469bae61c11143a19f79a74c5 (diff) |
(nw) Clean up the mess on master
This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and
c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at
598cd5227223c3b04ca31f0dbc1981256d9ea3ff.
Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline. When things like this happen, it wastes
everyone's time. I really don't need this in a week when real work⢠is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
Diffstat (limited to 'src/devices/bus/spectrum/specdrum.cpp')
-rw-r--r-- | src/devices/bus/spectrum/specdrum.cpp | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/devices/bus/spectrum/specdrum.cpp b/src/devices/bus/spectrum/specdrum.cpp new file mode 100644 index 00000000000..9c809a1b36a --- /dev/null +++ b/src/devices/bus/spectrum/specdrum.cpp @@ -0,0 +1,73 @@ +// license:BSD-3-Clause +// copyright-holders:Nigel Barnes +/********************************************************************** + + Cheetah Marketing SpecDrum emulation + +**********************************************************************/ + +#include "emu.h" +#include "specdrum.h" +#include "sound/volt_reg.h" +#include "speaker.h" + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE(SPECTRUM_SPECDRUM, spectrum_specdrum_device, "spectrum_specdrum", "SpecDrum") + + +//------------------------------------------------- +// device_add_mconfig - add device configuration +//------------------------------------------------- + +void spectrum_specdrum_device::device_add_mconfig(machine_config &config) +{ + SPEAKER(config, "speaker").front_center(); + ZN428E(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.5); + voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref")); + vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); + vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// spectrum_specdrum_device - constructor +//------------------------------------------------- + +spectrum_specdrum_device::spectrum_specdrum_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, SPECTRUM_SPECDRUM, tag, owner, clock) + , device_spectrum_expansion_interface(mconfig, *this) + , m_dac(*this, "dac") +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void spectrum_specdrum_device::device_start() +{ +} + + +//************************************************************************** +// IMPLEMENTATION +//************************************************************************** + +void spectrum_specdrum_device::iorq_w(offs_t offset, uint8_t data) +{ + switch (offset & 0x00ff) + { + case 0xdf: + m_dac->write(data); + break; + } +} |