summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Nigel Barnes <Pernod70@users.noreply.github.com>2019-11-07 18:45:16 +0000
committer Nigel Barnes <Pernod70@users.noreply.github.com>2019-11-07 18:45:16 +0000
commit7fccf88c44aa98ef5fba4f315d76fdbd48b49e41 (patch)
treeb0c35ee30025aced6695cfd950244e225d8fce02
parent969e45f525fd2c2b834b7cf107eecc5b5af165e8 (diff)
bbcb: Added the Robin Voice Box device.
-rw-r--r--scripts/src/bus.lua2
-rw-r--r--src/devices/bus/bbc/userport/userport.cpp7
-rw-r--r--src/devices/bus/bbc/userport/voicebox.cpp91
-rw-r--r--src/devices/bus/bbc/userport/voicebox.h52
4 files changed, 152 insertions, 0 deletions
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua
index 1fb766bc5d6..d9a71fb6f84 100644
--- a/scripts/src/bus.lua
+++ b/scripts/src/bus.lua
@@ -558,6 +558,8 @@ if (BUSES["BBC_USERPORT"]~=null) then
MAME_DIR .. "src/devices/bus/bbc/userport/pointer.h",
MAME_DIR .. "src/devices/bus/bbc/userport/usersplit.cpp",
MAME_DIR .. "src/devices/bus/bbc/userport/usersplit.h",
+ MAME_DIR .. "src/devices/bus/bbc/userport/voicebox.cpp",
+ MAME_DIR .. "src/devices/bus/bbc/userport/voicebox.h",
MAME_DIR .. "src/devices/bus/bbc/userport/cfa3000kbd.cpp",
MAME_DIR .. "src/devices/bus/bbc/userport/cfa3000kbd.h",
}
diff --git a/src/devices/bus/bbc/userport/userport.cpp b/src/devices/bus/bbc/userport/userport.cpp
index 2e6c8184c14..e631d2c4000 100644
--- a/src/devices/bus/bbc/userport/userport.cpp
+++ b/src/devices/bus/bbc/userport/userport.cpp
@@ -108,8 +108,11 @@ void bbc_userport_slot_device::pb_w(uint8_t data)
// slot devices
#include "beebspch.h"
//#include "digitiser.h"
+//#include "ev1.h"
#include "pointer.h"
#include "usersplit.h"
+//#include "vci.h"
+#include "voicebox.h"
#include "cfa3000kbd.h"
@@ -119,9 +122,13 @@ void bbc_userport_devices(device_slot_interface &device)
//device.option_add("atr", BBC_ATR); /* Advanced Teletext Receiver (GIS) */
device.option_add("beebspch", BBC_BEEBSPCH); /* Beeb Speech Synthesiser (Watford Electronics) */
//device.option_add("beebvdig", BBC_BEEBVDIG); /* Beeb Video Digitiser (Watford Electronics) */
+ //device.option_add("ev1", BBC_EV1); /* Micro-Robotics EV1 */
+ //device.option_add("hobbit", BBC_HOBBIT); /* Hobbit Floppy Tape System (Ikon) */
device.option_add("m512mouse", BBC_M512MOUSE); /* Acorn Mouse (provided with Master 512) */
device.option_add("tracker", BBC_TRACKER); /* Marconi RB2 Tracker Ball / Acorn Tracker Ball */
device.option_add("usersplit", BBC_USERSPLIT); /*User Port Splitter (Watford Electronics) */
+ //device.option_add("vci", BBC_VCI); /* Video Camera Interface (Data Harvest) */
+ device.option_add("voicebox", BBC_VOICEBOX); /* Robin Voice Box */
//device.option_add("music4000", BBC_MUSIC4000); /* Hybrid Music 4000 Keyboard */
device.option_add("cfa3000kbd", CFA3000_KBD); /* Henson CFA 3000 Keyboard */
}
diff --git a/src/devices/bus/bbc/userport/voicebox.cpp b/src/devices/bus/bbc/userport/voicebox.cpp
new file mode 100644
index 00000000000..650fca4aa61
--- /dev/null
+++ b/src/devices/bus/bbc/userport/voicebox.cpp
@@ -0,0 +1,91 @@
+// license:BSD-3-Clause
+// copyright-holders:Nigel Barnes
+/**********************************************************************
+
+ Robin Voice Box - The Educational Software Company
+
+**********************************************************************/
+
+
+#include "emu.h"
+#include "voicebox.h"
+#include "speaker.h"
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+DEFINE_DEVICE_TYPE(BBC_VOICEBOX, bbc_voicebox_device, "bbc_voicebox", "Robin Voice Box")
+
+
+ROM_START(voicebox)
+ ROM_REGION(0x10000, "sp0256", 0)
+ ROM_LOAD("sp0256a-al2.bin", 0x1000, 0x0800, CRC(b504ac15) SHA1(e60fcb5fa16ff3f3b69d36c7a6e955744d3feafc))
+ROM_END
+
+//-------------------------------------------------
+// rom_region - device-specific ROM region
+//-------------------------------------------------
+
+const tiny_rom_entry *bbc_voicebox_device::device_rom_region() const
+{
+ return ROM_NAME(voicebox);
+}
+
+//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+void bbc_voicebox_device::device_add_mconfig(machine_config &config)
+{
+ SPEAKER(config, "mono").front_center();
+ SP0256(config, m_nsp, 3120000); // TODO: unknown crystal
+ m_nsp->data_request_callback().set(FUNC(bbc_voicebox_device::cb1_w));
+ m_nsp->standby_callback().set(FUNC(bbc_voicebox_device::cb2_w));
+ m_nsp->add_route(ALL_OUTPUTS, "mono", 1.0);
+}
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// bbc_voicebox_device - constructor
+//-------------------------------------------------
+
+bbc_voicebox_device::bbc_voicebox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : device_t(mconfig, BBC_VOICEBOX, tag, owner, clock)
+ , device_bbc_userport_interface(mconfig, *this)
+ , m_nsp(*this, "sp0256")
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void bbc_voicebox_device::device_start()
+{
+}
+
+//**************************************************************************
+// IMPLEMENTATION
+//**************************************************************************
+
+void bbc_voicebox_device::pb_w(uint8_t data)
+{
+ m_nsp->ald_w(data & 0x3f);
+}
+
+WRITE_LINE_MEMBER(bbc_voicebox_device::cb1_w)
+{
+ m_slot->cb1_w(state);
+}
+
+WRITE_LINE_MEMBER(bbc_voicebox_device::cb2_w)
+{
+ m_slot->cb2_w(state);
+}
diff --git a/src/devices/bus/bbc/userport/voicebox.h b/src/devices/bus/bbc/userport/voicebox.h
new file mode 100644
index 00000000000..b48290e2a2a
--- /dev/null
+++ b/src/devices/bus/bbc/userport/voicebox.h
@@ -0,0 +1,52 @@
+// license:BSD-3-Clause
+// copyright-holders:Nigel Barnes
+/**********************************************************************
+
+ Robin Voice Box - The Educational Software Company
+
+**********************************************************************/
+
+#ifndef MAME_BUS_BBC_USERPORT_VOICEBOX_H
+#define MAME_BUS_BBC_USERPORT_VOICEBOX_H
+
+#include "userport.h"
+#include "sound/sp0256.h"
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> bbc_voicebox_device
+
+class bbc_voicebox_device :
+ public device_t,
+ public device_bbc_userport_interface
+{
+public:
+ // construction/destruction
+ bbc_voicebox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+
+ DECLARE_WRITE_LINE_MEMBER(cb1_w);
+ DECLARE_WRITE_LINE_MEMBER(cb2_w);
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+
+ // optional information overrides
+ virtual void device_add_mconfig(machine_config &config) override;
+ virtual const tiny_rom_entry *device_rom_region() const override;
+
+ virtual void pb_w(uint8_t data) override;
+
+private:
+ required_device<sp0256_device> m_nsp;
+};
+
+
+// device type definition
+DECLARE_DEVICE_TYPE(BBC_VOICEBOX, bbc_voicebox_device)
+
+
+#endif // MAME_BUS_BBC_USERPORT_VOICEBOX_H