From 4a5b8a415fee66df01d57b871a8025d0f1f1a2f6 Mon Sep 17 00:00:00 2001 From: wilbertpol Date: Mon, 10 Jul 2023 19:23:23 +0100 Subject: [PATCH] msx1_cart.xml: Added fourteen working items. (#11412) * Removed Hopper (Europe) tape-to-cartridge hack. * Demoted The Holy Quran (v1.00) to not working. New working software list items (msx1_cart.xml) ------------------------------- Hole in One Professional (Japan, alt 2) [file-hunter] Hole in One Professional (Japan, alt 3) [file-hunter] Hot-Asm (Brazil) [file-hunter] Hot-Plan (Brazil) [file-hunter] Hydlide II - Shine of Darkness (Korea) [file-hunter] Hopper (Arab) [file-hunter] Hans' Adventure (v1.1) [MSXDev] Hans' Adventure (v1.0) [MSXDev] Happy Halloween [Clube MSX] Happy Square Christmas [303bcn] Heart Stealer 2 [MSXDev] Heroes Arena [MSXDev] Hose Diogo Martinez: The Bussas Quest [MSXDev] How Many Are The Dumbbells You Lift? [cobinee] --- hash/msx1_cart.xml | 191 +++++++++++++++++++++-- src/devices/bus/msx/cart/cartridge.cpp | 1 + src/devices/bus/msx/cart/korean.cpp | 51 ++++++ src/devices/bus/msx/cart/korean.h | 21 +++ src/devices/bus/msx/cart/slotoptions.cpp | 1 + src/devices/bus/msx/cart/slotoptions.h | 1 + 6 files changed, 257 insertions(+), 9 deletions(-) diff --git a/hash/msx1_cart.xml b/hash/msx1_cart.xml index 5871e4e052e..f5f93718119 100644 --- a/hash/msx1_cart.xml +++ b/hash/msx1_cart.xml @@ -6445,17 +6445,57 @@ kept for now until finding out what those bytes affect... - - - Hopper (Europe) - 1986 - Eaglesoft + + Hole in One Professional (Japan, alt 2) + 1985 + HAL Kenkyuujo + + + + + + + + + + + + Hole in One Professional (Japan, alt 3) + 1985 + HAL Kenkyuujo + + + + + + + + + + + + Hot-Asm (Brazil) + 1985 + Epcom + + - + + + + + + + Hot-Plan (Brazil) + 1986 + Epcom + + + + + @@ -6585,6 +6625,23 @@ kept for now until finding out what those bytes affect... + + Hydlide II - Shine of Darkness (Korea) + 1986 + Zemina + + + + + + + + + Hydlide 3 - The Space Memories (Korea) 1987 @@ -15900,7 +15957,8 @@ legacy FM implementations cannot find it. - + + The Holy Quran (v1.00) 1987 Al Alamiah @@ -15916,6 +15974,19 @@ legacy FM implementations cannot find it. + + Hopper (Arab) + 1986 + Al Alamiah + + + + + + + + + Ibn Maleck (Arab) 1985 @@ -18480,6 +18551,108 @@ legacy FM implementations cannot find it. + + Hans' Adventure (v1.1) + 2010 + MSXDev + + + + + + + + + + + Hans' Adventure (v1.0) + 2010 + MSXDev + + + + + + + + + + + Happy Halloween + 2018 + Clube MSX Magazine + + + + + + + + + + + Happy Square Christmas + 2010 + 303bcn + + + + + + + + + + Heart Stealer 2 + 2021 + MSXDev + + + + + + + + + + + Heroes Arena + 2010 + MSXDev + + + + + + + + + + + Hose Diogo Martinez: The Bussas Quest + 2008 + MSXDev + + + + + + + + + + + How Many Are The Dumbbells You Lift? + 2019 + Cobinee + + + + + + + + I Need Speed (MSX Cartridge Shop) 2009 diff --git a/src/devices/bus/msx/cart/cartridge.cpp b/src/devices/bus/msx/cart/cartridge.cpp index 68acba6beb8..65679d17ba2 100644 --- a/src/devices/bus/msx/cart/cartridge.cpp +++ b/src/devices/bus/msx/cart/cartridge.cpp @@ -72,6 +72,7 @@ void msx_cart(device_slot_interface &device, bool is_in_subslot) device.option_add_internal(slotoptions::KOREAN_80IN1, MSX_CART_KOREAN_80IN1); device.option_add_internal(slotoptions::KOREAN_90IN1, MSX_CART_KOREAN_90IN1); device.option_add_internal(slotoptions::KOREAN_126IN1, MSX_CART_KOREAN_126IN1); + device.option_add_internal(slotoptions::KOREAN_HYDLIDE2, MSX_CART_KOREAN_HYDLIDE2); device.option_add_internal(slotoptions::LOVEPLUS, MSX_CART_LOVEPLUS); device.option_add_internal(slotoptions::MAJUSTUSHI, MSX_CART_MAJUTSUSHI); device.option_add_internal(slotoptions::MSXAUD_FSCA1, MSX_CART_MSX_AUDIO_FSCA1); diff --git a/src/devices/bus/msx/cart/korean.cpp b/src/devices/bus/msx/cart/korean.cpp index 2337e35ddc2..697aac9dea2 100644 --- a/src/devices/bus/msx/cart/korean.cpp +++ b/src/devices/bus/msx/cart/korean.cpp @@ -7,6 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_KOREAN_25IN1, msx_cart_korean_25in1_device, "msx_c DEFINE_DEVICE_TYPE(MSX_CART_KOREAN_80IN1, msx_cart_korean_80in1_device, "msx_cart_korean_80in1", "MSX Cartridge - Korean 80-in-1") DEFINE_DEVICE_TYPE(MSX_CART_KOREAN_90IN1, msx_cart_korean_90in1_device, "msx_cart_korean_90in1", "MSX Cartridge - Korean 90-in-1") DEFINE_DEVICE_TYPE(MSX_CART_KOREAN_126IN1, msx_cart_korean_126in1_device, "msx_cart_korean_126in1", "MSX Cartridge - Korean 126-in-1") +DEFINE_DEVICE_TYPE(MSX_CART_KOREAN_HYDLIDE2, msx_cart_korean_hydlide2_device, "msx_cart_korean_hydlide2", "MSX Cartridge - Korean Hydlide 2") msx_cart_korean_25in1_device::msx_cart_korean_25in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) @@ -241,3 +242,53 @@ void msx_cart_korean_126in1_device::bank_w(offs_t offset, uint8_t data) { m_rombank[offset & 0x01]->set_entry(data & m_bank_mask); } + + + + + +msx_cart_korean_hydlide2_device::msx_cart_korean_hydlide2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, MSX_CART_KOREAN_HYDLIDE2, tag, owner, clock) + , msx_cart_interface(mconfig, *this) + , m_rombank(*this, "rombank") + , m_bank_mask(0) +{ +} + +void msx_cart_korean_hydlide2_device::device_reset() +{ + m_rombank->set_entry(0); +} + +std::error_condition msx_cart_korean_hydlide2_device::initialize_cartridge(std::string &message) +{ + if (!cart_rom_region()) + { + message = "msx_cart_korean_hydlide2_device: Required region 'rom' was not found."; + return image_error::INTERNAL; + } + + const u32 size = cart_rom_region()->bytes(); + const u16 banks = size / 0x4000; + + if (size > 256 * 0x4000 || size < 0x8000 || size != banks * 0x4000 || (~(banks - 1) % banks)) + { + message = "msx_cart_korean_hydlide2_device: Region 'rom' has unsupported size."; + return image_error::INVALIDLENGTH; + } + + m_bank_mask = banks - 1; + + m_rombank->configure_entries(0, banks, cart_rom_region()->base(), 0x4000); + + page(1)->install_rom(0x4000, 0x7fff, cart_rom_region()->base()); + page(2)->install_read_bank(0x8000, 0xbfff, m_rombank); + page(2)->install_write_handler(0x8000, 0x8000, emu::rw_delegate(*this, FUNC(msx_cart_korean_hydlide2_device::bank_w))); + + return std::error_condition(); +} + +void msx_cart_korean_hydlide2_device::bank_w(uint8_t data) +{ + m_rombank->set_entry(data & m_bank_mask); +} diff --git a/src/devices/bus/msx/cart/korean.h b/src/devices/bus/msx/cart/korean.h index 82a88723917..fafae62e593 100644 --- a/src/devices/bus/msx/cart/korean.h +++ b/src/devices/bus/msx/cart/korean.h @@ -12,6 +12,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_KOREAN_25IN1, msx_cart_korean_25in1_device) DECLARE_DEVICE_TYPE(MSX_CART_KOREAN_80IN1, msx_cart_korean_80in1_device) DECLARE_DEVICE_TYPE(MSX_CART_KOREAN_90IN1, msx_cart_korean_90in1_device) DECLARE_DEVICE_TYPE(MSX_CART_KOREAN_126IN1, msx_cart_korean_126in1_device) +DECLARE_DEVICE_TYPE(MSX_CART_KOREAN_HYDLIDE2, msx_cart_korean_hydlide2_device) class msx_cart_korean_25in1_device : public device_t, public msx_cart_interface @@ -97,4 +98,24 @@ private: }; +class msx_cart_korean_hydlide2_device : public device_t, public msx_cart_interface +{ +public: + msx_cart_korean_hydlide2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + virtual std::error_condition initialize_cartridge(std::string &message) override; + +protected: + // device-level overrides + virtual void device_start() override { } + virtual void device_reset() override; + +private: + void bank_w(u8 data); + + memory_bank_creator m_rombank; + u8 m_bank_mask; +}; + + #endif // MAME_BUS_MSX_CART_KOREAN_H diff --git a/src/devices/bus/msx/cart/slotoptions.cpp b/src/devices/bus/msx/cart/slotoptions.cpp index 20a9e538402..e3ae9bc4e81 100644 --- a/src/devices/bus/msx/cart/slotoptions.cpp +++ b/src/devices/bus/msx/cart/slotoptions.cpp @@ -49,6 +49,7 @@ char const *const KOREAN_25IN1 = "korean_25in1"; char const *const KOREAN_80IN1 = "korean_80in1"; char const *const KOREAN_90IN1 = "korean_90in1"; char const *const KOREAN_126IN1 = "korean_126in1"; +char const *const KOREAN_HYDLIDE2 = "korean_hydlide2"; char const *const LOVEPLUS = "loveplus"; char const *const MAJUSTUSHI = "majutsushi"; char const *const MM256K = "mm256k"; diff --git a/src/devices/bus/msx/cart/slotoptions.h b/src/devices/bus/msx/cart/slotoptions.h index 34c26d27915..44fedd84707 100644 --- a/src/devices/bus/msx/cart/slotoptions.h +++ b/src/devices/bus/msx/cart/slotoptions.h @@ -51,6 +51,7 @@ extern char const *const KOREAN_25IN1; extern char const *const KOREAN_80IN1; extern char const *const KOREAN_90IN1; extern char const *const KOREAN_126IN1; +extern char const *const KOREAN_HYDLIDE2; extern char const *const LOVEPLUS; extern char const *const MAJUSTUSHI; extern char const *const MM256K;