summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--scripts/src/bus.lua2
-rw-r--r--src/devices/bus/a2bus/ssbapple.cpp91
-rw-r--r--src/devices/bus/a2bus/ssbapple.h50
-rw-r--r--src/mame/drivers/apple2.cpp2
-rw-r--r--src/mame/drivers/apple2e.cpp2
5 files changed, 147 insertions, 0 deletions
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index def3cf2ef0e..0d98c3da1f7 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -1760,6 +1760,8 @@ if (BUSES["A2BUS"]~=null) then
MAME_DIR .. "src/devices/bus/a2bus/agat7ram.h",
MAME_DIR .. "src/devices/bus/a2bus/ssprite.cpp",
MAME_DIR .. "src/devices/bus/a2bus/ssprite.h",
+ MAME_DIR .. "src/devices/bus/a2bus/ssbapple.cpp",
+ MAME_DIR .. "src/devices/bus/a2bus/ssbapple.h",
}
end
diff --git a/src/devices/bus/a2bus/ssbapple.cpp b/src/devices/bus/a2bus/ssbapple.cpp
new file mode 100644
index 00000000000..76dffa56ac6
--- /dev/null
+++ b/src/devices/bus/a2bus/ssbapple.cpp
@@ -0,0 +1,91 @@
+// license:BSD-3-Clause
+// copyright-holders:R. Belmont
+/*********************************************************************
+
+ ssbapple.c
+
+ Implementation of the SSB Apple speech card
+ Must be in slot 2 for the provided software to work!
+
+*********************************************************************/
+
+#include "emu.h"
+#include "ssbapple.h"
+#include "sound/tms5220.h"
+#include "speaker.h"
+
+/***************************************************************************
+ PARAMETERS
+***************************************************************************/
+
+//**************************************************************************
+// GLOBAL VARIABLES
+//**************************************************************************
+
+DEFINE_DEVICE_TYPE(A2BUS_SSBAPPLE, a2bus_ssb_device, "a2ssbapl", "Multitech Industrial SSB Apple speech card")
+
+#define TMS_TAG "tms5220"
+
+/***************************************************************************
+ FUNCTION PROTOTYPES
+***************************************************************************/
+
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+MACHINE_CONFIG_MEMBER( a2bus_ssb_device::device_add_mconfig )
+ MCFG_SPEAKER_STANDARD_MONO("ssbapple")
+ MCFG_SOUND_ADD(TMS_TAG, TMS5220, 640000) // guess - this gives 8 kHz output according to the datasheet
+ MCFG_SOUND_ROUTE(ALL_OUTPUTS, "ssbapple", 1.0)
+MACHINE_CONFIG_END
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+a2bus_ssb_device::a2bus_ssb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
+ device_t(mconfig, type, tag, owner, clock),
+ device_a2bus_card_interface(mconfig, *this),
+ m_tms(*this, TMS_TAG)
+{
+}
+
+a2bus_ssb_device::a2bus_ssb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ a2bus_ssb_device(mconfig, A2BUS_SSBAPPLE, tag, owner, clock)
+{
+}
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void a2bus_ssb_device::device_start()
+{
+ // set_a2bus_device makes m_slot valid
+ set_a2bus_device();
+
+ if (m_slot != 2)
+ {
+ popmessage("SSB Card should be in slot 2!\n");
+ }
+}
+
+void a2bus_ssb_device::device_reset()
+{
+}
+
+bool a2bus_ssb_device::take_c800()
+{
+ return false;
+}
+
+uint8_t a2bus_ssb_device::read_cnxx(address_space &space, uint8_t offset)
+{
+ return 0x1f | m_tms->status_r(space, 0);
+}
+
+void a2bus_ssb_device::write_cnxx(address_space &space, uint8_t offset, uint8_t data)
+{
+ m_tms->data_w(space, 0, data);
+} \ No newline at end of file
diff --git a/src/devices/bus/a2bus/ssbapple.h b/src/devices/bus/a2bus/ssbapple.h
new file mode 100644
index 00000000000..9218e72e0fe
--- /dev/null
+++ b/src/devices/bus/a2bus/ssbapple.h
@@ -0,0 +1,50 @@
+// license:BSD-3-Clause
+// copyright-holders:R. Belmont
+/*********************************************************************
+
+ ssbapple.h
+
+ Implementation of the SSB Apple speech card
+
+*********************************************************************/
+
+#ifndef MAME_BUS_A2BUS_SSBAPPLE_H
+#define MAME_BUS_A2BUS_SSBAPPLE_H
+
+#pragma once
+
+#include "a2bus.h"
+#include "sound/tms5220.h"
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+class a2bus_ssb_device:
+ public device_t,
+ public device_a2bus_card_interface
+{
+public:
+ // construction/destruction
+ a2bus_ssb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ static constexpr feature_type imperfect_features() { return feature::SOUND; }
+
+ required_device<tms5220_device> m_tms;
+
+protected:
+ a2bus_ssb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_add_mconfig(machine_config &config) override;
+
+ // overrides of standard a2bus slot functions
+ virtual uint8_t read_cnxx(address_space &space, uint8_t offset) override;
+ virtual void write_cnxx(address_space &space, uint8_t offset, uint8_t data) override;
+ virtual bool take_c800() override;
+};
+
+// device type definition
+DECLARE_DEVICE_TYPE(A2BUS_SSBAPPLE, a2bus_ssb_device)
+
+#endif // MAME_BUS_A2BUS_A2SSBAPPLE_H
diff --git a/src/mame/drivers/apple2.cpp b/src/mame/drivers/apple2.cpp
index 9581987ca54..9f69db0775d 100644
--- a/src/mame/drivers/apple2.cpp
+++ b/src/mame/drivers/apple2.cpp
@@ -78,6 +78,7 @@ II Plus: RAM options reduced to 16/32/48 KB.
#include "bus/a2bus/ramcard16k.h"
#include "bus/a2bus/timemasterho.h"
#include "bus/a2bus/ssprite.h"
+#include "bus/a2bus/ssbapple.h"
#include "screen.h"
#include "softlist.h"
@@ -1321,6 +1322,7 @@ static SLOT_INTERFACE_START(apple2_cards)
SLOT_INTERFACE("ezcgi9938", A2BUS_EZCGI_9938) /* E-Z Color Graphics Interface (TMS9938) */
SLOT_INTERFACE("ezcgi9958", A2BUS_EZCGI_9958) /* E-Z Color Graphics Interface (TMS9958) */
SLOT_INTERFACE("ssprite", A2BUS_SSPRITE) /* Synetix SuperSprite Board */
+ SLOT_INTERFACE("ssbapple", A2BUS_SSBAPPLE) /* SSB Apple speech board */
// SLOT_INTERFACE("magicmusician", A2BUS_MAGICMUSICIAN) /* Magic Musician Card */
SLOT_INTERFACE_END
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index d1ef8abbecd..4bc11785de1 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -148,6 +148,7 @@ Address bus A0-A11 is Y0-Y11
#include "bus/a2bus/a2eext80col.h"
#include "bus/a2bus/a2eramworks3.h"
#include "bus/a2bus/ssprite.h"
+#include "bus/a2bus/ssbapple.h"
#include "bus/rs232/rs232.h"
@@ -3743,6 +3744,7 @@ static SLOT_INTERFACE_START(apple2_cards)
// SLOT_INTERFACE("magicmusician", A2BUS_MAGICMUSICIAN) /* Magic Musician Card */
SLOT_INTERFACE("pcxport", A2BUS_PCXPORTER) /* Applied Engineering PC Transporter */
SLOT_INTERFACE("ssprite", A2BUS_SSPRITE) /* Synetix SuperSprite Board */
+ SLOT_INTERFACE("ssbapple", A2BUS_SSBAPPLE) /* SSB Apple speech board */
SLOT_INTERFACE_END
static SLOT_INTERFACE_START(apple2eaux_cards)