diff options
author | 2024-11-18 21:28:08 +0100 | |
---|---|---|
committer | 2024-11-18 21:28:15 +0100 | |
commit | be99bd1e17cbb25b8c29c733b888c1ab5cff28f9 (patch) | |
tree | 6773459256b88d96c45f9ebd95e6402310c81031 /src/devices/bus | |
parent | fe971256dc6038c7a14974a1d4646534a0eccb46 (diff) |
bus/cbus: initial hookup for PC-98 Sound Blaster 16
Diffstat (limited to 'src/devices/bus')
-rw-r--r-- | src/devices/bus/cbus/mpu_pc98.h | 2 | ||||
-rw-r--r-- | src/devices/bus/cbus/sb16_ct2720.cpp | 101 | ||||
-rw-r--r-- | src/devices/bus/cbus/sb16_ct2720.h | 50 |
3 files changed, 152 insertions, 1 deletions
diff --git a/src/devices/bus/cbus/mpu_pc98.h b/src/devices/bus/cbus/mpu_pc98.h index af5b1e04391..6f754094afd 100644 --- a/src/devices/bus/cbus/mpu_pc98.h +++ b/src/devices/bus/cbus/mpu_pc98.h @@ -12,7 +12,7 @@ // TYPE DEFINITIONS //************************************************************************** -// ======================> isa8_mpu401_device +// ======================> mpu_pc98_device class mpu_pc98_device : public device_t { diff --git a/src/devices/bus/cbus/sb16_ct2720.cpp b/src/devices/bus/cbus/sb16_ct2720.cpp new file mode 100644 index 00000000000..31823f6b35f --- /dev/null +++ b/src/devices/bus/cbus/sb16_ct2720.cpp @@ -0,0 +1,101 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese +/************************************************************************************************** + +Creative Sound Blaster 16 for PC-9800 Series (board name: CT2720) + +References: +- https://j02.nobody.jp/jto98/n_desk_sound/ct2720.htm +- http://retropc.net/yasuma/V2/PC/SOUND/ct2720.html + +TODO: +- Optional YM2203 (+ ROM socket), PC-9801-26K equivalent fallback; +- Game port; +- MIDI; +- CT1741 (DSP); +- CT1745 (Mixer); +- CD-Rom interface/CD-In; +- Mic-In/Line-In; +- Configuration dips; + +**************************************************************************************************/ + +#include "emu.h" +#include "bus/cbus/sb16_ct2720.h" +#include "speaker.h" + + +DEFINE_DEVICE_TYPE(SB16_CT2720, sb16_ct2720_device, "sb16_ct2720", "Creative Sound Blaster 16 CT-2720") + +sb16_ct2720_device::sb16_ct2720_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, SB16_CT2720, tag, owner, clock) + , m_bus(*this, DEVICE_SELF_OWNER) + , m_opl3(*this, "opl3") + , m_ldac(*this, "ldac") + , m_rdac(*this, "rdac") +{ +} + +void sb16_ct2720_device::device_add_mconfig(machine_config &config) +{ + SPEAKER(config, "lspeaker").front_left(); + SPEAKER(config, "rspeaker").front_right(); + + DAC_16BIT_R2R(config, m_ldac, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC + DAC_16BIT_R2R(config, m_rdac, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC + +// PC_JOY(config, m_joy); + +// MIDI_PORT(config, "mdin", midiin_slot, "midiin").rxd_handler().set(FUNC(sb_device::midi_rx_w)); +// MIDI_PORT(config, "mdout", midiout_slot, "midiout"); + + YMF262(config, m_opl3, XTAL(14'318'181)); + m_opl3->add_route(0, "lspeaker", 1.0); + m_opl3->add_route(1, "rspeaker", 1.0); + m_opl3->add_route(2, "lspeaker", 1.0); + m_opl3->add_route(3, "rspeaker", 1.0); +} + +void sb16_ct2720_device::device_start() +{ + m_bus->install_device(0x0000, 0xffff, *this, &sb16_ct2720_device::io_map); +} + +void sb16_ct2720_device::device_reset() +{ +} + +void sb16_ct2720_device::io_map(address_map &map) +{ + const u16 base = 0xd2; +// map(0x0400 | base, 0x0400 | base).select(0x300) PC Gameport + map(0x2000 | base, 0x2000 | base).select(0x300).lrw8( + NAME([this] (offs_t offset) { + return m_opl3->read(offset >> 8); + }), + NAME([this] (offs_t offset, u8 data) { + m_opl3->write(offset >> 8, data); + }) + ); +// map(0x2400 | base, 0x2400 | base).select(0x100) CT1745 mixer ($224-$225 on AT) +// map(0x2600 | base, 0x2600 | base) CT1741 DSP reset + map(0x2800 | base, 0x2800 | base).select(0x100).lrw8( + NAME([this] (offs_t offset) { + return m_opl3->read(offset >> 8); + }), + NAME([this] (offs_t offset, u8 data) { + m_opl3->write(offset >> 8, data); + }) + ); +// map(0x2a00 | base, 0x2a00 | base) CT1741 DSP read data port +// map(0x2c00 | base, 0x2c00 | base).select(0x300) CT1741 DSP ($22c-$22f on AT) +// map(0x8000 | base, 0x8000 | base).select(0x100) MIDI port/Wave Blaster + map(0xc800 | base, 0xc800 | base).select(0x300).lrw8( + NAME([this] (offs_t offset) { + return m_opl3->read(offset >> 8); + }), + NAME([this] (offs_t offset, u8 data) { + m_opl3->write(offset >> 8, data); + }) + ); +} diff --git a/src/devices/bus/cbus/sb16_ct2720.h b/src/devices/bus/cbus/sb16_ct2720.h new file mode 100644 index 00000000000..4ea5e40188a --- /dev/null +++ b/src/devices/bus/cbus/sb16_ct2720.h @@ -0,0 +1,50 @@ +// license:BSD-3-Clause +// copyright-holders:Angelo Salese + +#ifndef MAME_BUS_CBUS_SB16_CT2720_H + +#pragma once + +#include "bus/cbus/pc9801_cbus.h" +//#include "bus/midi/midi.h" +//#include "bus/pc_joy/pc_joy.h" +#include "sound/dac.h" +//#include "sound/saa1099.h" +#include "sound/ymopl.h" +//#include "diserial.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class sb16_ct2720_device : public device_t +{ +public: + // construction/destruction + sb16_ct2720_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + static constexpr feature_type unemulated_features() { return feature::SOUND | feature::MICROPHONE; } + +protected: + // device-level overrides + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; + + // optional information overrides + virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; + +private: + void io_map(address_map &map) ATTR_COLD; + + required_device<pc9801_slot_device> m_bus; + required_device<ymf262_device> m_opl3; + required_device<dac_16bit_r2r_device> m_ldac; + required_device<dac_16bit_r2r_device> m_rdac; +}; + + +// device type definition +DECLARE_DEVICE_TYPE(SB16_CT2720, sb16_ct2720_device) + +#endif // MAME_BUS_CBUS_SB16_H |