diff options
author | 2017-02-01 21:58:56 +0200 | |
---|---|---|
committer | 2017-02-01 21:59:03 +0200 | |
commit | f626cefe856aef615681ad255d6c578910fa1e97 (patch) | |
tree | 88db4c63928b2478ef619c750863bf1439559e41 | |
parent | 67d17b01af724dcfed291d376d9dc3c2b663af9d (diff) |
c64: Emulated the PPP Speakeasy 64 (Votrax SC-01-A) cartridge. [Curt Coder]
-rw-r--r-- | hash/c64_flop.xml | 13 | ||||
-rw-r--r-- | hash/vic1001_flop.xml | 13 | ||||
-rw-r--r-- | scripts/src/bus.lua | 2 | ||||
-rw-r--r-- | src/devices/bus/c64/exp.cpp | 2 | ||||
-rw-r--r-- | src/devices/bus/c64/speakeasy.cpp | 103 | ||||
-rw-r--r-- | src/devices/bus/c64/speakeasy.h | 54 | ||||
-rw-r--r-- | src/devices/bus/vic20/exp.cpp | 2 | ||||
-rw-r--r-- | src/devices/bus/vic20/speakeasy.cpp | 7 | ||||
-rw-r--r-- | src/devices/bus/vic20/speakeasy.h | 3 |
9 files changed, 194 insertions, 5 deletions
diff --git a/hash/c64_flop.xml b/hash/c64_flop.xml index f788e300be2..a75dfe38741 100644 --- a/hash/c64_flop.xml +++ b/hash/c64_flop.xml @@ -430,6 +430,19 @@ </part> </software> + <software name="speakez"> + <description>SpeakEasy</description> + <year>1983</year> + <publisher>Personal Peripheral Products</publisher> + <sharedfeat name="compatibility" value="NTSC,PAL"/> + <sharedfeat name="requirement" value="c64_cart:speakez"/> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="174848"> + <rom name="speakeasy.d64" size="174848" crc="702cc20c" sha1="d9a19213809e2b51ee55fac9687b55bddaa86871" offset="0" /> + </dataarea> + </part> + </software> + <!-- Educational --> <software name="kats1"> diff --git a/hash/vic1001_flop.xml b/hash/vic1001_flop.xml index 183b2a680d3..52df6a600a3 100644 --- a/hash/vic1001_flop.xml +++ b/hash/vic1001_flop.xml @@ -58,4 +58,17 @@ </part> </software> + <software name="speakez"> + <description>SpeakEasy</description> + <year>1983</year> + <publisher>Personal Peripheral Products</publisher> + <sharedfeat name="compatibility" value="NTSC,PAL"/> + <sharedfeat name="requirement" value="vic1001_cart:speakez"/> + <part name="flop1" interface="floppy_5_25"> + <dataarea name="flop" size="174848"> + <rom name="speakeasy.d64" size="174848" crc="bfd060ca" sha1="d2c5b5c2b6c5ef01891e3256a4aad8ec2bbbbfe5" offset="0" /> + </dataarea> + </part> + </software> + </softwarelist> diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index ed0a643d277..c7a03a45d26 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -428,6 +428,8 @@ if (BUSES["C64"]~=null) then MAME_DIR .. "src/devices/bus/c64/silverrock.h", MAME_DIR .. "src/devices/bus/c64/simons_basic.cpp", MAME_DIR .. "src/devices/bus/c64/simons_basic.h", + MAME_DIR .. "src/devices/bus/c64/speakeasy.cpp", + MAME_DIR .. "src/devices/bus/c64/speakeasy.h", MAME_DIR .. "src/devices/bus/c64/stardos.cpp", MAME_DIR .. "src/devices/bus/c64/stardos.h", MAME_DIR .. "src/devices/bus/c64/std.cpp", diff --git a/src/devices/bus/c64/exp.cpp b/src/devices/bus/c64/exp.cpp index 92c7eb64e5d..ab37fe19481 100644 --- a/src/devices/bus/c64/exp.cpp +++ b/src/devices/bus/c64/exp.cpp @@ -339,6 +339,7 @@ int c64_expansion_slot_device::exrom_r(offs_t offset, int sphi2, int ba, int rw, #include "sfx_sound_expander.h" #include "silverrock.h" #include "simons_basic.h" +#include "speakeasy.h" #include "stardos.h" #include "std.h" #include "structured_basic.h" @@ -375,6 +376,7 @@ SLOT_INTERFACE_START( c64_expansion_cards ) SLOT_INTERFACE("reu1750", C64_REU1750) SLOT_INTERFACE("reu1764", C64_REU1764) SLOT_INTERFACE("sfxse", C64_SFX_SOUND_EXPANDER) + SLOT_INTERFACE("speakez", C64_SPEAKEASY) SLOT_INTERFACE("supercpu", C64_SUPERCPU) SLOT_INTERFACE("swiftlink", C64_SWIFTLINK) SLOT_INTERFACE("turbo232", C64_TURBO232) diff --git a/src/devices/bus/c64/speakeasy.cpp b/src/devices/bus/c64/speakeasy.cpp new file mode 100644 index 00000000000..6c59b7a11a5 --- /dev/null +++ b/src/devices/bus/c64/speakeasy.cpp @@ -0,0 +1,103 @@ +// license:BSD-3-Clause +// copyright-holders:smf +/********************************************************************** + + Personal Peripheral Products Speakeasy 64 cartridge emulation + +**********************************************************************/ + +#include "speakeasy.h" + + + +//************************************************************************** +// MACROS/CONSTANTS +//************************************************************************** + +#define SC01A_TAG "sc01a" + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type C64_SPEAKEASY = &device_creator<c64_speakeasy_t>; + + +//------------------------------------------------- +// MACHINE_DRIVER( speakeasy ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( speakeasy ) + MCFG_SPEAKER_STANDARD_MONO("mono") + + MCFG_SOUND_ADD(SC01A_TAG, VOTRAX_SC01, 720000) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.85) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor c64_speakeasy_t::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( speakeasy ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// c64_speakeasy_t - constructor +//------------------------------------------------- + +c64_speakeasy_t::c64_speakeasy_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, C64_SPEAKEASY, "Speakeasy 64", tag, owner, clock, "speakeasy64", __FILE__), + device_c64_expansion_card_interface(mconfig, *this), + m_votrax(*this, SC01A_TAG) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void c64_speakeasy_t::device_start() +{ +} + + +//------------------------------------------------- +// c64_cd_r - cartridge data read +//------------------------------------------------- + +uint8_t c64_speakeasy_t::c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) +{ + if (!io1) + { + return m_votrax->request() << 7; + } + + return data; +} + + +//------------------------------------------------- +// c64_cd_w - cartridge data write +//------------------------------------------------- + +void c64_speakeasy_t::c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) +{ + if (!io1) + { + m_votrax->write(space, 0, data & 0x3f); + m_votrax->inflection_w(space, 0, data >> 6); + } +} diff --git a/src/devices/bus/c64/speakeasy.h b/src/devices/bus/c64/speakeasy.h new file mode 100644 index 00000000000..136a565344f --- /dev/null +++ b/src/devices/bus/c64/speakeasy.h @@ -0,0 +1,54 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Personal Peripheral Products Speakeasy 64 cartridge emulation + +**********************************************************************/ + +#pragma once + +#ifndef __C64_SPEAKEASY__ +#define __C64_SPEAKEASY__ + +#include "emu.h" +#include "exp.h" +#include "sound/votrax.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> c64_speakeasy_t + +class c64_speakeasy_t : public device_t, + public device_c64_expansion_card_interface +{ +public: + // construction/destruction + c64_speakeasy_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + // optional information overrides + virtual machine_config_constructor device_mconfig_additions() const override; + +protected: + // device-level overrides + virtual void device_start() override; + + // device_c64_expansion_card_interface overrides + virtual uint8_t c64_cd_r(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; + virtual void c64_cd_w(address_space &space, offs_t offset, uint8_t data, int sphi2, int ba, int roml, int romh, int io1, int io2) override; + +private: + required_device<votrax_sc01_device> m_votrax; +}; + + +// device type definition +extern const device_type C64_SPEAKEASY; + + + +#endif diff --git a/src/devices/bus/vic20/exp.cpp b/src/devices/bus/vic20/exp.cpp index b2d811d6204..a07e623f72a 100644 --- a/src/devices/bus/vic20/exp.cpp +++ b/src/devices/bus/vic20/exp.cpp @@ -210,7 +210,7 @@ SLOT_INTERFACE_START( vic20_expansion_cards ) SLOT_INTERFACE("8k", VIC1110) SLOT_INTERFACE("16k", VIC1111) SLOT_INTERFACE("fe3", VIC20_FE3) - SLOT_INTERFACE("speakeasy", VIC20_SPEAKEASY) + SLOT_INTERFACE("speakez", VIC20_SPEAKEASY) // the following need ROMs from the software list SLOT_INTERFACE_INTERNAL("standard", VIC20_STD) diff --git a/src/devices/bus/vic20/speakeasy.cpp b/src/devices/bus/vic20/speakeasy.cpp index 45bb146847e..e1e72d9c5b9 100644 --- a/src/devices/bus/vic20/speakeasy.cpp +++ b/src/devices/bus/vic20/speakeasy.cpp @@ -2,7 +2,8 @@ // copyright-holders:smf /********************************************************************** - Personal Peripheral Products SpeakEasy cartridge emulation + Personal Peripheral Products Speakeasy cartridge emulation + (aka Protecto Enterprizes VIC-20 Voice Synthesizer) **********************************************************************/ @@ -30,7 +31,7 @@ const device_type VIC20_SPEAKEASY = &device_creator<vic20_speakeasy_t>; //------------------------------------------------- static MACHINE_CONFIG_FRAGMENT( speakeasy ) - MCFG_SPEAKER_ADD("mono", 0.0, 0.0, 1.0) + MCFG_SPEAKER_STANDARD_MONO("mono") MCFG_SOUND_ADD(SC01A_TAG, VOTRAX_SC01, 720000) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.85) @@ -58,7 +59,7 @@ machine_config_constructor vic20_speakeasy_t::device_mconfig_additions() const //------------------------------------------------- vic20_speakeasy_t::vic20_speakeasy_t(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, VIC20_SPEAKEASY, "SpeakEasy", tag, owner, clock, "speakeasy", __FILE__), + device_t(mconfig, VIC20_SPEAKEASY, "Speakeasy", tag, owner, clock, "speakeasy", __FILE__), device_vic20_expansion_card_interface(mconfig, *this), m_votrax(*this, SC01A_TAG) { diff --git a/src/devices/bus/vic20/speakeasy.h b/src/devices/bus/vic20/speakeasy.h index bf11cde72e5..dbd9ccf4e84 100644 --- a/src/devices/bus/vic20/speakeasy.h +++ b/src/devices/bus/vic20/speakeasy.h @@ -2,7 +2,8 @@ // copyright-holders:Curt Coder /********************************************************************** - Personal Peripheral Products SpeakEasy cartridge emulation + Personal Peripheral Products Speakeasy cartridge emulation + (aka Protecto Enterprizes VIC-20 Voice Synthesizer) **********************************************************************/ |