diff --git a/hash/msx_yamaha_minicart.xml b/hash/msx_yamaha_minicart.xml new file mode 100644 index 00000000000..43ec86b5dbe --- /dev/null +++ b/hash/msx_yamaha_minicart.xml @@ -0,0 +1,30 @@ + + + + + + + + + FM Voicing Program II + 1985 + Yamaha + + + + + + + + + + diff --git a/src/devices/bus/msx/cart/cartridge.cpp b/src/devices/bus/msx/cart/cartridge.cpp index 20dda6646fc..1ac5d458371 100644 --- a/src/devices/bus/msx/cart/cartridge.cpp +++ b/src/devices/bus/msx/cart/cartridge.cpp @@ -96,3 +96,8 @@ void msx_yamaha_60pin(device_slot_interface &device, bool is_in_subslot) device.option_add("sfg01", MSX_CART_SFG01); device.option_add("sfg05", MSX_CART_SFG05); } + +void msx_yamaha_minicart(device_slot_interface &device, bool is_in_subslot) +{ + device.option_add_internal("nomapper", MSX_CART_NOMAPPER); +} diff --git a/src/devices/bus/msx/cart/cartridge.h b/src/devices/bus/msx/cart/cartridge.h index 4df2975ebae..fcf2f96ab4b 100644 --- a/src/devices/bus/msx/cart/cartridge.h +++ b/src/devices/bus/msx/cart/cartridge.h @@ -8,6 +8,7 @@ void msx_cart(device_slot_interface &device, bool is_in_subslot); void msx_yamaha_60pin(device_slot_interface &device, bool is_in_subslot); // 60 pin expansion slots as found in yamaha machines +void msx_yamaha_minicart(device_slot_interface &device, bool is_in_subslot); // 30 pin mini cartridge slot as found in some yamaha machines #endif // MAME_BUS_MSX_CART_CARTRIDGE_H diff --git a/src/devices/bus/msx/slot/cartridge.cpp b/src/devices/bus/msx/slot/cartridge.cpp index aa9f3c55c90..2d2990488c7 100644 --- a/src/devices/bus/msx/slot/cartridge.cpp +++ b/src/devices/bus/msx/slot/cartridge.cpp @@ -31,6 +31,7 @@ enum DEFINE_DEVICE_TYPE(MSX_SLOT_CARTRIDGE, msx_slot_cartridge_device, "msx_slot_cartridge", "MSX Cartridge slot") DEFINE_DEVICE_TYPE(MSX_SLOT_YAMAHA_EXPANSION, msx_slot_yamaha_expansion_device, "msx_slot_yamaha_expansion", "MSX Yamaha Expansion slot") +DEFINE_DEVICE_TYPE(MSX_SLOT_YAMAHA_MINICART, msx_slot_yamaha_minicart_device, "msx_slot_yamaha_minicart", "MSX Yamaha Minicart slot") msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) @@ -323,6 +324,18 @@ void msx_slot_yamaha_expansion_device::device_start() } + + +msx_slot_yamaha_minicart_device::msx_slot_yamaha_minicart_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_cartridge_device(mconfig, MSX_SLOT_YAMAHA_MINICART, tag, owner, clock) +{ +} + +void msx_slot_yamaha_minicart_device::device_start() +{ +} + + msx_cart_interface::msx_cart_interface(const machine_config &mconfig, device_t &device) : device_interface(device, "msxcart") , m_exp(dynamic_cast(device.owner())) diff --git a/src/devices/bus/msx/slot/cartridge.h b/src/devices/bus/msx/slot/cartridge.h index e318ad0cbe2..b23ec5b0133 100644 --- a/src/devices/bus/msx/slot/cartridge.h +++ b/src/devices/bus/msx/slot/cartridge.h @@ -12,6 +12,7 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_CARTRIDGE, msx_slot_cartridge_device) DECLARE_DEVICE_TYPE(MSX_SLOT_YAMAHA_EXPANSION, msx_slot_yamaha_expansion_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_YAMAHA_MINICART, msx_slot_yamaha_minicart_device) class msx_cart_interface; @@ -22,20 +23,16 @@ class msx_slot_cartridge_device : public device_t , public msx_internal_slot_interface { public: - // construction/destruction msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - // configuration helpers auto irq_handler() { return m_irq_handler.bind(); } - // image-level overrides virtual image_init_result call_load() override; virtual void call_unload() override; virtual bool is_reset_on_load() const noexcept override { return true; } virtual const char *image_interface() const noexcept override { return "msx_cart"; } virtual const char *file_extensions() const noexcept override { return "mx1,bin,rom"; } - // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; DECLARE_WRITE_LINE_MEMBER(irq_out); @@ -43,7 +40,6 @@ public: protected: msx_slot_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); - // device-level overrides virtual void device_resolve_objects() override; virtual void device_start() override; @@ -58,7 +54,6 @@ protected: class msx_slot_yamaha_expansion_device : public msx_slot_cartridge_device { public: - // construction/destruction msx_slot_yamaha_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual const char *image_interface() const noexcept override { return "msx_yamaha_60pin"; } @@ -71,6 +66,21 @@ protected: +class msx_slot_yamaha_minicart_device : public msx_slot_cartridge_device +{ +public: + msx_slot_yamaha_minicart_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + virtual const char *image_interface() const noexcept override { return "msx_yamaha_minicart"; } + virtual const char *image_type_name() const noexcept override { return "yamahaminicart"; } + virtual const char *image_brief_type_name() const noexcept override { return "mini"; } + +protected: + virtual void device_start() override; +}; + + + class msx_cart_interface : public device_interface { friend class msx_slot_cartridge_device; diff --git a/src/mame/msx/msx1_v9938.cpp b/src/mame/msx/msx1_v9938.cpp index daeb8d3bfc4..d407ab1b3dc 100644 --- a/src/mame/msx/msx1_v9938.cpp +++ b/src/mame/msx/msx1_v9938.cpp @@ -9,6 +9,7 @@ #include "bus/msx/slot/ram.h" #include "bus/msx/slot/ram_mm.h" #include "bus/msx/slot/rom.h" +#include "softlist_dev.h" using namespace msx_keyboard; @@ -306,9 +307,6 @@ ROM_START(cx5m128) ROM_REGION(0x4000, "subrom", ROMREGION_ERASEFF) ROM_LOAD("cx5m128sub.rom", 0x0000, 0x2000, CRC(b17a776d) SHA1(c2340313bfda751181e8a5287d60f77bc6a2f3e6)) - - ROM_REGION(0x4000, "minicart", 0) - ROM_LOAD("yrm502.rom", 0x0000, 0x4000, CRC(5412d5dc) SHA1(30747a56f45389be76362f7fc55d673f1bff8312)) ROM_END void msx1_v9938_state::cx5m128(machine_config &config) @@ -324,12 +322,13 @@ void msx1_v9938_state::cx5m128(machine_config &config) add_cartridge_slot<1>(config, 1); add_cartridge_slot<2>(config, 2); add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 1, 1, "subrom"); - add_internal_slot(config, MSX_SLOT_ROM, "minicart", 3, 1, 1, 1, "minicart"); /* YRM-502 */ + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_MINICART, "minicart", 3, 1, msx_yamaha_minicart, nullptr); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, 3, msx_yamaha_60pin, "sfg05"); + add_cartridge_slot<4>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, 3, msx_yamaha_60pin, "sfg05"); m_hw_def.no_code_led(); msx1_v9938_pal(SND_YM2149, config, REGION_INTERNATIONAL); + SOFTWARE_LIST(config, "minicart_list").set_original("msx_yamaha_minicart"); } /* MSX - Yamaha CX5MII-128 C (Canada) */ @@ -357,9 +356,6 @@ ROM_START(cx5miib) ROM_REGION(0x4000, "subrom", 0) // overdump? ROM_LOAD("cx5mii_sub.rom", 0x0000, 0x4000, BAD_DUMP CRC(317f9bb5) SHA1(0ce800666c0d66bc2aa0b73a16f228289b9198be)) - - ROM_REGION(0x4000, "minicart", 0) - ROM_LOAD("yrm502.rom", 0x0000, 0x4000, CRC(5330fe21) SHA1(7b1798561ee1844a7d6432924fbee9b4fc591c19)) ROM_END void msx1_v9938_state::cx5miib(machine_config &config) @@ -375,12 +371,13 @@ void msx1_v9938_state::cx5miib(machine_config &config) add_cartridge_slot<1>(config, 1); add_cartridge_slot<2>(config, 2); add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 1, 1, "subrom"); - add_internal_slot(config, MSX_SLOT_ROM, "minicart", 3, 1, 1, 1, "minicart"); /* YRM-502 */ + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_MINICART, "minicart", 3, 1, msx_yamaha_minicart, nullptr); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, 3, msx_yamaha_60pin, "sfg05"); + add_cartridge_slot<4>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, 3, msx_yamaha_60pin, "sfg05"); m_hw_def.no_code_led(); msx1_v9938_pal(SND_YM2149, config, REGION_INTERNATIONAL); + SOFTWARE_LIST(config, "minicart_list").set_original("msx_yamaha_minicart"); } /* MSX - Yamaha CX5MIIC (Canada) */ @@ -444,12 +441,13 @@ void msx1_v9938_state::y503iir(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); add_cartridge_slot<1>(config, 1); add_cartridge_slot<2>(config, 2); - // Mini cartridge slot in slot #3-1 + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_MINICART, "minicart", 3, 1, msx_yamaha_minicart, nullptr); add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM // This should have a serial network interface by default - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, 3, msx_yamaha_60pin, nullptr); + add_cartridge_slot<4>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, 3, msx_yamaha_60pin, nullptr); msx1_v9938_pal(SND_YM2149, config, REGION_RUSSIA); + SOFTWARE_LIST(config, "minicart_list").set_original("msx_yamaha_minicart"); } /* MSX - Yamaha YIS503-IIR Estonian */ @@ -474,12 +472,13 @@ void msx1_v9938_state::y503iir2(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); add_cartridge_slot<1>(config, 1); add_cartridge_slot<2>(config, 2); - // Mini cartridge slot in slot #3-1 + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_MINICART, "minicart", 3, 1, msx_yamaha_minicart, nullptr); add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM // This should have a serial network interface by default - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, 3, msx_yamaha_60pin, nullptr); + add_cartridge_slot<4>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, 3, msx_yamaha_60pin, nullptr); msx1_v9938_pal(SND_YM2149, config, REGION_RUSSIA); + SOFTWARE_LIST(config, "minicart_list").set_original("msx_yamaha_minicart"); } } // anonymous namespace diff --git a/src/mame/msx/msx2.cpp b/src/mame/msx/msx2.cpp index b3413309470..f211e3e5dce 100644 --- a/src/mame/msx/msx2.cpp +++ b/src/mame/msx/msx2.cpp @@ -20,6 +20,7 @@ #include "bus/msx/slot/ram_mm.h" #include "bus/msx/slot/rom.h" #include "bus/msx/slot/sony08.h" +#include "softlist_dev.h" using namespace msx_keyboard; @@ -3704,11 +3705,12 @@ void msx2_state::cx7128(machine_config &config) add_cartridge_slot<1>(config, 1); add_cartridge_slot<2>(config, 2); add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 0, 1, "subrom"); - // mini cartridge port in slot #3-1 + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_MINICART, "minicart", 3, 1, msx_yamaha_minicart, nullptr); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_unused_bits(0x80); // 64KB Mapper RAM - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, nullptr); + add_cartridge_slot<4>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, nullptr); msx2(SND_YM2149, config, REGION_JAPAN); + SOFTWARE_LIST(config, "minicart_list").set_original("msx_yamaha_minicart"); } /* MSX2 - Yamaha CX7M/128 */ @@ -3719,9 +3721,6 @@ ROM_START(cx7m128) ROM_REGION(0x4000, "subrom", 0) ROM_LOAD("cx7mext.rom", 0x0000, 0x4000, BAD_DUMP CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) // needs verification - - ROM_REGION(0x4000, "minicart", 0) - ROM_LOAD("yrm502.rom", 0x0000, 0x4000, CRC(51f7ddd1) SHA1(2a4b4a4657e3077df8a88f98210b76883d3702b1)) ROM_END void msx2_state::cx7m128(machine_config &config) @@ -3735,12 +3734,12 @@ void msx2_state::cx7m128(machine_config &config) add_cartridge_slot<1>(config, 1); add_cartridge_slot<2>(config, 2); add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 0, 1, "subrom"); - // mini cartridge port in slot #3-1 - add_internal_slot(config, MSX_SLOT_ROM, "minicart", 3, 1, 1, 1, "minicart"); + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_MINICART, "minicart", 3, 1, msx_yamaha_minicart, nullptr); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_unused_bits(0x80); // 64KB Mapper RAM - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, "sfg05"); + add_cartridge_slot<4>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, "sfg05"); msx2(SND_YM2149, config, REGION_JAPAN); + SOFTWARE_LIST(config, "minicart_list").set_original("msx_yamaha_minicart"); } /* MSX2 - Yamaha YIS-503 III R (student) */ @@ -3810,6 +3809,7 @@ void msx2_state::yis604(machine_config &config) { // YM2149 (in S-3527) // FDC: None, 0 drives + // 1 Minicart slot (with Beginnner's Lesson) // 2 Cartridge slots // S-3527 MSX Engine @@ -3817,11 +3817,12 @@ void msx2_state::yis604(machine_config &config) add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); add_cartridge_slot<1>(config, 1); add_cartridge_slot<2>(config, 2); - // Mini cartridge slot in slot #3-1 + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_MINICART, "minicart", 3, 1, msx_yamaha_minicart, nullptr); add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, nullptr); + add_cartridge_slot<4>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, nullptr); msx2(SND_YM2149, config, REGION_JAPAN); + SOFTWARE_LIST(config, "minicart_list").set_original("msx_yamaha_minicart"); } /* MSX2 - Yamaha YIS-805/128 */