From b8974ddcba6c266a878c6bfe83d3a2391cc91a42 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 23 Jul 2021 18:59:52 +0200 Subject: [PATCH] New NOT_WORKING software list additions --------------------------------------- msx1+cart: Easi-Speech [hap] --- hash/msx1_cart.xml | 12 +++++ scripts/src/bus.lua | 2 + src/devices/bus/msx_cart/cartridge.cpp | 2 + src/devices/bus/msx_cart/easi_speech.cpp | 62 ++++++++++++++++++++++++ src/devices/bus/msx_cart/easi_speech.h | 33 +++++++++++++ 5 files changed, 111 insertions(+) create mode 100644 src/devices/bus/msx_cart/easi_speech.cpp create mode 100644 src/devices/bus/msx_cart/easi_speech.h diff --git a/hash/msx1_cart.xml b/hash/msx1_cart.xml index bb8cb0b4a6d..14329083359 100644 --- a/hash/msx1_cart.xml +++ b/hash/msx1_cart.xml @@ -13007,6 +13007,18 @@ kept for now until finding out what those bytes affect... + + Easi-Speech + 1987 + R.Amy + + + + + + + + Family Automation Language Community (Jpn) 1984 diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index f575c3b396d..d889e7af294 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -1692,6 +1692,8 @@ if (BUSES["MSX_SLOT"]~=null) then MAME_DIR .. "src/devices/bus/msx_cart/disk.h", MAME_DIR .. "src/devices/bus/msx_cart/dooly.cpp", MAME_DIR .. "src/devices/bus/msx_cart/dooly.h", + MAME_DIR .. "src/devices/bus/msx_cart/easi_speech.cpp", + MAME_DIR .. "src/devices/bus/msx_cart/easi_speech.h", MAME_DIR .. "src/devices/bus/msx_cart/fmpac.cpp", MAME_DIR .. "src/devices/bus/msx_cart/fmpac.h", MAME_DIR .. "src/devices/bus/msx_cart/fs_sr022.cpp", diff --git a/src/devices/bus/msx_cart/cartridge.cpp b/src/devices/bus/msx_cart/cartridge.cpp index 9c1e03a05fb..4bda712eabe 100644 --- a/src/devices/bus/msx_cart/cartridge.cpp +++ b/src/devices/bus/msx_cart/cartridge.cpp @@ -9,6 +9,7 @@ #include "crossblaim.h" #include "disk.h" #include "dooly.h" +#include "easi_speech.h" #include "fmpac.h" #include "fs_sr022.h" #include "halnote.h" @@ -47,6 +48,7 @@ void msx_cart(device_slot_interface &device) device.option_add_internal("fs_sr022", MSX_CART_FS_SR022); device.option_add_internal("superloderunner", MSX_CART_SUPERLODERUNNER); device.option_add_internal("synthesizer", MSX_CART_SYNTHESIZER); + device.option_add_internal("easispeech", MSX_CART_EASISPEECH); device.option_add_internal("cross_blaim", MSX_CART_CROSSBLAIM); device.option_add_internal("korean_80in1", MSX_CART_KOREAN_80IN1); device.option_add_internal("korean_90in1", MSX_CART_KOREAN_90IN1); diff --git a/src/devices/bus/msx_cart/easi_speech.cpp b/src/devices/bus/msx_cart/easi_speech.cpp new file mode 100644 index 00000000000..6a39316c191 --- /dev/null +++ b/src/devices/bus/msx_cart/easi_speech.cpp @@ -0,0 +1,62 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/****************************************************************************** + +Easi-Speech cartridge (R.Amy, 1987) + +The program adds a hook to 0xfd29, usage appears to be something like this: +defusr0=&hfd29 +x=usr0("hello") + +TODO: +- Speech doesn't work. At boot, it's supposed to say "M S X easy speech". + Maybe ald_w data is scrambled a bit? The expected usage in notes above + also does not work. + +******************************************************************************/ + +#include "emu.h" +#include "easi_speech.h" + + +DEFINE_DEVICE_TYPE(MSX_CART_EASISPEECH, msx_cart_easispeech_device, "msx_cart_easispeech", "MSX Cartridge - Easi-Speech") + + +msx_cart_easispeech_device::msx_cart_easispeech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, MSX_CART_EASISPEECH, tag, owner, clock) + , msx_cart_interface(mconfig, *this) + , m_speech(*this, "speech") +{ +} + +ROM_START( msx_cart_easispeech ) + ROM_REGION( 0x10000, "speech", 0 ) + ROM_LOAD( "sp0256a-al2", 0x1000, 0x0800, CRC(b504ac15) SHA1(e60fcb5fa16ff3f3b69d36c7a6e955744d3feafc) ) +ROM_END + +const tiny_rom_entry *msx_cart_easispeech_device::device_rom_region() const +{ + return ROM_NAME( msx_cart_easispeech ); +} + +void msx_cart_easispeech_device::device_add_mconfig(machine_config &config) +{ + SP0256(config, m_speech, 3120000); // frequency unknown + m_speech->add_route(ALL_OUTPUTS, ":speaker", 1.00); +} + +uint8_t msx_cart_easispeech_device::read_cart(offs_t offset) +{ + if (offset >= 0x4000 && offset < 0x8000) + return get_rom_base()[offset & 0x1fff]; + if (offset >= 0x8000 && offset < 0xc000) + return m_speech->lrq_r() << 7; + + return 0xff; +} + +void msx_cart_easispeech_device::write_cart(offs_t offset, uint8_t data) +{ + if (offset >= 0x8000 && offset < 0xc000) + m_speech->ald_w(data >> 2); +} diff --git a/src/devices/bus/msx_cart/easi_speech.h b/src/devices/bus/msx_cart/easi_speech.h new file mode 100644 index 00000000000..2aba350c4c7 --- /dev/null +++ b/src/devices/bus/msx_cart/easi_speech.h @@ -0,0 +1,33 @@ +// license:BSD-3-Clause +// copyright-holders:hap +#ifndef MAME_BUS_MSX_CART_EASISPEECH_H +#define MAME_BUS_MSX_CART_EASISPEECH_H + +#pragma once + +#include "bus/msx_cart/cartridge.h" +#include "sound/sp0256.h" + + +DECLARE_DEVICE_TYPE(MSX_CART_EASISPEECH, msx_cart_easispeech_device) + + +class msx_cart_easispeech_device : public device_t, public msx_cart_interface +{ +public: + msx_cart_easispeech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + virtual uint8_t read_cart(offs_t offset) override; + virtual void write_cart(offs_t offset, uint8_t data) override; + +protected: + // device-level overrides + virtual void device_start() override { ; } + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + +private: + required_device m_speech; +}; + +#endif // MAME_BUS_MSX_CART_EASISPEECH_H