summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/huc6272.cpp
diff options
context:
space:
mode:
author cam900 <dbtlrchl@naver.com>2018-09-03 11:31:52 +0900
committer ajrhacker <ajrhacker@users.noreply.github.com>2018-09-02 22:31:52 -0400
commitb8c8f9423aac5ea785f5e67df996c97392db2509 (patch)
tree8e1721d113aa74d3f92647fdb36f17831c84e35a /src/devices/video/huc6272.cpp
parent8029c10d4f13e0606bb933af7d4a3c27ee553a5b (diff)
huc6230.cpp : Fix PSG, Timer'd ADPCM update, Implement CD-DA Volume (#3919)
huc6272.cpp : Make CD-DA Playable
Diffstat (limited to 'src/devices/video/huc6272.cpp')
-rw-r--r--src/devices/video/huc6272.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/devices/video/huc6272.cpp b/src/devices/video/huc6272.cpp
index 8fd271afc0a..c6e94bb9810 100644
--- a/src/devices/video/huc6272.cpp
+++ b/src/devices/video/huc6272.cpp
@@ -47,6 +47,8 @@ huc6272_device::huc6272_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, HUC6272, tag, owner, clock),
device_memory_interface(mconfig, *this),
m_huc6271(*this, finder_base::DUMMY_TAG),
+ m_cdda_l(*this, "cdda_l"),
+ m_cdda_r(*this, "cdda_r"),
m_program_space_config("microprg", ENDIANNESS_LITTLE, 16, 4, 0, address_map_constructor(), address_map_constructor(FUNC(huc6272_device::microprg_map), this)),
m_data_space_config("kram", ENDIANNESS_LITTLE, 32, 21, 0, address_map_constructor(), address_map_constructor(FUNC(huc6272_device::kram_map), this)),
m_microprg_ram(*this, "microprg_ram"),
@@ -547,6 +549,14 @@ READ8_MEMBER(huc6272_device::adpcm_update_1)
return adpcm_update(1);
}
+WRITE8_MEMBER(huc6272_device::cdda_update)
+{
+ if (offset)
+ m_cdda_r->set_output_gain(ALL_OUTPUTS, float(data) / 63.0);
+ else
+ m_cdda_l->set_output_gain(ALL_OUTPUTS, float(data) / 63.0);
+}
+
void huc6272_device::interrupt_update()
{
if (m_adpcm.interrupt)
@@ -555,12 +565,22 @@ void huc6272_device::interrupt_update()
m_irq_changed_cb(CLEAR_LINE);
}
+void huc6272_device::cdrom_config(device_t *device)
+{
+ device = device->subdevice("cdda");
+ MCFG_SOUND_ROUTE(0, "^^cdda_l", 1.0)
+ MCFG_SOUND_ROUTE(1, "^^cdda_r", 1.0)
+}
+
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
void huc6272_device::device_add_mconfig(machine_config &config)
{
+ SPEAKER(config, m_cdda_l).front_left();
+ SPEAKER(config, m_cdda_r).front_right();
+
scsi_port_device &scsibus(SCSI_PORT(config, "scsi"));
scsibus.set_data_input_buffer("scsi_data_in");
scsibus.rst_handler().set("scsi_ctrl_in", FUNC(input_buffer_device::write_bit7));
@@ -578,4 +598,5 @@ void huc6272_device::device_add_mconfig(machine_config &config)
INPUT_BUFFER(config, "scsi_data_in");
scsibus.set_slot_device(1, "cdrom", SCSICD, DEVICE_INPUT_DEFAULTS_NAME(SCSI_ID_1));
+ scsibus.slot(1).set_option_machine_config("cdrom", cdrom_config);
}