bbcb: Added the Robin Voice Box device.

This commit is contained in:
Nigel Barnes 2019-11-07 18:45:16 +00:00
parent 969e45f525
commit 7fccf88c44
4 changed files with 152 additions and 0 deletions

View File

@ -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",
}

View File

@ -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 */
}

View File

@ -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);
}

View File

@ -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