diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index cf2cfee66bf..7a70aa86ea5 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -2873,6 +2873,8 @@ if (BUSES["A2BUS"]~=null) then MAME_DIR .. "src/devices/bus/a2bus/mouse.h", MAME_DIR .. "src/devices/bus/a2bus/nippelclock.cpp", MAME_DIR .. "src/devices/bus/a2bus/nippelclock.h", + MAME_DIR .. "src/devices/bus/a2bus/noisemaker.cpp", + MAME_DIR .. "src/devices/bus/a2bus/noisemaker.h", MAME_DIR .. "src/devices/bus/a2bus/pc_xporter.cpp", MAME_DIR .. "src/devices/bus/a2bus/pc_xporter.h", MAME_DIR .. "src/devices/bus/a2bus/prodosromdrive.cpp", diff --git a/src/devices/bus/a2bus/cards.cpp b/src/devices/bus/a2bus/cards.cpp index 2c0b791b34b..f00e1a8c267 100644 --- a/src/devices/bus/a2bus/cards.cpp +++ b/src/devices/bus/a2bus/cards.cpp @@ -54,6 +54,7 @@ #include "lancegs.h" #include "laser128.h" #include "mouse.h" +#include "noisemaker.h" #include "pc_xporter.h" #include "prodosromdrive.h" #include "q68.h" @@ -138,6 +139,7 @@ void apple2_cards(device_slot_interface &device) device.option_add("applesurance", A2BUS_APPLESURANCE); // Applesurance Diagnostic Controller // device.option_add("magicmusician", A2BUS_MAGICMUSICIAN); // Magic Musician Card device.option_add("byte8251", A2BUS_BYTE8251); // BYTE Magazine 8251 serial card + device.option_add("noisemaker", A2BUS_NOISEMAKER); // ADS Noisemaker II device.option_add("suprterm", A2BUS_SUPRTERMINAL); // M&R Enterprises SUP'R'TERMINAL 80-column card device.option_add("uniprint", A2BUS_UNIPRINT); // Videx Uniprint parallel printer card device.option_add("ccs7710", A2BUS_CCS7710); // California Computer Systems Model 7710 Asynchronous Serial Interface @@ -209,6 +211,7 @@ void apple2e_cards(device_slot_interface &device) device.option_add("ceyes2", A2BUS_COMPUTEREYES2); // ComputerEyes/2 Video Digitizer device.option_add("applesurance", A2BUS_APPLESURANCE); // Applesurance Diagnostic Controller device.option_add("byte8251", A2BUS_BYTE8251); // BYTE Magazine 8251 serial card + device.option_add("noisemaker", A2BUS_NOISEMAKER); // ADS Noisemaker II device.option_add("cmsscsi", A2BUS_CMSSCSI); // CMS Apple II SCSI Card device.option_add("uthernet", A2BUS_UTHERNET); // A2RetroSystems Uthernet card device.option_add("sider2", A2BUS_SIDER2); // Advanced Tech Systems / First Class Peripherals Sider 2 SASI card @@ -280,6 +283,7 @@ void apple2gs_cards(device_slot_interface &device) // device.option_add("magicmusician", A2BUS_MAGICMUSICIAN); // Magic Musician Card // device.option_add("pcxport", A2BUS_PCXPORTER); // Applied Engineering PC Transporter device.option_add("byte8251", A2BUS_BYTE8251); // BYTE Magazine 8251 serial card + device.option_add("noisemaker", A2BUS_NOISEMAKER); // ADS Noisemaker II // device.option_add("hostram", A2BUS_HOSTRAM); // Slot 7 RAM for GS Plus host protocol // device.option_add("ramfast", A2BUS_RAMFAST); // C.V. Technologies RAMFast SCSI card device.option_add("cmsscsi", A2BUS_CMSSCSI); // CMS Apple II SCSI Card diff --git a/src/devices/bus/a2bus/noisemaker.cpp b/src/devices/bus/a2bus/noisemaker.cpp new file mode 100644 index 00000000000..16b51e036b0 --- /dev/null +++ b/src/devices/bus/a2bus/noisemaker.cpp @@ -0,0 +1,86 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/********************************************************************** + + ADS (Ackerman Digital Systems) Noisemaker II + + This board provides a very simple interface to a AY-3-8910 + Programmable Sound Generator through two I/O addresses, and has + a dedicated audio amplifier and speaker connector for the combined + output of its three channels. The manual gives the option of using + 8T26 inverting buffers instead of 8T28 noninverting buffers, which + changes the programming interface somewhat, though both schematics + and actual boards have 8T28s. + + The PSG's two 8-bit parallel ports are not emulated here, though + the actual PCB brings all 16 signals out to a generic DIP socket. + +**********************************************************************/ + +#include "emu.h" +#include "noisemaker.h" + +#include "sound/ay8910.h" +#include "speaker.h" + + +namespace { + +class a2bus_noisemaker_device : public device_t, public device_a2bus_card_interface +{ +public: + // construction/destruction + a2bus_noisemaker_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_add_mconfig(machine_config &config) override; + + // device_a2bus_card_interface overrides + virtual u8 read_c0nx(u8 offset) override; + virtual void write_c0nx(u8 offset, u8 data) override; + virtual bool take_c800() override { return false; } + +private: + // object finders + required_device m_psg; +}; + +a2bus_noisemaker_device::a2bus_noisemaker_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, A2BUS_NOISEMAKER, tag, owner, clock) + , device_a2bus_card_interface(mconfig, *this) + , m_psg(*this, "psg") +{ +} + +void a2bus_noisemaker_device::device_start() +{ +} + +u8 a2bus_noisemaker_device::read_c0nx(u8 offset) +{ + if (BIT(offset, 0)) + return m_psg->data_r(); + else + return 0xff; // BDIR1 = BC1 = 0, so this should be open bus +} + +void a2bus_noisemaker_device::write_c0nx(u8 offset, u8 data) +{ + m_psg->address_data_w(offset & 1, data); +} + +void a2bus_noisemaker_device::device_add_mconfig(machine_config &config) +{ + AY8910(config, m_psg, 1021800); // CLK tied to ϕ1 signal from bus pin 38 + m_psg->add_route(ALL_OUTPUTS, "speaker", 0.5); + + SPEAKER(config, "speaker").front_center(); +} + +} // aonymous namespace + + +// device type definition +DEFINE_DEVICE_TYPE_PRIVATE(A2BUS_NOISEMAKER, device_a2bus_card_interface, a2bus_noisemaker_device, "a2bus_noisemaker", "ADS Noisemaker II") diff --git a/src/devices/bus/a2bus/noisemaker.h b/src/devices/bus/a2bus/noisemaker.h new file mode 100644 index 00000000000..a3f2d18cb3d --- /dev/null +++ b/src/devices/bus/a2bus/noisemaker.h @@ -0,0 +1,14 @@ +// license:BSD-3-Clause +// copyright-holders:AJR + +#ifndef MAME_BUS_A2BUS_NOISEMAKER_H +#define MAME_BUS_A2BUS_NOISEMAKER_H + +#pragma once + +#include "a2bus.h" + +// device type declaration +DECLARE_DEVICE_TYPE(A2BUS_NOISEMAKER, device_a2bus_card_interface) + +#endif // MAME_BUS_A2BUS_NOISEMAKER_H