mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
bbc: Added Beeb Speech Synthesiser device.
This commit is contained in:
parent
cc4996ff5b
commit
a1bcf4035f
@ -333,6 +333,8 @@ if (BUSES["BBC_USERPORT"]~=null) then
|
|||||||
files {
|
files {
|
||||||
MAME_DIR .. "src/devices/bus/bbc/userport/userport.cpp",
|
MAME_DIR .. "src/devices/bus/bbc/userport/userport.cpp",
|
||||||
MAME_DIR .. "src/devices/bus/bbc/userport/userport.h",
|
MAME_DIR .. "src/devices/bus/bbc/userport/userport.h",
|
||||||
|
MAME_DIR .. "src/devices/bus/bbc/userport/beebspch.cpp",
|
||||||
|
MAME_DIR .. "src/devices/bus/bbc/userport/beebspch.h",
|
||||||
MAME_DIR .. "src/devices/bus/bbc/userport/pointer.cpp",
|
MAME_DIR .. "src/devices/bus/bbc/userport/pointer.cpp",
|
||||||
MAME_DIR .. "src/devices/bus/bbc/userport/pointer.h",
|
MAME_DIR .. "src/devices/bus/bbc/userport/pointer.h",
|
||||||
MAME_DIR .. "src/devices/bus/bbc/userport/cfa3000kbd.cpp",
|
MAME_DIR .. "src/devices/bus/bbc/userport/cfa3000kbd.cpp",
|
||||||
|
126
src/devices/bus/bbc/userport/beebspch.cpp
Normal file
126
src/devices/bus/bbc/userport/beebspch.cpp
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
// license:BSD-3-Clause
|
||||||
|
// copyright-holders:Nigel Barnes
|
||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
Beeb Speech Synthesiser - Watford Electronics
|
||||||
|
|
||||||
|
TODO:
|
||||||
|
- verify clock and low/high intonation
|
||||||
|
- add reset button
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#include "emu.h"
|
||||||
|
#include "beebspch.h"
|
||||||
|
#include "speaker.h"
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// MACROS/CONSTANTS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
#define SP0256_TAG "sp0256"
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// DEVICE DEFINITIONS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
DEFINE_DEVICE_TYPE(BBC_BEEBSPCH, bbc_beebspch_device, "bbc_beebspch", "Beeb Speech Synthesiser")
|
||||||
|
|
||||||
|
ROM_START(beebspch)
|
||||||
|
ROM_REGION(0x4000, "rom", 0)
|
||||||
|
ROM_LOAD("watford_speech.rom", 0x0000, 0x2000, CRC(731642a8) SHA1(1bd31345af6043f394bc9d8e65180c93b2356905))
|
||||||
|
ROM_RELOAD(0x2000, 0x2000)
|
||||||
|
|
||||||
|
ROM_REGION(0x10000, SP0256_TAG, 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_beebspch_device::device_rom_region() const
|
||||||
|
{
|
||||||
|
return ROM_NAME(beebspch);
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_add_mconfig - add device configuration
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
MACHINE_CONFIG_START(bbc_beebspch_device::device_add_mconfig)
|
||||||
|
MCFG_SPEAKER_STANDARD_MONO("mono")
|
||||||
|
MCFG_SOUND_ADD(SP0256_TAG, SP0256, 14_MHz_XTAL / 4) // TODO: Crystal unknown
|
||||||
|
MCFG_SP0256_DATA_REQUEST_CB(WRITELINE(bbc_beebspch_device, cb1_w))
|
||||||
|
MCFG_SP0256_STANDBY_CB(WRITELINE(bbc_beebspch_device, cb2_w))
|
||||||
|
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
|
||||||
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// LIVE DEVICE
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// bbc_beebspch_device - constructor
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
bbc_beebspch_device::bbc_beebspch_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: device_t(mconfig, BBC_BEEBSPCH, tag, owner, clock)
|
||||||
|
, device_bbc_userport_interface(mconfig, *this)
|
||||||
|
, m_rom(*this, "rom")
|
||||||
|
, m_nsp(*this, SP0256_TAG)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_start - device-specific startup
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void bbc_beebspch_device::device_start()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_reset - device-specific reset
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void bbc_beebspch_device::device_reset()
|
||||||
|
{
|
||||||
|
machine().root_device().membank("bank4")->configure_entry(13, memregion("rom")->base());
|
||||||
|
}
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// IMPLEMENTATION
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
WRITE8_MEMBER(bbc_beebspch_device::pb_w)
|
||||||
|
{
|
||||||
|
switch (data & 0xc0)
|
||||||
|
{
|
||||||
|
case 0x40:
|
||||||
|
// intonation high
|
||||||
|
m_nsp->set_clock(3800000); // TODO: the exact frequency is unknown
|
||||||
|
break;
|
||||||
|
case 0x80:
|
||||||
|
// intonation low
|
||||||
|
m_nsp->set_clock(3500000); // CK / 4 ??
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// allophone
|
||||||
|
m_nsp->ald_w(space, 0, data & 0x3f);
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE_LINE_MEMBER(bbc_beebspch_device::cb1_w)
|
||||||
|
{
|
||||||
|
m_slot->cb1_w(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE_LINE_MEMBER(bbc_beebspch_device::cb2_w)
|
||||||
|
{
|
||||||
|
m_slot->cb2_w(state);
|
||||||
|
}
|
54
src/devices/bus/bbc/userport/beebspch.h
Normal file
54
src/devices/bus/bbc/userport/beebspch.h
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
// license:BSD-3-Clause
|
||||||
|
// copyright-holders:Nigel Barnes
|
||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
Beeb Speech Synthesiser - Watford Electronics
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#ifndef MAME_BUS_BBC_USERPORT_BEEBSPCH_H
|
||||||
|
#define MAME_BUS_BBC_USERPORT_BEEBSPCH_H
|
||||||
|
|
||||||
|
#include "userport.h"
|
||||||
|
#include "sound/sp0256.h"
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// TYPE DEFINITIONS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
// ======================> bbc_beebspch_device
|
||||||
|
|
||||||
|
class bbc_beebspch_device :
|
||||||
|
public device_t,
|
||||||
|
public device_bbc_userport_interface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
bbc_beebspch_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;
|
||||||
|
virtual void device_reset() override;
|
||||||
|
|
||||||
|
// optional information overrides
|
||||||
|
virtual void device_add_mconfig(machine_config &config) override;
|
||||||
|
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||||
|
|
||||||
|
virtual DECLARE_WRITE8_MEMBER(pb_w) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
required_memory_region m_rom;
|
||||||
|
required_device<sp0256_device> m_nsp;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// device type definition
|
||||||
|
DECLARE_DEVICE_TYPE(BBC_BEEBSPCH, bbc_beebspch_device)
|
||||||
|
|
||||||
|
|
||||||
|
#endif // MAME_BUS_BBC_USERPORT_BEEBSPCH_H
|
@ -115,6 +115,7 @@ WRITE8_MEMBER(bbc_userport_slot_device::pb_w)
|
|||||||
|
|
||||||
|
|
||||||
// slot devices
|
// slot devices
|
||||||
|
#include "beebspch.h"
|
||||||
#include "pointer.h"
|
#include "pointer.h"
|
||||||
#include "cfa3000kbd.h"
|
#include "cfa3000kbd.h"
|
||||||
|
|
||||||
@ -122,7 +123,7 @@ WRITE8_MEMBER(bbc_userport_slot_device::pb_w)
|
|||||||
void bbc_userport_devices(device_slot_interface &device)
|
void bbc_userport_devices(device_slot_interface &device)
|
||||||
{
|
{
|
||||||
device.option_add("amxmouse", BBC_AMXMOUSE); /* AMX Mouse */
|
device.option_add("amxmouse", BBC_AMXMOUSE); /* AMX Mouse */
|
||||||
// device.option_add("beebsynth", BBC_BEEBSYNTH); /* Beeb Speech Synthesiser (Watford) */
|
device.option_add("beebspch", BBC_BEEBSPCH); /* Beeb Speech Synthesiser (Watford Electronics) */
|
||||||
device.option_add("m512mouse", BBC_M512MOUSE); /* Acorn Mouse (provided with Master 512) */
|
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("tracker", BBC_TRACKER); /* Marconi RB2 Tracker Ball / Acorn Tracker Ball */
|
||||||
// device.option_add("music4000", BBC_MUSIC4000); /* Hybrid Music 4000 Keyboard */
|
// device.option_add("music4000", BBC_MUSIC4000); /* Hybrid Music 4000 Keyboard */
|
||||||
|
Loading…
Reference in New Issue
Block a user