From ac4af4b16b5790448728a0fb95cc8ca5939d2f40 Mon Sep 17 00:00:00 2001 From: wilbertpol Date: Tue, 8 Nov 2022 04:00:55 +0000 Subject: msx/msx.cpp, bus/msx_cart, bus/msx_slot: Reimplemented memory using views. (#10473) [Wilbert Pol] * Made some devices which were not present in all msx models optional; install software lists based on components of the system. * Updated hardware descriptions. * Implemented bruc100 firmware banking. * Added m5.00.011 version of Yamaha SFG05 cartridge. * Fixed phc28 RAM misconfiguration. * Added AX-230 internal games mapper. * Started adding support for FS-A1FM modem. * Updated input port definitions. * Added support for kanji font from raw FS-A1FX ROM dump. * Started adding support for RS-232. * Added support for Toshiba HX-M200 kanji cartridge - allows hx21 and hx22 to start their firmware. * Fixed most floppy problems. * Marked all ROMs that need verification as bad dumps. * Moved floppy controller and drive configuration from main state to msx_slot disk devices. New working machines --------------------------------------- Hitachi MB-H1 (MSX1, Japan) Mitsubishi ML-8000 (MSX1, Japan) Panasonic CF-2700 (MSX1, UK) Pioneer", "UC-V102 (MSX2, Japan) Sakhr AX-200 (MSX1, Arabic/English) Sakhr AX-230 (MSX1, Arabic) Sakhr AX-350 II (MSX2, Arabic) Sakhr AX-500 (MSX2, Arabic) Sanyo MPC-25FS (MSX2, Japan) Sanyo PHC-23 / Wavy23 (MSX2, Japan) Toshiba HX-32 (MSX1, Japan) Toshiba HX-51I (MSX1, Italy, Spain) Yamaha SX-100 (MSX1, Japan) Victor HC-80 (MSX2, Japan) New working clones --------------------------------------- Frael Bruc 100-2 (MSX1, Italy) Hitachi MB-H1E (MSX1, Japan) Philips NMS 8250/16 (MSX2, Spain) Sakhr AX-200M (MSX1, Arabic/English) Sakhr AX-350 II F (MSX2, Arabic) Sony HB-101 (MSX1, Japan) Sony HB-75 (MSX1, Japan) Sony HB-F500 2nd version (MSX2, Japan) Spectravideo SVI-728 (MSX1, Spanish) Talent DPC-200 (MSX1, Argentina, international keyboard) Toshiba HX-20E (MSX1, Spain) --- hash/msx1_cart.xml | 4 +- scripts/src/bus.lua | 12 + src/devices/bus/msx_cart/arc.cpp | 24 +- src/devices/bus/msx_cart/arc.h | 10 +- src/devices/bus/msx_cart/ascii.cpp | 502 +- src/devices/bus/msx_cart/ascii.h | 105 +- src/devices/bus/msx_cart/cartridge.cpp | 83 +- src/devices/bus/msx_cart/cartridge.h | 45 +- src/devices/bus/msx_cart/crossblaim.cpp | 71 +- src/devices/bus/msx_cart/crossblaim.h | 14 +- src/devices/bus/msx_cart/disk.cpp | 304 +- src/devices/bus/msx_cart/disk.h | 51 +- src/devices/bus/msx_cart/dooly.cpp | 58 +- src/devices/bus/msx_cart/dooly.h | 14 +- src/devices/bus/msx_cart/easi_speech.cpp | 39 +- src/devices/bus/msx_cart/easi_speech.h | 10 +- src/devices/bus/msx_cart/fmpac.cpp | 150 +- src/devices/bus/msx_cart/fmpac.h | 24 +- src/devices/bus/msx_cart/fs_sr022.cpp | 33 +- src/devices/bus/msx_cart/fs_sr022.h | 10 +- src/devices/bus/msx_cart/halnote.cpp | 172 +- src/devices/bus/msx_cart/halnote.h | 26 +- src/devices/bus/msx_cart/hfox.cpp | 71 +- src/devices/bus/msx_cart/hfox.h | 17 +- src/devices/bus/msx_cart/holy_quran.cpp | 114 +- src/devices/bus/msx_cart/holy_quran.h | 26 +- src/devices/bus/msx_cart/ink.cpp | 30 +- src/devices/bus/msx_cart/ink.h | 7 +- src/devices/bus/msx_cart/kanji.cpp | 147 + src/devices/bus/msx_cart/kanji.h | 59 + src/devices/bus/msx_cart/konami.cpp | 976 +-- src/devices/bus/msx_cart/konami.h | 107 +- src/devices/bus/msx_cart/korean.cpp | 255 +- src/devices/bus/msx_cart/korean.h | 46 +- src/devices/bus/msx_cart/majutsushi.cpp | 101 +- src/devices/bus/msx_cart/majutsushi.h | 17 +- src/devices/bus/msx_cart/moonsound.cpp | 38 +- src/devices/bus/msx_cart/moonsound.h | 11 +- src/devices/bus/msx_cart/msx_audio.cpp | 146 +- src/devices/bus/msx_cart/msx_audio.h | 31 +- src/devices/bus/msx_cart/msx_audio_kb.cpp | 30 +- src/devices/bus/msx_cart/msx_audio_kb.h | 8 +- src/devices/bus/msx_cart/msxdos2.cpp | 55 +- src/devices/bus/msx_cart/msxdos2.h | 15 +- src/devices/bus/msx_cart/nomapper.cpp | 50 +- src/devices/bus/msx_cart/nomapper.h | 6 +- src/devices/bus/msx_cart/rtype.cpp | 70 +- src/devices/bus/msx_cart/rtype.h | 16 +- src/devices/bus/msx_cart/super_swangi.cpp | 56 +- src/devices/bus/msx_cart/super_swangi.h | 16 +- src/devices/bus/msx_cart/superloderunner.cpp | 44 +- src/devices/bus/msx_cart/superloderunner.h | 12 +- src/devices/bus/msx_cart/yamaha.cpp | 118 +- src/devices/bus/msx_cart/yamaha.h | 12 +- src/devices/bus/msx_slot/ax230.cpp | 53 + src/devices/bus/msx_slot/ax230.h | 38 + src/devices/bus/msx_slot/bruc100.cpp | 50 + src/devices/bus/msx_slot/bruc100.h | 35 + src/devices/bus/msx_slot/bunsetsu.cpp | 34 +- src/devices/bus/msx_slot/bunsetsu.h | 11 +- src/devices/bus/msx_slot/cartridge.cpp | 68 +- src/devices/bus/msx_slot/cartridge.h | 12 +- src/devices/bus/msx_slot/disk.cpp | 1458 ++-- src/devices/bus/msx_slot/disk.h | 445 +- src/devices/bus/msx_slot/fs4600.cpp | 172 +- src/devices/bus/msx_slot/fs4600.h | 33 +- src/devices/bus/msx_slot/fsa1fm.cpp | 239 + src/devices/bus/msx_slot/fsa1fm.h | 88 + src/devices/bus/msx_slot/msx_rs232.cpp | 528 ++ src/devices/bus/msx_slot/msx_rs232.h | 168 + src/devices/bus/msx_slot/msx_write.cpp | 78 + src/devices/bus/msx_slot/msx_write.h | 41 + src/devices/bus/msx_slot/music.cpp | 17 +- src/devices/bus/msx_slot/music.h | 6 +- src/devices/bus/msx_slot/panasonic08.cpp | 195 +- src/devices/bus/msx_slot/panasonic08.h | 31 +- src/devices/bus/msx_slot/ram.cpp | 22 +- src/devices/bus/msx_slot/ram.h | 11 +- src/devices/bus/msx_slot/ram_mm.cpp | 59 +- src/devices/bus/msx_slot/ram_mm.h | 31 +- src/devices/bus/msx_slot/rom.cpp | 20 +- src/devices/bus/msx_slot/rom.h | 11 +- src/devices/bus/msx_slot/slot.cpp | 10 + src/devices/bus/msx_slot/slot.h | 25 +- src/devices/bus/msx_slot/sony08.cpp | 176 +- src/devices/bus/msx_slot/sony08.h | 27 +- src/mame/mame.lst | 266 +- src/mame/msx/msx.cpp | 9407 ++------------------------ src/mame/msx/msx.h | 365 + src/mame/msx/msx1.cpp | 3801 +++++++++++ src/mame/msx/msx1_bruc100.cpp | 118 + src/mame/msx/msx1_v9938.cpp | 489 ++ src/mame/msx/msx2.cpp | 4691 +++++++++++++ src/mame/msx/msx_kanji12.cpp | 88 + src/mame/msx/msx_kanji12.h | 41 + src/mame/msx/msx_keyboard.cpp | 828 +++ src/mame/msx/msx_keyboard.h | 43 + src/mame/msx/msx_matsushita.cpp | 61 +- src/mame/msx/msx_matsushita.h | 25 +- src/mame/msx/msx_s1985.cpp | 31 +- src/mame/msx/msx_s1985.h | 24 +- src/mame/msx/msx_switched.h | 10 +- src/mame/msx/msx_systemflags.cpp | 9 +- src/mame/msx/msx_systemflags.h | 22 +- 104 files changed, 15820 insertions(+), 13159 deletions(-) create mode 100644 src/devices/bus/msx_cart/kanji.cpp create mode 100644 src/devices/bus/msx_cart/kanji.h create mode 100644 src/devices/bus/msx_slot/ax230.cpp create mode 100644 src/devices/bus/msx_slot/ax230.h create mode 100644 src/devices/bus/msx_slot/bruc100.cpp create mode 100644 src/devices/bus/msx_slot/bruc100.h create mode 100644 src/devices/bus/msx_slot/fsa1fm.cpp create mode 100644 src/devices/bus/msx_slot/fsa1fm.h create mode 100644 src/devices/bus/msx_slot/msx_rs232.cpp create mode 100644 src/devices/bus/msx_slot/msx_rs232.h create mode 100644 src/devices/bus/msx_slot/msx_write.cpp create mode 100644 src/devices/bus/msx_slot/msx_write.h create mode 100644 src/mame/msx/msx.h create mode 100644 src/mame/msx/msx1.cpp create mode 100644 src/mame/msx/msx1_bruc100.cpp create mode 100644 src/mame/msx/msx1_v9938.cpp create mode 100644 src/mame/msx/msx2.cpp create mode 100644 src/mame/msx/msx_kanji12.cpp create mode 100644 src/mame/msx/msx_kanji12.h create mode 100644 src/mame/msx/msx_keyboard.cpp create mode 100644 src/mame/msx/msx_keyboard.h diff --git a/hash/msx1_cart.xml b/hash/msx1_cart.xml index ddda44c95af..097bbe20aed 100644 --- a/hash/msx1_cart.xml +++ b/hash/msx1_cart.xml @@ -669,12 +669,12 @@ Xyzolog - Electric Software - - + Japanese MSX-Write (Jpn) 1986 ASCII + diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 8e3d98ab6d6..b2057000033 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -1801,6 +1801,10 @@ end if (BUSES["MSX_SLOT"]~=null) then files { + MAME_DIR .. "src/devices/bus/msx_slot/ax230.cpp", + MAME_DIR .. "src/devices/bus/msx_slot/ax230.h", + MAME_DIR .. "src/devices/bus/msx_slot/bruc100.cpp", + MAME_DIR .. "src/devices/bus/msx_slot/bruc100.h", MAME_DIR .. "src/devices/bus/msx_slot/bunsetsu.cpp", MAME_DIR .. "src/devices/bus/msx_slot/bunsetsu.h", MAME_DIR .. "src/devices/bus/msx_slot/cartridge.cpp", @@ -1809,6 +1813,10 @@ if (BUSES["MSX_SLOT"]~=null) then MAME_DIR .. "src/devices/bus/msx_slot/disk.h", MAME_DIR .. "src/devices/bus/msx_slot/fs4600.cpp", MAME_DIR .. "src/devices/bus/msx_slot/fs4600.h", + MAME_DIR .. "src/devices/bus/msx_slot/fsa1fm.cpp", + MAME_DIR .. "src/devices/bus/msx_slot/fsa1fm.h", + MAME_DIR .. "src/devices/bus/msx_slot/msx_write.cpp", + MAME_DIR .. "src/devices/bus/msx_slot/msx_write.h", MAME_DIR .. "src/devices/bus/msx_slot/music.cpp", MAME_DIR .. "src/devices/bus/msx_slot/music.h", MAME_DIR .. "src/devices/bus/msx_slot/panasonic08.cpp", @@ -1819,6 +1827,8 @@ if (BUSES["MSX_SLOT"]~=null) then MAME_DIR .. "src/devices/bus/msx_slot/ram.h", MAME_DIR .. "src/devices/bus/msx_slot/ram_mm.cpp", MAME_DIR .. "src/devices/bus/msx_slot/ram_mm.h", + MAME_DIR .. "src/devices/bus/msx_slot/msx_rs232.cpp", + MAME_DIR .. "src/devices/bus/msx_slot/msx_rs232.h", MAME_DIR .. "src/devices/bus/msx_slot/slot.cpp", MAME_DIR .. "src/devices/bus/msx_slot/slot.h", MAME_DIR .. "src/devices/bus/msx_slot/sony08.cpp", @@ -1851,6 +1861,8 @@ if (BUSES["MSX_SLOT"]~=null) then MAME_DIR .. "src/devices/bus/msx_cart/holy_quran.h", MAME_DIR .. "src/devices/bus/msx_cart/ink.cpp", MAME_DIR .. "src/devices/bus/msx_cart/ink.h", + MAME_DIR .. "src/devices/bus/msx_cart/kanji.cpp", + MAME_DIR .. "src/devices/bus/msx_cart/kanji.h", MAME_DIR .. "src/devices/bus/msx_cart/konami.cpp", MAME_DIR .. "src/devices/bus/msx_cart/konami.h", MAME_DIR .. "src/devices/bus/msx_cart/korean.cpp", diff --git a/src/devices/bus/msx_cart/arc.cpp b/src/devices/bus/msx_cart/arc.cpp index 6f5af572bd1..45d31457690 100644 --- a/src/devices/bus/msx_cart/arc.cpp +++ b/src/devices/bus/msx_cart/arc.cpp @@ -14,50 +14,38 @@ msx_cart_arc_device::msx_cart_arc_device(const machine_config &mconfig, const ch { } - void msx_cart_arc_device::device_start() { + save_item(NAME(m_7f)); + // Install IO read/write handlers io_space().install_write_handler(0x7f, 0x7f, write8smo_delegate(*this, FUNC(msx_cart_arc_device::io_7f_w))); io_space().install_read_handler(0x7f, 0x7f, read8smo_delegate(*this, FUNC(msx_cart_arc_device::io_7f_r))); } - void msx_cart_arc_device::device_reset() { m_7f = 0; } - void msx_cart_arc_device::initialize_cartridge() { if (get_rom_size() != 0x8000) { fatalerror("arc: Invalid ROM size\n"); } -} - -uint8_t msx_cart_arc_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0xc000) - { - return get_rom_base()[offset - 0x4000]; - } - return 0xff; + page(1)->install_rom(0x4000, 0x7fff, get_rom_base()); + page(2)->install_rom(0x8000, 0xbfff, get_rom_base() + 0x4000); } - -void msx_cart_arc_device::io_7f_w(uint8_t data) +void msx_cart_arc_device::io_7f_w(u8 data) { if (data == 0x35) - { m_7f++; - } } - -uint8_t msx_cart_arc_device::io_7f_r() +u8 msx_cart_arc_device::io_7f_r() { return ((m_7f & 0x03) == 0x03) ? 0xda : 0xff; } diff --git a/src/devices/bus/msx_cart/arc.h b/src/devices/bus/msx_cart/arc.h index 69f4427a01f..a7a31a1e285 100644 --- a/src/devices/bus/msx_cart/arc.h +++ b/src/devices/bus/msx_cart/arc.h @@ -14,22 +14,20 @@ DECLARE_DEVICE_TYPE(MSX_CART_ARC, msx_cart_arc_device) class msx_cart_arc_device : public device_t, public msx_cart_interface { public: - msx_cart_arc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_arc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - virtual uint8_t read_cart(offs_t offset) override; - protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; private: - void io_7f_w(uint8_t data); - uint8_t io_7f_r(); + void io_7f_w(u8 data); + u8 io_7f_r(); - uint8_t m_7f; + u8 m_7f; }; #endif // MAME_BUS_MSX_CART_ARC_H diff --git a/src/devices/bus/msx_cart/ascii.cpp b/src/devices/bus/msx_cart/ascii.cpp index 7d1b354b404..f183afca6f1 100644 --- a/src/devices/bus/msx_cart/ascii.cpp +++ b/src/devices/bus/msx_cart/ascii.cpp @@ -8,266 +8,125 @@ DEFINE_DEVICE_TYPE(MSX_CART_ASCII8, msx_cart_ascii8_device, "msx_car DEFINE_DEVICE_TYPE(MSX_CART_ASCII16, msx_cart_ascii16_device, "msx_cart_ascii16", "MSX Cartridge - ASCII16") DEFINE_DEVICE_TYPE(MSX_CART_ASCII8_SRAM, msx_cart_ascii8_sram_device, "msx_cart_ascii8_sram", "MSX Cartridge - ASCII8 w/SRAM") DEFINE_DEVICE_TYPE(MSX_CART_ASCII16_SRAM, msx_cart_ascii16_sram_device, "msx_cart_ascii16_sram", "MSX Cartridge - ASCII16 w/SRAM") -DEFINE_DEVICE_TYPE(MSX_CART_MSXWRITE, msx_cart_msxwrite_device, "msx_cart_msxwrite", "MSX Cartridge - MSXWRITE") -msx_cart_ascii8_device::msx_cart_ascii8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_ascii8_device::msx_cart_ascii8_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_ASCII8, tag, owner, clock) , msx_cart_interface(mconfig, *this) + , m_rombank(*this, "rombank%u", 0U) , m_bank_mask(0) { - for (int i = 0; i < 4; i++) - { - m_selected_bank[i] = 0; - m_bank_base[i] = nullptr; - } -} - - -void msx_cart_ascii8_device::device_start() -{ - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_ascii8_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_ascii8_device::restore_banks() -{ - for (int i = 0; i < 4; i++) - { - m_bank_base[i] = get_rom_base() + (m_selected_bank[i] & m_bank_mask ) * 0x2000; - } } - void msx_cart_ascii8_device::device_reset() { - for (auto & elem : m_selected_bank) - { - elem = 0; - } + for (int i = 0; i < 4; i++) + m_rombank[i]->set_entry(0); } - void msx_cart_ascii8_device::initialize_cartridge() { - uint32_t size = get_rom_size(); + u32 size = get_rom_size(); + u16 banks = size / BANK_SIZE; - if ( size > 256 * 0x2000 ) - { - fatalerror("ascii8: ROM is too big\n"); - } - - uint16_t banks = size / 0x2000; - - if (size != banks * 0x2000 || (~(banks - 1) % banks)) + if (size > 256 * BANK_SIZE || size != banks * BANK_SIZE || (~(banks - 1) % banks)) { fatalerror("ascii8: Invalid ROM size\n"); } m_bank_mask = banks - 1; - restore_banks(); -} - + for (int i = 0; i < 4; i++) + m_rombank[i]->configure_entries(0, banks, get_rom_base(), BANK_SIZE); -uint8_t msx_cart_ascii8_device::read_cart(offs_t offset) -{ - if ( offset >= 0x4000 && offset < 0xC000 ) - { - return m_bank_base[(offset - 0x4000) >> 13][offset & 0x1fff]; - } - return 0xff; + page(1)->install_read_bank(0x4000, 0x5fff, m_rombank[0]); + page(1)->install_read_bank(0x6000, 0x7fff, m_rombank[1]); + page(1)->install_write_handler(0x6000, 0x67ff, write8smo_delegate(*this, FUNC(msx_cart_ascii8_device::bank_w<0>))); + page(1)->install_write_handler(0x6800, 0x6fff, write8smo_delegate(*this, FUNC(msx_cart_ascii8_device::bank_w<1>))); + page(1)->install_write_handler(0x7000, 0x77ff, write8smo_delegate(*this, FUNC(msx_cart_ascii8_device::bank_w<2>))); + page(1)->install_write_handler(0x7800, 0x7fff, write8smo_delegate(*this, FUNC(msx_cart_ascii8_device::bank_w<3>))); + page(2)->install_read_bank(0x8000, 0x9fff, m_rombank[2]); + page(2)->install_read_bank(0xa000, 0xbfff, m_rombank[3]); } - -void msx_cart_ascii8_device::write_cart(offs_t offset, uint8_t data) +template +void msx_cart_ascii8_device::bank_w(u8 data) { - if (offset >= 0x6000 && offset < 0x8000) - { - uint8_t bank = (offset / 0x800) & 0x03; - - m_selected_bank[bank] = data; - m_bank_base[bank] = get_rom_base() + (m_selected_bank[bank] & m_bank_mask ) * 0x2000; - } + m_rombank[Bank]->set_entry(data & m_bank_mask); } -msx_cart_ascii16_device::msx_cart_ascii16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_ascii16_device::msx_cart_ascii16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_ASCII16, tag, owner, clock) , msx_cart_interface(mconfig, *this) + , m_rombank(*this, "rombank%u", 0U) , m_bank_mask(0) { - for (int i = 0; i < 2; i++) - { - m_selected_bank[i] = 0; - m_bank_base[i] = nullptr; - } -} - - -void msx_cart_ascii16_device::device_start() -{ - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_ascii16_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_ascii16_device::restore_banks() -{ - for (int i = 0; i < 2; i++) - { - m_bank_base[i] = get_rom_base() + (m_selected_bank[i] & m_bank_mask) * 0x4000; - } } - void msx_cart_ascii16_device::device_reset() { - for (auto & elem : m_selected_bank) - { - elem = 0; - } + m_rombank[0]->set_entry(0); + m_rombank[1]->set_entry(0); } - void msx_cart_ascii16_device::initialize_cartridge() { - uint32_t size = get_rom_size(); - - if ( size > 256 * 0x4000 ) - { - fatalerror("ascii16: ROM is too big\n"); - } - - uint16_t banks = size / 0x4000; + u32 size = get_rom_size(); + u16 banks = size / BANK_SIZE; - if (size != banks * 0x4000 || (~(banks - 1) % banks)) + if (size > 256 * BANK_SIZE || size != banks * BANK_SIZE || (~(banks - 1) % banks)) { fatalerror("ascii16: Invalid ROM size\n"); } m_bank_mask = banks - 1; - restore_banks(); -} - + for (int i = 0; i < 2; i++) + m_rombank[i]->configure_entries(0, banks, get_rom_base(), BANK_SIZE); -uint8_t msx_cart_ascii16_device::read_cart(offs_t offset) -{ - if ( offset >= 0x4000 && offset < 0xC000 ) - { - return m_bank_base[offset >> 15][offset & 0x3fff]; - } - return 0xff; + page(1)->install_read_bank(0x4000, 0x7fff, m_rombank[0]); + page(1)->install_write_handler(0x6000, 0x67ff, write8smo_delegate(*this, FUNC(msx_cart_ascii16_device::bank_w<0>))); + page(1)->install_write_handler(0x7000, 0x77ff, write8smo_delegate(*this, FUNC(msx_cart_ascii16_device::bank_w<1>))); + page(2)->install_read_bank(0x8000, 0xbfff, m_rombank[1]); } - -void msx_cart_ascii16_device::write_cart(offs_t offset, uint8_t data) +template +void msx_cart_ascii16_device::bank_w(u8 data) { - if (offset >= 0x6000 && offset < 0x6800) - { - m_selected_bank[0] = data; - m_bank_base[0] = get_rom_base() + (m_selected_bank[0] & m_bank_mask) * 0x4000; - } - - if (offset >= 0x7000 && offset < 0x7800) - { - m_selected_bank[1] = data; - m_bank_base[1] = get_rom_base() + (m_selected_bank[1] & m_bank_mask) * 0x4000; - } + m_rombank[Bank]->set_entry(data & m_bank_mask); } -msx_cart_ascii8_sram_device::msx_cart_ascii8_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_ascii8_sram_device::msx_cart_ascii8_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_ASCII8_SRAM, tag, owner, clock) , msx_cart_interface(mconfig, *this) + , m_rombank(*this, "rombank%u", 0U) + , m_view2(*this, "view2") + , m_view3(*this, "view3") , m_bank_mask(0) , m_sram_select_mask(0) { - for (int i = 0; i < 4; i++) - { - m_selected_bank[i] = 0; - m_bank_base[i] = nullptr; - } -} - - -void msx_cart_ascii8_sram_device::device_start() -{ - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_ascii8_sram_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_ascii8_sram_device::setup_bank(uint8_t bank) -{ - if (m_selected_bank[bank] & ~(m_sram_select_mask | m_bank_mask)) - { - // Nothing is mapped - m_bank_base[bank] = nullptr; - } - else if (m_selected_bank[bank] & m_sram_select_mask) - { - // SRAM is selected - m_bank_base[bank] = get_sram_base(); - } - else - { - m_bank_base[bank] = get_rom_base() + (m_selected_bank[bank] & m_bank_mask ) * 0x2000; - } -} - - -void msx_cart_ascii8_sram_device::restore_banks() -{ - for (int i = 0; i < 4; i++) - { - setup_bank(i); - } } - void msx_cart_ascii8_sram_device::device_reset() { - for (auto & elem : m_selected_bank) - { - elem = 0; - } + for (int i = 0; i < 4; i++) + m_rombank[i]->set_entry(0); + m_view2.select(0); + m_view3.select(0); } - void msx_cart_ascii8_sram_device::initialize_cartridge() { - uint32_t size = get_rom_size(); + u32 size = get_rom_size(); + u16 banks = size / BANK_SIZE; - if ( size > 128 * 0x2000 ) - { - fatalerror("ascii8_sram: ROM is too big\n"); - } - - uint16_t banks = size / 0x2000; - - if (size != banks * 0x2000 || (~(banks - 1) % banks)) + if (size > 128 * BANK_SIZE || size != banks * BANK_SIZE || (~(banks - 1) % banks)) { fatalerror("ascii8_sram: Invalid ROM size\n"); } @@ -280,127 +139,74 @@ void msx_cart_ascii8_sram_device::initialize_cartridge() m_bank_mask = banks - 1; m_sram_select_mask = banks; - restore_banks(); -} - - -uint8_t msx_cart_ascii8_sram_device::read_cart(offs_t offset) -{ - if ( offset >= 0x4000 && offset < 0xC000 ) - { - uint8_t *bank_base = m_bank_base[(offset - 0x4000) >> 13]; + for (int i = 0; i < 4; i++) + m_rombank[i]->configure_entries(0, banks, get_rom_base(), BANK_SIZE); - if (bank_base != nullptr) - { - return bank_base[offset & 0x1fff]; - } - } - return 0xff; + page(1)->install_read_bank(0x4000, 0x5fff, m_rombank[0]); + page(1)->install_read_bank(0x6000, 0x7fff, m_rombank[1]); + page(1)->install_write_handler(0x6000, 0x7fff, write8sm_delegate(*this, FUNC(msx_cart_ascii8_sram_device::mapper_write))); + page(2)->install_view(0x8000, 0x9fff, m_view2); + m_view2[0].install_read_bank(0x8000, 0x9fff, m_rombank[2]); + m_view2[1].install_ram(0x8000, 0x9fff, get_sram_base()); + page(2)->install_view(0xa000, 0xbfff, m_view3); + m_view3[0].install_read_bank(0xa000, 0xbfff, m_rombank[3]); + m_view3[1].install_ram(0xa000, 0xbfff, get_sram_base()); } - -void msx_cart_ascii8_sram_device::write_cart(offs_t offset, uint8_t data) +void msx_cart_ascii8_sram_device::mapper_write(offs_t offset, u8 data) { - if (offset >= 0x6000 && offset < 0x8000) + u8 bank = (offset / 0x800) & 0x03; + if (data & m_sram_select_mask) { - uint8_t bank = (offset / 0x800) & 0x03; - - m_selected_bank[bank] = data; - setup_bank(bank); + if (bank == 2) + m_view2.select(1); + if (bank == 3) + m_view3.select(1); } - else if (offset >= 0x8000 && offset < 0xc000) + else { - uint8_t bank = (offset & 0x2000) ? 3 : 2; + if (bank == 2) + m_view2.select(0); + if (bank == 3) + m_view3.select(0); - if ((m_selected_bank[bank] & m_sram_select_mask) && !(m_selected_bank[bank] & ~(m_sram_select_mask | m_bank_mask))) - { - // Write to SRAM - m_bank_base[bank][offset & 0x1fff] = data; - } + m_rombank[bank]->set_entry(data & m_bank_mask); } } -msx_cart_ascii16_sram_device::msx_cart_ascii16_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + +msx_cart_ascii16_sram_device::msx_cart_ascii16_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_ASCII16_SRAM, tag, owner, clock) , msx_cart_interface(mconfig, *this) + , m_rombank(*this, "rombank%u", 0U) + , m_view(*this, "view") , m_bank_mask(0) , m_sram_select_mask(0) { - for (int i = 0; i < 2; i++) - { - m_selected_bank[i] = 0; - m_bank_base[i] = nullptr; - } } - void msx_cart_ascii16_sram_device::device_start() { - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_ascii16_sram_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_ascii16_sram_device::setup_bank(uint8_t bank) -{ - if (m_selected_bank[bank] & ~(m_sram_select_mask | m_bank_mask)) - { - // Nothing is mapped - m_bank_base[bank] = nullptr; - } - else if (m_selected_bank[bank] & m_sram_select_mask) - { - // SRAM is selected - m_bank_base[bank] = get_sram_base(); - } - else - { - m_bank_base[bank] = get_rom_base() + (m_selected_bank[bank] & m_bank_mask) * 0x4000; - } -} - - -void msx_cart_ascii16_sram_device::restore_banks() -{ - for (int i = 0; i < 2; i++) - { - setup_bank(i); - } } - void msx_cart_ascii16_sram_device::device_reset() { - for (auto & elem : m_selected_bank) - { - elem = 0; - } + m_rombank[0]->set_entry(0); + m_view.select(0); + m_rombank[1]->set_entry(0); } - void msx_cart_ascii16_sram_device::initialize_cartridge() { - uint32_t size = get_rom_size(); + u32 size = get_rom_size(); + u16 banks = size / BANK_SIZE; - if ( size > 128 * 0x4000 ) - { - fatalerror("ascii16_sram: ROM is too big\n"); - } - - uint16_t banks = size / 0x4000; - - if (size != banks * 0x4000 || (~(banks - 1) % banks)) + if (size > 128 * BANK_SIZE || size != banks * BANK_SIZE || (~(banks - 1) % banks)) { fatalerror("ascii16_sram: Invalid ROM size\n"); } - if (get_sram_size() != 0x800) { fatalerror("ascii16_sram: Unsupported SRAM size\n"); @@ -409,147 +215,31 @@ void msx_cart_ascii16_sram_device::initialize_cartridge() m_bank_mask = banks - 1; m_sram_select_mask = banks; - restore_banks(); -} - - -uint8_t msx_cart_ascii16_sram_device::read_cart(offs_t offset) -{ - if ( offset >= 0x4000 && offset < 0xC000 ) - { - uint8_t bank = offset >> 15; - - if (m_bank_base[bank] != nullptr) - { - if (m_selected_bank[bank] & m_sram_select_mask) - { - return m_bank_base[bank][offset & 0x7ff]; - } - else - { - return m_bank_base[bank][offset & 0x3fff]; - } - } - } - return 0xff; -} - - -void msx_cart_ascii16_sram_device::write_cart(offs_t offset, uint8_t data) -{ - if (offset >= 0x6000 && offset < 0x6800) - { - m_selected_bank[0] = data; - setup_bank(0); - } - - if (offset >= 0x7000 && offset < 0x7800) - { - m_selected_bank[1] = data; - setup_bank(1); - } - - if (offset >= 0x8000 && offset < 0xc000) - { - if ((m_selected_bank[1] & m_sram_select_mask) && !(m_selected_bank[1] & ~(m_sram_select_mask | m_bank_mask))) - { - // Write to SRAM - m_bank_base[1][offset & 0x7ff] = data; - } - } -} - - - -msx_cart_msxwrite_device::msx_cart_msxwrite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, MSX_CART_MSXWRITE, tag, owner, clock) - , msx_cart_interface(mconfig, *this) - , m_bank_mask(0) -{ for (int i = 0; i < 2; i++) - { - m_selected_bank[i] = 0; - m_bank_base[i] = nullptr; - } -} - + m_rombank[i]->configure_entries(0, banks, get_rom_base(), BANK_SIZE); -void msx_cart_msxwrite_device::device_start() -{ - save_item(NAME(m_selected_bank)); + page(1)->install_read_bank(0x4000, 0x7fff, m_rombank[0]); + page(1)->install_write_handler(0x6000, 0x67ff, write8smo_delegate(*this, FUNC(msx_cart_ascii16_sram_device::mapper_write_6000))); + page(1)->install_write_handler(0x7000, 0x77ff, write8smo_delegate(*this, FUNC(msx_cart_ascii16_sram_device::mapper_write_7000))); + page(2)->install_view(0x8000, 0xbfff, m_view); + m_view[0].install_read_bank(0x8000, 0xbfff, m_rombank[1]); + m_view[1].install_ram(0x8000, 0x87ff, 0x3800, get_sram_base()); } - -void msx_cart_msxwrite_device::device_post_load() +void msx_cart_ascii16_sram_device::mapper_write_6000(u8 data) { - restore_banks(); + m_rombank[0]->set_entry(data & m_bank_mask); } - -void msx_cart_msxwrite_device::restore_banks() +void msx_cart_ascii16_sram_device::mapper_write_7000(u8 data) { - for (int i = 0; i < 2; i++) + if (data & m_sram_select_mask) { - m_bank_base[i] = get_rom_base() + (m_selected_bank[i] & m_bank_mask) * 0x4000; + m_view.select(1); } -} - - -void msx_cart_msxwrite_device::device_reset() -{ - for (auto & elem : m_selected_bank) - { - elem = 0; - } -} - - -void msx_cart_msxwrite_device::initialize_cartridge() -{ - uint32_t size = get_rom_size(); - - if ( size > 256 * 0x4000 ) - { - fatalerror("msxwrite: ROM is too big\n"); - } - - uint16_t banks = size / 0x4000; - - if (size != banks * 0x4000 || (~(banks - 1) % banks)) - { - fatalerror("msxwrite: Invalid ROM size\n"); - } - - m_bank_mask = banks - 1; - - restore_banks(); -} - - -uint8_t msx_cart_msxwrite_device::read_cart(offs_t offset) -{ - if ( offset >= 0x4000 && offset < 0xC000 ) - { - return m_bank_base[offset >> 15][offset & 0x3fff]; - } - return 0xff; -} - - -void msx_cart_msxwrite_device::write_cart(offs_t offset, uint8_t data) -{ - // The rom writes to 6fff and 7fff for banking, unknown whether - // other locations also trigger banking. - switch (offset) + else { - case 0x6fff: - m_selected_bank[0] = data; - m_bank_base[0] = get_rom_base() + (m_selected_bank[0] & m_bank_mask) * 0x4000; - break; - - case 0x7fff: - m_selected_bank[1] = data; - m_bank_base[1] = get_rom_base() + (m_selected_bank[1] & m_bank_mask) * 0x4000; - break; + m_view.select(0); + m_rombank[1]->set_entry(data & m_bank_mask); } } diff --git a/src/devices/bus/msx_cart/ascii.h b/src/devices/bus/msx_cart/ascii.h index 0c5898fed40..9c41cac2789 100644 --- a/src/devices/bus/msx_cart/ascii.h +++ b/src/devices/bus/msx_cart/ascii.h @@ -12,84 +12,74 @@ DECLARE_DEVICE_TYPE(MSX_CART_ASCII8, msx_cart_ascii8_device) DECLARE_DEVICE_TYPE(MSX_CART_ASCII16, msx_cart_ascii16_device) DECLARE_DEVICE_TYPE(MSX_CART_ASCII8_SRAM, msx_cart_ascii8_sram_device) DECLARE_DEVICE_TYPE(MSX_CART_ASCII16_SRAM, msx_cart_ascii16_sram_device) -DECLARE_DEVICE_TYPE(MSX_CART_MSXWRITE, msx_cart_msxwrite_device) class msx_cart_ascii8_device : public device_t, public msx_cart_interface { public: - msx_cart_ascii8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_ascii8_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override; - - void restore_banks(); private: - uint8_t m_bank_mask; - uint8_t m_selected_bank[4]; - uint8_t *m_bank_base[4]; + static constexpr size_t BANK_SIZE = 0x2000; + + template void bank_w(u8 data); + + memory_bank_array_creator<4> m_rombank; + u8 m_bank_mask; }; class msx_cart_ascii16_device : public device_t, public msx_cart_interface { public: - msx_cart_ascii16_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_ascii16_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override; - - void restore_banks(); private: - uint8_t m_bank_mask; - uint8_t m_selected_bank[2]; - uint8_t *m_bank_base[2]; + static constexpr size_t BANK_SIZE = 0x4000; + + template void bank_w(u8 data); + + memory_bank_array_creator<2> m_rombank; + u8 m_bank_mask; }; class msx_cart_ascii8_sram_device : public device_t, public msx_cart_interface { public: - msx_cart_ascii8_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_ascii8_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override; - - void restore_banks(); private: - uint8_t m_bank_mask; - uint8_t m_selected_bank[4]; - uint8_t *m_bank_base[4]; - uint8_t m_sram_select_mask; + static constexpr size_t BANK_SIZE = 0x2000; + + void mapper_write(offs_t offset, u8 data); - void setup_bank(uint8_t bank); + memory_bank_array_creator<4> m_rombank; + memory_view m_view2; + memory_view m_view3; + u8 m_bank_mask; + u8 m_sram_select_mask; }; @@ -100,49 +90,22 @@ public: virtual void initialize_cartridge() override; - 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_reset() override; - virtual void device_post_load() override; - - void restore_banks(); private: - uint8_t m_bank_mask; - uint8_t m_selected_bank[2]; - uint8_t *m_bank_base[2]; - uint8_t m_sram_select_mask; + static constexpr size_t BANK_SIZE = 0x4000; - void setup_bank(uint8_t bank); -}; - - -class msx_cart_msxwrite_device : public device_t, public msx_cart_interface -{ -public: - msx_cart_msxwrite_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - - virtual void initialize_cartridge() override; - - virtual uint8_t read_cart(offs_t offset) override; - virtual void write_cart(offs_t offset, uint8_t data) override; + void mapper_write_6000(u8 data); + void mapper_write_7000(u8 data); -protected: - // device-level overrides - virtual void device_start() override; - virtual void device_reset() override; - virtual void device_post_load() override; - - void restore_banks(); - -private: - uint8_t m_bank_mask; - uint8_t m_selected_bank[2]; - uint8_t *m_bank_base[2]; + memory_bank_array_creator<2> m_rombank; + memory_view m_view; + u8 m_bank_mask; + u8 m_sram_select_mask; }; + #endif // MAME_BUS_MSX_CART_ASCII_H diff --git a/src/devices/bus/msx_cart/cartridge.cpp b/src/devices/bus/msx_cart/cartridge.cpp index 4bda712eabe..a764f61f03c 100644 --- a/src/devices/bus/msx_cart/cartridge.cpp +++ b/src/devices/bus/msx_cart/cartridge.cpp @@ -16,6 +16,7 @@ #include "hfox.h" #include "holy_quran.h" #include "ink.h" +#include "kanji.h" #include "konami.h" #include "korean.h" #include "majutsushi.h" @@ -33,44 +34,45 @@ void msx_cart(device_slot_interface &device) { - device.option_add_internal("nomapper", MSX_CART_NOMAPPER); - device.option_add_internal("msxdos2", MSX_CART_MSXDOS2); - device.option_add_internal("konami_scc", MSX_CART_KONAMI_SCC); - device.option_add_internal("konami", MSX_CART_KONAMI); + device.option_add_internal("arc", MSX_CART_ARC); device.option_add_internal("ascii8", MSX_CART_ASCII8); - device.option_add_internal("ascii16", MSX_CART_ASCII16); - device.option_add_internal("gamemaster2", MSX_CART_GAMEMASTER2); device.option_add_internal("ascii8_sram", MSX_CART_ASCII8_SRAM); + device.option_add_internal("ascii16", MSX_CART_ASCII16); device.option_add_internal("ascii16_sram", MSX_CART_ASCII16_SRAM); - device.option_add_internal("rtype", MSX_CART_RTYPE); - device.option_add_internal("majutsushi", MSX_CART_MAJUTSUSHI); + device.option_add_internal("cross_blaim", MSX_CART_CROSSBLAIM); + device.option_add_internal("disk_vy0010", MSX_CART_VY0010); + device.option_add_internal("disk_fsfd1", MSX_CART_FSFD1); + device.option_add_internal("disk_fsfd1a", MSX_CART_FSFD1A); + device.option_add_internal("disk_fscf351", MSX_CART_FSCF351); + device.option_add_internal("dooly", MSX_CART_DOOLY); + device.option_add_internal("easispeech", MSX_CART_EASISPEECH); device.option_add_internal("fmpac", MSX_CART_FMPAC); 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("gamemaster2", MSX_CART_GAMEMASTER2); + device.option_add_internal("halnote", MSX_CART_HALNOTE); + device.option_add_internal("hfox", MSX_CART_HFOX); + device.option_add_internal("holy_quran", MSX_CART_HOLY_QURAN); + device.option_add_internal("ink", MSX_CART_INK); + device.option_add_internal("kanji", MSX_CART_KANJI); + device.option_add_internal("keyboard_master", MSX_CART_KEYBOARD_MASTER); + device.option_add_internal("konami", MSX_CART_KONAMI); + device.option_add_internal("konami_scc", MSX_CART_KONAMI_SCC); device.option_add_internal("korean_80in1", MSX_CART_KOREAN_80IN1); device.option_add_internal("korean_90in1", MSX_CART_KOREAN_90IN1); device.option_add_internal("korean_126in1", MSX_CART_KOREAN_126IN1); + device.option_add_internal("majutsushi", MSX_CART_MAJUTSUSHI); + device.option_add_internal("msxaud_fsca1", MSX_CART_MSX_AUDIO_FSCA1); + device.option_add_internal("msxaud_hxmu900", MSX_CART_MSX_AUDIO_HXMU900); + device.option_add_internal("msxaud_nms1205", MSX_CART_MSX_AUDIO_NMS1205); + device.option_add_internal("msxdos2", MSX_CART_MSXDOS2); device.option_add_internal("msxwrite", MSX_CART_MSXWRITE); + device.option_add_internal("nomapper", MSX_CART_NOMAPPER); + device.option_add_internal("rtype", MSX_CART_RTYPE); device.option_add_internal("sound_snatcher", MSX_CART_SOUND_SNATCHER); device.option_add_internal("sound_sdsnatch", MSX_CART_SOUND_SDSNATCHER); - device.option_add_internal("msxaud_hxmu900", MSX_CART_MSX_AUDIO_HXMU900); - device.option_add_internal("msxaud_fsca1", MSX_CART_MSX_AUDIO_FSCA1); - device.option_add_internal("msxaud_nms1205", MSX_CART_MSX_AUDIO_NMS1205); device.option_add_internal("super_swangi", MSX_CART_SUPER_SWANGI); - device.option_add_internal("hfox", MSX_CART_HFOX); - device.option_add_internal("ink", MSX_CART_INK); - device.option_add_internal("keyboard_master", MSX_CART_KEYBOARD_MASTER); - device.option_add_internal("holy_quran", MSX_CART_HOLY_QURAN); - device.option_add_internal("dooly", MSX_CART_DOOLY); - device.option_add_internal("halnote", MSX_CART_HALNOTE); - device.option_add_internal("arc", MSX_CART_ARC); - device.option_add_internal("disk_vy0010", MSX_CART_VY0010); - device.option_add_internal("disk_fsfd1", MSX_CART_FSFD1); - device.option_add_internal("disk_fsfd1a", MSX_CART_FSFD1A); - device.option_add_internal("disk_fscf351", MSX_CART_FSCF351); + device.option_add_internal("superloderunner", MSX_CART_SUPERLODERUNNER); + device.option_add_internal("synthesizer", MSX_CART_SYNTHESIZER); device.option_add("bm_012", MSX_CART_BM_012); device.option_add("moonsound", MSX_CART_MOONSOUND); } @@ -80,32 +82,40 @@ msx_cart_interface::msx_cart_interface(const machine_config &mconfig, device_t & : device_interface(device, "msxcart") , m_exp(nullptr) { + for (int i = 0; i < 4; i++) + m_page[i] = nullptr; } -void msx_cart_interface::rom_alloc(uint32_t size) +void msx_cart_interface::rom_alloc(u32 size) { m_rom.resize(size); std::fill_n(m_rom.begin(), size, 0xff); } -void msx_cart_interface::rom_vlm5030_alloc(uint32_t size) +void msx_cart_interface::rom_vlm5030_alloc(u32 size) { m_rom_vlm5030.resize(size); std::fill_n(m_rom_vlm5030.begin(), size, 0xff); } -void msx_cart_interface::ram_alloc(uint32_t size) +void msx_cart_interface::ram_alloc(u32 size) { m_ram.resize(size); std::fill_n(m_ram.begin(), size, 0x00); } -void msx_cart_interface::sram_alloc(uint32_t size) +void msx_cart_interface::sram_alloc(u32 size) { m_sram.resize(size); std::fill_n(m_sram.begin(), size, 0x00); } +void msx_cart_interface::kanji_alloc(u32 size) +{ + m_kanji.resize(size); + std::fill_n(m_kanji.begin(), size, 0x00); +} + WRITE_LINE_MEMBER(msx_cart_interface::irq_out) { m_exp->irq_out(state); @@ -121,6 +131,19 @@ address_space &msx_cart_interface::io_space() const return m_exp->io_space(); } +cpu_device &msx_cart_interface::maincpu() const +{ + return m_exp->maincpu(); +} + +void msx_cart_interface::set_views(memory_view::memory_view_entry *page0, memory_view::memory_view_entry *page1, memory_view::memory_view_entry *page2, memory_view::memory_view_entry *page3) +{ + m_page[0] = page0; + m_page[1] = page1; + m_page[2] = page2; + m_page[3] = page3; +} + // Several yamaha machines had 60 pin expansion slots. The pinouts of these slots was // exactly the same as the regular 50 pin cartridge slots. The lowest 10 pins are simply diff --git a/src/devices/bus/msx_cart/cartridge.h b/src/devices/bus/msx_cart/cartridge.h index 73759baf544..ac0fb3edb22 100644 --- a/src/devices/bus/msx_cart/cartridge.h +++ b/src/devices/bus/msx_cart/cartridge.h @@ -23,37 +23,42 @@ public: virtual void initialize_cartridge() { } virtual void interface_pre_start() override { assert(m_exp != nullptr); } - // reading and writing - virtual uint8_t read_cart(offs_t offset) { return 0xff; } - virtual void write_cart(offs_t offset, uint8_t data) { } + void set_views(memory_view::memory_view_entry *page0, memory_view::memory_view_entry *page1, memory_view::memory_view_entry *page2, memory_view::memory_view_entry *page3); DECLARE_WRITE_LINE_MEMBER(irq_out); address_space &memory_space() const; address_space &io_space() const; + cpu_device &maincpu() const; // ROM/RAM/SRAM management // Mainly used by the cartridge slot when loading images - void rom_alloc(uint32_t size); - void ram_alloc(uint32_t size); - void rom_vlm5030_alloc(uint32_t size); - void sram_alloc(uint32_t size); - - uint8_t* get_rom_base() { return &m_rom[0]; } - uint8_t* get_rom_vlm5030_base() { return &m_rom_vlm5030[0]; } - uint8_t* get_ram_base() { return &m_ram[0]; } - uint8_t* get_sram_base() { return &m_sram[0]; } - uint32_t get_rom_size() { return m_rom.size(); } - uint32_t get_rom_vlm5030_size() { return m_rom_vlm5030.size(); } - uint32_t get_ram_size() { return m_ram.size(); } - uint32_t get_sram_size() { return m_sram.size(); } + void rom_alloc(u32 size); + void ram_alloc(u32 size); + void rom_vlm5030_alloc(u32 size); + void sram_alloc(u32 size); + void kanji_alloc(u32 size); + + u8* get_rom_base() { return &m_rom[0]; } + u8* get_rom_vlm5030_base() { return &m_rom_vlm5030[0]; } + u8* get_ram_base() { return &m_ram[0]; } + u8* get_sram_base() { return &m_sram[0]; } + u8* get_kanji_base() { return &m_kanji[0]; } + u32 get_rom_size() { return m_rom.size(); } + u32 get_rom_vlm5030_size() { return m_rom_vlm5030.size(); } + u32 get_ram_size() { return m_ram.size(); } + u32 get_sram_size() { return m_sram.size(); } + u32 get_kanji_size() { return m_kanji.size(); } + memory_view::memory_view_entry *page(int i) { return m_page[i]; } protected: msx_cart_interface(const machine_config &mconfig, device_t &device); - std::vector m_rom; - std::vector m_ram; - std::vector m_rom_vlm5030; - std::vector m_sram; + std::vector m_rom; + std::vector m_ram; + std::vector m_rom_vlm5030; + std::vector m_sram; + std::vector m_kanji; + memory_view::memory_view_entry *m_page[4]; private: msx_slot_cartridge_device *m_exp; diff --git a/src/devices/bus/msx_cart/crossblaim.cpp b/src/devices/bus/msx_cart/crossblaim.cpp index 6494e492f5b..1d30ec07f4f 100644 --- a/src/devices/bus/msx_cart/crossblaim.cpp +++ b/src/devices/bus/msx_cart/crossblaim.cpp @@ -9,48 +9,10 @@ DEFINE_DEVICE_TYPE(MSX_CART_CROSSBLAIM, msx_cart_crossblaim_device, "msx_cart_cr msx_cart_crossblaim_device::msx_cart_crossblaim_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MSX_CART_CROSSBLAIM, tag, owner, clock) , msx_cart_interface(mconfig, *this) - , m_selected_bank(1) + , m_rombank(*this, "rombank") { - for (auto & elem : m_bank_base) - { - elem = nullptr; - } -} - - -void msx_cart_crossblaim_device::device_start() -{ - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_crossblaim_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_crossblaim_device::setup_bank() -{ - m_bank_base[0] = ( m_selected_bank & 2 ) ? nullptr : get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000; - m_bank_base[2] = get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000; - m_bank_base[3] = ( m_selected_bank & 2 ) ? nullptr : get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000; -} - - -void msx_cart_crossblaim_device::restore_banks() -{ - m_bank_base[1] = get_rom_base(); - setup_bank(); -} - - -void msx_cart_crossblaim_device::device_reset() -{ - m_selected_bank = 1; } - void msx_cart_crossblaim_device::initialize_cartridge() { if (get_rom_size() != 0x10000) @@ -58,29 +20,18 @@ void msx_cart_crossblaim_device::initialize_cartridge() fatalerror("crossblaim: Invalid ROM size\n"); } - restore_banks(); -} - + m_rombank->configure_entries(0, 4, get_rom_base(), 0x4000); -uint8_t msx_cart_crossblaim_device::read_cart(offs_t offset) -{ - uint8_t *bank_base = m_bank_base[offset >> 14]; - - if (bank_base != nullptr) - { - return bank_base[offset & 0x3fff]; - } - - return 0xff; + page(1)->install_rom(0x4000, 0x7fff, get_rom_base()); + page(1)->install_write_handler(0x4045, 0x4045, write8smo_delegate(*this, FUNC(msx_cart_crossblaim_device::mapper_write))); + page(2)->install_read_bank(0x8000, 0xbfff, m_rombank); } - -void msx_cart_crossblaim_device::write_cart(offs_t offset, uint8_t data) +void msx_cart_crossblaim_device::mapper_write(u8 data) { - m_selected_bank = data & 3; - if (m_selected_bank == 0) - { - m_selected_bank = 1; - } - setup_bank(); + data &= 0x03; + if (!data) + data = 1; + + m_rombank->set_entry(data); } diff --git a/src/devices/bus/msx_cart/crossblaim.h b/src/devices/bus/msx_cart/crossblaim.h index 04a44c1d905..617ff59d1cd 100644 --- a/src/devices/bus/msx_cart/crossblaim.h +++ b/src/devices/bus/msx_cart/crossblaim.h @@ -18,22 +18,14 @@ public: virtual void initialize_cartridge() override; - 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_reset() override; - virtual void device_post_load() override; - - void restore_banks(); + virtual void device_start() override { } private: - uint8_t m_selected_bank; - uint8_t *m_bank_base[4]; + void mapper_write(u8 data); - void setup_bank(); + memory_bank_creator m_rombank; }; diff --git a/src/devices/bus/msx_cart/disk.cpp b/src/devices/bus/msx_cart/disk.cpp index b07d9dd6dc0..bff8716439f 100644 --- a/src/devices/bus/msx_cart/disk.cpp +++ b/src/devices/bus/msx_cart/disk.cpp @@ -102,6 +102,7 @@ #include "emu.h" #include "disk.h" +#include "formats/dmk_dsk.h" #include "formats/msx_dsk.h" #include "softlist_dev.h" @@ -115,6 +116,7 @@ void msx_cart_disk_device::floppy_formats(format_registration &fr) { fr.add_mfm_containers(); fr.add(FLOPPY_MSX_FORMAT); + fr.add(FLOPPY_DMK_FORMAT); } @@ -125,7 +127,7 @@ static void msx_floppies(device_slot_interface &device) } -msx_cart_disk_device::msx_cart_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_disk_device::msx_cart_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, type, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_floppy0(*this, "fdc:0") @@ -135,14 +137,14 @@ msx_cart_disk_device::msx_cart_disk_device(const machine_config &mconfig, device } -msx_cart_disk_wd_device::msx_cart_disk_wd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_disk_wd_device::msx_cart_disk_wd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : msx_cart_disk_device(mconfig, type, tag, owner, clock) , m_fdc(*this, "fdc") { } -msx_cart_disk_type1_device::msx_cart_disk_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_disk_type1_device::msx_cart_disk_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : msx_cart_disk_wd_device(mconfig, type, tag, owner, clock) , m_led(*this, "led0") , m_side_control(0) @@ -151,7 +153,7 @@ msx_cart_disk_type1_device::msx_cart_disk_type1_device(const machine_config &mco } -msx_cart_disk_type2_device::msx_cart_disk_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_disk_type2_device::msx_cart_disk_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : msx_cart_disk_wd_device(mconfig, type, tag, owner, clock) , m_led(*this, "led0") , m_control(0) @@ -159,32 +161,32 @@ msx_cart_disk_type2_device::msx_cart_disk_type2_device(const machine_config &mco } -msx_cart_vy0010_device::msx_cart_vy0010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_vy0010_device::msx_cart_vy0010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : msx_cart_disk_type1_device(mconfig, MSX_CART_VY0010, tag, owner, clock) { } -msx_cart_fsfd1_device::msx_cart_fsfd1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_fsfd1_device::msx_cart_fsfd1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : msx_cart_disk_type1_device(mconfig, MSX_CART_FSFD1, tag, owner, clock) { } -msx_cart_fscf351_device::msx_cart_fscf351_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_fscf351_device::msx_cart_fscf351_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : msx_cart_disk_type2_device(mconfig, MSX_CART_FSCF351, tag, owner, clock) { } -msx_cart_disk_tc8566_device::msx_cart_disk_tc8566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_disk_tc8566_device::msx_cart_disk_tc8566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : msx_cart_disk_device(mconfig, type, tag, owner, clock) , m_fdc(*this, "fdc") { } -msx_cart_fsfd1a_device::msx_cart_fsfd1a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_fsfd1a_device::msx_cart_fsfd1a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : msx_cart_disk_tc8566_device(mconfig, MSX_CART_FSFD1A, tag, owner, clock) { } @@ -192,7 +194,7 @@ msx_cart_fsfd1a_device::msx_cart_fsfd1a_device(const machine_config &mconfig, co void msx_cart_disk_device::initialize_cartridge() { - if ( get_rom_size() != 0x4000 ) + if (get_rom_size() != 0x4000) { fatalerror("msx_cart_disk_device: Invalid ROM size\n"); } @@ -219,6 +221,7 @@ void msx_cart_vy0010_device::device_add_mconfig(machine_config &config) SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop"); } + void msx_cart_fsfd1_device::device_add_mconfig(machine_config &config) { WD2793(config, m_fdc, 4_MHz_XTAL / 4); @@ -276,6 +279,41 @@ void msx_cart_disk_type1_device::device_start() save_item(NAME(m_control)); } +void msx_cart_disk_type1_device::initialize_cartridge() +{ + msx_cart_disk_wd_device::initialize_cartridge(); + + page(1)->install_rom(0x4000, 0x7fff, get_rom_base()); + page(1)->install_read_handler(0x7ff8, 0x7ff8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(1)->install_read_handler(0x7ff9, 0x7ff9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(1)->install_read_handler(0x7ffa, 0x7ffa, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(1)->install_read_handler(0x7ffb, 0x7ffb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(1)->install_read_handler(0x7ffc, 0x7ffc, read8smo_delegate(*this, FUNC(msx_cart_disk_type1_device::side_control_r))); + page(1)->install_read_handler(0x7ffd, 0x7ffd, read8smo_delegate(*this, FUNC(msx_cart_disk_type1_device::control_r))); + page(1)->install_read_handler(0x7fff, 0x7fff, read8smo_delegate(*this, FUNC(msx_cart_disk_type1_device::status_r))); + page(1)->install_write_handler(0x7ff8, 0x7ff8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(1)->install_write_handler(0x7ff9, 0x7ff9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(1)->install_write_handler(0x7ffa, 0x7ffa, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(1)->install_write_handler(0x7ffb, 0x7ffb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(1)->install_write_handler(0x7ffc, 0x7ffc, write8smo_delegate(*this, FUNC(msx_cart_disk_type1_device::set_side_control))); + page(1)->install_write_handler(0x7ffd, 0x7ffd, write8smo_delegate(*this, FUNC(msx_cart_disk_type1_device::set_control))); + + // TODO No idea why, but without this the other handlers do not get recognized + page(2)->install_rom(0xbff8,0xbff8, get_rom_base()); + page(2)->install_read_handler(0xbff8, 0xbff8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(2)->install_read_handler(0xbff9, 0xbff9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(2)->install_read_handler(0xbffa, 0xbffa, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(2)->install_read_handler(0xbffb, 0xbffb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(2)->install_read_handler(0xbffc, 0xbffc, read8smo_delegate(*this, FUNC(msx_cart_disk_type1_device::side_control_r))); + page(2)->install_read_handler(0xbffd, 0xbffd, read8smo_delegate(*this, FUNC(msx_cart_disk_type1_device::control_r))); + page(2)->install_read_handler(0xbfff, 0xbfff, read8smo_delegate(*this, FUNC(msx_cart_disk_type1_device::status_r))); + page(2)->install_write_handler(0xbff8, 0xbff8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(2)->install_write_handler(0xbff9, 0xbff9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(2)->install_write_handler(0xbffa, 0xbffa, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(2)->install_write_handler(0xbffb, 0xbffb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(2)->install_write_handler(0xbffc, 0xbffc, write8smo_delegate(*this, FUNC(msx_cart_disk_type1_device::set_side_control))); + page(2)->install_write_handler(0xbffd, 0xbffd, write8smo_delegate(*this, FUNC(msx_cart_disk_type1_device::set_control))); +} void msx_cart_disk_type1_device::device_post_load() { @@ -287,7 +325,6 @@ void msx_cart_disk_type1_device::device_post_load() set_control(data); } - void msx_cart_disk_type1_device::set_control(uint8_t data) { uint8_t old_m_control = m_control; @@ -324,7 +361,6 @@ void msx_cart_disk_type1_device::set_control(uint8_t data) } } - void msx_cart_disk_type1_device::set_side_control(uint8_t data) { m_side_control = data; @@ -335,95 +371,28 @@ void msx_cart_disk_type1_device::set_side_control(uint8_t data) } } - void msx_cart_disk_type1_device::device_reset() { m_fdc->dden_w(false); } - -uint8_t msx_cart_disk_type1_device::read_cart(offs_t offset) +u8 msx_cart_disk_type1_device::side_control_r() { - switch (offset) - { - case 0x7ff8: - case 0xbff8: - return m_fdc->status_r(); - - case 0x7ff9: - case 0xbff9: - return m_fdc->track_r(); - - case 0x7ffa: - case 0xbffa: - return m_fdc->sector_r(); - - case 0x7ffb: - case 0xbffb: - return m_fdc->data_r(); - - case 0x7ffc: - case 0xbffc: - return 0xfe | (m_side_control & 0x01); - - case 0x7ffd: - case 0xbffd: - return ( m_control & 0x83 ) | 0x78; - - case 0x7fff: - case 0xbfff: - return 0x3f | (m_fdc->intrq_r() ? 0 : 0x40) | (m_fdc->drq_r() ? 0 : 0x80); - } - - if (offset >= 0x4000 && offset < 0x8000) - { - return get_rom_base()[offset & 0x3fff]; - } - return 0xff; + return 0xfe | (m_side_control & 0x01); } - -void msx_cart_disk_type1_device::write_cart(offs_t offset, uint8_t data) +u8 msx_cart_disk_type1_device::control_r() { - switch (offset) - { - case 0x7ff8: - case 0xbff8: - m_fdc->cmd_w(data); - break; - - case 0x7ff9: - case 0xbff9: - m_fdc->track_w(data); - break; - - case 0x7ffa: - case 0xbffa: - m_fdc->sector_w(data); - break; - - case 0x7ffb: - case 0xbffb: - m_fdc->data_w(data); - break; - - case 0x7ffc: - case 0xbffc: - set_side_control(data); - break; - - case 0x7ffd: - case 0xbffd: - set_control(data); - break; + return ( m_control & 0x83 ) | 0x78; +} - default: - logerror("msx_cart_disk_type1_device::write_cart: Unmapped write writing %02x to %04x\n", data, offset); - break; - } +u8 msx_cart_disk_type1_device::status_r() +{ + return 0x3f | (m_fdc->intrq_r() ? 0 : 0x40) | (m_fdc->drq_r() ? 0 : 0x80); } + void msx_cart_disk_type2_device::device_start() { m_led.resolve(); @@ -431,13 +400,11 @@ void msx_cart_disk_type2_device::device_start() save_item(NAME(m_control)); } - void msx_cart_disk_type2_device::device_reset() { m_fdc->dden_w(false); } - void msx_cart_disk_type2_device::device_post_load() { uint8_t data = m_control; @@ -448,8 +415,37 @@ void msx_cart_disk_type2_device::device_post_load() set_control(data); } +void msx_cart_disk_type2_device::initialize_cartridge() +{ + msx_cart_disk_wd_device::initialize_cartridge(); + + page(1)->install_rom(0x4000, 0x7fff, get_rom_base()); + page(1)->install_read_handler(0x7fb8, 0x7fb8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(1)->install_read_handler(0x7fb9, 0x7fb9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(1)->install_read_handler(0x7fba, 0x7fba, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(1)->install_read_handler(0x7fbb, 0x7fbb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(1)->install_read_handler(0x7fbc, 0x7fbc, read8smo_delegate(*this, FUNC(msx_cart_disk_type2_device::status_r))); + page(1)->install_write_handler(0x7fb8, 0x7fb8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(1)->install_write_handler(0x7fb9, 0x7fb9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(1)->install_write_handler(0x7fba, 0x7fba, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(1)->install_write_handler(0x7fbb, 0x7fbb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(1)->install_write_handler(0x7fbc, 0x7fbc, write8smo_delegate(*this, FUNC(msx_cart_disk_type2_device::set_control))); -void msx_cart_disk_type2_device::set_control(uint8_t data) + // TODO No idea why, but without this the other handlers do not get recognized + page(2)->install_rom(0xbfb8,0xbfb8, get_rom_base()); + page(2)->install_read_handler(0xbfb8, 0xbfb8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(2)->install_read_handler(0xbfb9, 0xbfb9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(2)->install_read_handler(0xbfba, 0xbfba, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(2)->install_read_handler(0xbfbb, 0xbfbb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(2)->install_read_handler(0xbfbc, 0xbfbc, read8smo_delegate(*this, FUNC(msx_cart_disk_type2_device::status_r))); + page(2)->install_write_handler(0xbfb8, 0xbfb8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(2)->install_write_handler(0xbfb9, 0xbfb9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(2)->install_write_handler(0xbfba, 0xbfba, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(2)->install_write_handler(0xbfbb, 0xbfbb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(2)->install_write_handler(0xbfbc, 0xbfbc, write8smo_delegate(*this, FUNC(msx_cart_disk_type2_device::set_control))); +} + +void msx_cart_disk_type2_device::set_control(u8 data) { uint8_t old_m_control = m_control; @@ -484,73 +480,9 @@ void msx_cart_disk_type2_device::set_control(uint8_t data) } } - -uint8_t msx_cart_disk_type2_device::read_cart(offs_t offset) -{ - switch (offset) - { - case 0x7fb8: - case 0xbfb8: - return m_fdc->status_r(); - - case 0x7fb9: - case 0xbfb9: - return m_fdc->track_r(); - - case 0x7fba: - case 0xbfba: - return m_fdc->sector_r(); - - case 0x7fbb: - case 0xbfbb: - return m_fdc->data_r(); - - case 0x7fbc: - case 0xbfbc: - return 0x3f | (m_fdc->drq_r() ? 0 : 0x40) | (m_fdc->intrq_r() ? 0x80 : 0); - } - - if (offset >= 0x4000 && offset < 0x8000) - { - return get_rom_base()[offset & 0x3fff]; - } - return 0xff; -} - - -void msx_cart_disk_type2_device::write_cart(offs_t offset, uint8_t data) +u8 msx_cart_disk_type2_device::status_r() { - switch (offset) - { - case 0x7fb8: - case 0xbfb8: - m_fdc->cmd_w(data); - break; - - case 0x7fb9: - case 0xbfb9: - m_fdc->track_w(data); - break; - - case 0x7fba: - case 0xbfba: - m_fdc->sector_w(data); - break; - - case 0x7fbb: - case 0xbfbb: - m_fdc->data_w(data); - break; - - case 0x7fbc: - case 0xbfbc: - set_control(data); - break; - - default: - logerror("msx_cart_disk_type2_device::write_cart: Unmapped write writing %02x to %04x\n", data, offset); - break; - } + return 0x3f | (m_fdc->drq_r() ? 0 : 0x40) | (m_fdc->intrq_r() ? 0x80 : 0); } @@ -565,49 +497,21 @@ void msx_cart_fsfd1a_device::device_reset() { } - -uint8_t msx_cart_fsfd1a_device::read_cart(offs_t offset) -{ - switch (offset) - { - case 0x7ffa: - case 0xbffa: - return m_fdc->msr_r(); - - case 0x7ffb: - case 0xbffb: - return m_fdc->fifo_r(); - } - - if (offset >= 0x4000 && offset < 0x8000) - { - return get_rom_base()[offset & 0x3fff]; - } - return 0xff; -} - - -void msx_cart_fsfd1a_device::write_cart(offs_t offset, uint8_t data) +void msx_cart_fsfd1a_device::initialize_cartridge() { - switch (offset) - { - case 0x7ff8: - case 0xbff8: - m_fdc->dor_w(data); - break; - - case 0x7ff9: - case 0xbff9: - m_fdc->cr1_w(data); - break; + msx_cart_disk_tc8566_device::initialize_cartridge(); - case 0x7ffb: - case 0xbffb: - m_fdc->fifo_w(data); - break; - - default: - logerror("msx_cart_fsfd1a_device::write_cart: Unmapped write writing %02x to %04x\n", data, offset); - break; - } + page(1)->install_rom(0x4000, 0x7fff, get_rom_base()); + page(1)->install_read_handler(0x7ffa, 0x7ffa, read8smo_delegate(*m_fdc, FUNC(tc8566af_device::msr_r))); + page(1)->install_read_handler(0x7ffb, 0x7ffb, read8smo_delegate(*m_fdc, FUNC(tc8566af_device::fifo_r))); + page(1)->install_write_handler(0x7ff8, 0x7ff8, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::dor_w))); + page(1)->install_write_handler(0x7ff9, 0x7ff9, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::cr1_w))); + page(1)->install_write_handler(0x7ffb, 0x7ffb, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::fifo_w))); + // TODO No idea why, but without this the other handlers do not get recognized + page(2)->install_rom(0xbffa,0xbffa, get_rom_base()); + page(2)->install_read_handler(0xbffa, 0xbffa, read8smo_delegate(*m_fdc, FUNC(tc8566af_device::msr_r))); + page(2)->install_read_handler(0xbffb, 0xbffb, read8smo_delegate(*m_fdc, FUNC(tc8566af_device::fifo_r))); + page(2)->install_write_handler(0xbff8, 0xbff8, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::dor_w))); + page(2)->install_write_handler(0xbff9, 0xbff9, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::cr1_w))); + page(2)->install_write_handler(0xbffb, 0xbffb, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::fifo_w))); } diff --git a/src/devices/bus/msx_cart/disk.h b/src/devices/bus/msx_cart/disk.h index fd8d640157f..53407cfe0e7 100644 --- a/src/devices/bus/msx_cart/disk.h +++ b/src/devices/bus/msx_cart/disk.h @@ -23,7 +23,7 @@ public: virtual void initialize_cartridge() override; protected: - msx_cart_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); required_device m_floppy0; optional_device m_floppy1; @@ -36,7 +36,7 @@ protected: class msx_cart_disk_wd_device : public msx_cart_disk_device { protected: - msx_cart_disk_wd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_disk_wd_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); required_device m_fdc; }; @@ -45,51 +45,54 @@ protected: class msx_cart_disk_type1_device : public msx_cart_disk_wd_device { public: - virtual uint8_t read_cart(offs_t offset) override; - virtual void write_cart(offs_t offset, uint8_t data) override; + virtual void initialize_cartridge() override; protected: - msx_cart_disk_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_disk_type1_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); // device-level overrides virtual void device_start() override; virtual void device_reset() override; virtual void device_post_load() override; + u8 side_control_r(); + u8 control_r(); + u8 status_r(); + void set_side_control(u8 data); + void set_control(u8 data); + output_finder<> m_led; - uint8_t m_side_control; - uint8_t m_control; + u8 m_side_control; + u8 m_control; - void set_side_control(uint8_t data); - void set_control(uint8_t data); }; class msx_cart_disk_type2_device : public msx_cart_disk_wd_device { public: - virtual uint8_t read_cart(offs_t offset) override; - virtual void write_cart(offs_t offset, uint8_t data) override; + virtual void initialize_cartridge() override; protected: - msx_cart_disk_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_disk_type2_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); // device-level overrides virtual void device_start() override; virtual void device_reset() override; virtual void device_post_load() override; - output_finder<> m_led; - uint8_t m_control; + void set_control(u8 data); + u8 status_r(); - void set_control(uint8_t data); + output_finder<> m_led; + u8 m_control; }; class msx_cart_vy0010_device : public msx_cart_disk_type1_device { public: - msx_cart_vy0010_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_vy0010_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -99,7 +102,7 @@ protected: class msx_cart_fsfd1_device : public msx_cart_disk_type1_device { public: - msx_cart_fsfd1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_fsfd1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -109,7 +112,7 @@ protected: class msx_cart_fscf351_device : public msx_cart_disk_type2_device { public: - msx_cart_fscf351_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_fscf351_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); protected: virtual void device_add_mconfig(machine_config &config) override; @@ -119,7 +122,7 @@ protected: class msx_cart_disk_tc8566_device : public msx_cart_disk_device { protected: - msx_cart_disk_tc8566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_disk_tc8566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); required_device m_fdc; }; @@ -128,17 +131,15 @@ protected: class msx_cart_fsfd1a_device : public msx_cart_disk_tc8566_device { public: - msx_cart_fsfd1a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_fsfd1a_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + virtual void initialize_cartridge() override; protected: + // device-level overrides virtual void device_start() override; virtual void device_reset() override; - - // device-level overrides virtual void device_add_mconfig(machine_config &config) override; - - virtual uint8_t read_cart(offs_t offset) override; - virtual void write_cart(offs_t offset, uint8_t data) override; }; diff --git a/src/devices/bus/msx_cart/dooly.cpp b/src/devices/bus/msx_cart/dooly.cpp index a0c4c7b4f83..7bbc15253a5 100644 --- a/src/devices/bus/msx_cart/dooly.cpp +++ b/src/devices/bus/msx_cart/dooly.cpp @@ -10,58 +10,52 @@ DEFINE_DEVICE_TYPE(MSX_CART_DOOLY, msx_cart_dooly_device, "msx_cart_dooly", "MSX msx_cart_dooly_device::msx_cart_dooly_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MSX_CART_DOOLY, tag, owner, clock) , msx_cart_interface(mconfig, *this) - , m_prot(0) + , m_view1(*this, "view1") + , m_view2(*this, "view2") { } - -void msx_cart_dooly_device::device_start() -{ - save_item(NAME(m_prot)); -} - - void msx_cart_dooly_device::device_reset() { - m_prot = 0; + m_view1.select(0); + m_view2.select(0); } - void msx_cart_dooly_device::initialize_cartridge() { if (get_rom_size() != 0x8000) { fatalerror("dooly: Invalid ROM size\n"); } -} + page(1)->install_view(0x4000, 0x7fff, m_view1); + m_view1[0].install_rom(0x4000, 0x7fff, get_rom_base()); + m_view1[1].install_read_handler(0x4000, 0x7fff, read8sm_delegate(*this, FUNC(msx_cart_dooly_device::mode4_page1_r))); + page(2)->install_view(0x8000, 0xbfff, m_view2); + m_view2[0].install_rom(0x8000, 0xbfff, get_rom_base() + 0x4000); + m_view2[1].install_read_handler(0x8000, 0xbfff, read8sm_delegate(*this, FUNC(msx_cart_dooly_device::mode4_page2_r))); -uint8_t msx_cart_dooly_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0xc000) - { - uint8_t data = get_rom_base()[offset - 0x4000]; + page(1)->install_write_handler(0x4000, 0x7fff, write8smo_delegate(*this, FUNC(msx_cart_dooly_device::prot_w))); + page(2)->install_write_handler(0x8000, 0xbfff, write8smo_delegate(*this, FUNC(msx_cart_dooly_device::prot_w))); +} - switch (m_prot) - { - case 0x04: - data = bitswap<8>(data, 7, 6, 5, 4, 3, 1, 0, 2); - break; - } - return data; - } - return 0xff; +u8 msx_cart_dooly_device::mode4_page1_r(offs_t offset) +{ + return bitswap<8>(get_rom_base()[offset], 7, 6, 5, 4, 3, 1, 0, 2); } +u8 msx_cart_dooly_device::mode4_page2_r(offs_t offset) +{ + return bitswap<8>(get_rom_base()[0x4000 | offset], 7, 6, 5, 4, 3, 1, 0, 2); +} -void msx_cart_dooly_device::write_cart(offs_t offset, uint8_t data) +void msx_cart_dooly_device::prot_w(u8 data) { - if (offset >= 0x4000 && offset < 0xc000) + data &= 0x07; + m_view1.select(BIT(data, 2) ? 1 : 0); + m_view2.select(BIT(data, 2) ? 1 : 0); + if (data != 0 && data != 4) { - m_prot = data & 0x07; - if (m_prot != 0 && m_prot != 4) - { - logerror("msx_cart_dooly_device: unhandled write %02x to %04x\n", data, offset); - } + logerror("msx_cart_dooly_device: unhandled protection mode %02x\n", data); } } diff --git a/src/devices/bus/msx_cart/dooly.h b/src/devices/bus/msx_cart/dooly.h index 76f58ae762d..ceb4a29dc17 100644 --- a/src/devices/bus/msx_cart/dooly.h +++ b/src/devices/bus/msx_cart/dooly.h @@ -14,20 +14,22 @@ DECLARE_DEVICE_TYPE(MSX_CART_DOOLY, msx_cart_dooly_device) class msx_cart_dooly_device : public device_t, public msx_cart_interface { public: - msx_cart_dooly_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_dooly_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; private: - uint8_t m_prot; + void prot_w(u8 data); + u8 mode4_page1_r(offs_t offset); + u8 mode4_page2_r(offs_t offset); + + memory_view m_view1; + memory_view m_view2; }; diff --git a/src/devices/bus/msx_cart/easi_speech.cpp b/src/devices/bus/msx_cart/easi_speech.cpp index 0a9d2d5551d..381b26f06ff 100644 --- a/src/devices/bus/msx_cart/easi_speech.cpp +++ b/src/devices/bus/msx_cart/easi_speech.cpp @@ -17,21 +17,21 @@ a$=usr0("hello") 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) +msx_cart_easispeech_device::msx_cart_easispeech_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 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_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 ); + return ROM_NAME(msx_cart_easispeech); } void msx_cart_easispeech_device::device_add_mconfig(machine_config &config) @@ -40,22 +40,27 @@ void msx_cart_easispeech_device::device_add_mconfig(machine_config &config) m_speech->add_route(ALL_OUTPUTS, ":speaker", 1.00); } -uint8_t msx_cart_easispeech_device::read_cart(offs_t offset) +void msx_cart_easispeech_device::initialize_cartridge() { - // standard ROM - if (offset >= 0x4000 && offset < 0x8000) - return get_rom_base()[offset & 0x1fff]; + if (get_rom_size() != 0x2000) + { + fatalerror("easispeech: Invalid ROM size\n"); + } - // d7: SP0256 LRQ - if (offset == 0x8000) - return m_speech->lrq_r() << 7; + page(1)->install_rom(0x4000, 0x5fff, 0x2000, get_rom_base()); - return 0xff; + // Without this line the read and write handler don't get picked up?? + page(2)->install_rom(0x8000, 0x8000, get_rom_base()); + page(2)->install_read_handler(0x8000, 0x8000, read8smo_delegate(*this, FUNC(msx_cart_easispeech_device::speech_r))); + page(2)->install_write_handler(0x8000, 0x8000, write8smo_delegate(*this, FUNC(msx_cart_easispeech_device::speech_w))); } -void msx_cart_easispeech_device::write_cart(offs_t offset, uint8_t data) +u8 msx_cart_easispeech_device::speech_r() { - // d2-d7: SP0256 A - if (offset == 0x8000) - m_speech->ald_w(bitswap<6>(data,3,5,7,6,4,2)); + return m_speech->lrq_r() << 7; +} + +void msx_cart_easispeech_device::speech_w(u8 data) +{ + m_speech->ald_w(bitswap<6>(data,3,5,7,6,4,2)); } diff --git a/src/devices/bus/msx_cart/easi_speech.h b/src/devices/bus/msx_cart/easi_speech.h index 2aba350c4c7..9c40a2c85d4 100644 --- a/src/devices/bus/msx_cart/easi_speech.h +++ b/src/devices/bus/msx_cart/easi_speech.h @@ -15,18 +15,20 @@ 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); + msx_cart_easispeech_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - virtual uint8_t read_cart(offs_t offset) override; - virtual void write_cart(offs_t offset, uint8_t data) override; + virtual void initialize_cartridge() override; protected: // device-level overrides - virtual void device_start() override { ; } + 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: + u8 speech_r(); + void speech_w(u8 data); + required_device m_speech; }; diff --git a/src/devices/bus/msx_cart/fmpac.cpp b/src/devices/bus/msx_cart/fmpac.cpp index 75af22353dc..ab32020980f 100644 --- a/src/devices/bus/msx_cart/fmpac.cpp +++ b/src/devices/bus/msx_cart/fmpac.cpp @@ -14,17 +14,16 @@ with: PAC2 BACKUP DATA. We only store the raw sram contents. DEFINE_DEVICE_TYPE(MSX_CART_FMPAC, msx_cart_fmpac_device, "msx_cart_fmpac", "MSX Cartridge - FM-PAC") -msx_cart_fmpac_device::msx_cart_fmpac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_fmpac_device::msx_cart_fmpac_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_FMPAC, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_ym2413(*this, "ym2413") - , m_selected_bank(0) - , m_bank_base(nullptr) + , m_rombank(*this, "rombank") + , m_view(*this, "view") , m_sram_active(false) , m_opll_active(false) - , m_1ffe(0) - , m_1fff(0) - , m_7ff6(0) + , m_sram_unlock{0, 0} + , m_control(0) { } @@ -39,130 +38,87 @@ void msx_cart_fmpac_device::device_add_mconfig(machine_config &config) void msx_cart_fmpac_device::device_start() { - save_item(NAME(m_selected_bank)); save_item(NAME(m_sram_active)); save_item(NAME(m_opll_active)); - save_item(NAME(m_1ffe)); - save_item(NAME(m_1fff)); - save_item(NAME(m_7ff6)); + save_item(NAME(m_sram_unlock)); + save_item(NAME(m_control)); // Install IO read/write handlers io_space().install_write_handler(0x7c, 0x7d, write8sm_delegate(*this, FUNC(msx_cart_fmpac_device::write_ym2413))); } - -void msx_cart_fmpac_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_fmpac_device::restore_banks() -{ - m_bank_base = get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000; -} - - void msx_cart_fmpac_device::device_reset() { - m_selected_bank = 0; m_sram_active = false; m_opll_active = false; - m_1ffe = 0; - m_1fff = 0; - m_7ff6 = 0; -} + m_sram_unlock[0] = 0; + m_sram_unlock[1] = 0; + m_control = 0; + m_view.select(0); + m_rombank->set_entry(0); +} void msx_cart_fmpac_device::initialize_cartridge() { - if ( get_rom_size() != 0x10000 ) + if (get_rom_size() != 0x10000) { fatalerror("fmpac: Invalid ROM size\n"); } - - if ( get_sram_size() != 0x2000 ) + if (get_sram_size() != 0x2000) { fatalerror("fmpac: Invalid SRAM size\n"); } - restore_banks(); + m_rombank->configure_entries(0, 4, get_rom_base(), 0x4000); + + page(1)->install_view(0x4000, 0x7fff, m_view); + m_view[0].install_read_bank(0x4000, 0x7fff, m_rombank); + m_view[0].install_write_handler(0x5ffe, 0x5fff, write8sm_delegate(*this, FUNC(msx_cart_fmpac_device::sram_unlock))); + m_view[0].install_write_handler(0x7ff4, 0x7ff5, write8sm_delegate(*this, FUNC(msx_cart_fmpac_device::write_ym2413))); + m_view[0].install_read_handler(0x7ff6, 0x7ff6, read8smo_delegate(*this, FUNC(msx_cart_fmpac_device::control_r))); + m_view[0].install_write_handler(0x7ff6, 0x7ff6, write8smo_delegate(*this, FUNC(msx_cart_fmpac_device::control_w))); + m_view[0].install_read_handler(0x7ff7, 0x7ff7, read8smo_delegate(*this, FUNC(msx_cart_fmpac_device::bank_r))); + m_view[0].install_write_handler(0x7ff7, 0x7ff7, write8smo_delegate(*this, FUNC(msx_cart_fmpac_device::bank_w))); + + m_view[1].install_ram(0x4000, 0x5fff, get_sram_base()); + m_view[1].install_write_handler(0x5ffe, 0x5fff, write8sm_delegate(*this, FUNC(msx_cart_fmpac_device::sram_unlock))); + m_view[1].install_write_handler(0x7ff4, 0x7ff5, write8sm_delegate(*this, FUNC(msx_cart_fmpac_device::write_ym2413))); + m_view[1].install_read_handler(0x7ff6, 0x7ff6, read8smo_delegate(*this, FUNC(msx_cart_fmpac_device::control_r))); + m_view[1].install_write_handler(0x7ff6, 0x7ff6, write8smo_delegate(*this, FUNC(msx_cart_fmpac_device::control_w))); + m_view[1].install_read_handler(0x7ff7, 0x7ff7, read8smo_delegate(*this, FUNC(msx_cart_fmpac_device::bank_r))); + m_view[1].install_write_handler(0x7ff7, 0x7ff7, write8smo_delegate(*this, FUNC(msx_cart_fmpac_device::bank_w))); } - -uint8_t msx_cart_fmpac_device::read_cart(offs_t offset) +void msx_cart_fmpac_device::sram_unlock(offs_t offset, u8 data) { - if (offset >= 0x4000 && offset < 0x8000) - { - if (offset == 0x7ff6) - { - return m_7ff6; - } - if (offset == 0x7ff7) - { - return m_selected_bank & 0x03; - } - if (m_sram_active) - { - if (offset & 0x2000) - { - return 0xff; - } - return get_sram_base()[offset & 0x1fff]; - } - else - { - return m_bank_base[offset & 0x3fff]; - } - } - return 0xff; + m_sram_unlock[offset] = data; + m_sram_active = m_sram_unlock[0] == 0x4d && m_sram_unlock[1] == 0x69; + m_view.select(m_sram_active ? 1 : 0); } - -void msx_cart_fmpac_device::write_cart(offs_t offset, uint8_t data) +u8 msx_cart_fmpac_device::control_r() { - if (offset >= 0x4000 && offset < 0x6000) - { - if (m_sram_active) - { - get_sram_base()[offset & 0x1fff] = data; - } - if (offset == 0x5ffe) - { - m_1ffe = data; - } - if (offset == 0x5fff) - { - m_1fff = data; - } - m_sram_active = (m_1ffe == 0x4d) && (m_1fff == 0x69); - } + return m_control; +} - switch (offset) - { - case 0x7ff4: - case 0x7ff5: - if (m_opll_active) - { - m_ym2413->write(offset & 1, data); - } - break; - - case 0x7ff6: - m_7ff6 = data & 0x11; - m_opll_active = (m_7ff6 & 0x01); - break; - - case 0x7ff7: - m_selected_bank = data; - restore_banks(); - break; - } +void msx_cart_fmpac_device::control_w(u8 data) +{ + m_control = data & 0x11; + m_opll_active = BIT(data, 0); +} +u8 msx_cart_fmpac_device::bank_r() +{ + return m_rombank->entry(); } +void msx_cart_fmpac_device::bank_w(u8 data) +{ + m_rombank->set_entry(data); +} -void msx_cart_fmpac_device::write_ym2413(offs_t offset, uint8_t data) +void msx_cart_fmpac_device::write_ym2413(offs_t offset, u8 data) { if (m_opll_active) { diff --git a/src/devices/bus/msx_cart/fmpac.h b/src/devices/bus/msx_cart/fmpac.h index 9175849eaba..c12937c80a8 100644 --- a/src/devices/bus/msx_cart/fmpac.h +++ b/src/devices/bus/msx_cart/fmpac.h @@ -15,35 +15,33 @@ DECLARE_DEVICE_TYPE(MSX_CART_FMPAC, msx_cart_fmpac_device) class msx_cart_fmpac_device : public device_t, public msx_cart_interface { public: - msx_cart_fmpac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_fmpac_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - virtual uint8_t read_cart(offs_t offset) override; - virtual void write_cart(offs_t offset, uint8_t data) override; - protected: virtual void device_start() override; virtual void device_reset() override; - virtual void device_post_load() override; // device-level overrides virtual void device_add_mconfig(machine_config &config) override; - void restore_banks(); - private: - void write_ym2413(offs_t offset, uint8_t data); + void write_ym2413(offs_t offset, u8 data); + void sram_unlock(offs_t offset, u8 data); + u8 control_r(); + void control_w(u8 data); + u8 bank_r(); + void bank_w(u8 data); required_device m_ym2413; + memory_bank_creator m_rombank; + memory_view m_view; - uint8_t m_selected_bank; - uint8_t *m_bank_base; bool m_sram_active; bool m_opll_active; - uint8_t m_1ffe; - uint8_t m_1fff; - uint8_t m_7ff6; + u8 m_sram_unlock[2]; + u8 m_control; }; diff --git a/src/devices/bus/msx_cart/fs_sr022.cpp b/src/devices/bus/msx_cart/fs_sr022.cpp index bb84a759214..fd19f43547a 100644 --- a/src/devices/bus/msx_cart/fs_sr022.cpp +++ b/src/devices/bus/msx_cart/fs_sr022.cpp @@ -15,19 +15,16 @@ msx_cart_fs_sr022_device::msx_cart_fs_sr022_device(const machine_config &mconfig { } - void msx_cart_fs_sr022_device::device_start() { save_item(NAME(m_bunsetsu_address)); } - void msx_cart_fs_sr022_device::device_reset() { m_bunsetsu_address = 0; } - void msx_cart_fs_sr022_device::initialize_cartridge() { if (get_rom_size() != 0x40000) @@ -35,36 +32,34 @@ void msx_cart_fs_sr022_device::initialize_cartridge() fatalerror("fs_sr022: Invalid ROM size\n"); } m_bunsetsu_rom = get_rom_base() + 0x20000; -} + page(1)->install_rom(0x4000, 0x7fff, get_rom_base()); + page(2)->install_rom(0x8000, 0xbfff, get_rom_base() + 0x4000); + page(2)->install_read_handler(0xbfff, 0xbfff, read8smo_delegate(*this, FUNC(msx_cart_fs_sr022_device::buns_r))); + page(2)->install_write_handler(0xbffc, 0xbffe, write8sm_delegate(*this, FUNC(msx_cart_fs_sr022_device::buns_w))); +} -uint8_t msx_cart_fs_sr022_device::read_cart(offs_t offset) +u8 msx_cart_fs_sr022_device::buns_r() { - if (offset >= 0x4000 && offset < 0xc000) - { - if (offset == 0xbfff) { - return m_bunsetsu_rom[m_bunsetsu_address++ & 0x1ffff]; - } - - return get_rom_base()[offset - 0x4000]; - } - return 0xff; + u8 data = m_bunsetsu_rom[m_bunsetsu_address & 0x1ffff]; + if (!machine().side_effects_disabled()) + m_bunsetsu_address++; + return data; } - -void msx_cart_fs_sr022_device::write_cart(offs_t offset, uint8_t data) +void msx_cart_fs_sr022_device::buns_w(offs_t offset, uint8_t data) { switch (offset) { - case 0xbffc: + case 0: m_bunsetsu_address = (m_bunsetsu_address & 0xffff00) | data; break; - case 0xbffd: + case 1: m_bunsetsu_address = (m_bunsetsu_address & 0xff00ff) | (data << 8); break; - case 0xbffe: + case 2: m_bunsetsu_address = (m_bunsetsu_address & 0x00ffff) | (data << 16); break; } diff --git a/src/devices/bus/msx_cart/fs_sr022.h b/src/devices/bus/msx_cart/fs_sr022.h index 2456b90a101..677dd723e17 100644 --- a/src/devices/bus/msx_cart/fs_sr022.h +++ b/src/devices/bus/msx_cart/fs_sr022.h @@ -18,17 +18,17 @@ public: virtual void initialize_cartridge() override; - 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_reset() override; private: - const uint8_t *m_bunsetsu_rom; - uint32_t m_bunsetsu_address; + u8 buns_r(); + void buns_w(offs_t offset, u8 data); + + u8 *m_bunsetsu_rom; + u32 m_bunsetsu_address; }; diff --git a/src/devices/bus/msx_cart/halnote.cpp b/src/devices/bus/msx_cart/halnote.cpp index 43f7947ec2c..5bbed142a27 100644 --- a/src/devices/bus/msx_cart/halnote.cpp +++ b/src/devices/bus/msx_cart/halnote.cpp @@ -7,154 +7,92 @@ DEFINE_DEVICE_TYPE(MSX_CART_HALNOTE, msx_cart_halnote_device, "msx_cart_halnote", "MSX Cartridge - Halnote") -msx_cart_halnote_device::msx_cart_halnote_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_halnote_device::msx_cart_halnote_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_HALNOTE, tag, owner, clock) , msx_cart_interface(mconfig, *this) - , m_selected_bank{ 0, 0, 0, 0, 0, 0, 0, 0 } - , m_bank_base{ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr } + , m_rombank(*this, "rombank%u", 0U) + , m_view0(*this, "view0") + , m_view1(*this, "view1") { } - -void msx_cart_halnote_device::device_start() +void msx_cart_halnote_device::device_reset() { - save_item(NAME(m_selected_bank)); -} + for (int i = 0; i < 6; i++) + m_rombank[i]->set_entry(0); - -void msx_cart_halnote_device::device_post_load() -{ - restore_banks(); + m_view0.disable(); + m_view1.select(0); } - -void msx_cart_halnote_device::map_bank(int bank) +void msx_cart_halnote_device::initialize_cartridge() { - if (bank < 2) + if (get_rom_size() != 0x100000) { - return; + fatalerror("halnote: Invalid ROM size\n"); } - - // Special banks - if (bank == 6 || bank == 7) + if (get_sram_size() != 0x4000) { - m_bank_base[bank] = get_rom_base() + 0x80000 + (m_selected_bank[bank] * 0x800); - return; + fatalerror("halnote: Invalid SRAM size\n"); } - m_bank_base[bank] = get_rom_base() + ((m_selected_bank[bank] * 0x2000) & 0xFFFFF); - if (bank == 2) + for (int i = 0; i < 4; i++) { - if (m_selected_bank[bank] & 0x80) - { - m_bank_base[0] = get_sram_base(); - m_bank_base[1] = get_sram_base() + 0x2000; - } - else - { - m_bank_base[0] = nullptr; - m_bank_base[1] = nullptr; - } + m_rombank[i]->configure_entries(0, 0x80, get_rom_base(), 0x2000); } + m_rombank[4]->configure_entries(0, 0x100, get_rom_base() + 0x80000, 0x800); + m_rombank[5]->configure_entries(0, 0x100, get_rom_base() + 0x80000, 0x800); + + page(0)->install_view(0x0000, 0x3fff, m_view0); + m_view0[0]; + m_view0[1].install_ram(0x0000, 0x3fff, get_sram_base()); + page(1)->install_read_bank(0x4000, 0x5fff, m_rombank[0]); + page(1)->install_write_handler(0x4fff, 0x4fff, write8smo_delegate(*this, FUNC(msx_cart_halnote_device::bank0_w))); + page(1)->install_view(0x6000, 0x7fff, m_view1); + m_view1[0].install_read_bank(0x6000, 0x7fff, m_rombank[1]); + m_view1[0].install_write_handler(0x6fff, 0x6fff, write8smo_delegate(*this, FUNC(msx_cart_halnote_device::bank1_w))); + m_view1[0].install_write_handler(0x77ff, 0x77ff, write8smo_delegate(*this, FUNC(msx_cart_halnote_device::bank4_w))); + m_view1[0].install_write_handler(0x7fff, 0x7fff, write8smo_delegate(*this, FUNC(msx_cart_halnote_device::bank5_w))); + m_view1[1].install_read_bank(0x6000, 0x6fff, m_rombank[1]); + m_view1[1].install_write_handler(0x6fff, 0x6fff, write8smo_delegate(*this, FUNC(msx_cart_halnote_device::bank1_w))); + m_view1[1].install_read_bank(0x7000, 0x77ff, m_rombank[4]); + m_view1[1].install_write_handler(0x77ff, 0x77ff, write8smo_delegate(*this, FUNC(msx_cart_halnote_device::bank4_w))); + m_view1[1].install_read_bank(0x7800, 0x7fff, m_rombank[5]); + m_view1[1].install_write_handler(0x7fff, 0x7fff, write8smo_delegate(*this, FUNC(msx_cart_halnote_device::bank5_w))); + page(2)->install_read_bank(0x8000, 0x9fff, m_rombank[2]); + page(2)->install_write_handler(0x8fff, 0x8fff, write8smo_delegate(*this, FUNC(msx_cart_halnote_device::bank2_w))); + page(2)->install_read_bank(0xa000, 0xbfff, m_rombank[3]); + page(2)->install_write_handler(0xafff, 0xafff, write8smo_delegate(*this, FUNC(msx_cart_halnote_device::bank3_w))); } - -void msx_cart_halnote_device::restore_banks() +void msx_cart_halnote_device::bank0_w(u8 data) { - for (int i = 0; i < 8; i++) - { - map_bank(i); - } + m_rombank[0]->set_entry(data & 0x7f); + m_view0.select(BIT(data, 7) ? 1 : 0); } - -void msx_cart_halnote_device::device_reset() +void msx_cart_halnote_device::bank1_w(u8 data) { - for (auto & elem : m_selected_bank) - { - elem = 0; - } + m_rombank[1]->set_entry(data & 0x7f); } - -void msx_cart_halnote_device::initialize_cartridge() +void msx_cart_halnote_device::bank2_w(u8 data) { - if (get_rom_size() != 0x100000) - { - fatalerror("halnote: Invalid ROM size\n"); - } - - restore_banks(); + m_rombank[2]->set_entry(data & 0x7f); } - -uint8_t msx_cart_halnote_device::read_cart(offs_t offset) +void msx_cart_halnote_device::bank3_w(u8 data) { - if (offset >= 0xc000) - { - return 0xFF; - } - - if ((offset & 0xf000) == 0x7000 && (m_selected_bank[3] & 0x80)) - { - return m_bank_base[6 + ((offset >> 11) & 0x01)][offset & 0x7ff]; - } - - const uint8_t *mem = m_bank_base[offset >> 13]; - - if (mem) - { - return mem[offset & 0x1fff]; - } - return 0xff; + m_rombank[3]->set_entry(data & 0x7f); + m_view1.select(BIT(data, 7) ? 1 : 0); } - -void msx_cart_halnote_device::write_cart(offs_t offset, uint8_t data) +void msx_cart_halnote_device::bank4_w(u8 data) { - if (offset < 0x4000) - { - if (m_bank_base[0] != nullptr) - { - m_sram[offset & 0x3fff] = data; - return; - } - } - - switch (offset) - { - case 0x4FFF: - m_selected_bank[2] = data; - map_bank(2); - break; - - case 0x6FFF: // 6000-7FFF - m_selected_bank[3] = data; - map_bank(3); - break; - - case 0x77FF: - m_selected_bank[6] = data; - map_bank(6); - break; - - case 0x7FFF: - m_selected_bank[7] = data; - map_bank(7); - break; - - case 0x8FFF: - m_selected_bank[4] = data; - map_bank(4); - break; - - case 0xAFFF: - m_selected_bank[5] = data; - map_bank(5); - break; + m_rombank[4]->set_entry(data); +} - default: - logerror("msx_cart_halnote_device: Unhandled write %02x to %04x\n", data, offset); - break; - } +void msx_cart_halnote_device::bank5_w(u8 data) +{ + m_rombank[5]->set_entry(data); } diff --git a/src/devices/bus/msx_cart/halnote.h b/src/devices/bus/msx_cart/halnote.h index a9c1972afeb..eaaef27e7a5 100644 --- a/src/devices/bus/msx_cart/halnote.h +++ b/src/devices/bus/msx_cart/halnote.h @@ -14,26 +14,28 @@ DECLARE_DEVICE_TYPE(MSX_CART_HALNOTE, msx_cart_halnote_device) class msx_cart_halnote_device : public device_t, public msx_cart_interface { public: - msx_cart_halnote_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_halnote_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override; - - void restore_banks(); private: - uint8_t m_selected_bank[8]; - uint8_t *m_bank_base[8]; - - void map_bank(int bank); + static constexpr u8 BANK_MASK = (0x100000 / 0x2000) - 1; + + void bank0_w(u8 data); + void bank1_w(u8 data); + void bank2_w(u8 data); + void bank3_w(u8 data); + void bank4_w(u8 data); + void bank5_w(u8 data); + + memory_bank_array_creator<6> m_rombank; + memory_view m_view0; + memory_view m_view1; }; diff --git a/src/devices/bus/msx_cart/hfox.cpp b/src/devices/bus/msx_cart/hfox.cpp index 007155b6e5b..5945e399e35 100644 --- a/src/devices/bus/msx_cart/hfox.cpp +++ b/src/devices/bus/msx_cart/hfox.cpp @@ -7,77 +7,42 @@ DEFINE_DEVICE_TYPE(MSX_CART_HFOX, msx_cart_hfox_device, "msx_cart_hfox", "MSX Cartridge - Hurry Fox") -msx_cart_hfox_device::msx_cart_hfox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_hfox_device::msx_cart_hfox_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_HFOX, tag, owner, clock) , msx_cart_interface(mconfig, *this) - , m_selected_bank{ 0, 0 } - , m_bank_base{ nullptr, nullptr } + , m_rombank(*this, "rombank%u", 0U) { } - -void msx_cart_hfox_device::device_start() -{ - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_hfox_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_hfox_device::restore_banks() -{ - m_bank_base[0] = get_rom_base() + ((m_selected_bank[0] & 0x01) * 0x8000); - m_bank_base[1] = get_rom_base() + ((m_selected_bank[1] & 0x01) * 0x8000) + 0x4000; -} - - void msx_cart_hfox_device::device_reset() { - m_selected_bank[0] = m_selected_bank[1] = 0; + m_rombank[0]->set_entry(0); + m_rombank[1]->set_entry(0); } - void msx_cart_hfox_device::initialize_cartridge() { - if (get_rom_size() < 0x10000) + u32 size = get_rom_size(); + u16 banks = size / 0x8000; + + if (size > 256 * 0x8000 || size < 0x10000 || size != banks * 0x8000 || (~(banks - 1) % banks)) { fatalerror("hfox: Invalid ROM size\n"); } - restore_banks(); -} + m_bank_mask = banks - 1; + m_rombank[0]->configure_entries(0, 4, get_rom_base(), 0x8000); + m_rombank[1]->configure_entries(0, 4, get_rom_base() + 0x4000, 0x8000); -uint8_t msx_cart_hfox_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0xc000) - { - return m_bank_base[offset >> 15][offset & 0x3fff]; - } - return 0xff; + page(1)->install_read_bank(0x4000, 0x7fff, m_rombank[0]); + page(1)->install_write_handler(0x6000, 0x6000, write8smo_delegate(*this, FUNC(msx_cart_hfox_device::bank_w<0>))); + page(1)->install_write_handler(0x7000, 0x7000, write8smo_delegate(*this, FUNC(msx_cart_hfox_device::bank_w<1>))); + page(2)->install_read_bank(0x8000, 0xbfff, m_rombank[1]); } - -void msx_cart_hfox_device::write_cart(offs_t offset, uint8_t data) +template +void msx_cart_hfox_device::bank_w(u8 data) { - switch (offset) - { - case 0x6000: - m_selected_bank[0] = data; - restore_banks(); - break; - - case 0x7000: - m_selected_bank[1] = data; - restore_banks(); - break; - - default: - logerror("msx_cart_hfox_device: unhandled write %02x to %04x\n", data, offset); - break; - } + m_rombank[Bank]->set_entry(data & m_bank_mask); } diff --git a/src/devices/bus/msx_cart/hfox.h b/src/devices/bus/msx_cart/hfox.h index 6254bae3610..eda1562bf04 100644 --- a/src/devices/bus/msx_cart/hfox.h +++ b/src/devices/bus/msx_cart/hfox.h @@ -3,6 +3,8 @@ #ifndef MAME_BUS_MSX_CART_HFOX_H #define MAME_BUS_MSX_CART_HFOX_H +#pragma once + #include "bus/msx_cart/cartridge.h" @@ -16,20 +18,17 @@ public: virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override; - - void restore_banks(); private: - uint8_t m_selected_bank[2]; - uint8_t *m_bank_base[2]; + template void bank_w(u8 data); + + memory_bank_array_creator<2> m_rombank; + + u8 m_bank_mask; }; diff --git a/src/devices/bus/msx_cart/holy_quran.cpp b/src/devices/bus/msx_cart/holy_quran.cpp index fbfb799fad5..cc87db1b435 100644 --- a/src/devices/bus/msx_cart/holy_quran.cpp +++ b/src/devices/bus/msx_cart/holy_quran.cpp @@ -16,85 +16,91 @@ GCMK-16X PCB, 2 ROM chips, Yamaha XE297A0 mapper chip. DEFINE_DEVICE_TYPE(MSX_CART_HOLY_QURAN, msx_cart_holy_quran_device, "msx_cart_holy_quran", "MSX Cartridge - Holy Quran") -msx_cart_holy_quran_device::msx_cart_holy_quran_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_holy_quran_device::msx_cart_holy_quran_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_HOLY_QURAN, tag, owner, clock) , msx_cart_interface(mconfig, *this) + , m_rombank(*this, "rombank%u", 0U) + , m_view1(*this, "view1") + , m_view2(*this, "view2") { } -void msx_cart_holy_quran_device::device_start() -{ - // zerofill - m_decrypt = false; - std::fill_n(&m_selected_bank[0], 4, 0); - std::fill_n(&m_bank_base[0], 4, nullptr); - - // register for savestates - save_item(NAME(m_selected_bank)); - save_item(NAME(m_decrypt)); - - // protection uses a simple rotation on databus, some lines inverted - for (int i = 0; i < 0x100; i++) - m_lookup_prot[i] = bitswap<8>(i,6,2,4,0,1,5,7,3) ^ 0x4d; -} - void msx_cart_holy_quran_device::initialize_cartridge() { - if (get_rom_size() != 0x100000) + u32 size = get_rom_size(); + u16 banks = size / BANK_SIZE; + + if (size > 256 * BANK_SIZE || size < 0x10000 || size != banks * BANK_SIZE || (~(banks - 1) % banks)) { fatalerror("holy_quran: Invalid ROM size\n"); } - restore_banks(); -} + m_bank_mask = banks - 1; -void msx_cart_holy_quran_device::device_reset() -{ - m_decrypt = false; + m_decrypted.resize(size); + + u8 lookup_prot[256]; + // protection uses a simple rotation on databus, some lines inverted + for (int i = 0; i < 0x100; i++) + lookup_prot[i] = bitswap<8>(i,6,2,4,0,1,5,7,3) ^ 0x4d; + + for (u32 i = 0; i < size; i++) + m_decrypted[i] = lookup_prot[m_rom[i]]; - std::fill_n(&m_selected_bank[0], 4, 0); - restore_banks(); + for (int i = 0; i < 4; i++) + m_rombank[i]->configure_entries(0, banks, m_decrypted.data(), BANK_SIZE); + + page(1)->install_view(0x4000, 0x7fff, m_view1); + m_view1[0].install_read_handler(0x4000, 0x7fff, read8sm_delegate(*this, FUNC(msx_cart_holy_quran_device::read))); + m_view1[1].install_read_bank(0x4000, 0x5fff, m_rombank[0]); + m_view1[1].install_read_bank(0x6000, 0x7fff, m_rombank[1]); + m_view1[1].install_write_handler(0x5000, 0x5000, write8smo_delegate(*this, FUNC(msx_cart_holy_quran_device::bank_w<0>))); + m_view1[1].install_write_handler(0x5400, 0x5400, write8smo_delegate(*this, FUNC(msx_cart_holy_quran_device::bank_w<1>))); + m_view1[1].install_write_handler(0x5800, 0x5800, write8smo_delegate(*this, FUNC(msx_cart_holy_quran_device::bank_w<2>))); + m_view1[1].install_write_handler(0x5c00, 0x5c00, write8smo_delegate(*this, FUNC(msx_cart_holy_quran_device::bank_w<3>))); + + page(2)->install_view(0x8000, 0xbfff, m_view2); + m_view2[0].install_read_handler(0x8000, 0xbfff, read8sm_delegate(*this, FUNC(msx_cart_holy_quran_device::read2))); + m_view2[1].install_read_bank(0x8000, 0x9fff, m_rombank[2]); + m_view2[1].install_read_bank(0xa000, 0xbfff, m_rombank[3]); } -void msx_cart_holy_quran_device::restore_banks() +void msx_cart_holy_quran_device::device_reset() { + m_view1.select(0); + m_view2.select(0); for (int i = 0; i < 4; i++) - m_bank_base[i] = get_rom_base() + (m_selected_bank[i] & 0x7f) * 0x2000; + m_rombank[i]->set_entry(0); } - -// mapper interface - -uint8_t msx_cart_holy_quran_device::read_cart(offs_t offset) +u8 msx_cart_holy_quran_device::read(offs_t offset) { - if (offset >= 0x4000 && offset < 0xc000) + u8 data = m_rom[offset]; + // The decryption should actually start working after the first M1 cycle executing something from the cartridge. + if (offset + 0x4000 == ((m_rom[3] << 8) | m_rom[2]) && !machine().side_effects_disabled()) { - uint8_t data = m_bank_base[(offset - 0x4000) >> 13][offset & 0x1fff]; - - if (m_decrypt) - return m_lookup_prot[data]; - - // The decryption should actually start working after the first M1 cycle executing something from the cartridge. - if (offset == ((m_rom[3] << 8) | m_rom[2]) && !machine().side_effects_disabled()) - m_decrypt = true; - - return data; + // Switch to decrypted contents + m_view1.select(1); + m_view2.select(1); } - - return 0xff; + return data; } -void msx_cart_holy_quran_device::write_cart(offs_t offset, uint8_t data) +u8 msx_cart_holy_quran_device::read2(offs_t offset) { - switch (offset) + u8 data = m_rom[offset + 0x4000]; + // The decryption should actually start working after the first M1 cycle executing something from the cartridge. + if (offset + 0x8000 == ((m_rom[3] << 8) | m_rom[2]) && !machine().side_effects_disabled()) { - case 0x5000: case 0x5400: case 0x5800: case 0x5c00: - m_selected_bank[offset >> 10 & 3] = data; - restore_banks(); - break; - - default: - logerror("msx_cart_holy_quran_device: unhandled write %02x to %04x\n", data, offset); - break; + // Switch to decrypted contents + m_view1.select(1); + m_view2.select(1); } + return data; +} + +template +void msx_cart_holy_quran_device::bank_w(u8 data) +{ + m_rombank[Bank]->set_entry(data & m_bank_mask); } diff --git a/src/devices/bus/msx_cart/holy_quran.h b/src/devices/bus/msx_cart/holy_quran.h index 25b1ddf8f50..0e8d73afbef 100644 --- a/src/devices/bus/msx_cart/holy_quran.h +++ b/src/devices/bus/msx_cart/holy_quran.h @@ -14,26 +14,28 @@ DECLARE_DEVICE_TYPE(MSX_CART_HOLY_QURAN, msx_cart_holy_quran_device) class msx_cart_holy_quran_device : public device_t, public msx_cart_interface { public: - msx_cart_holy_quran_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_holy_quran_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override { restore_banks(); } - - void restore_banks(); private: - uint8_t m_lookup_prot[256]; - uint8_t m_selected_bank[4]; - uint8_t *m_bank_base[4]; - bool m_decrypt; + static constexpr size_t BANK_SIZE = 0x2000; + + u8 read(offs_t offset); + u8 read2(offs_t offset); + template void bank_w(u8 data); + + memory_bank_array_creator<4> m_rombank; + memory_view m_view1; + memory_view m_view2; + + std::vector m_decrypted; + u8 m_bank_mask; }; diff --git a/src/devices/bus/msx_cart/ink.cpp b/src/devices/bus/msx_cart/ink.cpp index e3053a5da7d..abf48b37154 100644 --- a/src/devices/bus/msx_cart/ink.cpp +++ b/src/devices/bus/msx_cart/ink.cpp @@ -22,13 +22,13 @@ msx_cart_ink_device::msx_cart_ink_device(const machine_config &mconfig, const ch { } -ROM_START( msx_cart_ink ) +ROM_START(msx_cart_ink) ROM_REGION(0x80000, "flash", ROMREGION_ERASEFF) ROM_END const tiny_rom_entry *msx_cart_ink_device::device_rom_region() const { - return ROM_NAME( msx_cart_ink ); + return ROM_NAME(msx_cart_ink); } void msx_cart_ink_device::device_add_mconfig(machine_config &config) @@ -38,18 +38,24 @@ void msx_cart_ink_device::device_add_mconfig(machine_config &config) void msx_cart_ink_device::initialize_cartridge() { - size_t size = get_rom_size() > 0x80000 ? 0x80000 : get_rom_size(); - memcpy(memregion("flash")->base(), get_rom_base(), size); + size_t size = std::min(0x80000, get_rom_size()); + + u8 *flash = memregion("flash")->base(); + memcpy(flash, get_rom_base(), size); + + page(0)->install_rom(0x0000, 0x3fff, flash); + page(1)->install_rom(0x4000, 0x7fff, flash + 0x4000); + page(2)->install_rom(0x8000, 0xbfff, flash + 0x8000); + page(3)->install_rom(0xc000, 0xffff, flash + 0xc000); + page(0)->install_write_handler(0x0000, 0x3fff, write8sm_delegate(*this, FUNC(msx_cart_ink_device::write_page<0>))); + page(1)->install_write_handler(0x4000, 0x7fff, write8sm_delegate(*this, FUNC(msx_cart_ink_device::write_page<1>))); + page(2)->install_write_handler(0x8000, 0xbfff, write8sm_delegate(*this, FUNC(msx_cart_ink_device::write_page<2>))); + page(3)->install_write_handler(0xc000, 0xffff, write8sm_delegate(*this, FUNC(msx_cart_ink_device::write_page<3>))); } - -uint8_t msx_cart_ink_device::read_cart(offs_t offset) -{ - return m_flash->read(offset); -} - -void msx_cart_ink_device::write_cart(offs_t offset, uint8_t data) +template +void msx_cart_ink_device::write_page(offs_t offset, u8 data) { // /RD connects to flashrom A16-A18 - m_flash->write(offset | 0x70000, data); + m_flash->write(offset | 0x70000 | (Page * 0x4000), data); } diff --git a/src/devices/bus/msx_cart/ink.h b/src/devices/bus/msx_cart/ink.h index 933385c575d..eb857dd147d 100644 --- a/src/devices/bus/msx_cart/ink.h +++ b/src/devices/bus/msx_cart/ink.h @@ -19,17 +19,16 @@ public: virtual void initialize_cartridge() override; - 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_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_flash; + + template void write_page(offs_t offset, u8 data); }; diff --git a/src/devices/bus/msx_cart/kanji.cpp b/src/devices/bus/msx_cart/kanji.cpp new file mode 100644 index 00000000000..215121d7559 --- /dev/null +++ b/src/devices/bus/msx_cart/kanji.cpp @@ -0,0 +1,147 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +/********************************************************************************** + +TODO: +- Verify real contents of the kanji roms. The current dumps seem to have + been read from inside a running MSX machine. The content retrieved that + way may not be how they are stored in the rom. + +**********************************************************************************/ + +#include "emu.h" +#include "kanji.h" + +#include "speaker.h" + + +#define VERBOSE 0 +#include "logmacro.h" + + +DEFINE_DEVICE_TYPE(MSX_CART_KANJI, msx_cart_kanji_device, "msx_cart_kanji", "MSX Cartridge - Kanji") +DEFINE_DEVICE_TYPE(MSX_CART_MSXWRITE, msx_cart_msxwrite_device, "msx_cart_msxwrite", "MSX Cartridge - MSXWRITE") + + +msx_cart_kanji_device::msx_cart_kanji_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_cart_kanji_device(mconfig, MSX_CART_KANJI, tag, owner, clock) +{ +} + +msx_cart_kanji_device::msx_cart_kanji_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, type, tag, owner, clock) + , msx_cart_interface(mconfig, *this) + , m_kanji_mask(0) + , m_kanji_address(0) +{ +} + +void msx_cart_kanji_device::device_reset() +{ + m_kanji_address = 0; +} + +void msx_cart_kanji_device::device_start() +{ + save_item(NAME(m_kanji_address)); +} + +void msx_cart_kanji_device::initialize_cartridge() +{ + u32 size = get_kanji_size(); + + if (size != 0x20000) + { + fatalerror("kanji: Invalid ROM size\n"); + } + + m_kanji_mask = size - 1; + + // Install IO read/write handlers + io_space().install_write_handler(0xd8, 0xd9, write8sm_delegate(*this, FUNC(msx_cart_kanji_device::kanji_w))); + io_space().install_read_handler(0xd9, 0xd9, read8sm_delegate(*this, FUNC(msx_cart_kanji_device::kanji_r))); +} + +u8 msx_cart_kanji_device::kanji_r(offs_t offset) +{ + u8 result = get_kanji_base()[m_kanji_address]; + + if (!machine().side_effects_disabled()) + { + m_kanji_address = (m_kanji_address & ~0x1f) | ((m_kanji_address + 1) & 0x1f); + } + return result; +} + +void msx_cart_kanji_device::kanji_w(offs_t offset, u8 data) +{ + if (offset) + m_kanji_address = (m_kanji_address & 0x007e0) | ((data & 0x3f) << 11); + else + m_kanji_address = (m_kanji_address & 0x1f800) | ((data & 0x3f) << 5); + + m_kanji_address = m_kanji_address & m_kanji_mask; +} + + + +static INPUT_PORTS_START(msxwrite_kanji_enable_switch) + PORT_START("KANJI") + PORT_CONFNAME(0x01, 0x01, "Kanji is") + PORT_CONFSETTING(0x00, "disabled") + PORT_CONFSETTING(0x01, "enabled") +INPUT_PORTS_END + + +msx_cart_msxwrite_device::msx_cart_msxwrite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_cart_kanji_device(mconfig, MSX_CART_MSXWRITE, tag, owner, clock) + , m_rombank(*this, "rombank%u", 0U) + , m_kanji_switch(*this, "KANJI") + , m_bank_mask(0) +{ +} + +ioport_constructor msx_cart_msxwrite_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(msxwrite_kanji_enable_switch); +} + +void msx_cart_msxwrite_device::device_reset() +{ + msx_cart_kanji_device::device_reset(); + + m_rombank[0]->set_entry(0); + m_rombank[1]->set_entry(0); + + if (BIT(m_kanji_switch->read(), 0)) + msx_cart_kanji_device::initialize_cartridge(); +} + +void msx_cart_msxwrite_device::initialize_cartridge() +{ + u32 size = get_rom_size(); + u16 banks = size / BANK_SIZE; + + if (size > 256 * BANK_SIZE || size != banks * BANK_SIZE || (~(banks - 1) % banks)) + { + fatalerror("msxwrite: Invalid ROM size\n"); + } + + m_bank_mask = banks - 1; + + for (int i = 0; i < 2; i++) + m_rombank[i]->configure_entries(0, banks, get_rom_base(), BANK_SIZE); + + page(1)->install_read_bank(0x4000, 0x7fff, m_rombank[0]); + // The rom writes to 6fff and 7fff for banking, unknown whether + // other locations also trigger banking. + page(1)->install_write_handler(0x6fff, 0x6fff, write8smo_delegate(*this, FUNC(msx_cart_msxwrite_device::bank_w<0>))); + page(1)->install_write_handler(0x7fff, 0x7fff, write8smo_delegate(*this, FUNC(msx_cart_msxwrite_device::bank_w<1>))); + page(2)->install_read_bank(0x8000, 0xbfff, m_rombank[1]); +} + +template +void msx_cart_msxwrite_device::bank_w(u8 data) +{ + m_rombank[Bank]->set_entry(data & m_bank_mask); +} diff --git a/src/devices/bus/msx_cart/kanji.h b/src/devices/bus/msx_cart/kanji.h new file mode 100644 index 00000000000..ed420750056 --- /dev/null +++ b/src/devices/bus/msx_cart/kanji.h @@ -0,0 +1,59 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +#ifndef MAME_BUS_MSX_CART_KANJI_H +#define MAME_BUS_MSX_CART_KANJI_H + +#pragma once + +#include "bus/msx_cart/cartridge.h" + + +DECLARE_DEVICE_TYPE(MSX_CART_KANJI, msx_cart_kanji_device) +DECLARE_DEVICE_TYPE(MSX_CART_MSXWRITE, msx_cart_msxwrite_device) + + +class msx_cart_kanji_device : public device_t, public msx_cart_interface +{ +public: + msx_cart_kanji_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + virtual void initialize_cartridge() override; + +protected: + msx_cart_kanji_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + + u8 kanji_r(offs_t offset); + void kanji_w(offs_t offset, u8 data); + + u32 m_kanji_mask; + u32 m_kanji_address; +}; + + +class msx_cart_msxwrite_device : public msx_cart_kanji_device +{ +public: + msx_cart_msxwrite_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + virtual void initialize_cartridge() override; + +protected: + // device-level overrides + virtual void device_reset() override; + virtual ioport_constructor device_input_ports() const override; + +private: + static constexpr size_t BANK_SIZE = 0x4000; + + template void bank_w(u8 data); + + memory_bank_array_creator<2> m_rombank; + required_ioport m_kanji_switch; + u8 m_bank_mask; +}; + +#endif // MAME_BUS_MSX_CART_KANJI_H diff --git a/src/devices/bus/msx_cart/konami.cpp b/src/devices/bus/msx_cart/konami.cpp index 5954cb95091..d9774e138e2 100644 --- a/src/devices/bus/msx_cart/konami.cpp +++ b/src/devices/bus/msx_cart/konami.cpp @@ -15,112 +15,53 @@ DEFINE_DEVICE_TYPE(MSX_CART_SOUND_SDSNATCHER, msx_cart_konami_sound_sdsnatcher_d DEFINE_DEVICE_TYPE(MSX_CART_KEYBOARD_MASTER, msx_cart_keyboard_master_device, "msx_cart_keyboard_master", "MSX Cartridge - Keyboard Master") -msx_cart_konami_device::msx_cart_konami_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_konami_device::msx_cart_konami_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_KONAMI, tag, owner, clock) , msx_cart_interface(mconfig, *this) + , m_rombank(*this, "rombank%u", 0U) , m_bank_mask(0) { - for (int i = 0; i < 4; i++) - { - m_selected_bank[i] = i; - } - for (auto & elem : m_bank_base) - { - elem = nullptr; - } -} - - -void msx_cart_konami_device::device_start() -{ - save_item(NAME(m_selected_bank)); } - -void msx_cart_konami_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_konami_device::restore_banks() -{ - m_bank_base[0] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; - m_bank_base[1] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; - m_bank_base[2] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; - m_bank_base[3] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; - m_bank_base[4] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; - m_bank_base[5] = get_rom_base() + ( m_selected_bank[3] & m_bank_mask ) * 0x2000; - m_bank_base[6] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; - m_bank_base[7] = get_rom_base() + ( m_selected_bank[3] & m_bank_mask ) * 0x2000; -} - - void msx_cart_konami_device::device_reset() { for (int i = 0; i < 4; i++) - { - m_selected_bank[i] = i; - } + m_rombank[i]->set_entry(i); } - void msx_cart_konami_device::initialize_cartridge() { - uint32_t size = get_rom_size(); + u32 size = get_rom_size(); + u16 banks = size / 0x2000; - if ( get_rom_size() > 256 * 0x2000 ) - { - fatalerror("konami: ROM is too big\n"); - } - - uint16_t banks = size / 0x2000; - - if (size != banks * 0x2000 || (~(banks - 1) % banks)) + if (size > 256 * 0x2000 || size < 4 * 0x2000 || size != banks * 0x2000 || (~(banks - 1) % banks)) { fatalerror("konami: Invalid ROM size\n"); } m_bank_mask = banks - 1; - restore_banks(); -} - + for (int i = 0; i < 4; i++) + m_rombank[i]->configure_entries(0, banks, get_rom_base(), 0x2000); -uint8_t msx_cart_konami_device::read_cart(offs_t offset) -{ - return m_bank_base[offset >> 13][offset & 0x1fff]; + page(0)->install_read_bank(0x0000, 0x1fff, m_rombank[0]); + page(0)->install_read_bank(0x2000, 0x3fff, m_rombank[1]); + page(1)->install_read_bank(0x4000, 0x5fff, m_rombank[0]); + page(1)->install_write_handler(0x4000, 0x47ff, 0, 0x1000, 0, write8smo_delegate(*this, FUNC(msx_cart_konami_device::bank_w<0>))); + page(1)->install_read_bank(0x6000, 0x7fff, m_rombank[1]); + page(1)->install_write_handler(0x6000, 0x67ff, 0, 0x1000, 0, write8smo_delegate(*this, FUNC(msx_cart_konami_device::bank_w<1>))); + page(2)->install_read_bank(0x8000, 0x9fff, m_rombank[2]); + page(2)->install_write_handler(0x8000, 0x87ff, 0, 0x1000, 0, write8smo_delegate(*this, FUNC(msx_cart_konami_device::bank_w<2>))); + page(2)->install_read_bank(0xa000, 0xbfff, m_rombank[3]); + page(2)->install_write_handler(0xa000, 0xa7ff, 0, 0x1000, 0, write8smo_delegate(*this, FUNC(msx_cart_konami_device::bank_w<3>))); + page(3)->install_read_bank(0xc000, 0xdfff, m_rombank[2]); + page(3)->install_read_bank(0xe000, 0xffff, m_rombank[3]); } - -void msx_cart_konami_device::write_cart(offs_t offset, uint8_t data) +template +void msx_cart_konami_device::bank_w(u8 data) { - switch (offset & 0xe000) - { - case 0x4000: - m_selected_bank[0] = data; - m_bank_base[0] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; - m_bank_base[2] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; - break; - - case 0x6000: - m_selected_bank[1] = data; - m_bank_base[1] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; - m_bank_base[3] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; - break; - - case 0x8000: - m_selected_bank[2] = data; - m_bank_base[4] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; - m_bank_base[6] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; - break; - - case 0xa000: - m_selected_bank[3] = data; - m_bank_base[5] = get_rom_base() + ( m_selected_bank[3] & m_bank_mask ) * 0x2000; - m_bank_base[7] = get_rom_base() + ( m_selected_bank[3] & m_bank_mask ) * 0x2000; - break; - } + m_rombank[Bank]->set_entry(data & m_bank_mask); } @@ -130,20 +71,12 @@ msx_cart_konami_scc_device::msx_cart_konami_scc_device(const machine_config &mco : device_t(mconfig, MSX_CART_KONAMI_SCC, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_k051649(*this, "k051649") + , m_rombank(*this, "rombank%u", 0U) + , m_scc_view(*this, "scc_view") , m_bank_mask(0) - , m_scc_active(false) { - for (int i = 0; i < 4; i++) - { - m_selected_bank[i] = i; - } - for (auto & elem : m_bank_base) - { - elem = nullptr; - } } - void msx_cart_konami_scc_device::device_add_mconfig(machine_config &config) { // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. @@ -151,147 +84,61 @@ void msx_cart_konami_scc_device::device_add_mconfig(machine_config &config) K051649(config, m_k051649, XTAL(10'738'635)/3).add_route(ALL_OUTPUTS, "mono", 0.15); } - -void msx_cart_konami_scc_device::device_start() -{ - save_item(NAME(m_selected_bank)); - save_item(NAME(m_scc_active)); -} - - -void msx_cart_konami_scc_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_konami_scc_device::restore_banks() -{ - m_bank_base[0] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; - m_bank_base[1] = get_rom_base() + ( m_selected_bank[3] & m_bank_mask ) * 0x2000; - m_bank_base[2] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; - m_bank_base[3] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; - m_bank_base[4] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; - m_bank_base[5] = get_rom_base() + ( m_selected_bank[3] & m_bank_mask ) * 0x2000; - m_bank_base[6] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; - m_bank_base[7] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; -} - - void msx_cart_konami_scc_device::device_reset() { + m_scc_view.select(0); for (int i = 0; i < 4; i++) - { - m_selected_bank[i] = i; - } - m_scc_active = false; + m_rombank[i]->set_entry(i); } - void msx_cart_konami_scc_device::initialize_cartridge() { - uint32_t size = get_rom_size(); + u32 size = get_rom_size(); + u16 banks = size / 0x2000; - if ( get_rom_size() > 256 * 0x2000 ) - { - fatalerror("konami_scc: ROM is too big\n"); - } - - uint16_t banks = size / 0x2000; - - if (size != banks * 0x2000 || (~(banks - 1) % banks)) + if (size > 256 * 0x2000 || size < 0x8000 || size != banks * 0x2000 || (~(banks - 1) % banks)) { fatalerror("konami_scc: Invalid ROM size\n"); } m_bank_mask = banks - 1; - restore_banks(); -} - - -uint8_t msx_cart_konami_scc_device::read_cart(offs_t offset) -{ - if ( m_scc_active && offset >= 0x9800 && offset < 0xa000 ) - { - if (offset & 0x80) - { - if ((offset & 0xff) >= 0xe0) - { - return m_k051649->k051649_test_r(); - } - return 0xff; - } - else - { - return m_k051649->k051649_waveform_r(offset & 0x7f); - } - } + for (int i = 0; i < 4; i++) + m_rombank[i]->configure_entries(0, banks, get_rom_base(), 0x2000); - return m_bank_base[offset >> 13][offset & 0x1fff]; + page(0)->install_read_bank(0x0000, 0x1fff, m_rombank[2]); + page(0)->install_read_bank(0x2000, 0x3fff, m_rombank[3]); + page(1)->install_read_bank(0x4000, 0x5fff, m_rombank[0]); + page(1)->install_write_handler(0x5000, 0x57ff, write8smo_delegate(*this, FUNC(msx_cart_konami_scc_device::bank_w<0>))); + page(1)->install_read_bank(0x6000, 0x7fff, m_rombank[1]); + page(1)->install_write_handler(0x7000, 0x77ff, write8smo_delegate(*this, FUNC(msx_cart_konami_scc_device::bank_w<1>))); + page(2)->install_view(0x8000, 0x9fff, m_scc_view); + m_scc_view[0].install_read_bank(0x8000, 0x9fff, m_rombank[2]); + m_scc_view[0].install_write_handler(0x9000, 0x97ff, write8smo_delegate(*this, FUNC(msx_cart_konami_scc_device::bank_w<2>))); + m_scc_view[1].install_read_bank(0x8000, 0x9fff, m_rombank[2]); + m_scc_view[1].install_write_handler(0x9000, 0x97ff, write8smo_delegate(*this, FUNC(msx_cart_konami_scc_device::bank_w<2>))); + m_scc_view[1].install_read_handler(0x9800, 0x987f, 0, 0x0700, 0, read8sm_delegate(m_k051649, FUNC(k051649_device::k051649_waveform_r))); + m_scc_view[1].install_write_handler(0x9800, 0x987f, 0, 0x0700, 0, write8sm_delegate(m_k051649, FUNC(k051649_device::k051649_waveform_w))); + m_scc_view[1].install_write_handler(0x9880, 0x9889, 0, 0x0710, 0, write8sm_delegate(m_k051649, FUNC(k051649_device::k051649_frequency_w))); + m_scc_view[1].install_write_handler(0x988a, 0x988e, 0, 0x0710, 0, write8sm_delegate(m_k051649, FUNC(k051649_device::k051649_volume_w))); + m_scc_view[1].install_write_handler(0x988f, 0x988f, 0, 0x0710, 0, write8smo_delegate(m_k051649, FUNC(k051649_device::k051649_keyonoff_w))); + m_scc_view[1].install_read_handler(0x98c0, 0x98c0, 0, 0x071f, 0, read8smo_delegate(m_k051649, FUNC(k051649_device::k051649_test_r))); + m_scc_view[1].install_write_handler(0x98c0, 0x98c0, 0, 0x071f, 0, write8smo_delegate(m_k051649, FUNC(k051649_device::k051649_test_w))); + page(2)->install_read_bank(0x8000, 0x9fff, m_rombank[2]); + page(2)->install_write_handler(0x9000, 0x97ff, write8smo_delegate(*this, FUNC(msx_cart_konami_scc_device::bank_w<2>))); + page(2)->install_read_bank(0xa000, 0xbfff, m_rombank[3]); + page(2)->install_write_handler(0xb000, 0xb7ff, write8smo_delegate(*this, FUNC(msx_cart_konami_scc_device::bank_w<3>))); + page(3)->install_read_bank(0xc000, 0xdfff, m_rombank[0]); + page(3)->install_read_bank(0xe000, 0xffff, m_rombank[1]); } - -void msx_cart_konami_scc_device::write_cart(offs_t offset, uint8_t data) +template +void msx_cart_konami_scc_device::bank_w(u8 data) { - switch (offset & 0xf800) + m_rombank[Bank]->set_entry(data & m_bank_mask); + if (Bank == 2) { - case 0x5000: - m_selected_bank[0] = data; - m_bank_base[2] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; - m_bank_base[6] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; - break; - - case 0x7000: - m_selected_bank[1] = data; - m_bank_base[3] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; - m_bank_base[7] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; - break; - - case 0x9000: - m_selected_bank[2] = data; - m_scc_active = ( ( data & 0x3f ) == 0x3f ); - m_bank_base[0] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; - m_bank_base[4] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; - break; - - case 0x9800: - if ( m_scc_active ) - { - offset &= 0xff; - - if (offset < 0x80) - { - m_k051649->k051649_waveform_w(offset, data); - } - else if (offset < 0xa0) - { - offset &= 0x0f; - if (offset < 0x0a) - { - m_k051649->k051649_frequency_w(offset, data); - } - else if (offset < 0x0f) - { - m_k051649->k051649_volume_w(offset - 0xa, data); - } - else - { - m_k051649->k051649_keyonoff_w(data); - } - } - else if (offset >= 0xe0) - { - m_k051649->k051649_test_w(data); - } - } - break; - - case 0xb000: - m_selected_bank[3] = data; - m_bank_base[1] = get_rom_base() + ( m_selected_bank[3] & m_bank_mask ) * 0x2000; - m_bank_base[5] = get_rom_base() + ( m_selected_bank[3] & m_bank_mask ) * 0x2000; - break; + m_scc_view.select(((data & 0x3f) == 0x3f) ? 1 : 0); } } @@ -300,261 +147,131 @@ void msx_cart_konami_scc_device::write_cart(offs_t offset, uint8_t data) -msx_cart_gamemaster2_device::msx_cart_gamemaster2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_gamemaster2_device::msx_cart_gamemaster2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_GAMEMASTER2, tag, owner, clock) , msx_cart_interface(mconfig, *this) + , m_rombank(*this, "rombank%u", 0U) + , m_rambank(*this, "rambank%u", 0U) + , m_view0(*this, "view0") + , m_view1(*this, "view1") + , m_view2(*this, "view2") { - for (auto & elem : m_selected_bank) - { - elem = 0; - } - for (auto & elem : m_bank_base) - { - elem = nullptr; - } -} - - -void msx_cart_gamemaster2_device::device_start() -{ - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_gamemaster2_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_gamemaster2_device::setup_bank(uint8_t bank) -{ - switch (bank) - { - case 0: - if (m_selected_bank[0] & 0x10) - { - m_bank_base[1] = get_sram_base() + ((m_selected_bank[0] & 0x20) ? 0x1000 : 0); - m_bank_base[3] = get_sram_base() + ((m_selected_bank[0] & 0x20) ? 0x1000 : 0); - } - else - { - m_bank_base[1] = get_rom_base() + ( m_selected_bank[0] & 0x0f ) * 0x2000; - m_bank_base[3] = get_rom_base() + ( m_selected_bank[0] & 0x0f ) * 0x2000; - } - break; - - case 1: - if (m_selected_bank[1] & 0x10) - { - m_bank_base[4] = get_sram_base() + ((m_selected_bank[1] & 0x20) ? 0x1000 : 0); - m_bank_base[6] = get_sram_base() + ((m_selected_bank[1] & 0x20) ? 0x1000 : 0); - } - else - { - m_bank_base[4] = get_rom_base() + ( m_selected_bank[1] & 0x0f ) * 0x2000; - m_bank_base[6] = get_rom_base() + ( m_selected_bank[1] & 0x0f ) * 0x2000; - } - break; - - case 2: - if (m_selected_bank[2] & 0x10) - { - m_bank_base[5] = get_sram_base() + ((m_selected_bank[2] & 0x20) ? 0x1000 : 0); - m_bank_base[7] = get_sram_base() + ((m_selected_bank[2] & 0x20) ? 0x1000 : 0); - } - else - { - m_bank_base[5] = get_rom_base() + ( m_selected_bank[2] & 0x0f ) * 0x2000; - m_bank_base[7] = get_rom_base() + ( m_selected_bank[2] & 0x0f ) * 0x2000; - } - break; - } -} - - -void msx_cart_gamemaster2_device::restore_banks() -{ - m_bank_base[0] = get_rom_base(); - m_bank_base[2] = get_rom_base(); - setup_bank(0); - setup_bank(1); - setup_bank(2); } - void msx_cart_gamemaster2_device::device_reset() { - for (int i = 0; i < 3; i++) - { - m_selected_bank[i] = i + 1; - } + m_rombank[0]->set_entry(1); + m_rombank[1]->set_entry(1); + m_rombank[2]->set_entry(2); + m_view0.select(0); + m_view1.select(0); + m_view2.select(0); } - void msx_cart_gamemaster2_device::initialize_cartridge() { - if ( get_rom_size() != 0x20000 ) + u32 size = get_rom_size(); + u16 banks = size / 0x2000; + + if (size != 0x20000) { fatalerror("gamemaster2: Invalid ROM size\n"); } - if (get_sram_size() != 0x2000) { fatalerror("gamemaster2: Invalid SRAM size\n"); } - restore_banks(); -} + for (int i = 0; i < 3; i++) + { + m_rombank[i]->configure_entries(0, banks, get_rom_base(), 0x2000); + m_rambank[i]->configure_entries(0, 2, get_sram_base(), 0x1000); + } + page(1)->install_rom(0x4000, 0x5fff, get_rom_base()); -uint8_t msx_cart_gamemaster2_device::read_cart(offs_t offset) -{ - uint8_t bank = offset >> 13; + page(1)->install_view(0x6000, 0x7fff, m_view0); + m_view0[0].install_read_bank(0x6000, 0x7fff, m_rombank[0]); + m_view0[0].install_write_handler(0x6000, 0x6fff, write8smo_delegate(*this, FUNC(msx_cart_gamemaster2_device::bank_w<0>))); + m_view0[1].install_read_bank(0x6000, 0x6fff, 0x1000, m_rambank[0]); + m_view0[1].install_write_handler(0x6000, 0x6fff, write8smo_delegate(*this, FUNC(msx_cart_gamemaster2_device::bank_w<0>))); - switch (bank) - { - case 1: - case 3: - if (m_selected_bank[0] & 0x10) - { - return m_bank_base[bank][offset & 0x0fff]; - } - break; - - case 4: - case 6: - if (m_selected_bank[1] & 0x10) - { - return m_bank_base[bank][offset & 0x0fff]; - } - break; - - case 5: - case 7: - if (m_selected_bank[2] & 0x10) - { - return m_bank_base[bank][offset & 0x0fff]; - } - break; - } - return m_bank_base[bank][offset & 0x1fff]; -} + page(2)->install_view(0x8000, 0x9fff, m_view1); + m_view1[0].install_read_bank(0x8000, 0x9fff, m_rombank[1]); + m_view1[0].install_write_handler(0x8000, 0x8fff, write8smo_delegate(*this, FUNC(msx_cart_gamemaster2_device::bank_w<1>))); + m_view1[1].install_read_bank(0x8000, 0x8fff, 0x1000, m_rambank[1]); + m_view1[1].install_write_handler(0x8000, 0x8fff, write8smo_delegate(*this, FUNC(msx_cart_gamemaster2_device::bank_w<1>))); + page(2)->install_view(0xa000, 0xbfff, m_view2); + m_view2[0].install_read_bank(0xa000, 0xbfff, m_rombank[2]); + m_view2[0].install_write_handler(0xa000, 0xafff, write8smo_delegate(*this, FUNC(msx_cart_gamemaster2_device::bank_w<2>))); + m_view2[1].install_read_bank(0xa000, 0xafff, m_rambank[2]); + m_view2[1].install_write_handler(0xa000, 0xafff, write8smo_delegate(*this, FUNC(msx_cart_gamemaster2_device::bank_w<2>))); + m_view2[1].install_readwrite_bank(0xb000, 0xbfff, m_rambank[2]); +} -void msx_cart_gamemaster2_device::write_cart(offs_t offset, uint8_t data) +template +void msx_cart_gamemaster2_device::bank_w(u8 data) { - switch (offset & 0xf000) - { - case 0x6000: - m_selected_bank[0] = data; - setup_bank(0); - break; - - case 0x8000: - m_selected_bank[1] = data; - setup_bank(1); - break; - - case 0xa000: - m_selected_bank[2] = data; - setup_bank(2); - break; - - case 0xb000: - if (m_selected_bank[2] & 0x10) - { - m_bank_base[5][offset & 0x0fff] = data; - } - break; - } + m_rombank[Bank]->set_entry(data & 0x0f); + m_rambank[Bank]->set_entry(BIT(data, 5) ? 1 : 0); + if (Bank == 0) + m_view0.select(BIT(data, 4) ? 1 : 0); + if (Bank == 1) + m_view1.select(BIT(data, 4) ? 1 : 0); + if (Bank == 2) + m_view2.select(BIT(data, 4) ? 1 : 0); } -msx_cart_synthesizer_device::msx_cart_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_synthesizer_device::msx_cart_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_SYNTHESIZER, tag, owner, clock) , msx_cart_interface(mconfig, *this) - , m_bank_base(nullptr) , m_dac(*this, "dac") { } - void msx_cart_synthesizer_device::device_add_mconfig(machine_config &config) { // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. SPEAKER(config, "speaker").front_center(); - DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC -} - - -void msx_cart_synthesizer_device::device_start() -{ + DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.3); // unknown DAC } - void msx_cart_synthesizer_device::initialize_cartridge() { - if ( get_rom_size() != 0x8000 ) + if (get_rom_size() != 0x8000) { fatalerror("synthesizer: Invalid ROM size\n"); } - m_bank_base = get_rom_base(); -} - - -uint8_t msx_cart_synthesizer_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0xc000 ) - { - return m_bank_base[offset - 0x4000]; - } - return 0xff; -} - - -void msx_cart_synthesizer_device::write_cart(offs_t offset, uint8_t data) -{ - if ((offset & 0xc010) == 0x4000) - { - m_dac->write(data); - } + page(1)->install_rom(0x4000, 0x7fff, get_rom_base()); + page(1)->install_write_handler(0x4000, 0x4000, 0, 0x3fef, 0, write8smo_delegate(m_dac, FUNC(dac_byte_interface::write))); + page(2)->install_rom(0x8000, 0xbfff, get_rom_base() + 0x4000); } -msx_cart_konami_sound_device::msx_cart_konami_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_konami_sound_device::msx_cart_konami_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 min_rambank, u8 max_rambank) : device_t(mconfig, type, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_k052539(*this, "k052539") - , m_scc_active(false) - , m_sccplus_active(false) - , m_scc_mode(0) + , m_rambank(*this, "rambank%u", 0U) + , m_view0(*this, "view0") + , m_view1(*this, "view1") + , m_view2(*this, "view2") + , m_view3(*this, "view3") + , m_min_rambank(min_rambank) + , m_max_rambank(max_rambank) + , m_selected_bank{0, 0, 0, 0} + , m_control(0) { - for (auto & elem : m_selected_bank) - { - elem = 0; - } - for (auto & elem : m_bank_base) - { - elem = nullptr; - } - for (auto & elem : m_ram_bank) - { - elem = nullptr; - } - for (auto & elem : m_ram_enabled) - { - elem = false; - } } - void msx_cart_konami_sound_device::device_add_mconfig(machine_config &config) { // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. @@ -562,330 +279,208 @@ void msx_cart_konami_sound_device::device_add_mconfig(machine_config &config) K051649(config, m_k052539, XTAL(10'738'635)/3).add_route(ALL_OUTPUTS, "mono", 0.15); } - void msx_cart_konami_sound_device::device_start() { save_item(NAME(m_selected_bank)); - save_item(NAME(m_scc_active)); - save_item(NAME(m_sccplus_active)); - save_item(NAME(m_ram_enabled)); -} - - -void msx_cart_konami_sound_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_konami_sound_device::restore_banks() -{ - for (int i = 0; i < 4; i++) - { - setup_bank(i); - } -} - - -void msx_cart_konami_sound_device::setup_bank(uint8_t bank) -{ - switch (bank) - { - case 0: - m_bank_base[2] = m_ram_bank[m_selected_bank[0] & 0x0f]; - m_bank_base[6] = m_ram_bank[m_selected_bank[0] & 0x0f]; - break; - - case 1: - m_bank_base[3] = m_ram_bank[m_selected_bank[1] & 0x0f]; - m_bank_base[7] = m_ram_bank[m_selected_bank[1] & 0x0f]; - break; - - case 2: - m_bank_base[0] = m_ram_bank[m_selected_bank[2] & 0x0f]; - m_bank_base[4] = m_ram_bank[m_selected_bank[2] & 0x0f]; - break; - - case 3: - m_bank_base[1] = m_ram_bank[m_selected_bank[3] & 0x0f]; - m_bank_base[5] = m_ram_bank[m_selected_bank[3] & 0x0f]; - break; - } + save_item(NAME(m_control)); } - void msx_cart_konami_sound_device::device_reset() { + m_control = 0; for (int i = 0; i < 4; i++) { m_selected_bank[i] = i; - m_ram_enabled[i] = false; } - m_scc_active = false; - m_sccplus_active = false; + switch_bank<0>(); + switch_bank<1>(); + switch_bank<2>(); + switch_bank<3>(); } - void msx_cart_konami_sound_device::initialize_cartridge() { - restore_banks(); -} - - -uint8_t msx_cart_konami_sound_device::read_cart(offs_t offset) -{ - if ( m_scc_active && offset >= 0x9800 && offset < 0x9fe0 ) - { - offset &= 0xff; - if (offset < 0x80) - { - return m_k052539->k051649_waveform_r(offset); - } - if (offset < 0xa0) - { - return 0xff; - } - if (offset < 0xc0) - { - return m_k052539->k051649_waveform_r(offset & 0x9f); - } - if (offset < 0xe0) - { - return m_k052539->k051649_test_r(); - } - return 0xff; - } - else if ( m_sccplus_active && offset >= 0xb800 && offset < 0xbfe0) - { - offset &= 0xff; - - if (offset < 0xa0) - { - return m_k052539->k052539_waveform_r(offset); - } - if (offset >= 0xc0 && offset < 0xe0) - { - return m_k052539->k051649_test_r(); - } - return 0xff; - } - - uint8_t *base = m_bank_base[offset >> 13]; - - if (base != nullptr) - { - return base[offset & 0x1fff]; - } - return 0xff; -} - - -void msx_cart_konami_sound_device::write_cart(offs_t offset, uint8_t data) -{ - switch (offset & 0xe000) + for (int i = 0; i < 4; i++) { - case 0x4000: - if (m_ram_enabled[0] && m_bank_base[2] != nullptr) - { - m_bank_base[2][offset & 0x1fff] = data; - } - if ((offset & 0x1800) == 0x1000) - { - m_selected_bank[0] = data; - setup_bank(0); - } - break; - - case 0x6000: - if (m_ram_enabled[1] && m_bank_base[3] != nullptr) - { - m_bank_base[3][offset & 0x1fff] = data; - } - if ((offset & 0x1800) == 0x1000) - { - m_selected_bank[1] = data; - setup_bank(1); - } - break; - - case 0x8000: - if (m_ram_enabled[2] && m_bank_base[0] != nullptr) - { - m_bank_base[0][offset & 0x1fff] = data; - } - switch (offset & 0x1800) - { - case 0x1000: // 0x9000-0x97ff - m_selected_bank[2] = data; - m_scc_active = ( ( data & 0x3f ) == 0x3f ); - setup_bank(2); - break; - - case 0x1800: // 0x9800-0x9fff - if ( m_scc_active ) - { - offset &= 0xff; - - if (offset < 0x80) - { - m_k052539->k051649_waveform_w(offset, data); - } - else if (offset < 0xa0) - { - offset &= 0x0f; - if (offset < 0x0a) - { - m_k052539->k051649_frequency_w(offset, data); - } - else if (offset < 0x0f) - { - m_k052539->k051649_volume_w(offset - 0xa, data); - } - else - { - m_k052539->k051649_keyonoff_w(data); - } - } - else if (offset >= 0xe0) - { - m_k052539->k051649_test_w(data); - } - } - break; - } - break; - - case 0xa000: - if (m_ram_enabled[3] && m_bank_base[1] != nullptr) - { - m_bank_base[1][offset & 0x1fff] = data; - } - switch (offset & 0x1800) - { - // 0xb000-0xb7ff - case 0x1000: - m_selected_bank[3] = data; - setup_bank(3); - break; - - // 0xb800-0xbfff - case 0x1800: - if ((offset & 0x7fe) == 0x7fe) - { - // 0xbffe-0xbfff - /* write to mode register */ - m_scc_mode = data; - - m_ram_enabled[0] = ((m_scc_mode & 0x10) || (m_scc_mode & 0x01)); - m_ram_enabled[1] = ((m_scc_mode & 0x10) || (m_scc_mode & 0x02)); - m_ram_enabled[2] = ((m_scc_mode & 0x10) || ((m_scc_mode & 0x04) && (m_scc_mode & 0x20))); - m_ram_enabled[3] = (m_scc_mode & 0x10); - - m_scc_active = ((m_selected_bank[2] & 0x3f) == 0x3f) && !(m_scc_mode & 0x20); - m_sccplus_active = (m_selected_bank[3] & 0x80) && (m_scc_mode & 0x20); - } - else - { - if (m_sccplus_active) - { - offset &= 0xff; - if (offset < 0xa0) - { - m_k052539->k052539_waveform_w(offset, data); - } - else if (offset < 0xc0) - { - offset &= 0x0f; - if (offset < 0x0a) - { - m_k052539->k051649_frequency_w(offset, data); - } - else if (offset < 0x0f) - { - m_k052539->k051649_volume_w(offset - 0x0a, data); - } - else if (offset == 0x0f) - { - m_k052539->k051649_keyonoff_w(data); - } - } - else if (offset < 0xe0) - { - m_k052539->k051649_test_w(data); - } - } - } - break; - } - break; - } -} - - -msx_cart_konami_sound_snatcher_device::msx_cart_konami_sound_snatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : msx_cart_konami_sound_device(mconfig, MSX_CART_SOUND_SNATCHER, tag, owner, clock) + m_rambank[i]->configure_entries(0, 8, get_ram_base(), 0x2000); + } + + // TODO Mirrors at 0000-3fff and c000-ffff + + page(1)->install_view(0x4000, 0x5fff, m_view0); + m_view0[VIEW_READ].install_read_bank(0x4000, 0x5fff, m_rambank[0]); + m_view0[VIEW_READ].install_write_handler(0x5000, 0x57ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<0>))); + m_view0[VIEW_RAM].install_readwrite_bank(0x4000, 0x5fff, m_rambank[0]); + m_view0[VIEW_INVALID].install_write_handler(0x5000, 0x57ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<0>))); + m_view0[VIEW_INVALID | VIEW_RAM]; + + page(1)->install_view(0x6000, 0x7fff, m_view1); + m_view1[VIEW_READ].install_read_bank(0x6000, 0x7fff, m_rambank[1]); + m_view1[VIEW_READ].install_write_handler(0x7000, 0x77ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<1>))); + m_view1[VIEW_RAM].install_readwrite_bank(0x6000, 0x7fff, m_rambank[1]); + m_view1[VIEW_INVALID].install_write_handler(0x7000, 0x77ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<1>))); + m_view1[VIEW_INVALID | VIEW_RAM]; + + page(2)->install_view(0x8000, 0x9fff, m_view2); + m_view2[VIEW_READ].install_read_bank(0x8000, 0x9fff, m_rambank[2]); + m_view2[VIEW_READ].install_write_handler(0x9000, 0x97ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<2>))); + m_view2[VIEW_RAM].install_readwrite_bank(0x8000, 0x9fff, m_rambank[2]); + m_view2[VIEW_INVALID].install_write_handler(0x9000, 0x97ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<2>))); + m_view2[VIEW_INVALID | VIEW_RAM]; + m_view2[VIEW_SCC | VIEW_READ].install_read_bank(0x8000, 0x9fff, m_rambank[2]); + m_view2[VIEW_SCC | VIEW_READ].install_write_handler(0x9000, 0x97ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<2>))); + m_view2[VIEW_SCC | VIEW_READ].install_read_handler(0x9800, 0x987f, 0, 0x0700, 0, read8sm_delegate(m_k052539, FUNC(k051649_device::k051649_waveform_r))); + m_view2[VIEW_SCC | VIEW_READ].install_write_handler(0x9800, 0x987f, 0, 0x0700, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k051649_waveform_w))); + m_view2[VIEW_SCC | VIEW_READ].install_write_handler(0x9880, 0x9889, 0, 0x0710, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k051649_frequency_w))); + m_view2[VIEW_SCC | VIEW_READ].install_write_handler(0x988a, 0x988e, 0, 0x0710, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k051649_volume_w))); + m_view2[VIEW_SCC | VIEW_READ].install_write_handler(0x988f, 0x988f, 0, 0x0710, 0, write8smo_delegate(m_k052539, FUNC(k051649_device::k051649_keyonoff_w))); + m_view2[VIEW_SCC | VIEW_READ].install_read_handler(0x98c0, 0x98c0, 0, 0x071f, 0, read8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_r))); + m_view2[VIEW_SCC | VIEW_READ].install_write_handler(0x98c0, 0x98c0, 0, 0x071f, 0, write8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_w))); + m_view2[VIEW_SCC | VIEW_RAM].install_readwrite_bank(0x8000, 0x9fff, m_rambank[2]); + m_view2[VIEW_SCC | VIEW_RAM].install_read_handler(0x9800, 0x987f, 0, 0x0700, 0, read8sm_delegate(m_k052539, FUNC(k051649_device::k051649_waveform_r))); + m_view2[VIEW_SCC | VIEW_RAM].install_read_handler(0x98c0, 0x98c0, 0, 0x071f, 0, read8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_r))); + m_view2[VIEW_SCC | VIEW_INVALID].install_write_handler(0x9000, 0x97ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<2>))); + m_view2[VIEW_SCC | VIEW_INVALID].install_read_handler(0x9800, 0x987f, 0, 0x0700, 0, read8sm_delegate(m_k052539, FUNC(k051649_device::k051649_waveform_r))); + m_view2[VIEW_SCC | VIEW_INVALID].install_write_handler(0x9800, 0x987f, 0, 0x0700, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k051649_waveform_w))); + m_view2[VIEW_SCC | VIEW_INVALID].install_write_handler(0x9880, 0x9889, 0, 0x0710, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k051649_frequency_w))); + m_view2[VIEW_SCC | VIEW_INVALID].install_write_handler(0x988a, 0x988e, 0, 0x0710, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k051649_volume_w))); + m_view2[VIEW_SCC | VIEW_INVALID].install_write_handler(0x988f, 0x988f, 0, 0x0710, 0, write8smo_delegate(m_k052539, FUNC(k051649_device::k051649_keyonoff_w))); + m_view2[VIEW_SCC | VIEW_INVALID].install_read_handler(0x98c0, 0x98c0, 0, 0x071f, 0, read8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_r))); + m_view2[VIEW_SCC | VIEW_INVALID].install_write_handler(0x98c0, 0x98c0, 0, 0x071f, 0, write8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_w))); + m_view2[VIEW_SCC | VIEW_INVALID | VIEW_RAM]; + m_view2[VIEW_SCC | VIEW_INVALID | VIEW_RAM].install_read_handler(0x9800, 0x987f, 0, 0x0700, 0, read8sm_delegate(m_k052539, FUNC(k051649_device::k051649_waveform_r))); + m_view2[VIEW_SCC | VIEW_INVALID | VIEW_RAM].install_read_handler(0x98c0, 0x98c0, 0, 0x071f, 0, read8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_r))); + + page(2)->install_view(0xa000, 0xbfff, m_view3); + m_view3[VIEW_READ].install_read_bank(0xa000, 0xbfff, m_rambank[3]); + m_view3[VIEW_READ].install_write_handler(0xb000, 0xb7ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<3>))); + m_view3[VIEW_RAM].install_readwrite_bank(0xa000, 0xbfff, m_rambank[3]); + m_view3[VIEW_INVALID].install_write_handler(0xb000, 0xb7ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<3>))); + m_view3[VIEW_INVALID | VIEW_RAM]; + m_view3[VIEW_SCC | VIEW_READ].install_read_bank(0xa000, 0xbfff, m_rambank[3]); + m_view3[VIEW_SCC | VIEW_READ].install_write_handler(0xb000, 0xb7ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<3>))); + m_view3[VIEW_SCC | VIEW_READ].install_read_handler(0xb800, 0xb89f, 0, 0x0700, 0, read8sm_delegate(m_k052539, FUNC(k051649_device::k052539_waveform_r))); + m_view3[VIEW_SCC | VIEW_READ].install_write_handler(0xb800, 0xb89f, 0, 0x0700, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k052539_waveform_w))); + m_view3[VIEW_SCC | VIEW_READ].install_write_handler(0xb8a0, 0xb8a9, 0, 0x0710, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k051649_frequency_w))); + m_view3[VIEW_SCC | VIEW_READ].install_write_handler(0xb8aa, 0xb8ae, 0, 0x0710, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k051649_volume_w))); + m_view3[VIEW_SCC | VIEW_READ].install_write_handler(0xb8af, 0xb8af, 0, 0x0710, 0, write8smo_delegate(m_k052539, FUNC(k051649_device::k051649_keyonoff_w))); + m_view3[VIEW_SCC | VIEW_READ].install_read_handler(0xb8c0, 0xb8c0, 0, 0x071f, 0, read8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_r))); + m_view3[VIEW_SCC | VIEW_READ].install_write_handler(0xb8c0, 0xb8c0, 0, 0x071f, 0, write8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_w))); + m_view3[VIEW_SCC | VIEW_RAM].install_readwrite_bank(0xa000, 0xbfff, m_rambank[3]); + m_view3[VIEW_SCC | VIEW_RAM].install_read_handler(0xb800, 0xb89f, 0, 0x0700, 0, read8sm_delegate(m_k052539, FUNC(k051649_device::k052539_waveform_r))); + m_view3[VIEW_SCC | VIEW_RAM].install_read_handler(0xb8c0, 0xb8c0, 0, 0x071f, 0, read8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_r))); + m_view3[VIEW_SCC | VIEW_INVALID].install_write_handler(0xb000, 0xb7ff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::bank_w<3>))); + m_view3[VIEW_SCC | VIEW_INVALID].install_read_handler(0xb800, 0xb89f, 0, 0x0700, 0, read8sm_delegate(m_k052539, FUNC(k051649_device::k052539_waveform_r))); + m_view3[VIEW_SCC | VIEW_INVALID].install_write_handler(0xb800, 0xb89f, 0, 0x0700, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k052539_waveform_w))); + m_view3[VIEW_SCC | VIEW_INVALID].install_write_handler(0xb8a0, 0xb8a9, 0, 0x0710, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k051649_frequency_w))); + m_view3[VIEW_SCC | VIEW_INVALID].install_write_handler(0xb8aa, 0xb8ae, 0, 0x0710, 0, write8sm_delegate(m_k052539, FUNC(k051649_device::k051649_volume_w))); + m_view3[VIEW_SCC | VIEW_INVALID].install_write_handler(0xb8af, 0xb8af, 0, 0x0710, 0, write8smo_delegate(m_k052539, FUNC(k051649_device::k051649_keyonoff_w))); + m_view3[VIEW_SCC | VIEW_INVALID].install_read_handler(0xb8c0, 0xb8c0, 0, 0x071f, 0, read8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_r))); + m_view3[VIEW_SCC | VIEW_INVALID].install_write_handler(0xb8c0, 0xb8c0, 0, 0x071f, 0, write8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_w))); + m_view3[VIEW_SCC | VIEW_INVALID | VIEW_RAM]; + m_view3[VIEW_SCC | VIEW_INVALID| VIEW_RAM].install_read_handler(0xb800, 0xb89f, 0, 0x0700, 0, read8sm_delegate(m_k052539, FUNC(k051649_device::k052539_waveform_r))); + m_view3[VIEW_SCC | VIEW_INVALID| VIEW_RAM].install_read_handler(0xb8c0, 0xb8c0, 0, 0x071f, 0, read8smo_delegate(m_k052539, FUNC(k051649_device::k051649_test_r))); + + page(2)->install_write_handler(0xbffe, 0xbfff, write8smo_delegate(*this, FUNC(msx_cart_konami_sound_device::control_w))); +} + +void msx_cart_konami_sound_device::control_w(u8 data) +{ + m_control = data; + + switch_bank<0>(); + switch_bank<1>(); + switch_bank<2>(); + switch_bank<3>(); +} + +template +void msx_cart_konami_sound_device::switch_bank() +{ + u8 view = VIEW_READ; + if ((m_selected_bank[Bank] & 0x0f) >= m_min_rambank && (m_selected_bank[Bank] & 0x0f) <= m_max_rambank) + m_rambank[Bank]->set_entry(m_selected_bank[Bank] & 0x07); + else + view |= VIEW_INVALID; + if (BIT(m_control, 4)) + view |= VIEW_RAM; + else + { + if (Bank < 2 && BIT(m_control, Bank)) + view |= VIEW_RAM; + else if (Bank == 2 && BIT(m_control, Bank) && BIT(m_control, 5)) + view |= VIEW_RAM; + } + if (Bank == 2 && !BIT(m_control, 5) && (m_selected_bank[2] & 0x3f) == 0x3f) + view |= VIEW_SCC; + if (Bank == 3 && BIT(m_control, 5) && BIT(m_selected_bank[3], 7)) + view |= VIEW_SCC; + + if (Bank == 0) + m_view0.select(view); + if (Bank == 1) + m_view1.select(view); + if (Bank == 2) + m_view2.select(view); + if (Bank == 3) + m_view3.select(view); +} + +template +void msx_cart_konami_sound_device::bank_w(u8 data) +{ + m_selected_bank[Bank] = data; + switch_bank(); +} + + + +// The Snatcher Sound cartridge has 64KB RAM available by selecting ram banks 0-7 +msx_cart_konami_sound_snatcher_device::msx_cart_konami_sound_snatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_cart_konami_sound_device(mconfig, MSX_CART_SOUND_SNATCHER, tag, owner, clock, 0, 7) { } - void msx_cart_konami_sound_snatcher_device::initialize_cartridge() { - msx_cart_konami_sound_device::initialize_cartridge(); - if (get_ram_size() != 0x10000) { fatalerror("sound_snatcher: Invalid RAM size\n"); } - // The Snatcher Sound cartridge has 64KB RAM available by selecting ram banks 0-7 - - for (int i = 0; i < 8; i++) - { - m_ram_bank[i] = get_ram_base() + i * 0x2000; - } + msx_cart_konami_sound_device::initialize_cartridge(); } -msx_cart_konami_sound_sdsnatcher_device::msx_cart_konami_sound_sdsnatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : msx_cart_konami_sound_device(mconfig, MSX_CART_SOUND_SDSNATCHER, tag, owner, clock) +// The SD Snatcher Sound cartrdige has 64KB RAM available by selecting ram banks 8-15 +msx_cart_konami_sound_sdsnatcher_device::msx_cart_konami_sound_sdsnatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_cart_konami_sound_device(mconfig, MSX_CART_SOUND_SDSNATCHER, tag, owner, clock, 8, 15) { } - void msx_cart_konami_sound_sdsnatcher_device::initialize_cartridge() { - msx_cart_konami_sound_device::initialize_cartridge(); - if (get_ram_size() != 0x10000) { fatalerror("sound_sdsnatcher: Invalid RAM size\n"); } - - // The SD Snatcher Sound cartrdige has 64KB RAM available by selecting ram banks 8-15 - - for (int i = 0; i < 8; i++) - { - m_ram_bank[8+i] = get_ram_base() + i * 0x2000; - } - + msx_cart_konami_sound_device::initialize_cartridge(); } -msx_cart_keyboard_master_device::msx_cart_keyboard_master_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_keyboard_master_device::msx_cart_keyboard_master_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_KEYBOARD_MASTER, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_vlm5030(*this, "vlm5030") { } - void msx_cart_keyboard_master_device::vlm_map(address_map &map) { map(0x0000, 0xffff).r(FUNC(msx_cart_keyboard_master_device::read_vlm)); } - void msx_cart_keyboard_master_device::device_add_mconfig(machine_config &config) { // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. @@ -895,7 +490,6 @@ void msx_cart_keyboard_master_device::device_add_mconfig(machine_config &config) m_vlm5030->set_addrmap(0, &msx_cart_keyboard_master_device::vlm_map); } - void msx_cart_keyboard_master_device::device_start() { // Install IO read/write handlers @@ -904,40 +498,28 @@ void msx_cart_keyboard_master_device::device_start() io_space().install_read_handler(0x00, 0x00, read8smo_delegate(*this, FUNC(msx_cart_keyboard_master_device::io_00_r))); } - void msx_cart_keyboard_master_device::initialize_cartridge() { if (get_rom_size() != 0x4000) { fatalerror("keyboard_master: Invalid ROM size\n"); } -} - -uint8_t msx_cart_keyboard_master_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0x8000) - { - return m_rom[offset & 0x3fff]; - } - return 0xff; + page(1)->install_rom(0x4000, 0x7fff, get_rom_base()); } - uint8_t msx_cart_keyboard_master_device::read_vlm(offs_t offset) { return m_rom_vlm5030[offset]; } - void msx_cart_keyboard_master_device::io_20_w(uint8_t data) { - m_vlm5030->rst((data & 0x01) ? 1 : 0); - m_vlm5030->vcu((data & 0x04) ? 1 : 0); - m_vlm5030->st((data & 0x02) ? 1 : 0); + m_vlm5030->rst(BIT(data, 0) ? 1 : 0); + m_vlm5030->vcu(BIT(data, 2) ? 1 : 0); + m_vlm5030->st(BIT(data, 1) ? 1 : 0); } - uint8_t msx_cart_keyboard_master_device::io_00_r() { return m_vlm5030->bsy() ? 0x10 : 0x00; diff --git a/src/devices/bus/msx_cart/konami.h b/src/devices/bus/msx_cart/konami.h index 58ad4f3cfb7..c2bdd25c478 100644 --- a/src/devices/bus/msx_cart/konami.h +++ b/src/devices/bus/msx_cart/konami.h @@ -3,6 +3,8 @@ #ifndef MAME_BUS_MSX_CART_KONAMI_H #define MAME_BUS_MSX_CART_KONAMI_H +#pragma once + #include "bus/msx_cart/cartridge.h" #include "sound/k051649.h" #include "sound/vlm5030.h" @@ -21,25 +23,20 @@ DECLARE_DEVICE_TYPE(MSX_CART_KEYBOARD_MASTER, msx_cart_keyboard_master_device) class msx_cart_konami_device : public device_t, public msx_cart_interface { public: - msx_cart_konami_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_konami_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override; - - void restore_banks(); private: - uint8_t m_bank_mask; - uint8_t m_selected_bank[4]; - uint8_t *m_bank_base[8]; + template void bank_w(u8 data); + + memory_bank_array_creator<4> m_rombank; + u8 m_bank_mask; }; @@ -50,73 +47,61 @@ public: virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override; virtual void device_add_mconfig(machine_config &config) override; - void restore_banks(); - private: + template void bank_w(u8 data); + required_device m_k051649; + memory_bank_array_creator<4> m_rombank; + memory_view m_scc_view; - uint8_t m_bank_mask; - uint8_t m_selected_bank[4]; - uint8_t *m_bank_base[8]; - bool m_scc_active; + u8 m_bank_mask; }; class msx_cart_gamemaster2_device : public device_t, public msx_cart_interface { public: - msx_cart_gamemaster2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_gamemaster2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override; - - void restore_banks(); private: - uint8_t m_selected_bank[3]; - uint8_t *m_bank_base[8]; + template void bank_w(u8 data); - void setup_bank(uint8_t bank); + memory_bank_array_creator<3> m_rombank; + memory_bank_array_creator<3> m_rambank; + memory_view m_view0; + memory_view m_view1; + memory_view m_view2; }; class msx_cart_synthesizer_device : public device_t, public msx_cart_interface { public: - msx_cart_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_synthesizer_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_add_mconfig(machine_config &config) override; private: - uint8_t *m_bank_base; required_device m_dac; }; @@ -126,42 +111,44 @@ class msx_cart_konami_sound_device : public device_t, public msx_cart_interface public: virtual void initialize_cartridge() override; - virtual uint8_t read_cart(offs_t offset) override; - virtual void write_cart(offs_t offset, uint8_t data) override; - protected: - msx_cart_konami_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_konami_sound_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock, u8 min_rambank, u8 max_rambank); // device-level overrides virtual void device_start() override; virtual void device_reset() override; - virtual void device_post_load() override; virtual void device_add_mconfig(machine_config &config) override; - void restore_banks(); +private: + static constexpr u8 VIEW_READ = 0; + static constexpr u8 VIEW_RAM = 1; + static constexpr u8 VIEW_INVALID = 2; + static constexpr u8 VIEW_SCC = 4; - uint8_t *m_ram_bank[16]; + template void bank_w(u8 data); + template void switch_bank(); + void control_w(u8 data); -private: // This is actually a K052539 required_device m_k052539; - - uint8_t m_selected_bank[4]; - uint8_t *m_bank_base[8]; - bool m_scc_active; - bool m_sccplus_active; - bool m_ram_enabled[4]; - uint8_t m_scc_mode; - - void setup_bank(uint8_t bank); + memory_bank_array_creator<4> m_rambank; + memory_view m_view0; + memory_view m_view1; + memory_view m_view2; + memory_view m_view3; + + u8 m_min_rambank; + u8 m_max_rambank; + u8 m_selected_bank[4]; + u8 m_control; }; class msx_cart_konami_sound_snatcher_device : public msx_cart_konami_sound_device { public: - msx_cart_konami_sound_snatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_konami_sound_snatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; }; @@ -170,7 +157,7 @@ public: class msx_cart_konami_sound_sdsnatcher_device : public msx_cart_konami_sound_device { public: - msx_cart_konami_sound_sdsnatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_konami_sound_sdsnatcher_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; }; @@ -180,7 +167,7 @@ public: class msx_cart_keyboard_master_device : public device_t, public msx_cart_interface { public: - msx_cart_keyboard_master_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_keyboard_master_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); protected: // device-level overrides @@ -190,8 +177,6 @@ protected: virtual void initialize_cartridge() override; - virtual uint8_t read_cart(offs_t offset) override; - private: required_device m_vlm5030; diff --git a/src/devices/bus/msx_cart/korean.cpp b/src/devices/bus/msx_cart/korean.cpp index e12f15bd43d..6ba0ffe1d0f 100644 --- a/src/devices/bus/msx_cart/korean.cpp +++ b/src/devices/bus/msx_cart/korean.cpp @@ -11,290 +11,147 @@ DEFINE_DEVICE_TYPE(MSX_CART_KOREAN_126IN1, msx_cart_korean_126in1_device, "msx_c msx_cart_korean_80in1_device::msx_cart_korean_80in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MSX_CART_KOREAN_80IN1, tag, owner, clock) , msx_cart_interface(mconfig, *this) + , m_rombank(*this, "rombank%u", 0U) , m_bank_mask(0) - , m_selected_bank{ 0, 1, 2, 3 } - , m_bank_base{ nullptr, nullptr, nullptr, nullptr } { } - -void msx_cart_korean_80in1_device::device_start() -{ - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_korean_80in1_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_korean_80in1_device::setup_bank(uint8_t bank) -{ - m_bank_base[bank] = get_rom_base() + ( m_selected_bank[bank] & m_bank_mask ) * 0x2000; -} - - -void msx_cart_korean_80in1_device::restore_banks() -{ - for (int i = 0; i < 4; i++) - { - setup_bank(i); - } -} - - void msx_cart_korean_80in1_device::device_reset() { for (int i = 0; i < 4; i++) - { - m_selected_bank[i] = i; - } + m_rombank[i]->set_entry(i); } - void msx_cart_korean_80in1_device::initialize_cartridge() { - uint32_t size = get_rom_size(); + u32 size = get_rom_size(); + u16 banks = size / 0x2000; - if ( size > 256 * 0x2000 ) - { - fatalerror("korean_80in1: ROM is too big\n"); - } - - uint16_t banks = size / 0x2000; - - if (size != banks * 0x2000 || (~(banks - 1) % banks)) + if (size > 256 * 0x2000 || size < 0x8000 || size != banks * 0x2000 || (~(banks - 1) % banks)) { fatalerror("korean_80in1: Invalid ROM size\n"); } m_bank_mask = banks - 1; - restore_banks(); -} - - -uint8_t msx_cart_korean_80in1_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0xc000) - { - return m_bank_base[(offset - 0x4000) >> 13][offset & 0x1fff]; - } + for (int i = 0; i < 4; i++) + m_rombank[i]->configure_entries(0, banks, get_rom_base(), 0x2000); - return 0xff; + page(1)->install_read_bank(0x4000, 0x5fff, m_rombank[0]); + page(1)->install_write_handler(0x4000, 0x4003, write8sm_delegate(*this, FUNC(msx_cart_korean_80in1_device::bank_w))); + page(1)->install_read_bank(0x6000, 0x7fff, m_rombank[1]); + page(2)->install_read_bank(0x8000, 0x9fff, m_rombank[2]); + page(2)->install_read_bank(0xa000, 0xbfff, m_rombank[3]); } - -void msx_cart_korean_80in1_device::write_cart(offs_t offset, uint8_t data) +void msx_cart_korean_80in1_device::bank_w(offs_t offset, u8 data) { - if (offset >= 0x4000 && offset < 0x4004) - { - uint8_t bank = offset & 3; - - m_selected_bank[bank] = data; - setup_bank(bank); - } + m_rombank[offset & 0x03]->set_entry(data & m_bank_mask); } -msx_cart_korean_90in1_device::msx_cart_korean_90in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_korean_90in1_device::msx_cart_korean_90in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_KOREAN_90IN1, tag, owner, clock) , msx_cart_interface(mconfig, *this) + , m_rombank(*this, "rombank%u", 0U) + , m_view(*this, "view") , m_bank_mask(0) - , m_selected_bank(0) - , m_bank_base{ nullptr, nullptr, nullptr, nullptr } { } - void msx_cart_korean_90in1_device::device_start() { - save_item(NAME(m_selected_bank)); - // Install IO read/write handlers io_space().install_write_handler(0x77, 0x77, write8smo_delegate(*this, FUNC(msx_cart_korean_90in1_device::banking))); } - -void msx_cart_korean_90in1_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_korean_90in1_device::restore_banks() -{ - uint8_t *base = get_rom_base(); - - switch (m_selected_bank & 0xc0) - { - case 0x80: - base += (m_selected_bank & 0x3e & m_bank_mask) * 0x4000; - m_bank_base[0] = base; - m_bank_base[1] = base + 0x2000; - m_bank_base[2] = base + 0x4000; - m_bank_base[3] = base + 0x6000; - break; - - case 0xc0: - base += (m_selected_bank & m_bank_mask) * 0x4000; - m_bank_base[0] = base; - m_bank_base[1] = base + 0x2000; - m_bank_base[2] = base + 0x2000; - m_bank_base[3] = base; - break; - - default: - base += (m_selected_bank & m_bank_mask) * 0x4000; - m_bank_base[0] = base; - m_bank_base[1] = base + 0x2000; - m_bank_base[2] = base; - m_bank_base[3] = base + 0x2000; - break; - } -} - - void msx_cart_korean_90in1_device::device_reset() { - m_selected_bank = 0; + m_view.select(0); + m_rombank[0]->set_entry(0); + m_rombank[1]->set_entry(0); + m_rombank[2]->set_entry(0); } - void msx_cart_korean_90in1_device::initialize_cartridge() { - uint32_t size = get_rom_size(); + u32 size = get_rom_size(); + u16 banks = size / 0x4000; - if ( size > 64 * 0x4000 ) - { - fatalerror("korean_90in1: ROM is too big\n"); - } - - uint16_t banks = size / 0x4000; - - if (size != banks * 0x4000 || (~(banks - 1) % banks)) + if (size > 64 * 0x4000 || size < 0x8000 || size != banks * 0x4000 || (~(banks - 1) % banks)) { fatalerror("korean_90in1: Invalid ROM size\n"); } m_bank_mask = banks - 1; - restore_banks(); -} + m_rombank[0]->configure_entries(0, banks, get_rom_base(), 0x4000); + m_rombank[1]->configure_entries(0, banks, get_rom_base(), 0x4000); + m_rombank[2]->configure_entries(0, banks, get_rom_base() + 0x2000, 0x4000); + page(1)->install_read_bank(0x4000, 0x7fff, m_rombank[0]); -uint8_t msx_cart_korean_90in1_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0xc000) - { - return m_bank_base[(offset - 0x4000) >> 13][offset & 0x1fff]; - } - - return 0xff; + page(2)->install_view(0x8000, 0xbfff, m_view); + m_view[0].install_read_bank(0x8000, 0x9fff, m_rombank[1]); + m_view[0].install_read_bank(0xa000, 0xbfff, m_rombank[2]); + m_view[1].install_read_bank(0x8000, 0x9fff, m_rombank[2]); + m_view[1].install_read_bank(0xa000, 0xbfff, m_rombank[1]); } - -void msx_cart_korean_90in1_device::banking(uint8_t data) +void msx_cart_korean_90in1_device::banking(u8 data) { - m_selected_bank = data; - restore_banks(); + if (BIT(data, 7) && !BIT(data, 6)) + data &= 0xfe; + + m_rombank[0]->set_entry(data & m_bank_mask); + m_rombank[1]->set_entry((data + (BIT(data, 7) ? 1 : 0)) & m_bank_mask); + m_rombank[2]->set_entry((data + (BIT(data, 7) ? 1 : 0)) & m_bank_mask); + + m_view.select((BIT(data, 7) && BIT(data, 6)) ? 1 : 0); } -msx_cart_korean_126in1_device::msx_cart_korean_126in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_korean_126in1_device::msx_cart_korean_126in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_KOREAN_126IN1, tag, owner, clock) , msx_cart_interface(mconfig, *this) + , m_rombank(*this, "rombank%u", 0U) , m_bank_mask(0) - , m_selected_bank{ 0, 1 } - , m_bank_base{ nullptr, nullptr } -{ -} - - -void msx_cart_korean_126in1_device::device_start() -{ - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_korean_126in1_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_korean_126in1_device::setup_bank(uint8_t bank) { - m_bank_base[bank] = get_rom_base() + ( m_selected_bank[bank] & m_bank_mask ) * 0x4000; -} - - -void msx_cart_korean_126in1_device::restore_banks() -{ - for (int i = 0; i < 2; i++) - { - setup_bank(i); - } } - void msx_cart_korean_126in1_device::device_reset() { - for (int i = 0; i < 2; i++) - { - m_selected_bank[i] = i; - } + m_rombank[0]->set_entry(0); + m_rombank[1]->set_entry(1); } - void msx_cart_korean_126in1_device::initialize_cartridge() { - uint32_t size = get_rom_size(); + u32 size = get_rom_size(); + u16 banks = size / 0x4000; - if ( size > 256 * 0x4000 ) - { - fatalerror("korean_126in1: ROM is too big\n"); - } - - uint16_t banks = size / 0x4000; - - if (size != banks * 0x4000 || (~(banks - 1) % banks)) + if (size > 256 * 0x4000 || size < 0x8000 || size != banks * 0x4000 || (~(banks - 1) % banks)) { fatalerror("korean_126in1: Invalid ROM size\n"); } m_bank_mask = banks - 1; - restore_banks(); -} - - -uint8_t msx_cart_korean_126in1_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0xc000) - { - return m_bank_base[offset >> 15][offset & 0x3fff]; - } + m_rombank[0]->configure_entries(0, banks, get_rom_base(), 0x4000); + m_rombank[1]->configure_entries(0, banks, get_rom_base(), 0x4000); - return 0xff; + page(1)->install_read_bank(0x4000, 0x7fff, m_rombank[0]); + page(1)->install_write_handler(0x4000, 0x4001, write8sm_delegate(*this, FUNC(msx_cart_korean_126in1_device::bank_w))); + page(2)->install_read_bank(0x8000, 0xbfff, m_rombank[1]); } - -void msx_cart_korean_126in1_device::write_cart(offs_t offset, uint8_t data) +void msx_cart_korean_126in1_device::bank_w(offs_t offset, uint8_t data) { - if (offset >= 0x4000 && offset < 0x4002) - { - uint8_t bank = offset & 1; - - m_selected_bank[bank] = data; - setup_bank(bank); - } + m_rombank[offset & 0x01]->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 62c5a6ba82b..dd8e0c31009 100644 --- a/src/devices/bus/msx_cart/korean.h +++ b/src/devices/bus/msx_cart/korean.h @@ -20,74 +20,58 @@ public: virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override; private: - void restore_banks(); - void setup_bank(uint8_t bank); + void bank_w(offs_t offset, u8 data); - uint8_t m_bank_mask; - uint8_t m_selected_bank[4]; - uint8_t *m_bank_base[4]; + memory_bank_array_creator<4> m_rombank; + + u8 m_bank_mask; }; class msx_cart_korean_90in1_device : public device_t, public msx_cart_interface { public: - msx_cart_korean_90in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_korean_90in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - virtual uint8_t read_cart(offs_t offset) override; - protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; - virtual void device_post_load() override; private: - void banking(uint8_t data); + void banking(u8 data); - void restore_banks(); - - uint8_t m_bank_mask; - uint8_t m_selected_bank; - uint8_t *m_bank_base[4]; + memory_bank_array_creator<3> m_rombank; + memory_view m_view; + u8 m_bank_mask; }; class msx_cart_korean_126in1_device : public device_t, public msx_cart_interface { public: - msx_cart_korean_126in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_korean_126in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override; private: - void restore_banks(); - void setup_bank(uint8_t bank); + void bank_w(offs_t offset, u8 data); - uint8_t m_bank_mask; - uint8_t m_selected_bank[2]; - uint8_t *m_bank_base[2]; + memory_bank_array_creator<2> m_rombank; + u8 m_bank_mask; }; diff --git a/src/devices/bus/msx_cart/majutsushi.cpp b/src/devices/bus/msx_cart/majutsushi.cpp index c94f5a00dc5..65ae0bf42c0 100644 --- a/src/devices/bus/msx_cart/majutsushi.cpp +++ b/src/devices/bus/msx_cart/majutsushi.cpp @@ -9,22 +9,14 @@ DEFINE_DEVICE_TYPE(MSX_CART_MAJUTSUSHI, msx_cart_majutsushi_device, "msx_cart_majutsushi", "MSX Cartridge - Majutsushi") -msx_cart_majutsushi_device::msx_cart_majutsushi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_majutsushi_device::msx_cart_majutsushi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_MAJUTSUSHI, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_dac(*this, "dac") + , m_rombank(*this, "rombank%u", 0U) { - for (auto & elem : m_selected_bank) - { - elem = 0; - } - for (auto & elem : m_bank_base) - { - elem = nullptr; - } } - void msx_cart_majutsushi_device::device_add_mconfig(machine_config &config) { // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. @@ -32,85 +24,32 @@ void msx_cart_majutsushi_device::device_add_mconfig(machine_config &config) DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.05); // unknown DAC } - -void msx_cart_majutsushi_device::device_start() -{ - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_majutsushi_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_majutsushi_device::restore_banks() -{ - m_bank_base[0] = get_rom_base() + ( m_selected_bank[0] & 0x0f ) * 0x2000; - m_bank_base[1] = get_rom_base() + ( m_selected_bank[1] & 0x0f ) * 0x2000; - m_bank_base[2] = get_rom_base() + ( m_selected_bank[0] & 0x0f ) * 0x2000; - m_bank_base[3] = get_rom_base() + ( m_selected_bank[1] & 0x0f ) * 0x2000; - m_bank_base[4] = get_rom_base() + ( m_selected_bank[2] & 0x0f ) * 0x2000; - m_bank_base[5] = get_rom_base() + ( m_selected_bank[3] & 0x0f ) * 0x2000; - m_bank_base[6] = get_rom_base() + ( m_selected_bank[2] & 0x0f ) * 0x2000; - m_bank_base[7] = get_rom_base() + ( m_selected_bank[3] & 0x0f ) * 0x2000; -} - - -void msx_cart_majutsushi_device::device_reset() -{ - for (int i = 0; i < 4; i++) - { - m_selected_bank[i] = i; - } -} - - void msx_cart_majutsushi_device::initialize_cartridge() { - if ( get_rom_size() != 0x20000 ) + if (get_rom_size() != 0x20000) { fatalerror("majutsushi: Invalid ROM size\n"); } - restore_banks(); -} - + for (int i = 0; i < 3; i++) + m_rombank[i]->configure_entries(0, 16, get_rom_base(), 0x2000); -uint8_t msx_cart_majutsushi_device::read_cart(offs_t offset) -{ - return m_bank_base[offset >> 13][offset & 0x1fff]; + page(0)->install_rom(0x0000, 0x1fff, get_rom_base()); + page(0)->install_read_bank(0x2000, 0x3fff, m_rombank[0]); + page(1)->install_rom(0x4000, 0x5fff, get_rom_base()); + page(1)->install_write_handler(0x5000, 0x5000, 0, 0x0fff, 0, write8smo_delegate(m_dac, FUNC(dac_byte_interface::write))); + page(1)->install_read_bank(0x6000, 0x7fff, m_rombank[0]); + page(1)->install_write_handler(0x6000, 0x6000, 0, 0x1fff, 0, write8smo_delegate(*this, FUNC(msx_cart_majutsushi_device::bank_w<0>))); + page(2)->install_read_bank(0x8000, 0x9fff, m_rombank[1]); + page(2)->install_write_handler(0x8000, 0x8000, 0, 0x1fff, 0, write8smo_delegate(*this, FUNC(msx_cart_majutsushi_device::bank_w<1>))); + page(2)->install_read_bank(0xa000, 0xbfff, m_rombank[2]); + page(2)->install_write_handler(0xa000, 0xa000, 0, 0x1fff, 0, write8smo_delegate(*this, FUNC(msx_cart_majutsushi_device::bank_w<2>))); + page(3)->install_read_bank(0xc000, 0xdfff, m_rombank[1]); + page(3)->install_read_bank(0xe000, 0xffff, m_rombank[2]); } - -void msx_cart_majutsushi_device::write_cart(offs_t offset, uint8_t data) +template +void msx_cart_majutsushi_device::bank_w(u8 data) { - switch (offset & 0xe000) - { - case 0x4000: - if (offset & 0x1000) - { - m_dac->write(data); - } - break; - - case 0x6000: - m_selected_bank[1] = data & 0x0f; - m_bank_base[1] = get_rom_base() + m_selected_bank[1] * 0x2000; - m_bank_base[3] = get_rom_base() + m_selected_bank[1] * 0x2000; - break; - - case 0x8000: - m_selected_bank[2] = data & 0x0f; - m_bank_base[4] = get_rom_base() + m_selected_bank[2] * 0x2000; - m_bank_base[6] = get_rom_base() + m_selected_bank[2] * 0x2000; - break; - - case 0xa000: - m_selected_bank[3] = data & 0x0f; - m_bank_base[5] = get_rom_base() + m_selected_bank[3] * 0x2000; - m_bank_base[7] = get_rom_base() + m_selected_bank[3] * 0x2000; - break; - } + m_rombank[Bank]->set_entry(data & 0x0f); } diff --git a/src/devices/bus/msx_cart/majutsushi.h b/src/devices/bus/msx_cart/majutsushi.h index ebdf549272e..96ea5261ca6 100644 --- a/src/devices/bus/msx_cart/majutsushi.h +++ b/src/devices/bus/msx_cart/majutsushi.h @@ -15,28 +15,21 @@ DECLARE_DEVICE_TYPE(MSX_CART_MAJUTSUSHI, msx_cart_majutsushi_device) class msx_cart_majutsushi_device : public device_t, public msx_cart_interface { public: - msx_cart_majutsushi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_majutsushi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_reset() override; - virtual void device_post_load() override; + virtual void device_start() override { } virtual void device_add_mconfig(machine_config &config) override; - void restore_banks(); - private: - required_device m_dac; + template void bank_w(u8 data); - uint8_t m_selected_bank[4]; - uint8_t *m_bank_base[8]; + required_device m_dac; + memory_bank_array_creator<3> m_rombank; }; diff --git a/src/devices/bus/msx_cart/moonsound.cpp b/src/devices/bus/msx_cart/moonsound.cpp index 07ae53f6fca..2ffa68fc1f6 100644 --- a/src/devices/bus/msx_cart/moonsound.cpp +++ b/src/devices/bus/msx_cart/moonsound.cpp @@ -21,21 +21,19 @@ TODO: DEFINE_DEVICE_TYPE(MSX_CART_MOONSOUND, msx_cart_moonsound_device, "msx_moonsound", "MSX Cartridge - MoonSound") -msx_cart_moonsound_device::msx_cart_moonsound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_moonsound_device::msx_cart_moonsound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_MOONSOUND, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_ymf278b(*this, "ymf278b") { } - void msx_cart_moonsound_device::ymf278b_map(address_map &map) { map(0x000000, 0x1fffff).rom(); map(0x200000, 0x3fffff).ram(); // 2MB sram for testing } - void msx_cart_moonsound_device::device_add_mconfig(machine_config &config) { // The moonsound cartridge has a separate stereo output. @@ -53,70 +51,48 @@ void msx_cart_moonsound_device::device_add_mconfig(machine_config &config) m_ymf278b->add_route(5, "rspeaker", 0.50); } - -ROM_START( msx_cart_moonsound ) +ROM_START(msx_cart_moonsound) ROM_REGION(0x400000, "ymf278b", 0) ROM_LOAD("yrw801.rom", 0x0, 0x200000, CRC(2a9d8d43) SHA1(32760893ce06dbe3930627755ba065cc3d8ec6ca)) ROM_END - const tiny_rom_entry *msx_cart_moonsound_device::device_rom_region() const { - return ROM_NAME( msx_cart_moonsound ); + return ROM_NAME(msx_cart_moonsound); } - void msx_cart_moonsound_device::device_start() { // Install IO read/write handlers io_space().install_readwrite_handler(0x7e, 0x7f, read8sm_delegate(*this, FUNC(msx_cart_moonsound_device::read_ymf278b_pcm)), write8sm_delegate(*this, FUNC(msx_cart_moonsound_device::write_ymf278b_pcm))); - io_space().install_readwrite_handler(0xc4, 0xc7, read8sm_delegate(*this, FUNC(msx_cart_moonsound_device::read_ymf278b_fm)), write8sm_delegate(*this, FUNC(msx_cart_moonsound_device::write_ymf278b_fm))); + io_space().install_readwrite_handler(0xc4, 0xc7, read8sm_delegate(m_ymf278b, FUNC(ymf278b_device::read)), write8sm_delegate(m_ymf278b, FUNC(ymf278b_device::write))); io_space().install_read_handler(0xc0, 0xc0, read8smo_delegate(*this, FUNC(msx_cart_moonsound_device::read_c0))); } - void msx_cart_moonsound_device::device_reset() { } - WRITE_LINE_MEMBER(msx_cart_moonsound_device::irq_w) { LOG("moonsound: irq state %d\n", state); irq_out(state); } - -void msx_cart_moonsound_device::write_ymf278b_fm(offs_t offset, uint8_t data) -{ - LOG("moonsound: write 0x%02x, data 0x%02x\n", 0xc4 + offset, data); - m_ymf278b->write(offset, data); -} - - -uint8_t msx_cart_moonsound_device::read_ymf278b_fm(offs_t offset) -{ - LOG("moonsound: read 0x%02x\n", 0xc4 + offset); - return m_ymf278b->read(offset); -} - - -void msx_cart_moonsound_device::write_ymf278b_pcm(offs_t offset, uint8_t data) +void msx_cart_moonsound_device::write_ymf278b_pcm(offs_t offset, u8 data) { LOG("moonsound: write 0x%02x, data 0x%02x\n", 0x7e + offset, data); m_ymf278b->write(4 + offset, data); } - -uint8_t msx_cart_moonsound_device::read_ymf278b_pcm(offs_t offset) +u8 msx_cart_moonsound_device::read_ymf278b_pcm(offs_t offset) { LOG("moonsound: read 0x%02x\n", 0x7e + offset); return m_ymf278b->read(4 + offset); } - // For detecting presence of moonsound cartridge -uint8_t msx_cart_moonsound_device::read_c0() +u8 msx_cart_moonsound_device::read_c0() { LOG("moonsound: read 0xc0\n"); return 0x00; diff --git a/src/devices/bus/msx_cart/moonsound.h b/src/devices/bus/msx_cart/moonsound.h index 62f614ae729..c5b1daa4287 100644 --- a/src/devices/bus/msx_cart/moonsound.h +++ b/src/devices/bus/msx_cart/moonsound.h @@ -15,7 +15,7 @@ DECLARE_DEVICE_TYPE(MSX_CART_MOONSOUND, msx_cart_moonsound_device) class msx_cart_moonsound_device : public device_t, public msx_cart_interface { public: - msx_cart_moonsound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_moonsound_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); protected: // device-level overrides @@ -27,12 +27,9 @@ protected: private: DECLARE_WRITE_LINE_MEMBER(irq_w); - void write_ymf278b_fm(offs_t offset, uint8_t data); - uint8_t read_ymf278b_fm(offs_t offset); - void write_ymf278b_pcm(offs_t offset, uint8_t data); - uint8_t read_ymf278b_pcm(offs_t offset); - uint8_t read_c0(); - + void write_ymf278b_pcm(offs_t offset, u8 data); + u8 read_ymf278b_pcm(offs_t offset); + u8 read_c0(); void ymf278b_map(address_map &map); required_device m_ymf278b; diff --git a/src/devices/bus/msx_cart/msx_audio.cpp b/src/devices/bus/msx_cart/msx_audio.cpp index 3f8fd1fd772..471fe4b3f2e 100644 --- a/src/devices/bus/msx_cart/msx_audio.cpp +++ b/src/devices/bus/msx_cart/msx_audio.cpp @@ -54,7 +54,7 @@ For testing the sample ram (playback of a cuckoo sound, the volume of the sound - CALL COPY PCM(#1,0) - CALL PLAY PCM(0) -See also http://www.mccm.hetlab.tk/millennium/milc/gc/topic_26.htm (dutch) +See also https://www.msxcomputermagazine.nl/mccm/millennium/milc/gc/topic_26.htm (dutch) and/or http://ngs.no.coocan.jp/doc/wiki.cgi/datapack?page=4.2+MSX-AUDIO+%B3%C8%C4%A5BASIC (japanese) @@ -72,14 +72,13 @@ DEFINE_DEVICE_TYPE(MSX_CART_MSX_AUDIO_NMS1205, msx_cart_msx_audio_nms1205_device DEFINE_DEVICE_TYPE(MSX_CART_MSX_AUDIO_FSCA1, msx_cart_msx_audio_fsca1_device, "msx_audio_fsca1", "MSX Cartridge - MSX-AUDIO FS-CA1") -msx_cart_msx_audio_hxmu900_device::msx_cart_msx_audio_hxmu900_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_msx_audio_hxmu900_device::msx_cart_msx_audio_hxmu900_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_MSX_AUDIO_HXMU900, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_y8950(*this, "y8950") { } - void msx_cart_msx_audio_hxmu900_device::device_add_mconfig(machine_config &config) { // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. @@ -92,7 +91,6 @@ void msx_cart_msx_audio_hxmu900_device::device_add_mconfig(machine_config &confi MSX_AUDIO_KBDC_PORT(config, "kbdc", msx_audio_keyboards, nullptr); } - void msx_cart_msx_audio_hxmu900_device::device_start() { // Install IO read/write handlers @@ -100,34 +98,24 @@ void msx_cart_msx_audio_hxmu900_device::device_start() io_space().install_read_handler(0xc0, 0xc1, read8sm_delegate(*m_y8950, FUNC(y8950_device::read))); } - void msx_cart_msx_audio_hxmu900_device::initialize_cartridge() { if (get_rom_size() < 0x8000) { fatalerror("msx_audio: Invalid ROM size\n"); } -} - -uint8_t msx_cart_msx_audio_hxmu900_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0xC000) - { - return m_rom[offset - 0x4000]; - } - return 0xff; + page(1)->install_rom(0x4000, 0x7fff, get_rom_base()); + page(2)->install_rom(0x8000, 0xbfff, get_rom_base() + 0x4000); } - -ROM_START( msx_hxmu ) +ROM_START(msx_hxmu) ROM_REGION(0x8000, "y8950", ROMREGION_ERASE00) ROM_END - const tiny_rom_entry *msx_cart_msx_audio_hxmu900_device::device_rom_region() const { - return ROM_NAME( msx_hxmu ); + return ROM_NAME(msx_hxmu); } @@ -144,7 +132,6 @@ msx_cart_msx_audio_nms1205_device::msx_cart_msx_audio_nms1205_device(const machi { } - void msx_cart_msx_audio_nms1205_device::device_add_mconfig(machine_config &config) { // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. @@ -167,18 +154,15 @@ void msx_cart_msx_audio_nms1205_device::device_add_mconfig(machine_config &confi MIDI_PORT(config, m_mdout, midiout_slot, "midiout"); } - -ROM_START( msx_nms1205 ) +ROM_START(msx_nms1205) ROM_REGION(0x8000, "y8950", ROMREGION_ERASE00) ROM_END - const tiny_rom_entry *msx_cart_msx_audio_nms1205_device::device_rom_region() const { - return ROM_NAME( msx_nms1205 ); + return ROM_NAME(msx_nms1205); } - WRITE_LINE_MEMBER(msx_cart_msx_audio_nms1205_device::irq_write) { // Trigger IRQ on the maincpu @@ -188,7 +172,6 @@ WRITE_LINE_MEMBER(msx_cart_msx_audio_nms1205_device::irq_write) // m_out_irq_cb(state); } - WRITE_LINE_MEMBER(msx_cart_msx_audio_nms1205_device::midi_in) { // MIDI in signals is sent to both the 6850 and the MIDI thru output port @@ -196,7 +179,6 @@ WRITE_LINE_MEMBER(msx_cart_msx_audio_nms1205_device::midi_in) m_mdthru->write_txd(state); } - void msx_cart_msx_audio_nms1205_device::device_start() { // Install IO read/write handlers @@ -206,23 +188,14 @@ void msx_cart_msx_audio_nms1205_device::device_start() io_space().install_read_handler(0x04, 0x05, read8sm_delegate(*m_acia6850, FUNC(acia6850_device::read))); } - void msx_cart_msx_audio_nms1205_device::initialize_cartridge() { if (get_rom_size() < 0x8000) { fatalerror("msx_audio: Invalid ROM size\n"); } -} - - -uint8_t msx_cart_msx_audio_nms1205_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0xC000) - { - return m_rom[offset - 0x4000]; - } - return 0xff; + page(1)->install_rom(0x4000, 0x7fff, get_rom_base()); + page(2)->install_rom(0x8000, 0xbfff, get_rom_base() + 0x4000); } @@ -237,12 +210,13 @@ msx_cart_msx_audio_fsca1_device::msx_cart_msx_audio_fsca1_device(const machine_c , m_y8950(*this, "y8950") , m_io_config(*this, "CONFIG") , m_region_y8950(*this, "y8950") - , m_7ffe(0) + , m_rombank(*this, "rombank%u", 0U) + , m_view0(*this, "view0") + , m_view1(*this, "view1") , m_7fff(0) { } - void msx_cart_msx_audio_fsca1_device::device_add_mconfig(machine_config &config) { // This is actually incorrect. The sound output is passed back into the MSX machine where it is mixed internally and output through the system 'speaker'. @@ -257,8 +231,7 @@ void msx_cart_msx_audio_fsca1_device::device_add_mconfig(machine_config &config) MSX_AUDIO_KBDC_PORT(config, "kbdc", msx_audio_keyboards, nullptr); } - -static INPUT_PORTS_START( msx_audio_fsca1 ) +static INPUT_PORTS_START(msx_audio_fsca1) PORT_START("CONFIG") PORT_CONFNAME( 0x04, 0x04, "FS-CA1 Firmware switch") PORT_CONFSETTING( 0x04, "On" ) @@ -266,31 +239,35 @@ static INPUT_PORTS_START( msx_audio_fsca1 ) PORT_BIT(0xFB, IP_ACTIVE_HIGH, IPT_UNKNOWN) INPUT_PORTS_END - ioport_constructor msx_cart_msx_audio_fsca1_device::device_input_ports() const { - return INPUT_PORTS_NAME( msx_audio_fsca1 ); + return INPUT_PORTS_NAME(msx_audio_fsca1); } - -ROM_START( msx_fsca1 ) +ROM_START(msx_fsca1) ROM_REGION(0x8000, "y8950", ROMREGION_ERASE00) ROM_END - const tiny_rom_entry *msx_cart_msx_audio_fsca1_device::device_rom_region() const { - return ROM_NAME( msx_fsca1 ); + return ROM_NAME(msx_fsca1); } - void msx_cart_msx_audio_fsca1_device::device_start() { // Install IO read/write handlers io_space().install_write_handler(0xc0, 0xc3, write8sm_delegate(*this, FUNC(msx_cart_msx_audio_fsca1_device::write_y8950))); io_space().install_read_handler(0xc0, 0xc3, read8sm_delegate(*this, FUNC(msx_cart_msx_audio_fsca1_device::read_y8950))); + save_item(NAME(m_7fff)); } +void msx_cart_msx_audio_fsca1_device::device_reset() +{ + m_view0.select(0); + m_view1.select(0); + m_rombank[0]->set_entry(0); + m_rombank[1]->set_entry(0); +} void msx_cart_msx_audio_fsca1_device::initialize_cartridge() { @@ -298,82 +275,67 @@ void msx_cart_msx_audio_fsca1_device::initialize_cartridge() { fatalerror("msx_audio_fsca1: Invalid ROM size\n"); } -} - - -uint8_t msx_cart_msx_audio_fsca1_device::read_cart(offs_t offset) -{ - if (m_7ffe == 0 && (offset & 0xB000) == 0x3000) - { - return m_sram[offset & 0xfff]; - } - return m_rom[((m_7ffe & 0x03) << 15) | (offset & 0x7fff)]; -} + m_rombank[0]->configure_entries(0, 4, get_rom_base(), 0x8000); + m_rombank[1]->configure_entries(0, 4, get_rom_base() + 0x4000, 0x8000); -void msx_cart_msx_audio_fsca1_device::write_cart(offs_t offset, uint8_t data) -{ - if (offset == 0x7ffe) - { - m_7ffe = data; - return; - } + page(0)->install_view(0x0000, 0x3fff, m_view0); + m_view0[0].install_read_bank(0x0000, 0x3fff, m_rombank[0]); + m_view0[0].install_ram(0x3000, 0x3fff, get_sram_base()); + m_view0[1].install_read_bank(0x0000, 0x3fff, m_rombank[0]); - if (offset == 0x7fff) - { - m_7fff = data; - return; - } + page(1)->install_view(0x4000, 0x7fff, m_view1); + m_view1[0].install_read_bank(0x4000, 0x7ffd, m_rombank[1]); + m_view1[0].install_ram(0x7000, 0x7ffd, get_sram_base()); + m_view1[1].install_read_bank(0x4000, 0x7ffd, m_rombank[1]); + page(1)->install_write_handler(0x7ffe, 0x7ffe, write8smo_delegate(*this, FUNC(msx_cart_msx_audio_fsca1_device::bank_w))); + page(1)->install_write_handler(0x7fff, 0x7fff, write8smo_delegate(*this, FUNC(msx_cart_msx_audio_fsca1_device::write_7fff))); - if (m_7ffe == 0 && (offset & 0xb000) == 0x3000) - { - m_sram[offset & 0xfff] = data; - return; - } + page(2)->install_read_bank(0x8000, 0xbfff, m_rombank[0]); + page(3)->install_read_bank(0xc000, 0xffff, m_rombank[1]); +} - logerror("msx_cart_msx_audio_fsca1_device: Unhandled write %02x to %04x\n", data, offset); +void msx_cart_msx_audio_fsca1_device::bank_w(u8 data) +{ + m_rombank[0]->set_entry(data & 0x03); + m_rombank[1]->set_entry(data & 0x03); + m_view0.select((data != 0) ? 1 : 0); + m_view1.select((data != 0) ? 1 : 0); } +void msx_cart_msx_audio_fsca1_device::write_7fff(u8 data) +{ + m_7fff = data; +} -void msx_cart_msx_audio_fsca1_device::write_y8950(offs_t offset, uint8_t data) +void msx_cart_msx_audio_fsca1_device::write_y8950(offs_t offset, u8 data) { if (offset & 2) { if (m_7fff & 0x02) - { m_y8950->write(offset, data); - } } else { if (m_7fff & 0x01) - { m_y8950->write(offset, data); - } } } - -uint8_t msx_cart_msx_audio_fsca1_device::read_y8950(offs_t offset) +u8 msx_cart_msx_audio_fsca1_device::read_y8950(offs_t offset) { if (offset & 2) - { return (m_7fff & 0x02) ? m_y8950->read(offset) : 0xff; - } else - { return (m_7fff & 0x01) ? m_y8950->read(offset) : 0xff; - } } - -void msx_cart_msx_audio_fsca1_device::y8950_io_w(uint8_t data) +void msx_cart_msx_audio_fsca1_device::y8950_io_w(u8 data) { logerror("msx_fsca1::y8950_io_w: %02x\n", data); } - -uint8_t msx_cart_msx_audio_fsca1_device::y8950_io_r() +u8 msx_cart_msx_audio_fsca1_device::y8950_io_r() { return m_io_config->read(); } diff --git a/src/devices/bus/msx_cart/msx_audio.h b/src/devices/bus/msx_cart/msx_audio.h index 490169244af..96c44d637d8 100644 --- a/src/devices/bus/msx_cart/msx_audio.h +++ b/src/devices/bus/msx_cart/msx_audio.h @@ -19,12 +19,10 @@ DECLARE_DEVICE_TYPE(MSX_CART_MSX_AUDIO_FSCA1, msx_cart_msx_audio_fsca1_device) class msx_cart_msx_audio_hxmu900_device : public device_t, public msx_cart_interface { public: - msx_cart_msx_audio_hxmu900_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_msx_audio_hxmu900_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - virtual uint8_t read_cart(offs_t offset) override; - protected: virtual void device_start() override; @@ -40,12 +38,10 @@ private: class msx_cart_msx_audio_nms1205_device : public device_t, public msx_cart_interface { public: - msx_cart_msx_audio_nms1205_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_msx_audio_nms1205_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - virtual uint8_t read_cart(offs_t offset) override; - protected: virtual void device_start() override; @@ -67,15 +63,13 @@ private: class msx_cart_msx_audio_fsca1_device : public device_t, public msx_cart_interface { public: - msx_cart_msx_audio_fsca1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_msx_audio_fsca1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - virtual uint8_t read_cart(offs_t offset) override; - virtual void write_cart(offs_t offset, uint8_t data) override; - protected: virtual void device_start() override; + virtual void device_reset() override; // device-level overrides virtual void device_add_mconfig(machine_config &config) override; @@ -83,17 +77,20 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - void write_y8950(offs_t offset, uint8_t data); - uint8_t read_y8950(offs_t offset); - - void y8950_io_w(uint8_t data); - uint8_t y8950_io_r(); + void write_y8950(offs_t offset, u8 data); + u8 read_y8950(offs_t offset); + void y8950_io_w(u8 data); + u8 y8950_io_r(); + void bank_w(u8 data); + void write_7fff(u8 data); required_device m_y8950; required_ioport m_io_config; required_memory_region m_region_y8950; - uint8_t m_7ffe; - uint8_t m_7fff; + memory_bank_array_creator<2> m_rombank; + memory_view m_view0; + memory_view m_view1; + u8 m_7fff; }; #endif // MAME_BUS_MSX_CART_MSX_AUDIO_H diff --git a/src/devices/bus/msx_cart/msx_audio_kb.cpp b/src/devices/bus/msx_cart/msx_audio_kb.cpp index aba915ed718..94b712a9429 100644 --- a/src/devices/bus/msx_cart/msx_audio_kb.cpp +++ b/src/devices/bus/msx_cart/msx_audio_kb.cpp @@ -13,7 +13,7 @@ msx_audio_kb_port_interface::msx_audio_kb_port_interface(machine_config const &m } -msx_audio_kbdc_port_device::msx_audio_kbdc_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_audio_kbdc_port_device::msx_audio_kbdc_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_AUDIO_KBDC_PORT, tag, owner, clock) , device_single_card_slot_interface(mconfig, *this) , m_keyboard(nullptr) @@ -27,14 +27,14 @@ void msx_audio_kbdc_port_device::device_start() } -void msx_audio_kbdc_port_device::write(uint8_t data) +void msx_audio_kbdc_port_device::write(u8 data) { if (m_keyboard) m_keyboard->write(data); } -uint8_t msx_audio_kbdc_port_device::read() +u8 msx_audio_kbdc_port_device::read() { if (m_keyboard) return m_keyboard->read(); @@ -50,7 +50,7 @@ DECLARE_DEVICE_TYPE(MSX_AUDIO_KB_NMS1160, msx_nms1160_device) class msx_hxmu901_device : public device_t, public msx_audio_kb_port_interface { public: - msx_hxmu901_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + msx_hxmu901_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_AUDIO_KB_HXMU901, tag, owner, clock) , msx_audio_kb_port_interface(mconfig, *this) , m_row(0) @@ -60,9 +60,9 @@ public: virtual ioport_constructor device_input_ports() const override; - virtual uint8_t read() override + virtual u8 read() override { - uint8_t result = 0xff; + u8 result = 0xff; for (int i = 0; i < 8; i++) { @@ -74,7 +74,7 @@ public: return result; } - virtual void write(uint8_t data) override + virtual void write(u8 data) override { m_row = data; } @@ -88,7 +88,7 @@ private: }; -static INPUT_PORTS_START( hxmu901) +static INPUT_PORTS_START(hxmu901) PORT_START("KEY.0") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C#1") PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D1") @@ -173,14 +173,14 @@ INPUT_PORTS_END ioport_constructor msx_hxmu901_device::device_input_ports() const { - return INPUT_PORTS_NAME( hxmu901 ); + return INPUT_PORTS_NAME(hxmu901); } class msx_nms1160_device : public device_t, public msx_audio_kb_port_interface { public: - msx_nms1160_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + msx_nms1160_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_AUDIO_KB_NMS1160, tag, owner, clock) , msx_audio_kb_port_interface(mconfig, *this) , m_row(0) @@ -190,9 +190,9 @@ public: virtual ioport_constructor device_input_ports() const override; - virtual uint8_t read() override + virtual u8 read() override { - uint8_t result = 0xff; + u8 result = 0xff; for (int i = 0; i < 8; i++) { @@ -204,7 +204,7 @@ public: return result; } - virtual void write(uint8_t data) override + virtual void write(u8 data) override { logerror("msx_nms1160::write %02x\n", data); m_row = data; @@ -219,7 +219,7 @@ private: }; -static INPUT_PORTS_START( nms1160 ) +static INPUT_PORTS_START(nms1160) PORT_START("KEY.0") PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C1") PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C#1") @@ -302,7 +302,7 @@ INPUT_PORTS_END ioport_constructor msx_nms1160_device::device_input_ports() const { - return INPUT_PORTS_NAME( nms1160 ); + return INPUT_PORTS_NAME(nms1160); } diff --git a/src/devices/bus/msx_cart/msx_audio_kb.h b/src/devices/bus/msx_cart/msx_audio_kb.h index ecab5732c98..c347fd3add0 100644 --- a/src/devices/bus/msx_cart/msx_audio_kb.h +++ b/src/devices/bus/msx_cart/msx_audio_kb.h @@ -25,18 +25,18 @@ public: // construction/destruction template msx_audio_kbdc_port_device(machine_config const &mconfig, char const *tag, device_t *owner, T &&opts, char const *dflt) - : msx_audio_kbdc_port_device(mconfig, tag, owner, (uint32_t)0) + : msx_audio_kbdc_port_device(mconfig, tag, owner, u32(0)) { option_reset(); opts(*this); set_default_option(dflt); set_fixed(false); } - msx_audio_kbdc_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_audio_kbdc_port_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // Physical connection simply consists of 8 input and 8 output lines split across 2 connectors - void write(uint8_t data); - uint8_t read(); + void write(u8 data); + u8 read(); protected: // device-level overrides diff --git a/src/devices/bus/msx_cart/msxdos2.cpp b/src/devices/bus/msx_cart/msxdos2.cpp index 7f3e506b007..1deb7081051 100644 --- a/src/devices/bus/msx_cart/msxdos2.cpp +++ b/src/devices/bus/msx_cart/msxdos2.cpp @@ -3,42 +3,26 @@ #include "emu.h" #include "msxdos2.h" +// This is the bare minimum to get a msx-dos 2 rom working in a system +// TODO: +// - Add subslots for regular rom and kanji driver rom +// - Add support for 128KB and 256KB memory mapper versions + DEFINE_DEVICE_TYPE(MSX_CART_MSXDOS2, msx_cart_msxdos2_device, "msx_cart_msxdos2", "MSX Cartridge - MSXDOS2") -msx_cart_msxdos2_device::msx_cart_msxdos2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_msxdos2_device::msx_cart_msxdos2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_MSXDOS2, tag, owner, clock) , msx_cart_interface(mconfig, *this) - , m_selected_bank(0) - , m_bank_base(nullptr) -{ -} - - -void msx_cart_msxdos2_device::device_start() -{ - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_msxdos2_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_msxdos2_device::restore_banks() + , m_rombank(*this, "rombank") { - m_bank_base = get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000; } - void msx_cart_msxdos2_device::device_reset() { - m_selected_bank = 0; + m_rombank->set_entry(1); } - void msx_cart_msxdos2_device::initialize_cartridge() { if (get_rom_size() != 0x10000) @@ -46,26 +30,13 @@ void msx_cart_msxdos2_device::initialize_cartridge() fatalerror("msxdos2: Invalid ROM size\n"); } - restore_banks(); -} - - -uint8_t msx_cart_msxdos2_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0x8000) - { - return m_bank_base[offset & 0x3fff]; - } + m_rombank->configure_entries(0, 4, get_rom_base(), 0x4000); - return 0xff; + page(1)->install_read_bank(0x4000, 0x7fff, m_rombank); + page(1)->install_write_handler(0x7ffe, 0x7ffe, write8smo_delegate(*this, FUNC(msx_cart_msxdos2_device::bank_w))); } - -void msx_cart_msxdos2_device::write_cart(offs_t offset, uint8_t data) +void msx_cart_msxdos2_device::bank_w(u8 data) { - if (offset == 0x6000) - { - m_selected_bank = data; - restore_banks(); - } + m_rombank->set_entry(data & 0x03); } diff --git a/src/devices/bus/msx_cart/msxdos2.h b/src/devices/bus/msx_cart/msxdos2.h index dd5eb51d245..863638837c3 100644 --- a/src/devices/bus/msx_cart/msxdos2.h +++ b/src/devices/bus/msx_cart/msxdos2.h @@ -14,24 +14,19 @@ DECLARE_DEVICE_TYPE(MSX_CART_MSXDOS2, msx_cart_msxdos2_device) class msx_cart_msxdos2_device : public device_t, public msx_cart_interface { public: - msx_cart_msxdos2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_msxdos2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_start() override { } virtual void device_reset() override; - virtual void device_post_load() override; - - void restore_banks(); private: - uint8_t m_selected_bank; - uint8_t *m_bank_base; + void bank_w(u8 data); + + memory_bank_creator m_rombank; }; diff --git a/src/devices/bus/msx_cart/nomapper.cpp b/src/devices/bus/msx_cart/nomapper.cpp index 24ebbb38e0d..ed4676237ca 100644 --- a/src/devices/bus/msx_cart/nomapper.cpp +++ b/src/devices/bus/msx_cart/nomapper.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_NOMAPPER, msx_cart_nomapper_device, "msx_cart_nomapper", "MSX Cartridge - ROM") -msx_cart_nomapper_device::msx_cart_nomapper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_nomapper_device::msx_cart_nomapper_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_NOMAPPER, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_start_address(0) @@ -15,22 +15,41 @@ msx_cart_nomapper_device::msx_cart_nomapper_device(const machine_config &mconfig { } -void msx_cart_nomapper_device::device_start() +void msx_cart_nomapper_device::install_memory() { + u32 start_address = m_start_address; + u32 rom_offset = 0; + + if (m_start_address != 0x0000 && m_start_address != 0x4000 && m_start_address != 0x8000 && m_start_address != 0xc000) + { + fatalerror("nomapper: Unsupported start address %04x\n", m_start_address); + } + + for (int i = 0; i < 4; i++) + { + if (start_address < (i + 1) * 0x4000 && start_address < m_end_address) + { + if (page(i)) + { + page(i)->install_rom(start_address, std::min(start_address + 0x3fff, m_end_address - 1), get_rom_base() + rom_offset); + } + rom_offset += 0x4000; + start_address += 0x4000; + } + } } void msx_cart_nomapper_device::initialize_cartridge() { - uint32_t size = get_rom_size(); - uint8_t *rom = get_rom_base(); + u32 size = get_rom_size(); + u8 *rom = get_rom_base(); - // determine start address - // default to $4000 + // determine start address, default to 0x4000 m_start_address = 0x4000; switch (size) { - /* 8KB/16KB */ + // 8KB/16KB case 0x2000: case 0x4000: { uint16_t start = rom[3] << 8 | rom[2]; @@ -51,7 +70,7 @@ void msx_cart_nomapper_device::initialize_cartridge() break; } - /* 32KB */ + // 32KB case 0x8000: // take default, check when no "AB" at $0000, but "AB" at $4000 if (rom[0] != 'A' && rom[1] != 'B' && rom[0x4000] == 'A' && rom[0x4001] == 'B') @@ -65,7 +84,7 @@ void msx_cart_nomapper_device::initialize_cartridge() break; - /* 48KB */ + // 48KB case 0xc000: // "AB" at $0000, but no "AB" at $4000, not "AB": $0000 if (rom[0] == 'A' && rom[1] == 'B' && rom[0x4000] != 'A' && rom[0x4001] != 'B') @@ -75,20 +94,13 @@ void msx_cart_nomapper_device::initialize_cartridge() break; - /* 64KB */ + // 64KB default: m_start_address = 0; break; } - m_end_address = std::min(m_start_address + size, 0x10000); -} + m_end_address = std::min(m_start_address + size, 0x10000); -uint8_t msx_cart_nomapper_device::read_cart(offs_t offset) -{ - if ( offset >= m_start_address && offset < m_end_address ) - { - return get_rom_base()[offset - m_start_address]; - } - return 0xff; + install_memory(); } diff --git a/src/devices/bus/msx_cart/nomapper.h b/src/devices/bus/msx_cart/nomapper.h index eb5e40e1d08..82407b11c16 100644 --- a/src/devices/bus/msx_cart/nomapper.h +++ b/src/devices/bus/msx_cart/nomapper.h @@ -17,15 +17,15 @@ public: msx_cart_nomapper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // device-level overrides - virtual void device_start() override; + virtual void device_start() override { } virtual void initialize_cartridge() override; - virtual uint8_t read_cart(offs_t offset) override; - private: uint32_t m_start_address; uint32_t m_end_address; + + void install_memory(); }; #endif // MAME_BUS_MSX_CART_NOMAPPER_H diff --git a/src/devices/bus/msx_cart/rtype.cpp b/src/devices/bus/msx_cart/rtype.cpp index 6cda0efb4e8..affcc4c843d 100644 --- a/src/devices/bus/msx_cart/rtype.cpp +++ b/src/devices/bus/msx_cart/rtype.cpp @@ -6,77 +6,31 @@ DEFINE_DEVICE_TYPE(MSX_CART_RTYPE, msx_cart_rtype_device, "msx_cart_rtype", "MSX Cartridge - R-Type") -msx_cart_rtype_device::msx_cart_rtype_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_rtype_device::msx_cart_rtype_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_RTYPE, tag, owner, clock) , msx_cart_interface(mconfig, *this) - , m_selected_bank(0) + , m_rombank(*this, "rombank") { - for (auto & elem : m_bank_base) - { - elem = nullptr; - } -} - - -void msx_cart_rtype_device::device_start() -{ - save_item(NAME(m_selected_bank)); } - -void msx_cart_rtype_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_rtype_device::restore_banks() -{ - m_bank_base[0] = get_rom_base() + 15 * 0x4000; - if (m_selected_bank & 0x10) - { - m_selected_bank &= 0x17; - } - m_bank_base[1] = get_rom_base() + m_selected_bank * 0x4000; -} - - -void msx_cart_rtype_device::device_reset() -{ - m_selected_bank = 15; -} - - void msx_cart_rtype_device::initialize_cartridge() { - if ( get_rom_size() != 0x80000 && get_rom_size() != 0x60000 ) + if (get_rom_size() != 0x80000 && get_rom_size() != 0x60000) { fatalerror("rtype: Invalid ROM size\n"); } - restore_banks(); -} - + m_rombank->configure_entries(0, 24, get_rom_base(), 0x4000); -uint8_t msx_cart_rtype_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0xc000) - { - return m_bank_base[offset >> 15][offset & 0x3fff]; - } - return 0xff; + page(1)->install_rom(0x4000, 0x7fff, get_rom_base() + 15 * 0x4000); + page(1)->install_write_handler(0x7000, 0x7fff, write8smo_delegate(*this, FUNC(msx_cart_rtype_device::bank_w))); + page(2)->install_read_bank(0x8000, 0xbfff, m_rombank); } - -void msx_cart_rtype_device::write_cart(offs_t offset, uint8_t data) +void msx_cart_rtype_device::bank_w(u8 data) { - if (offset >= 0x7000 && offset < 0x8000) - { - m_selected_bank = data & 0x1f; - if (m_selected_bank & 0x10) - { - m_selected_bank &= 0x17; - } - m_bank_base[1] = get_rom_base() + m_selected_bank * 0x4000; - } + data &= 0x1f; + if (data & 0x10) + data &= 0x17; + m_rombank->set_entry(data); } diff --git a/src/devices/bus/msx_cart/rtype.h b/src/devices/bus/msx_cart/rtype.h index 31583455a0a..f6d7afd325a 100644 --- a/src/devices/bus/msx_cart/rtype.h +++ b/src/devices/bus/msx_cart/rtype.h @@ -14,24 +14,18 @@ DECLARE_DEVICE_TYPE(MSX_CART_RTYPE, msx_cart_rtype_device) class msx_cart_rtype_device : public device_t, public msx_cart_interface { public: - msx_cart_rtype_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_rtype_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_reset() override; - virtual void device_post_load() override; - - void restore_banks(); + virtual void device_start() override { } private: - uint8_t m_selected_bank; - uint8_t *m_bank_base[2]; + void bank_w(u8 data); + + memory_bank_creator m_rombank; }; diff --git a/src/devices/bus/msx_cart/super_swangi.cpp b/src/devices/bus/msx_cart/super_swangi.cpp index b3385f96e29..61025db82e2 100644 --- a/src/devices/bus/msx_cart/super_swangi.cpp +++ b/src/devices/bus/msx_cart/super_swangi.cpp @@ -10,37 +10,10 @@ DEFINE_DEVICE_TYPE(MSX_CART_SUPER_SWANGI, msx_cart_super_swangi_device, "msx_car msx_cart_super_swangi_device::msx_cart_super_swangi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MSX_CART_SUPER_SWANGI, tag, owner, clock) , msx_cart_interface(mconfig, *this) - , m_selected_bank(0) + , m_rombank(*this, "rombank") { - m_bank_base[0] = m_bank_base[1] = nullptr; } - -void msx_cart_super_swangi_device::device_start() -{ - save_item(NAME(m_selected_bank)); -} - - -void msx_cart_super_swangi_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_super_swangi_device::restore_banks() -{ - m_bank_base[0] = get_rom_base(); - m_bank_base[1] = get_rom_base() + (((m_selected_bank >> 1) * 0x4000) & 0xffff); -} - - -void msx_cart_super_swangi_device::device_reset() -{ - m_selected_bank = 0; -} - - void msx_cart_super_swangi_device::initialize_cartridge() { if (get_rom_size() < 0x10000) @@ -48,29 +21,14 @@ void msx_cart_super_swangi_device::initialize_cartridge() fatalerror("super_swangi: Invalid ROM size\n"); } - restore_banks(); -} + m_rombank->configure_entries(0, 4, get_rom_base(), 0x4000); - -uint8_t msx_cart_super_swangi_device::read_cart(offs_t offset) -{ - if (offset >= 0x4000 && offset < 0xc000) - { - return m_bank_base[offset >> 15][offset & 0x3fff]; - } - return 0xff; + page(1)->install_rom(0x4000, 0x7fff, get_rom_base()); + page(2)->install_read_bank(0x8000, 0xbfff, m_rombank); + page(2)->install_write_handler(0x8000, 0x8000, write8smo_delegate(*this, FUNC(msx_cart_super_swangi_device::bank_w))); } - -void msx_cart_super_swangi_device::write_cart(offs_t offset, uint8_t data) +void msx_cart_super_swangi_device::bank_w(u8 data) { - if (offset == 0x8000) - { - m_selected_bank = data; - restore_banks(); - } - else - { - logerror("msx_cart_super_swangi_device: unhandled write %02x to %04x\n", data, offset); - } + m_rombank->set_entry((data >> 1) & 0x03); } diff --git a/src/devices/bus/msx_cart/super_swangi.h b/src/devices/bus/msx_cart/super_swangi.h index f0f5ee216bd..f0c3539c6ce 100644 --- a/src/devices/bus/msx_cart/super_swangi.h +++ b/src/devices/bus/msx_cart/super_swangi.h @@ -14,24 +14,18 @@ DECLARE_DEVICE_TYPE(MSX_CART_SUPER_SWANGI, msx_cart_super_swangi_device) class msx_cart_super_swangi_device : public device_t, public msx_cart_interface { public: - msx_cart_super_swangi_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_super_swangi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - 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_reset() override; - virtual void device_post_load() override; - - void restore_banks(); + virtual void device_start() override { } private: - uint8_t m_selected_bank; - uint8_t *m_bank_base[2]; + void bank_w(u8 data); + + memory_bank_creator m_rombank; }; diff --git a/src/devices/bus/msx_cart/superloderunner.cpp b/src/devices/bus/msx_cart/superloderunner.cpp index 168f9187f8d..70df5248f4e 100644 --- a/src/devices/bus/msx_cart/superloderunner.cpp +++ b/src/devices/bus/msx_cart/superloderunner.cpp @@ -6,36 +6,19 @@ DEFINE_DEVICE_TYPE(MSX_CART_SUPERLODERUNNER, msx_cart_superloderunner_device, "msx_cart_superloderunner", "MSX Cartridge - Super Lode Runner") -msx_cart_superloderunner_device::msx_cart_superloderunner_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_superloderunner_device::msx_cart_superloderunner_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_CART_SUPERLODERUNNER, tag, owner, clock) , msx_cart_interface(mconfig, *this) - , m_selected_bank(0) - , m_bank_base(nullptr) + , m_rombank(*this, "rombank") { } - void msx_cart_superloderunner_device::device_start() { - save_item(NAME(m_selected_bank)); - - // Install evil memory write handler - memory_space().install_write_handler(0x0000, 0x0000, write8smo_delegate(*this, FUNC(msx_cart_superloderunner_device::banking))); -} - - -void msx_cart_superloderunner_device::device_post_load() -{ - restore_banks(); -} - - -void msx_cart_superloderunner_device::restore_banks() -{ - m_bank_base = get_rom_base() + (m_selected_bank & 0x0f) * 0x4000; + // Install evil system wide memory write handler + memory_space().install_write_handler(0x0000, 0x0000, write8smo_delegate(*this, FUNC(msx_cart_superloderunner_device::bank_w))); } - void msx_cart_superloderunner_device::initialize_cartridge() { if (get_rom_size() != 0x20000) @@ -43,23 +26,12 @@ void msx_cart_superloderunner_device::initialize_cartridge() fatalerror("superloderunner: Invalid ROM size\n"); } - restore_banks(); -} + m_rombank->configure_entries(0, 8, get_rom_base(), 0x4000); - -uint8_t msx_cart_superloderunner_device::read_cart(offs_t offset) -{ - if (offset >= 0x8000 && offset < 0xc000) - { - return m_bank_base[offset & 0x3fff]; - } - - return 0xff; + page(2)->install_read_bank(0x8000, 0xbfff, m_rombank); } - -void msx_cart_superloderunner_device::banking(uint8_t data) +void msx_cart_superloderunner_device::bank_w(u8 data) { - m_selected_bank = data; - restore_banks(); + m_rombank->set_entry(data & 0x07); } diff --git a/src/devices/bus/msx_cart/superloderunner.h b/src/devices/bus/msx_cart/superloderunner.h index bd763ca2c08..91a41ab26ec 100644 --- a/src/devices/bus/msx_cart/superloderunner.h +++ b/src/devices/bus/msx_cart/superloderunner.h @@ -14,24 +14,18 @@ DECLARE_DEVICE_TYPE(MSX_CART_SUPERLODERUNNER, msx_cart_superloderunner_device) class msx_cart_superloderunner_device : public device_t, public msx_cart_interface { public: - msx_cart_superloderunner_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_superloderunner_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void initialize_cartridge() override; - virtual uint8_t read_cart(offs_t offset) override; - protected: // device-level overrides virtual void device_start() override; - virtual void device_post_load() override; - - void restore_banks(); private: - void banking(uint8_t data); + void bank_w(u8 data); - uint8_t m_selected_bank; - uint8_t *m_bank_base; + memory_bank_creator m_rombank; }; diff --git a/src/devices/bus/msx_cart/yamaha.cpp b/src/devices/bus/msx_cart/yamaha.cpp index b2cb15a37b0..80fc4281b89 100644 --- a/src/devices/bus/msx_cart/yamaha.cpp +++ b/src/devices/bus/msx_cart/yamaha.cpp @@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(MSX_CART_SFG01, msx_cart_sfg01_device, "msx_cart_sfg01", "MSX DEFINE_DEVICE_TYPE(MSX_CART_SFG05, msx_cart_sfg05_device, "msx_cart_sfg05", "MSX Cartridge - SFG05") -msx_cart_sfg_device::msx_cart_sfg_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_cart_sfg_device::msx_cart_sfg_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, type, tag, owner, clock) , msx_cart_interface(mconfig, *this) , m_region_sfg(*this, "sfg") @@ -30,19 +30,16 @@ msx_cart_sfg_device::msx_cart_sfg_device(const machine_config &mconfig, const de { } - -msx_cart_sfg01_device::msx_cart_sfg01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_sfg01_device::msx_cart_sfg01_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : msx_cart_sfg_device(mconfig, MSX_CART_SFG01, tag, owner, clock) { } - -msx_cart_sfg05_device::msx_cart_sfg05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_cart_sfg05_device::msx_cart_sfg05_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : msx_cart_sfg_device(mconfig, MSX_CART_SFG05, tag, owner, clock) { } - void msx_cart_sfg_device::device_add_mconfig(machine_config &config) { // YM2151 (OPM) @@ -78,65 +75,76 @@ void msx_cart_sfg05_device::device_add_mconfig(machine_config &config) ym2164.add_route(1, "rspeaker", 0.80); } - -ROM_START( msx_sfg01 ) +ROM_START(msx_sfg01) ROM_REGION(0x4000, "sfg", 0) ROM_LOAD("sfg01.rom", 0x0, 0x4000, CRC(0995fb36) SHA1(434651305f92aa770a89e40b81125fb22d91603d)) // correct label is almost certainly "yamaha__ym2211-22702__48_18_89_b.ic104" though the datecode portion may vary between late 1983 and mid 1984 ROM_END - const tiny_rom_entry *msx_cart_sfg01_device::device_rom_region() const { - return ROM_NAME( msx_sfg01 ); + return ROM_NAME(msx_sfg01); } - -ROM_START( msx_sfg05 ) +ROM_START(msx_sfg05) ROM_REGION(0x8000, "sfg", 0) - ROM_SYSTEM_BIOS( 0, "sfg05", "SFG05 (original)" ) - ROMX_LOAD( "sfg05.rom", 0x0, 0x8000, CRC(2425c279) SHA1(d956167e234f60ad916120437120f86fc8c3c321), ROM_BIOS(0) ) // correct label MIGHT be "yamaha__ym2301-23959.ic104" but this needs redump/verification - ROM_SYSTEM_BIOS( 1, "sfg05a", "SFG05 (SFG01 upgrade)" ) // SFG01 PCB, Yamaha official upgrade, has YM2151 instead of YM2164 - ROMX_LOAD( "sfg05a.rom", 0x0, 0x8000, CRC(5bc237f8) SHA1(930338f45c08228108c0831cc4a26014c2674718), ROM_BIOS(1) ) // this came on a single eprom on a daughterboard on an SFG01 board which had been factory upgraded to SFG05 + // Version string starts at $02BD + ROM_SYSTEM_BIOS(0, "m5.01.011", "SFG05 (original) M5.01.011") + ROMX_LOAD( "sfg05.rom", 0x0, 0x8000, CRC(2425c279) SHA1(d956167e234f60ad916120437120f86fc8c3c321), ROM_BIOS(0)) // correct label MIGHT be "yamaha__ym2301-23959.ic104" but this needs redump/verification + ROM_SYSTEM_BIOS(1, "m5.00.013", "SFG05 (SFG01 upgrade) M5.00.013") // SFG01 PCB, Yamaha official upgrade, has YM2151 instead of YM2164 + ROMX_LOAD( "sfg05a.rom", 0x0, 0x8000, CRC(5bc237f8) SHA1(930338f45c08228108c0831cc4a26014c2674718), ROM_BIOS(1)) // this came on a single eprom on a daughterboard on an SFG01 board which had been factory upgraded to SFG05 + ROM_SYSTEM_BIOS(2, "m5.00.011", "SFG05 M5.00.011") // Found in Sakhr AX-200M + ROMX_LOAD("sfg05_m5_00_011.rom", 0x0, 0x8000, BAD_DUMP CRC(9d5e20c9) SHA1(fcc385b90c65575e29fc009aa00b5120fc4c251a), ROM_BIOS(2)) // Still seems to have I/O reads at $7ff0 - $7fff ROM_END - const tiny_rom_entry *msx_cart_sfg05_device::device_rom_region() const { - return ROM_NAME( msx_sfg05 ); + return ROM_NAME(msx_sfg05); } - void msx_cart_sfg_device::device_start() { // Set rom mask m_rom_mask = m_region_sfg->bytes() - 1; - // This should probably moved up in the bus/slot hierarchy for the msx driver - cpu_device *maincpu = machine().device("maincpu"); - maincpu->set_irq_acknowledge_callback(*this, FUNC(msx_cart_sfg_device::irq_callback)); -} + maincpu().set_irq_acknowledge_callback(*this, FUNC(msx_cart_sfg_device::irq_callback)); + page(0)->install_rom(0x0000, 0x3fff, m_region_sfg->base()); + if (m_region_sfg->bytes() == 0x8000) + { + page(1)->install_rom(0x4000, 0x7fff, m_region_sfg->base() + 0x4000); + } + else + { + page(1)->install_rom(0x4000, 0x7fff, m_region_sfg->base()); + } + + for (int i = 0; i < 4; i++) + { + // These addresses deliberately overlap + page(i)->install_read_handler(0x4000 * i + 0x3ff0, 0x4000 * i + 0x3ff6, read8sm_delegate(*m_ym2148, FUNC(ym2148_device::read))); + page(i)->install_read_handler(0x4000 * i + 0x3ff0, 0x4000 * i + 0x3ff1, read8sm_delegate(*m_ym2151, FUNC(ym_generic_device::read))); + page(i)->install_write_handler(0x4000 * i + 0x3ff0, 0x4000 * i + 0x3ff6, write8sm_delegate(*m_ym2148, FUNC(ym2148_device::write))); + page(i)->install_write_handler(0x4000 * i + 0x3ff0, 0x4000 * i + 0x3ff1, write8sm_delegate(*m_ym2151, FUNC(ym_generic_device::write))); + } +} IRQ_CALLBACK_MEMBER(msx_cart_sfg_device::irq_callback) { return m_ym2148->get_irq_vector(); } - WRITE_LINE_MEMBER(msx_cart_sfg_device::ym2151_irq_w) { m_ym2151_irq_state = state ? ASSERT_LINE : CLEAR_LINE; check_irq(); } - WRITE_LINE_MEMBER(msx_cart_sfg_device::ym2148_irq_w) { m_ym2148_irq_state = state ? ASSERT_LINE : CLEAR_LINE; check_irq(); } - void msx_cart_sfg_device::check_irq() { if (m_ym2151_irq_state != CLEAR_LINE || m_ym2148_irq_state != CLEAR_LINE) @@ -148,61 +156,3 @@ void msx_cart_sfg_device::check_irq() irq_out(CLEAR_LINE); } } - - -uint8_t msx_cart_sfg_device::read_cart(offs_t offset) -{ - switch (offset & 0x3fff) - { - case 0x3ff0: // YM-2151 status read - case 0x3ff1: // YM-2151 status read mirror? - return m_ym2151->read(offset & 1); - - case 0x3ff2: // YM-2148 keyboard column read - case 0x3ff3: // YM-2148 -- - case 0x3ff4: // YM-2148 -- - case 0x3ff5: // YM-2148 MIDI UART data read register - case 0x3ff6: // YM-2148 MIDI UART status register - // ------x- - 1 = received a byte/receive buffer full? - // -------x - 1 = ready to send next byte/send buffer empty? - return m_ym2148->read(offset & 7); - } - - if (offset < 0x8000) - { - return m_region_sfg->as_u8(offset & m_rom_mask); - } - - return 0xff; -} - - -void msx_cart_sfg_device::write_cart(offs_t offset, uint8_t data) -{ - switch (offset & 0x3fff) - { - case 0x3ff0: // YM-2151 register - case 0x3ff1: // YM-2151 data - m_ym2151->write(offset & 1, data); - break; - - case 0x3ff2: // YM-2148 write keyboard row - case 0x3ff3: // YM-2148 MIDI IRQ vector - case 0x3ff4: // YM-2148 External IRQ vector - case 0x3ff5: // YM-2148 MIDI UART data write register - case 0x3ff6: // YM-2148 MIDI UART command register - // On startup the sfg01 writes 0x80 - // followed by 0x05. - // Other write seen in the code: 0x15 - // - // x------- - 1 = reset - // -----x-- - 1 = enable receiving / sending midi data - // -------x - 1 = enable receiving / sending midi data - m_ym2148->write(offset & 7, data); - break; - - default: - logerror("msx_cart_sfg_device::write_cart: write %02x to %04x\n", data, offset); - break; - } -} diff --git a/src/devices/bus/msx_cart/yamaha.h b/src/devices/bus/msx_cart/yamaha.h index cd4c036cab8..0b48f96b781 100644 --- a/src/devices/bus/msx_cart/yamaha.h +++ b/src/devices/bus/msx_cart/yamaha.h @@ -17,12 +17,8 @@ DECLARE_DEVICE_TYPE(MSX_CART_SFG05, msx_cart_sfg05_device) class msx_cart_sfg_device : public device_t, public msx_cart_interface { -public: - virtual uint8_t read_cart(offs_t offset) override; - virtual void write_cart(offs_t offset, uint8_t data) override; - protected: - msx_cart_sfg_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_cart_sfg_device(const machine_config &mconfig, const device_type type, const char *tag, device_t *owner, u32 clock); virtual void device_start() override; @@ -40,7 +36,7 @@ protected: required_device m_ym2148; int m_ym2151_irq_state; int m_ym2148_irq_state; - uint32_t m_rom_mask; + u32 m_rom_mask; void check_irq(); }; @@ -49,7 +45,7 @@ protected: class msx_cart_sfg01_device : public msx_cart_sfg_device { public: - msx_cart_sfg01_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_sfg01_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual const tiny_rom_entry *device_rom_region() const override; }; @@ -58,7 +54,7 @@ public: class msx_cart_sfg05_device : public msx_cart_sfg_device { public: - msx_cart_sfg05_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_cart_sfg05_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; diff --git a/src/devices/bus/msx_slot/ax230.cpp b/src/devices/bus/msx_slot/ax230.cpp new file mode 100644 index 00000000000..fe54510e893 --- /dev/null +++ b/src/devices/bus/msx_slot/ax230.cpp @@ -0,0 +1,53 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +/* + + Emulation of the games mapper as found in AX-230 machines. + +*/ + +#include "emu.h" +#include "ax230.h" + + +DEFINE_DEVICE_TYPE(MSX_SLOT_AX230, msx_slot_ax230_device, "msx_slot_ax230", "MSX Internal AX230") + + +msx_slot_ax230_device::msx_slot_ax230_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, MSX_SLOT_AX230, tag, owner, clock) + , msx_internal_slot_interface(mconfig, *this) + , m_rom_region(*this, finder_base::DUMMY_TAG) + , m_rombank(*this, "rombank%u", 0U) + , m_region_offset(0) +{ +} + +void msx_slot_ax230_device::device_start() +{ + // Sanity checks + if (m_rom_region->bytes() < m_region_offset + 0x100000) + { + fatalerror("Memory region '%s' is too small for the AX230 firmware\n", m_rom_region.finder_tag()); + } + + for (int i = 0; i < 4; i++) + { + m_rombank[i]->configure_entries(0, BANKS, m_rom_region->base() + m_region_offset, 0x2000); + } + page(1)->install_read_bank(0x4000, 0x5fff, m_rombank[0]); + page(1)->install_read_bank(0x6000, 0x7fff, m_rombank[1]); + page(1)->install_write_handler(0x6000, 0x7fff, write8sm_delegate(*this, FUNC(msx_slot_ax230_device::mapper_write))); + page(2)->install_read_bank(0x8000, 0x9fff, m_rombank[2]); + page(2)->install_read_bank(0xa000, 0xbfff, m_rombank[3]); +} + +void msx_slot_ax230_device::device_reset() +{ + for (int i = 0; i < 4; i++) + m_rombank[i]->set_entry(0); +} + +void msx_slot_ax230_device::mapper_write(offs_t offset, u8 data) +{ + m_rombank[(offset / 0x800) & 0x03]->set_entry(data & BANK_MASK); +} diff --git a/src/devices/bus/msx_slot/ax230.h b/src/devices/bus/msx_slot/ax230.h new file mode 100644 index 00000000000..31f5fa3df8d --- /dev/null +++ b/src/devices/bus/msx_slot/ax230.h @@ -0,0 +1,38 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +#ifndef MAME_BUS_MSX_SLOT_AX230_H +#define MAME_BUS_MSX_SLOT_AX230_H + +#pragma once + +#include "slot.h" + + +DECLARE_DEVICE_TYPE(MSX_SLOT_AX230, msx_slot_ax230_device) + + +class msx_slot_ax230_device : public device_t, public msx_internal_slot_interface +{ +public: + msx_slot_ax230_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + // configuration helpers + void set_rom_start(const char *region, u32 offset) { m_rom_region.set_tag(region); m_region_offset = offset; } + +protected: + virtual void device_start() override; + virtual void device_reset() override; + +private: + static constexpr u8 BANKS = 0x80; + static constexpr u8 BANK_MASK = BANKS - 1; + + void mapper_write(offs_t offset, uint8_t data); + + required_memory_region m_rom_region; + memory_bank_array_creator<4> m_rombank; + u32 m_region_offset; +}; + + +#endif // MAME_BUS_MSX_SLOT_AX230_H diff --git a/src/devices/bus/msx_slot/bruc100.cpp b/src/devices/bus/msx_slot/bruc100.cpp new file mode 100644 index 00000000000..b5b8af39c26 --- /dev/null +++ b/src/devices/bus/msx_slot/bruc100.cpp @@ -0,0 +1,50 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +/* + + Emulation of the firmware mapper as found in Frael Bruc 100 machines. + +*/ + +#include "emu.h" +#include "bruc100.h" + + +DEFINE_DEVICE_TYPE(MSX_SLOT_BRUC100, msx_slot_bruc100_device, "msx_slot_bruc100", "MSX Internal BRUC100") + + +msx_slot_bruc100_device::msx_slot_bruc100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, MSX_SLOT_BRUC100, tag, owner, clock) + , msx_internal_slot_interface(mconfig, *this) + , m_rom_region(*this, finder_base::DUMMY_TAG) + , m_rombank(*this, "rombank%u", 0U) + , m_region_offset(0) +{ +} + +void msx_slot_bruc100_device::device_start() +{ + // Sanity checks + if (m_rom_region->bytes() < m_region_offset + 0x10000) + { + fatalerror("Memory region '%s' is too small for the BRUC100 firmware\n", m_rom_region.finder_tag()); + } + + m_rombank[0]->configure_entries(0, 2, m_rom_region->base() + m_region_offset, 0x8000); + m_rombank[1]->configure_entries(0, 2, m_rom_region->base() + m_region_offset + 0x4000, 0x8000); + + page(0)->install_read_bank(0x0000, 0x3fff, m_rombank[0]); + page(1)->install_read_bank(0x4000, 0x7fff, m_rombank[1]); +} + +void msx_slot_bruc100_device::device_reset() +{ + m_rombank[0]->set_entry(0); + m_rombank[1]->set_entry(0); +} + +void msx_slot_bruc100_device::select_bank(u8 bank) +{ + m_rombank[0]->set_entry(bank); + m_rombank[1]->set_entry(bank); +} diff --git a/src/devices/bus/msx_slot/bruc100.h b/src/devices/bus/msx_slot/bruc100.h new file mode 100644 index 00000000000..cf37efc7779 --- /dev/null +++ b/src/devices/bus/msx_slot/bruc100.h @@ -0,0 +1,35 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +#ifndef MAME_BUS_MSX_SLOT_BRUC100_H +#define MAME_BUS_MSX_SLOT_BRUC100_H + +#pragma once + +#include "slot.h" + + +DECLARE_DEVICE_TYPE(MSX_SLOT_BRUC100, msx_slot_bruc100_device) + + +class msx_slot_bruc100_device : public device_t, public msx_internal_slot_interface +{ +public: + msx_slot_bruc100_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + // configuration helpers + void set_rom_start(const char *region, u32 offset) { m_rom_region.set_tag(region); m_region_offset = offset; } + + void select_bank(u8 bank); + +protected: + virtual void device_start() override; + virtual void device_reset() override; + +private: + required_memory_region m_rom_region; + memory_bank_array_creator<2> m_rombank; + u32 m_region_offset; +}; + + +#endif // MAME_BUS_MSX_SLOT_BRUC100_H diff --git a/src/devices/bus/msx_slot/bunsetsu.cpp b/src/devices/bus/msx_slot/bunsetsu.cpp index 9c73a37dbd8..fce0d691ec7 100644 --- a/src/devices/bus/msx_slot/bunsetsu.cpp +++ b/src/devices/bus/msx_slot/bunsetsu.cpp @@ -11,43 +11,51 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_BUNSETSU, msx_slot_bunsetsu_device, "msx_slot_bunsetsu", "MSX Internal BUNSETSU") -msx_slot_bunsetsu_device::msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_bunsetsu_device::msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : msx_slot_rom_device(mconfig, MSX_SLOT_BUNSETSU, tag, owner, clock) , m_bunsetsu_region(*this, finder_base::DUMMY_TAG) , m_bunsetsu_address(0) { } +void msx_slot_bunsetsu_device::device_start() +{ + msx_slot_rom_device::device_start(); + + save_item(NAME(m_bunsetsu_address)); + + page(2)->install_read_handler(0xbfff, 0xbfff, read8smo_delegate(*this, FUNC(msx_slot_bunsetsu_device::buns_read))); + page(2)->install_write_handler(0xbffc, 0xbffe, write8sm_delegate(*this, FUNC(msx_slot_bunsetsu_device::buns_write))); +} void msx_slot_bunsetsu_device::device_reset() { m_bunsetsu_address = 0; } - -uint8_t msx_slot_bunsetsu_device::read(offs_t offset) +u8 msx_slot_bunsetsu_device::buns_read() { - if (offset == 0xbfff) - { - return m_bunsetsu_region[m_bunsetsu_address++ & 0x1ffff]; - } - return msx_slot_rom_device::read(offset); -} + u8 data = m_bunsetsu_region[m_bunsetsu_address & 0x1ffff]; + if (!machine().side_effects_disabled()) + m_bunsetsu_address++; + + return data; +} -void msx_slot_bunsetsu_device::write(offs_t offset, uint8_t data) +void msx_slot_bunsetsu_device::buns_write(offs_t offset, u8 data) { switch (offset) { - case 0xbffc: + case 0: m_bunsetsu_address = (m_bunsetsu_address & 0xffff00) | data; break; - case 0xbffd: + case 1: m_bunsetsu_address = (m_bunsetsu_address & 0xff00ff) | (data << 8); break; - case 0xbffe: + case 2: m_bunsetsu_address = (m_bunsetsu_address & 0x00ffff) | (data << 16); break; } diff --git a/src/devices/bus/msx_slot/bunsetsu.h b/src/devices/bus/msx_slot/bunsetsu.h index df0bcedb32f..7964b83778b 100644 --- a/src/devices/bus/msx_slot/bunsetsu.h +++ b/src/devices/bus/msx_slot/bunsetsu.h @@ -15,20 +15,21 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_BUNSETSU, msx_slot_bunsetsu_device) class msx_slot_bunsetsu_device : public msx_slot_rom_device { public: - msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // configuration helpers void set_bunsetsu_region_tag(const char *tag) { m_bunsetsu_region.set_tag(tag); } - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; - protected: + virtual void device_start() override; virtual void device_reset() override; private: + u8 buns_read(); + void buns_write(offs_t offset, u8 data); + required_region_ptr m_bunsetsu_region; - uint32_t m_bunsetsu_address; + u32 m_bunsetsu_address; }; diff --git a/src/devices/bus/msx_slot/cartridge.cpp b/src/devices/bus/msx_slot/cartridge.cpp index 667bbaf3cc7..b8d746b5a15 100644 --- a/src/devices/bus/msx_slot/cartridge.cpp +++ b/src/devices/bus/msx_slot/cartridge.cpp @@ -33,13 +33,13 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_CARTRIDGE, msx_slot_cartridge_device, DEFINE_DEVICE_TYPE(MSX_SLOT_YAMAHA_EXPANSION, msx_slot_yamaha_expansion_device, "msx_slot_yamaha_expansion", "MSX Yamaha Expansion slot") -msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : msx_slot_cartridge_device(mconfig, MSX_SLOT_CARTRIDGE, tag, owner, clock) { } -msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, type, tag, owner, clock) , device_cartrom_image_interface(mconfig, *this) , device_slot_interface(mconfig, *this) @@ -95,7 +95,10 @@ void msx_slot_cartridge_device::device_resolve_objects() m_irq_handler.resolve_safe(); m_cartridge = dynamic_cast(get_card_device()); if (m_cartridge) + { m_cartridge->m_exp = this; + m_cartridge->set_views(page(0), page(1), page(2), page(3)); + } } @@ -106,18 +109,18 @@ void msx_slot_cartridge_device::device_start() image_init_result msx_slot_cartridge_device::call_load() { - if ( m_cartridge ) + if (m_cartridge) { if (loaded_through_softlist()) { - uint32_t length; + u32 length; // Allocate and copy rom contents length = get_software_region_length("rom"); - m_cartridge->rom_alloc( length ); + m_cartridge->rom_alloc(length); if (length > 0) { - uint8_t *rom_base = m_cartridge->get_rom_base(); + u8 *rom_base = m_cartridge->get_rom_base(); memcpy(rom_base, get_software_region("rom"), length); } @@ -126,24 +129,33 @@ image_init_result msx_slot_cartridge_device::call_load() m_cartridge->rom_vlm5030_alloc(length); if (length > 0) { - uint8_t *rom_base = m_cartridge->get_rom_vlm5030_base(); + u8 *rom_base = m_cartridge->get_rom_vlm5030_base(); memcpy(rom_base, get_software_region("vlm5030"), length); } // Allocate ram length = get_software_region_length("ram"); - m_cartridge->ram_alloc( length ); + m_cartridge->ram_alloc(length); // Allocate sram length = get_software_region_length("sram"); - m_cartridge->sram_alloc( length ); + m_cartridge->sram_alloc(length); + + // Allocate and copy kanji rom contents + length = get_software_region_length("kanji"); + m_cartridge->kanji_alloc(length); + if (length > 0) + { + u8 *rom_base = m_cartridge->get_kanji_base(); + memcpy(rom_base, get_software_region("kanji"), length); + } } else { - uint32_t length = this->length(); + u32 length = this->length(); // determine how much space to allocate - uint32_t length_aligned = 0x10000; + u32 length_aligned = 0x10000; if (length <= 0x2000) length_aligned = 0x2000; @@ -155,7 +167,7 @@ image_init_result msx_slot_cartridge_device::call_load() length_aligned = 0xc000; else { - while (length_aligned < length ) + while (length_aligned < length) length_aligned *= 2; } @@ -206,7 +218,7 @@ WRITE_LINE_MEMBER(msx_slot_cartridge_device::irq_out) } -int msx_slot_cartridge_device::get_cart_type(const uint8_t *rom, uint32_t length) +int msx_slot_cartridge_device::get_cart_type(const u8 *rom, u32 length) { if (length < 0x2000) { @@ -218,7 +230,7 @@ int msx_slot_cartridge_device::get_cart_type(const uint8_t *rom, uint32_t length return NOMAPPER; } - if ( (rom[0x10] == 'Y') && (rom[0x11] == 'Z') && (length > 0x18000) ) + if ((rom[0x10] == 'Y') && (rom[0x11] == 'Z') && (length > 0x18000)) { return GAMEMASTER2; } @@ -287,7 +299,7 @@ std::string msx_slot_cartridge_device::get_default_card_software(get_default_car int extrainfo_type = -1; if (1 == sscanf(extrainfo.c_str(), "%d", &extrainfo_type)) { - static const struct { int extrainfo; int mapper; } extrainfo_map[] = { + static const struct {int extrainfo; int mapper;} extrainfo_map[] = { //{ 0, NOMAPPER }, { 1, MSXDOS2 }, { 2, KONAMI_SCC }, @@ -321,9 +333,9 @@ std::string msx_slot_cartridge_device::get_default_card_software(get_default_car if (type == NOMAPPER) { // Not identified through hashfile, try automatic detection - uint64_t length; + u64 length; hook.image_file()->length(length); // FIXME: check error return, guard against excessively large files - std::vector rom(length); + std::vector rom(length); size_t actual; hook.image_file()->read(&rom[0], length, actual); // FIXME: check error return or read returning short type = get_cart_type(&rom[0], length); @@ -340,33 +352,13 @@ std::string msx_slot_cartridge_device::get_default_card_software(get_default_car } -uint8_t msx_slot_cartridge_device::read(offs_t offset) -{ - if ( m_cartridge ) - { - return m_cartridge->read_cart(offset); - } - return 0xFF; -} - - -void msx_slot_cartridge_device::write(offs_t offset, uint8_t data) -{ - if ( m_cartridge ) - { - m_cartridge->write_cart(offset, data); - } -} - - -msx_slot_yamaha_expansion_device::msx_slot_yamaha_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_yamaha_expansion_device::msx_slot_yamaha_expansion_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : msx_slot_cartridge_device(mconfig, MSX_SLOT_YAMAHA_EXPANSION, tag, owner, clock) { } - void msx_slot_yamaha_expansion_device::device_start() { } diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h index 68d827edc93..a66d4037081 100644 --- a/src/devices/bus/msx_slot/cartridge.h +++ b/src/devices/bus/msx_slot/cartridge.h @@ -21,7 +21,7 @@ class msx_slot_cartridge_device : public device_t { public: // construction/destruction - msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + 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(); } @@ -36,14 +36,10 @@ public: // slot interface overrides virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; - // msx_internal_slot-level overrides - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; - DECLARE_WRITE_LINE_MEMBER(irq_out); protected: - msx_slot_cartridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + 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; @@ -52,7 +48,7 @@ protected: devcb_write_line m_irq_handler; msx_cart_interface *m_cartridge; - static int get_cart_type(const uint8_t *rom, uint32_t length); + static int get_cart_type(const u8 *rom, u32 length); }; @@ -60,7 +56,7 @@ 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, uint32_t clock); + 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"; } virtual const char *image_type_name() const noexcept override { return "cartridge60pin"; } diff --git a/src/devices/bus/msx_slot/disk.cpp b/src/devices/bus/msx_slot/disk.cpp index 78a15b7d841..ddb3ee4f444 100644 --- a/src/devices/bus/msx_slot/disk.cpp +++ b/src/devices/bus/msx_slot/disk.cpp @@ -33,774 +33,1290 @@ set on 7FFDH bit 2 always to 0 (some use it as disk change reset) #include "emu.h" #include "disk.h" +#include "formats/dmk_dsk.h" +#include "formats/msx_dsk.h" + + +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK1_FD1793, msx_slot_disk1_fd1793_device, "msx_slot_disk1_fd1793", "MSX Internal floppy type 1 - FD1793 - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK1_MB8877, msx_slot_disk1_mb8877_device, "msx_slot_disk1_mb8877", "MSX Internal floppy type 1 - MB8877 - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793_N, msx_slot_disk1_wd2793_n_device, "msx_slot_disk1_wd2793_n", "MSX Internal floppy type 1 - WD2793 no force ready - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793_N_2_DRIVES, msx_slot_disk1_wd2793_n_2_drives_device, "msx_slot_disk1_wd2793_n_2_drives", "MSX Internal floppy type 1 - WD2793 no force ready - 2 DSDD Drives") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793, msx_slot_disk1_wd2793_device, "msx_slot_disk1_wd2793", "MSX Internal floppy type 1 - WD2793 - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793_0, msx_slot_disk1_wd2793_0_device, "msx_slot_disk1_wd2793_0", "MSX Internal floppy type 1 - WD2793 - No drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793_SS, msx_slot_disk1_wd2793_ss_device, "msx_slot_disk1_wd2793_ss", "MSX Internal floppy type 1 - WD2793 - 1 SSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793_2_DRIVES, msx_slot_disk1_wd2793_2_drives_device, "msx_slot_disk1_wd2793_2_drives", "MSX Internal floppy type 1 - WD2793 - 2 DSDD Drives") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK2_FD1793_SS, msx_slot_disk2_fd1793_ss_device, "msx_slot_disk2_fd1793_ss", "MSX Internal floppy type 2 - FD1793 - 1 SSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK2_MB8877, msx_slot_disk2_mb8877_device, "msx_slot_disk2_mb8877", "MSX Internal floppy type 2 - MB8877 - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK2_MB8877_SS, msx_slot_disk2_mb8877_ss_device, "msx_slot_disk2_mb8877_ss", "MSX Internal floppy type 2 - MB8877 - 1 SSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK2_MB8877_2_DRIVES, msx_slot_disk2_mb8877_2_drives_device, "msx_slot_disk2_mb8877_2_drives", "MSX Internal floppy type 2 - MB8877 - 2 DSDD Drives") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK2_WD2793, msx_slot_disk2_wd2793_device, "msx_slot_disk2_wd2793", "MSX Internal floppy type 2 - WD2793 - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK2_WD2793_2_DRIVES, msx_slot_disk2_wd2793_2_drives_device, "msx_slot_disk2_wd2793_2_drives", "MSX Internal floppy type 2 - WD2793 - 2 DSDD Drives") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK3_TC8566, msx_slot_disk3_tc8566_device, "msx_slot_disk3_tc8566", "MSX Internal floppy type 3 - TC8566 - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK3_TC8566_2_DRIVES, msx_slot_disk3_tc8566_2_drives_device, "msx_slot_disk3_tc8566_2_drives", "MSX Internal floppy type 3 - TC8566 - 2 DSDD Drives") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK4_TC8566, msx_slot_disk4_tc8566_device, "msx_slot_disk4_tc8566", "MSX Internal floppy type 4 - TC8566 - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK5_WD2793, msx_slot_disk5_wd2793_device, "msx_slot_disk5_wd2793", "MSX Internal floppy type 5 - WD2793 - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK6_WD2793_N, msx_slot_disk6_wd2793_n_device, "msx_slot_disk6_wd2793_n", "MSX Internal floppy type 6 - WD2793 no force ready - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK7_MB8877, msx_slot_disk7_mb8877_device, "msx_slot_disk7_mb8877", "MSX Internal floppy type 7 - MB8877 - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK8_MB8877, msx_slot_disk8_mb8877_device, "msx_slot_disk8_mb8877", "MSX Internal floppy type 8 - MB8877 - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK8_WD2793_2_DRIVES, msx_slot_disk8_wd2793_2_drives_device, "msx_slot_disk8_wd2793_2_drives", "MSX Internal floppy type 8 - WD2793 - 2 DSDD Drives") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK9_WD2793_N, msx_slot_disk9_wd2793_n_device, "msx_slot_disk9_wd2793_n", "MSX Internal floppy type 9 - WD2793 no force ready - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK10_MB8877, msx_slot_disk10_mb8877_device, "msx_slot_disk10_mb8877", "MSX Internal floppy type 10 - MB8877 - 1 DSDD Drive") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK10_MB8877_2_DRIVES, msx_slot_disk10_mb8877_2_drives_device, "msx_slot_disk10_mb8877_2_drives", "MSX Internal floppy type 10 - MB8877 - 2 DSDD Drives") +DEFINE_DEVICE_TYPE(MSX_SLOT_DISK11_WD2793, msx_slot_disk11_wd2793_device, "msx_slot_disk11_wd2793", "MSX Internal floppy type 11 - WD2793 - 1 DSDD Drive") + + +static void msx_floppies(device_slot_interface &device) +{ + device.option_add("35dd", FLOPPY_35_DD); + device.option_add("35ssdd", FLOPPY_35_SSDD); +} - -DEFINE_DEVICE_TYPE(MSX_SLOT_DISK1, msx_slot_disk1_device, "msx_slot_disk1", "MSX Internal floppy type 1") -DEFINE_DEVICE_TYPE(MSX_SLOT_DISK2, msx_slot_disk2_device, "msx_slot_disk2", "MSX Internal floppy type 2") -DEFINE_DEVICE_TYPE(MSX_SLOT_DISK3, msx_slot_disk3_device, "msx_slot_disk3", "MSX Internal floppy type 3") -DEFINE_DEVICE_TYPE(MSX_SLOT_DISK4, msx_slot_disk4_device, "msx_slot_disk4", "MSX Internal floppy type 4") -DEFINE_DEVICE_TYPE(MSX_SLOT_DISK5, msx_slot_disk5_device, "msx_slot_disk5", "MSX Internal floppy type 5") -DEFINE_DEVICE_TYPE(MSX_SLOT_DISK6, msx_slot_disk6_device, "msx_slot_disk6", "MSX Internal floppy type 6") +void msx_slot_disk_device::floppy_formats(format_registration &fr) +{ + fr.add_mfm_containers(); + fr.add(FLOPPY_MSX_FORMAT); + fr.add(FLOPPY_DMK_FORMAT); +} -msx_slot_disk_device::msx_slot_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_slot_disk_device::msx_slot_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : msx_slot_rom_device(mconfig, type, tag, owner, clock) - , m_floppy0(nullptr) - , m_floppy1(nullptr) - , m_floppy2(nullptr) - , m_floppy3(nullptr) + , m_floppy0(*this, "fdc:0") + , m_floppy1(*this, "fdc:1") + , m_floppy2(*this, "fdc:2") + , m_floppy3(*this, "fdc:3") , m_floppy(nullptr) - , m_fdc_tag(nullptr) - , m_floppy0_tag(nullptr) - , m_floppy1_tag(nullptr) - , m_floppy2_tag(nullptr) - , m_floppy3_tag(nullptr) { } - -void msx_slot_disk_device::device_start() +void msx_slot_disk_device::add_drive_mconfig(machine_config &config, int nr_of_drives, bool double_sided) { - msx_slot_rom_device::device_start(); - - if (m_fdc_tag == nullptr) - { - fatalerror("msx_slot_disk_device: no FDC tag specified\n"); - } - - m_floppy0 = m_floppy0_tag ? owner()->subdevice(m_floppy0_tag) : nullptr; - m_floppy1 = m_floppy1_tag ? owner()->subdevice(m_floppy1_tag) : nullptr; - m_floppy2 = m_floppy2_tag ? owner()->subdevice(m_floppy2_tag) : nullptr; - m_floppy3 = m_floppy3_tag ? owner()->subdevice(m_floppy3_tag) : nullptr; - - if (m_floppy0 == nullptr && m_floppy1 == nullptr) - { - logerror("msx_slot_disk_device: Warning: both floppy0 and floppy1 were not found\n"); - } + if (nr_of_drives > NO_DRIVES) + FLOPPY_CONNECTOR(config, m_floppy0, msx_floppies, double_sided ? "35dd" : "35ssdd", msx_slot_disk_device::floppy_formats); + if (nr_of_drives > DRIVES_1) + FLOPPY_CONNECTOR(config, m_floppy1, msx_floppies, double_sided ? "35dd" : "35ssdd", msx_slot_disk_device::floppy_formats); + if (nr_of_drives > DRIVES_2) + FLOPPY_CONNECTOR(config, m_floppy1, msx_floppies, double_sided ? "35dd" : "35ssdd", msx_slot_disk_device::floppy_formats); + if (nr_of_drives > DRIVES_3) + FLOPPY_CONNECTOR(config, m_floppy1, msx_floppies, double_sided ? "35dd" : "35ssdd", msx_slot_disk_device::floppy_formats); } + msx_slot_wd_disk_device::msx_slot_wd_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : msx_slot_disk_device(mconfig, type, tag, owner, clock) - , m_fdc(nullptr) + , m_fdc(*this, "fdc") , m_led(*this, "led0") { } - void msx_slot_wd_disk_device::device_start() { msx_slot_disk_device::device_start(); - m_led.resolve(); - m_fdc = owner()->subdevice(m_fdc_tag); +} - if (m_fdc == nullptr) - { - fatalerror("msx_slot_wd_disk_device: Unable to find FDC with tag '%s'\n", m_fdc_tag); - } +template +void msx_slot_wd_disk_device::add_mconfig(machine_config &config, FDCType &&type, bool force_ready, int nr_of_drives, bool double_sided) +{ + std::forward(type)(config, m_fdc, 4_MHz_XTAL / 4); + m_fdc->set_force_ready(force_ready); + add_drive_mconfig(config, nr_of_drives, double_sided); } + msx_slot_tc8566_disk_device::msx_slot_tc8566_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : msx_slot_disk_device(mconfig, type, tag, owner, clock) - , m_fdc(nullptr) + , m_fdc(*this, "fdc") { } - -void msx_slot_tc8566_disk_device::device_start() +void msx_slot_tc8566_disk_device::add_mconfig(machine_config &config, int nr_of_drives) { - msx_slot_disk_device::device_start(); + TC8566AF(config, m_fdc, 16'000'000); - m_fdc = owner()->subdevice(m_fdc_tag); - - if (m_fdc == nullptr) - { - fatalerror("msx_slot_tc8566_disk_device: Unable to find FDC with tag '%s'\n", m_fdc_tag); - } + add_drive_mconfig(config, nr_of_drives, DS); } -msx_slot_disk1_device::msx_slot_disk1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK1, tag, owner, clock) +msx_slot_disk1_base_device::msx_slot_disk1_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : msx_slot_wd_disk_device(mconfig, type, tag, owner, clock) , m_side_control(0) , m_control(0) { } - -void msx_slot_disk1_device::device_start() +void msx_slot_disk1_base_device::device_start() { msx_slot_wd_disk_device::device_start(); save_item(NAME(m_side_control)); save_item(NAME(m_control)); -} + page(1)->install_rom(0x4000, 0x7fff, rom_base()); + page(1)->install_read_handler(0x7ff8, 0x7ff8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(1)->install_read_handler(0x7ff9, 0x7ff9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(1)->install_read_handler(0x7ffa, 0x7ffa, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(1)->install_read_handler(0x7ffb, 0x7ffb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(1)->install_read_handler(0x7ffc, 0x7ffc, read8smo_delegate(*this, FUNC(msx_slot_disk1_base_device::side_control_r))); + page(1)->install_read_handler(0x7ffd, 0x7ffd, read8smo_delegate(*this, FUNC(msx_slot_disk1_base_device::control_r))); + page(1)->install_read_handler(0x7fff, 0x7fff, read8smo_delegate(*this, FUNC(msx_slot_disk1_base_device::status_r))); + page(1)->install_write_handler(0x7ff8, 0x7ff8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(1)->install_write_handler(0x7ff9, 0x7ff9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(1)->install_write_handler(0x7ffa, 0x7ffa, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(1)->install_write_handler(0x7ffb, 0x7ffb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(1)->install_write_handler(0x7ffc, 0x7ffc, write8smo_delegate(*this, FUNC(msx_slot_disk1_base_device::set_side_control))); + page(1)->install_write_handler(0x7ffd, 0x7ffd, write8smo_delegate(*this, FUNC(msx_slot_disk1_base_device::set_control))); + + if (page_configured(2)) + { + // TODO No idea why, but without this the other handlers do not get recognized + page(2)->install_rom(0xbff8,0xbff8, rom_base()); + page(2)->install_read_handler(0xbff8, 0xbff8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(2)->install_read_handler(0xbff9, 0xbff9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(2)->install_read_handler(0xbffa, 0xbffa, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(2)->install_read_handler(0xbffb, 0xbffb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(2)->install_read_handler(0xbffc, 0xbffc, read8smo_delegate(*this, FUNC(msx_slot_disk1_base_device::side_control_r))); + page(2)->install_read_handler(0xbffd, 0xbffd, read8smo_delegate(*this, FUNC(msx_slot_disk1_base_device::control_r))); + page(2)->install_read_handler(0xbfff, 0xbfff, read8smo_delegate(*this, FUNC(msx_slot_disk1_base_device::status_r))); + page(2)->install_write_handler(0xbff8, 0xbff8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(2)->install_write_handler(0xbff9, 0xbff9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(2)->install_write_handler(0xbffa, 0xbffa, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(2)->install_write_handler(0xbffb, 0xbffb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(2)->install_write_handler(0xbffc, 0xbffc, write8smo_delegate(*this, FUNC(msx_slot_disk1_base_device::set_side_control))); + page(2)->install_write_handler(0xbffd, 0xbffd, write8smo_delegate(*this, FUNC(msx_slot_disk1_base_device::set_control))); + } +} -void msx_slot_disk1_device::device_reset() +void msx_slot_disk1_base_device::device_reset() { m_fdc->dden_w(false); } - -void msx_slot_disk1_device::device_post_load() +void msx_slot_disk1_base_device::device_post_load() { - uint8_t data = m_control; - - // To make sure the FDD busy led status gets set correctly - m_control ^= 0x40; - - set_control(data); + set_control(m_control); } - -void msx_slot_disk1_device::set_side_control(uint8_t data) +void msx_slot_disk1_base_device::set_side_control(u8 data) { m_side_control = data; if (m_floppy) { - m_floppy->ss_w(m_side_control & 0x01); + m_floppy->ss_w(BIT(m_side_control, 0)); } } - -void msx_slot_disk1_device::set_control(uint8_t data) +void msx_slot_disk1_base_device::set_control(u8 data) { - uint8_t old_m_control = m_control; + // 7------- motor on (0 = on) + // -6------ in-use / LED (0 = on) + // --5432-- unused + // ------1- drive 1 select (0 = selected) + // -------0 drive 0 select (0 = selected) + + const u8 old_m_control = m_control; m_control = data; switch (m_control & 0x03) { - case 0: - case 2: - m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; - break; - - case 1: - m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; - break; - - default: - m_floppy = nullptr; - break; + case 0: + case 2: + m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; + break; + + case 1: + m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; + break; + + default: + m_floppy = nullptr; + break; } if (m_floppy) { - m_floppy->mon_w((m_control & 0x80) ? 0 : 1); - m_floppy->ss_w(m_side_control & 0x01); + m_floppy->mon_w(BIT(m_control, 7) ? 0 : 1); + m_floppy->ss_w(BIT(m_side_control, 0)); } m_fdc->set_floppy(m_floppy); if ((old_m_control ^ m_control) & 0x40) - { m_led = BIT(~m_control, 6); - } } +u8 msx_slot_disk1_base_device::side_control_r() +{ + return 0xfe | (m_side_control & 0x01); +} -uint8_t msx_slot_disk1_device::read(offs_t offset) +u8 msx_slot_disk1_base_device::control_r() { - switch (offset) - { - case 0x7ff8: - case 0xbff8: - return m_fdc->status_r(); + return (m_control & 0x83) | 0x78; +} - case 0x7ff9: - case 0xbff9: - return m_fdc->track_r(); +u8 msx_slot_disk1_base_device::status_r() +{ + return 0x3f | (m_fdc->intrq_r() ? 0 : 0x40) | (m_fdc->drq_r() ? 0 : 0x80); +} - case 0x7ffa: - case 0xbffa: - return m_fdc->sector_r(); - case 0x7ffb: - case 0xbffb: - return m_fdc->data_r(); +msx_slot_disk1_fd1793_device::msx_slot_disk1_fd1793_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk1_base_device(mconfig, MSX_SLOT_DISK1_FD1793, tag, owner, clock) +{ +} - case 0x7ffc: - case 0xbffc: - return 0xfe | (m_side_control & 0x01); +void msx_slot_disk1_fd1793_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, FD1793, NO_FORCE_READY, DRIVES_1, DS); +} - case 0x7ffd: - case 0xbffd: - return ( m_control & 0x83 ) | 0x78; - case 0x7fff: - case 0xbfff: - return 0x3f | (m_fdc->intrq_r() ? 0 : 0x40) | (m_fdc->drq_r() ? 0 : 0x80); - } +msx_slot_disk1_mb8877_device::msx_slot_disk1_mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk1_base_device(mconfig, MSX_SLOT_DISK1_MB8877, tag, owner, clock) +{ +} - return msx_slot_rom_device::read(offset); +void msx_slot_disk1_mb8877_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, MB8877, FORCE_READY, DRIVES_1, DS); } -void msx_slot_disk1_device::write(offs_t offset, uint8_t data) +msx_slot_disk1_wd2793_n_device::msx_slot_disk1_wd2793_n_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk1_base_device(mconfig, MSX_SLOT_DISK1_WD2793_N, tag, owner, clock) { - switch (offset) - { - case 0x7ff8: - case 0xbff8: - m_fdc->cmd_w(data); - break; - - case 0x7ff9: - case 0xbff9: - m_fdc->track_w(data); - break; - - case 0x7ffa: - case 0xbffa: - m_fdc->sector_w(data); - break; - - case 0x7ffb: - case 0xbffb: - m_fdc->data_w(data); - break; - - case 0x7ffc: - case 0xbffc: - set_side_control(data); - break; - - case 0x7ffd: - case 0xbffd: - set_control(data); - break; - - default: - logerror("msx_slot_disk1_device::write: Unmapped write writing %02x to %04x\n", data, offset); - break; +} - } +void msx_slot_disk1_wd2793_n_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, WD2793, NO_FORCE_READY, DRIVES_1, DS); } -msx_slot_disk2_device::msx_slot_disk2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK2, tag, owner, clock) - , m_control(0) +msx_slot_disk1_wd2793_n_2_drives_device::msx_slot_disk1_wd2793_n_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk1_base_device(mconfig, MSX_SLOT_DISK1_WD2793_N_2_DRIVES, tag, owner, clock) +{ +} + +void msx_slot_disk1_wd2793_n_2_drives_device::device_add_mconfig(machine_config &config) { + add_mconfig(config, WD2793, NO_FORCE_READY, DRIVES_2, DS); } -void msx_slot_disk2_device::device_start() +msx_slot_disk1_wd2793_device::msx_slot_disk1_wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk1_base_device(mconfig, MSX_SLOT_DISK1_WD2793, tag, owner, clock) { - msx_slot_wd_disk_device::device_start(); +} - save_item(NAME(m_control)); +void msx_slot_disk1_wd2793_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, WD2793, FORCE_READY, DRIVES_1, DS); } -void msx_slot_disk2_device::device_reset() +msx_slot_disk1_wd2793_0_device::msx_slot_disk1_wd2793_0_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk1_base_device(mconfig, MSX_SLOT_DISK1_WD2793_0, tag, owner, clock) { - m_fdc->dden_w(false); } +void msx_slot_disk1_wd2793_0_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, WD2793, FORCE_READY, NO_DRIVES, DS); +} + + +msx_slot_disk1_wd2793_ss_device::msx_slot_disk1_wd2793_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk1_base_device(mconfig, MSX_SLOT_DISK1_WD2793_SS, tag, owner, clock) +{ +} -void msx_slot_disk2_device::device_post_load() +void msx_slot_disk1_wd2793_ss_device::device_add_mconfig(machine_config &config) { - uint8_t data = m_control; + add_mconfig(config, WD2793, FORCE_READY, DRIVES_1, SS); +} + - // To make sure the FDD busy led status gets set correctly - m_control ^= 0x40; +msx_slot_disk1_wd2793_2_drives_device::msx_slot_disk1_wd2793_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk1_base_device(mconfig, MSX_SLOT_DISK1_WD2793_2_DRIVES, tag, owner, clock) +{ +} - set_control(data); +void msx_slot_disk1_wd2793_2_drives_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, WD2793, FORCE_READY, DRIVES_2, DS); } -void msx_slot_disk2_device::set_control(uint8_t data) + + +msx_slot_disk2_base_device::msx_slot_disk2_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : msx_slot_wd_disk_device(mconfig, type, tag, owner, clock) + , m_control(0) { - uint8_t old_m_control = m_control; +} + +void msx_slot_disk2_base_device::device_start() +{ + msx_slot_wd_disk_device::device_start(); + + save_item(NAME(m_control)); + + page(1)->install_rom(0x4000, 0x7fff, rom_base()); + page(1)->install_read_handler(0x7fb8, 0x7fb8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(1)->install_read_handler(0x7fb9, 0x7fb9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(1)->install_read_handler(0x7fba, 0x7fba, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(1)->install_read_handler(0x7fbb, 0x7fbb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(1)->install_read_handler(0x7fbc, 0x7fbc, read8smo_delegate(*this, FUNC(msx_slot_disk2_base_device::status_r))); + page(1)->install_write_handler(0x7fb8, 0x7fb8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(1)->install_write_handler(0x7fb9, 0x7fb9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(1)->install_write_handler(0x7fba, 0x7fba, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(1)->install_write_handler(0x7fbb, 0x7fbb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(1)->install_write_handler(0x7fbc, 0x7fbc, write8smo_delegate(*this, FUNC(msx_slot_disk2_base_device::set_control))); + + // TODO No idea why, but without this the other handlers do not get recognized + page(2)->install_rom(0xbfb8,0xbfb8, rom_base()); + page(2)->install_read_handler(0xbfb8, 0xbfb8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(2)->install_read_handler(0xbfb9, 0xbfb9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(2)->install_read_handler(0xbfba, 0xbfba, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(2)->install_read_handler(0xbfbb, 0xbfbb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(2)->install_read_handler(0xbfbc, 0xbfbc, read8smo_delegate(*this, FUNC(msx_slot_disk2_base_device::status_r))); + page(2)->install_write_handler(0xbfb8, 0xbfb8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(2)->install_write_handler(0xbfb9, 0xbfb9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(2)->install_write_handler(0xbfba, 0xbfba, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(2)->install_write_handler(0xbfbb, 0xbfbb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(2)->install_write_handler(0xbfbc, 0xbfbc, write8smo_delegate(*this, FUNC(msx_slot_disk2_base_device::set_control))); +} + +void msx_slot_disk2_base_device::device_reset() +{ + m_fdc->dden_w(false); +} + +void msx_slot_disk2_base_device::device_post_load() +{ + set_control(m_control); +} + +void msx_slot_disk2_base_device::set_control(u8 data) +{ + const u8 old_m_control = m_control; m_control = data; switch (m_control & 3) { - case 1: - m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; - break; + case 1: + m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; + break; - case 2: - m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; - break; + case 2: + m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; + break; - default: - m_floppy = nullptr; - break; + default: + m_floppy = nullptr; + break; } if (m_floppy) { - m_floppy->mon_w((m_control & 0x08) ? 0 : 1); - m_floppy->ss_w((m_control & 0x04) ? 1 : 0); + m_floppy->mon_w(BIT(m_control, 3) ? 0 : 1); + m_floppy->ss_w(BIT(m_control, 2) ? 1 : 0); } m_fdc->set_floppy(m_floppy); if ((old_m_control ^ m_control) & 0x40) - { m_led = BIT(~m_control, 6); - } } - -uint8_t msx_slot_disk2_device::read(offs_t offset) +u8 msx_slot_disk2_base_device::status_r() { - switch (offset) - { - case 0x7fb8: - case 0xbfb8: - return m_fdc->status_r(); - - case 0x7fb9: - case 0xbfb9: - return m_fdc->track_r(); - - case 0x7fba: - case 0xbfba: - return m_fdc->sector_r(); + return 0x3f | (m_fdc->drq_r() ? 0 : 0x40) | (m_fdc->intrq_r() ? 0x80 : 0); +} - case 0x7fbb: - case 0xbfbb: - return m_fdc->data_r(); - case 0x7fbc: - case 0xbfbc: - return 0x3f | (m_fdc->drq_r() ? 0 : 0x40) | (m_fdc->intrq_r() ? 0x80 : 0); - } +msx_slot_disk2_fd1793_ss_device::msx_slot_disk2_fd1793_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk2_base_device(mconfig, MSX_SLOT_DISK2_FD1793_SS, tag, owner, clock) +{ +} - return msx_slot_rom_device::read(offset); +void msx_slot_disk2_fd1793_ss_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, FD1793, FORCE_READY, DRIVES_1, SS); } -void msx_slot_disk2_device::write(offs_t offset, uint8_t data) +msx_slot_disk2_mb8877_device::msx_slot_disk2_mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk2_base_device(mconfig, MSX_SLOT_DISK2_MB8877, tag, owner, clock) { - switch (offset) - { - case 0x7fb8: - case 0xbfb8: - m_fdc->cmd_w(data); - break; - - case 0x7fb9: - case 0xbfb9: - m_fdc->track_w(data); - break; - - case 0x7fba: - case 0xbfba: - m_fdc->sector_w(data); - break; - - case 0x7fbb: - case 0xbfbb: - m_fdc->data_w(data); - break; - - case 0x7fbc: - case 0xbfbc: - set_control(data); - break; - - default: - logerror("msx_slot_disk2_device::write: Unmapped write writing %02x to %04x\n", data, offset); - break; - } } +void msx_slot_disk2_mb8877_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, MB8877, FORCE_READY, DRIVES_1, DS); +} +msx_slot_disk2_mb8877_ss_device::msx_slot_disk2_mb8877_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk2_base_device(mconfig, MSX_SLOT_DISK2_MB8877_SS, tag, owner, clock) +{ +} +void msx_slot_disk2_mb8877_ss_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, MB8877, FORCE_READY, DRIVES_1, SS); +} -msx_slot_disk3_device::msx_slot_disk3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : msx_slot_tc8566_disk_device(mconfig, MSX_SLOT_DISK3, tag, owner, clock) +msx_slot_disk2_mb8877_2_drives_device::msx_slot_disk2_mb8877_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk2_base_device(mconfig, MSX_SLOT_DISK2_MB8877_2_DRIVES, tag, owner, clock) { } - -void msx_slot_disk3_device::write(offs_t offset, uint8_t data) +void msx_slot_disk2_mb8877_2_drives_device::device_add_mconfig(machine_config &config) { - switch (offset) - { - case 0x7ff8: // CR0 : 0 - 0 - MEN1 - MEN0 - 0 - -FRST - 0 - DSA - m_fdc->dor_w(data); - break; + add_mconfig(config, MB8877, FORCE_READY, DRIVES_2, DS); +} - case 0x7ff9: // CR1 : 0 - 0 - C4E - C4 - SBME - SBM - TCE - FDCTC - m_fdc->cr1_w(data); - break; - case 0x7ffb: // Data Register - m_fdc->fifo_w(data); - break; +msx_slot_disk2_wd2793_device::msx_slot_disk2_wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk2_base_device(mconfig, MSX_SLOT_DISK2_WD2793, tag, owner, clock) +{ +} - default: - logerror("msx_slot_disk3_device::write: Unmapped write writing %02x to %04x\n", data, offset); - break; - } +void msx_slot_disk2_wd2793_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, WD2793, FORCE_READY, DRIVES_1, DS); } -uint8_t msx_slot_disk3_device::read(offs_t offset) +msx_slot_disk2_wd2793_2_drives_device::msx_slot_disk2_wd2793_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk2_base_device(mconfig, MSX_SLOT_DISK2_WD2793_2_DRIVES, tag, owner, clock) { - switch (offset) - { - case 0x7ffa: // Status Register - return m_fdc->msr_r(); - case 0x7ffb: // Data Register - return m_fdc->fifo_r(); - } +} - return msx_slot_rom_device::read(offset); +void msx_slot_disk2_wd2793_2_drives_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, WD2793, FORCE_READY, DRIVES_2, DS); } -msx_slot_disk4_device::msx_slot_disk4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : msx_slot_tc8566_disk_device(mconfig, MSX_SLOT_DISK4, tag, owner, clock) + +msx_slot_disk3_tc8566_device::msx_slot_disk3_tc8566_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk3_tc8566_device(mconfig, MSX_SLOT_DISK3_TC8566, tag, owner, clock) { } +msx_slot_disk3_tc8566_device::msx_slot_disk3_tc8566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : msx_slot_tc8566_disk_device(mconfig, type, tag, owner, clock) +{ +} -void msx_slot_disk4_device::write(offs_t offset, uint8_t data) +void msx_slot_disk3_tc8566_device::device_add_mconfig(machine_config &config) { - switch (offset) - { - case 0x7ff1: // FDD : x - x - MC1 - MC0 - x - x - x - x - break; + add_mconfig(config, DRIVES_1); +} - case 0x7ff2: // CR0 : 0 - 0 - MEN1 - MEN0 - 0 - -FRST - 0 - DSA - m_fdc->dor_w(data); - break; +void msx_slot_disk3_tc8566_device::device_start() +{ + msx_slot_tc8566_disk_device::device_start(); + + page(1)->install_rom(0x4000, 0x7fff, rom_base()); + page(1)->install_read_handler(0x7ffa, 0x7ffa, read8smo_delegate(*m_fdc, FUNC(tc8566af_device::msr_r))); + page(1)->install_read_handler(0x7ffb, 0x7ffb, read8smo_delegate(*m_fdc, FUNC(tc8566af_device::fifo_r))); + page(1)->install_write_handler(0x7ff8, 0x7ff8, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::dor_w))); + page(1)->install_write_handler(0x7ff9, 0x7ff9, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::cr1_w))); + page(1)->install_write_handler(0x7ffb, 0x7ffb, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::fifo_w))); + // TODO No idea why, but without this the other handlers do not get recognized + page(2)->install_rom(0xbffa,0xbffa, rom_base()); + page(2)->install_read_handler(0xbffa, 0xbffa, read8smo_delegate(*m_fdc, FUNC(tc8566af_device::msr_r))); + page(2)->install_read_handler(0xbffb, 0xbffb, read8smo_delegate(*m_fdc, FUNC(tc8566af_device::fifo_r))); + page(2)->install_write_handler(0xbff8, 0xbff8, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::dor_w))); + page(2)->install_write_handler(0xbff9, 0xbff9, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::cr1_w))); + page(2)->install_write_handler(0xbffb, 0xbffb, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::fifo_w))); +} - case 0x7ff3: // CR1 : 0 - 0 - C4E - C4 - SBME - SBM - TCE - FDCTC - m_fdc->cr1_w(data); - break; - case 0x7ff5: // Data Register - m_fdc->fifo_w(data); - break; +msx_slot_disk3_tc8566_2_drives_device::msx_slot_disk3_tc8566_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk3_tc8566_device(mconfig, MSX_SLOT_DISK3_TC8566_2_DRIVES, tag, owner, clock) +{ +} - default: - logerror("msx_slot_disk4_device::write: Unmapped write writing %02x to %04x\n", data, offset); - break; - } +void msx_slot_disk3_tc8566_2_drives_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, DRIVES_2); } -uint8_t msx_slot_disk4_device::read(offs_t offset) + + + + +msx_slot_disk4_tc8566_device::msx_slot_disk4_tc8566_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : msx_slot_tc8566_disk_device(mconfig, MSX_SLOT_DISK4_TC8566, tag, owner, clock) { - switch (offset) - { - case 0x7ff1: // FDD : x - x - MC1 - MC0 - x - x - x - x - logerror("msx_slot_disk4_device::write: Unmapped read from Media Change register\n"); - break; - - case 0x7ff4: // Status Register - return m_fdc->msr_r(); - case 0x7ff5: // Data Register - return m_fdc->fifo_r(); - } +} - return msx_slot_rom_device::read(offset); +void msx_slot_disk4_tc8566_device::device_start() +{ + msx_slot_tc8566_disk_device::device_start(); + + page(1)->install_rom(0x4000, 0x7fff, rom_base()); + // 0x7ff1 media change register + page(1)->install_write_handler(0x7ff2, 0x7ff2, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::dor_w))); + page(1)->install_write_handler(0x7ff3, 0x7ff3, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::cr1_w))); + page(1)->install_read_handler(0x7ff4, 0x7ff4, read8smo_delegate(*m_fdc, FUNC(tc8566af_device::msr_r))); + page(1)->install_read_handler(0x7ff5, 0x7ff5, read8smo_delegate(*m_fdc, FUNC(tc8566af_device::fifo_r))); + page(1)->install_write_handler(0x7ff5, 0x7ff5, write8smo_delegate(*m_fdc, FUNC(tc8566af_device::fifo_w))); +} + +void msx_slot_disk4_tc8566_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, DRIVES_1); } -msx_slot_disk5_device::msx_slot_disk5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK5, tag, owner, clock) +msx_slot_disk5_wd2793_device::msx_slot_disk5_wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK5_WD2793, tag, owner, clock) , m_control(0) { } +void msx_slot_disk5_wd2793_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, WD2793, FORCE_READY, DRIVES_1, DS); +} -void msx_slot_disk5_device::device_start() +void msx_slot_disk5_wd2793_device::device_start() { msx_slot_wd_disk_device::device_start(); save_item(NAME(m_control)); + page(1)->install_rom(0x4000, 0x7fff, rom_base()); + // Install IO read/write handlers - io_space().install_write_handler(0xd0, 0xd4, write8sm_delegate(*this, FUNC(msx_slot_disk5_device::io_write))); - io_space().install_read_handler(0xd0, 0xd4, read8sm_delegate(*this, FUNC(msx_slot_disk5_device::io_read))); + io_space().install_write_handler(0xd0, 0xd0, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + io_space().install_write_handler(0xd1, 0xd1, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + io_space().install_write_handler(0xd2, 0xd2, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + io_space().install_write_handler(0xd3, 0xd3, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + io_space().install_write_handler(0xd4, 0xd4, write8smo_delegate(*this, FUNC(msx_slot_disk5_wd2793_device::control_w))); + io_space().install_read_handler(0xd0, 0xd0, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + io_space().install_read_handler(0xd1, 0xd1, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + io_space().install_read_handler(0xd2, 0xd2, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + io_space().install_read_handler(0xd3, 0xd3, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + io_space().install_read_handler(0xd4, 0xd4, read8smo_delegate(*this, FUNC(msx_slot_disk5_wd2793_device::status_r))); } - -void msx_slot_disk5_device::device_reset() +void msx_slot_disk5_wd2793_device::device_reset() { m_fdc->dden_w(false); } - -void msx_slot_disk5_device::device_post_load() +void msx_slot_disk5_wd2793_device::device_post_load() { - set_control(m_control); + control_w(m_control); } - -void msx_slot_disk5_device::set_control(uint8_t control) +void msx_slot_disk5_wd2793_device::control_w(u8 control) { m_control = control; switch (m_control & 0x0f) { - case 0x01: - m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; - break; + case 0x01: + m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; + break; - case 0x02: - m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; - break; + case 0x02: + m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; + break; - case 0x04: - m_floppy = m_floppy2 ? m_floppy2->get_device() : nullptr; - break; + case 0x04: + m_floppy = m_floppy2 ? m_floppy2->get_device() : nullptr; + break; - case 0x08: - m_floppy = m_floppy3 ? m_floppy3->get_device() : nullptr; - break; + case 0x08: + m_floppy = m_floppy3 ? m_floppy3->get_device() : nullptr; + break; - default: - m_floppy = nullptr; - break; + default: + m_floppy = nullptr; + break; } if (m_floppy) { - m_floppy->mon_w((m_control & 0x20) ? 0 : 1); - m_floppy->ss_w((m_control & 0x10) ? 1 : 0); + m_floppy->mon_w(BIT(m_control, 5) ? 0 : 1); + m_floppy->ss_w(BIT(m_control, 4) ? 1 : 0); } m_fdc->set_floppy(m_floppy); } +u8 msx_slot_disk5_wd2793_device::status_r() +{ + return 0x3f | (m_fdc->drq_r() ? 0 : 0x40) | (m_fdc->intrq_r() ? 0x80 : 0); +} + + + +msx_slot_disk6_wd2793_n_device::msx_slot_disk6_wd2793_n_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK6_WD2793_N, tag, owner, clock) + , m_side_motor(0) + , m_drive_select0(0) + , m_drive_select1(0) +{ +} + +void msx_slot_disk6_wd2793_n_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, WD2793, NO_FORCE_READY, DRIVES_1, DS); +} -uint8_t msx_slot_disk5_device::io_read(offs_t offset) +void msx_slot_disk6_wd2793_n_device::device_start() { - switch (offset) + msx_slot_wd_disk_device::device_start(); + + save_item(NAME(m_side_motor)); + save_item(NAME(m_drive_select0)); + save_item(NAME(m_drive_select1)); + + page(1)->install_rom(0x4000, 0x7fff, rom_base()); + page(1)->install_read_handler(0x7ff0, 0x7ff0, 0, 0x0008, 0, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(1)->install_read_handler(0x7ff1, 0x7ff1, 0, 0x0008, 0, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(1)->install_read_handler(0x7ff2, 0x7ff2, 0, 0x0008, 0, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(1)->install_read_handler(0x7ff3, 0x7ff3, 0, 0x0008, 0, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(1)->install_read_handler(0x7ff4, 0x7ff4, 0, 0x0008, 0, read8smo_delegate(*this, FUNC(msx_slot_disk6_wd2793_n_device::side_motor_r))); + page(1)->install_read_handler(0x7ff5, 0x7ff5, 0, 0x0008, 0, read8smo_delegate(*this, FUNC(msx_slot_disk6_wd2793_n_device::select0_r))); + page(1)->install_read_handler(0x7ff6, 0x7ff6, 0, 0x0008, 0, read8smo_delegate(*this, FUNC(msx_slot_disk6_wd2793_n_device::select1_r))); + page(1)->install_read_handler(0x7ff7, 0x7ff7, 0, 0x0008, 0, read8smo_delegate(*this, FUNC(msx_slot_disk6_wd2793_n_device::status_r))); + page(1)->install_write_handler(0x7ff0, 0x7ff0, 0, 0x0008, 0, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(1)->install_write_handler(0x7ff1, 0x7ff1, 0, 0x0008, 0, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(1)->install_write_handler(0x7ff2, 0x7ff2, 0, 0x0008, 0, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(1)->install_write_handler(0x7ff3, 0x7ff3, 0, 0x0008, 0, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(1)->install_write_handler(0x7ff4, 0x7ff4, 0, 0x0008, 0, write8smo_delegate(*this, FUNC(msx_slot_disk6_wd2793_n_device::side_motor_w))); + page(1)->install_write_handler(0x7ff5, 0x7ff5, 0, 0x0008, 0, write8smo_delegate(*this, FUNC(msx_slot_disk6_wd2793_n_device::select0_w))); + page(1)->install_write_handler(0x7ff6, 0x7ff6, 0, 0x0008, 0, write8smo_delegate(*this, FUNC(msx_slot_disk6_wd2793_n_device::select1_w))); +} + +void msx_slot_disk6_wd2793_n_device::device_reset() +{ + m_fdc->dden_w(false); +} + +void msx_slot_disk6_wd2793_n_device::device_post_load() +{ + select_drive(); +} + +void msx_slot_disk6_wd2793_n_device::select_drive() +{ + if (m_drive_select1) { - case 0x00: - return m_fdc->status_r(); + m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; + if (!m_floppy) + { + m_drive_select1 = 0; + } + } - case 0x01: - return m_fdc->track_r(); + if (m_drive_select0) + { + m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; + if (!m_floppy) + { + m_drive_select0 = 0; + } + } - case 0x02: - return m_fdc->sector_r(); + m_fdc->set_floppy(m_floppy); - case 0x03: - return m_fdc->data_r(); + set_side_motor(); +} - case 0x04: - return 0x3f | (m_fdc->drq_r() ? 0 : 0x40) | (m_fdc->intrq_r() ? 0x80 : 0); +void msx_slot_disk6_wd2793_n_device::set_side_motor() +{ + if (m_floppy) + { + m_floppy->mon_w(BIT(m_side_motor, 1) ? 0 : 1); + m_floppy->ss_w(BIT(m_side_motor, 0)); } +} - return 0xff; +u8 msx_slot_disk6_wd2793_n_device::side_motor_r() +{ + // bit 0 = side control + // bit 1 = motor control + return 0xfc | m_side_motor; } +u8 msx_slot_disk6_wd2793_n_device::select0_r() +{ + // This reads back a 1 in bit 0 if drive0 is present and selected + return 0xfe | m_drive_select0; +} -void msx_slot_disk5_device::io_write(offs_t offset, uint8_t data) +u8 msx_slot_disk6_wd2793_n_device::select1_r() { - switch (offset) - { - case 0x00: - m_fdc->cmd_w(data); - break; + // This reads back a 1 in bit 0 if drive1 is present and selected + return 0xfe | m_drive_select1; +} - case 0x01: - m_fdc->track_w(data); - break; +u8 msx_slot_disk6_wd2793_n_device::status_r() +{ + return 0x3f | (m_fdc->intrq_r() ? 0 : 0x40) | (m_fdc->drq_r() ? 0 : 0x80); +} + +void msx_slot_disk6_wd2793_n_device::side_motor_w(u8 data) +{ + // Side and motor control + // bit 0 = side select + // bit 1 = motor on/off + m_side_motor = data; + set_side_motor(); +} + +void msx_slot_disk6_wd2793_n_device::select0_w(u8 data) +{ + // bit 0 - select drive 0 + m_drive_select0 = data; + select_drive(); +} + +void msx_slot_disk6_wd2793_n_device::select1_w(u8 data) +{ + // bit 1 - select drive 1 + m_drive_select1 = data; + select_drive(); +} - case 0x02: - m_fdc->sector_w(data); - break; - case 0x03: - m_fdc->data_w(data); - break; - case 0x04: - set_control(data); - break; +msx_slot_disk7_mb8877_device::msx_slot_disk7_mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK7_MB8877, tag, owner, clock) + , m_drive_side_motor(0) +{ +} + +void msx_slot_disk7_mb8877_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, MB8877, FORCE_READY, DRIVES_1, DS); +} + +void msx_slot_disk7_mb8877_device::device_start() +{ + msx_slot_wd_disk_device::device_start(); + + save_item(NAME(m_drive_side_motor)); + + page(1)->install_rom(0x4000, 0x7fff, rom_base()); + page(1)->install_read_handler(0x7ff8, 0x7ff8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(1)->install_read_handler(0x7ff9, 0x7ff9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(1)->install_read_handler(0x7ffa, 0x7ffa, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(1)->install_read_handler(0x7ffb, 0x7ffb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(1)->install_read_handler(0x7ffc, 0x7ffc, read8smo_delegate(*this, FUNC(msx_slot_disk7_mb8877_device::status_r))); + page(1)->install_write_handler(0x7ff8, 0x7ff8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(1)->install_write_handler(0x7ff9, 0x7ff9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(1)->install_write_handler(0x7ffa, 0x7ffa, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(1)->install_write_handler(0x7ffb, 0x7ffb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(1)->install_write_handler(0x7ffc, 0x7ffc, write8smo_delegate(*this, FUNC(msx_slot_disk7_mb8877_device::side_motor_w))); + + // TODO No idea why, but without this the other handlers do not get recognized + page(2)->install_rom(0xbff8, 0xbff8, rom_base()); + page(2)->install_read_handler(0xbff8, 0xbff8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(2)->install_read_handler(0xbff9, 0xbff9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(2)->install_read_handler(0xbffa, 0xbffa, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(2)->install_read_handler(0xbffb, 0xbffb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(2)->install_read_handler(0xbffc, 0xbffc, read8smo_delegate(*this, FUNC(msx_slot_disk7_mb8877_device::status_r))); + page(2)->install_write_handler(0xbff8, 0xbff8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(2)->install_write_handler(0xbff9, 0xbff9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(2)->install_write_handler(0xbffa, 0xbffa, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(2)->install_write_handler(0xbffb, 0xbffb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(2)->install_write_handler(0xbffc, 0xbffc, write8smo_delegate(*this, FUNC(msx_slot_disk7_mb8877_device::side_motor_w))); +} + +void msx_slot_disk7_mb8877_device::device_reset() +{ + m_fdc->dden_w(false); +} + +void msx_slot_disk7_mb8877_device::device_post_load() +{ + select_drive(); +} + +void msx_slot_disk7_mb8877_device::select_drive() +{ + m_floppy = nullptr; + + switch (m_drive_side_motor & 0x03) + { + case 0: + m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; + break; + case 1: + m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; + break; + } + + m_fdc->set_floppy(m_floppy); +} + +void msx_slot_disk7_mb8877_device::set_drive_side_motor() +{ + select_drive(); + + if (m_floppy) + { + m_floppy->mon_w(BIT(m_drive_side_motor, 3) ? 0 : 1); + m_floppy->ss_w(BIT(m_drive_side_motor, 2)); } } +void msx_slot_disk7_mb8877_device::side_motor_w(u8 data) +{ + // Drive, side and motor control + // bit 0,1 = drive select + // bit 2 = side select + // bit 3 = motor on/off + m_drive_side_motor = data; + set_drive_side_motor(); +} +u8 msx_slot_disk7_mb8877_device::status_r() +{ + return (m_drive_side_motor & 0x0f) + | (m_floppy && m_floppy->dskchg_r() ? 0x00 : 0x10) + | (m_floppy && m_floppy->ready_r() ? 0x00 : 0x20) + | (m_fdc->intrq_r() ? 0x40 : 0x00) + | (m_fdc->drq_r() ? 0x80 : 0x00); +} -msx_slot_disk6_device::msx_slot_disk6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK6, tag, owner, clock) - , m_side_motor(0) - , m_drive_select0(0) - , m_drive_select1(0) + + +msx_slot_disk8_mb8877_device::msx_slot_disk8_mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : msx_slot_disk8_mb8877_device(mconfig, MSX_SLOT_DISK8_MB8877, tag, owner, clock) +{ +} + +msx_slot_disk8_mb8877_device::msx_slot_disk8_mb8877_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : msx_slot_wd_disk_device(mconfig, type, tag, owner, clock) + , m_control(0) { } +void msx_slot_disk8_mb8877_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, MB8877, FORCE_READY, DRIVES_1, DS); +} -void msx_slot_disk6_device::device_start() +void msx_slot_disk8_mb8877_device::device_start() { msx_slot_wd_disk_device::device_start(); - save_item(NAME(m_side_motor)); - save_item(NAME(m_drive_select0)); - save_item(NAME(m_drive_select1)); + save_item(NAME(m_control)); + + page(1)->install_rom(0x4000, 0x7fff, rom_base()); + page(1)->install_read_handler(0x7f80, 0x7f80, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(1)->install_read_handler(0x7f81, 0x7f81, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(1)->install_read_handler(0x7f82, 0x7f82, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(1)->install_read_handler(0x7f83, 0x7f83, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(1)->install_read_handler(0x7f84, 0x7f84, read8smo_delegate(*this, FUNC(msx_slot_disk8_mb8877_device::status_r))); + page(1)->install_write_handler(0x7f80, 0x7f80, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(1)->install_write_handler(0x7f81, 0x7f81, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(1)->install_write_handler(0x7f82, 0x7f82, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(1)->install_write_handler(0x7f83, 0x7f83, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(1)->install_write_handler(0x7f84, 0x7f84, write8smo_delegate(*this, FUNC(msx_slot_disk8_mb8877_device::set_control))); + + // TODO No idea why, but without this the other handlers do not get recognized + page(2)->install_rom(0xbf80,0xbf80, rom_base()); + page(2)->install_read_handler(0xbf80, 0xbf80, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(2)->install_read_handler(0xbf81, 0xbf81, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(2)->install_read_handler(0xbf82, 0xbf82, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(2)->install_read_handler(0xbf83, 0xbf83, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(2)->install_read_handler(0xbf84, 0xbf84, read8smo_delegate(*this, FUNC(msx_slot_disk8_mb8877_device::status_r))); + page(2)->install_write_handler(0xbf80, 0xbf80, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(2)->install_write_handler(0xbf81, 0xbf81, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(2)->install_write_handler(0xbf82, 0xbf82, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(2)->install_write_handler(0xbf83, 0xbf83, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(2)->install_write_handler(0xbf84, 0xbf84, write8smo_delegate(*this, FUNC(msx_slot_disk8_mb8877_device::set_control))); } -void msx_slot_disk6_device::device_reset() +void msx_slot_disk8_mb8877_device::device_reset() { m_fdc->dden_w(false); } -void msx_slot_disk6_device::device_post_load() +void msx_slot_disk8_mb8877_device::device_post_load() { - select_drive(); + set_control(m_control); } -void msx_slot_disk6_device::select_drive() +void msx_slot_disk8_mb8877_device::set_control(u8 data) { - if (m_drive_select1) + const u8 old_m_control = m_control; + + m_control = data; + + switch (m_control & 3) { + case 1: + m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; + break; + + case 2: m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; - if (!m_floppy) - { - m_drive_select1 = 0; - } + break; + + default: + m_floppy = nullptr; + break; } - if (m_drive_select0) + if (m_floppy) { - m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; - if (!m_floppy) - { - m_drive_select0 = 0; - } + m_floppy->mon_w(BIT(m_control, 3) ? 0 : 1); + m_floppy->ss_w(BIT(m_control, 2) ? 1 : 0); } m_fdc->set_floppy(m_floppy); - set_side_motor(); + if ((old_m_control ^ m_control) & 0x40) + { + m_led = BIT(~m_control, 6); + } } +u8 msx_slot_disk8_mb8877_device::status_r() +{ + return 0x3f | (m_fdc->drq_r() ? 0 : 0x40) | (m_fdc->intrq_r() ? 0x80 : 0); +} -void msx_slot_disk6_device::set_side_motor() + +msx_slot_disk8_wd2793_2_drives_device::msx_slot_disk8_wd2793_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : msx_slot_disk8_mb8877_device(mconfig, MSX_SLOT_DISK8_WD2793_2_DRIVES, tag, owner, clock) { +} + +void msx_slot_disk8_wd2793_2_drives_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, WD2793, FORCE_READY, DRIVES_2, DS); +} + + + + +msx_slot_disk9_wd2793_n_device::msx_slot_disk9_wd2793_n_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK9_WD2793_N, tag, owner, clock) + , m_control(0) +{ +} + +void msx_slot_disk9_wd2793_n_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, WD2793, NO_FORCE_READY, DRIVES_1, DS); +} + +void msx_slot_disk9_wd2793_n_device::device_start() +{ + msx_slot_wd_disk_device::device_start(); + + save_item(NAME(m_control)); + + page(1)->install_rom(0x4000, 0x7fff, rom_base()); + page(1)->install_read_handler(0x7ff8, 0x7ff8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(1)->install_read_handler(0x7ff9, 0x7ff9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(1)->install_read_handler(0x7ffa, 0x7ffa, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(1)->install_read_handler(0x7ffb, 0x7ffb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(1)->install_read_handler(0x7ffc, 0x7ffc, read8smo_delegate(*this, FUNC(msx_slot_disk9_wd2793_n_device::status_r))); + page(1)->install_write_handler(0x7ff8, 0x7ff8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(1)->install_write_handler(0x7ff9, 0x7ff9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(1)->install_write_handler(0x7ffa, 0x7ffa, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(1)->install_write_handler(0x7ffb, 0x7ffb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(1)->install_write_handler(0x7ffc, 0x7ffc, write8smo_delegate(*this, FUNC(msx_slot_disk9_wd2793_n_device::control_w))); +} + +void msx_slot_disk9_wd2793_n_device::device_reset() +{ + m_fdc->dden_w(false); +} + +void msx_slot_disk9_wd2793_n_device::device_post_load() +{ + control_w(m_control); +} + +void msx_slot_disk9_wd2793_n_device::control_w(u8 data) +{ + const u8 old_m_control = m_control; + + m_control = data; + + switch (m_control & 0x03) + { + case 1: + m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; + break; + + case 2: + m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; + break; + + default: + m_floppy = nullptr; + break; + } + if (m_floppy) { - m_floppy->mon_w((m_side_motor & 0x02) ? 0 : 1); - m_floppy->ss_w(m_side_motor & 0x01); + m_floppy->mon_w(BIT(m_control, 3) ? 0 : 1); + m_floppy->ss_w(BIT(m_control, 2)); } + + m_fdc->set_floppy(m_floppy); + + if ((old_m_control ^ m_control) & 0x40) + { + m_led = BIT(m_control, 6); + } +} + +u8 msx_slot_disk9_wd2793_n_device::status_r() +{ + return 0x3f | (m_fdc->intrq_r() ? 0x80 : 0) | (m_fdc->drq_r() ? 0x40 : 0); +} + + + + +msx_slot_disk10_mb8877_device::msx_slot_disk10_mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk10_mb8877_device(mconfig, MSX_SLOT_DISK10_MB8877, tag, owner, clock) +{ } +msx_slot_disk10_mb8877_device::msx_slot_disk10_mb8877_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : msx_slot_wd_disk_device(mconfig, type, tag, owner, clock) + , m_control(0) +{ +} -uint8_t msx_slot_disk6_device::read(offs_t offset) +void msx_slot_disk10_mb8877_device::device_add_mconfig(machine_config &config) { - switch (offset) + add_mconfig(config, MB8877, FORCE_READY, DRIVES_1, DS); +} + +void msx_slot_disk10_mb8877_device::device_start() +{ + msx_slot_wd_disk_device::device_start(); + + save_item(NAME(m_control)); + + page(1)->install_rom(0x4000, 0x7fff, rom_base()); + page(1)->install_read_handler(0x7ff8, 0x7ff8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(1)->install_read_handler(0x7ff9, 0x7ff9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(1)->install_read_handler(0x7ffa, 0x7ffa, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(1)->install_read_handler(0x7ffb, 0x7ffb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(1)->install_read_handler(0x7ffc, 0x7ffc, read8smo_delegate(*this, FUNC(msx_slot_disk10_mb8877_device::status_r))); + // TODO 0x7ffd return system control/status + page(1)->install_write_handler(0x7ff8, 0x7ff8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(1)->install_write_handler(0x7ff9, 0x7ff9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(1)->install_write_handler(0x7ffa, 0x7ffa, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(1)->install_write_handler(0x7ffb, 0x7ffb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(1)->install_write_handler(0x7ffc, 0x7ffc, write8smo_delegate(*this, FUNC(msx_slot_disk10_mb8877_device::control_w))); +} + +void msx_slot_disk10_mb8877_device::device_reset() +{ + m_fdc->dden_w(false); +} + +void msx_slot_disk10_mb8877_device::device_post_load() +{ + control_w(m_control); +} + +void msx_slot_disk10_mb8877_device::control_w(u8 data) +{ + const u8 old_m_control = m_control; + + m_control = data; + + if (BIT(m_control, 2)) + m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; + else + m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; + + if (m_floppy && !BIT(m_control, 2)) + m_floppy->mon_w(BIT(m_control, 0) ? 0 : 1); + + if (m_floppy && BIT(m_control, 2)) + m_floppy->mon_w(BIT(m_control, 1) ? 0 : 1); + + if (m_floppy) + m_floppy->ss_w(BIT(m_control, 3)); + + m_fdc->set_floppy(m_floppy); + + // TODO Verify + if ((old_m_control ^ m_control) & 0x40) { - case 0x7ff0: // status? - case 0x7ff8: - return m_fdc->status_r(); - - case 0x7ff1: // track? - case 0x7ff9: - return m_fdc->track_r(); - - case 0x7ff2: // sector? - case 0x7ffa: - return m_fdc->sector_r(); - - case 0x7ff3: // data? - case 0x7ffb: - return m_fdc->data_r(); - - case 0x7ff4: - case 0x7ffc: - // bit 0 = side control - // bit 1 = motor control - return 0xfc | m_side_motor; - break; - - // This reads back a 1 in bit 0 if drive0 is present and selected - case 0x7ff5: - case 0x7ffd: - return 0xfe | m_drive_select0; - - // This reads back a 1 in bit 0 if drive1 is present and selected - case 0x7ff6: - case 0x7ffe: - return 0xfe | m_drive_select1; - - case 0x7ff7: - case 0x7fff: - return 0x3f | (m_fdc->intrq_r() ? 0 : 0x40) | (m_fdc->drq_r() ? 0 : 0x80); + m_led = BIT(m_control, 6); } +} + +u8 msx_slot_disk10_mb8877_device::status_r() +{ + return 0x23 + | (m_control & 0x04) + | ((m_control & 0x08) ^ 0x08) + | ((m_floppy && m_floppy->mon_r()) ? 0 : 0x10) + | (m_fdc->drq_r() ? 0x40 : 0) + | (m_fdc->intrq_r() ? 0x80 : 0); +} + + +msx_slot_disk10_mb8877_2_drives_device::msx_slot_disk10_mb8877_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_disk10_mb8877_device(mconfig, MSX_SLOT_DISK10_MB8877_2_DRIVES, tag, owner, clock) +{ +} + +void msx_slot_disk10_mb8877_2_drives_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, MB8877, FORCE_READY, DRIVES_2, DS); +} + + + +msx_slot_disk11_wd2793_device::msx_slot_disk11_wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_wd_disk_device(mconfig, MSX_SLOT_DISK11_WD2793, tag, owner, clock) + , m_side_control(0) + , m_control(0) +{ +} + +void msx_slot_disk11_wd2793_device::device_add_mconfig(machine_config &config) +{ + add_mconfig(config, WD2793, FORCE_READY, DRIVES_1, DS); +} + +void msx_slot_disk11_wd2793_device::device_start() +{ + msx_slot_wd_disk_device::device_start(); + + save_item(NAME(m_side_control)); + save_item(NAME(m_control)); - return msx_slot_rom_device::read(offset); + page(1)->install_rom(0x4000, 0x7fff, rom_base()); + page(1)->install_read_handler(0x7ff8, 0x7ff8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(1)->install_read_handler(0x7ff9, 0x7ff9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(1)->install_read_handler(0x7ffa, 0x7ffa, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(1)->install_read_handler(0x7ffb, 0x7ffb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(1)->install_read_handler(0x7ffc, 0x7ffc, read8smo_delegate(*this, FUNC(msx_slot_disk11_wd2793_device::side_control_r))); + page(1)->install_read_handler(0x7ffd, 0x7ffd, read8smo_delegate(*this, FUNC(msx_slot_disk11_wd2793_device::control_r))); + page(1)->install_read_handler(0x7fff, 0x7fff, read8smo_delegate(*this, FUNC(msx_slot_disk11_wd2793_device::status_r))); + page(1)->install_write_handler(0x7ff8, 0x7ff8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(1)->install_write_handler(0x7ff9, 0x7ff9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(1)->install_write_handler(0x7ffa, 0x7ffa, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(1)->install_write_handler(0x7ffb, 0x7ffb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(1)->install_write_handler(0x7ffc, 0x7ffc, write8smo_delegate(*this, FUNC(msx_slot_disk11_wd2793_device::side_control_w))); + page(1)->install_write_handler(0x7ffd, 0x7ffd, write8smo_delegate(*this, FUNC(msx_slot_disk11_wd2793_device::control_w))); + + // TODO No idea why, but without this the other handlers do not get recognized + page(2)->install_rom(0xbff8, 0xbff8, rom_base()); + page(2)->install_read_handler(0xbff8, 0xbff8, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::status_r))); + page(2)->install_read_handler(0xbff9, 0xbff9, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_r))); + page(2)->install_read_handler(0xbffa, 0xbffa, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_r))); + page(2)->install_read_handler(0xbffb, 0xbffb, read8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_r))); + page(2)->install_read_handler(0xbffc, 0xbffc, read8smo_delegate(*this, FUNC(msx_slot_disk11_wd2793_device::side_control_r))); + page(2)->install_read_handler(0xbffd, 0xbffd, read8smo_delegate(*this, FUNC(msx_slot_disk11_wd2793_device::control_r))); + page(2)->install_read_handler(0xbfff, 0xbfff, read8smo_delegate(*this, FUNC(msx_slot_disk11_wd2793_device::status_r))); + page(2)->install_write_handler(0xbff8, 0xbff8, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::cmd_w))); + page(2)->install_write_handler(0xbff9, 0xbff9, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::track_w))); + page(2)->install_write_handler(0xbffa, 0xbffa, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::sector_w))); + page(2)->install_write_handler(0xbffb, 0xbffb, write8smo_delegate(*m_fdc, FUNC(wd_fdc_analog_device_base::data_w))); + page(2)->install_write_handler(0xbffc, 0xbffc, write8smo_delegate(*this, FUNC(msx_slot_disk11_wd2793_device::side_control_w))); + page(2)->install_write_handler(0xbffd, 0xbffd, write8smo_delegate(*this, FUNC(msx_slot_disk11_wd2793_device::control_w))); } +void msx_slot_disk11_wd2793_device::device_reset() +{ + m_fdc->dden_w(false); +} -void msx_slot_disk6_device::write(offs_t offset, uint8_t data) +void msx_slot_disk11_wd2793_device::device_post_load() { - switch (offset) + control_w(m_control); +} + +void msx_slot_disk11_wd2793_device::side_control_w(u8 data) +{ + m_side_control = data; + + if (m_floppy) + m_floppy->ss_w(BIT(m_side_control, 0)); +} + +void msx_slot_disk11_wd2793_device::control_w(u8 data) +{ + const u8 old_m_control = m_control; + + m_control = data; + + m_floppy = nullptr; + switch (m_control & 0x03) { - case 0x7ff0: // cmd? - case 0x7ff8: - m_fdc->cmd_w(data); - break; - - case 0x7ff1: // track? - case 0x7ff9: - m_fdc->track_w(data); - break; - - case 0x7ff2: // sector? - case 0x7ffa: - m_fdc->sector_w(data); - break; - - case 0x7ff3: // data? - case 0x7ffb: - m_fdc->data_w(data); - break; - - // Side and motort control - // bit 0 = side select - // bit 1 = motor on/off - case 0x7ff4: - case 0x7ffc: - m_side_motor = data; - set_side_motor(); - break; - - // bit 0 - select drive 0 - case 0x7ff5: - case 0x7ffd: - m_drive_select0 = data; - select_drive(); - break; - - // bit 1 - select drive 1 - case 0x7ff6: - case 0x7ffe: - m_drive_select1 = data; - select_drive(); - break; - - default: - logerror("msx_slot_disk6_device::write: Unmapped write writing %02x to %04x\n", data, offset); - break; + case 0: + m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr; + break; + + case 1: + m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr; + break; } + + if (m_floppy) + { + m_floppy->mon_w(BIT(m_control, 7) ? 0 : 1); + m_floppy->ss_w(BIT(m_side_control, 0)); + } + + m_fdc->set_floppy(m_floppy); + + if ((old_m_control ^ m_control) & 0x40) + { + m_led = BIT(~m_control, 6); + } +} + +u8 msx_slot_disk11_wd2793_device::side_control_r() +{ + return 0xfe | (m_side_control & 0x01); +} + +u8 msx_slot_disk11_wd2793_device::control_r() +{ + return (m_control & 0x83) | 0x78; +} + +u8 msx_slot_disk11_wd2793_device::status_r() +{ + // bit 4 is checked during reading (ready check?) + return 0x3f | (m_fdc->intrq_r() ? 0 : 0x40) | (m_fdc->drq_r() ? 0 : 0x80); } diff --git a/src/devices/bus/msx_slot/disk.h b/src/devices/bus/msx_slot/disk.h index 184ea2caf66..5d96682b795 100644 --- a/src/devices/bus/msx_slot/disk.h +++ b/src/devices/bus/msx_slot/disk.h @@ -12,72 +12,81 @@ #include "imagedev/floppy.h" -/* WD FDC accessed through 7ffx */ -DECLARE_DEVICE_TYPE(MSX_SLOT_DISK1, msx_slot_disk1_device) -/* WD FDC accessed through 7fbx */ -DECLARE_DEVICE_TYPE(MSX_SLOT_DISK2, msx_slot_disk2_device) -/* TC8566 accessed through 7ff8-7fff */ -DECLARE_DEVICE_TYPE(MSX_SLOT_DISK3, msx_slot_disk3_device) -/* TC8566 accessed through 7ff0-7ff7 (used in Turob-R, untested) */ -DECLARE_DEVICE_TYPE(MSX_SLOT_DISK4, msx_slot_disk4_device) -/* WD FDC accessed through i/o ports 0xd0-0xd4 */ -DECLARE_DEVICE_TYPE(MSX_SLOT_DISK5, msx_slot_disk5_device) -/* WD FDC accessed through 7ff0-7ff? (used in Toshiba HX34) */ -DECLARE_DEVICE_TYPE(MSX_SLOT_DISK6, msx_slot_disk6_device) +// WD FDC accessed through 7ffx +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK1_FD1793, msx_slot_disk1_fd1793_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK1_MB8877, msx_slot_disk1_mb8877_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793_N, msx_slot_disk1_wd2793_n_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793_N_2_DRIVES, msx_slot_disk1_wd2793_n_2_drives_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793, msx_slot_disk1_wd2793_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793_0, msx_slot_disk1_wd2793_0_device) // No drives, for nms8260 +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793_SS, msx_slot_disk1_wd2793_ss_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK1_WD2793_2_DRIVES, msx_slot_disk1_wd2793_2_drives_device) +// WD FDC accessed through 7fbx +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK2_FD1793_SS, msx_slot_disk2_fd1793_ss_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK2_MB8877, msx_slot_disk2_mb8877_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK2_MB8877_SS, msx_slot_disk2_mb8877_ss_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK2_MB8877_2_DRIVES, msx_slot_disk2_mb8877_2_drives_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK2_WD2793, msx_slot_disk2_wd2793_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK2_WD2793_2_DRIVES, msx_slot_disk2_wd2793_2_drives_device) +// TC8566 accessed through 7ff8-7fff +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK3_TC8566, msx_slot_disk3_tc8566_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK3_TC8566_2_DRIVES, msx_slot_disk3_tc8566_2_drives_device) +// TC8566 accessed through 7ff0-7ff7 (used in Turob-R, untested) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK4_TC8566, msx_slot_disk4_tc8566_device) +// WD FDC accessed through i/o ports 0xd0-0xd4 +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK5_WD2793, msx_slot_disk5_wd2793_device) +// WD FDC accessed through 7ff0-7ff? (used in Toshiba HX34) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK6_WD2793_N, msx_slot_disk6_wd2793_n_device) +// MB FDC accessed through 7ff8-7ffc (used in Canon V-30F) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK7_MB8877, msx_slot_disk7_mb8877_device) +// WD FDC accessed through 7f8x +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK8_MB8877, msx_slot_disk8_mb8877_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK8_WD2793_2_DRIVES, msx_slot_disk8_wd2793_2_drives_device) +// WD FDC accessed through 7ffx, slightly different from DISK1 (used in PHC-77) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK9_WD2793_N, msx_slot_disk9_wd2793_n_device) +// WD FDC accessed through 7ffx, slightly different from DISK1 (used in Victor HC-90 / HC-95) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK10_MB8877, msx_slot_disk10_mb8877_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK10_MB8877_2_DRIVES, msx_slot_disk10_mb8877_2_drives_device) +// WD FDC accessed through 7ffx, slightly different from DISK1 (used in Yamaha YIS-805) +DECLARE_DEVICE_TYPE(MSX_SLOT_DISK11_WD2793, msx_slot_disk11_wd2793_device) class msx_slot_disk_device : public msx_slot_rom_device { -public: - // configuration helpers - void set_fdc_tag(const char *tag) { m_fdc_tag = tag; } - void set_floppy0_tag(const char *tag) { m_floppy0_tag = tag; } - void set_floppy1_tag(const char *tag) { m_floppy1_tag = tag; } - void set_floppy2_tag(const char *tag) { m_floppy2_tag = tag; } - void set_floppy3_tag(const char *tag) { m_floppy3_tag = tag; } - - void set_tags(const char *fdc_tag, const char *floppy0_tag, const char *floppy1_tag) - { - m_fdc_tag = fdc_tag; - m_floppy0_tag = floppy0_tag; - m_floppy1_tag = floppy1_tag; - } - void set_tags(const char *fdc_tag, const char *floppy0_tag, const char *floppy1_tag, const char *floppy2_tag, const char *floppy3_tag) - { - m_fdc_tag = fdc_tag; - m_floppy0_tag = floppy0_tag; - m_floppy1_tag = floppy1_tag; - m_floppy2_tag = floppy2_tag; - m_floppy3_tag = floppy3_tag; - } - protected: - msx_slot_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - - virtual void device_start() override; - - floppy_connector *m_floppy0; - floppy_connector *m_floppy1; - floppy_connector *m_floppy2; - floppy_connector *m_floppy3; + static constexpr int NO_DRIVES = 0; + static constexpr int DRIVES_1 = 1; + static constexpr int DRIVES_2 = 2; + static constexpr int DRIVES_3 = 3; + static constexpr int DRIVES_4 = 4; + static constexpr bool DS = true; + static constexpr bool SS = false; + + msx_slot_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + + static void floppy_formats(format_registration &fr); + void add_drive_mconfig(machine_config &config, int nr_of_drives, bool double_sided); + + optional_device m_floppy0; + optional_device m_floppy1; + optional_device m_floppy2; + optional_device m_floppy3; floppy_image_device *m_floppy; - - const char *m_fdc_tag; - const char *m_floppy0_tag; - const char *m_floppy1_tag; - const char *m_floppy2_tag; - const char *m_floppy3_tag; }; class msx_slot_wd_disk_device : public msx_slot_disk_device { protected: + static constexpr bool FORCE_READY = true; + static constexpr bool NO_FORCE_READY = false; + msx_slot_wd_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); virtual void device_start() override; + template void add_mconfig(machine_config &config, FDCType &&type, bool force_ready, int nr_of_drives, bool double_sided); - wd_fdc_analog_device_base *m_fdc; + required_device m_fdc; output_finder<> m_led; }; @@ -87,115 +96,375 @@ class msx_slot_tc8566_disk_device : public msx_slot_disk_device protected: msx_slot_tc8566_disk_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + void add_mconfig(machine_config &config, int nr_of_drives); + + required_device m_fdc; +}; + + +class msx_slot_disk1_base_device : public msx_slot_wd_disk_device +{ +protected: + msx_slot_disk1_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); virtual void device_start() override; + virtual void device_reset() override; + virtual void device_post_load() override; + +private: + void set_control(u8 data); + void set_side_control(u8 data); + u8 side_control_r(); + u8 control_r(); + u8 status_r(); + + u8 m_side_control; + u8 m_control; +}; + +class msx_slot_disk1_fd1793_device : public msx_slot_disk1_base_device +{ +public: + msx_slot_disk1_fd1793_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + +class msx_slot_disk1_mb8877_device : public msx_slot_disk1_base_device +{ +public: + msx_slot_disk1_mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + +class msx_slot_disk1_wd2793_n_device : public msx_slot_disk1_base_device +{ +public: + msx_slot_disk1_wd2793_n_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + +class msx_slot_disk1_wd2793_n_2_drives_device : public msx_slot_disk1_base_device +{ +public: + msx_slot_disk1_wd2793_n_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + +class msx_slot_disk1_wd2793_device : public msx_slot_disk1_base_device +{ +public: + msx_slot_disk1_wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - tc8566af_device *m_fdc; +protected: + virtual void device_add_mconfig(machine_config &config) override; }; +class msx_slot_disk1_wd2793_0_device : public msx_slot_disk1_base_device +{ +public: + msx_slot_disk1_wd2793_0_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + +class msx_slot_disk1_wd2793_ss_device : public msx_slot_disk1_base_device +{ +public: + msx_slot_disk1_wd2793_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; -class msx_slot_disk1_device : public msx_slot_wd_disk_device +class msx_slot_disk1_wd2793_2_drives_device : public msx_slot_disk1_base_device { public: - msx_slot_disk1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk1_wd2793_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; +class msx_slot_disk2_base_device : public msx_slot_wd_disk_device +{ protected: + msx_slot_disk2_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); virtual void device_start() override; virtual void device_reset() override; virtual void device_post_load() override; private: - uint8_t m_side_control; - uint8_t m_control; + void set_control(u8 data); + u8 status_r(); + + u8 m_control; +}; + +class msx_slot_disk2_fd1793_ss_device : public msx_slot_disk2_base_device +{ +public: + msx_slot_disk2_fd1793_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - void set_control(uint8_t data); - void set_side_control(uint8_t data); +protected: + virtual void device_add_mconfig(machine_config &config) override; }; +class msx_slot_disk2_mb8877_device : public msx_slot_disk2_base_device +{ +public: + msx_slot_disk2_mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + +class msx_slot_disk2_mb8877_ss_device : public msx_slot_disk2_base_device +{ +public: + msx_slot_disk2_mb8877_ss_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; -class msx_slot_disk2_device : public msx_slot_wd_disk_device +class msx_slot_disk2_mb8877_2_drives_device : public msx_slot_disk2_base_device { public: - msx_slot_disk2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk2_mb8877_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + +class msx_slot_disk2_wd2793_device : public msx_slot_disk2_base_device +{ +public: + msx_slot_disk2_wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + +class msx_slot_disk2_wd2793_2_drives_device : public msx_slot_disk2_base_device +{ +public: + msx_slot_disk2_wd2793_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + + + +class msx_slot_disk3_tc8566_device : public msx_slot_tc8566_disk_device +{ +public: + msx_slot_disk3_tc8566_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + msx_slot_disk3_tc8566_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + virtual void device_add_mconfig(machine_config &config) override; + virtual void device_start() override; +}; + + +class msx_slot_disk3_tc8566_2_drives_device : public msx_slot_disk3_tc8566_device +{ +public: + msx_slot_disk3_tc8566_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + + +class msx_slot_disk4_tc8566_device : public msx_slot_tc8566_disk_device +{ +public: + msx_slot_disk4_tc8566_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; + virtual void device_start() override; +}; + + +class msx_slot_disk5_wd2793_device : public msx_slot_wd_disk_device +{ +public: + msx_slot_disk5_wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_post_load() override; + virtual void device_add_mconfig(machine_config &config) override; private: - uint8_t m_control; + void control_w(u8 control); + u8 status_r(); - void set_control(uint8_t data); + u8 m_control; }; -class msx_slot_disk3_device : public msx_slot_tc8566_disk_device +class msx_slot_disk6_wd2793_n_device : public msx_slot_wd_disk_device { public: - msx_slot_disk3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk6_wd2793_n_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; +protected: + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_post_load() override; + virtual void device_add_mconfig(machine_config &config) override; + +private: + void set_side_motor(); + void select_drive(); + u8 side_motor_r(); + u8 select0_r(); + u8 select1_r(); + u8 status_r(); + void side_motor_w(u8 data); + void select0_w(u8 data); + void select1_w(u8 data); + + u8 m_side_motor; + u8 m_drive_select0; + u8 m_drive_select1; }; -class msx_slot_disk4_device : public msx_slot_tc8566_disk_device +class msx_slot_disk7_mb8877_device : public msx_slot_wd_disk_device { public: - msx_slot_disk4_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk7_mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; +protected: + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_post_load() override; + virtual void device_add_mconfig(machine_config &config) override; + +private: + void set_drive_side_motor(); + void select_drive(); + void side_motor_w(u8 data); + u8 status_r(); + + u8 m_drive_side_motor; }; -class msx_slot_disk5_device : public msx_slot_wd_disk_device +class msx_slot_disk8_mb8877_device : public msx_slot_wd_disk_device { public: - msx_slot_disk5_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk8_mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); protected: + msx_slot_disk8_mb8877_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + virtual void device_start() override; virtual void device_reset() override; virtual void device_post_load() override; + virtual void device_add_mconfig(machine_config &config) override; private: - uint8_t io_read(offs_t offset); - void io_write(offs_t offset, uint8_t data); + void set_control(u8 data); + u8 status_r(); - uint8_t m_control; + u8 m_control; +}; - void set_control(uint8_t control); +class msx_slot_disk8_wd2793_2_drives_device : public msx_slot_disk8_mb8877_device +{ +public: + msx_slot_disk8_wd2793_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; }; -class msx_slot_disk6_device : public msx_slot_wd_disk_device +class msx_slot_disk9_wd2793_n_device : public msx_slot_wd_disk_device { public: - msx_slot_disk6_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_disk9_wd2793_n_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; +protected: + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_post_load() override; + virtual void device_add_mconfig(machine_config &config) override; + +private: + void control_w(u8 data); + u8 status_r(); + + u8 m_control; +}; + + +class msx_slot_disk10_mb8877_device : public msx_slot_wd_disk_device +{ +public: + msx_slot_disk10_mb8877_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); protected: + msx_slot_disk10_mb8877_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + virtual void device_start() override; virtual void device_reset() override; virtual void device_post_load() override; + virtual void device_add_mconfig(machine_config &config) override; private: - uint8_t m_side_motor; - uint8_t m_drive_select0; - uint8_t m_drive_select1; + void control_w(u8 data); + u8 status_r(); - void set_side_motor(); - void select_drive(); + u8 m_control; }; +class msx_slot_disk10_mb8877_2_drives_device : public msx_slot_disk10_mb8877_device +{ +public: + msx_slot_disk10_mb8877_2_drives_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override; +}; + + +class msx_slot_disk11_wd2793_device : public msx_slot_wd_disk_device +{ +public: + msx_slot_disk11_wd2793_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_post_load() override; + virtual void device_add_mconfig(machine_config &config) override; + +private: + void control_w(u8 data); + void side_control_w(u8 data); + u8 side_control_r(); + u8 control_r(); + u8 status_r(); + + u8 m_side_control; + u8 m_control; +}; #endif // MAME_BUS_MSX_SLOT_DISK_H diff --git a/src/devices/bus/msx_slot/fs4600.cpp b/src/devices/bus/msx_slot/fs4600.cpp index 0f328985f6f..ae6d472c1d5 100644 --- a/src/devices/bus/msx_slot/fs4600.cpp +++ b/src/devices/bus/msx_slot/fs4600.cpp @@ -11,28 +11,25 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_FS4600, msx_slot_fs4600_device, "msx_slot_fs4600", "MSX Internal FS4600 Firmware") -msx_slot_fs4600_device::msx_slot_fs4600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_fs4600_device::msx_slot_fs4600_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_SLOT_FS4600, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) , m_nvram(*this, "nvram") , m_rom_region(*this, finder_base::DUMMY_TAG) + , m_rombank(*this, "rombank%u", 0U) + , m_view0(*this, "view0") + , m_view1(*this, "view1") + , m_view2(*this, "view2") , m_region_offset(0) - , m_rom(nullptr) - , m_selected_bank{ 0, 0, 0, 0 } - , m_bank_base{ nullptr, nullptr, nullptr, nullptr } , m_sram_address(0) - , m_control(0) { - memset(m_sram, 0, sizeof(m_sram)); } - void msx_slot_fs4600_device::device_add_mconfig(machine_config &config) { - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + NVRAM(config, m_nvram, nvram_device::DEFAULT_ALL_0); } - void msx_slot_fs4600_device::device_start() { // Sanity checks @@ -41,102 +38,101 @@ void msx_slot_fs4600_device::device_start() fatalerror("Memory region '%s' is too small for the FS4600 firmware\n", m_rom_region.finder_tag()); } - m_rom = m_rom_region->base() + m_region_offset; - m_nvram->set_base(m_sram, 0x1000); + m_sram.resize(SRAM_SIZE); + m_nvram->set_base(m_sram.data(), SRAM_SIZE); - save_item(NAME(m_selected_bank)); save_item(NAME(m_sram_address)); - save_item(NAME(m_control)); - restore_banks(); + for (int i = 0; i < 3; i++) + m_rombank[i]->configure_entries(0, 0x40, m_rom_region->base() + m_region_offset, 0x4000); + + page(0)->install_view(0x0000, 0x3fff, m_view0); + m_view0[0].install_read_bank(0x0000, 0x3fff, m_rombank[0]); + m_view0[1].install_read_bank(0x0000, 0x3fff, m_rombank[0]); + m_view0[1].install_write_handler(0x3ffa, 0x3ffd, write8sm_delegate(*this, FUNC(msx_slot_fs4600_device::sram_w))); + m_view0[1].install_read_handler(0x3ffd, 0x3ffd, read8smo_delegate(*this, FUNC(msx_slot_fs4600_device::sram_r))); + + page(1)->install_view(0x4000, 0x7fff, m_view1); + m_view1[0].install_read_bank(0x4000, 0x7fff, m_rombank[1]); + m_view1[0].install_write_handler(0x6000, 0x6000, write8smo_delegate(*this, FUNC(msx_slot_fs4600_device::bank_w<1>))); + m_view1[0].install_write_handler(0x6400, 0x6400, write8smo_delegate(*this, FUNC(msx_slot_fs4600_device::bank_w<0>))); + m_view1[0].install_write_handler(0x7000, 0x7000, write8smo_delegate(*this, FUNC(msx_slot_fs4600_device::bank_w<2>))); + m_view1[1].install_read_bank(0x4000, 0x7fff, m_rombank[1]); + m_view1[1].install_write_handler(0x7ffa, 0x7ffd, write8sm_delegate(*this, FUNC(msx_slot_fs4600_device::sram_w))); + m_view1[1].install_read_handler(0x7ffd, 0x7ffd, read8smo_delegate(*this, FUNC(msx_slot_fs4600_device::sram_r))); + m_view1[2].install_read_bank(0x4000, 0x7fff, m_rombank[1]); + m_view1[2].install_write_handler(0x6000, 0x6000, write8smo_delegate(*this, FUNC(msx_slot_fs4600_device::bank_w<1>))); + m_view1[2].install_write_handler(0x6400, 0x6400, write8smo_delegate(*this, FUNC(msx_slot_fs4600_device::bank_w<0>))); + m_view1[2].install_write_handler(0x7000, 0x7000, write8smo_delegate(*this, FUNC(msx_slot_fs4600_device::bank_w<2>))); + m_view1[2].install_read_handler(0x7ff0, 0x7ff5, read8sm_delegate(*this, FUNC(msx_slot_fs4600_device::bank_r))); + m_view1[3].install_read_bank(0x4000, 0x7fff, m_rombank[1]); + m_view1[3].install_read_handler(0x7ff0, 0x7ff5, read8sm_delegate(*this, FUNC(msx_slot_fs4600_device::bank_r))); + m_view1[3].install_write_handler(0x7ffa, 0x7ffd, write8sm_delegate(*this, FUNC(msx_slot_fs4600_device::sram_w))); + m_view1[3].install_read_handler(0x7ffd, 0x7ffd, read8smo_delegate(*this, FUNC(msx_slot_fs4600_device::sram_r))); + + page(1)->install_write_handler(0x7ff9, 0x7ff9, write8smo_delegate(*this, FUNC(msx_slot_fs4600_device::control_w))); + + page(2)->install_view(0x8000, 0xbfff, m_view2); + m_view2[0].install_read_bank(0x8000, 0xbfff, m_rombank[2]); + m_view2[1].install_read_bank(0x8000, 0xbfff, m_rombank[2]); + m_view2[1].install_write_handler(0xbffa, 0xbffd, write8sm_delegate(*this, FUNC(msx_slot_fs4600_device::sram_w))); + m_view2[1].install_read_handler(0xbffd, 0xbffd, read8smo_delegate(*this, FUNC(msx_slot_fs4600_device::sram_r))); } - -void msx_slot_fs4600_device::device_post_load() +void msx_slot_fs4600_device::device_reset() { - restore_banks(); + m_view0.select(0); + m_view1.select(0); + m_view2.select(0); + m_rombank[0]->set_entry(0); + m_rombank[1]->set_entry(0); + m_rombank[2]->set_entry(0); } +u8 msx_slot_fs4600_device::sram_r() +{ + u8 data = m_sram[m_sram_address & (SRAM_SIZE - 1)]; + if (!machine().side_effects_disabled()) + m_sram_address++; + return data; +} -void msx_slot_fs4600_device::restore_banks() +void msx_slot_fs4600_device::sram_w(offs_t offset, u8 data) { - for (int i = 0; i < 4; i++) + switch (offset) { - m_bank_base[i] = m_rom + ( ( m_selected_bank[i] * 0x4000 ) & 0x0fffff ); + case 0: + m_sram_address = (m_sram_address & 0x00ffff) | (data << 16); + break; + + case 1: + m_sram_address = (m_sram_address & 0xff00ff) | (data << 8); + break; + + case 2: + m_sram_address = (m_sram_address & 0xffff00) | data; + break; + + case 3: + m_sram[m_sram_address++ & (SRAM_SIZE - 1)] = data; + break; } } - -uint8_t msx_slot_fs4600_device::read(offs_t offset) +u8 msx_slot_fs4600_device::bank_r(offs_t offset) { - if ((m_control & 0x02) && ((offset & 0x3fff) == 0x3ffd)) - { - return m_sram[m_sram_address++ & 0xfff]; - } - if ((m_control & 0x04) && (offset& 0x7ff8) == 0x7ff0) - { - return m_selected_bank[(offset >> 1) & 0x03]; - } - return m_bank_base[offset >> 14][offset & 0x3fff]; + return m_rombank[offset >> 1]->entry(); } +template +void msx_slot_fs4600_device::bank_w(u8 data) +{ + m_rombank[Bank]->set_entry(data & 0x3f); +} -void msx_slot_fs4600_device::write(offs_t offset, uint8_t data) +void msx_slot_fs4600_device::control_w(u8 data) { - if (offset == 0x7ff9) - { - m_control = data; - } - else - { - if (m_control & 0x02) - { - switch (offset & 0x3fff) - { - case 0x3ffa: - m_sram_address = (m_sram_address & 0x00ffff) | (data << 16); - break; - - case 0x3ffb: - m_sram_address = (m_sram_address & 0xff00ff) | (data << 8); - break; - - case 0x3ffc: - m_sram_address = (m_sram_address & 0xffff00) | data; - break; - - case 0x3ffd: - m_sram[m_sram_address++ & 0xfff] = data; - break; - - default: - logerror("msx_slot_fs4600: Unhandled write %02x to %04x\n", data, offset); - break; - } - } - else - { - switch (offset) - { - case 0x6000: - m_selected_bank[1] = data; - m_bank_base[1] = m_rom + ( ( m_selected_bank[1] * 0x4000 ) & 0x0fffff ); - break; - - case 0x6400: - m_selected_bank[0] = data; - m_bank_base[0] = m_rom + ( ( m_selected_bank[0] * 0x4000 ) & 0x0fffff ); - break; - - case 0x7000: - m_selected_bank[2] = data; - m_bank_base[2] = m_rom + ( ( m_selected_bank[2] * 0x4000 ) & 0x0fffff ); - break; - - default: - logerror("msx_slot_fs4600: Unhandled write %02x to %04x\n", data, offset); - break; - } - } - } + m_view0.select((data >> 1) & 0x01); + m_view1.select((data >> 1) & 0x03); + m_view2.select((data >> 1) & 0x01); } diff --git a/src/devices/bus/msx_slot/fs4600.h b/src/devices/bus/msx_slot/fs4600.h index 4b571c2ef56..736ddab499a 100644 --- a/src/devices/bus/msx_slot/fs4600.h +++ b/src/devices/bus/msx_slot/fs4600.h @@ -15,32 +15,35 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_FS4600, msx_slot_fs4600_device) class msx_slot_fs4600_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_fs4600_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_fs4600_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // configuration helpers - void set_rom_start(const char *region, uint32_t offset) { m_rom_region.set_tag(region); m_region_offset = offset; } - - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; + void set_rom_start(const char *region, u32 offset) { m_rom_region.set_tag(region); m_region_offset = offset; } protected: virtual void device_start() override; - virtual void device_post_load() override; + virtual void device_reset() override; virtual void device_add_mconfig(machine_config &config) override; - void restore_banks(); - private: + static constexpr size_t SRAM_SIZE = 0x1000; + + void control_w(u8 data); + u8 sram_r(); + void sram_w(offs_t offset, u8 data); + template void bank_w(u8 data); + u8 bank_r(offs_t offset); + required_device m_nvram; required_memory_region m_rom_region; - uint32_t m_region_offset; - const uint8_t *m_rom; - uint8_t m_selected_bank[4]; - const uint8_t *m_bank_base[4]; - uint32_t m_sram_address; - uint8_t m_sram[0x1000]; - uint8_t m_control; + memory_bank_array_creator<3> m_rombank; + memory_view m_view0; + memory_view m_view1; + memory_view m_view2; + u32 m_region_offset; + u32 m_sram_address; + std::vector m_sram; }; diff --git a/src/devices/bus/msx_slot/fsa1fm.cpp b/src/devices/bus/msx_slot/fsa1fm.cpp new file mode 100644 index 00000000000..8ec13f28e30 --- /dev/null +++ b/src/devices/bus/msx_slot/fsa1fm.cpp @@ -0,0 +1,239 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +/* + + Emulation of the firmware mapper in the Panasonic FS-A1FM. + +*/ + +#include "emu.h" +#include "fsa1fm.h" + + +DEFINE_DEVICE_TYPE(MSX_SLOT_FSA1FM, msx_slot_fsa1fm_device, "msx_slot_fs1afm", "MSX Internal FS-A1FM") +DEFINE_DEVICE_TYPE(MSX_SLOT_FSA1FM2, msx_slot_fsa1fm2_device, "msx_slot_fs1afm2", "MSX Internal FS-A1FM part 2") + + +msx_slot_fsa1fm2_device::msx_slot_fsa1fm2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, MSX_SLOT_FSA1FM2, tag, owner, clock) + , msx_internal_slot_interface(mconfig, *this) + , m_rom_region(*this, finder_base::DUMMY_TAG) + , m_bank(*this, "bank%u", 0U) + , m_view0(*this, "view0") + , m_view1(*this, "view1") + , m_view2(*this, "view2") + , m_view3(*this, "view3") + , m_view4(*this, "view4") + , m_view5(*this, "view5") + , m_region_offset(0) +{ +} + +void msx_slot_fsa1fm2_device::device_start() +{ + // Sanity checks + if (m_rom_region->bytes() != 0x100000) + { + fatalerror("Memory region '%s' is not the correct size for the FS-A1FM firmware\n", m_rom_region.finder_tag()); + } + + m_ram.resize(RAM_SIZE); + m_empty_bank.resize(8 * 1024); + for (int i = 0; i < 8 * 1024; i++) + m_empty_bank[i] = 0xff; + + save_item(NAME(m_selected_bank)); + save_item(NAME(m_control)); + save_item(NAME(m_ram_active)); + save_pointer(m_ram.data(), "ram", RAM_SIZE); + + for (int i = 0; i < 6; i++) + { + m_bank[i]->configure_entries(0, 0x80, m_rom_region->base() + m_region_offset, 0x2000); + m_bank[i]->configure_entries(0x80, 0x80, m_rom_region->base() + m_region_offset, 0x2000); + for (int j = 0; j < 4; j++) + { + m_bank[i]->configure_entry(0x80 + j, m_empty_bank.data()); // 0x80-0x83 empty + m_bank[i]->configure_entry(0x84 + j, m_ram.data()); // 0x84-0x87 ram + m_bank[i]->configure_entry(0x88 + j, m_empty_bank.data()); // 0x88-0x8b empty + m_bank[i]->configure_entry(0x8c + j, m_ram.data()); // 0x8c-0x8f ram + } + } + + page(0)->install_view(0x0000, 0x1fff, m_view0); + m_view0[0].install_read_bank(0x0000, 0x1fff, m_bank[0]); + m_view0[1].install_readwrite_bank(0x0000, 0x1fff, m_bank[0]); + + page(0)->install_view(0x2000, 0x3fff, m_view1); + m_view1[0].install_read_bank(0x2000, 0x3fff, m_bank[1]); + m_view1[1].install_readwrite_bank(0x2000, 0x3fff, m_bank[1]); + + page(1)->install_view(0x4000, 0x5fff, m_view2); + m_view2[0].install_read_bank(0x4000, 0x5fff, m_bank[2]); + m_view2[1].install_readwrite_bank(0x4000, 0x5fff, m_bank[2]); + + page(1)->install_view(0x6000, 0x7fff, m_view3); + m_view3[0].install_read_bank(0x6000, 0x7fff, m_bank[3]); + m_view3[1].install_readwrite_bank(0x6000, 0x7fff, m_bank[3]); + m_view3[2].install_read_bank(0x6000, 0x7fff, m_bank[3]); + m_view3[2].install_read_handler(0x7ff0, 0x7ff7, read8sm_delegate(*this, FUNC(msx_slot_fsa1fm2_device::bank_r))); + m_view3[3].install_readwrite_bank(0x6000, 0x7fff, m_bank[3]); + m_view3[3].install_read_handler(0x7ff0, 0x7ff7, read8sm_delegate(*this, FUNC(msx_slot_fsa1fm2_device::bank_r))); + page(1)->install_write_handler(0x6000, 0x6000, write8smo_delegate(*this, FUNC(msx_slot_fsa1fm2_device::bank_w<2>))); + page(1)->install_write_handler(0x6400, 0x6400, write8smo_delegate(*this, FUNC(msx_slot_fsa1fm2_device::bank_w<0>))); + page(1)->install_write_handler(0x6800, 0x6800, write8smo_delegate(*this, FUNC(msx_slot_fsa1fm2_device::bank_w<3>))); + page(1)->install_write_handler(0x6c00, 0x6c00, write8smo_delegate(*this, FUNC(msx_slot_fsa1fm2_device::bank_w<1>))); + page(1)->install_write_handler(0x7000, 0x7000, write8smo_delegate(*this, FUNC(msx_slot_fsa1fm2_device::bank_w<4>))); + page(1)->install_write_handler(0x7800, 0x7800, write8smo_delegate(*this, FUNC(msx_slot_fsa1fm2_device::bank_w<5>))); + page(1)->install_write_handler(0x7ff9, 0x7ff9, write8smo_delegate(*this, FUNC(msx_slot_fsa1fm2_device::control_w))); + + page(2)->install_view(0x8000, 0x9fff, m_view4); + m_view4[0].install_read_bank(0x8000, 0x9fff, m_bank[4]); + m_view4[1].install_readwrite_bank(0x8000, 0x9fff, m_bank[4]); + + page(2)->install_view(0xa000, 0xbfff, m_view5); + m_view5[0].install_read_bank(0xa000, 0xbfff, m_bank[5]); + m_view5[1].install_readwrite_bank(0xa000, 0xbfff, m_bank[5]); +} + +void msx_slot_fsa1fm2_device::device_reset() +{ + m_view0.select(0); + m_view1.select(0); + m_view2.select(0); + m_view3.select(0); + m_view4.select(0); + m_view5.select(0); + m_control = 0; + + for (int i = 0; i < 6 ; i++) + { + m_selected_bank[i] = 0xa8; + m_bank[i]->set_entry(0x28); + } +} + +template +void msx_slot_fsa1fm2_device::set_view() +{ + bool ram_active = (m_selected_bank[Bank] & 0xf4) == 0x84; + if (Bank == 0) + m_view0.select(ram_active ? 1 : 0); + if (Bank == 1) + m_view1.select(ram_active ? 1 : 0); + if (Bank == 2) + m_view2.select(ram_active ? 1 : 0); + if (Bank == 3) + m_view3.select((ram_active ? 1 : 0) | (BIT(m_control, 2) ? 2 : 0)); + if (Bank == 4) + m_view4.select(ram_active ? 1 : 0); + if (Bank == 5) + m_view5.select(ram_active ? 1 : 0); +} + +template +void msx_slot_fsa1fm2_device::bank_w(u8 data) +{ + m_selected_bank[Bank] = data; + m_bank[Bank]->set_entry(data); + set_view(); +} + +u8 msx_slot_fsa1fm2_device::bank_r(offs_t offset) +{ + return (offset < 6) ? m_selected_bank[offset] : 0; +} + +void msx_slot_fsa1fm2_device::control_w(u8 data) +{ + // writing $04 enables read back of banking registers at 7ff0-7ff5 + m_control = data; + set_view<3>(); +} + + + + +msx_slot_fsa1fm_device::msx_slot_fsa1fm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, MSX_SLOT_FSA1FM, tag, owner, clock) + , msx_internal_slot_interface(mconfig, *this) + , m_nvram(*this, "nvram") + , m_i8251(*this, "i8251") + , m_i8255(*this, "i8255") + , m_switch_port(*this, "SWITCH") + , m_rom_region(*this, finder_base::DUMMY_TAG) + , m_rombank(*this, "rombank") + , m_region_offset(0) +{ +} + +static INPUT_PORTS_START(fsa1fm) + PORT_START("SWITCH") + PORT_CONFNAME(0x04, 0x00, "Firmware is") + PORT_CONFSETTING(0x04, "disabled") + PORT_CONFSETTING(0x00, "enabled") +INPUT_PORTS_END + +ioport_constructor msx_slot_fsa1fm_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(fsa1fm); +} + +void msx_slot_fsa1fm_device::device_add_mconfig(machine_config &config) +{ + NVRAM(config, m_nvram, nvram_device::DEFAULT_ALL_0); + + // Unknown how these are connected + I8251(config, m_i8251, 0); + + I8255(config, m_i8255); + m_i8255->out_pa_callback().set(FUNC(msx_slot_fsa1fm_device::i8255_port_a_w)); + m_i8255->out_pb_callback().set(FUNC(msx_slot_fsa1fm_device::i8255_port_b_w)); + m_i8255->in_pc_callback().set(FUNC(msx_slot_fsa1fm_device::i8255_port_c_r)); +} + +void msx_slot_fsa1fm_device::device_start() +{ + // Sanity checks + if (m_rom_region->bytes() != 0x100000) + { + fatalerror("Memory region '%s' is not the correct size for the FS-A1FM firmware\n", m_rom_region.finder_tag()); + } + + m_sram.resize(SRAM_SIZE); + m_nvram->set_base(m_sram.data(), SRAM_SIZE); + + m_rombank->configure_entries(0, 16, m_rom_region->base(), 0x2000); + + page(1)->install_read_bank(0x4000, 0x5fff, m_rombank); + // SRAM is always visible? + page(1)->install_ram(0x6000, 0x7fff, m_sram.data()); + page(1)->install_write_handler(0x7fc0, 0x7fc0, write8smo_delegate(*m_i8251, FUNC(i8251_device::data_w))); + page(1)->install_read_handler(0x7fc0, 0x7fc0, read8smo_delegate(*m_i8251, FUNC(i8251_device::data_r))); + page(1)->install_write_handler(0x7fc1, 0x7fc1, write8smo_delegate(*m_i8251, FUNC(i8251_device::control_w))); + page(1)->install_write_handler(0x7fc4, 0x7fc7, write8sm_delegate(*m_i8255, FUNC(i8255_device::write))); + page(1)->install_read_handler(0x7fc4, 0x7fc7, read8sm_delegate(*m_i8255, FUNC(i8255_device::read))); +} + +void msx_slot_fsa1fm_device::device_reset() +{ + m_rombank->set_entry(0); +} + +void msx_slot_fsa1fm_device::i8255_port_a_w(u8 data) +{ + // 0xc0 enables sram? + logerror("port A write %02x\n", data); + m_rombank->set_entry(data & 0x0f); +} + +void msx_slot_fsa1fm_device::i8255_port_b_w(u8 data) +{ + logerror("port B write %02x\n", data); +} + +u8 msx_slot_fsa1fm_device::i8255_port_c_r() +{ + logerror("port C read\n"); + return m_switch_port->read(); +} diff --git a/src/devices/bus/msx_slot/fsa1fm.h b/src/devices/bus/msx_slot/fsa1fm.h new file mode 100644 index 00000000000..51028e18311 --- /dev/null +++ b/src/devices/bus/msx_slot/fsa1fm.h @@ -0,0 +1,88 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +#ifndef MAME_BUS_MSX_SLOT_FSA1FM_H +#define MAME_BUS_MSX_SLOT_FSA1FM_H + +#pragma once + +#include "slot.h" +#include "machine/i8251.h" +#include "machine/i8255.h" +#include "machine/nvram.h" + + +DECLARE_DEVICE_TYPE(MSX_SLOT_FSA1FM, msx_slot_fsa1fm_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_FSA1FM2, msx_slot_fsa1fm2_device) + + +class msx_slot_fsa1fm2_device : public device_t, public msx_internal_slot_interface +{ +public: + msx_slot_fsa1fm2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + // configuration helpers + void set_rom_start(const char *region, uint32_t offset) { m_rom_region.set_tag(region); m_region_offset = offset; } + +protected: + virtual void device_start() override; + virtual void device_reset() override; + +private: + static constexpr size_t RAM_SIZE = 0x2000; + + template void set_view(); + template void bank_w(u8 data); + u8 bank_r(offs_t offset); + void control_w(u8 data); + + required_memory_region m_rom_region; + memory_bank_array_creator<6> m_bank; + memory_view m_view0; + memory_view m_view1; + memory_view m_view2; + memory_view m_view3; + memory_view m_view4; + memory_view m_view5; + uint32_t m_region_offset; + uint8_t m_selected_bank[6]; + bool m_ram_active[6]; + uint8_t m_control; + std::vector m_ram; + std::vector m_empty_bank; +}; + + +class msx_slot_fsa1fm_device : public device_t, public msx_internal_slot_interface +{ +public: + msx_slot_fsa1fm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + // configuration helpers + void set_rom_start(const char *region, uint32_t offset) { m_rom_region.set_tag(region); m_region_offset = offset; } + +protected: + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; + +private: + static constexpr size_t SRAM_SIZE = 0x2000; + + void map_bank(); + void i8255_port_a_w(u8 data); + void i8255_port_b_w(u8 data); + u8 i8255_port_c_r(); + + required_device m_nvram; + required_device m_i8251; + required_device m_i8255; + required_ioport m_switch_port; + required_memory_region m_rom_region; + memory_bank_creator m_rombank; + u32 m_region_offset; + std::vector m_sram; +}; + + +#endif // MAME_BUS_MSX_SLOT_FSA1FM_H diff --git a/src/devices/bus/msx_slot/msx_rs232.cpp b/src/devices/bus/msx_slot/msx_rs232.cpp new file mode 100644 index 00000000000..84e5334e235 --- /dev/null +++ b/src/devices/bus/msx_slot/msx_rs232.cpp @@ -0,0 +1,528 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol + +/* +Emulation of MSX internal RS-232 modules + +TODO: +- What does the Mitsubishi RS232 switch do? Disable the entire RS-232 unit? +*/ + +#include "emu.h" +#include "msx_rs232.h" + + +DEFINE_DEVICE_TYPE(MSX_SLOT_RS232, msx_slot_rs232_device, "msx_slot_rs232", "MSX Internal RS-232C") +DEFINE_DEVICE_TYPE(MSX_SLOT_RS232_MITSUBISHI, msx_slot_rs232_mitsubishi_device, "msx_slot_rs232_mitsubishi", "Mitsubishi Internal RS-232C") +DEFINE_DEVICE_TYPE(MSX_SLOT_RS232_SONY, msx_slot_rs232_sony_device, "msx_slot_rs232_sony", "Sony Internal RS-232C") +DEFINE_DEVICE_TYPE(MSX_SLOT_RS232_SVI738, msx_slot_rs232_svi738_device, "msx_slot_rs232_svi738", "SVI-738 Internal RS-232C") +DEFINE_DEVICE_TYPE(MSX_SLOT_RS232_TOSHIBA, msx_slot_rs232_toshiba_device, "msx_slot_rs232_toshiba", "Toshiba Internal RS-232C") +DEFINE_DEVICE_TYPE(MSX_SLOT_RS232_TOSHIBA_HX3X, msx_slot_rs232_toshiba_hx3x_device, "msx_slot_rs232_toshiba_hx3x", "Toshiba HX-33/HX-34 Internal RS-232C and firmware") + + + +static INPUT_PORTS_START(msx_rs232_enable_switch) + PORT_START("SWITCH") + PORT_CONFNAME(0x01, 0x01, "RS-232C is") + PORT_CONFSETTING(0x00, "disabled") + PORT_CONFSETTING(0x01, "enabled") +INPUT_PORTS_END + + +msx_slot_rs232_base_device::msx_slot_rs232_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : msx_slot_rom_device(mconfig, type, tag, owner, clock) + , m_i8251(*this, "i8251") + , m_i8253(*this, "i8253") + , m_rs232(*this, "rs232") + , m_irq_handler(*this) + , m_irq_mask(0xff) + , m_out2(false) + , m_cts(false) + , m_dcd(false) + , m_ri(false) + , m_rxrdy(false) +{ +} + +void msx_slot_rs232_base_device::device_add_mconfig(machine_config &config) +{ + // Config based on svi738 schematics, are they the same for other machines? + + I8251(config, m_i8251, 1.8432_MHz_XTAL); + m_i8251->txd_handler().set(m_rs232, FUNC(rs232_port_device::write_txd)); + m_i8251->dtr_handler().set(m_rs232, FUNC(rs232_port_device::write_dtr)); + m_i8251->rts_handler().set(m_rs232, FUNC(rs232_port_device::write_rts)); + m_i8251->rxrdy_handler().set(*this, FUNC(msx_slot_rs232_base_device::rxrdy_w)); + m_i8251->txrdy_handler().set(*this, FUNC(msx_slot_rs232_base_device::txrdy_w)); + + PIT8253(config, m_i8253); + m_i8253->set_clk<0>(1.8432_MHz_XTAL); + m_i8253->set_clk<1>(1.8432_MHz_XTAL); + m_i8253->set_clk<2>(1.8432_MHz_XTAL); + m_i8253->out_handler<0>().set(m_i8251, FUNC(i8251_device::write_rxc)); + m_i8253->out_handler<1>().set(m_i8251, FUNC(i8251_device::write_txc)); + m_i8253->out_handler<2>().set(*this, FUNC(msx_slot_rs232_base_device::out2_w)); + + RS232_PORT(config, m_rs232, default_rs232_devices, nullptr); + m_rs232->rxd_handler().set(m_i8251, FUNC(i8251_device::write_rxd)); + m_rs232->dcd_handler().set(*this, FUNC(msx_slot_rs232_base_device::dcd_w)); + m_rs232->ri_handler().set(*this, FUNC(msx_slot_rs232_base_device::ri_w)); + m_rs232->cts_handler().set(*this, FUNC(msx_slot_rs232_base_device::cts_w)); + m_rs232->dsr_handler().set(m_i8251, FUNC(i8251_device::write_dsr)); +} + +void msx_slot_rs232_base_device::device_start() +{ + msx_slot_rom_device::device_start(); + + m_irq_handler.resolve_safe(); + + save_item(NAME(m_irq_mask)); + save_item(NAME(m_out2)); + save_item(NAME(m_cts)); + save_item(NAME(m_dcd)); + save_item(NAME(m_ri)); + save_item(NAME(m_rxrdy)); + save_item(NAME(m_txrdy)); +} + +void msx_slot_rs232_base_device::device_reset() +{ + m_irq_mask = 0xff; + m_out2 = false; + m_cts = false; + m_dcd = false; + m_ri =false; + m_rxrdy = false; +} + +void msx_slot_rs232_base_device::irq_mask_w(offs_t offset, u8 data) +{ + // According to MSX datapack: + // 7654---- unused + // ----3--- timer interrupt from i8352 channel 2 + // -----2-- sync character detect / break detect + // ------1- transmit data ready + // -------0 receive data ready + // but most rs232 interface only seem to support receive data ready irq + m_irq_mask = data; +} + +WRITE_LINE_MEMBER(msx_slot_rs232_base_device::out2_w) +{ + m_out2 = state; + update_irq_state(); +} + +WRITE_LINE_MEMBER(msx_slot_rs232_base_device::cts_w) +{ + m_cts = state; + m_i8251->write_cts(state); +} + +WRITE_LINE_MEMBER(msx_slot_rs232_base_device::dcd_w) +{ + m_dcd = state; + update_irq_state(); +} + +WRITE_LINE_MEMBER(msx_slot_rs232_base_device::ri_w) +{ + m_ri = state; +} + +WRITE_LINE_MEMBER(msx_slot_rs232_base_device::rxrdy_w) +{ + m_rxrdy = state; + update_irq_state(); +} + +WRITE_LINE_MEMBER(msx_slot_rs232_base_device::txrdy_w) +{ + m_txrdy = state; + update_irq_state(); +} + + + +msx_slot_rs232_device::msx_slot_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_rs232_base_device(mconfig, MSX_SLOT_RS232, tag, owner, clock) +{ +} + +void msx_slot_rs232_device::device_start() +{ + msx_slot_rs232_base_device::device_start(); + + // Install IO read/write handlers + io_space().install_readwrite_handler(0x80, 0x81, read8sm_delegate(*m_i8251, FUNC(i8251_device::read)), write8sm_delegate(*m_i8251, FUNC(i8251_device::write))); + io_space().install_readwrite_handler(0x82, 0x82, read8sm_delegate(*this, FUNC(msx_slot_rs232_device::status_r)), write8sm_delegate(*this, FUNC(msx_slot_rs232_device::irq_mask_w))); + io_space().install_readwrite_handler(0x84, 0x87, read8sm_delegate(*m_i8253, FUNC(pit8253_device::read)), write8sm_delegate(*m_i8253, FUNC(pit8253_device::write))); +} + +u8 msx_slot_rs232_device::status_r(offs_t offset) +{ + // 7------- CTS + // -6------ 8253 channel 2 output + // --5432-- unused + // ------1- ring indicator + // -------0 carrier detect + + u8 result = 0x00; + + if (m_cts) + result |= 0x80; + + if (m_out2) + result |= 0x40; + + if (m_ri) + result |= 0x02; + + if (m_dcd) + result |= 0x01; + + return result; +} + +void msx_slot_rs232_device::update_irq_state() +{ + m_irq_handler(m_rxrdy); +} + + + +msx_slot_rs232_mitsubishi_device::msx_slot_rs232_mitsubishi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_rs232_base_device(mconfig, MSX_SLOT_RS232_MITSUBISHI, tag, owner, clock) + , m_switch_port(*this, "SWITCH") +{ +} + +ioport_constructor msx_slot_rs232_mitsubishi_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(msx_rs232_enable_switch); +} + +void msx_slot_rs232_mitsubishi_device::device_start() +{ + msx_slot_rs232_base_device::device_start(); + + // Install IO read/write handlers + io_space().install_readwrite_handler(0x80, 0x81, read8sm_delegate(*m_i8251, FUNC(i8251_device::read)), write8sm_delegate(*m_i8251, FUNC(i8251_device::write))); + io_space().install_readwrite_handler(0x82, 0x82, read8sm_delegate(*this, FUNC(msx_slot_rs232_mitsubishi_device::status_r)), write8sm_delegate(*this, FUNC(msx_slot_rs232_mitsubishi_device::irq_mask_w))); + io_space().install_readwrite_handler(0x84, 0x87, read8sm_delegate(*m_i8253, FUNC(pit8253_device::read)), write8sm_delegate(*m_i8253, FUNC(pit8253_device::write))); +} + +u8 msx_slot_rs232_mitsubishi_device::status_r(offs_t offset) +{ + // 7------- CTS + // -6------ 8253 channel 2 output + // --54321- unused + // -------0 carrier detect + + uint8_t result = 0x00; + + if (m_cts) + result |= 0x80; + + if (m_out2) + result |= 0x40; + + if (m_dcd) + result |= 0x01; + + return result; +} + +void msx_slot_rs232_mitsubishi_device::update_irq_state() +{ + if (!BIT(m_irq_mask, 0)) + m_irq_handler(m_rxrdy); +} + + + +msx_slot_rs232_sony_device::msx_slot_rs232_sony_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_rs232_base_device(mconfig, MSX_SLOT_RS232_SONY, tag, owner, clock) + , m_switch_port(*this, "SWITCH") +{ +} + +ioport_constructor msx_slot_rs232_sony_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(msx_rs232_enable_switch); +} + +void msx_slot_rs232_sony_device::device_start() +{ + msx_slot_rs232_base_device::device_start(); + + m_ram.resize(RAM_SIZE); + save_item(NAME(m_ram)); + + // TODO unmap rom from page 0 + page(0)->install_ram(0x2000, 0x27ff, m_ram.data()); + page(1)->install_rom(0x4000, 0x5fff, m_rom_region->base() + m_region_offset); + page(1)->install_ram(0x6000, 0x67ff, m_ram.data()); + page(2)->install_ram(0xa000, 0xa7ff, m_ram.data()); + page(2)->install_read_handler(0xbff8, 0xbff9, read8sm_delegate(*m_i8251, FUNC(i8251_device::read))); + page(2)->install_write_handler(0xbff8, 0xbff9, write8sm_delegate(*m_i8251, FUNC(i8251_device::write))); + page(2)->install_read_handler(0xbffa, 0xbffa, read8sm_delegate(*this, FUNC(msx_slot_rs232_sony_device::status_r))); + page(2)->install_write_handler(0xbffa, 0xbffa, write8sm_delegate(*this, FUNC(msx_slot_rs232_sony_device::irq_mask_w))); + page(2)->install_read_handler(0xbffc, 0xbfff, read8sm_delegate(*m_i8253, FUNC(pit8253_device::read))); + page(2)->install_write_handler(0xbffc, 0xbfff, write8sm_delegate(*m_i8253, FUNC(pit8253_device::write))); + page(3)->install_ram(0xe000, 0xe7ff, m_ram.data()); +} + +u8 msx_slot_rs232_sony_device::status_r(offs_t offset) +{ + // 7------- CTS + // -6------ 8253 channel 2 output + // --5----- unused + // ---4---- ?? + // ----32-- unused + // ------1- ring indicator + // -------0 carrier detect + + u8 result = 0x00; + + if (m_cts) + result |= 0x80; + + if (m_out2) + result |= 0x40; + + if (m_ri) + result |= 0x02; + + if (m_dcd) + result |= 0x01; + + return result; +} + +void msx_slot_rs232_sony_device::update_irq_state() +{ + if (!BIT(m_irq_mask, 0)) + m_irq_handler(m_rxrdy); +} + + + +msx_slot_rs232_svi738_device::msx_slot_rs232_svi738_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_rs232_base_device(mconfig, MSX_SLOT_RS232_SVI738, tag, owner, clock) +{ +} + +void msx_slot_rs232_svi738_device::device_start() +{ + msx_slot_rs232_base_device::device_start(); + + // Install IO read/write handlers + io_space().install_readwrite_handler(0x80, 0x81, read8sm_delegate(*m_i8251, FUNC(i8251_device::read)), write8sm_delegate(*m_i8251, FUNC(i8251_device::write))); + io_space().install_read_handler(0x82, 0x82, read8sm_delegate(*this, FUNC(msx_slot_rs232_svi738_device::status_r))); + io_space().install_readwrite_handler(0x84, 0x87, read8sm_delegate(*m_i8253, FUNC(pit8253_device::read)), write8sm_delegate(*m_i8253, FUNC(pit8253_device::write))); +} + +u8 msx_slot_rs232_svi738_device::status_r(offs_t offset) +{ + // 7------- CTS + // -6------ 8253 channel 2 output + // --54321- unused + // -------0 carrier detect + + u8 result = 0x00; + + if (m_cts) + result |= 0x80; + + if (m_out2) + result |= 0x40; + + if (m_dcd) + result |= 0x01; + + return result; +} + +void msx_slot_rs232_svi738_device::update_irq_state() +{ + m_irq_handler(m_rxrdy); +} + + + +msx_slot_rs232_toshiba_device::msx_slot_rs232_toshiba_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_rs232_base_device(mconfig, MSX_SLOT_RS232_TOSHIBA, tag, owner, clock) + , m_switch_port(*this, "SWITCH") +{ +} + +ioport_constructor msx_slot_rs232_toshiba_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(msx_rs232_enable_switch); +} + +void msx_slot_rs232_toshiba_device::device_start() +{ + msx_slot_rs232_base_device::device_start(); + + // Install IO read/write handlers + io_space().install_readwrite_handler(0x80, 0x81, read8sm_delegate(*m_i8251, FUNC(i8251_device::read)), write8sm_delegate(*m_i8251, FUNC(i8251_device::write))); + io_space().install_readwrite_handler(0x82, 0x82, read8sm_delegate(*this, FUNC(msx_slot_rs232_toshiba_device::status_r)), write8sm_delegate(*this, FUNC(msx_slot_rs232_toshiba_device::irq_mask_w))); + io_space().install_readwrite_handler(0x84, 0x87, read8sm_delegate(*m_i8253, FUNC(pit8253_device::read)), write8sm_delegate(*m_i8253, FUNC(pit8253_device::write))); +} + +u8 msx_slot_rs232_toshiba_device::status_r(offs_t offset) +{ + // 7------- CTS + // -6------ 8253 channel 2 output + // --54---- unused + // ----3--- switch detection + // -----2-- unused + // ------1- ring indicator + // -------0 carrier detect + + u8 result = 0x00; + + if (m_cts) + result |= 0x80; + + if (m_out2) + result |= 0x40; + + if (BIT(m_irq_mask, 0) && m_switch_port->read()) + result |= 0x08; + + if (m_ri) + result |= 0x02; + + if (m_dcd) + result |= 0x01; + + return result; +} + +void msx_slot_rs232_toshiba_device::update_irq_state() +{ + if (!BIT(m_irq_mask, 0)) + m_irq_handler(m_rxrdy); +} + + + +msx_slot_rs232_toshiba_hx3x_device::msx_slot_rs232_toshiba_hx3x_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : msx_slot_rs232_base_device(mconfig, MSX_SLOT_RS232_TOSHIBA_HX3X, tag, owner, clock) + , m_switch_port(*this, "SWITCH") + , m_copy_port(*this, "COPY") + , m_nvram(*this, "nvram") + , m_rombank(*this, "rombank") + , m_view(*this, "view") +{ +} + +static INPUT_PORTS_START(msx_hx3x_ports) + PORT_INCLUDE(msx_rs232_enable_switch) + + PORT_START("COPY") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Copy") +INPUT_PORTS_END + +ioport_constructor msx_slot_rs232_toshiba_hx3x_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(msx_hx3x_ports); +} + +void msx_slot_rs232_toshiba_hx3x_device::device_add_mconfig(machine_config &config) +{ + msx_slot_rs232_base_device::device_add_mconfig(config); + + NVRAM(config, m_nvram, nvram_device::DEFAULT_ALL_0); +} + +void msx_slot_rs232_toshiba_hx3x_device::device_start() +{ + msx_slot_rs232_base_device::device_start(); + + // Sanity checks + // 16KB for RS-232C rom and 4 16KB banks for firmware + if (m_rom_region->bytes() < m_region_offset + 0x14000) + { + fatalerror("Memory region '%s' is too small for rom slot '%s'\n", m_rom_region.finder_tag(), tag()); + } + + // Install IO read/write handlers + io_space().install_readwrite_handler(0x80, 0x81, read8sm_delegate(*m_i8251, FUNC(i8251_device::read)), write8sm_delegate(*m_i8251, FUNC(i8251_device::write))); + io_space().install_readwrite_handler(0x82, 0x82, read8sm_delegate(*this, FUNC(msx_slot_rs232_toshiba_hx3x_device::status_r)), write8sm_delegate(*this, FUNC(msx_slot_rs232_toshiba_hx3x_device::irq_mask_w))); + io_space().install_readwrite_handler(0x84, 0x87, read8sm_delegate(*m_i8253, FUNC(pit8253_device::read)), write8sm_delegate(*m_i8253, FUNC(pit8253_device::write))); + + m_sram.resize(SRAM_SIZE); + m_nvram->set_base(m_sram.data(), SRAM_SIZE); + + save_item(NAME(m_bank_reg)); + + m_rombank->configure_entries(0, 4, m_rom_region->base() + m_region_offset + 0x4000, 0x4000); + + page(1)->install_write_handler(0x7fff, 0x7fff, write8smo_delegate(*this, FUNC(msx_slot_rs232_toshiba_hx3x_device::bank_w))); + page(1)->install_read_handler(0x7fff, 0x7fff, read8smo_delegate(*this, FUNC(msx_slot_rs232_toshiba_hx3x_device::bank_r))); + page(2)->install_view(0x8000, 0xbfff, m_view); + m_view[0].install_read_bank(0x8000, 0xbfff, m_rombank); + m_view[1].install_ram(0x8000, 0x87ff, 0x3800, m_sram.data()); +} + +void msx_slot_rs232_toshiba_hx3x_device::device_reset() +{ + msx_slot_rs232_base_device::device_reset(); + + m_bank_reg = 0; + m_view.select(0); + m_rombank->set_entry(0); +} + +u8 msx_slot_rs232_toshiba_hx3x_device::status_r(offs_t offset) +{ + // 7------- CTS + // -6------ 8253 channel 2 output + // --54---- unused + // ----3--- switch detection + // -----2-- unused + // ------1- ring indicator + // -------0 carrier detect + + u8 result = 0x00; + + if (m_cts) + result |= 0x80; + + if (m_out2) + result |= 0x40; + + if (BIT(m_irq_mask, 0) && m_switch_port->read()) + result |= 0x08; + + if (m_ri) + result |= 0x02; + + if (m_dcd) + result |= 0x01; + + return result; +} + +void msx_slot_rs232_toshiba_hx3x_device::update_irq_state() +{ + if (!BIT(m_irq_mask, 0)) + m_irq_handler(m_rxrdy); +} + +u8 msx_slot_rs232_toshiba_hx3x_device::bank_r() +{ + return (m_copy_port->read() & 0x80) | m_bank_reg; +} + +void msx_slot_rs232_toshiba_hx3x_device::bank_w(u8 data) +{ + m_bank_reg = data & 0x7f; + m_rombank->set_entry(data & 0x03); + m_view.select(((data & 0x60) == 0x60) ? 1 : 0); +} diff --git a/src/devices/bus/msx_slot/msx_rs232.h b/src/devices/bus/msx_slot/msx_rs232.h new file mode 100644 index 00000000000..2df9a653f38 --- /dev/null +++ b/src/devices/bus/msx_slot/msx_rs232.h @@ -0,0 +1,168 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +#ifndef MAME_BUS_MSX_SLOT_MSX_RS232_H +#define MAME_BUS_MSX_SLOT_MSX_RS232_H + +#pragma once + +#include "rom.h" +#include "bus/rs232/rs232.h" +#include "machine/i8251.h" +#include "machine/nvram.h" +#include "machine/pit8253.h" + +class msx_slot_rs232_base_device : public msx_slot_rom_device +{ +public: + + // configuration helpers + auto irq_handler() { return m_irq_handler.bind(); } + +protected: + msx_slot_rs232_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + + virtual void irq_mask_w(offs_t offset, u8 data); + virtual u8 status_r(offs_t offset) { return 0; } + virtual void update_irq_state() { } + DECLARE_WRITE_LINE_MEMBER(out2_w); + DECLARE_WRITE_LINE_MEMBER(cts_w); + DECLARE_WRITE_LINE_MEMBER(dcd_w); + DECLARE_WRITE_LINE_MEMBER(ri_w); + DECLARE_WRITE_LINE_MEMBER(rxrdy_w); + DECLARE_WRITE_LINE_MEMBER(txrdy_w); + + required_device m_i8251; + required_device m_i8253; + required_device m_rs232; + + devcb_write_line m_irq_handler; + + u8 m_irq_mask; + bool m_out2; + bool m_cts; + bool m_dcd; + bool m_ri; + bool m_rxrdy; + bool m_txrdy; +}; + + +class msx_slot_rs232_device : public msx_slot_rs232_base_device +{ +public: + msx_slot_rs232_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_start() override; + + virtual u8 status_r(offs_t offset) override; + virtual void update_irq_state() override; +}; + + +class msx_slot_rs232_mitsubishi_device : public msx_slot_rs232_base_device +{ +public: + msx_slot_rs232_mitsubishi_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_start() override; + virtual ioport_constructor device_input_ports() const override; + + virtual u8 status_r(offs_t offset) override; + virtual void update_irq_state() override; + + required_ioport m_switch_port; +}; + + +class msx_slot_rs232_sony_device : public msx_slot_rs232_base_device +{ +public: + msx_slot_rs232_sony_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_start() override; + virtual ioport_constructor device_input_ports() const override; + + virtual uint8_t status_r(offs_t offset) override; + virtual void update_irq_state() override; + + static constexpr size_t RAM_SIZE = 0x800; + + required_ioport m_switch_port; + std::vector m_ram; +}; + + +class msx_slot_rs232_svi738_device : public msx_slot_rs232_base_device +{ +public: + msx_slot_rs232_svi738_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_start() override; + + virtual u8 status_r(offs_t offset) override; + virtual void update_irq_state() override; +}; + + +class msx_slot_rs232_toshiba_device : public msx_slot_rs232_base_device +{ +public: + msx_slot_rs232_toshiba_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + virtual void device_start() override; + virtual ioport_constructor device_input_ports() const override; + + virtual uint8_t status_r(offs_t offset) override; + virtual void update_irq_state() override; + + required_ioport m_switch_port; +}; + + +class msx_slot_rs232_toshiba_hx3x_device : public msx_slot_rs232_base_device +{ +public: + msx_slot_rs232_toshiba_hx3x_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + +protected: + static constexpr size_t SRAM_SIZE = 0x800; + + virtual void device_start() override; + virtual void device_reset() override; + virtual ioport_constructor device_input_ports() const override; + virtual void device_add_mconfig(machine_config &config) override; + + virtual uint8_t status_r(offs_t offset) override; + virtual void update_irq_state() override; + + void bank_w(u8 data); + u8 bank_r(); + + required_ioport m_switch_port; + required_ioport m_copy_port; + required_device m_nvram; + memory_bank_creator m_rombank; + memory_view m_view; + std::vector m_sram; + u8 m_bank_reg; +}; + + +DECLARE_DEVICE_TYPE(MSX_SLOT_RS232, msx_slot_rs232_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_RS232_MITSUBISHI, msx_slot_rs232_mitsubishi_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_RS232_SONY, msx_slot_rs232_sony_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_RS232_SVI738, msx_slot_rs232_svi738_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_RS232_TOSHIBA, msx_slot_rs232_toshiba_device) +DECLARE_DEVICE_TYPE(MSX_SLOT_RS232_TOSHIBA_HX3X, msx_slot_rs232_toshiba_hx3x_device) + + +#endif // MAME_BUS_MSX_SLOT_MSX_RS232_H diff --git a/src/devices/bus/msx_slot/msx_write.cpp b/src/devices/bus/msx_slot/msx_write.cpp new file mode 100644 index 00000000000..483532dbe9c --- /dev/null +++ b/src/devices/bus/msx_slot/msx_write.cpp @@ -0,0 +1,78 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +/* + + Emulation of the firmware mapper in the Sanyo PHC-77. + +*/ + +#include "emu.h" +#include "msx_write.h" + + +DEFINE_DEVICE_TYPE(MSX_SLOT_MSX_WRITE, msx_slot_msx_write_device, "msx_slot_msx_write", "MSX Internal MSX-Write") + + +msx_slot_msx_write_device::msx_slot_msx_write_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, MSX_SLOT_MSX_WRITE, tag, owner, clock) + , msx_internal_slot_interface(mconfig, *this) + , m_rom_region(*this, finder_base::DUMMY_TAG) + , m_switch_port(*this, "SWITCH") + , m_rombank(*this, "rombank%u", 0U) + , m_view1(*this, "view1") + , m_view2(*this, "view2") + , m_region_offset(0) + , m_enabled(true) +{ +} + +static INPUT_PORTS_START(msx_write) + PORT_START("SWITCH") + PORT_CONFNAME(0x01, 0x01, "Firmware is") + PORT_CONFSETTING(0x00, "disabled") + PORT_CONFSETTING(0x01, "enabled") +INPUT_PORTS_END + +ioport_constructor msx_slot_msx_write_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(msx_write); +} + +void msx_slot_msx_write_device::device_start() +{ + // Sanity checks + if (m_rom_region->bytes() != 0x80000) + { + fatalerror("Memory region '%s' is not the correct size for the MSX-Write firmware\n", m_rom_region.finder_tag()); + } + + m_rombank[0]->configure_entries(0, 0x20, m_rom_region->base() + m_region_offset, 0x4000); + m_rombank[1]->configure_entries(0, 0x20, m_rom_region->base() + m_region_offset, 0x4000); + + page(1)->install_view(0x4000, 0x7fff, m_view1); + m_view1[0].install_read_bank(0x4000, 0x7fff, m_rombank[0]); + m_view1[0].install_write_handler(0x6fff, 0x6fff, write8smo_delegate(*this, FUNC(msx_slot_msx_write_device::bank_w<0>))); + m_view1[0].install_write_handler(0x7fff, 0x7fff, write8smo_delegate(*this, FUNC(msx_slot_msx_write_device::bank_w<1>))); + m_view1[1]; + + page(2)->install_view(0x8000, 0xbfff, m_view2); + m_view2[0].install_read_bank(0x8000, 0xbfff, m_rombank[1]); + m_view2[1]; +} + +void msx_slot_msx_write_device::device_reset() +{ + m_enabled = BIT(m_switch_port->read(), 0); + + m_rombank[0]->set_entry(0); + m_rombank[1]->set_entry(1); + + m_view1.select(m_enabled ? 0 : 1); + m_view2.select(m_enabled ? 0 : 1); +} + +template +void msx_slot_msx_write_device::bank_w(u8 data) +{ + m_rombank[Bank]->set_entry(data & 0x1f); +} diff --git a/src/devices/bus/msx_slot/msx_write.h b/src/devices/bus/msx_slot/msx_write.h new file mode 100644 index 00000000000..70d8203df06 --- /dev/null +++ b/src/devices/bus/msx_slot/msx_write.h @@ -0,0 +1,41 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +#ifndef MAME_BUS_MSX_SLOT_MSX_WRITE_H +#define MAME_BUS_MSX_SLOT_MSX_WRITE_H + +#pragma once + +#include "slot.h" +#include "machine/nvram.h" + + +DECLARE_DEVICE_TYPE(MSX_SLOT_MSX_WRITE, msx_slot_msx_write_device) + + +class msx_slot_msx_write_device : public device_t, public msx_internal_slot_interface +{ +public: + msx_slot_msx_write_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + // configuration helpers + void set_rom_start(const char *region, u32 offset) { m_rom_region.set_tag(region); m_region_offset = offset; } + +protected: + virtual void device_start() override; + virtual void device_reset() override; + virtual ioport_constructor device_input_ports() const override; + +private: + template void bank_w(u8 data); + + required_memory_region m_rom_region; + required_ioport m_switch_port; + memory_bank_array_creator<2> m_rombank; + memory_view m_view1; + memory_view m_view2; + u32 m_region_offset; + bool m_enabled; +}; + + +#endif // MAME_BUS_MSX_SLOT_MSX_WRITE_H diff --git a/src/devices/bus/msx_slot/music.cpp b/src/devices/bus/msx_slot/music.cpp index 1c5daf86b67..9529643603a 100644 --- a/src/devices/bus/msx_slot/music.cpp +++ b/src/devices/bus/msx_slot/music.cpp @@ -7,14 +7,13 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_MUSIC, msx_slot_music_device, "msx_slot_music", "MSX Internal MSX-MUSIC") -msx_slot_music_device::msx_slot_music_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_music_device::msx_slot_music_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : msx_slot_rom_device(mconfig, MSX_SLOT_MUSIC, tag, owner, clock) , m_ym2413(nullptr) , m_ym2413_tag(nullptr) { } - void msx_slot_music_device::device_start() { msx_slot_rom_device::device_start(); @@ -32,17 +31,5 @@ void msx_slot_music_device::device_start() } // Install IO read/write handlers - io_space().install_write_handler(0x7c, 0x7d, write8sm_delegate(*this, FUNC(msx_slot_music_device::write_ym2413))); -} - - -uint8_t msx_slot_music_device::read(offs_t offset) -{ - return msx_slot_rom_device::read(offset); -} - - -void msx_slot_music_device::write_ym2413(offs_t offset, uint8_t data) -{ - m_ym2413->write(offset & 1, data); + io_space().install_write_handler(0x7c, 0x7d, write8sm_delegate(*m_ym2413, FUNC(ym2413_device::write))); } diff --git a/src/devices/bus/msx_slot/music.h b/src/devices/bus/msx_slot/music.h index 0d9240079ab..49073a53aa2 100644 --- a/src/devices/bus/msx_slot/music.h +++ b/src/devices/bus/msx_slot/music.h @@ -16,19 +16,15 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_MUSIC, msx_slot_music_device) class msx_slot_music_device : public msx_slot_rom_device { public: - msx_slot_music_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_music_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // configuration helpers void set_ym2413_tag(const char *tag) { m_ym2413_tag = tag; } - virtual uint8_t read(offs_t offset) override; - protected: virtual void device_start() override; private: - void write_ym2413(offs_t offset, uint8_t data); - ym2413_device *m_ym2413; const char *m_ym2413_tag; }; diff --git a/src/devices/bus/msx_slot/panasonic08.cpp b/src/devices/bus/msx_slot/panasonic08.cpp index 0c46350051e..c9410e906e6 100644 --- a/src/devices/bus/msx_slot/panasonic08.cpp +++ b/src/devices/bus/msx_slot/panasonic08.cpp @@ -4,9 +4,9 @@ Emulation of the firmware mapper as found in Panasonic FS-A1WX andFS-A1WSX machines. -Todo: -- Anything besides the basic mapping -- SRAM? +TODO: +- SRAM has only 2 4KB pages +- SRAM is not accessible at 4000-7fff? */ #include "emu.h" @@ -16,149 +16,130 @@ Todo: DEFINE_DEVICE_TYPE(MSX_SLOT_PANASONIC08, msx_slot_panasonic08_device, "msx_slot_panasonic08", "MSX Internal Panasonic08") -msx_slot_panasonic08_device::msx_slot_panasonic08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_panasonic08_device::msx_slot_panasonic08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_SLOT_PANASONIC08, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) , m_nvram(*this, "nvram") , m_rom_region(*this, finder_base::DUMMY_TAG) + , m_bank(*this, "bank%u", 0U) + , m_view0(*this, "view0") + , m_view1(*this, "view1") + , m_view3(*this, "view3") + , m_view4(*this, "view4") + , m_view5(*this, "view5") , m_region_offset(0) - , m_rom(nullptr) , m_control(0) { - for (int i = 0; i < 8; i++) - { - m_selected_bank[i] = 0; - m_bank_base[i] = nullptr; - } } - void msx_slot_panasonic08_device::device_add_mconfig(machine_config &config) { - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + NVRAM(config, m_nvram, nvram_device::DEFAULT_ALL_0); } - void msx_slot_panasonic08_device::device_start() { // Sanity checks if (m_rom_region->bytes() < m_region_offset + 0x200000) { - fatalerror("Memory region '%s' is too small for the FS4600 firmware\n", m_rom_region.finder_tag()); + fatalerror("Memory region '%s' is too small for the panasonic08 firmware\n", m_rom_region.finder_tag()); } - m_sram.resize(0x4000); - - m_nvram->set_base(&m_sram[0], 0x4000); + m_sram.resize(SRAM_SIZE); - m_rom = m_rom_region->base() + m_region_offset; + m_nvram->set_base(&m_sram[0], SRAM_SIZE); save_item(NAME(m_selected_bank)); save_item(NAME(m_control)); - restore_banks(); -} - + for (int i = 0; i < 6; i++) + { + m_bank[i]->configure_entries(0, 0x100, m_rom_region->base() + m_region_offset, 0x2000); + m_bank[i]->configure_entry(0x80, m_sram.data()); + m_bank[i]->configure_entry(0x81, m_sram.data() + 0x2000); + m_bank[i]->configure_entry(0x82, m_sram.data()); + m_bank[i]->configure_entry(0x83, m_sram.data() + 0x2000); + } -void msx_slot_panasonic08_device::device_post_load() -{ - restore_banks(); + page(0)->install_view(0x0000, 0x1fff, m_view0); + m_view0[0].install_read_bank(0x0000, 0x1fff, m_bank[0]); + m_view0[1].install_readwrite_bank(0x0000, 0x1fff, m_bank[0]); + + page(0)->install_view(0x2000, 0x3fff, m_view1); + m_view1[0].install_read_bank(0x2000, 0x3fff, m_bank[1]); + m_view1[1].install_readwrite_bank(0x2000, 0x3fff, m_bank[1]); + + // no sram writing in 4000-7fff? + page(1)->install_read_bank(0x4000, 0x5fff, m_bank[2]); + + page(1)->install_view(0x6000, 0x7fff, m_view3); + m_view3[0].install_read_bank(0x6000, 0x7fff, m_bank[3]); + m_view3[1].install_read_bank(0x6000, 0x7fff, m_bank[3]); + m_view3[1].install_read_handler(0x7ff0, 0x7ff7, read8sm_delegate(*this, FUNC(msx_slot_panasonic08_device::bank_r))); + page(1)->install_write_handler(0x6000, 0x6000, write8smo_delegate(*this, FUNC(msx_slot_panasonic08_device::bank_w<0>))); + page(1)->install_write_handler(0x6400, 0x6400, write8smo_delegate(*this, FUNC(msx_slot_panasonic08_device::bank_w<1>))); + page(1)->install_write_handler(0x6800, 0x6800, write8smo_delegate(*this, FUNC(msx_slot_panasonic08_device::bank_w<2>))); + page(1)->install_write_handler(0x6c00, 0x6c00, write8smo_delegate(*this, FUNC(msx_slot_panasonic08_device::bank_w<3>))); + page(1)->install_write_handler(0x7000, 0x7000, write8smo_delegate(*this, FUNC(msx_slot_panasonic08_device::bank_w<4>))); + page(1)->install_write_handler(0x7800, 0x7800, write8smo_delegate(*this, FUNC(msx_slot_panasonic08_device::bank_w<5>))); + page(1)->install_write_handler(0x7ff9, 0x7ff9, write8smo_delegate(*this, FUNC(msx_slot_panasonic08_device::control_w))); + + page(2)->install_view(0x8000, 0x9fff, m_view4); + m_view4[0].install_read_bank(0x8000, 0x9fff, m_bank[4]); + m_view4[1].install_readwrite_bank(0x8000, 0x9fff, m_bank[4]); + + page(2)->install_view(0xa000, 0xbfff, m_view5); + m_view5[0].install_read_bank(0xa000, 0xbfff, m_bank[5]); + m_view5[1].install_readwrite_bank(0xa000, 0xbfff, m_bank[5]); } - -void msx_slot_panasonic08_device::map_bank(int bank) +void msx_slot_panasonic08_device::device_reset() { - if (m_selected_bank[bank] >= 0x80 && m_selected_bank[bank] < 0x84) // Are these banks were sram is present? Mirroring? - { - logerror("panasonic08: mapping bank %d to sram\n", bank); - m_bank_base[bank] = &m_sram[((m_selected_bank[bank] & 0x7f) * 0x2000) & 0x3fff]; - } - else + m_control = 0; + for (int i = 0 ; i < 6; i++) { - m_bank_base[bank] = m_rom + ( ( m_selected_bank[bank] * 0x2000 ) & 0x1fffff ); + m_selected_bank[i] = 0; + m_bank[i]->set_entry(0); } + m_view0.select(0); + m_view1.select(0); + m_view3.select(0); + m_view4.select(0); + m_view5.select(0); } - -void msx_slot_panasonic08_device::restore_banks() +template +void msx_slot_panasonic08_device::set_view() { - for (int i = 0; i < 8; i++) - { - map_bank(i); - } + bool ram_active = (m_selected_bank[Bank] >= 0x80 && m_selected_bank[Bank] < 0x84); + if (Bank == 0) + m_view0.select(ram_active ? 1 : 0); + if (Bank == 1) + m_view1.select(ram_active ? 1 : 0); + if (Bank == 3) + m_view3.select(BIT(m_control, 2) ? 1 : 0); + if (Bank == 4) + m_view4.select(ram_active ? 1 : 0); + if (Bank == 5) + m_view5.select(ram_active ? 1 : 0); } - -uint8_t msx_slot_panasonic08_device::read(offs_t offset) +template +void msx_slot_panasonic08_device::bank_w(u8 data) { - if (m_control & 0x04) - { - // 7ff0 - 6000 - // 7ff1 - 6400 - // 7ff2 - 6800 - // 7ff3 - 6c00 - // 7ff4 - 7000 - // 7ff5 - 7800 - if (offset >= 0x7ff0 && offset < 0x7ff6) // maybe 7ff8 would make more sense here?? - { - return m_selected_bank[offset - 0x7ff0]; - } - } - return m_bank_base[offset >> 13][offset & 0x1fff]; + m_selected_bank[Bank] = data; + m_bank[Bank]->set_entry(data); + set_view(); } - -void msx_slot_panasonic08_device::write(offs_t offset, uint8_t data) +u8 msx_slot_panasonic08_device::bank_r(offs_t offset) { - if ((offset & 0xc000) == 0x8000 || (offset & 0xc000) == 0x0000) - { - uint8_t bank = m_selected_bank[offset >> 13]; - if (bank >= 0x80 && bank < 0x84) // Are these banks were sram is present? Mirroring? - { - logerror("msx_slot_panasonic08: writing %02x to sram %04x, bank = %02x\n", data, offset & 0x1fff, bank); - m_sram[((bank & 0x01) * 0x2000) + (offset & 0x1fff)] = data; - } - return; - } + return (offset < 6) ? m_selected_bank[offset] : 0; +} - switch (offset) - { - case 0x6000: /* Switched 0x0000-0x1FFF */ - m_selected_bank[0] = data; - map_bank(0); - break; - - case 0x6400: /* Switches 0x2000-0x3FFF */ - m_selected_bank[1] = data; - map_bank(1); - break; - - case 0x6800: /* Switches 0x4000-0x5FFF */ - m_selected_bank[2] = data; - map_bank(2); - break; - - case 0x6c00: /* Switches 0x6000-0x7FFF */ - m_selected_bank[3] = data; - map_bank(3); - break; - - case 0x7000: /* Switches 0x8000-0x9FFF */ - m_selected_bank[4] = data; - map_bank(4); - break; - - case 0x7800: /* Switches 0xA000-0xBFFF */ - m_selected_bank[5] = data; - map_bank(5); - break; - - case 0x7ff9: - m_control = data; - break; - - default: - logerror("msx_slot_panasonic08: Unhandled write %02x to %04x\n", data, offset); - break; - } +void msx_slot_panasonic08_device::control_w(u8 data) +{ + // writing $04 enables read back of banking registers at 7ff0-7ff5 + m_control = data; + set_view<3>(); } diff --git a/src/devices/bus/msx_slot/panasonic08.h b/src/devices/bus/msx_slot/panasonic08.h index b21a4964e3b..4357b4e8ad0 100644 --- a/src/devices/bus/msx_slot/panasonic08.h +++ b/src/devices/bus/msx_slot/panasonic08.h @@ -15,31 +15,36 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_PANASONIC08, msx_slot_panasonic08_device) class msx_slot_panasonic08_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_panasonic08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_panasonic08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // configuration helpers - void set_rom_start(const char *region, uint32_t offset) { m_rom_region.set_tag(region); m_region_offset = offset; } - - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; + void set_rom_start(const char *region, u32 offset) { m_rom_region.set_tag(region); m_region_offset = offset; } protected: virtual void device_start() override; - virtual void device_post_load() override; + virtual void device_reset() override; virtual void device_add_mconfig(machine_config &config) override; private: - void restore_banks(); - void map_bank(int bank); + static constexpr size_t SRAM_SIZE = 0x4000; + + template void set_view(); + template void bank_w(u8 data); + u8 bank_r(offs_t offset); + void control_w(u8 data); required_device m_nvram; required_memory_region m_rom_region; - uint32_t m_region_offset; - const uint8_t *m_rom; - uint8_t m_selected_bank[8]; - const uint8_t *m_bank_base[8]; - uint8_t m_control; + memory_bank_array_creator<6> m_bank; + memory_view m_view0; + memory_view m_view1; + memory_view m_view3; + memory_view m_view4; + memory_view m_view5; + u32 m_region_offset; + u8 m_selected_bank[6]; + u8 m_control; std::vector m_sram; }; diff --git a/src/devices/bus/msx_slot/ram.cpp b/src/devices/bus/msx_slot/ram.cpp index 835a5551b92..92f9a57929d 100644 --- a/src/devices/bus/msx_slot/ram.cpp +++ b/src/devices/bus/msx_slot/ram.cpp @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_RAM, msx_slot_ram_device, "msx_slot_ram", "MSX Internal RAM") -msx_slot_ram_device::msx_slot_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_ram_device::msx_slot_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_SLOT_RAM, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) { @@ -16,21 +16,13 @@ void msx_slot_ram_device::device_start() { m_ram.resize(m_size); save_item(NAME(m_ram)); -} -uint8_t msx_slot_ram_device::read(offs_t offset) -{ - if ( offset >= m_start_address && offset < m_end_address ) - { - return m_ram[ offset - m_start_address ]; - } - return 0xFF; -} - -void msx_slot_ram_device::write(offs_t offset, uint8_t data) -{ - if ( offset >= m_start_address && offset < m_end_address ) + u8 *ram = m_ram.data(); + u32 start_address = m_start_address; + for (int i = m_start_address >> 14; i < 4 && i * 0x4000 < m_end_address; i++) { - m_ram[offset - m_start_address] = data; + page(i)->install_ram(start_address, std::min((i + 1) * 0x4000, m_end_address) - 1, ram); + start_address += 0x4000; + ram += 0x4000; } } diff --git a/src/devices/bus/msx_slot/ram.h b/src/devices/bus/msx_slot/ram.h index f96271ad066..9e8f08bc373 100644 --- a/src/devices/bus/msx_slot/ram.h +++ b/src/devices/bus/msx_slot/ram.h @@ -3,25 +3,24 @@ #ifndef MAME_BUS_MSX_SLOT_RAM_H #define MAME_BUS_MSX_SLOT_RAM_H +#pragma once + #include "slot.h" class msx_slot_ram_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // Set to 0xe000 for 8KB RAM - void force_start_address(uint16_t start) { m_start_address = start; } - - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; + void force_start_address(u16 start) { m_start_address = start; } protected: virtual void device_start() override; private: - std::vector m_ram; + std::vector m_ram; }; diff --git a/src/devices/bus/msx_slot/ram_mm.cpp b/src/devices/bus/msx_slot/ram_mm.cpp index 84498f9afe1..24ef1b26fce 100644 --- a/src/devices/bus/msx_slot/ram_mm.cpp +++ b/src/devices/bus/msx_slot/ram_mm.cpp @@ -5,12 +5,13 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_RAM_MM, msx_slot_ram_mm_device, "msx_slot_ram_mm", "MSX Internal Memory Mapped RAM") -msx_slot_ram_mm_device::msx_slot_ram_mm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_ram_mm_device::msx_slot_ram_mm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_SLOT_RAM_MM, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) , m_total_size(0) , m_bank_mask(0) , m_ramio_set_bits(0) + , m_rambank(*this, "mmbank%u", 0U) { } @@ -21,62 +22,34 @@ void msx_slot_ram_mm_device::device_start() { case 64*1024: m_bank_mask = 0x03; break; case 128*1024: m_bank_mask = 0x07; break; - case 256*1024: m_bank_mask = 0x0F; break; - case 512*1024: m_bank_mask = 0x1F; break; - case 1024*1024: m_bank_mask = 0x3F; break; - case 2048*1024: m_bank_mask = 0x7F; break; - case 4096*1024: m_bank_mask = 0xFF; break; + case 256*1024: m_bank_mask = 0x0f; break; + case 512*1024: m_bank_mask = 0x1f; break; + case 1024*1024: m_bank_mask = 0x3f; break; + case 2048*1024: m_bank_mask = 0x7f; break; + case 4096*1024: m_bank_mask = 0xff; break; default: fatalerror("Invalid memory mapper size specified\n"); } m_ram.resize(m_total_size); - for ( int i = 0; i < 4; i++ ) - { - m_bank_selected[i] = 3 -i; - m_bank_base[i] = &m_ram[0x4000 * m_bank_selected[i]]; - } - save_item(NAME(m_ram)); - save_item(NAME(m_bank_selected)); // Install IO read/write handlers - io_space().install_read_handler(0xFC, 0xFF, read8sm_delegate(*this, FUNC(msx_slot_ram_mm_device::read_mapper_bank))); - io_space().install_write_handler(0xFC, 0xFF, write8sm_delegate(*this, FUNC(msx_slot_ram_mm_device::write_mapper_bank))); -} - -void msx_slot_ram_mm_device::device_post_load() -{ - restore_banks(); -} - -void msx_slot_ram_mm_device::restore_banks() -{ - for ( int i = 0; i < 3; i++ ) + io_space().install_read_handler(0xfc, 0xff, read8sm_delegate(*this, FUNC(msx_slot_ram_mm_device::read_mapper_bank))); + io_space().install_write_handler(0xfc, 0xff, write8sm_delegate(*this, FUNC(msx_slot_ram_mm_device::write_mapper_bank))); + for (int i = 0; i < 4; i++) { - m_bank_base[i] = &m_ram[0x4000 * ( m_bank_selected[i] & m_bank_mask )]; + m_rambank[i]->configure_entries(0, u32(m_bank_mask) + 1, m_ram.data(), 0x4000); + page(i)->install_readwrite_bank(0x4000 * i, (0x4000 * i) + 0x3fff, m_rambank[i]); } } -uint8_t msx_slot_ram_mm_device::read(offs_t offset) -{ - return m_bank_base[offset >> 14][offset & 0x3fff]; -} - -void msx_slot_ram_mm_device::write(offs_t offset, uint8_t data) +u8 msx_slot_ram_mm_device::read_mapper_bank(offs_t offset) { - m_bank_base[offset >> 14][offset & 0x3fff] = data; + return m_rambank[offset & 3]->entry() | m_ramio_set_bits; } -uint8_t msx_slot_ram_mm_device::read_mapper_bank(offs_t offset) +void msx_slot_ram_mm_device::write_mapper_bank(offs_t offset, u8 data) { - return m_bank_selected[offset & 3] | m_ramio_set_bits; -} - -void msx_slot_ram_mm_device::write_mapper_bank(offs_t offset, uint8_t data) -{ - offset &= 3; - - m_bank_selected[offset] = data; - m_bank_base[offset] = &m_ram[0x4000 * ( m_bank_selected[offset] & m_bank_mask )]; + m_rambank[offset & 0x03]->set_entry(data & m_bank_mask); } diff --git a/src/devices/bus/msx_slot/ram_mm.h b/src/devices/bus/msx_slot/ram_mm.h index 55f13659a4c..4fb95109323 100644 --- a/src/devices/bus/msx_slot/ram_mm.h +++ b/src/devices/bus/msx_slot/ram_mm.h @@ -3,35 +3,30 @@ #ifndef MAME_BUS_MSX_SLOT_RAM_MM_H #define MAME_BUS_MSX_SLOT_RAM_MM_H +#pragma once + #include "slot.h" class msx_slot_ram_mm_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_ram_mm_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - - msx_slot_ram_mm_device &set_total_size(uint32_t total_size) { m_total_size = total_size; return *this; } - msx_slot_ram_mm_device &set_ramio_bits(uint8_t ramio_set_bits) { m_ramio_set_bits = ramio_set_bits; return *this; } + msx_slot_ram_mm_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; + msx_slot_ram_mm_device &set_total_size(u32 total_size) { m_total_size = total_size; return *this; } + msx_slot_ram_mm_device &set_ramio_bits(u8 ramio_set_bits) { m_ramio_set_bits = ramio_set_bits; return *this; } protected: virtual void device_start() override; - virtual void device_post_load() override; - - void restore_banks(); private: - uint8_t read_mapper_bank(offs_t offset); - void write_mapper_bank(offs_t offset, uint8_t data); - - std::vector m_ram; - uint32_t m_total_size; - uint8_t m_bank_mask; - uint8_t m_bank_selected[4]; - uint8_t *m_bank_base[4]; - uint8_t m_ramio_set_bits; + u8 read_mapper_bank(offs_t offset); + void write_mapper_bank(offs_t offset, u8 data); + + std::vector m_ram; + u32 m_total_size; + u8 m_bank_mask; + u8 m_ramio_set_bits; + memory_bank_array_creator<4> m_rambank; }; DECLARE_DEVICE_TYPE(MSX_SLOT_RAM_MM, msx_slot_ram_mm_device) diff --git a/src/devices/bus/msx_slot/rom.cpp b/src/devices/bus/msx_slot/rom.cpp index aafc37b345b..783e4313f30 100644 --- a/src/devices/bus/msx_slot/rom.cpp +++ b/src/devices/bus/msx_slot/rom.cpp @@ -7,22 +7,19 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_ROM, msx_slot_rom_device, "msx_slot_rom", "MSX Internal ROM") -msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : msx_slot_rom_device(mconfig, MSX_SLOT_ROM, tag, owner, clock) { } - -msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, type, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) , m_rom_region(*this, finder_base::DUMMY_TAG) , m_region_offset(0) - , m_rom(nullptr) { } - void msx_slot_rom_device::device_start() { // Sanity checks @@ -31,15 +28,10 @@ void msx_slot_rom_device::device_start() fatalerror("Memory region '%s' is too small for rom slot '%s'\n", m_rom_region.finder_tag(), tag()); } - m_rom = m_rom_region->base() + m_region_offset; -} - - -uint8_t msx_slot_rom_device::read(offs_t offset) -{ - if (offset >= m_start_address && offset < m_end_address) + u8 *rom = m_rom_region->base() + m_region_offset; + for (int i = m_start_address >> 14; i < 4 && i * 0x4000 < m_end_address; i++) { - return m_rom[offset - m_start_address]; + page(i)->install_rom(i * 0x4000, std::min((i + 1) * 0x4000, m_end_address) - 1, rom); + rom += 0x4000; } - return 0xFF; } diff --git a/src/devices/bus/msx_slot/rom.h b/src/devices/bus/msx_slot/rom.h index 6bcd480a5a3..698487dae3f 100644 --- a/src/devices/bus/msx_slot/rom.h +++ b/src/devices/bus/msx_slot/rom.h @@ -11,22 +11,19 @@ class msx_slot_rom_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // configuration helpers void set_rom_start(const char *region, uint32_t offset) { m_rom_region.set_tag(region); m_region_offset = offset; } - virtual uint8_t read(offs_t offset) override; - protected: - msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); virtual void device_start() override; + u8 *rom_base() { return m_rom_region->base() + m_region_offset; } -private: required_memory_region m_rom_region; - uint32_t m_region_offset; - const uint8_t *m_rom; + u32 m_region_offset; }; DECLARE_DEVICE_TYPE(MSX_SLOT_ROM, msx_slot_rom_device) diff --git a/src/devices/bus/msx_slot/slot.cpp b/src/devices/bus/msx_slot/slot.cpp index 345cf6e0a5c..31c49773622 100644 --- a/src/devices/bus/msx_slot/slot.cpp +++ b/src/devices/bus/msx_slot/slot.cpp @@ -16,9 +16,19 @@ pages; and multiple pieces of rom/ram/components can occur in a single slot. msx_internal_slot_interface::msx_internal_slot_interface(const machine_config &mconfig, device_t &device) : m_mem_space(device, finder_base::DUMMY_TAG, -1) , m_io_space(device, finder_base::DUMMY_TAG, -1) + , m_maincpu(device, finder_base::DUMMY_TAG) , m_start_address(0) , m_size(0) , m_end_address(0) + , m_page{nullptr, nullptr, nullptr, nullptr} { (void)mconfig; } + +void msx_internal_slot_interface::install(memory_view::memory_view_entry *page0, memory_view::memory_view_entry *page1, memory_view::memory_view_entry *page2, memory_view::memory_view_entry *page3) +{ + m_page[0] = page0; + m_page[1] = page1; + m_page[2] = page2; + m_page[3] = page3; +} diff --git a/src/devices/bus/msx_slot/slot.h b/src/devices/bus/msx_slot/slot.h index 3a95c7b6b75..295f6e45e6d 100644 --- a/src/devices/bus/msx_slot/slot.h +++ b/src/devices/bus/msx_slot/slot.h @@ -25,22 +25,33 @@ public: // configuration helpers template void set_memory_space(T &&tag, int spacenum) { m_mem_space.set_tag(std::forward(tag), spacenum); } template void set_io_space(T &&tag, int spacenum) { m_io_space.set_tag(std::forward(tag), spacenum); } - void set_start_address(uint32_t start_address) { m_start_address = start_address; m_end_address = m_start_address + m_size; } - void set_size(uint32_t size) { m_size = size; m_end_address = m_start_address + m_size; } + template void set_maincpu(T &&tag) { m_maincpu.set_tag(std::forward(tag)); } + void set_start_address(u32 start_address) { m_start_address = start_address; m_end_address = m_start_address + m_size; } + void set_size(u32 size) { m_size = size; m_end_address = m_start_address + m_size; } - virtual uint8_t read(offs_t offset) { return 0xFF; } - virtual void write(offs_t offset, uint8_t data) { } + void install(memory_view::memory_view_entry *page0, memory_view::memory_view_entry *page1, memory_view::memory_view_entry *page2, memory_view::memory_view_entry *page3); address_space &memory_space() const { return *m_mem_space; } address_space &io_space() const { return *m_io_space; } + cpu_device &maincpu() const { return *m_maincpu; } + bool page_configured(int i) { return bool(m_page[i]); } + memory_view::memory_view_entry *page(int i) + { + if (!m_page[i]) + fatalerror("page %i view not configured\n", i); + return m_page[i]; + } protected: required_address_space m_mem_space; required_address_space m_io_space; + required_device m_maincpu; - uint32_t m_start_address; - uint32_t m_size; - uint32_t m_end_address; + u32 m_start_address; + u32 m_size; + u32 m_end_address; + + memory_view::memory_view_entry *m_page[4]; }; #endif // MAME_BUS_MSX_SLOT_SLOT_H diff --git a/src/devices/bus/msx_slot/sony08.cpp b/src/devices/bus/msx_slot/sony08.cpp index 652ed134457..4030b0ccb6a 100644 --- a/src/devices/bus/msx_slot/sony08.cpp +++ b/src/devices/bus/msx_slot/sony08.cpp @@ -13,29 +13,24 @@ DEFINE_DEVICE_TYPE(MSX_SLOT_SONY08, msx_slot_sony08_device, "msx_slot_sony08", "MSX Internal SONY08") -msx_slot_sony08_device::msx_slot_sony08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_slot_sony08_device::msx_slot_sony08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_SLOT_SONY08, tag, owner, clock) , msx_internal_slot_interface(mconfig, *this) , m_nvram(*this, "nvram") , m_rom_region(*this, finder_base::DUMMY_TAG) + , m_rombank(*this, "rombank%u", 0U) + , m_view0(*this, "view0") + , m_view1(*this, "view1") , m_region_offset(0) - , m_rom(nullptr) { - for (int i = 0; i < 8; i++) - { - m_selected_bank[i] = 0; - m_bank_base[i] = nullptr; - } - memset(m_sram, 0, sizeof(m_sram)); } void msx_slot_sony08_device::device_add_mconfig(machine_config &config) { - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + NVRAM(config, m_nvram, nvram_device::DEFAULT_ALL_0); } - void msx_slot_sony08_device::device_start() { // Sanity checks @@ -44,129 +39,52 @@ void msx_slot_sony08_device::device_start() fatalerror("Memory region '%s' is too small for the SONY08 firmware\n", m_rom_region.finder_tag()); } - m_rom = m_rom_region->base() + m_region_offset; - - m_nvram->set_base(m_sram, 0x4000); - - save_item(NAME(m_selected_bank)); - - restore_banks(); -} - - -void msx_slot_sony08_device::device_post_load() -{ - restore_banks(); -} - - -void msx_slot_sony08_device::map_bank(int bank) -{ - if (bank < 2) - { - return; - } - - // Special banks - if (bank == 6 || bank == 7) - { - m_bank_base[bank] = m_rom + 0x80000 + (m_selected_bank[bank] * 0x800); - return; - } - - m_bank_base[bank] = m_rom + ((m_selected_bank[bank] * 0x2000) & 0xFFFFF); - if (bank == 2) - { - if (m_selected_bank[bank] & 0x80) - { - m_bank_base[0] = m_sram; - m_bank_base[1] = m_sram + 0x2000; - } - else - { - m_bank_base[0] = nullptr; - m_bank_base[1] = nullptr; - } - } -} - - -void msx_slot_sony08_device::restore_banks() -{ - for (int i = 0; i < 8; i++) - { - map_bank(i); - } + m_sram.resize(SRAM_SIZE); + m_nvram->set_base(m_sram.data(), SRAM_SIZE); + + for (int i = 0; i < 4; i++) + m_rombank[i]->configure_entries(0, 0x80, m_rom_region->base() + m_region_offset, 0x2000); + m_rombank[4]->configure_entries(0, 0x100, m_rom_region->base() + m_region_offset + 0x80000, 0x800); + m_rombank[5]->configure_entries(0, 0x100, m_rom_region->base() + m_region_offset + 0x80000, 0x800); + + page(0)->install_view(0x0000, 0x3fff, m_view0); + m_view0[0]; + m_view0[1].install_ram(0x0000, 0x3fff, m_sram.data()); + + page(1)->install_read_bank(0x4000, 0x5fff, m_rombank[0]); + page(1)->install_write_handler(0x4fff, 0x4fff, write8smo_delegate(*this, FUNC(msx_slot_sony08_device::bank_w<0>))); + page(1)->install_view(0x6000, 0x7fff, m_view1); + m_view1[0].install_read_bank(0x6000, 0x7fff, m_rombank[1]); + m_view1[1].install_read_bank(0x6000, 0x6fff, m_rombank[1]); + m_view1[1].install_read_bank(0x7000, 0x77ff, m_rombank[4]); + m_view1[1].install_read_bank(0x7800, 0x7fff, m_rombank[5]); + page(1)->install_write_handler(0x6fff, 0x6fff, write8smo_delegate(*this, FUNC(msx_slot_sony08_device::bank_w<1>))); + page(1)->install_write_handler(0x77ff, 0x77ff, write8smo_delegate(*this, FUNC(msx_slot_sony08_device::bank_w<4>))); + page(1)->install_write_handler(0x7fff, 0x7fff, write8smo_delegate(*this, FUNC(msx_slot_sony08_device::bank_w<5>))); + page(2)->install_read_bank(0x8000, 0x9fff, m_rombank[2]); + page(2)->install_write_handler(0x8fff, 0x8fff, write8smo_delegate(*this, FUNC(msx_slot_sony08_device::bank_w<2>))); + page(2)->install_read_bank(0xa000, 0xbfff, m_rombank[3]); + page(2)->install_write_handler(0xafff, 0xafff, write8smo_delegate(*this, FUNC(msx_slot_sony08_device::bank_w<3>))); } - -uint8_t msx_slot_sony08_device::read(offs_t offset) +void msx_slot_sony08_device::device_reset() { - if (offset >= 0xc000) - { - return 0xFF; - } - - if ((offset & 0xf000) == 0x7000 && (m_selected_bank[3] & 0x80)) - { - return m_bank_base[6 + ((offset >> 11) & 0x01)][offset & 0x7ff]; - } - - const uint8_t *mem = m_bank_base[offset >> 13]; - - if (mem) - { - return mem[offset & 0x1fff]; - } - return 0xFF; + m_view0.select(0); + m_view1.select(0); + for (int i = 0; i < 6; i++) + m_rombank[i]->set_entry(0); } - -void msx_slot_sony08_device::write(offs_t offset, uint8_t data) +template +void msx_slot_sony08_device::bank_w(u8 data) { - if (offset < 0x4000) - { - if (m_bank_base[0] != nullptr) - { - m_sram[offset & 0x3fff] = data; - return; - } - } - - switch (offset) - { - case 0x4FFF: - m_selected_bank[2] = data; - map_bank(2); - break; - - case 0x6FFF: // 6000-7FFF - m_selected_bank[3] = data; - map_bank(3); - break; - - case 0x77FF: - m_selected_bank[6] = data; - map_bank(6); - break; - - case 0x7FFF: - m_selected_bank[7] = data; - map_bank(7); - break; - - case 0x8FFF: - m_selected_bank[4] = data; - map_bank(4); - break; - - case 0xAFFF: - m_selected_bank[5] = data; - map_bank(5); - break; - - default: - logerror("Unhandled write %02x to %04x\n", data, offset); - break; - } + if (Bank >= 4) + m_rombank[Bank]->set_entry(data); + else + m_rombank[Bank]->set_entry(data & 0x7f); + + if (Bank == 0) + m_view0.select(BIT(data, 7) ? 1 : 0); + if (Bank == 1) + m_view1.select(BIT(data, 7) ? 1 : 0); } diff --git a/src/devices/bus/msx_slot/sony08.h b/src/devices/bus/msx_slot/sony08.h index 74c8fd95f35..22538a74a18 100644 --- a/src/devices/bus/msx_slot/sony08.h +++ b/src/devices/bus/msx_slot/sony08.h @@ -15,32 +15,29 @@ DECLARE_DEVICE_TYPE(MSX_SLOT_SONY08, msx_slot_sony08_device) class msx_slot_sony08_device : public device_t, public msx_internal_slot_interface { public: - msx_slot_sony08_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_slot_sony08_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // configuration helpers - void set_rom_start(const char *region, uint32_t offset) { m_rom_region.set_tag(region); m_region_offset = offset; } - - virtual uint8_t read(offs_t offset) override; - virtual void write(offs_t offset, uint8_t data) override; + void set_rom_start(const char *region, u32 offset) { m_rom_region.set_tag(region); m_region_offset = offset; } protected: virtual void device_start() override; - virtual void device_post_load() override; + virtual void device_reset() override; virtual void device_add_mconfig(machine_config &config) override; - void restore_banks(); - private: + static constexpr size_t SRAM_SIZE = 0x4000; + + template void bank_w(u8 data); + required_device m_nvram; required_memory_region m_rom_region; - uint32_t m_region_offset; - const uint8_t *m_rom; - uint8_t m_selected_bank[8]; - const uint8_t *m_bank_base[8]; - uint8_t m_sram[0x4000]; - - void map_bank(int bank); + memory_bank_array_creator<6> m_rombank; + memory_view m_view0; + memory_view m_view1; + u32 m_region_offset; + std::vector m_sram; }; diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 65c68328a26..1556b56d089 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -31324,46 +31324,31 @@ msisaac // A34 (c) 1985 Taito Corporation @source:skeleton/mstation.cpp mstation // -@source:msx/msx.cpp +@source:msx/msx1.cpp ax150 // ax170 // -ax350 // -ax370 // -bruc100 // +ax230 // canonv10 // canonv20 // canonv20e // canonv20f // canonv20g // canonv20s // -canonv25 // -canonv30 // -canonv30f // canonv8 // cf1200 // 1984 MSX Japan cf2000 // 1983 MSX Japan cf2700 // 1984 MSX Japan cf2700g // +cf2700uk // cf3000 // 1984 MSX Japan cf3300 // 1985 MSX Japan -cpc300 // 1986 MSX2 Korea -cpc300e // 1986 MSX2 Korea -cpc330k // -cpc400 // 1986 MSX2 Korea -cpc400s // 1986 MSX2 Korea cpc50a // cpc50b // cpc51 // -cpc61 // cpc88 // -cpg120 // cx5f // cx5f1 // -cx5m // -cx5m128 // -cx5m2 // -cx7m // 1986 MSX2 -cx7m128 // 1986 MSX2 +cx5mu // dgnmsx // 1985 MSX dpc100 // 1984 MSX Korea dpc180 // 1984 MSX Korea @@ -31372,44 +31357,21 @@ dpc200e // expert10 // 1983 MSX Brazil expert11 // 1984 MSX Brazil expert13 // 1984 MSX Brazil -expert20 // 1986 MSX2 Korea -expert3i // -expert3t // -expertac // expertdp // 1985 MSX Brazil -expertdx // expertpl // 1984 MSX Brazil fdpc200 // fmx // fpc500 // -fpc900 // fs1300 // 1985 MSX Japan fs4000 // 1985 MSX Japan fs4000a // -fs4500 // 1986 MSX2 Japan -fs4600 // 1986 MSX2 Japan -fs4700 // 1986 MSX2 Japan -fs5000 // 1986 MSX2 Japan -fs5500f1 // 1985 MSX2 Japan -fs5500f2 // 1985 MSX2 Japan -fsa1 // 1986 MSX2 Japan -fsa1a // 1986 MSX2 Japan -fsa1f // 1987 MSX2 Japan -fsa1fm // 1988 MSX2 Japan -fsa1fx // 1988 MSX2+ Japan -fsa1gt // -fsa1mk2 // 1987 MSX2 Japan -fsa1st // -fsa1wsx // 1989 MSX2+ Japan -fsa1wx // 1988 MSX2+ Japan -fsa1wxa // 1988 MSX2+ Japan fspc800 // -fstm1 // gfc1080 // gfc1080a // gsfc200 // gsfc80u // hb10 // +hb101 // hb101p // hb10p // hb201 // 1985 MSX Japan @@ -31420,38 +31382,15 @@ hb55 // hb55d // 1983 MSX Germany hb55p // 1983 MSX hb701fd // +hb75 // hb75d // 1983 MSX Germany hb75p // 1983 MSX -hbf1 // 1986 MSX2 Japan -hbf12 // 1987 MSX2 Japan -hbf1xd // 1987 MSX2 Japan -hbf1xdj // 1988 MSX2+ Japan -hbf1xdm2 // 1988 MSX2 Japan -hbf1xv // 1989 MSX2+ Japan -hbf5 // -hbf500 // 1986 MSX2 Japan -hbf500f // -hbf500p // 1985 MSX2 -hbf700d // 1985 MSX2 Germany -hbf700f // 1985 MSX2 -hbf700p // 1985 MSX2 -hbf700s // 1985 MSX2 Spain -hbf900 // 1986 MSX2 Japan -hbf900a // 1986 MSX2 Japan -hbf9p // 1985 MSX2 -hbf9pr // -hbf9s // 1985 MSX2 -hbf9sp // -hbg900ap // 1986 MSX2 -hbg900p // 1986 MSX2 +hb8000 // 1985 MSX Brazil hc5 // hc6 // hc7 // hotbi13b // 1985 MSX Brazil hotbi13p // 1985 MSX Brazil -hotbit11 // 1985 MSX Brazil -hotbit12 // 1985 MSX Brazil -hotbit20 // 1986 MSX2 Brazil hx10 // 1984 MSX hx10d // hx10dp // @@ -31460,70 +31399,41 @@ hx10f // hx10s // 1984 MSX hx10sa // hx20 // 1984 MSX +hx20e // 1985 MSX hx20i // hx21 // -hx21i // +hx21f // hx22 // hx22i // -hx23 // 1986 MSX2 -hx23f // 1986 MSX2 -hx23i // -hx33 // -hx34 // -hx34i // +hx32 // 1985 MSX +hx51i // 1985 MSX jvchc7gb // -kmc5000 // +mbh1 // 1983 MSX1 +mbh1e // 1984 MSX1 mbh2 // mbh25 // mbh50 // -mbh70 // +ml8000 // 1983 MSX1 mlf110 // mlf120 // mlf48 // mlf80 // mlfx1 // -mlg1 // -mlg10 // -mlg3 // -mlg30 // mpc10 // mpc100 // mpc200 // mpc200sp // -mpc2300 // -mpc2500f // -mpc25fd // -mpc27 // mpc64 // mx10 // mx101 // mx15 // mx64 // nms801 // -nms8220 // 1986 MSX2 -nms8220a // 1986 MSX2 -nms8245 // 1986 MSX2 -nms8245f // 1986 MSX2 -nms8250 // 1986 MSX2 -nms8250f // -nms8250j // -nms8255 // 1986 MSX2 -nms8255f // -nms8260 // -nms8280 // 1986 MSX2 -nms8280f // -nms8280g // 1986 MSX2 perfect1 // phc2 // -phc23 // 1986 MSX2 Japan phc28 // phc28l // phc28s // -phc35j // 1989 MSX2+ Japan -phc55fd2 // -phc70fd // 1988 MSX2+ Japan -phc70fd2 // 1988 MSX2+ Japan -phc77 // piopx7 // piopx7uk // piopxv60 // @@ -31531,47 +31441,159 @@ pv16 // pv7 // spc800 // svi728 // 1985 MSX +svi728es // +sx100 // 1985 MSX +tadpc200 // +tadpc200b // +vg8000 // +vg8010 // +vg8010f // +vg802000 // +vg802020 // 1985 MSX +vg8020f // +yc64 // +yis303 // +yis503 // +yis503f // + +@source:msx/msx1_bruc100.cpp +bruc100 // +bruc100a // + +@source:msx/msx1_v9938.cpp +ax200 // +ax200m // +cx5m128 // +cx5miib // svi738 // 1985 MSX svi738ar // svi738dk // svi738pl // 1985 MSX svi738sp // svi738sw // 1985 MSX -tadpc200 // -tadpc20a // +tadpc200a // +y503iir // +y503iir2 // +yis503ii // + +@source:msx/msx2.cpp +ax350 // +ax350ii // +ax350iif // +ax370 // +ax500 // +canonv25 // +canonv30f // +cpc300 // 1986 MSX2 Korea +cpc300e // 1986 MSX2 Korea +cpc330k // +cpc400 // 1986 MSX2 Korea +cpc400s // 1986 MSX2 Korea +cpc61 // +cpg120 // +cx7128 // 1986 MSX2 +cx7m128 // 1986 MSX2 +expert20 // 1986 MSX2 Korea +expert3i // +expert3t // +expertac // +expertdx // +fpc900 // +fs4500 // 1986 MSX2 Japan +fs4600f // 1986 MSX2 Japan +fs4700f // 1986 MSX2 Japan +fs5000f2 // 1986 MSX2 Japan +fs5500f1 // 1985 MSX2 Japan +fs5500f2 // 1985 MSX2 Japan +fsa1 // 1986 MSX2 Japan +fsa1a // 1986 MSX2 Japan +fsa1f // 1987 MSX2 Japan +fsa1fm // 1988 MSX2 Japan +fsa1fx // 1988 MSX2+ Japan +fsa1gt // +fsa1mk2 // 1987 MSX2 Japan +fsa1st // +fsa1wsx // 1989 MSX2+ Japan +fsa1wx // 1988 MSX2+ Japan +fsa1wxa // 1988 MSX2+ Japan +fstm1 // +hbf1 // 1986 MSX2 Japan +hbf1ii // 1987 MSX2 Japan +hbf1xd // 1987 MSX2 Japan +hbf1xdj // 1988 MSX2+ Japan +hbf1xv // 1989 MSX2+ Japan +hbf5 // +hbf500 // 1986 MSX2 Japan +hbf500_2 // +hbf500f // +hbf500p // 1985 MSX2 +hbf700d // 1985 MSX2 Germany +hbf700f // 1985 MSX2 +hbf700p // 1985 MSX2 +hbf700s // 1985 MSX2 Spain +hbf900 // 1986 MSX2 Japan +hbf900a // 1986 MSX2 Japan +hbf9p // 1985 MSX2 +hbf9pr // +hbf9s // 1985 MSX2 +hbg900ap // 1986 MSX2 +hbg900p // 1986 MSX2 +hotbit20 // 1986 MSX2 Brazil +hx23 // 1986 MSX2 +hx23f // 1986 MSX2 +hx33 // +hx34 // +kmc5000 // +mbh3 // +mbh70 // +mlg1 // +mlg10 // +mlg3 // +mlg30 // +mlg30_2 // +mpc2300 // +mpc2500f // +mpc25fd // +mpc25fs // +mpc27 // +nms8220 // 1986 MSX2 +nms8245 // 1986 MSX2 +nms8245f // 1986 MSX2 +nms8250 // 1986 MSX2 +nms8250_16 // +nms8250_19 // +nms8255 // 1986 MSX2 +nms8255f // +nms8260 // +nms8280 // 1986 MSX2 +nms8280f // +nms8280g // 1986 MSX2 +phc23 // 1986 MSX2 Japan +phc23jb // 1987 MSX2 Japan +phc35j // 1989 MSX2+ Japan +phc55fd2 // +phc70fd // 1988 MSX2+ Japan +phc70fd2 // 1988 MSX2+ Japan +phc77 // tpc310 // 1986 MSX2 tpp311 // tps312 // -vg8000 // -vg8010 // -vg8010f // -vg802000 // -vg802020 // 1985 MSX -vg8020f // +ucv102 // vg8230 // 1986 MSX2 -vg8230j // vg8235 // 1986 MSX2 vg8235f // 1986 MSX2 vg8240 // 1986 MSX2 +victhc80 // victhc90 // victhc95 // victhc95a // y503iiir // y503iiire // -y503iir // -y503iir2 // y805128 // y805128r2 // y805128r2e // y805256 // -yc64 // -yis303 // -yis503 // -yis503f // -yis503ii // -yis503m // yis604 // -yis60464 // @source:microterm/mt420.cpp mt420 // diff --git a/src/mame/msx/msx.cpp b/src/mame/msx/msx.cpp index f189b4255a2..af10262dfdb 100644 --- a/src/mame/msx/msx.cpp +++ b/src/mame/msx/msx.cpp @@ -1,12 +1,21 @@ // license:BSD-3-Clause // copyright-holders:Wilbert Pol /* -** msx.cpp : driver for MSX +** msx.cpp : Enulation of the MSX family of machines +** +** Special usage notes: +** +** ax350iif: +** The machine has a French keyboard so to select firmware options you +** need to enter numbers as shift + number key. ** ** cpc300: ** To get out of the MSX Tutor press the SELECT key. Entering SET SYSTEM 1 should ** disable the MSX Tutor on next boot and SET SYSTEM 0 should enable. ** +** hx21, hx22: +** To start the firmware, mount a HX-M200 cartridge and type: CALL JWP. +** ** tpp311: ** This machine is supposed to boot into logo; it was made to only run logo. ** @@ -15,1147 +24,301 @@ ** - To get into MSX-PLAN type: CALL MSXPLAN ** ** -** There really were a lot of different MSX systems released by quite a few -** manufacturers. Until we have identified all the unique characteristics of -** each machine the machines will stay listed separately. After that -** de-duplication of machine descriptions and rom sets may happen. -** ** ** Todo/known issues: +** - Get rid of trampolines. +** - Get rid of code duplication between msx_slot and msx_cart (eg, kanji roms, disk interfaces) +** - Use standard game controller slot interface for joystick and mouse +** - general: - Add support for kana lock +** - - Expansion slots not emulated +** - kanji: The direct rom dump from FS-A1FX shows that the kanji font roms are accessed slightly differently. Most +** existing kanji font roms may haven been dumped from inside a running machine. Are all other kanji font +** roms bad? We need more direct rom dumps to know for sure. +** - rs232 support: +** - mlg3 (working, how does the rs232 switch work?) +** - mlg30_2 (working, how does the rs232 switch work?) +** - hbg900ap (not working, switch for terminal/moden operation) +** - hbg900p (not working) +** - victhc90 (cannot test, system config not emulated) +** - victhc95 (cannot test, system config not emulated) +** - victhc95a (cannot test, system config not emulated) +** - y805256 (cannot test, rs232 rom has not been dumped?) +** - inputs: +** fs4000: Is the keypad enter exactly the same as the normal enter key? There does not appear to be a separate mapping for it. +** piopx7: The keyboard responds like a regular international keyboard, not a japanese keyboard. +** svi728/svi728es: How are the keypad keys mapped? +** - ax230: Some builtin games show bad graphics, example: Press 5 in main firmware screen and choose the first game ** - piopx7/piopx7uk/piopxv60: Pioneer System Remote (home entertainment/Laserdisc control) not implemented -** - piopx7: Dump is from a PAL (EU/AU) machine, we have no known good dumps from JP or US NTSC machines -** - spc800: Haven't been able to test operation of the han rom yet -** - svi728: Expansion slot not emulated -** - svi738: v9938 not emulated -** - svi738: rs232c not emulated -** - hx10: Expansion slot not emulated (hx10s also??) -** - y503iir: Keyboard not responding correctly -** - y503iir, y503iir2: RTC not emulated -** - y503iir, y503iir2: Net not emulated -** - y503iir, y503iir2: Floppy support broken +** - spc800: How to test operation of the han rom? +** - mbh1, mbh1e, mbh2, mbh25: speed controller +** - cx5m128, yis503iir, yis604: yamaha mini cartridge slot +** - cpg120: turbo button +** - fs4000: Internal thermal printer not emulated +** - fs4500, fs4600f, fs4700: +** - switch to bypass firmware +** - switch to switch between internal and external printer +** - switch to switch betweem jp50on and jis layout +** - internal printer +** - fs5500f1, fs5500f2: +** - switch to switch between jp50on and jis layout +** - switcn to bypass firmware +** - fsa1fm: +** - Firmware and modem partially emulated +** - fsa1mk2: pause button +** - nms8260: HDD not emulated +** - phc77: builtin printer, switch to turn off firmware +** - hbf1: pause button +** - hbf1ii: rensha turbo slider +** - hbf1xd, hbf1xdj, hbf1xv +** - pause button +** - speed controller slider +** - rensha turbo slider +** - victhc90, victhc95, victhc95a: Turbo/2nd cpu not supported. Firmware not working. +** - fsa1fx, fsa1wsx, fsa1wx +** - rensha turbo slider +** - pause button +** - firmware switch +** - phc35j, phc70fd: rensha turbo slider, pause button +** - y503iir, y503iir2: Switch for teacher/student mode, net not emulated ** - cpc300: Config for MSX Tutor ON/OFF is not saved -** - fs4600: Kanji12 not emulated; how to trigger usage of kanji12?? -** - fsa1fm: Firmware not emulated -** - fsa1fm: kanji12 not emulated -** - fsa1fm: Modem not emulated -** - nms8280, nms8280g: Digitizer functionality not emulated -** - vg8230j: Floppy support broken? -** - hbf1: Does not boot. This seems to be caused by a race condition between setting the VBlank bit in the -** VDP status register and the z80 taking the interrupt. Currently the interrupt gets taken before the -** bit can be read, so the code goes into an infinite loop. -** - hbf12: Does not boot; see hbf1. -** - tpc310: Floppy support broken -** 7fbb <- c7 => seek 199??? -** - hx23f: The builtin word processor displays white squares instead of text +** - cpc300e: Remove joystick connectors +** - nms8280, nms8280g, and others: Digitizer functionality not emulated ** - expert3i: IDE not emulated ** - expert3t: Turbo not emulated ** - expertac: Does not boot -** - fsa1gt: Add Turbo-R support -** - fsa1st: Add Turbo-R support -** - canonv20e/f/g/s: Investigate different keyboard layouts -** - canonv30: Mapper RAM size unknown -** - mx101: External antenna not emulated -** - pv7: Add support for KB-7 (8KB ram + 2 cartslots) +** - fsa1gt, fsa1st: Add Turbo-R support ** - cpc50a/cpc50b: Remove keyboard; and add an external keyboard?? ** - cpc51/cpc61: Remove keyboard and add a keyboard connector -** - cpc50a/cpc50b/cpc51: Boot to a black screen, is this correct? -** - mbh2: speed controller not implemented +** - mbh3: touch pad not emulated ** - mbh70: Verify firmware operation -** - kmc5000: Floppy support broken -** - mlg3: rs232c not emulated -** - perfect1: Firmware broken -** - mpc2500f: Fix keyboard layout? -** - nms8260: HDD not emulated -** - mpc27: Light pen not emulated -** - phc77: firmware not emulated -** - phc77: printer not emulated -** - hx21, hx22: Hook up kanji rom -** - hx21, hx22: Does not start firmware -** - victhc90/95/95a: Turbo/2nd cpu not supported. -** - victhc90/95/95a: Firmware not working. -** - y503iiir/e: Fix keyboard support -** - y503iiir/e: Floppy support broken ** - y805*: Floppy support broken ** - y8805128r2/e: Firmware not working ** - cpg120: Remove ports -** - cpg120: Add V9958 ** ** TODO: ** - Add T6950 support. T6950 is selectable between pal and ntsc by a pin. ** -** Possibly missing machines: -** - Sanyo MPC-1 (T6950) -** - Toshibo HX-51i (T7937) -** - Sony HB-101 (TMS9118) -************************************************************************ - -This following list is probably incomplete. Corrections are welcome. -Entries marked with * still need to be processed. - -Al Alamiah AX-150 - MSX1 - ax150 -Al Alamiah AX-170 - MSX1 - ax170 -Al Alamiah AX-350II - MSX2 - ax350 -Al Alamiah AX-370 - MSX2 - ax370 -*Ascii MSXPLAYer 2003 -*Ascii One Chip MSX -Canon V-8 - MSX1 - canonv8 -Canon V-10 - MSX1 - canonv10 -Canon V-20 - MSX1 - canonv20 -Canon V-20E - MSX1 - canonv20e -Canon V-20F - MSX1 - canonv20f -Canon V-20G - MSX1 - canonv20g -Canon V-20S - MSX1 - canonv20s -Canon V-25 - MSX2 - canonv25 -Canon V-30 - MSX2 - canonv30 -Canon V-30F - MSX2 - canonv30f -Casio MX-10 - MSX1 - mx10 -Casio MX-15 - MSX1 - mx15 -Casio MX-101 - MSX1 - mx101 -Casio PV-7 - MSX1 - pv7 -*Casio PV-7 + KB-7 -Casio PV-16 - MSX1 - pv16 -Ciel Expert 3 IDE - MSX2+ - expert3i -Ciel Expert 3 Turbo = MSX2+ - expert3t -====================================== -This one is a full motherboard by CIEL (not an upgrade kit), created to replace the motherboard of a Gradiente Expert (which means that only the case, the analog boards and the keyboard remains Gradiente). This new motherboard has the following built-in features: - -1) MSX2+ -2) Support either 3.57MHz or 7.14MHz natively, switched either by software (*1) or by a hardware-switch on the front panel. Turbo-led included. -3) Up to 4MB of Memory Mapper (1MB is the most common configuration) -4) MSX-Music -5) 4 expansion slots (two external on the front panel, two internal) -6) Stereo sound (YM2413 channels 0-6 on right, PSG+YM2413 channels 7-9 on left) -7) Support the V9938 instead of the V9958 by switching some jumpers -8) The main-ram can be placed on slot 2 or slot 3, using jumpers (slot 2 is the default) - - -*1: A routine hidden inside the BIOS frame-0 is used to switch the turbo. - -Daewoo CPC-88 - MSX1 - cpc88 -Daewoo CPC-300 - MSX2 - cpc300 -Daewoo CPC-300E - MSX2 - cpc300e -Daewoo CPC-330K - MSX2 - cpc330k -Daewoo CPC-400 - MSX2 - cpc400 -Daewoo CPC-400S - MSX2 cpc400s -Daewoo DPC-100 - MSX1 - dpc100 -Daewoo DPC-180 - MSX1 - dpc180 -Daewoo DPC-200 - MSX1 - dpc200 -Daewoo DPC-200E - MSX1 - dpc200e -Daewoo Zemmix CPC-50A - MSX1 - cpc50a -Daewoo Zemmix CPC-50B - MSX1 - cpc50b -Daewoo Zemmix CPC-51 - MSX1 - cpc51 -Daewoo Zemmix CPC-61 - MSX2 - cpc61 -Daewoo Zemmix CPG-120 Normal (no clock chip, no printer port) - MSX2 - cpg120 -*Daewoo Zemmix CPG-120 Turbo - MSX2 - cpg120t -Fenner DPC-200 - MSX1 - fdpc200 -Fenner FPC-500 - MSX1 - fpc500 -Fenner FPC-900 - MSX2 - fpc900 -Fenner SPC-800 - MSX1 - fspc800 -Frael Bruc 100-1 - MSX1 - bruc100 -Fujitsu FM-X - MSX1 - fmx -Goldstar FC-80U - MSX1 - gsfc80u -Goldstar FC-200 - MSX1 - gsfc200 -Goldstar GFC-1080 - MSX1 - gfc1080 -Goldstar GFC-1080A - MSX1 - gfc1080a -Gradiente Expert 1.0 - MSX1 - expert10 -Gradiente Expert 1.1 - MSX1 - expert11 -Gradiente Expert 1.3 - MSX1 - expert13 -Gradiente Expert 2.0 - MSX2 - expert20 -Gradiente Expert AC88+ - MSX2+ - expertac -Gradiente Expert DDPlus - MSX1 - expertdp -Gradiente Expert DDX+ - MSX2+ - expertdx -Gradiente Expert Plus - MSX1 - expertpl -*Haesung Virtual Console -*Hitachi MB-H1 -*Hitachi MB-H1E -Hitachi MB-H2 - MSX1 - mbh2 -*Hitachi MB-H3 - MSX2 (64KB VRAM) -*Hitachi MB-H21 - MSX1 -Hitachi MB-H25 - MSX1 - mbh25 -Hitachi MB-H50 - MSX1 - mbh50 -Hitachi MB-H70 - MSX2 - mbh70 -*Hitachi MB-H80 - MSX1 -JVC HC-7GB - MSX1 -jvchc7gb -Kawai KMC-5000 - MSX2 - kmc5000 -Mitsubishi ML-F48 - MSX1 - mlf48 -Mitsubishi ML-F80 - MSX1 - mlf80 -Mitsubishi ML-F110 - MSX1 - mlf110 -Mitsubishi ML-F120 - MSX1 - mlf120 -Mitsubishi ML-FX1 - MSX1 - mlfx1 -Mitsubishi ML-G1 - MSX2 - mlg1 -Mitsubishi ML-G3 - MSX2 - mlg3 -Mitsubishi ML-G10 - MSX2 - mlg10 -Mitsubishi ML-G30 Model 1 - MSX2 - mlg30 -Mitsubishi ML-G30 Model 2 - MSX2 - See Mitsubishi ML-G30 Model 1 -National CF-1200 - MSX1 - cf1200 -National CF-2000 - MSX1 - cf2000 -National CF-2700 - MSX1 - cf2700 -National CF-3000 - MSX1 - cf3000 -National CF-3300 - MSX1 - cf3300 -National FS-1300 - MSX1 - fs1300 -National FS-4000 - MSX1 - fs4000 -National FS-4000 (alt) - MSX1 - fs4000a -National FS-4500 - MSX2 - fs4500 -National FS-4600 - MSX2 - fs4600 -National FS-4700 - MSX2 - fs4700 -National FS-5000F2 - MSX2 - fs5000 -National FS-5500F1 - MSX2 - fs5500 -National FS-5500F2 - MSX2 - fs5500 -Olympia PHC-2 - MSX1 - phc2 -Olympia PHC-28 - MSX1 - phc28 -Panasonic CF-2700G - MSX1 - cf2700g -Panasonic FS-A1 - MSX2 - fsa1 / fsa1a -Panasonic FS-A1 MK2 - MSX2 - fsa1mk2 -Panasonic FS-A1F - MSX2 - fsa1f -Panasonic FS-A1FM - MSX2 - fsa1fm -Panasonic FS-A1FX - MSX2+ - fsa1fx -Panasonic FS-A1GT - MSX Turbo-R - fsa1gt -Panasonic FS-A1ST - MSX Turbo-R - fsa1st -Panasonic FS-A1WSX - MSX2+ - fsa1wsx -Panasonic FS-A1WX - MSX2+ - fsa1wx / fsa1wxa -Perfect Perfect1 - MSX1 - perfect1 -*Perfect Perfect2 - MSX2 -Philips NMS-801 - MSX1 - nms801 -Philips NMS-8220 - MSX2 - nms8220 / nms8220a -Philips NMS-8245 - MSX2 - nms8245 -Philips NMS-8245F - MSX2 - nms8245f -Philips NMS-8250 - MSX2 - nms8250 -Philips NMS-8250F - MSX2 - nms8250f -Philips NMS-8250J - MSX2 - nms8250j -Philips NMS-8255 - MSX2 - nms8255 -Philips NMS-8255F - MSX2 - nms8255f -Philips NMS-8260 - MSX2 - nms8260 -Philips NMS-8270 - MSX2 - nms8270 - not confirmed to exist yet -Philips NMS-8280 - MSX2 - nms8280 -Philips NMS-8280F - MSX2 - nms8280f -Philips NMS-8280G - MSX2 - nms8280g -*Philips PTC MSX PC -Philips VG-8000 - MSX1 - vg8000 -Philips VG-8010 - MSX1 - vg8010 -Philips VG-8010F - MSX1 - vg8010f -Philips VG-8020-00 - MSX1 - vg802000 -Philips VG-8020-20 - MSX1 - vg802020 -*Philips VG-8020-40 - MSX1 - -Philips VG-8020F - MSX1 - vg8020f -Philips VG-8230 - MSX2 - vg8230 -Philips VG-8230J - MSX2 - vg8230j -Philips VG-8235 - MSX2 - vg8235 -Philips VG-8235F - MSX2 - vg8235f -Philips VG-8240 - MSX2 - vg8240 -=============================== - -PCB Layout missing - - -Pioneer PX-7 - MSX1 - piopx7 -============================ - -|---------------------------------------| -| CN1 CN2 | -| | -| | -| IC33 |---------------------------------| -| CN3 | -| IC32 IC34 IC38 IC40 | -| IC20 | -| IC15 IC18 IC43 IC8 IC35 IC6 |----IC3---| | -| |----------| IC21 | -| IC16 IC19 |---IC13---| IC7 IC10 | -| |----------| IC36 IC29 --- | -| IC17 IC14 X2 | | | -| |--IC12---| |----IC1-----| IC37 |I| | -| IC28 IC11 |---------| |------------| X1 |C| | -| |2| | -| |----IC4----| |----IC5----| IC39 IC9 IC42 IC44 | | | -| |-----------| |-----------| --- | -| | -| IC45 IC31 IC30 IC41 | -| | -| CN4 CN5 CN6 CN7 CN8 | -|-------------------------------------------------------------------------| - -Notes: - X1 - 3.579MHz - X2 - 500kHz - IC1 - Sharp LH0080A Z80A-CPU-D - IC2 - TMS91289NL - IC3 - MB111S112 Z10 (500kHz) - IC4 - M5L8255AP-5 - IC5 - YM2149F - IC6,IC7,IC8,IC10,IC45 - SN74LS367AN - IC9 - SN74LS245N - IC11,IC34 - SN74LS139N - IC12 - YM2301-23908 / 53 18 85 A (might indicate a version) - IC13 - Pioneer PD5031 2364-213 514100 (M5L2764-213) - IC14,IC17,IC30,IC31 - SN74LS157N - IC15-IC19 - MB81416-12 - IC20,IC21 - TMS4416-I5NL - IC28 - SN74LS153N - IC29 - SN74LS02N - IC32 - SN74LS374N - IC33 - M5218P - IC35 - SN74LS74AN - IC36 - SN74LS30N - IC37-IC39 - SN74LS04N - IC40,IC41 - SN74LS05N - IC42 - SN74LS08N - IC43,IC44 - SN74LS32N - CN1 - Printer - CN2 - Cassette recorder - CN3 - Expansion slot - CN4 - Keyboard - CN5 - Keyboard - CN6 - Controller #1 - CN7 - Controller #2 - CN8 - Expansion slot - - -Pioneer PX-7UK - MSX1 - piopx7uk -Pioneer PX-V60 - MSX1 - piopxv60 -Samsung SPC-800 MSX1 - spc800 -Sanyo MPC-64 - MSX1 - mpc64 -Sanyo MPC-100 - MSX1 - mpc100 -Sanyo MPC-200 - MSX1 - mpc200 -Sanyo MPC-200SP - MSX1 - mpc200sp -Sanyo MPC-2300 - MSX2 - mpc2300 -Sanyo MPC-2500FD - MSX2 - mpc2500f -Sanyo PHC-28L - MSX1 - phc28l -Sanyo PHC-28S - MSX1 - phc28s -Sanyo Wavy MPC-10 - MSX1 - mpc10 -Sanyo Wavy MPC-25FD - MSX2 - mpc25fd -Sanyo Wavy MPC-27 - MSX2 - mpc27 -Sanyo Wavy PHC-23 - MSX2 - phc23 -Sanyo Wavy PHC-35J - MSX2+ - phc35j -Sanyo Wavy PHC-55FD2 - MSX2 - phc55fd2 -Sanyo Wavy PHC-70FD1 - MSX2+ - phc70fd -Sanyo Wavy PHC-70FD2 - MSX2+ - phc70fd2 -Sanyo Wavy PHC-77 - MSX2 - phc77 -Sharp Epcom HotBit 1.1 - MSX1 - hotbit11 -Sharp Epcom HotBit 1.2 - MSX1 - hotbit12 -Sharp Epcom HotBit 1.3b - MSX1 - hotbi13b -Sharp Epcom HotBit 1.3p - MSX1 - hotbi13p -Sharp Epcom HotBit 2.0 - MSX2 - hotbit20 -Sony HB-10 - MSX1 - hb10 -*Sony HB-10D - MSX1 -Sony HB-10P - MSX1 - hb10p -Sony HB-20P - MSX1 - hb20p -Sony HB-55 Version 1 - MSX1 - hb55 -Sony HB-55D - MSX1 - hb55d -Sony HB-55P - MSX1 - hb55p -Sony HB-75D - MSX1 - hb75d -Sony HB-75P - MSX1 - hb75p -*Sony HB-101 - MSX1 -Sony HB-101P - MSX1 - hb101p -Sony HB-201 - MSX1 - hp201 -Sony HB-201P - MSX1 - hb201p -Sony HB-501P - MSX1 - hb501p -Sony HB-701FD - MSX1 - hb701fd -Sony HB-F1 - MSX2 - hbf1 -Sony HB-F1II - MSX2 - hbf12 -Sony HB-F1XD - MSX2 - hbf1xd -Sony HB-F1XD MK2 - MSX2 - hbf1xdm2 -Sony HB-F1XDJ - MSX2+ - hbf1xdj -Sony HB-F1XV - MSX2+ - hbf1xv -Sony HB-F5 - MSX2 - hbf5 -Sony HB-F500 - MSX2 - hbf500 -Sony HB-F500F - MSX2 - hbf500f -Sony HB-F500P - MSX2 - hbf500p -Sony HB-F700D - MSX2 - hbf700d -Sony HB-F700F - MSX2 - hbf700f -Sony HB-F700P - MSX2 - hbf700p -Sony HB-F700S - MSX2 - hbf700s -*Sony HB-F750+ -Sony HB-F900 - MSX2 - hbf900 / hbf900a -Sony HB-F9P - MSX2 - hbf9p -Sony HB-F9P Russian - MSX2 - hbf9pr -Sony HB-F9S - MSX2 - hbf9s -Sony HB-F9S+ - MSX2+ - hbf9sp -Sony HB-G900AP - MSX2 - hbg900ap -Sony HB-G900P - MSX2 - hbg900p -*Sony HB-T7 -Spectravideo SVI-728 - MSX1 - svi728 -Spectravideo SVI-738 - MSX1 - svi738 -Spectravideo SVI-738 Arabic - MSX1 - svi738ar -Spectravideo SVI-738 Danish - MSX1 - svi738dk -Spectravideo SVI-738 Polish - MSX1 - svi738pl -Spectravideo SVI-738 Spanish - MSX1 - svi738sp -Spectravideo SVI-738 Swedish - MSX1 - svi738sw -Talent DPC-200 - MSX1 - tadpc200 -Talent DPC-200A - MSX1 - tadpc20a -Talent TPC-310 - MSX2 - tpc310 -Talent TPP-311 - MSX2 - tpp311 -Talent TPS-312 - MSX2 - tps312 -============================== - -PCB Layouts missing - - -Toshiba HX-10 - MSX1 - hx10 -=========================== - -Code on PCB: MSX TUK - |---------------------------|-------------------|-------------| - | CN1 CN2 CN3 CN4 CN5 | - | |---------------------------| | - | |---------------------------| | - | CN6 | - | IC40 | - | CN7 | - | IC38 IC32 IC33 IC37 | - | | - | Q2 IC31 IC34 IC35 | - | Q1 CN8 | - | IC39 | - | |--IC15------| |--IC2----| |----IC1-----| | - | |------------| |---------| |------------| | - | IC30 | - | IC3 IC4 CN9 | - | |-----IC15-------| | - | IC17 IC18 IC7 IC8 |----------------| | - | IC27 | - | IC19 IC20 IC9 IC10 |----IC25------| | -|----| | |--------------| IC26 | -| Q | | IC21 IC22 IC11 IC12 | -| | | | -| S | | IC23 IC24 IC13 IC14 IC29 IC28 | -| L | | | -| | | CN11 CN10 | -|----| |-------------------------------------------------------------| - -Notes: - Mainboard components: - IC1 - Sharp LH0080A Z80A-CPU-D - IC2 - MB83256 - IC3,IC4,IC27,IC28 - Texas Instruments SN74LS157N - IC7-IC14 - HM4864AP - IC15 - Toshiba TCX-1007 (64pin custom chip) - IC16 - 40pin chip covered with some kind of heatsink(?), probably TMS9929A - IC17-IC24 - 4116-3 - IC25 - AY-3-8910A - IC26 - SN74LS09N - IC29 - HD74LS145P - IC30-IC34 - M74LS367AP - IC35 - MB74LS74A - IC37 - HD74LS373P - IC38 - Toshiba TC74HCU04P - IC39 - HD74LS08P - IC40 - TA75559P - Q1 - 10687.5 - Q2 - 3579545 - CN1 - Cassette connector - CN2 - RF connector - CN3 - Audio connector - CN4 - Video connector - CN5 - Expansion connector - CN6 - Cartridge connector - CN7 - Printer connector - CN8 - Joystick 2 connector - CN9 - Joystick 1 connector - CN10 - Keyboard connector 1 - CN11 - Keyboard connector 2 - - Extra pcb (video related?) components:: - Q - 4.433619 - S - 74LS04 - L - LVA510 - - -Toshiba HX-10D - MSX1 - hx10d -Toshiba HX-10DP - MSX1 - hx10dp -Toshiba HX-10E - MSX1 - hx10e -Toshiba HX-10F - MSX1 - hx10f -Toshiba HX-10S - MSX1 - hx10s -Toshiba HX-10SA - MSX1 - hx10sa -Toshiba HX-20 - MSX1 - hx20 -Toshiba HX-20I - MSX1 - hx20i -Toshiba HX-21 - MXS1 - -hx21 -Toshiba HX-21I - MSX1 - hx21i -Toshiba HX-22 - MSX1 - hx22 -Toshiba HX-22I - MSX1 - hx22i -Toshiba HX-23 - MSX2 - hx23 -Toshiba HX-23F - MSX2 - hx23f -Toshiba HX-23I - HSX2 - hx23i -Toshiba HX-33 - MSX2 - hx33 -Toshiba HX-34 - MSX2 - hx34 -Toshiba HX-34I - MSX2 - hx34i -Toshiba FS-TM1 - MSX2 - fstm1 -Victor HC-5 - MSX1 - hc5 -Victor HC-6 - MSX1 - hc6 -*Victor HC-6AV - MSX1 -Victor HC-7 - MSX1 - hc7 -*Victor HC-7E - MSX1 -*Victor HC-7GB - MSX1 -*Victor HC-9S - MSX2 -*Victor HC-80 - MSX2 -Victor HC-90 - MSX2 - victhc90 -Victor HC-95 - MSX2 - victhc95 -Victor HC-95A - MSX2 - victhc95a -*Victor HC-95T - MSX2 -*Victor HC-95V - MSX2 -Yamaha CX5F-1 - MSX1 - cx5f1 -Yamaha CX5F-2 - MSX1 - cx5f -Yamaha CX5M - MSX1 - cx5m -Yamaha CX5MII-128 - MSX1 - cx5m128 -Yamaha CX5MII - MSX1 - cx5m2 -Yamaha CX7M - MSX2 - cx7m -Yamaha CX7M/128 - MSX2 - cx7m128 -Yamaha YIS-303 - MSX1 - yis303 -Yamaha YIS-503 - MSX1 - yis503 -Yamaha YIS-503F - MSX1 - yis503f -Yamaha YIS-503II - MSX1 - yis503ii -Yamaha YIS-503IIR (Russian) - MSX1 - y503iir -Yamaha YIS-503IIR (Estonian) - MSX1 - y503iir2 -Yamaha YIS-503M - MSX1 - yis503m -Yamaha YIS-503IIIR - MSX2 - y503iiir -Yamaha YIS-503IIIR Estonian - MSX2 - y503iiire -Yamaha YIS604 - MSX2 - yis60464 -Yamaha YIS604-128 - MSX2 - yis604 -Yamaha YIS805-128 - MSX2 - y805128 -Yamaha YIS805-128R2 - MSX2 - y805128r2 -Yamaha YIS805-128R2 Estonian - MSX2 - y805128r2e -Yamaha YIS805-256 - MSX2 - y805256 -*Yamaha YIS805-256 2+ - MSX2+ - was this a real machine? -Yashica YC-64 - MSX1 - yc64 -Yeno DPC-64 (same bios as Olympia PHC-2) -Yeno MX64 - MSX1 - mx64 -============= - -PCB Layouts missing - - -*/ +************************************************************************/ #include "emu.h" -#include "bus/centronics/ctronics.h" -#include "bus/msx_slot/slot.h" -#include "bus/msx_slot/rom.h" -#include "bus/msx_slot/ram.h" -#include "bus/msx_slot/cartridge.h" -#include "bus/msx_slot/ram_mm.h" -#include "bus/msx_slot/disk.h" -#include "bus/msx_slot/music.h" -#include "bus/msx_slot/bunsetsu.h" -#include "bus/msx_slot/fs4600.h" -#include "bus/msx_slot/panasonic08.h" -#include "bus/msx_slot/sony08.h" +#include "msx.h" #include "cpu/z80/r800.h" -#include "cpu/z80/z80.h" -#include "formats/dsk_dsk.h" -#include "formats/dmk_dsk.h" #include "formats/fmsx_cas.h" -#include "formats/msx_dsk.h" #include "hashfile.h" -#include "imagedev/cassette.h" -#include "imagedev/floppy.h" -#include "machine/i8255.h" -#include "machine/rp5c01.h" -#include "machine/buffer.h" -#include "machine/input_merger.h" -#include "machine/wd_fdc.h" -#include "msx_matsushita.h" -#include "msx_s1985.h" -#include "msx_switched.h" -#include "msx_systemflags.h" #include "screen.h" #include "softlist_dev.h" -#include "sound/ay8910.h" -#include "sound/dac.h" -#include "sound/ymopl.h" -#include "speaker.h" -#include "video/v9938.h" -#include "video/tms9928a.h" //#define VERBOSE (LOG_GENERAL) #include "logmacro.h" -namespace { - -class msx_state : public driver_device -{ -public: - msx_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_cassette(*this, "cassette") - , m_ay8910(*this, "ay8910") - , m_dac(*this, "dac") - , m_ppi(*this, "ppi8255") - , m_tms9928a(*this, "tms9928a") - , m_cent_status_in(*this, "cent_status_in") - , m_cent_ctrl_out(*this, "cent_ctrl_out") - , m_cent_data_out(*this, "cent_data_out") - , m_centronics(*this, "centronics") - , m_speaker(*this, "speaker") - , m_mainirq(*this, "mainirq") - , m_screen(*this, "screen") - , m_region_maincpu(*this, "maincpu") - , m_region_kanji(*this, "kanji") - , m_io_joy(*this, "JOY%u", 0U) - , m_io_dsw(*this, "DSW") - , m_io_mouse(*this, "MOUSE%u", 0U) - , m_io_key(*this, "KEY%u", 0U) - , m_leds(*this, "led%u", 1U) - , m_psg_b(0) - , m_kanji_latch(0) - , m_empty_slot(mconfig, *this) - , m_primary_slot(0) - , m_port_c_old(0) - , m_keylatch(0) +msx_state::msx_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_cassette(*this, "cassette") + , m_ay8910(*this, "ay8910") + , m_dac(*this, "dac") + , m_ppi(*this, "ppi8255") + , m_tms9928a(*this, "tms9928a") + , m_cent_status_in(*this, "cent_status_in") + , m_cent_ctrl_out(*this, "cent_ctrl_out") + , m_cent_data_out(*this, "cent_data_out") + , m_centronics(*this, "centronics") + , m_speaker(*this, "speaker") + , m_mainirq(*this, "mainirq") + , m_screen(*this, "screen") + , m_region_kanji(*this, "kanji") + , m_io_joy(*this, "JOY%u", 0U) + , m_io_dsw(*this, "DSW") + , m_io_mouse(*this, "MOUSE%u", 0U) + , m_io_key(*this, "KEY%u", 0U) + , m_leds(*this, "led%u", 1U) + , m_view_page0(*this, "view0") + , m_view_page1(*this, "view1") + , m_view_page2(*this, "view2") + , m_view_page3(*this, "view3") + , m_view_slot0_page0(*this, "view0_0") + , m_view_slot0_page1(*this, "view0_1") + , m_view_slot0_page2(*this, "view0_2") + , m_view_slot0_page3(*this, "view0_3") + , m_view_slot1_page0(*this, "view1_0") + , m_view_slot1_page1(*this, "view1_1") + , m_view_slot1_page2(*this, "view1_2") + , m_view_slot1_page3(*this, "view1_3") + , m_view_slot2_page0(*this, "view2_0") + , m_view_slot2_page1(*this, "view2_1") + , m_view_slot2_page2(*this, "view2_2") + , m_view_slot2_page3(*this, "view2_3") + , m_view_slot3_page0(*this, "view3_0") + , m_view_slot3_page1(*this, "view3_1") + , m_view_slot3_page2(*this, "view3_2") + , m_view_slot3_page3(*this, "view3_3") + , m_psg_b(0) + , m_mouse{0, 0} + , m_mouse_stat{0, 0} + , m_kanji_latch(0) + , m_slot_expanded{false, false, false, false} + , m_primary_slot(0) + , m_secondary_slot{0, 0, 0, 0} + , m_port_c_old(0) + , m_keylatch(0) +{ + m_view[0] = &m_view_page0; + m_view[1] = &m_view_page1; + m_view[2] = &m_view_page2; + m_view[3] = &m_view_page3; + m_exp_view[0][0] = &m_view_slot0_page0; + m_exp_view[0][1] = &m_view_slot0_page1; + m_exp_view[0][2] = &m_view_slot0_page2; + m_exp_view[0][3] = &m_view_slot0_page3; + m_exp_view[1][0] = &m_view_slot1_page0; + m_exp_view[1][1] = &m_view_slot1_page1; + m_exp_view[1][2] = &m_view_slot1_page2; + m_exp_view[1][3] = &m_view_slot1_page3; + m_exp_view[2][0] = &m_view_slot2_page0; + m_exp_view[2][1] = &m_view_slot2_page1; + m_exp_view[2][2] = &m_view_slot2_page2; + m_exp_view[2][3] = &m_view_slot2_page3; + m_exp_view[3][0] = &m_view_slot3_page0; + m_exp_view[3][1] = &m_view_slot3_page1; + m_exp_view[3][2] = &m_view_slot3_page2; + m_exp_view[3][3] = &m_view_slot3_page3; +} + +void msx_state::memory_expand_slot(int slot) +{ + if (slot < 0 || slot > 3) { - for (int prim = 0; prim < 4; prim++) - { - m_slot_expanded[prim] = false; - m_secondary_slot[prim] = 0; - for (int sec = 0; sec < 4; sec++) - { - for (int page = 0; page < 4; page++) - { - m_all_slots[prim][sec][page] = nullptr; - } - } - } - m_mouse[0] = m_mouse[1] = 0; - m_mouse_stat[0] = m_mouse_stat[1] = 0; - m_empty_slot.set_memory_space(m_maincpu, AS_PROGRAM); - m_empty_slot.set_io_space(m_maincpu, AS_IO); + fatalerror("Invalid slot %d to expand\n", slot); } + if (m_slot_expanded[slot]) + return; + + m_view_page0[slot](0x0000, 0x3fff).view(*m_exp_view[slot][0]); + m_view_page1[slot](0x4000, 0x7fff).view(*m_exp_view[slot][1]); + m_view_page2[slot](0x8000, 0xbfff).view(*m_exp_view[slot][2]); + m_view_page3[slot](0xc000, 0xffff).view(*m_exp_view[slot][3]); + m_view_page3[slot](0xffff, 0xffff).rw(FUNC(msx_state::expanded_slot_r), FUNC(msx_state::expanded_slot_w)); + for (int i = 0; i < 4; i++) + { + // Ensure that the views will exist + (*m_exp_view[slot][0])[i]; + (*m_exp_view[slot][1])[i]; + (*m_exp_view[slot][2])[i]; + (*m_exp_view[slot][3])[i]; + } + m_slot_expanded[slot] = true; +} - void hc6(machine_config &config); - void hb75d(machine_config &config); - void dpc100(machine_config &config); - void hb55p(machine_config &config); - void hotbi13p(machine_config &config); - void fspc800(machine_config &config); - void mpc200(machine_config &config); - void hb201p(machine_config &config); - void hx22i(machine_config &config); - void svi738dk(machine_config &config); - void gfc1080a(machine_config &config); - void svi738pl(machine_config &config); - void hx10dp(machine_config &config); - void perfect1(machine_config &config); - void mlf110(machine_config &config); - void cf1200(machine_config &config); - void hx20(machine_config &config); - void cf3000(machine_config &config); - void mpc100(machine_config &config); - void vg8020f(machine_config &config); - void hx10f(machine_config &config); - void cf2000(machine_config &config); - void expertpl(machine_config &config); - void fs4000a(machine_config &config); - void mpc10(machine_config &config); - void pv16(machine_config &config); - void jvchc7gb(machine_config &config); - void phc28(machine_config &config); - void hx10sa(machine_config &config); - void cx5m128(machine_config &config); - void expert10(machine_config &config); - void mbh50(machine_config &config); - void hc7(machine_config &config); - void gfc1080(machine_config &config); - void cpc51(machine_config &config); - void ax150(machine_config &config); - void phc28s(machine_config &config); - void mlfx1(machine_config &config); - void tadpc200(machine_config &config); - void gsfc200(machine_config &config); - void hx10d(machine_config &config); - void expertdp(machine_config &config); - void yis303(machine_config &config); - void canonv25(machine_config &config); - void svi738sp(machine_config &config); - void fmx(machine_config &config); - void phc2(machine_config &config); - void pv7(machine_config &config); - void hx10(machine_config &config); - void mlf48(machine_config &config); - void cpc50b(machine_config &config); - void hb10p(machine_config &config); - void hx20i(machine_config &config); - void mx10(machine_config &config); - void mx15(machine_config &config); - void expert13(machine_config &config); - void bruc100(machine_config &config); - void hx21(machine_config &config); - void cf3300(machine_config &config); - void cx5f1(machine_config &config); - void hx10e(machine_config &config); - void dpc200(machine_config &config); - void svi738(machine_config &config); - void dpc200e(machine_config &config); - void canonv10(machine_config &config); - void yis503(machine_config &config); - void mpc200sp(machine_config &config); - void svi738sw(machine_config &config); - void vg8010f(machine_config &config); - void dpc180(machine_config &config); - void mlf120(machine_config &config); - void hb201(machine_config &config); - void piopxv60(machine_config &config); - void hb10(machine_config &config); - void hb501p(machine_config &config); - void cx5m(machine_config &config); - void mx101(machine_config &config); - void mx64(machine_config &config); - void hb55d(machine_config &config); - void nms801(machine_config &config); - void svi728(machine_config &config); - void hotbi13b(machine_config &config); - void hotbit12(machine_config &config); - void hotbit11(machine_config &config); - void vg8010(machine_config &config); - void cf2700(machine_config &config); - void hx21i(machine_config &config); - void mbh2(machine_config &config); - void cx5f(machine_config &config); - void mpc64(machine_config &config); - void yc64(machine_config &config); - void yis503m(machine_config &config); - void gsfc80u(machine_config &config); - void cf2700g(machine_config &config); - void ax170(machine_config &config); - void y503iir(machine_config &config); - void svi738ar(machine_config &config); - void yis503ii(machine_config &config); - void yis503f(machine_config &config); - void cx5m2(machine_config &config); - void spc800(machine_config &config); - void canonv20(machine_config &config); - void hb20p(machine_config &config); - void mbh25(machine_config &config); - void fs4000(machine_config &config); - void hx10s(machine_config &config); - void piopx7uk(machine_config &config); - void hc5(machine_config &config); - void dgnmsx(machine_config &config); - void fdpc200(machine_config &config); - void hx22(machine_config &config); - void fs1300(machine_config &config); - void phc28l(machine_config &config); - void hb101p(machine_config &config); - void expert11(machine_config &config); - void vg802020(machine_config &config); - void tadpc20a(machine_config &config); - void hb75p(machine_config &config); - void piopx7(machine_config &config); - void canonv8(machine_config &config); - void cpc88(machine_config &config); - void vg802000(machine_config &config); - void mlf80(machine_config &config); - void cpc50a(machine_config &config); - void hb701fd(machine_config &config); - void vg8000(machine_config &config); - void hb55(machine_config &config); - void y503iir2(machine_config &config); - void fpc500(machine_config &config); - -protected: - void msx_base(machine_config &config, XTAL xtal, int cpu_divider); - template void msx1(VDPType &vdp_type, machine_config &config, bool has_cartlist = true); +void msx_state::memory_map(address_map &map) +{ + map.unmap_value_high(); - void msx1_floplist(machine_config &config); - void msx_fd1793(machine_config &config); - void msx_wd2793_force_ready(machine_config &config); - void msx_wd2793(machine_config &config); - void msx_mb8877a(machine_config &config); - void msx_tc8566af(machine_config &config); - void msx_microsol(machine_config &config); - void msx_1_35_ssdd_drive(machine_config &config); - void msx_1_35_dd_drive(machine_config &config); - void msx_2_35_dd_drive(machine_config &config); - template - uint8_t game_port_r(); + map(0x0000, 0x3fff).view(m_view_page0); + map(0x4000, 0x7fff).view(m_view_page1); + map(0x8000, 0xbfff).view(m_view_page2); + map(0xc000, 0xffff).view(m_view_page3); - // configuration helpers - void install_slot_pages(uint8_t prim, uint8_t sec, uint8_t page, uint8_t numpages, msx_internal_slot_interface &device); - template - auto &add_internal_slot(machine_config &config, T &&type, U &&tag, uint8_t prim, uint8_t sec, uint8_t page, uint8_t numpages) - { - auto &device(std::forward(type)(config, std::forward(tag), 0U)); - device.set_memory_space(m_maincpu, AS_PROGRAM); - device.set_io_space(m_maincpu, AS_IO); - device.set_start_address(page * 0x4000); - device.set_size(numpages * 0x4000); - install_slot_pages(prim, sec, page, numpages, device); - return device; - } - template - auto &add_internal_slot(machine_config &config, T &&type, U &&tag, uint8_t prim, uint8_t sec, uint8_t page, uint8_t numpages, const char *region, uint32_t offset) + // setup defaults + for (int i = 0; i < 4; i++) { - auto &device(std::forward(type)(config, std::forward(tag), 0U)); - device.set_memory_space(m_maincpu, AS_PROGRAM); - device.set_io_space(m_maincpu, AS_IO); - device.set_start_address(page * 0x4000); - device.set_size(numpages * 0x4000); - device.set_rom_start(region, offset); - install_slot_pages(prim, sec, page, numpages, device); - return device; + m_view_page0[i]; + m_view_page1[i]; + m_view_page2[i]; + m_view_page3[i]; } - template - auto &add_internal_slot_mirrored(machine_config &config, T &&type, U &&tag, uint8_t prim, uint8_t sec, uint8_t page, uint8_t numpages, const char *region, uint32_t offset) + + // Look for expanded slots + for (const auto& entry : m_internal_slots) { - // Memory mapped FDC registers are also accessible through page 2 - auto &device(type(config, std::forward(tag), 0U)); - device.set_memory_space(m_maincpu, AS_PROGRAM); - device.set_io_space(m_maincpu, AS_IO); - device.set_start_address(page * 0x4000); - device.set_size(0x4000); - device.set_rom_start(region, offset); - install_slot_pages(prim, sec, page, numpages, device); - return device; + if (entry.is_expanded) + memory_expand_slot(entry.prim); } - template - auto &add_cartridge_slot(machine_config &config, T &&type, U &&tag, uint8_t prim, uint8_t sec, V &&intf, const char *deft) + + for (const auto& entry : m_internal_slots) { - auto &device(type(config, std::forward(tag), 0U)); - device.set_memory_space(m_maincpu, AS_PROGRAM); - device.set_io_space(m_maincpu, AS_IO); - device.option_reset(); - intf(device); - device.set_default_option(deft); - device.set_fixed(false); - device.irq_handler().set("mainirq", FUNC(input_merger_device::in_w)); - install_slot_pages(prim, sec, 0, 4, device); - return device; + memory_view::memory_view_entry *view[4] = {nullptr, nullptr, nullptr, nullptr}; + for (int i = 0; i < entry.numpages; i++) + { + view[entry.page + i] = get_view(entry.page + i, entry.prim, entry.sec); + } + entry.internal_slot->install(view[0], view[1], view[2], view[3]); } +} - virtual void driver_start() override; - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void device_post_load() override; - - void sec_slot_w(uint8_t data); - uint8_t sec_slot_r(); - uint8_t kanji_r(offs_t offset); - void kanji_w(offs_t offset, uint8_t data); - void ppi_port_a_w(uint8_t data); - void ppi_port_c_w(uint8_t data); - uint8_t ppi_port_b_r(); - uint8_t mem_read(offs_t offset); - void mem_write(offs_t offset, uint8_t data); - uint8_t psg_port_a_r(); - uint8_t psg_port_b_r(); - void psg_port_a_w(uint8_t data); - void psg_port_b_w(uint8_t data); - - void msx_io_map(address_map &map); - void memory_map(address_map &map); - - required_device m_maincpu; - required_device m_cassette; - required_device m_ay8910; - required_device m_dac; - required_device m_ppi; - optional_device m_tms9928a; - required_device m_cent_status_in; - required_device m_cent_ctrl_out; - required_device m_cent_data_out; - required_device m_centronics; - required_device m_speaker; - required_device m_mainirq; - required_device m_screen; - required_memory_region m_region_maincpu; - optional_memory_region m_region_kanji; - required_ioport_array<2> m_io_joy; - required_ioport m_io_dsw; - required_ioport_array<2> m_io_mouse; - required_ioport_array<6> m_io_key; - output_finder<2> m_leds; - - static constexpr bool HAS_CARTLIST = true; - static constexpr bool NO_CARTLIST = false; - -private: - void memory_map_all(); - void memory_map_page(uint8_t page); - void memory_reset(); - void memory_init(); - - static void floppy_formats(format_registration &fr); - - INTERRUPT_GEN_MEMBER(msx_interrupt); - - // PSG - uint8_t m_psg_b = 0; - // mouse - uint16_t m_mouse[2]{}; - int8_t m_mouse_stat[2]{}; - // kanji - uint32_t m_kanji_latch = 0; - // memory - msx_internal_slot_interface m_empty_slot; - msx_internal_slot_interface *m_all_slots[4][4][4]{}; - msx_internal_slot_interface *m_current_page[4]{}; - bool m_slot_expanded[4]{}; - uint8_t m_primary_slot = 0; - uint8_t m_secondary_slot[4]{}; - uint8_t m_port_c_old = 0; - uint8_t m_keylatch = 0; -}; - - -class msx2_state : public msx_state +memory_view::memory_view_entry *msx_state::get_view(int page, int prim, int sec) { -public: - msx2_state(const machine_config &mconfig, device_type type, const char *tag) - : msx_state(mconfig, type, tag) - , m_v9938(*this, "v9938") - , m_v9958(*this, "v9958") - , m_rtc(*this, "rtc") - , m_rtc_latch(0) + switch (page) { + case 0: + return m_slot_expanded[prim] ? &(*m_exp_view[prim][0])[sec] : &m_view_page0[prim]; + case 1: + return m_slot_expanded[prim] ? &(*m_exp_view[prim][1])[sec] : &m_view_page1[prim]; + case 2: + return m_slot_expanded[prim] ? &(*m_exp_view[prim][2])[sec] : &m_view_page2[prim]; + case 3: + return m_slot_expanded[prim] ? &(*m_exp_view[prim][3])[sec] : &m_view_page3[prim]; } - - void ax350(machine_config &config); - void ax370(machine_config &config); - void canonv25(machine_config &config); - void canonv30(machine_config &config); - void canonv30f(machine_config &config); - void cpc300(machine_config &config); - void cpc300e(machine_config &config); - void cpc330k(machine_config &config); - void cpc400(machine_config &config); - void cpc400s(machine_config &config); - void cpc61(machine_config &config); - void cpg120(machine_config &config); - void fpc900(machine_config &config); - void expert20(machine_config &config); - void mbh70(machine_config &config); - void kmc5000(machine_config &config); - void mlg1(machine_config &config); - void mlg3(machine_config &config); - void mlg10(machine_config &config); - void mlg30(machine_config &config); - void fs4500(machine_config &config); - void fs4600(machine_config &config); - void fs4700(machine_config &config); - void fs5000(machine_config &config); - void fs5500f1(machine_config &config); - void fs5500f2(machine_config &config); - void fsa1(machine_config &config); - void fsa1a(machine_config &config); - void fsa1f(machine_config &config); - void fsa1fm(machine_config &config); - void fsa1mk2(machine_config &config); - void nms8220(machine_config &config); - void nms8220a(machine_config &config); - void nms8245(machine_config &config); - void nms8245f(machine_config &config); - void nms8250(machine_config &config); - void nms8250f(machine_config &config); - void nms8250j(machine_config &config); - void nms8255(machine_config &config); - void nms8255f(machine_config &config); - void nms8260(machine_config &config); - void nms8280(machine_config &config); - void nms8280f(machine_config &config); - void nms8280g(machine_config &config); - void vg8230(machine_config &config); - void vg8230j(machine_config &config); - void vg8235(machine_config &config); - void vg8235f(machine_config &config); - void vg8240(machine_config &config); - void mpc2300(machine_config &config); - void mpc2500f(machine_config &config); - void mpc25fd(machine_config &config); - void mpc27(machine_config &config); - void phc23(machine_config &config); - void phc55fd2(machine_config &config); - void phc77(machine_config &config); - void hotbit20(machine_config &config); - void hbf1(machine_config &config); - void hbf12(machine_config &config); - void hbf1xd(machine_config &config); - void hbf1xdm2(machine_config &config); - void hbf5(machine_config &config); - void hbf500(machine_config &config); - void hbf500f(machine_config &config); - void hbf500p(machine_config &config); - void hbf700d(machine_config &config); - void hbf700f(machine_config &config); - void hbf700p(machine_config &config); - void hbf700s(machine_config &config); - void hbf900(machine_config &config); - void hbf900a(machine_config &config); - void hbf9p(machine_config &config); - void hbf9pr(machine_config &config); - void hbf9s(machine_config &config); - void hbg900ap(machine_config &config); - void hbg900p(machine_config &config); - void tpc310(machine_config &config); - void tpp311(machine_config &config); - void tps312(machine_config &config); - void hx23(machine_config &config); - void hx23f(machine_config &config); - void hx23i(machine_config &config); - void hx33(machine_config &config); - void hx34(machine_config &config); - void hx34i(machine_config &config); - void fstm1(machine_config &config); - void victhc90(machine_config &config); - void victhc95(machine_config &config); - void victhc95a(machine_config &config); - void cx7m(machine_config &config); - void cx7m128(machine_config &config); - void y503iiir(machine_config &config); - void y503iiire(machine_config &config); - void yis60464(machine_config &config); - void yis604(machine_config &config); - void y805128(machine_config &config); - void y805128r2(machine_config &config); - void y805128r2e(machine_config &config); - void y805256(machine_config &config); - void expert3i(machine_config &config); - void expert3t(machine_config &config); - void expertac(machine_config &config); - void expertdx(machine_config &config); - void fsa1fx(machine_config &config); - void fsa1wsx(machine_config &config); - void fsa1wx(machine_config &config); - void fsa1wxa(machine_config &config); - void phc35j(machine_config &config); - void phc70fd(machine_config &config); - void phc70fd2(machine_config &config); - void hbf1xdj(machine_config &config); - void hbf1xv(machine_config &config); - void hbf9sp(machine_config &config); - void fsa1gt(machine_config &config); - void fsa1st(machine_config &config); - -protected: - virtual void machine_start() override; - -private: - void msx2_base(machine_config &config, bool has_cartlist = true); - void msx2(machine_config &config, bool has_cartlist = true); - void msx2_pal(machine_config &config, bool has_cartlist = true); - void msx2plus(machine_config &config); - void turbor(machine_config &config); - - void msx2_floplist(machine_config &config); - void msx2plus_floplist(machine_config &config); - void msxr_floplist(machine_config &config); - void msx_ym2413(machine_config &config); - void msx2_64kb_vram(machine_config &config); - - uint8_t rtc_reg_r(); - void rtc_reg_w(uint8_t data); - void rtc_latch_w(uint8_t data); - uint8_t switched_r(offs_t offset); - void switched_w(offs_t offset, uint8_t data); - DECLARE_WRITE_LINE_MEMBER(turbo_w); - - void msx2_io_map(address_map &map); - void msx2plus_io_map(address_map &map); - - std::vector m_switched; - - optional_device m_v9938; - optional_device m_v9958; - required_device m_rtc; - - // rtc - uint8_t m_rtc_latch = 0; -}; - - -void msx_state::memory_map(address_map &map) -{ - map(0x0000, 0xfffe).rw(FUNC(msx_state::mem_read), FUNC(msx_state::mem_write)); - map(0xffff, 0xffff).rw(FUNC(msx_state::sec_slot_r), FUNC(msx_state::sec_slot_w)); + return nullptr; } - -void msx_state::msx_io_map(address_map &map) +void msx_state::msx_base_io_map(address_map &map) { map.unmap_value_high(); map.global_mask(0xff); // 0x7c - 0x7d : MSX-MUSIC/FM-PAC write port. Handlers will be installed if MSX-MUSIC is present in a system - map(0x90, 0x90).r(m_cent_status_in, FUNC(input_buffer_device::read)); - map(0x90, 0x90).w(m_cent_ctrl_out, FUNC(output_latch_device::write)); - map(0x91, 0x91).w(m_cent_data_out, FUNC(output_latch_device::write)); + if (m_hw_def.has_printer_port()) + { + map(0x90, 0x90).r(m_cent_status_in, FUNC(input_buffer_device::read)); + map(0x90, 0x90).w(m_cent_ctrl_out, FUNC(output_latch_device::write)); + map(0x91, 0x91).w(m_cent_data_out, FUNC(output_latch_device::write)); + } map(0xa0, 0xa7).rw(m_ay8910, FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w)); + // TODO: S-3527 mirrors ac-af map(0xa8, 0xab).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)); - map(0x98, 0x99).rw(m_tms9928a, FUNC(tms9928a_device::read), FUNC(tms9928a_device::write)); +// // Sanyo optical pen interface (not emulated) +// map(0xb8, 0xbb).noprw(); map(0xd8, 0xd9).w(FUNC(msx_state::kanji_w)); map(0xd9, 0xd9).r(FUNC(msx_state::kanji_r)); // 0xfc - 0xff : Memory mapper I/O ports. I/O handlers will be installed if a memory mapper is present in a system } - -void msx2_state::msx2_io_map(address_map &map) -{ - map.unmap_value_high(); - map.global_mask(0xff); - map(0x40, 0x4f).rw(FUNC(msx2_state::switched_r), FUNC(msx2_state::switched_w)); - // 0x7c - 0x7d : MSX-MUSIC/FM-PAC write port. Handlers will be installed if MSX-MUSIC is present in a system - map(0x90, 0x90).r(m_cent_status_in, FUNC(input_buffer_device::read)); - map(0x90, 0x90).w(m_cent_ctrl_out, FUNC(output_latch_device::write)); - map(0x91, 0x91).w(m_cent_data_out, FUNC(output_latch_device::write)); - map(0xa0, 0xa7).rw(m_ay8910, FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w)); - map(0xa8, 0xab).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)); - map(0x98, 0x9b).rw(m_v9938, FUNC(v9938_device::read), FUNC(v9938_device::write)); - map(0xb4, 0xb4).w(FUNC(msx2_state::rtc_latch_w)); - map(0xb5, 0xb5).rw(FUNC(msx2_state::rtc_reg_r), FUNC(msx2_state::rtc_reg_w)); - map(0xd8, 0xd9).w(FUNC(msx2_state::kanji_w)); - map(0xd9, 0xd9).r(FUNC(msx2_state::kanji_r)); - // 0xfc - 0xff : Memory mapper I/O ports. I/O handlers will be installed if a memory mapper is present in a system -} - - -void msx2_state::msx2plus_io_map(address_map &map) +void msx_state::msx1_io_map(address_map &map) { - map.unmap_value_high(); - map.global_mask(0xff); - map(0x40, 0x4f).rw(FUNC(msx2_state::switched_r), FUNC(msx2_state::switched_w)); - // 0x7c - 0x7d : MSX-MUSIC/FM-PAC write port. Handlers will be installed if MSX-MUSIC is present in a system - map(0x90, 0x90).r(m_cent_status_in, FUNC(input_buffer_device::read)); - map(0x90, 0x90).w(m_cent_ctrl_out, FUNC(output_latch_device::write)); - map(0x91, 0x91).w(m_cent_data_out, FUNC(output_latch_device::write)); - map(0xa0, 0xa7).rw(m_ay8910, FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_data_w)); - map(0xa8, 0xab).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)); - map(0x98, 0x9b).rw(m_v9958, FUNC(v9958_device::read), FUNC(v9958_device::write)); - map(0xb4, 0xb4).w(FUNC(msx2_state::rtc_latch_w)); - map(0xb5, 0xb5).rw(FUNC(msx2_state::rtc_reg_r), FUNC(msx2_state::rtc_reg_w)); - map(0xd8, 0xd9).w(FUNC(msx2_state::kanji_w)); - map(0xd9, 0xd9).r(FUNC(msx2_state::kanji_r)); - // 0xfc - 0xff : Memory mapper I/O ports. I/O handlers will be installed if a memory mapper is present in a system + msx_base_io_map(map); + map(0x98, 0x99).rw(m_tms9928a, FUNC(tms9928a_device::read), FUNC(tms9928a_device::write)); } - void msx_state::machine_reset() { - memory_reset(); - memory_map_all(); + m_primary_slot = 0; + m_secondary_slot[0] = 0; + m_view_page0.select(0); + m_view_page1.select(0); + m_view_page2.select(0); + m_view_page3.select(0); + if (m_slot_expanded[0]) + { + m_view_slot0_page0.select(0); + m_view_slot0_page1.select(0); + m_view_slot0_page2.select(0); + m_view_slot0_page3.select(0); + } } - void msx_state::machine_start() { m_leds.resolve(); m_port_c_old = 0xff; } - -void msx2_state::machine_start() -{ - msx_state::machine_start(); - - for (msx_switched_interface &switched : device_interface_enumerator(*this)) - m_switched.push_back(&switched); - - save_item(NAME(m_rtc_latch)); -} - /* A hack to add 1 wait cycle in each opcode fetch. Possibly worth not to use custom table at all but adjust desired icount directly in m_opcodes.read_byte handler. */ -static const uint8_t cc_op[0x100] = { +static const u8 cc_op[0x100] = { 4+1,10+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1, 4+1,11+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1, 8+1,10+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1,12+1,11+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1, 7+1,10+1,16+1, 6+1, 4+1, 4+1, 7+1, 4+1, 7+1,11+1,16+1, 6+1, 4+1, 4+1, 7+1, 4+1, @@ -1174,7 +337,7 @@ static const uint8_t cc_op[0x100] = { 5+1,10+1,10+1, 4+1,10+1,11+1, 7+1,11+1, 5+1, 6+1,10+1, 4+1,10+1, 4+1, 7+1,11+1 }; -static const uint8_t cc_cb[0x100] = { +static const u8 cc_cb[0x100] = { 4+1, 4+1, 4+1, 4+1, 4+1, 4+1,11+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1,11+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1,11+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1,11+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1,11+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1,11+1, 4+1, @@ -1193,7 +356,7 @@ static const uint8_t cc_cb[0x100] = { 4+1, 4+1, 4+1, 4+1, 4+1, 4+1,11+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1,11+1, 4+1 }; -static const uint8_t cc_ed[0x100] = { +static const u8 cc_ed[0x100] = { 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, @@ -1212,7 +375,7 @@ static const uint8_t cc_ed[0x100] = { 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1, 4+1 }; -static const uint8_t cc_xy[0x100] = { +static const u8 cc_xy[0x100] = { 4+1,10+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1, 4+1,11+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1, 8+1,10+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1,12+1,11+1, 7+1, 6+1, 4+1, 4+1, 7+1, 4+1, 7+1,10+1,16+1, 6+1, 4+1, 4+1, 7+1, 4+1, 7+1,11+1,16+1, 6+1, 4+1, 4+1, 7+1, 4+1, @@ -1232,7 +395,7 @@ static const uint8_t cc_xy[0x100] = { }; /* extra cycles if jr/jp/call taken and 'interrupt latency' on rst 0-7 */ -static const uint8_t cc_ex[0x100] = { +static const u8 cc_ex[0x100] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* DJNZ */ 5, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, /* JR NZ/JR Z */ @@ -1255,14 +418,13 @@ void msx_state::driver_start() { m_maincpu->set_input_line_vector(0, 0xff); // Z80 - memory_init(); - m_maincpu->z80_set_cycle_tables(cc_op, cc_cb, cc_ed, cc_xy, nullptr, cc_ex); save_item(NAME(m_psg_b)); save_item(NAME(m_mouse)); save_item(NAME(m_mouse_stat)); save_item(NAME(m_kanji_latch)); + save_item(NAME(m_kanji_fsa1fx)); save_item(NAME(m_slot_expanded)); save_item(NAME(m_primary_slot)); save_item(NAME(m_secondary_slot)); @@ -1270,17 +432,6 @@ void msx_state::driver_start() save_item(NAME(m_keylatch)); } -void msx_state::device_post_load() -{ - for (int page = 0; page < 4; page++) - { - int slot_primary = (m_primary_slot >> (page * 2)) & 3; - int slot_secondary = (m_secondary_slot[slot_primary] >> (page * 2)) & 3; - - m_current_page[page] = m_all_slots[slot_primary][slot_secondary][page]; - } -} - INTERRUPT_GEN_MEMBER(msx_state::msx_interrupt) { m_mouse[0] = m_io_mouse[0]->read(); @@ -1289,15 +440,10 @@ INTERRUPT_GEN_MEMBER(msx_state::msx_interrupt) m_mouse_stat[1] = -1; } -/* -** The I/O functions -*/ - - -template -uint8_t msx_state::game_port_r() +template +u8 msx_state::game_port_r() { - uint8_t inp = m_io_joy[Game_port]->read(); + u8 inp = m_io_joy[Game_port]->read(); if (!(inp & 0x80)) { // joystick @@ -1306,7 +452,7 @@ uint8_t msx_state::game_port_r() else { // mouse - uint8_t data = (inp & 0x70); + u8 data = (inp & 0x70); if (m_mouse_stat[Game_port] < 0) data |= 0xf; else @@ -1315,9 +461,13 @@ uint8_t msx_state::game_port_r() } } -uint8_t msx_state::psg_port_a_r() +u8 msx_state::psg_port_a_r() { - uint8_t data = (m_cassette->input() > 0.0038 ? 0x80 : 0); + u8 data = 0x80; + if (m_cassette) + { + data = (m_cassette->input() > 0.0038 ? 0x80 : 0); + } if ((m_psg_b ^ m_io_dsw->read()) & 0x40) { @@ -1333,16 +483,16 @@ uint8_t msx_state::psg_port_a_r() return data; } -uint8_t msx_state::psg_port_b_r() +u8 msx_state::psg_port_b_r() { return m_psg_b; } -void msx_state::psg_port_a_w(uint8_t data) +void msx_state::psg_port_a_w(u8 data) { } -void msx_state::psg_port_b_w(uint8_t data) +void msx_state::psg_port_b_w(u8 data) { // Arabic or kana mode led if ((data ^ m_psg_b) & 0x80) @@ -1362,40 +512,18 @@ void msx_state::psg_port_b_w(uint8_t data) m_psg_b = data; } - -/* -** RTC functions -*/ - -void msx2_state::rtc_latch_w(uint8_t data) -{ - m_rtc_latch = data & 15; -} - -void msx2_state::rtc_reg_w(uint8_t data) -{ - m_rtc->write(m_rtc_latch, data); -} - -uint8_t msx2_state::rtc_reg_r() -{ - return m_rtc->read(m_rtc_latch); -} - - -/* -** The PPI functions -*/ - -void msx_state::ppi_port_a_w(uint8_t data) +void msx_state::ppi_port_a_w(u8 data) { m_primary_slot = data; LOG("write to primary slot select: %02x\n", m_primary_slot); - memory_map_all(); + m_view_page0.select((data >> 0) & 0x03); + m_view_page1.select((data >> 2) & 0x03); + m_view_page2.select((data >> 4) & 0x03); + m_view_page3.select((data >> 6) & 0x03); } -void msx_state::ppi_port_c_w(uint8_t data) +void msx_state::ppi_port_c_w(u8 data) { m_keylatch = data & 0x0f; @@ -1408,165 +536,221 @@ void msx_state::ppi_port_c_w(uint8_t data) m_dac->write(BIT(data, 7)); // cassette motor on/off - if (BIT(m_port_c_old ^ data, 4)) + if (BIT(m_port_c_old ^ data, 4) && m_cassette) m_cassette->change_state(BIT(data, 4) ? CASSETTE_MOTOR_DISABLED : CASSETTE_MOTOR_ENABLED, CASSETTE_MASK_MOTOR); // cassette signal write - if (BIT(m_port_c_old ^ data, 5)) + if (BIT(m_port_c_old ^ data, 5) && m_cassette) m_cassette->output(BIT(data, 5) ? -1.0 : 1.0); m_port_c_old = data; } -uint8_t msx_state::ppi_port_b_r() +u8 msx_state::ppi_port_b_r() { - uint8_t result = 0xff; + u8 result = 0xff; if (m_keylatch <= 10) { - uint16_t data = m_io_key[m_keylatch / 2]->read(); - - if (BIT(m_keylatch, 0)) - data >>= 8; - result = data & 0xff; + return m_io_key[m_keylatch]->read(); } return result; } -/************************************************************************ - * - * New memory emulation !! - * - ***********************************************************************/ +void msx_state::expanded_slot_w(u8 data) +{ + const int slot = (m_primary_slot >> 6) & 0x03; + m_secondary_slot[slot] = data; + LOG("write to expanded slot select: %02x\n", data); + m_exp_view[slot][0]->select((data >> 0) & 0x03); + m_exp_view[slot][1]->select((data >> 2) & 0x03); + m_exp_view[slot][2]->select((data >> 4) & 0x03); + m_exp_view[slot][3]->select((data >> 6) & 0x03); +} -void msx_state::install_slot_pages(uint8_t prim, uint8_t sec, uint8_t page, uint8_t numpages, msx_internal_slot_interface &device) +u8 msx_state::expanded_slot_r() { - for (int i = page; i < std::min(page + numpages, 4); i++) - { - m_all_slots[prim][sec][i] = &device; - } - if (sec) - { - m_slot_expanded[prim] = true; - } + const int slot = (m_primary_slot >> 6) & 0x03; + return ~m_secondary_slot[slot]; } -void msx_state::memory_init() +u8 msx_state::kanji_r(offs_t offset) { - int count_populated_pages = 0; + u8 result = 0xff; - // Populate all unpopulated slots with the dummy interface - for (auto & elem : m_all_slots) + if (m_region_kanji) { - for (int sec = 0; sec < 4; sec++) + u32 latch = m_kanji_fsa1fx ? bitswap<17>(m_kanji_latch, 4, 3, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 2, 1, 0) : m_kanji_latch; + result = m_region_kanji->as_u8(latch); + + if (!machine().side_effects_disabled()) { - for (int page = 0; page < 4; page++) - { - if (elem[sec][page] == nullptr) - { - elem[sec][page] = &m_empty_slot; - } - else - { - count_populated_pages++; - } - } + m_kanji_latch = (m_kanji_latch & ~0x1f) | ((m_kanji_latch + 1) & 0x1f); } } + return result; +} - if (count_populated_pages == 0) { - fatalerror("No msx slot layout defined for this system!\n"); - } +void msx_state::kanji_w(offs_t offset, u8 data) +{ + if (offset) + m_kanji_latch = (m_kanji_latch & 0x007e0) | ((data & 0x3f) << 11); + else + m_kanji_latch = (m_kanji_latch & 0x1f800) | ((data & 0x3f) << 5); } -void msx_state::memory_reset() +void msx_state::msx_base(ay8910_type ay8910_type, machine_config &config, XTAL xtal, int cpu_divider) { - m_primary_slot = 0; + // basic machine hardware + Z80(config, m_maincpu, xtal / cpu_divider); // 3.579545 MHz + m_maincpu->set_addrmap(AS_PROGRAM, &msx_state::memory_map); + config.set_maximum_quantum(attotime::from_hz(60)); + + INPUT_MERGER_ANY_HIGH(config, m_mainirq).output_handler().set_inputline("maincpu", INPUT_LINE_IRQ0); + + I8255(config, m_ppi); + m_ppi->out_pa_callback().set(FUNC(msx_state::ppi_port_a_w)); + m_ppi->in_pb_callback().set(FUNC(msx_state::ppi_port_b_r)); + m_ppi->out_pc_callback().set(FUNC(msx_state::ppi_port_c_w)); - for (auto & elem : m_secondary_slot) + // Video hardware + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + + // sound hardware + SPEAKER(config, m_speaker).front_center(); + DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, m_speaker, 0.1); + + if (ay8910_type == SND_AY8910) + AY8910(config, m_ay8910, xtal / cpu_divider / 2); + if (ay8910_type == SND_YM2149) + YM2149(config, m_ay8910, xtal / cpu_divider / 2); + m_ay8910->set_flags(AY8910_SINGLE_OUTPUT); + m_ay8910->port_a_read_callback().set(FUNC(msx2_base_state::psg_port_a_r)); + m_ay8910->port_b_read_callback().set(FUNC(msx2_base_state::psg_port_b_r)); + m_ay8910->port_a_write_callback().set(FUNC(msx2_base_state::psg_port_a_w)); + m_ay8910->port_b_write_callback().set(FUNC(msx2_base_state::psg_port_b_w)); + m_ay8910->add_route(ALL_OUTPUTS, m_speaker, 0.3); + + if (m_hw_def.has_printer_port()) + { + // printer + CENTRONICS(config, m_centronics, centronics_devices, "printer"); + m_centronics->busy_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit1)); + + OUTPUT_LATCH(config, m_cent_data_out); + m_centronics->set_output_latch(*m_cent_data_out); + INPUT_BUFFER(config, m_cent_status_in); + + OUTPUT_LATCH(config, m_cent_ctrl_out); + m_cent_ctrl_out->bit_handler<1>().set(m_centronics, FUNC(centronics_device::write_strobe)); + } + + if (m_hw_def.has_cassette()) { - elem = 0; + // cassette + CASSETTE(config, m_cassette); + m_cassette->set_formats(fmsx_cassette_formats); + m_cassette->set_default_state(CASSETTE_PLAY); + m_cassette->add_route(ALL_OUTPUTS, m_speaker, 0.05); + m_cassette->set_interface("msx_cass"); } } -void msx_state::memory_map_page(uint8_t page) +void msx_state::msx1_add_softlists(machine_config &config) { - int slot_primary = (m_primary_slot >> (page * 2)) & 3; - int slot_secondary = (m_secondary_slot[slot_primary] >> (page * 2)) & 3; + if (m_hw_def.has_cassette()) + SOFTWARE_LIST(config, "cass_list").set_original("msx1_cass"); + + if (m_hw_def.has_cartslot()) + SOFTWARE_LIST(config, "cart_list").set_original("msx1_cart"); - m_current_page[page] = m_all_slots[slot_primary][slot_secondary][page]; + if (m_hw_def.has_fdc()) + SOFTWARE_LIST(config, "flop_list").set_original("msx1_flop"); } -void msx_state::memory_map_all() +void msx_state::msx1(vdp_type vdp_type, ay8910_type ay8910_type, machine_config &config) { - for (uint8_t i = 0; i < 4; i++) - memory_map_page(i); + msx_base(ay8910_type, config, 10.738635_MHz_XTAL, 3); + + m_maincpu->set_addrmap(AS_IO, &msx_state::msx1_io_map); + m_maincpu->set_vblank_int("screen", FUNC(msx_state::msx_interrupt)); /* Needed for mouse updates */ + + if (vdp_type == VDP_TMS9118) + TMS9118(config, m_tms9928a, 10.738635_MHz_XTAL); + if (vdp_type == VDP_TMS9128) + TMS9128(config, m_tms9928a, 10.738635_MHz_XTAL); + if (vdp_type == VDP_TMS9129) + TMS9129(config, m_tms9928a, 10.738635_MHz_XTAL); + if (vdp_type == VDP_TMS9918) + TMS9918(config, m_tms9928a, 10.738635_MHz_XTAL); + if (vdp_type == VDP_TMS9918A) + TMS9918A(config, m_tms9928a, 10.738635_MHz_XTAL); + if (vdp_type == VDP_TMS9928A) + TMS9928A(config, m_tms9928a, 10.738635_MHz_XTAL); + if (vdp_type == VDP_TMS9929A) + TMS9929A(config, m_tms9928a, 10.738635_MHz_XTAL); + m_tms9928a->set_screen(m_screen); + m_tms9928a->set_vram_size(0x4000); + m_tms9928a->int_callback().set(m_mainirq, FUNC(input_merger_device::in_w<0>)); + + // Software lists + msx1_add_softlists(config); } -uint8_t msx_state::mem_read(offs_t offset) +void msx2_base_state::msx2_base_io_map(address_map &map) { - return m_current_page[offset >> 14]->read(offset); + msx_base_io_map(map); + map(0x40, 0x4f).rw(FUNC(msx2_base_state::switched_r), FUNC(msx2_base_state::switched_w)); + map(0xb4, 0xb4).w(FUNC(msx2_base_state::rtc_latch_w)); + map(0xb5, 0xb5).rw(FUNC(msx2_base_state::rtc_reg_r), FUNC(msx2_base_state::rtc_reg_w)); } -void msx_state::mem_write(offs_t offset, uint8_t data) +void msx2_base_state::msx2_io_map(address_map &map) { - m_current_page[offset >> 14]->write(offset, data); + msx2_base_io_map(map); + // TODO: S-1985 mirrors 9c-9f + map(0x98, 0x9b).rw(m_v9938, FUNC(v9938_device::read), FUNC(v9938_device::write)); } -void msx_state::sec_slot_w(uint8_t data) +void msx2_base_state::msx2plus_io_map(address_map &map) { - int slot = m_primary_slot >> 6; - if (m_slot_expanded[slot]) - { - LOG("write to secondary slot %d select: %02x\n", slot, data); - - m_secondary_slot[slot] = data; - memory_map_all(); - } - else - m_current_page[3]->write(0xffff, data); + msx2_base_io_map(map); + // TODO: S-1985 mirrors 9c-9f + map(0x98, 0x9b).rw(m_v9958, FUNC(v9958_device::read), FUNC(v9958_device::write)); } -uint8_t msx_state::sec_slot_r() +void msx2_base_state::machine_start() { - int slot = m_primary_slot >> 6; + msx_state::machine_start(); - if (m_slot_expanded[slot]) - { - return ~m_secondary_slot[slot]; - } - else - { - return m_current_page[3]->read(0xffff); - } + for (msx_switched_interface &switched : device_interface_enumerator(*this)) + m_switched.push_back(&switched); + + save_item(NAME(m_rtc_latch)); } -uint8_t msx_state::kanji_r(offs_t offset) -{ - uint8_t result = 0xff; +/* +** RTC functions +*/ - if (m_region_kanji) - { - uint32_t latch = m_kanji_latch; - result = m_region_kanji->as_u8(latch++); +void msx2_base_state::rtc_latch_w(u8 data) +{ + m_rtc_latch = data & 15; +} - m_kanji_latch &= ~0x1f; - m_kanji_latch |= latch & 0x1f; - } - return result; +void msx2_base_state::rtc_reg_w(u8 data) +{ + m_rtc->write(m_rtc_latch, data); } -void msx_state::kanji_w(offs_t offset, uint8_t data) +u8 msx2_base_state::rtc_reg_r() { - if (offset) - m_kanji_latch = (m_kanji_latch & 0x007E0) | ((data & 0x3f) << 11); - else - m_kanji_latch = (m_kanji_latch & 0x1f800) | ((data & 0x3f) << 5); + return m_rtc->read(m_rtc_latch); } -uint8_t msx2_state::switched_r(offs_t offset) +u8 msx2_base_state::switched_r(offs_t offset) { - uint8_t data = 0xff; + u8 data = 0xff; for (int i = 0; i < m_switched.size(); i++) { @@ -1576,7 +760,7 @@ uint8_t msx2_state::switched_r(offs_t offset) return data; } -void msx2_state::switched_w(offs_t offset, uint8_t data) +void msx2_base_state::switched_w(offs_t offset, u8 data) { for (int i = 0; i < m_switched.size(); i++) { @@ -1584,862 +768,125 @@ void msx2_state::switched_w(offs_t offset, uint8_t data) } } +// Some MSX2+ can switch the z80 clock between 3.5 and 5.3 MHz +WRITE_LINE_MEMBER(msx2_base_state::turbo_w) +{ + // 0 - 5.369317 MHz + // 1 - 3.579545 MHz + m_maincpu->set_unscaled_clock(21.477272_MHz_XTAL / (state ? 6 : 4)); +} -static INPUT_PORTS_START(msx_dips) - PORT_START("JOY0") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_DIPNAME(0x80, 0, "Game port 1") - PORT_DIPSETTING(0x00, DEF_STR(Joystick)) - PORT_DIPSETTING(0x80, "Mouse") - - PORT_START("JOY1") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(2) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) - PORT_DIPNAME(0x80, 0, "Game port 2") - PORT_DIPSETTING(0x00, DEF_STR(Joystick)) - PORT_DIPSETTING(0x80, "Mouse") - - PORT_START("DSW") - PORT_DIPNAME(0x40, 0, "Swap game port 1 and 2") - PORT_DIPSETTING(0, DEF_STR(No)) - PORT_DIPSETTING(0x40, DEF_STR(Yes)) +void msx2_base_state::msx_ym2413(machine_config &config) +{ + YM2413(config, "ym2413", 21.477272_MHz_XTAL / 6).add_route(ALL_OUTPUTS, m_speaker, 0.4); +} - PORT_START("MOUSE0") - PORT_BIT(0xff00, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) - PORT_BIT(0x00ff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) +void msx2_base_state::msx2_64kb_vram(machine_config &config) +{ + m_v9938->set_vram_size(0x10000); +} - PORT_START("MOUSE1") - PORT_BIT(0xff00, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(2) - PORT_BIT(0x00ff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(2) -INPUT_PORTS_END +void msx2_base_state::msx2_add_softlists(machine_config &config) +{ + if (m_hw_def.has_cassette()) + { + SOFTWARE_LIST(config, "cass_list").set_original("msx2_cass"); + SOFTWARE_LIST(config, "msx1_cass_list").set_compatible("msx1_cass"); + } + if (m_hw_def.has_cartslot()) + { + SOFTWARE_LIST(config, "cart_list").set_original("msx2_cart"); + SOFTWARE_LIST(config, "msx1_cart_list").set_compatible("msx1_cart"); + } -/* 2008-05 FP: About keyboards - -Even if some later Philips (and maybe others) models started to use a layout similar to current -PC keyboards, common MSX keyboards have a couple of keys which do not fit usual mapping -- the key in the 1st row before 'Backspace', 3rd key from '0', here re-mapped to KEYCODE_BACKSLASH2 -- the last key in the 4th row, 4th key from 'M' (not counting Shift), here re-mapped to KEYCODE_TILDE - -These keys corresponds to the following symbols - - input_port | msx | msxuk | msxjp | msxkr |hotbit |expert | - ------------------------------------------------------------- - BACKSLASH2 | \ | | \ | | ? | | won | | \ ^ | { } | - ------------------------------------------------------------- - TILDE | DK* | DK* | _ | _ | < > | / ? | - -* DK = "Dead Key" -Notice that 'expert' input_ports covers both versions 1.0 and 1.1. -msx2 input_ports have the same symbols as their msx counterparts. - -TO DO: -- check Expert 1.0 layout with the real thing -- check Korean layout -- fix natural support in systems using msx inputs but with different mapping -(these systems could have different uses for keys mapped at the following -locations: COLON, QUOTE, BACKSLASH, OPENBRACE, CLOSEBRACE, BACKSLASH2, TILDE. -The corresponding symbols would not work properly in -natural mode). - -Additional note about natural keyboard support: currently, -- "Graph" is mapped to 'F6' (this key could be labeled "L Graph") -- "Code" is mapped to 'F7' (this key could be labeled "R Graph", "Kana" or "Hangul") -- "Stop" is mapped to 'F8' -- "Select" is mapped to 'F9' -*/ - -#define KEYB_ROW0 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') - -#define KEYB_EXPERT11_ROW0 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') - -#define KEYB_HOTBIT_ROW0 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('"') \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') - -#define KEYB_ROW1 \ - PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') \ - PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') \ - PORT_BIT(0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') \ - PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') \ - PORT_BIT(0x1000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\\') PORT_CHAR('|') \ - PORT_BIT(0x2000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') \ - PORT_BIT(0x4000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') \ - PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') - -#define KEYB_HOTBIT_ROW1 \ - PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') \ - PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') \ - PORT_BIT(0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') \ - PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') \ - PORT_BIT(0x1000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\\') PORT_CHAR('^') \ - PORT_BIT(0x2000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('\'') PORT_CHAR('`') \ - PORT_BIT(0x4000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('"') PORT_CHAR('`') \ - PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xC7) PORT_CHAR(0xE7) - -#define KEYB_EXPERT11_ROW1 \ - PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('\'') \ - PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') \ - PORT_BIT(0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') \ - PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') \ - PORT_BIT(0x1000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('{') PORT_CHAR('}') \ - PORT_BIT(0x2000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('\'') PORT_CHAR('`') \ - PORT_BIT(0x4000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR(']') \ - PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('~') PORT_CHAR('^') - -#define KEYB_ROW2 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('`') PORT_CHAR('~') \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Dead Key") PORT_CODE(KEYCODE_TILDE) \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') - -#define KEYB_HOTBIT_ROW2 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('~') PORT_CHAR('^') \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('[') PORT_CHAR(']') \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';') \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':') \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('<') PORT_CHAR('>') \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') - -#define KEYB_EXPERT10_ROW2 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(0xC7) PORT_CHAR(0xE7) \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Dead Key") PORT_CODE(KEYCODE_TILDE) \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') - -#define KEYB_EXPERT11_ROW2 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('*') PORT_CHAR('@') \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xC7) PORT_CHAR(0xE7) \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('/') PORT_CHAR('?') \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR(';') PORT_CHAR(':') \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') - -#define KEYB_ROW3 \ - PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') \ - PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') \ - PORT_BIT(0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') \ - PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') \ - PORT_BIT(0x1000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') \ - PORT_BIT(0x2000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') \ - PORT_BIT(0x4000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') \ - PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') - -#define KEYB_ROW4 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') - -#define KEYB_ROW5 \ - PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') \ - PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') \ - PORT_BIT(0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') \ - PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') \ - PORT_BIT(0x1000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') \ - PORT_BIT(0x2000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') \ - PORT_BIT(0x4000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') \ - PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') - -#define KEYB_ROW6 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPH") PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(F6)) \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CODE") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F7)) \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1 F6") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2 F7") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3 F8") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) - -#define KEYB_EXPERT11_ROW6 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CONTROL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L GRA") PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(F6)) \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS LOCK") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R GRA") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F7)) \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1 F6") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2 F7") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3 F8") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) - -#define KEYB_ROW7 \ - PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4 F9") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) \ - PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5 F10") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) \ - PORT_BIT(0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) \ - PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') \ - PORT_BIT(0x1000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("STOP") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(F8)) \ - PORT_BIT(0x2000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) \ - PORT_BIT(0x4000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SELECT") PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(F9)) \ - PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) - -#define KEYB_ROW8 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL)) \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) - -#define KEYB_ROW9 \ - PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) \ - PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) \ - PORT_BIT(0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) \ - PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) \ - PORT_BIT(0x1000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) \ - PORT_BIT(0x2000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) \ - PORT_BIT(0x4000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) \ - PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) - -#define KEYB_ROW10 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(COMMA_PAD)) \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) - -static INPUT_PORTS_START(msx) - PORT_START("KEY0") - KEYB_ROW0 - KEYB_ROW1 - - PORT_START("KEY1") - KEYB_ROW2 - KEYB_ROW3 - - PORT_START("KEY2") - KEYB_ROW4 - KEYB_ROW5 - - PORT_START("KEY3") - KEYB_ROW6 - KEYB_ROW7 - - PORT_START("KEY4") - KEYB_ROW8 - PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("KEY5") - PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_INCLUDE(msx_dips) -INPUT_PORTS_END - -#ifdef UNREFERENCED_CODE -static INPUT_PORTS_START(msxuk) - PORT_START("KEY0") - KEYB_ROW0 - KEYB_ROW1 - - PORT_START("KEY1") - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(0xA3) PORT_CHAR('~') - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Dead Key") PORT_CODE(KEYCODE_TILDE) - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') - KEYB_ROW3 - - PORT_START("KEY2") - KEYB_ROW4 - KEYB_ROW5 - - PORT_START("KEY3") - KEYB_ROW6 - KEYB_ROW7 - - PORT_START("KEY4") - KEYB_ROW8 - PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("KEY5") - PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_INCLUDE(msx_dips) -INPUT_PORTS_END -#endif - -#define KEYB_JP_ROW0 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') - -#define KEYB_JP_ROW1 \ - PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') \ - PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') \ - PORT_BIT(0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') \ - PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CHAR('~') \ - PORT_BIT(0x1000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR(0xA5) PORT_CHAR('|') \ - PORT_BIT(0x2000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') \ - PORT_BIT(0x4000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR('{') \ - PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') - -#define KEYB_KR_ROW1 \ - PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') \ - PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') \ - PORT_BIT(0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') \ - PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CHAR('~') \ - PORT_BIT(0x1000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xE2\x82\xA9 |") PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR(0xffe6) PORT_CHAR('|') \ - PORT_BIT(0x2000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') \ - PORT_BIT(0x4000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR('{') \ - PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') - -#define KEYB_JP_ROW2 \ - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') \ - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}') \ - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') \ - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') \ - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') \ - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("_") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('_') \ - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') \ - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') - -static INPUT_PORTS_START(msxjp) - PORT_START("KEY0") - KEYB_JP_ROW0 - KEYB_JP_ROW1 - - PORT_START("KEY1") - KEYB_JP_ROW2 - KEYB_ROW3 - - PORT_START("KEY2") - KEYB_ROW4 - KEYB_ROW5 - - PORT_START("KEY3") - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPH") PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(F6)) - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KANA") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F7)) - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1 F6") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2 F7") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3 F8") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) - KEYB_ROW7 - - PORT_START("KEY4") - KEYB_ROW8 - PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("KEY5") - PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_INCLUDE(msx_dips) -INPUT_PORTS_END - -static INPUT_PORTS_START(msxkr) - PORT_START("KEY0") - KEYB_JP_ROW0 - KEYB_KR_ROW1 - - PORT_START("KEY1") - KEYB_JP_ROW2 - KEYB_ROW3 - - PORT_START("KEY2") - KEYB_ROW4 - KEYB_ROW5 - - PORT_START("KEY3") - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPH") PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(F6)) - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Hangul") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F7)) - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1 F6") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2 F7") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3 F8") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) - KEYB_ROW7 - - PORT_START("KEY4") - KEYB_ROW8 - PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("KEY5") - PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_INCLUDE(msx_dips) -INPUT_PORTS_END - -static INPUT_PORTS_START(hotbit) - PORT_START("KEY0") - KEYB_HOTBIT_ROW0 - KEYB_HOTBIT_ROW1 - - PORT_START("KEY1") - KEYB_HOTBIT_ROW2 - KEYB_ROW3 - - PORT_START("KEY2") - KEYB_ROW4 - KEYB_ROW5 - - PORT_START("KEY3") - KEYB_ROW6 - KEYB_ROW7 - - PORT_START("KEY4") - KEYB_ROW8 - PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("KEY5") - PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_INCLUDE(msx_dips) -INPUT_PORTS_END - -/* 2008-05 FP: I guess these belong to the keypad */ -#define KEYB_EXPERT11_ROW9 \ - PORT_BIT(0x0100, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) \ - PORT_BIT(0x0200, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) \ - PORT_BIT(0x0400, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) \ - PORT_BIT(0x0800, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) \ - PORT_BIT(0xf000, IP_ACTIVE_LOW, IPT_UNUSED) - -static INPUT_PORTS_START(expert11) - PORT_START("KEY0") - KEYB_EXPERT11_ROW0 - KEYB_EXPERT11_ROW1 - - PORT_START("KEY1") - KEYB_EXPERT11_ROW2 - KEYB_ROW3 - - PORT_START("KEY2") - KEYB_ROW4 - KEYB_ROW5 - - PORT_START("KEY3") - KEYB_EXPERT11_ROW6 - KEYB_ROW7 - - PORT_START("KEY4") - KEYB_ROW8 - KEYB_EXPERT11_ROW9 - - PORT_START("KEY5") - PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_INCLUDE(msx_dips) -INPUT_PORTS_END - -static INPUT_PORTS_START(expert10) - PORT_START("KEY0") - KEYB_ROW0 - KEYB_ROW1 - - PORT_START("KEY1") - KEYB_EXPERT10_ROW2 - KEYB_ROW3 - - PORT_START("KEY2") - KEYB_ROW4 - KEYB_ROW5 - - PORT_START("KEY3") - KEYB_EXPERT11_ROW6 - KEYB_ROW7 - - PORT_START("KEY4") - KEYB_ROW8 - KEYB_EXPERT11_ROW9 - - PORT_START("KEY5") - PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_INCLUDE(msx_dips) -INPUT_PORTS_END - -static INPUT_PORTS_START(msx2) - PORT_START("KEY0") - KEYB_ROW0 - KEYB_ROW1 - - PORT_START("KEY1") - KEYB_ROW2 - KEYB_ROW3 - - PORT_START("KEY2") - KEYB_ROW4 - KEYB_ROW5 - - PORT_START("KEY3") - KEYB_ROW6 - KEYB_ROW7 - - PORT_START("KEY4") - KEYB_ROW8 - KEYB_ROW9 - - PORT_START("KEY5") - KEYB_ROW10 - - PORT_INCLUDE(msx_dips) -INPUT_PORTS_END - -static INPUT_PORTS_START(msx2jp) - PORT_START("KEY0") - KEYB_JP_ROW0 - KEYB_JP_ROW1 - - PORT_START("KEY1") - KEYB_JP_ROW2 - KEYB_ROW3 - - PORT_START("KEY2") - KEYB_ROW4 - KEYB_ROW5 - - PORT_START("KEY3") - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPH") PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(F6)) - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KANA") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F7)) - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1 F6") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2 F7") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3 F8") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) - KEYB_ROW7 - - PORT_START("KEY4") - KEYB_ROW8 - KEYB_ROW9 - - PORT_START("KEY5") - KEYB_ROW10 - - PORT_INCLUDE(msx_dips) -INPUT_PORTS_END - -static INPUT_PORTS_START(msx2kr) - PORT_START("KEY0") - KEYB_JP_ROW0 - KEYB_KR_ROW1 - - PORT_START("KEY1") - KEYB_JP_ROW2 - KEYB_ROW3 - - PORT_START("KEY2") - KEYB_ROW4 - KEYB_ROW5 - - PORT_START("KEY3") - PORT_BIT(0x0001, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT(0x0002, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) - PORT_BIT(0x0004, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPH") PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(F6)) - PORT_BIT(0x0008, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) - PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Hangul") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F7)) - PORT_BIT(0x0020, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1 F6") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) - PORT_BIT(0x0040, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2 F7") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) - PORT_BIT(0x0080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3 F8") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) - KEYB_ROW7 - - PORT_START("KEY4") - KEYB_ROW8 - PORT_BIT(0xff00, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_START("KEY5") - PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNUSED) - - PORT_INCLUDE(msx_dips) -INPUT_PORTS_END - - -// Some MSX2+ can switch the z80 clock between 3.5 and 5.3 MHz -WRITE_LINE_MEMBER(msx2_state::turbo_w) -{ - // 0 - 5.369317 MHz - // 1 - 3.579545 MHz - m_maincpu->set_unscaled_clock(21.477272_MHz_XTAL / (state ? 6 : 4)); -} - - -#define MSX_XBORDER_PIXELS 15 -#define MSX_YBORDER_PIXELS 27 -#define MSX_TOTAL_XRES_PIXELS 256 + (MSX_XBORDER_PIXELS * 2) -#define MSX_TOTAL_YRES_PIXELS 192 + (MSX_YBORDER_PIXELS * 2) -#define MSX_VISIBLE_XBORDER_PIXELS 8 -#define MSX_VISIBLE_YBORDER_PIXELS 24 - - -void msx_state::msx1_floplist(machine_config &config) -{ - SOFTWARE_LIST(config, "flop_list").set_original("msx1_flop"); -} - -void msx2_state::msx2_floplist(machine_config &config) -{ - SOFTWARE_LIST(config, "flop_list").set_original("msx2_flop"); - SOFTWARE_LIST(config, "msx1_flp_l").set_compatible("msx1_flop"); -} - -void msx2_state::msx2plus_floplist(machine_config &config) -{ - SOFTWARE_LIST(config, "flop_list").set_original("msx2p_flop"); - SOFTWARE_LIST(config, "msx2_flp_l").set_compatible("msx2_flop"); - SOFTWARE_LIST(config, "msx1_flp_l").set_compatible("msx1_flop"); // maybe not? -} - -void msx2_state::msxr_floplist(machine_config &config) -{ - SOFTWARE_LIST(config, "flop_list").set_original("msxr_flop"); - SOFTWARE_LIST(config, "msx2p_flp_l").set_compatible("msx2p_flop"); - SOFTWARE_LIST(config, "msx2_flp_l").set_compatible("msx2_flop"); // maybe not? - SOFTWARE_LIST(config, "msx1_flp_l").set_compatible("msx1_flop"); // maybe not? -} - -void msx_state::floppy_formats(format_registration &fr) -{ - fr.add_mfm_containers(); - fr.add(FLOPPY_MSX_FORMAT); - fr.add(FLOPPY_DMK_FORMAT); -} - -static void msx_floppies(device_slot_interface &device) -{ - device.option_add("35dd", FLOPPY_35_DD); - device.option_add("35ssdd", FLOPPY_35_SSDD); -} - -void msx_state::msx_fd1793(machine_config &config) -{ - fd1793_device& fdc(FD1793(config, "fdc", 4_MHz_XTAL / 4)); - fdc.set_force_ready(true); -} - -void msx_state::msx_wd2793_force_ready(machine_config &config) -{ - // From NMS8245 schematics: - // READY + HLT - pulled high - // SSO/-ENMF + -DDEN + ENP + -5/8 - pulled low - wd2793_device& fdc(WD2793(config, "fdc", 4_MHz_XTAL / 4)); - fdc.set_force_ready(true); -} - -void msx_state::msx_wd2793(machine_config &config) -{ - WD2793(config, "fdc", 4_MHz_XTAL / 4); -} - -void msx_state::msx_mb8877a(machine_config & config) -{ - // From CF-3300 FDC schematic: - // READY + HLT - pulled high - // -DDEN - pulled low - mb8877_device& fdc(MB8877(config, "fdc", 4_MHz_XTAL / 4)); - fdc.set_force_ready(true); -} - -void msx_state::msx_tc8566af(machine_config &config) -{ - TC8566AF(config, "fdc", 16'000'000); -} - -void msx_state::msx_microsol(machine_config &config) -{ - wd2793_device& fdc(WD2793(config, "fdc", 4_MHz_XTAL / 4)); - fdc.set_force_ready(true); -} - -void msx_state::msx_1_35_ssdd_drive(machine_config &config) -{ - FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35ssdd", msx_state::floppy_formats); -} - -void msx_state::msx_1_35_dd_drive(machine_config &config) -{ - FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35dd", msx_state::floppy_formats); -} - -void msx_state::msx_2_35_dd_drive(machine_config &config) -{ - FLOPPY_CONNECTOR(config, "fdc:0", msx_floppies, "35dd", msx_state::floppy_formats); - FLOPPY_CONNECTOR(config, "fdc:1", msx_floppies, "35dd", msx_state::floppy_formats); -} - -void msx2_state::msx_ym2413(machine_config &config) -{ - YM2413(config, "ym2413", 21.477272_MHz_XTAL / 6).add_route(ALL_OUTPUTS, m_speaker, 0.4); -} - -void msx2_state::msx2_64kb_vram(machine_config &config) -{ - m_v9938->set_vram_size(0x10000); + if (m_hw_def.has_fdc()) + { + SOFTWARE_LIST(config, "flop_list").set_original("msx2_flop"); + SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop"); + } } -void msx_state::msx_base(machine_config &config, XTAL xtal, int cpu_divider) +void msx2_base_state::msx2plus_add_softlists(machine_config &config) { - // basic machine hardware - Z80(config, m_maincpu, xtal / cpu_divider); // 3.579545 MHz - m_maincpu->set_addrmap(AS_PROGRAM, &msx_state::memory_map); - config.set_maximum_quantum(attotime::from_hz(60)); - - INPUT_MERGER_ANY_HIGH(config, m_mainirq).output_handler().set_inputline("maincpu", INPUT_LINE_IRQ0); - - I8255(config, m_ppi); - m_ppi->out_pa_callback().set(FUNC(msx_state::ppi_port_a_w)); - m_ppi->in_pb_callback().set(FUNC(msx_state::ppi_port_b_r)); - m_ppi->out_pc_callback().set(FUNC(msx_state::ppi_port_c_w)); - - // Video hardware - SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - - // sound hardware - SPEAKER(config, m_speaker).front_center(); - DAC_1BIT(config, m_dac, 0).add_route(ALL_OUTPUTS, m_speaker, 0.1); - - AY8910(config, m_ay8910, xtal / cpu_divider / 2); - m_ay8910->set_flags(AY8910_SINGLE_OUTPUT); - m_ay8910->port_a_read_callback().set(FUNC(msx2_state::psg_port_a_r)); - m_ay8910->port_b_read_callback().set(FUNC(msx2_state::psg_port_b_r)); - m_ay8910->port_a_write_callback().set(FUNC(msx2_state::psg_port_a_w)); - m_ay8910->port_b_write_callback().set(FUNC(msx2_state::psg_port_b_w)); - m_ay8910->add_route(ALL_OUTPUTS, m_speaker, 0.3); - - // printer - CENTRONICS(config, m_centronics, centronics_devices, "printer"); - m_centronics->busy_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit1)); - - OUTPUT_LATCH(config, m_cent_data_out); - m_centronics->set_output_latch(*m_cent_data_out); - INPUT_BUFFER(config, m_cent_status_in); + if (m_hw_def.has_cassette()) + { + SOFTWARE_LIST(config, "cass_list").set_original("msx2_cass"); + SOFTWARE_LIST(config, "msx1_cass_list").set_compatible("msx1_cass"); + } - OUTPUT_LATCH(config, m_cent_ctrl_out); - m_cent_ctrl_out->bit_handler<1>().set(m_centronics, FUNC(centronics_device::write_strobe)); + if (m_hw_def.has_cartslot()) + { + SOFTWARE_LIST(config, "cart_list").set_original("msx2_cart"); + SOFTWARE_LIST(config, "msx1_cart_list").set_compatible("msx1_cart"); + } - // cassette - CASSETTE(config, m_cassette); - m_cassette->set_formats(fmsx_cassette_formats); - m_cassette->set_default_state(CASSETTE_PLAY); - m_cassette->add_route(ALL_OUTPUTS, m_speaker, 0.05); - m_cassette->set_interface("msx_cass"); + if (m_hw_def.has_fdc()) + { + SOFTWARE_LIST(config, "flop_list").set_original("msx2p_flop"); + SOFTWARE_LIST(config, "msx2_flop_list").set_compatible("msx2_flop"); + SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop"); + } } -template -void msx_state::msx1(VDPType &vdp_type, machine_config &config, bool has_cartlist) +void msx2_base_state::turbor_add_softlists(machine_config &config) { - msx_base(config, 10.738635_MHz_XTAL, 3); - - m_maincpu->set_addrmap(AS_IO, &msx_state::msx_io_map); - m_maincpu->set_vblank_int("screen", FUNC(msx_state::msx_interrupt)); /* Needed for mouse updates */ - - // Software lists - SOFTWARE_LIST(config, "cass_list").set_original("msx1_cass"); + if (m_hw_def.has_cassette()) + { + SOFTWARE_LIST(config, "cass_list").set_original("msx2_cass"); + SOFTWARE_LIST(config, "msx1_cass_list").set_compatible("msx1_cass"); + } - vdp_type(config, m_tms9928a, 10.738635_MHz_XTAL); - m_tms9928a->set_screen(m_screen); - m_tms9928a->set_vram_size(0x4000); - m_tms9928a->int_callback().set(m_mainirq, FUNC(input_merger_device::in_w<0>)); + if (m_hw_def.has_cartslot()) + { + SOFTWARE_LIST(config, "cart_list").set_original("msx2_cart"); + SOFTWARE_LIST(config, "msx1_cart_list").set_compatible("msx1_cart"); + } - if (has_cartlist) - SOFTWARE_LIST(config, "cart_list").set_original("msx1_cart"); + if (m_hw_def.has_fdc()) + { + SOFTWARE_LIST(config, "flop_list").set_original("msxr_flop"); + SOFTWARE_LIST(config, "msx2p_flop_list").set_compatible("msx2p_flop"); + SOFTWARE_LIST(config, "msx2_flop_list").set_compatible("msx2_flop"); + SOFTWARE_LIST(config, "msx1_flop_list").set_compatible("msx1_flop"); + } } - -void msx2_state::msx2_base(machine_config &config, bool has_cartlist) +void msx2_base_state::msx2_base(ay8910_type ay8910_type, machine_config &config) { - msx_base(config, 21.477272_MHz_XTAL, 6); + msx_base(ay8910_type, config, 21.477272_MHz_XTAL, 6); // real time clock RP5C01(config, m_rtc, 32.768_kHz_XTAL); - - // Software lists - SOFTWARE_LIST(config, "cass_list").set_original("msx2_cass"); - SOFTWARE_LIST(config, "msx1_cas_l").set_compatible("msx1_cass"); - - if (has_cartlist) - { - SOFTWARE_LIST(config, "cart_list").set_original("msx2_cart"); - SOFTWARE_LIST(config, "msx1_crt_l").set_compatible("msx1_cart"); - } } -void msx2_state::msx2(machine_config &config, bool has_cartlist) +void msx2_base_state::msx2(ay8910_type ay8910_type, machine_config &config) { - msx2_base(config, has_cartlist); + msx2_base(ay8910_type, config); - m_maincpu->set_addrmap(AS_IO, &msx2_state::msx2_io_map); + m_maincpu->set_addrmap(AS_IO, &msx2_base_state::msx2_io_map); // video hardware V9938(config, m_v9938, 21.477272_MHz_XTAL); m_v9938->set_screen_ntsc(m_screen); m_v9938->set_vram_size(0x20000); m_v9938->int_cb().set(m_mainirq, FUNC(input_merger_device::in_w<0>)); -} + // Software lists + msx2_add_softlists(config); +} -void msx2_state::msx2_pal(machine_config &config, bool has_cartlist) +void msx2_base_state::msx2_pal(ay8910_type ay8910_type, machine_config &config) { - msx2(config, has_cartlist); + msx2(ay8910_type, config); m_v9938->set_screen_pal(m_screen); } - -void msx2_state::msx2plus(machine_config &config) +void msx2_base_state::msx2plus_base(ay8910_type ay8910_type, machine_config &config) { - msx2_base(config, true); + msx2_base(ay8910_type, config); - m_maincpu->set_addrmap(AS_IO, &msx2_state::msx2plus_io_map); + m_maincpu->set_addrmap(AS_IO, &msx2_base_state::msx2plus_io_map); // video hardware V9958(config, m_v9958, 21.477272_MHz_XTAL); @@ -2448,6882 +895,28 @@ void msx2_state::msx2plus(machine_config &config) m_v9958->int_cb().set(m_mainirq, FUNC(input_merger_device::in_w<0>)); } -void msx2_state::turbor(machine_config &config) -{ - msx2plus(config); - - R800(config.replace(), m_maincpu, 28.636363_MHz_XTAL); - m_maincpu->set_addrmap(AS_PROGRAM, &msx2_state::memory_map); - m_maincpu->set_addrmap(AS_IO, &msx2_state::msx2plus_io_map); -} - - -/*************************************************************************** - - Game driver(s) - -***************************************************************************/ - -/******************************** MSX 1 **********************************/ - -/* MSX - Al Alamiah AX-150 */ - -ROM_START(ax150) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("ax150bios.rom", 0x0000, 0x8000, CRC(bd95c436) SHA1(5e094fca95ab8e91873ee372a3f1239b9a48a48d)) - ROM_LOAD("ax150arab.rom", 0x8000, 0x8000, CRC(339cd1aa) SHA1(0287b2ec897b9196788cd9f10c99e1487d7adbbb)) -ROM_END - -void msx_state::ax150(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "arab", 1, 0, 1, 2, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 2, 2); /* 32KB RAM */ -} - -/* MSX - Al Alamiah AX-170 */ - -ROM_START (ax170) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("ax170bios.rom", 0x0000, 0x8000, CRC(bd95c436) SHA1(5e094fca95ab8e91873ee372a3f1239b9a48a48d)) - ROM_LOAD("ax170arab.rom", 0x8000, 0x8000, CRC(339cd1aa) SHA1(0287b2ec897b9196788cd9f10c99e1487d7adbbb)) -ROM_END - - -void msx_state::ax170(machine_config &config) +void msx2_base_state::msx2plus(ay8910_type ay8910_type, machine_config &config) { - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - // T7937 (in ax170mk2) + msx2plus_base(ay8910_type, config); - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "arab", 1, 0, 1, 2, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ + // Software lists + msx2plus_add_softlists(config); } -/* MSX - Canon V-8 */ - -ROM_START(canonv8) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("v8bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::canonv8(machine_config &config) +void msx2_base_state::msx2plus_pal(ay8910_type ay8910_type, machine_config &config) { - msx1(TMS9928A, config); - // AY8910/YM2149?? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 3, 1).force_start_address(0xe000); /* 8KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); + msx2plus(ay8910_type, config); + m_v9958->set_screen_pal(m_screen); } -/* MSX - Canon V-10 */ - -ROM_START(canonv10) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("v10bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) -ROM_END - -void msx_state::canonv10(machine_config &config) +void msx2_base_state::turbor(ay8910_type ay8910_type, machine_config &config) { - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 3, 1); /* 16KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Canon V-20 */ + msx2plus_base(ay8910_type, config); -ROM_START(canonv20) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("v20bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) -ROM_END - -void msx_state::canonv20(machine_config &config) -{ - msx1(TMS9929A, config); - // XTAL: 1431818(Z80/PSG) + 10.6875(VDP) - // YM2149 - // TMS9929ANL - // FDC: None, 0 drives - // 2 Cartridge slots + R800(config.replace(), m_maincpu, 28.636363_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &msx2_base_state::memory_map); + m_maincpu->set_addrmap(AS_IO, &msx2_base_state::msx2plus_io_map); - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); + // Software lists + turbor_add_softlists(config); } - -/* MSX - Canon V-20E */ - -ROM_START(canonv20e) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("v20ebios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) -ROM_END - -/* MSX - Canon V-20F */ - -ROM_START(canonv20f) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("v20fbios.rom", 0x0000, 0x8000, CRC(e0e894b7) SHA1(d99eebded5db5fce1e072d08e642c0909bc7efdd)) -ROM_END - -/* MSX - Canon V-20G */ - -ROM_START(canonv20g) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("v20gbios.rom", 0x0000, 0x8000, CRC(d6e704ad) SHA1(d67be6d7d56d7229418f4e122f2ec27990db7d19)) -ROM_END - -/* MSX - Canon V-20S */ - -ROM_START(canonv20s) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("v20sbios.rom", 0x0000, 0x8000, CRC(c72b186e) SHA1(9fb289ea5c11d497ee00703f64e82575d1c59923)) -ROM_END - -/* MSX - Casio MX-10 */ - -ROM_START(mx10) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD( "mx10bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::mx10(machine_config &config) -{ - msx1(TMS9118, config); - // FDC: None, 0 drives - // 2? Cartridge slots - // Z80: uPD780C-1 - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 3, 1); // 16KB RAM - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); -} - -/* MSX - Casio MX-15 */ - -ROM_START(mx15) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mx15bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::mx15(machine_config &config) -{ - msx1(TMS9928A, config); - // FDC: None, 0 drives - // 3 Cartridge slots - // T6950 - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 3, 1); // 16KB RAM - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_cartridge_slot<3>(config, MSX_SLOT_CARTRIDGE, "cartslot3", 3, 0, msx_cart, nullptr); -} - -/* MSX - Casio MX-101 */ - -ROM_START(mx101) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mx101bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::mx101(machine_config &config) -{ - msx1(TMS9928A, config); - // FDC: None, 0 drives - // 2? Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 3, 1); // 16KB RAM - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); -} - -/* MSX - Casio PV-7 */ - -ROM_START(pv7) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("pv7bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::pv7(machine_config &config) -{ - msx1(TMS9118, config); - // AY8910? - // FDC: None, 0 drives - // 1 Cartridge slot + expansion slot, or 2 cartridge slots? - // By adding a Casio KB-7 2 additional cartridge slots become available and 8KB extra RAM? - // No cassette port - // No printer port - // Z80: uPD780C-1 - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 3, 1).force_start_address(0xe000); /* 8KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); -} - -/* MSX - Casio PV-16 */ - -ROM_START(pv16) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("pv16.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::pv16(machine_config &config) -{ - msx1(TMS9118, config); - // AY8910 - // FDC: None, 0 drives - // 1 Cartridge slot - // No printer port - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 3, 1); /* 16KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); -} - -/* MSX - Daewoo CPC-88 */ - -ROM_START(cpc88) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("88bios.rom", 0x0000, 0x8000, CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) - ROM_LOAD("88han.rom", 0x8000, 0x2000, CRC(938db440) SHA1(d41676fde0a3047792f93c4a41509b8749e55e74)) - ROM_RELOAD(0xa000, 0x2000) -ROM_END - -void msx_state::cpc88(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2? Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "han", 0, 0, 2, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Daewoo DPC-100 */ - -ROM_START(dpc100) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("100bios.rom", 0x0000, 0x8000, CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) - ROM_LOAD("100han.rom", 0x8000, 0x4000, CRC(97478efb) SHA1(4421fa2504cbce18f7c84b5ea97f04e017007f07)) -ROM_END - -void msx_state::dpc100(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "han", 0, 0, 2, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 3, 1); /* 16KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Daewoo DPC-180 */ - -ROM_START(dpc180) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("180bios.rom", 0x0000, 0x8000, CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) - ROM_LOAD("180han.rom", 0x8000, 0x4000, CRC(97478efb) SHA1(4421fa2504cbce18f7c84b5ea97f04e017007f07)) -ROM_END - -void msx_state::dpc180(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "han", 0, 0, 2, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Daewoo DPC-200 */ - -ROM_START(dpc200) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("200bios.rom", 0x0000, 0x8000, CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) - ROM_LOAD("200han.rom", 0x8000, 0x4000, CRC(97478efb) SHA1(4421fa2504cbce18f7c84b5ea97f04e017007f07)) -ROM_END - -void msx_state::dpc200(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "han", 0, 0, 2, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Daewoo DPC-200E */ - -ROM_START(dpc200e) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("dpc200ebios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) -ROM_END - -void msx_state::dpc200e(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Daewoo Zemmix CPC-50A */ - -ROM_START(cpc50a) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("50abios.rom", 0x0000, 0x8000, CRC(c3a868ef) SHA1(a08a940aa87313509e00bc5ac7494d53d8e03492)) -ROM_END - -void msx_state::cpc50a(machine_config &config) -{ - msx1(TMS9118, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 1? Cartridge slot - // No keyboard? - // No cassette port? - // No printer port? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 3, 1).force_start_address(0xe000); /* 8KB RAM */ -} - -/* MSX - Daewoo Zemmix CPC-50B */ - -ROM_START(cpc50b) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("50bbios.rom", 0x0000, 0x8000, CRC(c3a868ef) SHA1(a08a940aa87313509e00bc5ac7494d53d8e03492)) -ROM_END - -void msx_state::cpc50b(machine_config &config) -{ - msx1(TMS9118, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 1? Cartridge slot - // No keyboard? - // No cassette port? - // No printer port? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 3, 1); /* 16KB RAM */ -} - -/* MSX - Daewoo Zemmix CPC-51 */ - -ROM_START(cpc51) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("51bios.rom", 0x0000, 0x8000, CRC(c3a868ef) SHA1(a08a940aa87313509e00bc5ac7494d53d8e03492)) -ROM_END - -void msx_state::cpc51(machine_config &config) -{ - msx1(TMS9118, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 1 Cartridge slot - // No keyboard, just a keyboard connector - // No cassette port - // No printer port - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Dragon MSX-64 */ - -ROM_START(dgnmsx) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("uk1msx048.ic37", 0x0000, 0x4000, CRC(24c198be) SHA1(7f8c94cb8913db32a696dec80ffc78e46693f1b7)) - ROM_LOAD("uk2msx058.ic6", 0x4000, 0x4000, CRC(e516e7e5) SHA1(05fedd4b9bfcf4949020c79d32c4c3f03a54fb62)) -ROM_END - -void msx_state::dgnmsx(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Fenner DPC-200 */ - -ROM_START(fdpc200) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("dpc200bios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) -ROM_END - -void msx_state::fdpc200(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Fenner FPC-500 */ - -ROM_START(fpc500) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("fpc500bios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) -ROM_END - -void msx_state::fpc500(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Fenner SPC-800 */ - -ROM_START(fspc800) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("spc800bios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) -ROM_END - -void msx_state::fspc800(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910? - // FDC: None, 0 drives - // 2 Cartridge slots - // Z80: GSS Z8400APS - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Frael Bruc 100-1 */ - -ROM_START(bruc100) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("bruc100-1bios.rom", 0x0000, 0x8000, CRC(c7bc4298) SHA1(3abca440cba16ac5e162b602557d30169f77adab)) -ROM_END - -void msx_state::bruc100(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); /* 64KB RAM */ -} - -/* MSX - Fujitsu FM-X */ - -ROM_START(fmx) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("fmxbios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::fmx(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 1 Cartridge slot, 2 "Fujitsu expansion slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 3, 1); // 16KB RAM - // Fujitsu expansion slot #1 in slot 1 - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - // Fijutsu expansion slot #2 in slot 3 -} - -/* MSX - Goldstar FC-80U */ - -ROM_START(gsfc80u) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("fc80ubios.rom", 0x0000, 0x8000, CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) - ROM_LOAD("fc80uhan.rom", 0x8000, 0x2000, CRC(0cdb8501) SHA1(58dbe73ae80c2c409e766c3ace730ecd7bec89d0)) - ROM_RELOAD(0xa000, 0x2000) -ROM_END - -void msx_state::gsfc80u(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "han", 0, 0, 2, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Goldstar FC-200 */ - -ROM_START(gsfc200) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("fc200bios.rom.u5a", 0x0000, 0x4000, CRC(61f473fb) SHA1(c425750bbb2ae1d278216b45029d303e37d8df2f)) - ROM_LOAD("fc200bios.rom.u5b", 0x4000, 0x4000, CRC(1a99b1a1) SHA1(e18f72271b64693a2a2bc226e1b9ebd0448e07c0)) -ROM_END - -void msx_state::gsfc200(machine_config &config) -{ - msx1(TMS9129, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "rom", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Goldstar GFC-1080 */ - -ROM_START(gfc1080) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("gfc1080bios.rom", 0x0000, 0x8000, CRC(d9cdd4a6) SHA1(6b0be712b9c95c1e912252ab5703e1c0bc457d9e)) - ROM_LOAD("gfc1080han.rom", 0x8000, 0x4000, CRC(f209448c) SHA1(141b44212ba28e7d03e0b54126fedd9e0807dc42)) - ROM_LOAD("gfc1080pasocalc.rom", 0xc000, 0x4000, CRC(4014f7ea) SHA1(a5581fa3ce10f90f15ba3dc53d57b02d6e4af172)) -ROM_END - -void msx_state::gfc1080(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "rom", 0, 0, 0, 4, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); // 64KB RAM - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Goldstar GFC-1080A */ - -ROM_START(gfc1080a) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("gfc1080abios.rom", 0x0000, 0x8000, CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) - ROM_LOAD("gfc1080ahan.rom", 0x8000, 0x2000, CRC(0cdb8501) SHA1(58dbe73ae80c2c409e766c3ace730ecd7bec89d0)) - ROM_RELOAD(0xa000, 0x2000) -ROM_END - -void msx_state::gfc1080a(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "rom", 0, 0, 0, 3, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); // 64KB RAM - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Gradiente Expert 1.0 */ - -ROM_START(expert10) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("expbios.rom", 0x0000, 0x8000, CRC(07610d77) SHA1(ef3e010eb57e4476700a3bbff9d2119ab3acdf62)) -ROM_END - -void msx_state::expert10(machine_config &config) -{ - msx1(TMS9128, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Gradiente Expert 1.1 */ -ROM_START(expert11) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("expbios11.rom", 0x0000, 0x8000, CRC(efb4b972) SHA1(d6720845928ee848cfa88a86accb067397685f02)) -ROM_END - -void msx_state::expert11(machine_config &config) -{ - msx1(TMS9128, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Gradiente Expert 1.3 */ -ROM_START(expert13) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("expbios13.rom", 0x0000, 0x8000, CRC(5638bc38) SHA1(605f5af3f358c6811f54e0173bad908614a198c0)) -ROM_END - -void msx_state::expert13(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 0, 4).set_total_size(0x10000); /* 64KB Mapper RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Gradiente Expert DDPlus */ -ROM_START(expertdp) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("eddpbios.rom", 0x0000, 0x8000, CRC(efb4b972) SHA1(d6720845928ee848cfa88a86accb067397685f02)) - ROM_LOAD("eddpdisk.rom", 0x8000, 0x4000, CRC(549f1d90) SHA1(f1525de4e0b60a6687156c2a96f8a8b2044b6c56)) -ROM_END - -void msx_state::expertdp(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: mb8877a, 1 3.5" DSDD drive - // 2 Cartridge slots - // MSX Engine T7937A (also VDP) - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 3, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_mb8877a(config); - msx_1_35_dd_drive(config); - msx1_floplist(config); -} - -/* MSX - Gradiente Expert Plus */ - -ROM_START(expertpl) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("exppbios.rom", 0x0000, 0x8000, CRC(efb4b972) SHA1(d6720845928ee848cfa88a86accb067397685f02)) - ROM_LOAD("exppdemo.rom", 0x8000, 0x4000, CRC(a9bbef64) SHA1(d4cea8c815f3eeabe0c6a1c845f902ec4318bf6b)) -ROM_END - -void msx_state::expertpl(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - // MSX Engine T7937A - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "demo", 3, 3, 2, 1, "maincpu", 0x8000); -} - -/* MSX - Hitachi MB-H2 */ - -ROM_START(mbh2) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("mbh2bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) - ROM_LOAD("mbh2firm.rom", 0x8000, 0x4000, CRC(4f03c947) SHA1(e2140fa2e8e59090ecccf55b62323ea9dcc66d0b)) -ROM_END - -void msx_state::mbh2(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - // Builtin cassette player - // Speed controller (normal, slow 1, slow 2) - - add_internal_slot(config, MSX_SLOT_ROM, "rom", 0, 0, 0, 3, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64KB RAM -} - -/* MSX - Hitachi MB-H25 */ - -ROM_START(mbh25) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mbh25bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::mbh25(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "rom", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 2, 2); // 32KB RAM -} - -/* MSX - Hitachi MB-H50 */ - -ROM_START(mbh50) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mbh50bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::mbh50(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - // T6950 - - add_internal_slot(config, MSX_SLOT_ROM, "rom", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64KB RAM -} - -/* MSX - JVC HC-7GB */ - -ROM_START(jvchc7gb) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hc7gbbios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) -ROM_END - -void msx_state::jvchc7gb(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "rom", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Mitsubishi ML-F48 */ - -ROM_START(mlf48) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mlf48bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) -ROM_END - -void msx_state::mlf48(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 2, 2); // 32KB RAM - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Mitsubishi ML-F80 */ - -ROM_START(mlf80) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mlf80bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) -ROM_END - -void msx_state::mlf80(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Mitsubishi ML-F110 */ - -ROM_START(mlf110) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mlf110bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::mlf110(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 3, 1); // 16KB RAM - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Mitsubishi ML-F120 */ - -ROM_START(mlf120) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("mlf120bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) - ROM_LOAD("mlf120firm.rom", 0x8000, 0x4000, CRC(4b5f3173) SHA1(21a9f60cb6370d0617ce54c42bb7d8e40a4ab560)) -ROM_END - -void msx_state::mlf120(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2? Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "firm", 1, 0, 1, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 2, 2); // 32KB RAM - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Mitsubishi ML-FX1 */ - -ROM_START(mlfx1) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mlfx1bios.rom", 0x0000, 0x8000, CRC(62867dce) SHA1(0cbe0df4af45e8f531e9c761403ac9e71808f20c)) -ROM_END - -void msx_state::mlfx1(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ -} - -/* MSX - National CF-1200 */ - -ROM_START(cf1200) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("1200bios.rom", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) -ROM_END - -void msx_state::cf1200(machine_config &config) -{ - msx1(TMS9918A, config); - // AY8910 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 3, 1); /* 16KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); -} - -/* MSX - National CF-2000 */ - -ROM_START(cf2000) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("2000bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::cf2000(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 3, 1); /* 16KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); -} - -/* MSX - National CF-2700 */ -ROM_START(cf2700) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("2700bios.rom.ic32", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) -ROM_END - -void msx_state::cf2700(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); -} - -/* MSX - National CF-3000 */ - -ROM_START(cf3000) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("3000bios.rom", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) -ROM_END - -void msx_state::cf3000(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - National CF-3300 */ -ROM_START(cf3300) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("3300bios.rom", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) - ROM_LOAD("3300disk.rom", 0x8000, 0x4000, CRC(549f1d90) SHA1(f1525de4e0b60a6687156c2a96f8a8b2044b6c56)) -ROM_END - -void msx_state::cf3300(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: mb8877a, 1 3.5" SSDD drive - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 1, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_mb8877a(config); - msx_1_35_ssdd_drive(config); - msx1_floplist(config); -} - -/* MSX - National FS-1300 */ - -ROM_START(fs1300) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("1300bios.rom", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) -ROM_END - -void msx_state::fs1300(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - National FS-4000 */ - -ROM_START(fs4000) - ROM_REGION(0x18000 ,"maincpu", 0) - ROM_LOAD("4000bios.rom", 0x0000, 0x8000, CRC(071135e0) SHA1(df48902f5f12af8867ae1a87f255145f0e5e0774)) - ROM_LOAD("4000word.rom", 0x8000, 0x8000, CRC(950b6c87) SHA1(931d6318774bd495a32ec3dabf8d0edfc9913324)) - ROM_LOAD("4000kdr.rom", 0x10000, 0x8000, CRC(ebaa5a1e) SHA1(77bd67d5d10d459d343e79eafcd8e17eb0f209dd)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("4000kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) -ROM_END - -void msx_state::fs4000(machine_config &config) -{ - msx1(TMS9128, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 0, 0, 2, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ -} - -/* MSX - National FS-4000 (Alt) */ - -ROM_START(fs4000a) - ROM_REGION(0x18000 ,"maincpu", 0) - ROM_LOAD("4000bios.rom", 0x0000, 0x8000, CRC(071135e0) SHA1(df48902f5f12af8867ae1a87f255145f0e5e0774)) - ROM_LOAD("4000wora.rom", 0x8000, 0x8000, CRC(52f4cdf7) SHA1(acbac3cb5b700254bed2cacc19fa54f1950f371d)) - ROM_LOAD("4000kdra.rom", 0x10000, 0x8000, CRC(b2db6bf5) SHA1(3a9a942ed888dd641cddf8deada1879c454df3c6)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("4000kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) -ROM_END - -void msx_state::fs4000a(machine_config &config) -{ - msx1(TMS9128, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 0, 0, 2, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ -} - -/*MSX - Olympia PHC-2*/ - -ROM_START(phc2) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("phc2bios.rom", 0x0000, 0x8000, CRC(4f7bb04b) SHA1(ab0177624d46dd77ab4f50ffcb983c3ba88223f4)) -ROM_END - -void msx_state::phc2(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Olympia PHC-28 */ - -ROM_START(phc28) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("phc28bios.rom", 0x0000, 0x8000, CRC(eceb2802) SHA1(195950173701abeb460a1a070d83466f3f53b337)) -ROM_END - -void msx_state::phc28(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 2, 2); /* 32KB RAM */ -} - -/* MSX - Panasonic CF-2700G */ - -ROM_START(cf2700g) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("cf2700g.rom", 0x0000, 0x8000, CRC(4aa194f4) SHA1(69bf27b610e11437dad1f7a1c37a63179a293d12)) -ROM_END - -void msx_state::cf2700g(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB?? RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Perfect Perfect1 */ - -ROM_START(perfect1) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("perfect1bios.rom", 0x0000, 0x8000, CRC(a317e6b4) SHA1(e998f0c441f4f1800ef44e42cd1659150206cf79)) - ROM_LOAD("perfect1arab.rom", 0x8000, 0x8000, CRC(6db04a4d) SHA1(01012a0e2738708861f66b6921b2e2108f2edb54)) - ROM_RELOAD(0x10000, 0x8000) -ROM_END - -void msx_state::perfect1(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 dribes - // 1 Cartridge slot - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "arab", 0, 1, 0, 4, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 0, 4); // 64KB RAM - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); -} - -/* MSX - Philips NMS-801 */ - -ROM_START(nms801) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("801bios.rom", 0x0000, 0x8000, CRC(fa089461) SHA1(21329398c0f350e330b353f45f21aa7ba338fc8d)) -ROM_END - -void msx_state::nms801(machine_config &config) -{ - msx1(TMS9929A, config, NO_CARTLIST); - // AY8910 - // FDC: None, 0 drives - // 0 Cartridge slots - // No printer port - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Philips VG-8000 */ - -ROM_START(vg8000) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("8000bios.rom", 0x0000, 0x8000, CRC(efd970b0) SHA1(42252cf87deeb58181a7bfec7c874190a1351779)) -ROM_END - -void msx_state::vg8000(machine_config &config) -{ - msx1(TMS9129, config); - // AY8910 - // FDC: None, 0 drives - // 2 Cartridge slots - // No printer port - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 3, 1); /* 16KB RAM */ -} - -/* MSX - Philips VG-8010 */ - -ROM_START(vg8010) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("8010bios.rom", 0x0000, 0x8000, CRC(efd970b0) SHA1(42252cf87deeb58181a7bfec7c874190a1351779)) -ROM_END - -void msx_state::vg8010(machine_config &config) -{ - msx1(TMS9129, config); - // AY8910 - // FDC: None, 0 drives - // 2 Cartridge slots - // No printer port - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 2, 2); /* 32KB RAM */ -} - -/* MSX - Philips VG-8010F */ - -ROM_START(vg8010f) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("8010fbios.rom", 0x0000, 0x8000, CRC(df57c9ca) SHA1(898630ad1497dc9a329580c682ee55c4bcb9c30c)) -ROM_END - -void msx_state::vg8010f(machine_config &config) -{ - msx1(TMS9129, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - // No printer port - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 2, 2); /* 32KB RAM */ -} - -/* MSX - Philips VG-8020-00 */ - -ROM_START(vg802000) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("8020-00bios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) -ROM_END - -void msx_state::vg802000(machine_config &config) -{ - msx1(TMS9929A, config); - // YM2149 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Philips VG-8020-20 */ - -ROM_START(vg802020) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("8020-20bios.rom", 0x0000, 0x8000, CRC(a317e6b4) SHA1(e998f0c441f4f1800ef44e42cd1659150206cf79)) -ROM_END - -void msx_state::vg802020(machine_config &config) -{ - msx1(TMS9129, config); - // YM2149 (in S-3527 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); /* 64KB Mapper RAM */ -} - -/* MSX - Philips VG-8020F */ - -ROM_START(vg8020f) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("vg8020f.rom", 0x0000, 0x8000, CRC(6e692fa1) SHA1(9eaad185efc8e224368d1db4949eb9659c26fb2c)) -ROM_END - -void msx_state::vg8020f(machine_config &config) -{ - msx1(TMS9929A, config); - // YM2149 (in S-3527 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB?? RAM */ -} - -/* MSX - Pioneer PX-7 */ - -ROM_START(piopx7) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("ym2301.ic12", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) - ROM_LOAD("pd5031.ic13", 0x8000, 0x2000, CRC(91e0df72) SHA1(4f0102cdc27216fd9bcdb9663db728d2ccd8ca6d)) - ROM_FILL(0xa000, 0x2000, 0x6e) -ROM_END - -void msx_state::piopx7(machine_config &config) -{ - msx1(TMS9929A, config); - // TMS9129NL VDP with sync/overlay interface - // AY-3-8910 PSG - // Pioneer System Remote (SR) system control interface - // FDC: None, 0 drives - // 2 Cartridge slots - - // Line-level stereo audio input can be mixed with sound output, balance controlled with slider on front panel - // Front-panel switch allows audio input to be passed through bypassing the mixing circuit - // Line input can be muted under software control, e.g. when loading data from Laserdisc - // Right channel of line input is additionally routed via some signal processing to the cassette input for loading data from Laserdisc - - // PSG port B bits 0-5 can be used to drive controller pins 1-6, 1-7, 2-6, 2-7, 1-8 and 2-8 low if 0 is written - - // Slot #2 7FFE is the SR control register LCON - // Bit 7 R = /ACK (significant with acknowledge 1->0 with respect to remote control signal transmission) - // Bit 0 R = RMCLK (clock produced by dividing CLK1/CLK2 frequency by 128) - // Bit 0 W = /REM (high output with bit serial data output generated in synchronisation with RMCLK) - - // Slot #2 7FFF is the video overlay control register VCON - // Bit 7 R = /EXTV (low when external video input available; high when not available) - // Bit 7 W = Mute (line input signal muting) - // Bit 0 R = INTEXV (interrupt available when external video signal OFF, reset on read) - // Bit 0 W = /OVERLAY (0 = superimpose, 1 = non-superimpose) - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "rom2", 2, 0, 1, 1, "maincpu", 0x8000); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Pioneer PX-7UK */ - -ROM_START(piopx7uk) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("px7ukbios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) - ROM_LOAD("px7ukpbasic.rom", 0x8000, 0x2000, CRC(91e0df72) SHA1(4f0102cdc27216fd9bcdb9663db728d2ccd8ca6d)) - ROM_FILL(0xa000, 0x2000, 0x6e) - ROM_LOAD("videoart.rom", 0xc000, 0x8000, CRC(0ba148dc) SHA1(b7b4e4cd40a856bb071976e6cf0f5e546fc86a78)) -ROM_END - -void msx_state::piopx7uk(machine_config &config) -{ - msx1(TMS9129, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "rom2", 2, 0, 1, 1, "maincpu", 0x8000); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Pioneer PX-V60 */ - -ROM_START(piopxv60) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("pxv60bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) - ROM_LOAD("pxv60pbasic.rom", 0x8000, 0x2000, CRC(91e0df72) SHA1(4f0102cdc27216fd9bcdb9663db728d2ccd8ca6d)) - ROM_FILL(0xa000, 0x2000, 0x6E) -ROM_END - -void msx_state::piopxv60(machine_config &config) -{ - msx1(TMS9128, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "rom2", 2, 0, 1, 1, "maincpu", 0x8000); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Samsung SPC-800 */ - -ROM_START(spc800) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("spc800bios.rom", 0x0000, 0x8000, CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) - ROM_LOAD("spc800han.rom", 0x8000, 0x4000, CRC(5ae2b013) SHA1(1e7616261a203580c1044205ad8766d104f1d874)) -ROM_END - -void msx_state::spc800(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "han", 0, 0, 4, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB?? RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Sanyo MPC-64 */ - -ROM_START(mpc64) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mpc64bios.rom", 0x0000, 0x8000, CRC(d6e704ad) SHA1(d67be6d7d56d7229418f4e122f2ec27990db7d19)) -ROM_END - -void msx_state::mpc64(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Sanyo MPC-100 */ - -ROM_START(mpc100) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mpc100bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) -ROM_END - -void msx_state::mpc100(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Sanyo MPC-200 */ - -ROM_START(mpc200) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mpc200bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) -ROM_END - -void msx_state::mpc200(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2? Cartridge slots - // T6950 - // T7775 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64KB RAM -} - -/* MSX - Sanyo MPC-200SP */ - -ROM_START(mpc200sp) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mpcsp200bios.rom", 0x0000, 0x8000, CRC(bcd79900) SHA1(fc8c2b69351e60dc902add232032c2d69f00e41e)) -ROM_END - -void msx_state::mpc200sp(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2? Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64KB RAM -} - -/* MSX - Sanyo PHC-28L */ - -ROM_START(phc28l) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("28lbios.rom", 0x0000, 0x8000, CRC(d2110d66) SHA1(d3af963e2529662eae63f04a2530454685a1989f)) -ROM_END - -void msx_state::phc28l(machine_config &config) -{ - msx1(TMS9929A, config); - // YM2149 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Sanyo PHC-28S */ - -ROM_START(phc28s) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("28sbios.rom", 0x0000, 0x8000, CRC(e5cf6b3c) SHA1(b1cce60ef61c058f5e42ef7ac635018d1a431168)) -ROM_END - -void msx_state::phc28s(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 2, 2); /* 32KB RAM */ -} - -/* MSX - Sanyo Wavy MPC-10 */ - -ROM_START(mpc10) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mpc10.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) -ROM_END - -void msx_state::mpc10(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 2, 2); /* 32KB RAM */ -} - -/* MSX - Sharp Epcom HotBit 1.1 */ - -ROM_START(hotbit11) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hotbit11.rom", 0x0000, 0x8000, CRC(b6942694) SHA1(663f8c512d04d213fa616b0db5eefe3774012a4b)) -ROM_END - -void msx_state::hotbit11(machine_config &config) -{ - msx1(TMS9128, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Sharp Epcom HotBit 1.2 */ - -ROM_START(hotbit12) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hotbit12.rom", 0x0000, 0x8000, CRC(f59a4a0c) SHA1(9425815446d468058705bae545ffa13646744a87)) -ROM_END - -void msx_state::hotbit12(machine_config &config) -{ - msx1(TMS9128, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Sharp Epcom HotBit 1.3b */ - -ROM_START(hotbi13b) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hotbit13b.rom", 0x0000, 0x8000, CRC(7a19820e) SHA1(e0c2bfb078562d15acabc5831020a2370ea87052)) -ROM_END - -void msx_state::hotbi13b(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); /* 64KB Mapper RAM */ -} - -/* MSX - Sharp Epcom HotBit 1.3p */ - -ROM_START(hotbi13p) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hotbit13p.rom", 0x0000, 0x8000, CRC(150e239c) SHA1(942f9507d206cd8156f15601fe8032fcf0e3875b)) -ROM_END - -void msx_state::hotbi13p(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); /* 64KB Mapper RAM */ -} - -/* MSX - Sony HB-10 */ - -ROM_START(hb10) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hb10bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::hb10(machine_config &config) -{ - msx1(TMS9928A, config); - // YM2149 (in S-1985 MSX-Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-1985 MSX-Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 3, 1); /* 16KB? RAM */ - - MSX_S1985(config, "s1985", 0); -} - -/* MSX - Sony HB-10P */ - -ROM_START(hb10p) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("10pbios.rom", 0x0000, 0x8000, CRC(0f488dd8) SHA1(5e7c8eab238712d1e18b0219c0f4d4dae180420d)) -ROM_END - -void msx_state::hb10p(machine_config &config) -{ - msx1(TMS9929A, config); - // XTAL: 3.579545 + 22.168(VDP) - // YM2149 (in S3527 MSX-Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // T6950 - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Sony HB-20P */ - -ROM_START(hb20p) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("20pbios.rom", 0x0000, 0x8000, CRC(21af423f) SHA1(365c93d7652c9f727221689bcc348652832a7b7a)) -ROM_END - -void msx_state::hb20p(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - // T6950 - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Sony HB-201 */ - -ROM_START(hb201) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("201bios.rom.ic9", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) - ROM_LOAD("201note.rom.ic8", 0x8000, 0x4000, CRC(74567244) SHA1(0f4f09f1a6ef7535b243afabfb44a3a0eb0498d9)) - ROM_FILL(0xc000, 0x4000, 0xff) -ROM_END - -void msx_state::hb201(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "note", 0, 0, 2, 2, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Sony HB-201P */ - -ROM_START(hb201p) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("201pbios.rom.ic9", 0x0000, 0x8000, CRC(0f488dd8) SHA1(5e7c8eab238712d1e18b0219c0f4d4dae180420d)) - ROM_LOAD("201pnote.rom.ic8", 0x8000, 0x4000, CRC(1ff9b6ec) SHA1(e84d3ec7a595ee36b50e979683c84105c1871857)) -ROM_END - -void msx_state::hb201p(machine_config &config) -{ - msx1(TMS9929A, config); - // YM2149 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "note", 0, 0, 2, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Sony HB-501P */ - -ROM_START(hb501p) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("501pbios.rom", 0x0000, 0x8000, CRC(0f488dd8) SHA1(5e7c8eab238712d1e18b0219c0f4d4dae180420d)) -ROM_END - -void msx_state::hb501p(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Sony HB-55 (Version 1) */ - -ROM_START(hb55) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("hb55bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) - ROM_LOAD("hb55note.rom", 0x8000, 0x2000, CRC(5743ab55) SHA1(b9179db93608c4da649532e704f072e0a3ea1b22)) -ROM_END - -void msx_state::hb55(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "note", 0, 0, 2, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 3, 1); /* 16KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Sony HB-55D */ - -ROM_START(hb55d) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("55dbios.rom", 0x0000, 0x8000, CRC(7e2b32dd) SHA1(38a645febd0e0fe86d594f27c2d14be995acc730)) - ROM_LOAD("55dnote.rom", 0x8000, 0x4000, CRC(8aae0494) SHA1(97ce59892573cac3c440efff6d74c8a1c29a5ad3)) -ROM_END - -void msx_state::hb55d(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "note", 0, 0, 2, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 3, 1); /* 16KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Sony HB-55P */ - -ROM_START(hb55p) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("55pbios.ic42", 0x0000, 0x4000, CRC(24c198be) SHA1(7f8c94cb8913db32a696dec80ffc78e46693f1b7)) - ROM_LOAD("55pbios.ic43", 0x4000, 0x4000, CRC(e516e7e5) SHA1(05fedd4b9bfcf4949020c79d32c4c3f03a54fb62)) - ROM_LOAD("55pnote.ic44", 0x8000, 0x4000, CRC(492b12f8) SHA1(b262aedc71b445303f84efe5e865cbb71fd7d952)) -ROM_END - -void msx_state::hb55p(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "note", 0, 0, 2, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 3, 1); /* 16KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Sony HB-75D */ - -ROM_START(hb75d) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("75dbios.rom", 0x0000, 0x8000, CRC(7e2b32dd) SHA1(38a645febd0e0fe86d594f27c2d14be995acc730)) - ROM_LOAD("75dnote.rom", 0x8000, 0x4000, CRC(8aae0494) SHA1(97ce59892573cac3c440efff6d74c8a1c29a5ad3)) -ROM_END - -void msx_state::hb75d(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "note", 0, 0, 2, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Sony HB-75P */ - -ROM_START(hb75p) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("75pbios.ic42", 0x0000, 0x4000, CRC(24c198be) SHA1(7f8c94cb8913db32a696dec80ffc78e46693f1b7)) - ROM_LOAD("75pbios.ic43", 0x4000, 0x4000, CRC(e516e7e5) SHA1(05fedd4b9bfcf4949020c79d32c4c3f03a54fb62)) - ROM_LOAD("75pnote.ic44", 0x8000, 0x4000, CRC(492b12f8) SHA1(b262aedc71b445303f84efe5e865cbb71fd7d952)) -ROM_END - -void msx_state::hb75p(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "note", 0, 0, 2, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Sony HB-101P */ - -ROM_START(hb101p) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("101pbios.rom", 0x0000, 0x8000, CRC(0f488dd8) SHA1(5e7c8eab238712d1e18b0219c0f4d4dae180420d)) - ROM_LOAD("101pnote.rom", 0x8000, 0x4000, CRC(525017c2) SHA1(8ffc24677fd9d2606a79718764261cdf02434f0a)) -ROM_END - -void msx_state::hb101p(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "note", 3, 0, 1, 1, "maincpu", 0x8000); -} - -/* MSX - Sony HB-701FD */ - -ROM_START(hb701fd) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("hb701fdbios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) - ROM_LOAD("hb701fddisk.rom", 0x8000, 0x4000, CRC(71961d9d) SHA1(2144036d6573d666143e890e5413956bfe8f66c5)) -ROM_END - -void msx_state::hb701fd(machine_config &config) -{ - msx1(TMS9928A, config); - // YM2149 (in S-1985) - // FDC: WD2793?, 1 3.5" SSDD drive - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 1, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); // Is this correct?? - - msx_wd2793_force_ready(config); - msx_1_35_ssdd_drive(config); - msx1_floplist(config); -} - -/* MSX - Spectravideo SVI-728 */ - -ROM_START(svi728) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("728bios.rom", 0x0000, 0x8000, CRC(1ce9246c) SHA1(ea6a82cf8c6e65eb30b98755c8577cde8d9186c0)) -// ROM_LOAD("707disk.rom", 0x8000, 0x4000, CRC(f9978853) SHA1(6aa856cc56eb98863c9da7a566571605682b5c6b)) -ROM_END - -void msx_state::svi728(machine_config &config) -{ - msx1(TMS9129, config); - // AY8910 - // FDC: None, 0 drives - // 1 Cartridge slots, 1 Expansion slot (eg for SVI-707) - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 2, 0, msx_cart, nullptr); -// MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM2, 0x4000, 0x8000) -// MSX_LAYOUT_SLOT (3, 1, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -} - -/* MSX - Spectravideo SVI-738 */ - -ROM_START(svi738) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("738bios.rom", 0x0000, 0x8000, CRC(ad007d62) SHA1(c53b3f2c00f31683914f7452f3f4d94ae2929c0d)) - ROM_LOAD("738disk.rom", 0x8000, 0x4000, CRC(acd27a36) SHA1(99a40266bc296cef1d432cb0caa8df1a7e570be4)) - ROM_LOAD("738232c.rom", 0xc000, 0x2000, CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) - ROM_FILL(0xe000, 0x2000, 0xff) -ROM_END - -void msx_state::svi738(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: wd1793, 1 3.5" SSDD drive - // 2 Cartridge slots - // builtin 80 columns card (V9938) - // RS-232C interface - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "rs232", 3, 0, 1, 1, "maincpu", 0xc000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 1, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 2, msx_cart, nullptr); - - msx_fd1793(config); - msx_1_35_ssdd_drive(config); - msx1_floplist(config); -} - -/* MSX - Spectravideo SVI-738 Arabic */ - -ROM_START(svi738ar) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("738arbios.rom", 0x0000, 0x8000, CRC(ad007d62) SHA1(c53b3f2c00f31683914f7452f3f4d94ae2929c0d)) - ROM_LOAD("738ardisk.rom", 0x8000, 0x4000, CRC(acd27a36) SHA1(99a40266bc296cef1d432cb0caa8df1a7e570be4)) - ROM_LOAD("738ar232c.rom", 0xc000, 0x2000, CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) - ROM_FILL(0xe000, 0x2000, 0xff) - ROM_LOAD("738arab.rom", 0x10000, 0x8000, CRC(339cd1aa) SHA1(0287b2ec897b9196788cd9f10c99e1487d7adbbb)) -ROM_END - -void msx_state::svi738ar(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: wd2793, 1 3.5" SSDD drive - // 2 Cartridge slots - // builtin 80 columns card (V9938) - // RS-232C interface - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "rs232", 3, 0, 1, 1, "maincpu", 0xc000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 1, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 2, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "arab", 3, 3, 1, 2, "maincpu", 0x10000); - - msx_wd2793_force_ready(config); - msx_1_35_ssdd_drive(config); - msx1_floplist(config); -} - -/* MSX - Spectravideo SVI-738 Danish */ - -ROM_START(svi738dk) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("738dkbios.rom", 0x0000, 0x8000, CRC(88720320) SHA1(1bda5af20cb86565bdc1ebd1e59a691fed7f9256)) - ROM_LOAD("738dkdisk.rom", 0x8000, 0x4000, CRC(fb884df4) SHA1(6d3a530ae822ec91f6444c681c9b08b9efadc7e7)) - ROM_LOAD("738dk232c.rom", 0xc000, 0x2000, CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) - ROM_FILL(0xe000, 0x2000, 0xff) -ROM_END - -void msx_state::svi738dk(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: wd2793, 1 3.5" SSDD drive - // 2 Cartridge slots - // builtin 80 columns card (V9938) - // RS-232C interface - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "rs232", 3, 0, 1, 1, "maincpu", 0xc000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 1, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 2, msx_cart, nullptr); - - msx_wd2793_force_ready(config); - msx_1_35_ssdd_drive(config); - msx1_floplist(config); -} - -/* MSX - Spectravideo SVI-738 Spanish */ - -ROM_START(svi738sp) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("738spbios.rom", 0x0000, 0x8000, CRC(f0c0cbb9) SHA1(5f04d5799ed72ea4993e7c4302a1dd55ac1ea8cd)) - ROM_LOAD("738spdisk.rom", 0x8000, 0x4000, CRC(fb884df4) SHA1(6d3a530ae822ec91f6444c681c9b08b9efadc7e7)) - ROM_LOAD("738sp232c.rom", 0xc000, 0x2000, CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) - ROM_FILL(0xe000, 0x2000, 0xff) -ROM_END - -void msx_state::svi738sp(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: wd2793, 1 3.5" SSDD drive - // 2 Cartridge slots - // builtin 80 columns card (V9938) - // RS-232C interface - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "rs232", 3, 0, 1, 1, "maincpu", 0xc000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 1, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 2, msx_cart, nullptr); - - msx_wd2793_force_ready(config); - msx_1_35_ssdd_drive(config); - msx1_floplist(config); -} - -/* MSX - Spectravideo SVI-738 Swedish */ - -ROM_START(svi738sw) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("738sebios.rom", 0x0000, 0x8000, CRC(c8ccdaa0) SHA1(87f4d0fa58cfe9cef818a3185df2735e6da6168c)) - ROM_LOAD("738sedisk.rom", 0x8000, 0x4000, CRC(fb884df4) SHA1(6d3a530ae822ec91f6444c681c9b08b9efadc7e7)) - ROM_LOAD("738se232c.rom", 0xc000, 0x2000, CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) - ROM_FILL(0xe000, 0x2000, 0xff) -ROM_END - -void msx_state::svi738sw(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: wd2793, 1 3.5" SSDD drive - // 2 Cartridge slots - // builtin 80 columns card (V9938) - // RS-232C interface - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "rs232", 3, 0, 1, 1, "maincpu", 0xc000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 1, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 2, msx_cart, nullptr); - - msx_wd2793_force_ready(config); - msx_1_35_ssdd_drive(config); - msx1_floplist(config); -} - -/* MSX - Spectravideo SVI-738 Poland*/ - -ROM_START(svi738pl) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("738plbios.rom", 0x0000, 0x8000, CRC(431b8bf5) SHA1(c90077ed84133a947841e07856e71133ba779da6)) // IC51 on board - ROM_LOAD("738disk.rom", 0x8000, 0x4000, CRC(acd27a36) SHA1(99a40266bc296cef1d432cb0caa8df1a7e570be4)) - ROM_LOAD("738232c.rom", 0xc000, 0x2000, CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) - ROM_FILL(0xe000, 0x2000, 0xff) -ROM_END - -void msx_state::svi738pl(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: wd2793, 1 3.5" SSDD drive - // 2 Cartridge slots - // builtin 80 columns card (V9938) - // RS-232C interface - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "rs232", 3, 0, 1, 1, "maincpu", 0xc000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 1, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 2, msx_cart, nullptr); - - msx_wd2793_force_ready(config); - msx_1_35_ssdd_drive(config); - msx1_floplist(config); -} - -/* MSX - Talent DPC-200 */ - -ROM_START(tadpc200) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("dpc200bios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) -ROM_END - -void msx_state::tadpc200(machine_config &config) -{ - msx1(TMS9129, config); - // AY8910 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Talent DPC-200A */ - -ROM_START(tadpc20a) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("dpc200abios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) -ROM_END - -void msx_state::tadpc20a(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Toshiba HX-10 */ -/* The BIOS on the Toshiba HX-10 is inside a big 64pin Toshiba chip label TCX-1007 */ - -ROM_START(hx10) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("tcx-1007.ic15", 0x0000, 0x8000, CRC(5486b711) SHA1(4dad9de7c28b452351cc12910849b51bd9a37ab3)) -ROM_END - -void msx_state::hx10(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910 - // FDC: None, 0 drives - // 1 Cartridge slot, 1 Toshiba Expension slot - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - //MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) // Expansion slot -} - -/* MSX - Toshiba HX-10D */ - -ROM_START(hx10d) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hx10dbios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::hx10d(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Toshiba HX-10DP */ - -ROM_START(hx10dp) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hx10dpbios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::hx10dp(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Toshiba HX-10E */ - -ROM_START(hx10e) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hx10ebios.rom", 0x0000, 0x8000, CRC(5486b711) SHA1(4dad9de7c28b452351cc12910849b51bd9a37ab3)) -ROM_END - -void msx_state::hx10e(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Toshiba HX-10F */ - -ROM_START(hx10f) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hx10fbios.rom", 0x0000, 0x8000, CRC(e0e894b7) SHA1(d99eebded5db5fce1e072d08e642c0909bc7efdd)) -ROM_END - -void msx_state::hx10f(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Toshiba HX-10S */ - -ROM_START(hx10s) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hx10sbios.rom", 0x0000, 0x8000, CRC(5486b711) SHA1(4dad9de7c28b452351cc12910849b51bd9a37ab3)) -ROM_END - -void msx_state::hx10s(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 3, 1); /* 16KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Toshiba HX-10SA */ - -ROM_START(hx10sa) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hx10sabios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::hx10sa(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Toshiba HX-20 */ - -ROM_START(hx20) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("hx20bios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) - ROM_LOAD("hx20word.rom", 0x8000, 0x8000, CRC(39b3e1c0) SHA1(9f7cfa932bd7dfd0d9ecaadc51655fb557c2e125)) -ROM_END - -void msx_state::hx20(machine_config &config) -{ - msx1(TMS9129, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - // T6950 - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 2, 2); /* 32KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 3, 1, 2, "maincpu", 0x8000); -} - -/* MSX - Toshiba HX-20I */ - -ROM_START(hx20i) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("hx20ibios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) - ROM_LOAD("hx20iword.rom", 0x8000, 0x8000, CRC(39b3e1c0) SHA1(9f7cfa932bd7dfd0d9ecaadc51655fb557c2e125)) -ROM_END - -void msx_state::hx20i(machine_config &config) -{ - msx1(TMS9129, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - // T6950 VDP instead of TMS9928A - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 2, 2); /* 32KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 3, 1, 2, "maincpu", 0x8000); -} - -/* MSX - Toshiba HX-21 */ - -ROM_START(hx21) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("hx21bios.rom", 0x0000, 0x8000, CRC(83ba6fde) SHA1(01600d06d83072d4e757b29728555efde2c79705)) - ROM_LOAD("hx21word.rom", 0x8000, 0x8000, CRC(87508e78) SHA1(4e2ec9c0294a18a3ab463f182f9333d2af68cdca)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("hx21kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) -ROM_END - -void msx_state::hx21(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 0, 4); /* 64KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 3, 1, 2, "maincpu", 0x8000); -} - -/* MSX - Toshiba HX-21I */ - -ROM_START(hx21i) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("hx21ibios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) - ROM_LOAD("hx21iword.rom", 0x8000, 0x8000, CRC(f9e29c66) SHA1(3289336b2c12161fd926a7e5ce865770ae7038af)) -ROM_END - -void msx_state::hx21i(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 2, 2); /* 32KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 3, 1, 2, "maincpu", 0x8000); -} - -/* MSX - Toshiba HX-22 */ - -ROM_START(hx22) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("hx22bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) - ROM_LOAD("hx22word.rom", 0x8000, 0x8000, CRC(87508e78) SHA1(4e2ec9c0294a18a3ab463f182f9333d2af68cdca)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("hx22kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) -ROM_END - -void msx_state::hx22(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - // RS232C builtin? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 0, 4); /* 64KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 3, 1, 2, "maincpu", 0x8000); -} - -/* MSX - Toshiba HX-22I */ - -ROM_START(hx22i) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("hx22ibios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) - ROM_LOAD("hx22iword.rom", 0x8000, 0x8000, CRC(f9e29c66) SHA1(3289336b2c12161fd926a7e5ce865770ae7038af)) -ROM_END - -void msx_state::hx22i(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - // RS232C builtin? - // Z80: LH0080A - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 2, 2); /* 32KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 3, 1, 2, "maincpu", 0x8000); -} - -/* MSX - Victor HC-5 */ - -ROM_START(hc5) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hc5bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::hc5(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives, - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 3, 1); // 16KB or 32KB RAM ? - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Victor HC-6 */ - -ROM_START(hc6) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hc6bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::hc6(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives, - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 2, 2); // 32KB RAM - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Victor HC-7 */ - -ROM_START(hc7) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("hc7bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) -ROM_END - -void msx_state::hc7(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives, - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); // 64KB RAM - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX - Yamaha CX5F (with SFG01) */ - -ROM_START(cx5f1) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("cx5fbios.rom", 0x0000, 0x8000, CRC(dc662057) SHA1(36d77d357a5fd15af2ab266ee66e5091ba4770a3)) -ROM_END - -void msx_state::cx5f1(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 1 Cartridge slot? - // 1 Yamaha expansion slot? - // S-5327 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 2, 2); // 32KB RAM - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 2, 0, msx_yamaha_60pin, "sfg01"); -} - -/* MSX - Yamaha CX5F (with SFG05) */ - -ROM_START(cx5f) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("cx5fbios.rom", 0x0000, 0x8000, CRC(dc662057) SHA1(36d77d357a5fd15af2ab266ee66e5091ba4770a3)) -ROM_END - -void msx_state::cx5f(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 1 Cartridge slot? - // 1 Yamaha expansion slot? - // S-5327 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 0, msx_yamaha_60pin, "sfg05"); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 2, 2); // 32KB RAM -} - -/* MSX - Yamaha CX5M / Yamaha CX5M-2 */ - -ROM_START(cx5m) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("cx5mbios.rom", 0x0000, 0x8000, CRC(e2242b53) SHA1(706dd67036baeec7127e4ccd8c8db8f6ce7d0e4c)) -ROM_END - -void msx_state::cx5m(machine_config &config) -{ - msx1(TMS9929A, config); - // YM2149 - // FDC: None, 0 drives - // 2 Cartridge slots - // 1 Expansion slot (60 pins interface instead of regular 50 pin cartridge interface) - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 0, msx_yamaha_60pin, "sfg01"); -} - -/* MSX - Yamaha CX5M-128 */ - -ROM_START(cx5m128) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("cx5m128bios.rom", 0x0000, 0x8000, CRC(507b2caa) SHA1(0dde59e8d98fa524961cd37b0e100dbfb42cf576)) - ROM_LOAD("cx5m128ext.rom", 0x8000, 0x4000, CRC(feada82e) SHA1(48b0c2ff1f1e407cc44394219f7b3878efaa919f)) - ROM_LOAD("yrm502.rom", 0x14000, 0x4000, CRC(5330fe21) SHA1(7b1798561ee1844a7d6432924fbee9b4fc591c19)) -ROM_END - -void msx_state::cx5m128(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 1, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "yrm", 3, 1, 1, 1, "maincpu", 0x14000); /* YRM-502 */ - 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, "sfg05"); -} - -/* MSX - Yamaha CX5MII */ - -ROM_START(cx5m2) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("cx5m2bios.rom", 0x0000, 0x8000, CRC(507b2caa) SHA1(0dde59e8d98fa524961cd37b0e100dbfb42cf576)) - ROM_LOAD("cx5m2ext.rom", 0x8000, 0x4000, CRC(feada82e) SHA1(48b0c2ff1f1e407cc44394219f7b3878efaa919f)) -ROM_END - -void msx_state::cx5m2(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 1, 1, "maincpu", 0x8000); - 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, "expansion", 3, 3, msx_yamaha_60pin, "sfg05"); -} - -/* MSX - Yamaha YIS303 */ - -ROM_START(yis303) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("yis303bios.rom", 0x0000, 0x8000, CRC(e2242b53) SHA1(706dd67036baeec7127e4ccd8c8db8f6ce7d0e4c)) - ROM_FILL(0x8000, 0xc000, 0xff) -ROM_END - -void msx_state::yis303(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "fillff", 3, 0, 0, 3, "maincpu", 0x0000); /* Fill FF */ - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 3, 1); /* 16KB RAM */ -} - -/* MSX - Yamaha YIS503 */ - -ROM_START(yis503) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("yis503bios.rom", 0x0000, 0x8000, CRC(e2242b53) SHA1(706dd67036baeec7127e4ccd8c8db8f6ce7d0e4c)) - ROM_FILL(0x8000, 0xc000, 0xff) -ROM_END - -void msx_state::yis503(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "fillff", 3, 0, 0, 3, "maincpu", 0x0000); /* Fill FF */ - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 2, 2); /* 32KB RAM */ -} - -/* MSX - Yamaha YIS503F */ - -ROM_START(yis503f) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("yis503f.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) -ROM_END - -void msx_state::yis503f(machine_config &config) -{ - msx1(TMS9929A, config); - // YM2149 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB?? RAM */ -} - -/* MSX - Yamaha YIS503II */ - -ROM_START(yis503ii) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("yis503iibios.rom", 0x0000, 0x8000, CRC(e2242b53) SHA1(706dd67036baeec7127e4ccd8c8db8f6ce7d0e4c)) -ROM_END - -void msx_state::yis503ii(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Yamaha YIS503IIR Russian */ - -ROM_START(y503iir) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("yis503iirbios.rom", 0x0000, 0x8000, CRC(225a4f9e) SHA1(5173ac403e26c462f904f85c9ef5e7b1e19253e7)) - ROM_LOAD("yis503iirdisk.rom", 0x8000, 0x4000, CRC(9eb7e24d) SHA1(3a481c7b7e4f0406a55952bc5b9f8cf9d699376c)) - ROM_LOAD("yis503iirnet.rom", 0xc000, 0x2000, CRC(0731db3f) SHA1(264fbb2de69fdb03f87dc5413428f6aa19511a7f)) -ROM_END - -void msx_state::y503iir(machine_config &config) -{ - msx1(TMS9929A, config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793/mb8877?, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - // RTC - // V9938 VDP - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 1, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); /* National disk */ - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "net", 3, 3, 1, 1, "maincpu", 0xc000); /* Net */ - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx1_floplist(config); -} - -/* MSX - Yamaha YIS503IIR Estonian */ - -ROM_START(y503iir2) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("yis503ii2bios.rom", 0x0000, 0x8000, CRC(1548cee3) SHA1(42c7fff25b1bd90776ac0aea971241aedce8947d)) - ROM_LOAD("yis503iirdisk.rom", 0x8000, 0x4000, CRC(9eb7e24d) SHA1(3a481c7b7e4f0406a55952bc5b9f8cf9d699376c)) - ROM_LOAD("yis503iirnet.rom", 0xc000, 0x2000, CRC(0731db3f) SHA1(264fbb2de69fdb03f87dc5413428f6aa19511a7f)) -ROM_END - -void msx_state::y503iir2(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: wd2793/mb8877?, 1 3.5" DSDD drive? - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 1, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); /* National disk */ - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "net", 3, 3, 1, 1, "maincpu", 0xc000); /* Net */ - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx1_floplist(config); -} - -/* MSX - Yamaha YIS503M */ - -ROM_START(yis503m) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("yis503mbios.rom", 0x0000, 0x8000, CRC(e2242b53) SHA1(706dd67036baeec7127e4ccd8c8db8f6ce7d0e4c)) -ROM_END - -void msx_state::yis503m(machine_config &config) -{ - msx1(TMS9929A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 0, msx_yamaha_60pin, "sfg05"); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 2, 2); /* 32KB RAM */ -} - -/* MSX - Yashica YC-64 */ - -ROM_START(yc64) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("yc64bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) -ROM_END - -void msx_state::yc64(machine_config &config) -{ - msx1(TMS9929A, config); - // YM2149 - // FDC: None, 0 drives - // 1 Cartridge slot (slot 1) - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ -} - -/* MSX - Yeno MX64 */ - -ROM_START(mx64) - ROM_REGION(0x8000, "maincpu", 0) - ROM_LOAD("mx64bios.rom", 0x0000, 0x8000, CRC(e0e894b7) SHA1(d99eebded5db5fce1e072d08e642c0909bc7efdd)) -ROM_END - -void msx_state::mx64(machine_config &config) -{ - msx1(TMS9928A, config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 0, 4); /* 64KB RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - - -/******************************** MSX 2 **********************************/ - -/* MSX2 - Al Alamiah AX-350 */ - -ROM_START(ax350) - ROM_REGION(0x30000, "maincpu", 0) - ROM_LOAD("ax350bios.rom", 0x00000, 0x8000, CRC(ea306155) SHA1(35195ab67c289a0b470883464df66bc6ea5b00d3)) - ROM_LOAD("ax350ext.rom", 0x08000, 0x4000, CRC(7c7540b7) SHA1(ebb76f9061e875365023523607db610f2eda1d26)) - ROM_LOAD("ax350arab.rom", 0x0c000, 0x8000, CRC(c0d8fc85) SHA1(2c9600c6e0025fee10d249e97448ecaa37e38c42)) - ROM_LOAD("ax350swp.rom", 0x14000, 0x8000, CRC(076f40fc) SHA1(4b4508131dca6d811694ae6379f41364c477de58)) - ROM_LOAD("ax350paint.rom", 0x1c000, 0x10000, CRC(18956e3a) SHA1(ace202e87337fbc54fea21e22c0b3af0abe6f4ae)) - ROM_LOAD("ax350disk.rom", 0x2c000, 0x4000, CRC(1e7d6512) SHA1(78cd7f847e77fd8cd51a647efb2725ba93f4c471)) -ROM_END - -void msx2_state::ax350(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: wd2793/tc8566af?, 1 3.5" DSDD drive - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); /* Bios */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); /* Ext */ - add_internal_slot(config, MSX_SLOT_ROM, "arab", 0, 1, 1, 2, "maincpu", 0xc000); /* Arab */ - add_internal_slot(config, MSX_SLOT_ROM, "swp", 0, 2, 1, 2, "maincpu", 0x14000); /* SWP */ - add_internal_slot(config, MSX_SLOT_ROM, "paint", 0, 3, 0, 4, "maincpu", 0x1c000); /* Paint */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 1, 1, 2, "maincpu", 0x2c000).set_tags("fdc", "fdc:0", "fdc:1"); /* Disk */ - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Al Alamiah AX-370 */ - -ROM_START(ax370) - ROM_REGION(0x30000, "maincpu", 0) - ROM_LOAD("ax370bios.rom", 0x0000, 0x8000, CRC(ea306155) SHA1(35195ab67c289a0b470883464df66bc6ea5b00d3)) - ROM_LOAD("ax370ext.rom", 0x8000, 0x4000, CRC(7c7540b7) SHA1(ebb76f9061e875365023523607db610f2eda1d26)) - ROM_LOAD("ax370arab.rom", 0xc000, 0x8000, CRC(c0d8fc85) SHA1(2c9600c6e0025fee10d249e97448ecaa37e38c42)) - ROM_LOAD("ax370swp.rom", 0x14000, 0x8000, CRC(076f40fc) SHA1(4b4508131dca6d811694ae6379f41364c477de58)) - ROM_LOAD("ax370paint.rom", 0x1c000, 0x10000, CRC(18956e3a) SHA1(ace202e87337fbc54fea21e22c0b3af0abe6f4ae)) - ROM_LOAD("ax370disk.rom", 0x2c000, 0x4000, CRC(60f8baba) SHA1(95de8809d2758fc0a743390ea5085b602e59e101)) -ROM_END - -void msx2_state::ax370(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); /* Bios */ - add_internal_slot(config, MSX_SLOT_ROM, "swp", 0, 2, 1, 2, "maincpu", 0x14000); /* SWP */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); /* Ext */ - add_internal_slot(config, MSX_SLOT_ROM, "arab", 3, 1, 1, 2, "maincpu", 0xc000); /* Arab */ - add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0x2c000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "paint", 3, 3, 0, 4, "maincpu", 0x1c000); /* Paint */ - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Canon V-25 */ - -ROM_START(canonv25) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("v25bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("v25ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) -ROM_END - -void msx2_state::canonv25(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-1985 MSX Engine - // 64KB VRAM - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); // BIOS - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); // EXT - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM - - MSX_S1985(config, "s1985", 0); - - msx2_64kb_vram(config); -} - -/* MSX2 - Canon V-30 */ - -ROM_START(canonv30) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("v30bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("v30ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("v30disk.rom", 0xc000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) -ROM_END - -void msx2_state::canonv30(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: ??, 2 3.5" DSDD drive - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); // BIOS - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); // EXT - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); // DISK - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); // 64KB?? Mapper RAM - - MSX_S1985(config, "s1985", 0); - - msx_wd2793(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Canon V-30F */ - -ROM_START(canonv30f) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("v30fbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("v30fext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("v30fdisk.rom", 0xc000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) -ROM_END - -void msx2_state::canonv30f(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: ??, 2 3.5" DSDD drive - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); // BIOS - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); // EXT - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); // DISK - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM - - MSX_S1985(config, "s1985", 0); - - msx_wd2793(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Daewoo CPC-300 */ - -ROM_START(cpc300) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("300bios.rom", 0x0000, 0x8000, CRC(53850907) SHA1(affa3c5cd8db79a1450ad8a7f405a425b251653d)) - ROM_LOAD("300ext.rom", 0x8000, 0x8000, CRC(d64da39c) SHA1(fb51c505adfbc174df94289fa894ef969f5357bc)) - ROM_LOAD("300han.rom", 0x10000, 0x8000, CRC(e78cd87f) SHA1(47a9d9a24e4fc6f9467c6e7d61a02d45f5a753ef)) -ROM_END - -void msx2_state::cpc300(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "han", 0, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 3, 0, 2, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - - MSX_S1985(config, "s1985", 0); -} - -/* MSX2 - Daewoo CPC-300E */ - -// These roms apparently came from a hacked set, see: http://www.vik.cc/bluemsx/blueforum/viewtopic.php?t=1569&start=75 -ROM_START(cpc300e) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("300ebios.rom", 0x0000, 0x8000, BAD_DUMP CRC(53850907) SHA1(affa3c5cd8db79a1450ad8a7f405a425b251653d)) - ROM_LOAD("300eext.rom", 0x8000, 0x8000, BAD_DUMP CRC(d64da39c) SHA1(fb51c505adfbc174df94289fa894ef969f5357bc)) - ROM_LOAD("300ehan.rom", 0x10000, 0x4000, BAD_DUMP CRC(5afea78d) SHA1(f08c91f8c78d681e1f02eaaaaafb87ad81112b60)) -ROM_END - -void msx2_state::cpc300e(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - // No clockchip - // No joystick port?? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "han", 0, 1, 1, 1, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 3, 0, 2, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); -} - -/* MSX2 - Daewoo CPC-330K */ - -ROM_START(cpc330k) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("330kbios.rom", 0x0000, 0x8000, CRC(53850907) SHA1(affa3c5cd8db79a1450ad8a7f405a425b251653d)) - ROM_LOAD("330kext.rom", 0x8000, 0x8000, CRC(5d685cca) SHA1(97afbadd8fe34ab658cce8222a27cdbe19bcef39)) - ROM_LOAD("330khan.rom", 0x10000, 0x4000, CRC(3d6dd335) SHA1(d2b058989a700ca772b9591f42c01ed0f45f74d6)) -ROM_END - -void msx2_state::cpc330k(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-1985 MSX Engine - // Ergonomic keyboard, 2 builtin game controllers - // builtin FM?? builtin SCC?? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "han", 0, 1, 1, 1, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000); /* 128KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 3, 0, 2, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - - MSX_S1985(config, "s1985", 0); -} - -/* MSX2 - Daewoo CPC-400 */ - -ROM_START(cpc400) - ROM_REGION(0x1c000, "maincpu", 0) - ROM_LOAD("400bios.rom", 0x0000, 0x8000, CRC(53850907) SHA1(affa3c5cd8db79a1450ad8a7f405a425b251653d)) - ROM_LOAD("400disk.rom", 0x8000, 0x4000, CRC(5fa517df) SHA1(914f6ccb25d78621186001f2f5e2aaa2d628cd0c)) - ROM_LOAD("400ext.rom", 0xc000, 0x8000, CRC(2ba104a3) SHA1(b6d3649a6647fa9f6bd61efc317485a20901128f)) - ROM_LOAD("400han.rom", 0x14000, 0x8000, CRC(a8ead5e3) SHA1(87936f808423dddfd00629056d6807b4be1dc63e)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("400kfn.rom", 0, 0x20000, CRC(b663c605) SHA1(965f4982790f1817bcbabbb38c8777183b231a55)) -ROM_END - -void msx2_state::cpc400(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: mb8877a, 1 3.5" DS?DD drive - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "han", 0, 1, 1, 2, "maincpu", 0x14000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 3, 0, 2, "maincpu", 0xc000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 2, 0, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - - msx_mb8877a(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Daewoo CPC-400S */ - -ROM_START(cpc400s) - ROM_REGION(0x1c000, "maincpu", 0) - ROM_LOAD("400sbios.rom", 0x0000, 0x8000, CRC(53850907) SHA1(affa3c5cd8db79a1450ad8a7f405a425b251653d)) - ROM_LOAD("400sdisk.rom", 0x8000, 0x4000, CRC(5fa517df) SHA1(914f6ccb25d78621186001f2f5e2aaa2d628cd0c)) - ROM_LOAD("400sext.rom", 0xc000, 0x8000, CRC(2ba104a3) SHA1(b6d3649a6647fa9f6bd61efc317485a20901128f)) - ROM_LOAD("400shan.rom", 0x14000, 0x8000, CRC(975e7a31) SHA1(6a50295ea35e720ba6f4ba5616c3441128b384ed)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("400skfn.rom", 0, 0x20000, CRC(fa85368c) SHA1(30fff22e3e3d464993707488442721a5e56a9707)) -ROM_END - -void msx2_state::cpc400s(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: mb8877a, 1 3.5" DS?DD drive - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "han", 0, 1, 1, 2, "maincpu", 0x14000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 3, 0, 2, "maincpu", 0xc000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 2, 0, 1, 2, "maincpu", 0x8000).set_tags("fdc", "fdc:0", "fdc:1"); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - - MSX_S1985(config, "s1985", 0); - - msx_mb8877a(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Daewoo Zemmix CPC-61 */ - -ROM_START(cpc61) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("61bios.rom", 0x0000, 0x8000, CRC(b80c8e45) SHA1(310a02a9746bc062834e0cf2fabf7f3e0f7e829e)) - ROM_LOAD("61ext.rom", 0x8000, 0x8000, CRC(b3d740b4) SHA1(7121c3c5ee6e4931fceda14a06f4c0e3b8eda437)) - - ROM_REGION(0x40000, "kanji", 0) - ROM_LOAD("61kfn.rom", 0x00000, 0x40000, CRC(9a3cf67c) SHA1(22d5f4e522250dc5eb17e15b68f4a51bb752cba1)) -ROM_END - -void msx2_state::cpc61(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: None, 0 drives - // 1 Cartridge slot - // S-1985 MSX Engine - // No clock chip - // No keyboard, but a keyboard connector - // No printer port - // No cassette port? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM? - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 3, 0, 2, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - - MSX_S1985(config, "s1985", 0); -} - -/* MSX2 - Daewoo Zemmix CPG-120 Normal */ - -ROM_START(cpg120) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("cpg120bios.rom", 0x0000, 0x8000, CRC(b80c8e45) SHA1(310a02a9746bc062834e0cf2fabf7f3e0f7e829e)) - ROM_LOAD("cpg120ext.rom", 0x8000, 0x8000, CRC(b3d740b4) SHA1(7121c3c5ee6e4931fceda14a06f4c0e3b8eda437)) - ROM_LOAD("cpg128music.rom", 0x10000, 0x4000, CRC(73491999) SHA1(b9ee4f30a36e283a2b1b9a28a70ab9b9831570c6)) - - ROM_REGION(0x40000, "kanji", 0) - ROM_LOAD("cpg120kfn.rom", 0x0000, 0x40000, CRC(9a3cf67c) SHA1(22d5f4e522250dc5eb17e15b68f4a51bb752cba1)) -ROM_END - -void msx2_state::cpg120(machine_config &config) -{ - msx2(config); - // YM2149 (in S1985) - // FDC: None, 0 drives - // 2 Cartridge slots? - // S-1985 MSX Engine - // V9958 VDP - // FM built in - // No keyboard, bot a keyboard connector? - // No clock chip - // No printer port - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 3, 0, 2, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 2, 0, 1, 1, "maincpu", 0x10000).set_ym2413_tag("ym2413"); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - - MSX_S1985(config, "s1985", 0); - - msx_ym2413(config); -} - -/* MSX2 - Daewoo Zemmic CPG-120 Turbo */ -/* Same as normal CPG-120 but with CPU running at 5.369317 MHz */ - -/* MSX2 - Fenner FPC-900 */ - -ROM_START(fpc900) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("fpc900bios.rom", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("fpc900ext.rom", 0x8000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) - ROM_LOAD("fpc900disk.rom", 0xc000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) -ROM_END - -void msx2_state::fpc900(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: WD2793?, 1 3.5" DSDD drive - // 2? Cartridge slots - // S-3527 MSX Engine - // 256KB?? VRAM - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x40000); // 256KB? Mapper RAM - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Gradiente Expert 2.0 */ - -ROM_START(expert20) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("exp20bios.rom", 0x0000, 0x8000, CRC(6bacdce4) SHA1(9c43106dba3ae2829e9a11dffa9d000ed6d6454c)) - ROM_LOAD("exp20ext.rom", 0x8000, 0x4000, CRC(08ced880) SHA1(4f2a7e0172f0214f025f23845f6e053d0ffd28e8)) - ROM_LOAD("xbasic2.rom", 0xc000, 0x4000, CRC(2825b1a0) SHA1(47370bec7ca1f0615a54eda548b07fbc0c7ef398)) - ROM_LOAD("microsoldisk.rom", 0x10000, 0x4000, CRC(6704ef81) SHA1(a3028515ed829e900cc8deb403e17b09a38bf9b0)) -ROM_END - -void msx2_state::expert20(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: microsol, 1? 3.5"? DS?DD drive - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 1, 1, 0, 1, "maincpu", 0x8000); /* EXT */ - add_internal_slot(config, MSX_SLOT_ROM, "xbasic", 1, 1, 1, 1, "maincpu", 0xc000); /* XBASIC */ - add_internal_slot(config, MSX_SLOT_DISK5, "disk", 1, 3, 1, 1, "maincpu", 0x10000).set_tags("fdc", "fdc:0", "fdc:1", "fdc:2", "fdc:3"); /* Microsol controller */ - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - - msx_microsol(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Hitachi MB-H70 */ - -ROM_START(mbh70) - ROM_REGION(0x110000, "maincpu", 0) - ROM_LOAD("mbh70bios.rom" , 0x0000, 0x8000, CRC(a27c563d) SHA1(c1e46c00f1e38fc9e0ab487bf0513bd93ce61f3f)) - ROM_LOAD("mbh70ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("mbh70disk.rom", 0xc000, 0x4000, CRC(05661a3f) SHA1(e695fc0c917577a3183901a08ca9e5f9c60b8317)) - ROM_LOAD("mbh70halnote.rom", 0x10000, 0x100000, CRC(40313fec) SHA1(1af617bfd11b10a71936c606174a80019762ea71)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("mbh70kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) -ROM_END - -void msx2_state::mbh70(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985) - // FDC: WD2793?, 1? 3.5" DSDD drive - // S-1985 MSX Engine - // 2? Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_SONY08, "firm", 0, 3, 0, 4, "maincpu", 0x10000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM - - MSX_S1985(config, "s1985", 0); - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Kawai KMC-5000 */ - -ROM_START(kmc5000) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("kmc5000bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("kmc5000ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("kmc5000disk.rom", 0xc000, 0x4000, CRC(e25cacca) SHA1(607cfca605eaf82e3efa33459d6583efb7ecc13b)) - ROM_LOAD("kmc5000kdr.rom", 0x10000, 0x8000, CRC(2dbea5ec) SHA1(ea35cc2cad9cfdf56cae224d8ee41579de37f000)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("kmc5000kfn.rom", 0, 0x20000, CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) -ROM_END - -void msx2_state::kmc5000(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985) - // FDC: TC8566AF?, 1? 3.5" DSDD drive - // S-1985 MSX Engine - // 2? Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - MSX_S1985(config, "s1985", 0); - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Mitsubishi ML-G1 */ - -ROM_START(mlg1) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("mlg1bios.rom", 0x0000, 0x8000, CRC(0cc7f817) SHA1(e4fdf518a8b9c8ab4290c21b83be2c347965fc24)) - ROM_LOAD("mlg1ext.rom", 0x8000, 0x4000, CRC(dc0951bd) SHA1(1e9a955943aeea9b1807ddf1250ba6436d8dd276)) - ROM_LOAD("mlg1paint.rom", 0xc000, 0x8000, CRC(64df1750) SHA1(5cf0abca6dbcf940bc33c433ecb4e4ada02fbfe6)) -ROM_END - -void msx2_state::mlg1(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-1985) - // FDC: None, 0 drives - // S-1985 MSX Engine - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 64KB or 128KB Mapper RAM ? - add_internal_slot(config, MSX_SLOT_ROM, "paint", 3, 3, 0, 2, "maincpu", 0xc000); - - MSX_S1985(config, "s1985", 0); -} - -/* MSX2 - Mitsubishi ML-G3 */ - -ROM_START(mlg3) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("mlg3bios.rom", 0x0000, 0x8000, CRC(0cc7f817) SHA1(e4fdf518a8b9c8ab4290c21b83be2c347965fc24)) - ROM_LOAD("mlg3ext.rom", 0x8000, 0x4000, CRC(dc0951bd) SHA1(1e9a955943aeea9b1807ddf1250ba6436d8dd276)) - ROM_LOAD("mlg3disk.rom", 0xc000, 0x4000, CRC(b94ebc7a) SHA1(30ba1144c872a0bb1c91768e75a2c28ab1f4e3c6)) - ROM_LOAD("mlg3rs232c.rom", 0x10000, 0x4000, CRC(90b8a114) SHA1(dc50f2c9db233e505b0981c244ff3de553ac9d68)) -ROM_END - -void msx2_state::mlg3(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-1985) - // FDC: wd2793?, 1 3.5" DSDD drive - // S-1985 MSX Engine - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 64KB or 128KB Mapper RAM? - //add_internal_slot(config, MSX_SLOT_ROM, "rs232c", 3, 3, 1, 1, "maincpu", 0x10000); - - MSX_S1985(config, "s1985", 0); - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Mitsubishi ML-G10 */ - -ROM_START(mlg10) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("mlg10bios.rom", 0x0000, 0x8000, CRC(a27c563d) SHA1(c1e46c00f1e38fc9e0ab487bf0513bd93ce61f3f)) - ROM_LOAD("mlg10ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("mlg10kfn.rom", 0, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) -ROM_END - -void msx2_state::mlg10(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985) - // FDC: None, 0 drives - // S-1985 MSX Engine - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 64KB or 128KB Mapper RAM? - - MSX_S1985(config, "s1985", 0); -} - -/* MSX2 - Mitsubishi ML-G30 Model 1/Model 2 */ - -ROM_START(mlg30) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("g30bios.rom", 0x0000, 0x8000, CRC(a27c563d) SHA1(c1e46c00f1e38fc9e0ab487bf0513bd93ce61f3f)) - ROM_LOAD("g30ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("g30disk.rom", 0xc000, 0x4000, CRC(05661a3f) SHA1(e695fc0c917577a3183901a08ca9e5f9c60b8317)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("g30kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) -ROM_END - -void msx2_state::mlg30(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: wd2793/tc8566af?, 1 or 2? 3.5" DSDD drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); /* Slot 2 subslot 0 */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); /* 64KB Mapper RAM */ - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - National FS-4500 */ - -ROM_START(fs4500) - ROM_REGION(0x40000, "maincpu", 0) - ROM_LOAD("4500bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("4500ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("4500font.rom", 0xc000, 0x4000, CRC(4bd54f95) SHA1(3ce8e35790eb4689b21e14c7ecdd4b63943ee158)) - ROM_LOAD("4500buns.rom", 0x10000, 0x8000, CRC(c9398e11) SHA1(e89ea1e8e583392e2dd9debb8a4b6a162f58ba91)) - ROM_LOAD("4500jush.rom", 0x18000, 0x8000, CRC(4debfd2d) SHA1(6442c1c5cece64c6dae90cc6ae3675f070d93e06)) - ROM_LOAD("4500wor1.rom", 0x20000, 0xc000, CRC(0c8b5cfb) SHA1(3f047469b62d93904005a0ea29092e892724ce0b)) - ROM_LOAD("4500wor2.rom", 0x2c000, 0xc000, CRC(d9909451) SHA1(4c8ea05c09b40c41888fa18db065575a317fda16)) - ROM_LOAD("4500kdr1.rom", 0x38000, 0x4000, CRC(f8c7f0db) SHA1(df07e89fa0b1c7874f9cdf184c136f964fea4ff4)) - ROM_LOAD("4500kdr2.rom", 0x3c000, 0x4000, CRC(69e87c31) SHA1(c63db26660da96af56f8a7d3ea18544b9ae5a37c)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("4500kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) - - /* Matsushita Bunsetsu Henkan ROM must be emulated */ - ROM_REGION(0x20000, "bunsetsu", 0) - ROM_LOAD("4500budi.rom", 0, 0x20000, CRC(f94590f8) SHA1(1ebb06062428fcdc66808a03761818db2bba3c73)) -ROM_END - -void msx2_state::fs4500(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-1985 MSX Engine - // Matsushita switched device - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "font", 0, 2, 0, 1, "maincpu", 0xc000); - add_internal_slot(config, MSX_SLOT_BUNSETSU, "buns", 0, 2, 1, 2, "maincpu", 0x10000).set_bunsetsu_region_tag("bunsetsu"); - add_internal_slot(config, MSX_SLOT_ROM, "jush", 0, 3, 1, 2, "maincpu", 0x18000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "wor1", 3, 0, 0, 3, "maincpu", 0x20000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr1", 3, 0, 3, 1, "maincpu", 0x38000); - add_internal_slot(config, MSX_SLOT_ROM, "wor2", 3, 1, 0, 3, "maincpu", 0x2c000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr2", 3, 1, 3, 1, "maincpu", 0x3c000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ - - MSX_S1985(config, "s1985", 0); - - MSX_MATSUSHITA(config, "matsushita", 0); -} - -/* MSX2 - National FS-4600 */ - -ROM_START(fs4600) - ROM_REGION(0x120000, "maincpu", 0) - ROM_LOAD("4600bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("4600ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("4600disk.rom", 0xc000, 0x4000, CRC(ae4e65b7) SHA1(073feb8bb645d935e099afaf61e6f04f52adee42)) - ROM_LOAD("4600fon1.rom", 0x10000, 0x4000, CRC(7391389b) SHA1(31292b9ca9fe7d1d8833530f44c0a5671bfefe4e)) - ROM_LOAD("4600fon2.rom", 0x14000, 0x4000, CRC(c3a6b445) SHA1(02155fc25c9bd23e1654fe81c74486351e1ecc28)) - ROM_LOAD("4600kdr.rom", 0x18000, 0x8000, CRC(b2db6bf5) SHA1(3a9a942ed888dd641cddf8deada1879c454df3c6)) - ROM_LOAD("4600firm.rom", 0x20000, 0x100000, CRC(1df57472) SHA1(005794c10a4237de3907ba4a44d436078d3c06c2)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("4600kfn.rom", 0, 0x20000, CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) - - /* Matsushita 12 dots Kanji ROM must be emulated */ - ROM_REGION(0x20000, "kanji12", 0) - ROM_LOAD("4600kf12.rom", 0, 0x20000, CRC(340d1ef7) SHA1(a7a23dc01314e88381eee88b4878b39931ab4818)) -ROM_END - -void msx2_state::fs4600(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: mb8877a, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "fon1", 0, 2, 0, 1, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 0, 2, 1, 2, "maincpu", 0x18000); - add_internal_slot(config, MSX_SLOT_ROM, "fon2", 0, 3, 0, 1, "maincpu", 0x14000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_FS4600, "firm", 3, 1, 0, 4, "maincpu", 0x20000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - MSX_S1985(config, "s1985", 0); - - msx_mb8877a(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - National FS-4700 */ - -ROM_START(fs4700) - ROM_REGION(0x44000, "maincpu", 0) - ROM_LOAD("4700bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("4700ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("4700disk.rom", 0xc000, 0x4000, CRC(1e7d6512) SHA1(78cd7f847e77fd8cd51a647efb2725ba93f4c471)) - ROM_LOAD("4700font.rom", 0x10000, 0x4000, CRC(4bd54f95) SHA1(3ce8e35790eb4689b21e14c7ecdd4b63943ee158)) - ROM_LOAD("4700buns.rom", 0x14000, 0x8000, CRC(c9398e11) SHA1(e89ea1e8e583392e2dd9debb8a4b6a162f58ba91)) - ROM_LOAD("4700jush.rom", 0x1c000, 0x8000, CRC(4debfd2d) SHA1(6442c1c5cece64c6dae90cc6ae3675f070d93e06)) - ROM_LOAD("4700wor1.rom", 0x24000, 0xc000, CRC(5f39a727) SHA1(f5af1d2a8bcf247f78847e1a9d995e581df87e8e)) - ROM_LOAD("4700wor2.rom", 0x30000, 0xc000, CRC(d9909451) SHA1(4c8ea05c09b40c41888fa18db065575a317fda16)) - ROM_LOAD("4700kdr1.rom", 0x3c000, 0x4000, CRC(f8c7f0db) SHA1(df07e89fa0b1c7874f9cdf184c136f964fea4ff4)) - ROM_LOAD("4700kdr2.rom", 0x40000, 0x4000, CRC(69e87c31) SHA1(c63db26660da96af56f8a7d3ea18544b9ae5a37c)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("4700kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) - - /* Matsushita Bunsetsu Henkan ROM must be emulated */ - ROM_REGION(0x20000, "bunsetsu", 0) - ROM_LOAD("4700budi.rom", 0, 0x20000, CRC(f94590f8) SHA1(1ebb06062428fcdc66808a03761818db2bba3c73)) -ROM_END - -void msx2_state::fs4700(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: mb8877a, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-1985 MSX Engine - // Matsushita switched device - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "font", 0, 2, 0, 1, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_BUNSETSU, "buns", 0, 2, 1, 2, "maincpu", 0x14000).set_bunsetsu_region_tag("bunsetsu"); - add_internal_slot(config, MSX_SLOT_ROM, "jush", 0, 3, 1, 2, "maincpu", 0x1c000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "wor1", 3, 0, 0, 3, "maincpu", 0x24000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr1", 3, 0, 3, 1, "maincpu", 0x3c000); - add_internal_slot(config, MSX_SLOT_ROM, "wor2", 3, 1, 0, 3, "maincpu", 0x30000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr2", 3, 1, 3, 1, "maincpu", 0x40000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - MSX_S1985(config, "s1985", 0); - - MSX_MATSUSHITA(config, "matsushita", 0); - - msx_mb8877a(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - National FS-5000 */ - -ROM_START(fs5000) - ROM_REGION(0x30000, "maincpu", 0) - ROM_LOAD("5000bios.rom", 0x0000, 0x8000, CRC(a44ea707) SHA1(59967765d6e9328909dee4dac1cbe4cf9d47d315)) - ROM_LOAD("5000ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("5000disk.rom", 0xc000, 0x4000, CRC(ae4e65b7) SHA1(073feb8bb645d935e099afaf61e6f04f52adee42)) - ROM_LOAD("5000rtc.rom", 0x10000, 0x8000, CRC(03351598) SHA1(98bbfa3ab07b7a5cad55d7ddf7cbd9440caa2a86)) - ROM_LOAD("5000kdr.rom", 0x18000, 0x8000, CRC(b2db6bf5) SHA1(3a9a942ed888dd641cddf8deada1879c454df3c6)) - ROM_FILL(0x20000, 0x10000, 0xff) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("5000kfn.rom", 0, 0x20000, CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) -ROM_END - -void msx2_state::fs5000(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: wd2793, 2 3.5" DSDD drives - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "empty1", 0, 1, 0, 4, "maincpu", 0x20000); - add_internal_slot(config, MSX_SLOT_ROM, "empty2", 0, 2, 0, 4, "maincpu", 0x20000); - add_internal_slot(config, MSX_SLOT_ROM, "empty3", 0, 3, 0, 4, "maincpu", 0x20000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 0, 1, 2, "maincpu", 0x18000); - add_internal_slot(config, MSX_SLOT_ROM, "rtcrom", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - MSX_S1985(config, "s1985", 0); - - msx_wd2793_force_ready(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - National FS-5500F2*/ -/* The National FS-5500 had two versions: */ -/* F1 has 1 floppy drive */ -/* F2 has 2 floppy drives */ - -ROM_START(fs5500f1) - ROM_REGION(0x30000, "maincpu", 0) - ROM_LOAD("5500bios.rom", 0x0000, 0x8000, CRC(5bf38e13) SHA1(44e0dd215b2a9f0770dd76fb49187c05b083eed9)) - ROM_LOAD("5500ext.rom", 0x8000, 0x4000, CRC(3c42c367) SHA1(4be8371f3b03e70ddaca495958345f3c4f8e2d36)) - ROM_LOAD("5500disk.rom", 0xc000, 0x4000, CRC(1e7d6512) SHA1(78cd7f847e77fd8cd51a647efb2725ba93f4c471)) - ROM_LOAD("5500imp.rom", 0x10000, 0x8000, CRC(6173a88c) SHA1(b677a861b67e8763a11d5dcf52416b42493ade57)) - ROM_LOAD("5500kdr.rom", 0x18000, 0x8000, CRC(b2db6bf5) SHA1(3a9a942ed888dd641cddf8deada1879c454df3c6)) - ROM_FILL(0x20000, 0x10000, 0xff) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("5500kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) -ROM_END - -void msx2_state::fs5500f1(machine_config &config) -{ - msx2(config); - // YM2149 in (S-1985 MSX Engine) - // FDC: mb8877a, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-1985 MSX Engine - // Matsushita switched device - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "empty1", 0, 1, 0, 4, "maincpu", 0x20000); - add_internal_slot(config, MSX_SLOT_ROM, "empty2", 0, 2, 0, 4, "maincpu", 0x20000); - add_internal_slot(config, MSX_SLOT_ROM, "empty3", 0, 3, 0, 4, "maincpu", 0x20000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 0, 1, 2, "maincpu", 0x18000); - add_internal_slot(config, MSX_SLOT_ROM, "imp", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - MSX_S1985(config, "s1985", 0); - - MSX_MATSUSHITA(config, "matsushita", 0); - - msx_mb8877a(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - National FS-5500F2*/ -/* The National FS-5500 had two versions: */ -/* F1 has 1 floppy drive */ -/* F2 has 2 floppy drives */ - -ROM_START(fs5500f2) - ROM_REGION(0x30000, "maincpu", 0) - ROM_LOAD("5500bios.rom", 0x0000, 0x8000, CRC(5bf38e13) SHA1(44e0dd215b2a9f0770dd76fb49187c05b083eed9)) - ROM_LOAD("5500ext.rom", 0x8000, 0x4000, CRC(3c42c367) SHA1(4be8371f3b03e70ddaca495958345f3c4f8e2d36)) - ROM_LOAD("5500disk.rom", 0xc000, 0x4000, CRC(1e7d6512) SHA1(78cd7f847e77fd8cd51a647efb2725ba93f4c471)) - ROM_LOAD("5500imp.rom", 0x10000, 0x8000, CRC(6173a88c) SHA1(b677a861b67e8763a11d5dcf52416b42493ade57)) - ROM_LOAD("5500kdr.rom", 0x18000, 0x8000, CRC(b2db6bf5) SHA1(3a9a942ed888dd641cddf8deada1879c454df3c6)) - ROM_FILL(0x20000, 0x10000, 0xff) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("5500kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) -ROM_END - -void msx2_state::fs5500f2(machine_config &config) -{ - msx2(config); - // YM2149 in (S-1985 MSX Engine) - // FDC: mb8877a, 2 3.5" DSDD drive - // 2 Cartridge slots - // S-1985 MSX Engine - // Matsushita switched device - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "empty1", 0, 1, 0, 4, "maincpu", 0x20000); - add_internal_slot(config, MSX_SLOT_ROM, "empty2", 0, 2, 0, 4, "maincpu", 0x20000); - add_internal_slot(config, MSX_SLOT_ROM, "empty3", 0, 3, 0, 4, "maincpu", 0x20000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 0, 1, 2, "maincpu", 0x18000); - add_internal_slot(config, MSX_SLOT_ROM, "imp", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - MSX_S1985(config, "s1985", 0); - - MSX_MATSUSHITA(config, "matsushita", 0); - - msx_mb8877a(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Panasonic FS-A1 */ - -ROM_START(fsa1) - ROM_REGION(0x20000, "maincpu", 0) - ROM_LOAD("a1bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("a1ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("a1desk1.rom", 0x10000, 0x8000, CRC(99c48147) SHA1(63098f27beac9eca6b39d837d2a552395df33fe1)) - ROM_LOAD("a1desk2.rom", 0x18000, 0x8000, CRC(7f6f4aa1) SHA1(7f5b76605e3d898cc4b5aacf1d7682b82fe84353)) -ROM_END - -void msx2_state::fsa1(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64 KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "desk1", 3, 2, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_ROM, "desk2", 3, 3, 1, 2, "maincpu", 0x18000); -} - -/* MSX2 - Panasonic FS-A1 (a) */ - -ROM_START(fsa1a) - ROM_REGION(0x1c000, "maincpu", 0) - ROM_LOAD("a1bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("a1ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("a1desk1a.rom", 0xc000, 0x8000, CRC(25b5b170) SHA1(d9307bfdaab1312d25e38af7c0d3a7671a9f716b)) - ROM_LOAD("a1desk2.rom", 0x14000, 0x8000, CRC(7f6f4aa1) SHA1(7f5b76605e3d898cc4b5aacf1d7682b82fe84353)) -ROM_END - -void msx2_state::fsa1a(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); /* 64KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "desk1", 3, 2, 1, 2, "maincpu", 0xc000); - add_internal_slot(config, MSX_SLOT_ROM, "desk2", 3, 3, 1, 2, "maincpu", 0x14000); -} - -/* MSX2 - Panasonic FS-A1F */ - -ROM_START(fsa1f) - ROM_REGION(0x20000, "maincpu", 0) - ROM_LOAD("a1fbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("a1fext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("a1fdisk.rom", 0xc000, 0x4000, CRC(e25cacca) SHA1(607cfca605eaf82e3efa33459d6583efb7ecc13b)) - ROM_LOAD("a1fkdr.rom", 0x10000, 0x8000, CRC(2dbea5ec) SHA1(ea35cc2cad9cfdf56cae224d8ee41579de37f000)) - ROM_LOAD("a1fcock.rom", 0x18000, 0x8000, CRC(5c2948cd) SHA1(4a99f2444f29c2b642efd6f084081d6fd96bfa9b)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("a1fkfn.rom", 0, 0x20000, CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) -ROM_END - -void msx2_state::fsa1f(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "fkdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "fcock", 3, 3, 1, 2, "maincpu", 0x18000); - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Panasonic FS-A1FM */ - -ROM_START(fsa1fm) - ROM_REGION(0x110000, "maincpu", 0) - ROM_LOAD("a1fmbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("a1fmext.rom", 0x8000, 0x4000, CRC(ad295b5d) SHA1(d552319a19814494e3016de4b8f010e8f7b97e02)) - ROM_LOAD("a1fmdisk.rom", 0xc000, 0x4000, CRC(e25cacca) SHA1(607cfca605eaf82e3efa33459d6583efb7ecc13b)) - ROM_LOAD("a1fmfirm.rom", 0x10000, 0x100000, CRC(8ce0ece7) SHA1(f89e3d8f3b6855c29d71d3149cc762e0f6918ad5)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("a1fmkfn.rom", 0, 0x20000, CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) - - /* Matsushita 12 dots Kanji ROM must be emulated */ - ROM_REGION(0x20000, "kanji12", 0) - ROM_LOAD("a1fmkf12.rom", 0, 0x20000, CRC(340d1ef7) SHA1(a7a23dc01314e88381eee88b4878b39931ab4818)) -ROM_END - -void msx2_state::fsa1fm(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive - // 2 Cartridge slots - // Integrated 1200baud modem - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); -/* MSX_LAYOUT_SLOT (3, 1, 1, 4, MODEM_ROM, 0x20000, 0x10000) */ /* Modem Mapper of FS-CM1/A1FM must be emulated */ - add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); -/* MSX_LAYOUT_SLOT (3, 3, 0, 4, FSA1FM_ROM, 0x100000, 0x10000) */ /* Panasonic FS-A1FM Mapper must be emulated */ - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Panasonic FS-A1MK2 */ - -ROM_START(fsa1mk2) - ROM_REGION(0x20000, "maincpu", 0) - ROM_LOAD("a1mkbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("a1mk2ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("a1mkcoc1.rom", 0xc000, 0x8000, CRC(0eda3f57) SHA1(2752cd89754c05abdf7c23cba132d38e3ef0f27d)) - ROM_LOAD("a1mkcoc2.rom", 0x14000, 0x4000, CRC(756d7128) SHA1(e194d290ebfa4595ce0349ea2fc15442508485b0)) - ROM_LOAD("a1mkcoc3.rom", 0x18000, 0x8000, CRC(c1945676) SHA1(a3f4e2e4934074925d775afe30ac72f150ede543)) -ROM_END - -void msx2_state::fsa1mk2(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64 KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "coc1", 3, 1, 1, 2, "maincpu", 0xc000); - add_internal_slot(config, MSX_SLOT_ROM, "coc2", 3, 2, 1, 1, "maincpu", 0x14000); - add_internal_slot(config, MSX_SLOT_ROM, "coc3", 3, 3, 1, 2, "maincpu", 0x18000); -} - -/* MSX2 - Philips NMS-8220 - 2 possible sets (/00 /16) */ - -ROM_START(nms8220) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8220bios.rom.u14", 0x0000, 0x8000, BAD_DUMP CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("8220ext.rom.u14", 0x8000, 0x4000, BAD_DUMP CRC(06e4f5e6) SHA1(f5eb0a396097572589f2a6efeed045044e9425e4)) - ROM_LOAD("8220pen.rom.u13", 0xc000, 0x4000, CRC(3d38c53e) SHA1(cb754aed85b3e97a7d3c5894310df7ca18f89f41)) -ROM_END - -void msx2_state::nms8220(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000).set_ramio_bits(0xf8); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "pen", 3, 3, 1, 1, "maincpu", 0xc000); -} - -/* MSX2 - Philips NMS-8220 (a) */ - -ROM_START(nms8220a) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8220bios.rom.u14", 0x0000, 0x8000, BAD_DUMP CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("8220ext.rom.u14", 0x8000, 0x4000, BAD_DUMP CRC(06e4f5e6) SHA1(f5eb0a396097572589f2a6efeed045044e9425e4)) - ROM_LOAD("8220pena.rom.u13", 0xc000, 0x4000, CRC(17817b5a) SHA1(5df95d033ae70b107697b69470126ce1b7ae9eb5)) -ROM_END - -void msx2_state::nms8220a(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000).set_ramio_bits(0xf8); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "pen", 3, 3, 1, 1, "maincpu", 0xc000); -} - -/* MSX2 - Philips NMS-8245 - 2 possible sets (/00 /16) */ -/* /00 - A16 = 0 */ -/* /16 - A16 = 1 */ -/* /19 - Azerty keyboard */ - -ROM_START(nms8245) - ROM_REGION(0x20000, "maincpu", 0) - ROM_LOAD("nms8245.u7", 0x0000, 0x20000, BAD_DUMP CRC(0c827d5f) SHA1(064e706cb1f12b99b329944ceeedc0efc3b2d9be)) -ROM_END - -void msx2_state::nms8245(machine_config &config) -{ - msx2_pal(config); - // XTAL: 21328.1 (different from default) - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips NMS-8245F */ -/* NMS-8245/19? */ - -ROM_START(nms8245f) - ROM_REGION(0x20000, "maincpu", 0) - ROM_LOAD("nms8245.u7", 0x0000, 0x20000, BAD_DUMP CRC(0c827d5f) SHA1(064e706cb1f12b99b329944ceeedc0efc3b2d9be)) -ROM_END - -void msx2_state::nms8245f(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x10000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x18000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0x1c000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips NMS-8250 */ -/* Labels taken from an NMS-8250/00 */ - -ROM_START(nms8250) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("d23c256eac.ic119", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("d23128ec.ic118", 0x8000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) - ROM_LOAD("jq00014.ic117", 0xc000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) -ROM_END - -void msx2_state::nms8250(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips NMS-8250F */ - -ROM_START(nms8250f) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("nms8250fbios.rom", 0x0000, 0x8000, CRC(5cd35ced) SHA1(b034764e6a8978db60b1d652917f5e24a66a7925)) - ROM_LOAD("nms8250fext.rom", 0x8000, 0x4000, CRC(781ba055) SHA1(fd4bcc81a8160a1dea06036c5f79d200f948f4d6)) - ROM_LOAD("nms8250fdisk.rom", 0xc000, 0x4000, CRC(13b60725) SHA1(58ba1887e8fd21c912b6859cae6514bd874ffcca)) -ROM_END - -void msx2_state::nms8250f(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips NMS-8250J */ - -ROM_START(nms8250j) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8250jbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("8250jext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("8250jdisk.rom", 0xc000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("8250jkfn.rom", 0x00000, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) -ROM_END - -void msx2_state::nms8250j(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: wd2793?, 1 3.5" DSDD drive - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips NMS-8255 */ - -ROM_START(nms8255) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8255bios.rom.ic119", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("8255ext.rom.ic118", 0x8000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) - ROM_LOAD("8255disk.rom.ic117", 0xc000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) -ROM_END - -void msx2_state::nms8255(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793, 2 3.5" DSDD drives - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips NMS-8255F */ - -ROM_START(nms8255f) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("nms8255fbios.rom", 0x0000, 0x8000, CRC(5cd35ced) SHA1(b034764e6a8978db60b1d652917f5e24a66a7925)) - ROM_LOAD("nms8255fext.rom", 0x8000, 0x4000, CRC(781ba055) SHA1(fd4bcc81a8160a1dea06036c5f79d200f948f4d6)) - ROM_LOAD("nms8255fdisk.rom", 0xc000, 0x4000, CRC(13b60725) SHA1(58ba1887e8fd21c912b6859cae6514bd874ffcca)) -ROM_END - -void msx2_state::nms8255f(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793, 2 3.5" DSDD drives - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips NMS-8260 */ -/* Prototype created by JVC for Philips. Based on an NMS-8250 with the floppy drive removed and replaced with a 20MB JVC harddisk */ - -ROM_START(nms8260) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("nms8260bios.rom", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("nms8260ext.rom", 0x8000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) - ROM_LOAD("nms8260disk.rom", 0xc000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) - ROM_LOAD("nms8260hdd.rom", 0x10000, 0x4000, CRC(0051afc3) SHA1(77f9fe964f6d8cb8c4af3b5fe63ce6591d5288e6)) -ROM_END - -void msx2_state::nms8260(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793, 1 3.5" DSDD drives - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "hdd", 2, 0, 1, 1, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - // There is actually only an FDC inside the real thing. With a floppy controller to attach an external floppy drive - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips NMS-8270 - Not confirmed to exist yet */ - -/* MSX2 - Philips NMS-8280 - 2 possible sets (/00 /16) */ - -ROM_START(nms8280) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8280bios.rom.ic119", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("8280ext.rom.ic118", 0x8000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) - ROM_LOAD("8280disk.rom.ic117", 0xc000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) -ROM_END - -void msx2_state::nms8280(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: wd2793, 2 3.5" DSDD drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips NMS-8280F */ - -ROM_START(nms8280f) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8280fbios.rom", 0x0000, 0x8000, CRC(5cd35ced) SHA1(b034764e6a8978db60b1d652917f5e24a66a7925)) - ROM_LOAD("8280fext.rom", 0x8000, 0x4000, CRC(781ba055) SHA1(fd4bcc81a8160a1dea06036c5f79d200f948f4d6)) - ROM_LOAD("8280fdisk.rom", 0xc000, 0x4000, CRC(13b60725) SHA1(58ba1887e8fd21c912b6859cae6514bd874ffcca)) -ROM_END - -void msx2_state::nms8280f(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: wd2793, 2 3.5" DSDD drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips NMS-8280G */ - -ROM_START(nms8280g) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8280gbios.rom.ic119", 0x0000, 0x8000, CRC(8fa060e2) SHA1(b17d9bea0eb16a1aa2d0ccbd7c9488da9f57698e)) - ROM_LOAD("8280gext.rom.ic118", 0x8000, 0x4000, CRC(41e36d03) SHA1(4ab7b2030d022f5486abaab22aaeaf8aa23e05f3)) - ROM_LOAD("8280gdisk.rom.ic117", 0xc000, 0x4000, CRC(d0beebb8) SHA1(d1001f93c87ff7fb389e418e33bf7bc81bdbb65f)) -ROM_END - -void msx2_state::nms8280g(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: wd2793, 2 3.5" DSDD drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips VG-8230 (u11 - exp, u12 - basic, u13 - disk */ - -ROM_START(vg8230) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8230bios.rom.u12", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) - ROM_LOAD("8230ext.rom.u11", 0x8000, 0x4000, CRC(8f84f783) SHA1(3288894e1be6af705871499b23c85732dbc40993)) - ROM_LOAD("8230disk.rom.u13", 0xc000, 0x4000, CRC(77c4e5bc) SHA1(849f93867ff7846b27f84d0be418569faf058ac2)) -ROM_END - -void msx2_state::vg8230(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793, 1 3.5" SSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000).set_ramio_bits(0xf8); /* 64KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_1_35_ssdd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips VG-8230J */ - -ROM_START(vg8230j) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8230jbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("8230jext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("8230jdisk.rom", 0xc000, 0x4000, CRC(7639758a) SHA1(0f5798850d11b316a4254b222ca08cc4ad6d4da2)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("8230jkfn.rom", 0x00000, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) -ROM_END - -void msx2_state::vg8230j(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: wd2793?, 1 3.5" SSDD drive? - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_1_35_ssdd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips VG-8235 3 psosible basic and ext roms (/00 /02 /19) */ - -ROM_START(vg8235) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8235bios.rom.u48", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("8235ext.rom.u49", 0x8000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) - ROM_LOAD("8235disk.rom.u50", 0xc000, 0x4000, CRC(51daeb25) SHA1(8954e59aa79310c7b719ecf0cde1e82fb731dcd1)) -ROM_END - -void msx2_state::vg8235(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793, 1 3.5" SSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_1_35_ssdd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips VG-8235F */ - -ROM_START(vg8235f) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8235fbios.rom.u48", 0x0000, 0x8000, CRC(c0577a50) SHA1(3926cdd91fa89657a811463e48cfbdb350676e51)) - ROM_LOAD("8235fext.rom.u49", 0x8000, 0x4000, CRC(e235d5c8) SHA1(792e6b2814ab783d06c7576c1e3ccd6a9bbac34a)) - ROM_LOAD("8235fdisk.rom.u50", 0xc000, 0x4000, CRC(77c4e5bc) SHA1(849f93867ff7846b27f84d0be418569faf058ac2)) -ROM_END - -void msx2_state::vg8235f(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793, 1 3.5" SSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); /* 128KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_1_35_ssdd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Philips VG-8240 */ - -ROM_START(vg8240) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("8240bios.rom", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("8240ext.rom", 0x8000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) - ROM_LOAD("8240disk.rom", 0xc000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) -ROM_END - -void msx2_state::vg8240(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000).set_ramio_bits(0xf8); /* 64KB Mapper RAM */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sanyo MPC-2300 */ - -ROM_START(mpc2300) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("2300bios.rom", 0x0000, 0x8000, CRC(e7d08e29) SHA1(0f851ee7a1cf79819f61cc89e9948ee72a413802)) - ROM_LOAD("2300ext.rom", 0x8000, 0x4000, CRC(3d7dc718) SHA1(e1f834b28c3ee7c9f79fe6fbf2b23c8a0617892b)) -ROM_END - -void msx2_state::mpc2300(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000); /* 128KB?? Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); -} - -/* MSX2 - Sanyo MPC-2500FD */ - -ROM_START(mpc2500f) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("mpc2500fdbios.rom", 0x0000, 0x8000, CRC(e7d08e29) SHA1(0f851ee7a1cf79819f61cc89e9948ee72a413802)) - ROM_LOAD("mpc2500fdext.rom", 0x8000, 0x4000, CRC(3d7dc718) SHA1(e1f834b28c3ee7c9f79fe6fbf2b23c8a0617892b)) - ROM_LOAD("mpc2500fddisk.rom", 0xc000, 0x4000, CRC(38454059) SHA1(58ac78bba29a06645ca8d6a94ef2ac68b743ad32)) -ROM_END - -void msx2_state::mpc2500f(machine_config &config) -{ - msx2(config); - // YM2149 - // FDC: wd2793?, 1? 3.5" DSDD drive? - // 2 Cartridge slots? - // S-3527 MSX Eninge - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 2, 3, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 1, 1, 2, "maincpu", 0xC000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); /* 64KB?? Mapper RAM */ - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sanyo Wavy MPC-25FD */ - -ROM_START(mpc25fd) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("25fdbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("25fdext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("25fddisk.rom", 0xc000, 0x4000, CRC(38454059) SHA1(58ac78bba29a06645ca8d6a94ef2ac68b743ad32)) -ROM_END - -void msx2_state::mpc25fd(machine_config &config) -{ - msx2(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793, 1 drive - // 1 Cartridge slot (slot 1) - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 2, 3, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); /* 128KB?? RAM */ - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sanyo Wavy MPC-27 */ - -ROM_START(mpc27) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("mpc27bios.rom", 0x0000, 0x8000, CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) - ROM_LOAD("mpc27ext.rom", 0x8000, 0x4000, CRC(90ca25b5) SHA1(fd9fa78bac25aa3c0792425b21d14e364cf7eea4)) - ROM_LOAD("mpc27disk.rom", 0xc000, 0x4000, CRC(38454059) SHA1(58ac78bba29a06645ca8d6a94ef2ac68b743ad32)) - ROM_LOAD("mlp27.rom", 0x10000, 0x2000, CRC(8f9e6ba0) SHA1(c3a47480c9dd2235f40f9a53dab68e3c48adca01)) - ROM_RELOAD(0x12000, 0x2000) -ROM_END - -void msx2_state::mpc27(machine_config &config) -{ - msx2(config); - // YM2149 (in S-3527 MSX Engine) - // FDC: wd2793?, 1 drive - // 2 Cartridge slots? - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000); /* 128KB?? RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 2, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "lpen", 3, 3, 1, 1, "maincpu", 0x10000); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sanyo Wavy PHC-23 = PHC-23J(B)*/ - -ROM_START(phc23) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("23bios.rom", 0x0000, 0x8000, CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) - ROM_LOAD("23ext.rom", 0x8000, 0x4000, CRC(90ca25b5) SHA1(fd9fa78bac25aa3c0792425b21d14e364cf7eea4)) -ROM_END - -void msx2_state::phc23(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); /* 64KB RAM */ - - MSX_S1985(config, "s1985", 0); -} - -/* MSX2 - Sanyo Wavy PHC-55FD2 */ - -ROM_START(phc55fd2) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("phc55fd2bios.rom", 0x0000, 0x8000, CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) - ROM_LOAD("phc55fd2ext.rom", 0x8000, 0x4000, CRC(90ca25b5) SHA1(fd9fa78bac25aa3c0792425b21d14e364cf7eea4)) - ROM_LOAD("phc55fd2disk.rom", 0xc000, 0x4000, CRC(38454059) SHA1(58ac78bba29a06645ca8d6a94ef2ac68b743ad32)) -ROM_END - -void msx2_state::phc55fd2(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: wd2793?, 2 3.5" DSDD drives - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000); /* 128KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 2, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - MSX_S1985(config, "s1985", 0); - - msx_wd2793_force_ready(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sanyo Wavy PHC-77 */ - -ROM_START(phc77) - ROM_REGION(0x90000, "maincpu", 0) - ROM_LOAD("phc77bios.rom", 0x0000, 0x8000, CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) - ROM_LOAD("phc77ext.rom", 0x8000, 0x4000, CRC(90ca25b5) SHA1(fd9fa78bac25aa3c0792425b21d14e364cf7eea4)) - ROM_LOAD("phc77disk.rom", 0xc000, 0x4000, CRC(38454059) SHA1(58ac78bba29a06645ca8d6a94ef2ac68b743ad32)) - ROM_LOAD("phc77msxwrite.rom", 0x10000, 0x80000, CRC(ef02e4f3) SHA1(4180544158a57c99162269e33e4f2c77c9fce84e)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("phc77kfn.rom", 0x0000, 0x20000, CRC(3b8fdf44) SHA1(fc71561a64f73da0e0043d256f67fd18d7fc3a7f)) -ROM_END - -void msx2_state::phc77(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: wd2793?, 1 drive - // 2 Cartridge slots - // S-1985 MSX Engine - // Builtin printer - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); /* 64KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 2, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "write", 3, 3, 1, 2, "maincpu", 0x10000); - - MSX_S1985(config, "s1985", 0); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sharp Epcom HotBit 2.0 */ - -ROM_START(hotbit20) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("hb2bios.rom", 0x0000, 0x8000, CRC(0160e8c9) SHA1(d0cfc35f22b150a1cb10decae4841dfe63b78251)) - ROM_LOAD("hb2ext.rom", 0x8000, 0x4000, CRC(08ced880) SHA1(4f2a7e0172f0214f025f23845f6e053d0ffd28e8)) - ROM_LOAD("xbasic2.rom", 0xc000, 0x4000, CRC(2825b1a0) SHA1(47370bec7ca1f0615a54eda548b07fbc0c7ef398)) - ROM_LOAD("microsoldisk.rom", 0x10000, 0x4000, CRC(6704ef81) SHA1(a3028515ed829e900cc8deb403e17b09a38bf9b0)) -ROM_END - -void msx2_state::hotbit20(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: microsol, 1 or 2 drives? - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 1, 1, 0, 1, "maincpu", 0x8000); /* EXT */ - add_internal_slot(config, MSX_SLOT_ROM, "xbasic", 1, 1, 1, 1, "maincpu", 0xc000); /* XBASIC */ - add_internal_slot(config, MSX_SLOT_DISK5, "disk", 1, 3, 1, 1, "maincpu", 0x10000).set_tags("fdc", "fdc:0", "fdc:1", "fdc:2", "fdc:3"); /* Microsol controller */ - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - - msx_microsol(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sony HB-F1 */ - -ROM_START(hbf1) - ROM_REGION(0x20000, "maincpu", 0) - ROM_LOAD("f1bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("f1ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("f1note1.rom", 0xc000, 0x4000, CRC(84810ea8) SHA1(9db72bb78792595a12499c821048504dc96ef848)) - ROM_LOAD("f1note2.rom", 0x10000, 0x8000, CRC(e32e5ee0) SHA1(aa78fc9bcd2343f84cf790310a768ee47f90c841)) - ROM_LOAD("f1note3.rom", 0x18000, 0x8000, CRC(73eb9329) SHA1(58accf41a90693874b86ce98d8d43c27beb8b6dc)) -ROM_END - -void msx2_state::hbf1(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "note1", 3, 0, 1, 1, "maincpu", 0xc000); - add_internal_slot(config, MSX_SLOT_ROM, "note2", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_ROM, "note3", 3, 2, 1, 2, "maincpu", 0x18000); - add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 3, 0, 4); /* 64KB RAM */ -} - -/* MSX2 - Sony HB-F1II */ - -ROM_START(hbf12) - ROM_REGION(0x20000, "maincpu", 0) - ROM_LOAD("f12bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("f12ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("f12note1.rom", 0xc000, 0x4000, CRC(dcacf970) SHA1(30d914cda2180889a40a3328e0a0c1327f4eaa10)) - ROM_LOAD("f12note2.rom", 0x10000, 0x8000, CRC(b0241a61) SHA1(ed2fea5c2a3c2e58d4f69f9d636e08574486a2b1)) - ROM_LOAD("f12note3.rom", 0x18000, 0x8000, CRC(44a10e6a) SHA1(917d1c079e03c4a44de864f123d03c4e32c8daae)) -ROM_END - -void msx2_state::hbf12(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "note1", 3, 0, 1, 1, "maincpu", 0xc000); - add_internal_slot(config, MSX_SLOT_ROM, "note2", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_ROM, "note3", 3, 2, 1, 2, "maincpu", 0x18000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ -} - -/* MSX2 - Sony HB-F1XD */ - -ROM_START(hbf1xd) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("f1xdbios.rom.ic27", 0x0000, 0x8000, BAD_DUMP CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) - ROM_LOAD("f1xdext.rom.ic27", 0x8000, 0x4000, BAD_DUMP CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("f1xddisk.rom.ic27", 0xc000, 0x4000, BAD_DUMP CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) -ROM_END - -void msx2_state::hbf1xd(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1895 MSX Engine) - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - - MSX_S1985(config, "s1985", 0); - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sony HB-F1XDMK2 */ - -ROM_START(hbf1xdm2) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("f1m2bios.rom.ic27", 0x0000, 0x8000, BAD_DUMP CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) - ROM_LOAD("f1m2ext.rom.ic27", 0x8000, 0x4000, BAD_DUMP CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("f1m2disk.rom.ic27", 0xc000, 0x4000, BAD_DUMP CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) -ROM_END - -void msx2_state::hbf1xdm2(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sony HB-F5 */ - -ROM_START(hbf5) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("hbf5bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("hbf5ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("hbf5note.rom", 0xc000, 0x4000, CRC(0cdc0777) SHA1(06ba91d6732ee8a2ecd5dcc38b0ce42403d86708)) -ROM_END - -void msx2_state::hbf5(machine_config &config) -{ - msx2_pal(config); - // YM2149 - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "note", 0, 1, 1, 1, "maincpu", 0xc000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x10000); /* 64KB?? Mapper RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); -} - -/* MSX2 - Sony HB-F500 */ - -ROM_START(hbf500) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("f500bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("f500ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("f500disk.rom", 0xc000, 0x4000, CRC(f7f5b0ea) SHA1(e93b8da1e8dddbb3742292b0e5e58731b90e9313)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("f500kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) -ROM_END - -void msx2_state::hbf500(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); /* 32KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 0, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM, "ram2", 0, 2, 0, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sony HB-F500F */ - -ROM_START(hbf500f) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("hbf500fbios.rom", 0x0000, 0x8000, CRC(440dae3c) SHA1(fedd9b682d056ddd1e9b3d281723e12f859b2e69)) - ROM_LOAD("hbf500fext.rom", 0x8000, 0x4000, CRC(e235d5c8) SHA1(792e6b2814ab783d06c7576c1e3ccd6a9bbac34a)) - ROM_LOAD("hbf500fdisk.rom", 0xc000, 0x4000, CRC(6e718f5c) SHA1(0e081572f84555dc13bdb0c7044a19d6c164d985)) -ROM_END - -void msx2_state::hbf500f(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: wd2793, 1 3.5" DSDD drive - // 3 Cartridge slots or 2 Cartridge slots and 1 expansion slot ? - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); /* 32KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 0, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM, "ram2", 0, 2, 0, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); -} - -/* MSX2 - Sony HB-F500P */ - -ROM_START(hbf500p) - ROM_REGION(0x1c000, "maincpu", 0) - ROM_LOAD("500pbios.rom.ic41", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) - ROM_LOAD("500pext.ic47", 0x8000, 0x8000, CRC(cdd4824a) SHA1(505031f1e8396a6e0cb11c1540e6e7f6999d1191)) - ROM_FILL(0x10000, 0xc000, 0xff) -ROM_END - -void msx2_state::hbf500p(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: wd2793, 1 3.5" DSDD drive - // 3 Cartridge slots or 2 Cartridge slots and 1 expansion slot ? - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); /* 32KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 0, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM, "ram2", 0, 2, 0, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "empty", 3, 0, 0, 4, "maincpu", 0xc000); // Empty? or is this the 3rd cartridge/expansion slot ? -} - -/* MSX2 - Sony HB-F700D */ - -ROM_START(hbf700d) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("700dbios.rom.ic5", 0x0000, 0x8000, CRC(e975aa79) SHA1(cef16eb95502ba6ab2265fcafcedde470a101541)) - ROM_LOAD("700dext.ic6", 0x8000, 0x8000, CRC(100cf756) SHA1(317722fa36c2ed31c07c5218b43490fd5badf1f8)) -ROM_END - -void msx2_state::hbf700d(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); /* 256KB Mapper RAM */ - - MSX_S1985(config, "s1985", 0); - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sony HB-F700F */ - -ROM_START(hbf700f) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("700fbios.ic5", 0x0000, 0x8000, CRC(440dae3c) SHA1(fedd9b682d056ddd1e9b3d281723e12f859b2e69)) - ROM_LOAD("700fext.ic6", 0x8000, 0x8000, CRC(7c8b07b1) SHA1(ecacb20ba0a9bbd25e8c0f128d64dd66f8cd8bee)) -ROM_END - -void msx2_state::hbf700f(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); /* 256KB Mapper RAM */ - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sony HB-F700P */ - -ROM_START(hbf700p) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("700pbios.rom.ic5", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) - ROM_LOAD("700pext.ic6", 0x8000, 0x8000, CRC(63e1bffc) SHA1(496698a60432490dc1306c8cc1d4a6ded275261a)) -ROM_END - -void msx2_state::hbf700p(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); /* 256KB Mapper RAM */ - - MSX_S1985(config, "s1985", 0); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sony HB-F700S */ - -ROM_START(hbf700s) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("700sbios.rom.ic5", 0x0000, 0x8000, CRC(c2b889a5) SHA1(4811956f878c3e03da46317f787cdc4bebc86f47)) - ROM_LOAD("700sext.ic6", 0x8000, 0x8000, CRC(28d1badf) SHA1(ae3ed88a2d7034178e08f7bdf5409f462bf67fc9)) -ROM_END - -void msx2_state::hbf700s(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); /* 256KB Mapper RAM */ - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sony HB-F900 */ -ROM_START(hbf900) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("f900bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("f900ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("f900disk.rom", 0xc000, 0x4000, CRC(f83d0ea6) SHA1(fc760d1d7b16370abc7eea39955f230b95b37df6)) - ROM_LOAD("f900util.rom", 0x10000, 0x4000, CRC(bc6c7c66) SHA1(558b7383544542cf7333700ff90c3efbf93ba2a3)) - ROM_FILL(0x14000, 0x4000, 0x00) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("f900kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) -ROM_END - -void msx2_state::hbf900(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: wd2793, 2 3.5" DSDD drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 1, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); /* 256KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "empty", 3, 3, 1, 1, "maincpu", 0x14000); // Empty/unknown, optional fmpac rom used to be loaded here, or should the util rom be loaded? - - msx_wd2793_force_ready(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sony HB-F900 (a) */ -ROM_START(hbf900a) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("f900bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("f900ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("f900disa.rom", 0xc000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) - ROM_LOAD("f900util.rom", 0x10000, 0x4000, CRC(bc6c7c66) SHA1(558b7383544542cf7333700ff90c3efbf93ba2a3)) - ROM_FILL(0x14000, 0x4000, 0x00) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("f900kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) -ROM_END - -void msx2_state::hbf900a(machine_config &config) -{ - msx2(config); - // AY8910/YM2149? - // FDC: wd2793, 2 3.5" DSDD drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 1, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); /* 256KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "empty", 3, 3, 1, 1, "maincpu", 0x14000); // Empty/unknown, optional fmpac rom used to be loaded here, or should the util rom be loaded? - - msx_wd2793(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sony HB-F9P */ - -ROM_START(hbf9p) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("f9pbios.rom.ic11", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) - ROM_LOAD("f9pfirm1.ic12", 0x8000, 0x8000, CRC(524f67aa) SHA1(41a186afced50ca6312cb5b6c4adb684faca6232)) - ROM_LOAD("f9pfirm2.rom.ic13", 0x10000, 0x8000, CRC(ea97069f) SHA1(2d1880d1f5a6944fcb1b198b997a3d90ecd1903d)) -ROM_END - -void msx2_state::hbf9p(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "firm1", 3, 0, 0, 2, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "firm2", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - - MSX_S1985(config, "s1985", 0); -} - -/* MSX2 - Sony HB-F9P Russian */ - -ROM_START(hbf9pr) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("f9prbios.rom", 0x0000, 0x8000, CRC(39d7674a) SHA1(47642bb0a2c46a82100543dc3970d0a49fc53b69)) - ROM_LOAD("f9prext.rom", 0x8000, 0x4000, CRC(8b966f50) SHA1(65253cb38ab11084f355a2d4ad78fa6c64cbe660)) -ROM_END - -void msx2_state::hbf9pr(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); /* 128KB Mapper RAM */ - - MSX_S1985(config, "s1985", 0); -} - -/* MSX2 - Sony HB-F9S */ - -ROM_START(hbf9s) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("f9sbios.ic11", 0x0000, 0x8000, CRC(c2b889a5) SHA1(4811956f878c3e03da46317f787cdc4bebc86f47)) - ROM_LOAD("f9sfirm1.ic12", 0x8000, 0x8000, CRC(cf39620b) SHA1(1166a93d7185ba024bdf2bfa9a30e1c447fb6db1)) - ROM_LOAD("f9sfirm2.ic13", 0x10000, 0x8000, CRC(ea97069f) SHA1(2d1880d1f5a6944fcb1b198b997a3d90ecd1903d)) -ROM_END - -void msx2_state::hbf9s(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "firm1", 3, 0, 0, 2, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "firm2", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - - MSX_S1985(config, "s1985", 0); -} - -/* MSX2 - Sony HB-G900AP */ - -/* IC109 - 32KB Basic ROM SLOT#00 0000-7FFF */ -/* IC112 - 16KB Basic ROM SLOT#01 0000-3FFF */ -/* IC117 - 16KB Disk ROM SLOT#01 4000-7FFF */ -/* IC123 - 32KB ROM RS232C ROM SLOT#02 4000-7FFF / Video Utility ROM SLOT#03 4000-7FFF */ - -/* MSX2 - Sony HB-G900AP */ -ROM_START(hbg900ap) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("g900bios.rom", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) - ROM_LOAD("g900ext.rom", 0x8000, 0x4000, CRC(8f84f783) SHA1(3288894e1be6af705871499b23c85732dbc40993)) - ROM_LOAD("g900disk.rom", 0xc000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) - ROM_LOAD("g900232c.rom", 0x10000, 0x4000, CRC(06cf1da6) SHA1(373aa82d0426830880a7344ef98f7309d93814c7)) - ROM_LOAD("g900util.rom", 0x14000, 0x4000, CRC(d0417c20) SHA1(8779b004e7605a3c419825f0373a5d8fa84e1d5b)) -ROM_END - -void msx2_state::hbg900ap(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 0, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); -/* MSX_LAYOUT_SLOT ("rs232c", 0, 2, 1, 1, "maincpu", 0x10000) */ /* RS232C must be emulated */ - add_internal_slot(config, MSX_SLOT_ROM, "util", 0, 3, 1, 1, "maincpu", 0x14000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x80000).set_ramio_bits(0x80); /* 512KB Mapper RAM */ - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Sony HB-G900P - 3x 32KB ROMs */ - -ROM_START(hbg900p) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("g900bios.rom", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) - ROM_LOAD("g900ext.rom", 0x8000, 0x4000, CRC(8f84f783) SHA1(3288894e1be6af705871499b23c85732dbc40993)) - ROM_LOAD("g900disk.rom", 0xc000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) - ROM_LOAD("g900232c.rom", 0x10000, 0x4000, CRC(06cf1da6) SHA1(373aa82d0426830880a7344ef98f7309d93814c7)) - ROM_LOAD("g900util.rom", 0x14000, 0x4000, CRC(d0417c20) SHA1(8779b004e7605a3c419825f0373a5d8fa84e1d5b)) -ROM_END - -void msx2_state::hbg900p(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 0, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); -/* MSX_LAYOUT_SLOT ("rs232c", 0, 2, 1, 1, "maincpu", 0x10000) */ /* RS232C must be emulated */ - add_internal_slot(config, MSX_SLOT_ROM, "util", 0, 3, 1, 1, "maincpu", 0x14000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Talent TPC-310 */ -ROM_START(tpc310) - ROM_REGION(0x1c000, "maincpu", 0) - ROM_LOAD("tpc310bios.rom", 0x0000, 0x8000, CRC(8cd3e845) SHA1(7bba23669b7abfb6a142f9e1735b847d6e4e8267)) - ROM_LOAD("tpc310ext.rom", 0x8000, 0x4000, CRC(094a9e7a) SHA1(39dfc46260f99b670916b1e55f67a5d4136e6e54)) - ROM_LOAD("dpf550disk.rom", 0xc000, 0x4000, CRC(347b1b44) SHA1(c1d83c559e1e6a6da961eafa55aab105681c634c)) - ROM_LOAD("tpc310turbo.rom", 0x10000, 0x4000, CRC(0ea62a4d) SHA1(181bf58da7184e128cd419da3109b93344a543cf)) - ROM_LOAD("tpc310acc.rom", 0x14000, 0x8000, CRC(4fb8fab3) SHA1(cdeb0ed8adecaaadb78d5a5364fd603238591685)) -ROM_END - -void msx2_state::tpc310(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: mb8877a?, 1 3.5" DSDD drive - // 1 Cartridge slot (slot 2) - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 1, 0, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "turbo", 3, 0, 1, 1, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_ROM, "acc", 3, 1, 1, 2, "maincpu", 0x14000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK2, "disk", 3, 2, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - MSX_S1985(config, "s1985", 0); - - msx_mb8877a(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Talent TPP-311 */ - -ROM_START(tpp311) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("311bios.rom", 0x0000, 0x8000, CRC(8cd3e845) SHA1(7bba23669b7abfb6a142f9e1735b847d6e4e8267)) - ROM_LOAD("311ext.rom", 0x8000, 0x4000, CRC(094a9e7a) SHA1(39dfc46260f99b670916b1e55f67a5d4136e6e54)) - ROM_LOAD("311logo.rom", 0xc000, 0x8000, CRC(0e6ecb9f) SHA1(e45ddc5bf1a1e63756d11fb43fc50276ca35cab0)) -ROM_END - -void msx2_state::tpp311(machine_config &config) -{ - msx2_pal(config, NO_CARTLIST); - // AY8910/YM2149? - // FDC: None, 0 drives - // 0 Cartridge slots? - // 64KB VRAM - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 1, 0, 0, 4).set_total_size(0x10000); /* 64KB?? Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "logo", 2, 0, 1, 2, "maincpu", 0xc000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - - msx2_64kb_vram(config); -} - -/* MSX2 - Talent TPS-312 */ - -ROM_START(tps312) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("312bios.rom", 0x0000, 0x8000, CRC(8cd3e845) SHA1(7bba23669b7abfb6a142f9e1735b847d6e4e8267)) - ROM_LOAD("312ext.rom", 0x8000, 0x4000, CRC(094a9e7a) SHA1(39dfc46260f99b670916b1e55f67a5d4136e6e54)) - ROM_LOAD("312plan.rom", 0xc000, 0x8000, CRC(b3a6aaf6) SHA1(6de80e863cdd7856ab7aac4c238224a5352bda3b)) - ROM_LOAD("312write.rom", 0x14000, 0x4000, CRC(63c6992f) SHA1(93682f5baba7697c40088e26f99ee065c78e83b8)) -ROM_END - -void msx2_state::tps312(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - // 64KB VRAM - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 1, 0, 0, 4).set_total_size(0x20000); /* 128KB?? Mapper RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "write", 3, 1, 1, 1, "maincpu", 0x14000); - add_internal_slot(config, MSX_SLOT_ROM, "plan", 3, 2, 1, 1, "maincpu", 0xc000); - add_internal_slot(config, MSX_SLOT_ROM, "planlow", 3, 2, 0, 1, "maincpu", 0x10000); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 3, msx_cart, nullptr); - - msx2_64kb_vram(config); -} - -/* MSX2 - Toshiba HX-23 */ - -ROM_START(hx23) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("hx23bios.rom", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("hx23ext.rom", 0x8000, 0x4000, CRC(06e4f5e6) SHA1(f5eb0a396097572589f2a6efeed045044e9425e4)) - ROM_LOAD("hx23word.rom", 0xc000, 0x8000, CRC(39b3e1c0) SHA1(9f7cfa932bd7dfd0d9ecaadc51655fb557c2e125)) -ROM_END - -void msx2_state::hx23(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - // 64KB VRAM - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); /* 32KB RAM */ - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 0, 2); /* 32KB RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 3, 1, 2, "maincpu", 0xc000); - - msx2_64kb_vram(config); -} - -/* MSX2 - Toshiba HX-23F */ - -ROM_START(hx23f) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("hx23fbios.rom", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("hx23fext.rom", 0x8000, 0x4000, CRC(06e4f5e6) SHA1(f5eb0a396097572589f2a6efeed045044e9425e4)) - ROM_LOAD("hx23fword.rom", 0xc000, 0x8000, CRC(39b3e1c0) SHA1(9f7cfa932bd7dfd0d9ecaadc51655fb557c2e125)) -ROM_END - -void msx2_state::hx23f(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 3, 1, 2, "maincpu", 0xc000); -} - -/* MSX2 - Toshiba HX-23I */ - -ROM_START(hx23i) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("hx23ibios.rom", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("hx23iext.rom", 0x8000, 0x4000, CRC(06e4f5e6) SHA1(f5eb0a396097572589f2a6efeed045044e9425e4)) - ROM_LOAD("hx23iword.rom", 0xc000, 0x8000, CRC(d50db5b4) SHA1(64cf27a6be1393b1da9f8d5d43df617c9f22fbd2)) -ROM_END - -void msx2_state::hx23i(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-1985) - // FDC: None, 0 drives - // 2 Cartridge slots? - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000); /* 128KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 3, 1, 2, "maincpu", 0xc000); - - MSX_S1985(config, "s1985", 0); -} - -/* MSX@ - Toshiba HX-33 */ - -ROM_START(hx33) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("hx33bios.rom", 0x0000, 0x8000, CRC(3891e0f7) SHA1(7dfb18262d48e559fffb4199acbe29d9b4bee9db)) - ROM_LOAD("hx33ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("hx33firm.rom", 0xc000, 0x8000, CRC(d05b5ca6) SHA1(7eea205044af48cfde9b7fff277d961704c4d45c)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("hx33kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) -ROM_END - -void msx2_state::hx33(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985) - // FDC: None, 0, drives - // 2 Cartridge slots? - // RS232C builtin? - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "firm", 3, 2, 1, 2, "maincpu", 0xc000); - - MSX_S1985(config, "s1985", 0); - - msx2_64kb_vram(config); -} - -/* MSX@ - Toshiba HX-34 */ - -ROM_START(hx34) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("hx34bios.rom", 0x0000, 0x8000, CRC(3891e0f7) SHA1(7dfb18262d48e559fffb4199acbe29d9b4bee9db)) - ROM_LOAD("hx34ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - // hx34disk.rom has contents of floppy registers at offset 3ff0-3ff7 and mirrored at 3ff8-3fff - ROM_LOAD("hx34disk.rom", 0xc000, 0x4000, BAD_DUMP CRC(b6203bc8) SHA1(d31236e8b2491bca678d905546b365e9d365b072)) - ROM_LOAD("hx34firm.rom", 0x10000, 0x8000, CRC(d05b5ca6) SHA1(7eea205044af48cfde9b7fff277d961704c4d45c)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("hx34kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) -ROM_END - -void msx2_state::hx34(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985) - // FDC: wd2793??, 1 3.5" DSDD drive - // 2 Cartridge slots? - // RS232C builtin? - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_DISK6, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "firm", 3, 3, 1, 2, "maincpu", 0x10000); - - MSX_S1985(config, "s1985", 0); - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX@ - Toshiba HX-34I */ - -ROM_START(hx34i) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("hx34ibios.rom", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("hx34iext.rom", 0x8000, 0x4000, CRC(06e4f5e6) SHA1(f5eb0a396097572589f2a6efeed045044e9425e4)) - // hx34idisk.rom has contents of floppy registers at offset 3ff0-3ff7 and mirrored at 3ff8-3fff - ROM_LOAD("hx34idisk.rom", 0xc000, 0x4000, BAD_DUMP CRC(b6203bc8) SHA1(d31236e8b2491bca678d905546b365e9d365b072)) - ROM_LOAD("hx34ifirm.rom", 0x10000, 0x8000, CRC(f9e29c66) SHA1(3289336b2c12161fd926a7e5ce865770ae7038af)) -ROM_END - -void msx2_state::hx34i(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-1985) - // FDC: wd2793??, 1 3.5" DSDD drive - // 2 Cartridge slots? - // RS232C builtin? - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_DISK6, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "firm", 3, 3, 1, 2, "maincpu", 0x10000); - - MSX_S1985(config, "s1985", 0); - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Toshiba FS-TM1 */ - -ROM_START(fstm1) - ROM_REGION(0x1c000, "maincpu", 0) - ROM_LOAD("fstm1bios.rom", 0x0000, 0x8000, CRC(d1e11d52) SHA1(7a69e9b9595f3b0060155f4b419c915d4d9d8ca1)) - ROM_LOAD("fstm1ext.rom", 0x8000, 0x4000, CRC(4eebe9b1) SHA1(a4bdbdb20bf9fd3c492a890fbf541bf092eaa8e1)) - ROM_LOAD("fstm1desk1.rom", 0xc000, 0x8000, CRC(8b802086) SHA1(30737040d90c136d34dd409fe579bc4cca11c469)) - ROM_LOAD("fstm1desk2.rom", 0x14000, 0x8000, CRC(304820ea) SHA1(ff6e07d3976b0874164fae680ae028d598752049)) -ROM_END - -void msx2_state::fstm1(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-1985) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "desk1", 3, 2, 1, 2, "maincpu", 0xc000); - add_internal_slot(config, MSX_SLOT_ROM, "desk2", 3, 3, 1, 2, "maincpu", 0x14000); - - MSX_S1985(config, "s1985", 0); -} - -/* MSX2 - Victor HC-90 */ - -ROM_START(victhc90) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("hc90bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("hc90ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("hc90disk.rom", 0xc000, 0x4000, CRC(11bca2ed) SHA1(a7a34671bddb48fa6c74182e2977f9129558ec32)) - ROM_LOAD("hc90firm.rom", 0x10000, 0x4000, CRC(53791d91) SHA1(caeffdd654394726c8c0824b21af7ff51c0b1031)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("hc90kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) -ROM_END - -void msx2_state::victhc90(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985) - // FDC: wd2793?, 1 3.5" DSDD drive - // RS232C builtin - // 2nd CPU HD-64B180 @ 6.144 MHz - // 1 Cartridge slot (slot 1 or 2?) - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "firm", 0, 1, 1, 1, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 1, 0, msx_cart, nullptr); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - MSX_S1985(config, "s1985", 0); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Victor HC-95 */ - -ROM_START(victhc95) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("hc95bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("hc95ext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("hc95disk.rom", 0xc000, 0x4000, CRC(11bca2ed) SHA1(a7a34671bddb48fa6c74182e2977f9129558ec32)) - ROM_LOAD("hc95firm.rom", 0x10000, 0x4000, CRC(53791d91) SHA1(caeffdd654394726c8c0824b21af7ff51c0b1031)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("hc95kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) -ROM_END - -void msx2_state::victhc95(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985) - // FDC: wd2793?, 2 3.5" DSDD drive - // RS232C builtin - // 2nd CPU HD-64B180 @ 6.144 MHz - // 1 Cartridge slot (slot 1 or 2?) - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "firm", 0, 1, 1, 1, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 1, 0, msx_cart, nullptr); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - MSX_S1985(config, "s1985", 0); - - msx_wd2793_force_ready(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Victor HC-95A */ - -ROM_START(victhc95a) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("hc95abios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("hc95aext.rom", 0x8000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) - ROM_LOAD("hc95adisk.rom", 0xc000, 0x4000, CRC(11bca2ed) SHA1(a7a34671bddb48fa6c74182e2977f9129558ec32)) - ROM_LOAD("hc95afirm.rom", 0x10000, 0x4000, CRC(53791d91) SHA1(caeffdd654394726c8c0824b21af7ff51c0b1031)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("hc95akfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) -ROM_END - -void msx2_state::victhc95a(machine_config &config) -{ - msx2(config); - // YM2149 (in S-1985) - // FDC: wd2793?, 2 3.5" DSDD drive - // RS232C builtin - // 2nd CPU HD-64B180 @ 6.144 MHz - // 1 Cartridge slot (slot 1 or 2?) - // S-1985 MSX Engine - // V9958 VDP - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "firm", 0, 1, 1, 1, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x40000); // 256KB Mapper RAM - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot", 1, 0, msx_cart, nullptr); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - - MSX_S1985(config, "s1985", 0); - - msx_wd2793_force_ready(config); - msx_2_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Yamaha CX7M */ - -ROM_START(cx7m) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("cx7mbios.rom", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("cx7mext.rom", 0x8000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) -ROM_END - -void msx2_state::cx7m(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, "sfg05"); -} - -/* MSX2 - Yamaha CX7M/128 */ - -ROM_START(cx7m128) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("cx7mbios.rom", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) - ROM_LOAD("cx7mext.rom", 0x8000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) - ROM_LOAD("yrm502.rom", 0xc000, 0x4000, CRC(51f7ddd1) SHA1(2a4b4a4657e3077df8a88f98210b76883d3702b1)) -ROM_END - -void msx2_state::cx7m128(machine_config &config) -{ - msx2_pal(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "yrm502", 3, 1, 1, 1, "maincpu", 0xc000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); /* 128KB Mapper RAM */ - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, "sfg05"); -} - -/* MSX2 - Yamaha YIS-503 III R */ - -ROM_START(y503iiir) - ROM_REGION(0x1c000, "maincpu", 0) - ROM_LOAD("yis503iiirbios.rom", 0x0000, 0x8000, CRC(e7d08e29) SHA1(0f851ee7a1cf79819f61cc89e9948ee72a413802)) - ROM_LOAD("yis503iiirext.rom", 0x8000, 0x4000, CRC(34d21778) SHA1(03bf6d2ac86f5c9ab618e155442787c700f99fed)) - ROM_LOAD("yis503iiircpm.rom", 0xc000, 0x4000, CRC(417bf00e) SHA1(f4f7a54cdf5a9dd6c59f7cb219c2c5eb0a00fa8a)) - ROM_LOAD("yis503iiirnet.rom", 0x10000, 33121, CRC(b10fb61c) SHA1(af2b7004a8888d7a72eee937783fccaca0f38621)) // Very odd size for a rom... -ROM_END - -void msx2_state::y503iiir(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527) - // FDC: wd2793?, 1 3.5" DSDD drive - // 2 Cartridge slots - // Networking builtin - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "cpm", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM - add_internal_slot(config, MSX_SLOT_ROM, "net", 3, 3, 0, 3, "maincpu", 0x10000); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Yamaha YIS-503 III R Estonian */ - -ROM_START(y503iiire) - ROM_REGION(0x1c000, "maincpu", 0) - ROM_LOAD("yis503iiirebios.rom", 0x0000, 0x8000, CRC(d0c20f54) SHA1(ebb7eb540a390509edfd36c84288ba85e63f2d1f)) - ROM_LOAD("yis503iiireext.rom", 0x8000, 0x4000, CRC(34d21778) SHA1(03bf6d2ac86f5c9ab618e155442787c700f99fed)) - ROM_LOAD("yis503iiirecpm.rom", 0xc000, 0x4000, CRC(417bf00e) SHA1(f4f7a54cdf5a9dd6c59f7cb219c2c5eb0a00fa8a)) - ROM_LOAD("yis503iiirenet.rom", 0x10000, 33121, CRC(b10fb61c) SHA1(af2b7004a8888d7a72eee937783fccaca0f38621)) // Very odd size for a rom... -ROM_END - -void msx2_state::y503iiire(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527) - // FDC: wd2793?, 1 3.5" DSDD drive - // 2 Cartridge slots - // Networking builtin - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "cpm", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM - add_internal_slot(config, MSX_SLOT_ROM, "net", 3, 3, 0, 3, "maincpu", 0x10000); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Yamaha YIS604 */ - -ROM_START(yis60464) - ROM_REGION(0xc000, "maincpu", 0) - ROM_LOAD("yis604bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("yis604ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("yis604kfn.rom", 0x0000, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) -ROM_END - -void msx2_state::yis60464(machine_config &config) -{ - msx2(config); - // YM2149 (in S-3527) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, 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, "expansion", 3, 3, msx_yamaha_60pin, "sfg05"); -} - -/* MSX2 - Yamaha YIS604/128 */ - -ROM_START(yis604) - ROM_REGION(0x10000, "maincpu", 0) - ROM_LOAD("yis604bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("yis604ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("yrm502.rom", 0xc000, 0x4000, CRC(51f7ddd1) SHA1(2a4b4a4657e3077df8a88f98210b76883d3702b1)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("yis604kfn.rom", 0x0000, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) -ROM_END - -void msx2_state::yis604(machine_config &config) -{ - msx2(config); - // YM2149 (in S-3527) - // FDC: None, 0 drives - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "yrm502", 3, 1, 1, 1, "maincpu", 0xc000); - 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, "expansion", 3, 3, msx_yamaha_60pin, "sfg05"); -} - -/* MSX2 - Yamaha YIS-805/128 */ - -ROM_START(y805128) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("yis805128bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("yis805128ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("yis805128disk.rom", 0xc000, 0x4000, CRC(ab94a273) SHA1(4b08a057e5863ade179dcf8bc9377e90940e6d61)) - ROM_LOAD("yrm502.rom", 0x10000, 0x4000, CRC(51f7ddd1) SHA1(2a4b4a4657e3077df8a88f98210b76883d3702b1)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("yis805128kfn.rom", 0x0000, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) -ROM_END - -void msx2_state::y805128(machine_config &config) -{ - msx2(config); - // YM2149 (in S-3527) - // FDC: wd2793?, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "yrm502", 3, 1, 1, 1, "maincpu", 0x10000); - 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, "sfg05"); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Yamaha YIS-805R2/128 */ - -ROM_START(y805128r2) - ROM_REGION(0x28000, "maincpu", 0) - ROM_LOAD("yis805128r2bios.rom", 0x0000, 0x8000, CRC(e7d08e29) SHA1(0f851ee7a1cf79819f61cc89e9948ee72a413802)) - ROM_LOAD("yis805128r2ext.rom", 0x8000, 0x4000, CRC(34d21778) SHA1(03bf6d2ac86f5c9ab618e155442787c700f99fed)) - ROM_LOAD("yis805128r2disk.rom", 0xc000, 0x4000, CRC(9eb7e24d) SHA1(3a481c7b7e4f0406a55952bc5b9f8cf9d699376c)) - ROM_LOAD("yis805128r2net.rom", 0x10000, 0x8000, CRC(0e345b43) SHA1(e8fd2bbc1bdab12c73a0fec178a190f9063547bb)) - ROM_LOAD("yis805128r2paint.rom", 0x18000, 0x10000, CRC(1bda68a3) SHA1(7fd2a28c4fdaeb140f3c8c8fb90271b1472c97b9)) -ROM_END - -void msx2_state::y805128r2(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527) - // FDC: wd2793?, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - // Networking built in - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "paint", 3, 0, 0, 4, "maincpu", 0x18000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM - add_internal_slot(config, MSX_SLOT_ROM, "net", 3, 3, 0, 2, "maincpu", 0x10000); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Yamaha YIS-805R2/128 Estonian */ - -ROM_START(y805128r2e) - ROM_REGION(0x28000, "maincpu", 0) - ROM_LOAD("yis805128r2ebios.rom", 0x0000, 0x8000, CRC(d0c20f54) SHA1(ebb7eb540a390509edfd36c84288ba85e63f2d1f)) - ROM_LOAD("yis805128r2eext.rom", 0x8000, 0x4000, CRC(34d21778) SHA1(03bf6d2ac86f5c9ab618e155442787c700f99fed)) - ROM_LOAD("yis805128r2edisk.rom", 0xc000, 0x4000, CRC(9eb7e24d) SHA1(3a481c7b7e4f0406a55952bc5b9f8cf9d699376c)) - ROM_LOAD("yis805128r2enet.rom", 0x10000, 0x8000, CRC(0e345b43) SHA1(e8fd2bbc1bdab12c73a0fec178a190f9063547bb)) - ROM_LOAD("yis805128r2epaint.rom", 0x18000, 0x10000, CRC(1bda68a3) SHA1(7fd2a28c4fdaeb140f3c8c8fb90271b1472c97b9)) -ROM_END - -void msx2_state::y805128r2e(machine_config &config) -{ - msx2_pal(config); - // YM2149 (in S-3527) - // FDC: wd2793?, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - // Networking built in - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "paint", 3, 0, 0, 4, "maincpu", 0x18000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 1, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM - add_internal_slot(config, MSX_SLOT_ROM, "net", 3, 3, 0, 2, "maincpu", 0x10000); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/* MSX2 - Yamaha YIS-805/256 */ - -ROM_START(y805256) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("yis805256bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) - ROM_LOAD("yis805256ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) - ROM_LOAD("yis805256disk.rom", 0xc000, 0x4000, CRC(ab94a273) SHA1(4b08a057e5863ade179dcf8bc9377e90940e6d61)) - ROM_LOAD("yrm502.rom", 0x10000, 0x4000, CRC(51f7ddd1) SHA1(2a4b4a4657e3077df8a88f98210b76883d3702b1)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("yis805256kfn.rom", 0x0000, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) -ROM_END - -void msx2_state::y805256(machine_config &config) -{ - msx2(config); - // YM2149 (in S-3527) - // FDC: wd2793?, 1 3.5" DSDD drive - // 2 Cartridge slots - // S-3527 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 0, 1, 0, 1, "maincpu", 0x8000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 0, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "yrm502", 3, 1, 1, 1, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x40000); // 256KB Mapper RAM - add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, "sfg05"); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2_floplist(config); -} - -/******************************** MSX 2+ **********************************/ - -/* MSX2+ - Ciel Expert 3 IDE */ - -ROM_START(expert3i) - ROM_REGION(0x24000, "maincpu", 0) - ROM_LOAD("exp30bios.rom", 0x0000, 0x8000, CRC(a10bb1ce) SHA1(5029cf47031b22bd5d1f68ebfd3be6d6da56dfe9)) - ROM_LOAD("exp30ext.rom", 0x8000, 0x4000, CRC(6bcf4100) SHA1(cc1744c6c513d6409a142b4fb42fbe70a95d9b7f)) - ROM_LOAD("cieldisk.rom", 0xc000, 0x4000, CRC(bb550b09) SHA1(0274dd9b5096065a7f4ed019101124c9bd1d56b8)) - ROM_LOAD("exp30mus.rom", 0x10000, 0x4000, CRC(9881b3fd) SHA1(befebc916bfdb5e8057040f0ae82b5517a7750db)) - ROM_LOAD("ide240a.rom", 0x14000, 0x10000, CRC(7adf857f) SHA1(8a919dbeed92db8c06a611279efaed8552810239)) -ROM_END - -void msx2_state::expert3i(machine_config &config) -{ - msx2plus(config); - // AY8910/YM2149? - // FDC: wd2793, 1 or 2? drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 1, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 1, 1, 1, 1, "maincpu", 0x10000).set_ym2413_tag("ym2413"); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 1, 2, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "ide", 1, 3, 0, 4, "maincpu", 0x14000); /* IDE hardware needs to be emulated */ - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 0, 4).set_total_size(0x40000); /* 256KB?? Mapper RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - - msx_ym2413(config); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Ciel Expert 3 Turbo */ - -/* Uses a Z84C0010 - CMOS processor working at 7 MHz */ -ROM_START(expert3t) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("exp30bios.rom", 0x0000, 0x8000, CRC(a10bb1ce) SHA1(5029cf47031b22bd5d1f68ebfd3be6d6da56dfe9)) - ROM_LOAD("exp30ext.rom", 0x8000, 0x4000, CRC(6bcf4100) SHA1(cc1744c6c513d6409a142b4fb42fbe70a95d9b7f)) - ROM_LOAD("cieldisk.rom", 0xc000, 0x4000, CRC(bb550b09) SHA1(0274dd9b5096065a7f4ed019101124c9bd1d56b8)) - ROM_LOAD("exp30mus.rom", 0x10000, 0x4000, CRC(9881b3fd) SHA1(befebc916bfdb5e8057040f0ae82b5517a7750db)) - ROM_LOAD("turbo.rom", 0x14000, 0x4000, CRC(ab528416) SHA1(d468604269ae7664ac739ea9f922a05e14ffa3d1)) -ROM_END - -void msx2_state::expert3t(machine_config &config) -{ - msx2plus(config); - // AY8910 - // FDC: wd2793?, 1 or 2? drives - // 4 Cartridge/Expansion slots? - // FM/YM2413 built-in - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 1, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 1, 1, 1, 1, "maincpu", 0x10000).set_ym2413_tag("ym2413"); - add_internal_slot(config, MSX_SLOT_ROM, "turbo", 1, 2, 1, 1, "maincpu", 0x14000); /* Turbo hardware needs to be emulated */ - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 1, 3, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 0, 4).set_total_size(0x40000); /* 256KB Mapper RAM */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - - msx_ym2413(config); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Gradiente Expert AC88+ */ - -ROM_START(expertac) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("ac88bios.rom", 0x0000, 0x8000, CRC(9ce0da44) SHA1(1fc2306911ab6e1ebdf7cb8c3c34a7f116414e88)) - ROM_LOAD("ac88ext.rom", 0x8000, 0x4000, CRC(c74c005c) SHA1(d5528825c7eea2cfeadd64db1dbdbe1344478fc6)) - ROM_LOAD("panadisk.rom", 0xc000, 0x4000, CRC(17fa392b) SHA1(7ed7c55e0359737ac5e68d38cb6903f9e5d7c2b6)) - ROM_LOAD("ac88asm.rom", 0x10000, 0x4000, CRC(a8a955ae) SHA1(91e522473a8470511584df3ee5b325ea5e2b81ef)) - ROM_LOAD("xbasic2.rom", 0x14000, 0x4000, CRC(2825b1a0) SHA1(47370bec7ca1f0615a54eda548b07fbc0c7ef398)) -ROM_END - -void msx2_state::expertac(machine_config &config) -{ - msx2plus(config); - // AY8910/YM2149? - // FDC: wd2793?, 1 or 2? drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); /* 64KB Mapper RAM?? */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "asm", 3, 1, 1, 1, "maincpu", 0x10000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 2, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "xbasic", 3, 3, 1, 1, "maincpu", 0x14000); - - msx_wd2793_force_ready(config); - msx_1_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Gradiente Expert DDX+ */ - -ROM_START(expertdx) - ROM_REGION(0x1c000, "maincpu", 0) - ROM_LOAD("ddxbios.rom", 0x0000, 0x8000, CRC(e00af3dc) SHA1(5c463dd990582e677c8206f61035a7c54d8c67f0)) - ROM_LOAD("ddxext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD("panadisk.rom", 0xc000, 0x4000, CRC(17fa392b) SHA1(7ed7c55e0359737ac5e68d38cb6903f9e5d7c2b6)) - ROM_LOAD("xbasic2.rom", 0x10000, 0x4000, CRC(2825b1a0) SHA1(47370bec7ca1f0615a54eda548b07fbc0c7ef398)) - ROM_LOAD("kanji.rom", 0x14000, 0x8000, CRC(b4fc574d) SHA1(dcc3a67732aa01c4f2ee8d1ad886444a4dbafe06)) -ROM_END - -void msx2_state::expertdx(machine_config &config) -{ - msx2plus(config); - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive? - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 1, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "xbasic", 1, 2, 1, 1, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_DISK3, "disk", 1, 3, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 0, 4).set_total_size(0x10000); /* 64KB Mapper RAM?? */ - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 3, 0, msx_cart, nullptr); - /* Kanji? */ - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Panasonic FS-A1FX */ - -ROM_START(fsa1fx) - ROM_REGION(0x20000, "maincpu", 0) - ROM_LOAD("a1fxbios.rom", 0x0000, 0x8000, CRC(19771608) SHA1(e90f80a61d94c617850c415e12ad70ac41e66bb7)) - ROM_LOAD("a1fxext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD("a1fxdisk.rom", 0xc000, 0x4000, CRC(2bda0184) SHA1(2a0d228afde36ac7c5d3c2aac9c7c664dd071a8c)) - ROM_LOAD("a1fxkdr.rom", 0x10000, 0x8000, CRC(a068cba9) SHA1(1ef3956f7f918873fb9b031339bba45d1e5e5878)) - ROM_LOAD("a1fxcock.rom", 0x18000, 0x8000, CRC(f662e6eb) SHA1(9d67fab55b85f4ac4f5924323a70020eb8589057)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("a1fxkfn.rom", 0, 0x20000, CRC(b244f6cf) SHA1(e0e99cd91e88ce2676445663f832c835d74d6fd4)) -ROM_END - -void msx2_state::fsa1fx(machine_config &config) -{ - msx2plus(config); - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "cock", 3, 3, 1, 2, "maincpu", 0x18000); - - msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0)); - matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w)); - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Panasonic FS-A1WSX */ - -ROM_START(fsa1wsx) - ROM_REGION(0x21c000, "maincpu", 0) - ROM_LOAD("a1wsbios.rom", 0x0000, 0x8000, CRC(358ec547) SHA1(f4433752d3bf876bfefb363c749d4d2e08a218b6)) - ROM_LOAD("a1wsext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD("a1wsdisk.rom", 0xc000, 0x4000, CRC(ac7d92b4) SHA1(b7068e2aab02072852ca249596b7550ac632c4c2)) - ROM_LOAD("a1wskdr.rom", 0x10000, 0x8000, CRC(b4fc574d) SHA1(dcc3a67732aa01c4f2ee8d1ad886444a4dbafe06)) - ROM_LOAD("a1wsmusp.rom", 0x18000, 0x4000, CRC(456e494e) SHA1(6354ccc5c100b1c558c9395fa8c00784d2e9b0a3)) - ROM_LOAD("a1wsfirm.rom", 0x1c000, 0x200000, CRC(e363595d) SHA1(3330d9b6b76e3c4ccb7cf252496ed15d08b95d3f)) - - ROM_REGION(0x40000, "kanji", 0) - ROM_LOAD("a1wskfn.rom", 0, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) -ROM_END - -void msx2_state::fsa1wsx(machine_config &config) -{ - msx2plus(config); - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive - // 2 Cartridge slots - // FM built-in - // No cassette port - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 0, 2, 1, 1, "maincpu", 0x18000).set_ym2413_tag("ym2413"); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_PANASONIC08, "firm", 3, 3, 0, 4, "maincpu", 0x1c000); - - msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0)); - matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w)); - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); - - msx_ym2413(config); - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Panasonic FS-A1WX */ - -ROM_START(fsa1wx) - ROM_REGION(0x21c000, "maincpu", 0) - ROM_LOAD("a1wxbios.rom", 0x0000, 0x8000, CRC(19771608) SHA1(e90f80a61d94c617850c415e12ad70ac41e66bb7)) - ROM_LOAD("a1wxext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD("a1wxdisk.rom", 0xc000, 0x4000, CRC(2bda0184) SHA1(2a0d228afde36ac7c5d3c2aac9c7c664dd071a8c)) - ROM_LOAD("a1wxkdr.rom", 0x10000, 0x8000, CRC(a068cba9) SHA1(1ef3956f7f918873fb9b031339bba45d1e5e5878)) - ROM_LOAD("a1wxmusp.rom", 0x18000, 0x4000, CRC(456e494e) SHA1(6354ccc5c100b1c558c9395fa8c00784d2e9b0a3)) - ROM_LOAD("a1wxfirm.rom", 0x1c000, 0x200000, CRC(283f3250) SHA1(d37ab4bd2bfddd8c97476cbe7347ae581a6f2972)) - - ROM_REGION(0x40000, "kanji", 0) - ROM_LOAD("a1wxkfn.rom", 0, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) -ROM_END - -void msx2_state::fsa1wx(machine_config &config) -{ - msx2plus(config); - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive - // 2 Cartridge slots - // FM built-in - // MSX Engine T9769A - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 0, 2, 1, 1, "maincpu", 0x18000).set_ym2413_tag("ym2413"); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_PANASONIC08, "firm", 3, 3, 0, 4, "maincpu", 0x1c000); - - msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0)); - matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w)); - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); - - msx_ym2413(config); - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Panasonic FS-A1WX (a) */ -ROM_START(fsa1wxa) - ROM_REGION(0x21c000, "maincpu", 0) - ROM_LOAD("a1wxbios.rom", 0x0000, 0x8000, CRC(19771608) SHA1(e90f80a61d94c617850c415e12ad70ac41e66bb7)) - ROM_LOAD("a1wxext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD("a1wxdisk.rom", 0xc000, 0x4000, CRC(2bda0184) SHA1(2a0d228afde36ac7c5d3c2aac9c7c664dd071a8c)) - ROM_LOAD("a1wxkdr.rom", 0x10000, 0x8000, CRC(a068cba9) SHA1(1ef3956f7f918873fb9b031339bba45d1e5e5878)) - ROM_LOAD("a1wxmusp.rom", 0x18000, 0x4000, CRC(456e494e) SHA1(6354ccc5c100b1c558c9395fa8c00784d2e9b0a3)) - ROM_LOAD("a1wxfira.rom", 0x1c000, 0x200000, CRC(58440a8e) SHA1(8e0d4a77e7d5736e8225c2df4701509363eb230f)) - - ROM_REGION(0x40000, "kanji", 0) - ROM_LOAD("a1wxkfn.rom", 0, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) -ROM_END - -void msx2_state::fsa1wxa(machine_config &config) -{ - msx2plus(config); - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive - // 2 Cartridge slots? - // FM built-in - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 0, 2, 1, 1, "maincpu", 0x18000).set_ym2413_tag("ym2413"); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_PANASONIC08, "firm", 3, 3, 0, 4, "maincpu", 0x1c000); - - msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0)); - matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w)); - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); - - msx_ym2413(config); - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Sanyo Wavy PHC-35J */ - -ROM_START(phc35j) - ROM_REGION(0x14000, "maincpu", 0) - ROM_LOAD("35jbios.rom", 0x0000, 0x8000, CRC(358ec547) SHA1(f4433752d3bf876bfefb363c749d4d2e08a218b6)) - ROM_LOAD("35jext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD("35jkdr.rom", 0xc000, 0x8000, CRC(b4fc574d) SHA1(dcc3a67732aa01c4f2ee8d1ad886444a4dbafe06)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("35jkfn.rom", 0, 0x20000, CRC(c9651b32) SHA1(84a645becec0a25d3ab7a909cde1b242699a8662)) -ROM_END - -void msx2_state::phc35j(machine_config &config) -{ - msx2plus(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0xc000); - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); -} - -/* MSX2+ - Sanyo Wavy PHC-70FD1 */ - -ROM_START(phc70fd) - ROM_REGION(0x20000, "maincpu", 0) - ROM_LOAD("70fdbios.rom", 0x0000, 0x8000, CRC(19771608) SHA1(e90f80a61d94c617850c415e12ad70ac41e66bb7)) - ROM_LOAD("70fdext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD("70fddisk.rom", 0xc000, 0x4000, CRC(db7f1125) SHA1(9efa744be8355675e7bfdd3976bbbfaf85d62e1d)) - ROM_LOAD("70fdkdr.rom", 0x10000, 0x8000, CRC(a068cba9) SHA1(1ef3956f7f918873fb9b031339bba45d1e5e5878)) - ROM_LOAD("70fdmus.rom", 0x18000, 0x4000, CRC(5c32eb29) SHA1(aad42ba4289b33d8eed225d42cea930b7fc5c228)) - ROM_LOAD("70fdbas.rom", 0x1c000, 0x4000, CRC(da7be246) SHA1(22b3191d865010264001b9d896186a9818478a6b)) - - ROM_REGION(0x20000, "kanji", 0) - ROM_LOAD("70fdkfn.rom", 0, 0x20000, CRC(c9651b32) SHA1(84a645becec0a25d3ab7a909cde1b242699a8662)) -ROM_END - -void msx2_state::phc70fd(machine_config &config) -{ - msx2plus(config); - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive - // 2 Cartridge slots - // FM built-in - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 3, 3, 1, 1, "maincpu", 0x18000).set_ym2413_tag("ym2413"); - add_internal_slot(config, MSX_SLOT_ROM, "bas", 3, 3, 2, 1, "maincpu", 0x1c000); - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); - - msx_ym2413(config); - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Sanyo Wavy PHC-70FD2 */ -ROM_START(phc70fd2) - ROM_REGION(0x20000, "maincpu", 0) - ROM_LOAD("70f2bios.rom", 0x0000, 0x8000, CRC(19771608) SHA1(e90f80a61d94c617850c415e12ad70ac41e66bb7)) - ROM_LOAD("70f2ext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD("70f2disk.rom", 0xc000, 0x4000, CRC(db7f1125) SHA1(9efa744be8355675e7bfdd3976bbbfaf85d62e1d)) - ROM_LOAD("70f2kdr.rom", 0x10000, 0x8000, CRC(a068cba9) SHA1(1ef3956f7f918873fb9b031339bba45d1e5e5878)) - ROM_LOAD("70f2mus.rom", 0x18000, 0x4000, CRC(5c32eb29) SHA1(aad42ba4289b33d8eed225d42cea930b7fc5c228)) - ROM_LOAD("70f2bas.rom", 0x1c000, 0x4000, CRC(da7be246) SHA1(22b3191d865010264001b9d896186a9818478a6b)) - - ROM_REGION(0x40000, "kanji", 0) - ROM_LOAD("70f2kfn.rom", 0, 0x40000, CRC(9a850db9) SHA1(bcdb4dae303dfe5234f372d70a5e0271d3202c36)) -ROM_END - -void msx2_state::phc70fd2(machine_config &config) -{ - msx2plus(config); - // AY8910/YM2149? - // FDC: tc8566af, 2 3.5" DSDD drives - // 2 Cartridge slots - // FM built-in - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_DISK3, "disk", 3, 2, 1, 1, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 3, 3, 1, 1, "maincpu", 0x18000).set_ym2413_tag("ym2413"); - add_internal_slot(config, MSX_SLOT_ROM, "bas", 3, 3, 2, 1, "maincpu", 0x1c000); - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); - - msx_ym2413(config); - - msx_tc8566af(config); - msx_2_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Sony HB-F1XDJ */ - -ROM_START(hbf1xdj) - ROM_REGION(0x11c000, "maincpu", 0) - ROM_LOAD("f1xjbios.rom", 0x0000, 0x8000, CRC(00870134) SHA1(e2fbd56e42da637609d23ae9df9efd1b4241b18a)) - ROM_LOAD("f1xjext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD("f1xjdisk.rom", 0xc000, 0x4000, CRC(a21f5266) SHA1(c1bb307a570ab833e3bfcc4a58a4f4e12dc1df0f)) - ROM_LOAD("f1xjkdr.rom", 0x10000, 0x8000, CRC(a068cba9) SHA1(1ef3956f7f918873fb9b031339bba45d1e5e5878)) - ROM_LOAD("f1xjmus.rom", 0x18000, 0x4000, CRC(5c32eb29) SHA1(aad42ba4289b33d8eed225d42cea930b7fc5c228)) - ROM_LOAD("f1xjfirm.rom", 0x1c000, 0x100000, CRC(77be583f) SHA1(ade0c5ba5574f8114d7079050317099b4519e88f)) - - ROM_REGION(0x40000, "kanji", 0) - ROM_LOAD("f1xjkfn.rom", 0, 0x40000, CRC(7016dfd0) SHA1(218d91eb6df2823c924d3774a9f455492a10aecb)) -ROM_END - -void msx2_state::hbf1xdj(machine_config &config) -{ - msx2plus(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: wd2793, 1 3.5" DSDD drive - // 2 Cartridge slots - // FM built-in - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_SONY08, "firm", 0, 3, 0, 4, "maincpu", 0x1c000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 2, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 3, 3, 1, 1, "maincpu", 0x18000).set_ym2413_tag("ym2413"); - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0x00); - - MSX_S1985(config, "s1985", 0); - - msx_ym2413(config); - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Sony HB-F1XV */ - -ROM_START(hbf1xv) - ROM_REGION(0x11c000, "maincpu", 0) - ROM_LOAD("f1xvbios.rom", 0x0000, 0x8000, CRC(2c7ed27b) SHA1(174c9254f09d99361ff7607630248ff9d7d8d4d6)) - ROM_LOAD("f1xvext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD("f1xvdisk.rom", 0xc000, 0x4000, CRC(04e4e533) SHA1(5a4e7dbbfb759109c7d2a3b38bda9c60bf6ffef5)) - ROM_LOAD("f1xvkdr.rom", 0x10000, 0x8000, CRC(b4fc574d) SHA1(dcc3a67732aa01c4f2ee8d1ad886444a4dbafe06)) - ROM_LOAD("f1xvmus.rom", 0x18000, 0x4000, CRC(5c32eb29) SHA1(aad42ba4289b33d8eed225d42cea930b7fc5c228)) - ROM_LOAD("f1xvfirm.rom", 0x1c000, 0x100000, CRC(77be583f) SHA1(ade0c5ba5574f8114d7079050317099b4519e88f)) - - ROM_REGION(0x40000, "kanji", 0) - ROM_LOAD("f1xvkfn.rom", 0, 0x40000, CRC(7016dfd0) SHA1(218d91eb6df2823c924d3774a9f455492a10aecb)) -ROM_END - -void msx2_state::hbf1xv(machine_config &config) -{ - msx2plus(config); - // YM2149 (in S-1985 MSX Engine) - // FDC: wd2793, 1 3.5" DSDD drives - // 2 Cartridge slots - // FM built-in - // S-1985 MSX Engine - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_SONY08, "firm", 0, 3, 0, 4, "maincpu", 0x1c000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); /* 64KB Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot_mirrored(config, MSX_SLOT_DISK1, "disk", 3, 2, 1, 2, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 3, 3, 1, 1, "maincpu", 0x18000).set_ym2413_tag("ym2413"); - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0x00); - - MSX_S1985(config, "s1985", 0); - - msx_ym2413(config); - - msx_wd2793(config); - msx_1_35_dd_drive(config); - msx2plus_floplist(config); -} - -/* MSX2+ - Sony HB-F9S+ */ - -ROM_START(hbf9sp) - ROM_REGION(0x18000, "maincpu", 0) - ROM_LOAD("f9spbios.rom", 0x0000, 0x8000, CRC(994d3a80) SHA1(03556d380a9bd413faf1b9e3cbd7da47c7238775)) - ROM_LOAD("f9spext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD("f9psfrm1.rom", 0xc000, 0x4000, CRC(43d4cef1) SHA1(8948704bad9ff27873fa9ccd0ef89868e2bd6479)) - ROM_LOAD("f9spfrm2.rom", 0x10000, 0x8000, CRC(ea97069f) SHA1(2d1880d1f5a6944fcb1b198b997a3d90ecd1903d)) -ROM_END - -void msx2_state::hbf9sp(machine_config &config) -{ - msx2plus(config); - // AY8910/YM2149? - // FDC: None, 0 drives - // 2 Cartridge slots? - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "firm1", 3, 0, 1, 1, "maincpu", 0xc000); - add_internal_slot(config, MSX_SLOT_ROM, "firm2", 3, 1, 1, 2, "maincpu", 0x10000); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); /* 64KB?? Mapper RAM */ - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0x00); -} - -/* MSX Turbo-R - Panasonic FS-A1GT */ - -ROM_START(fsa1gt) - ROM_REGION(0x46c000, "maincpu", 0) - ROM_LOAD("a1gtbios.rom", 0x0000, 0x8000, CRC(937c8dbb) SHA1(242e73d8284a012b275c0a266844ebbc4269d787)) - ROM_LOAD("a1gtext.rom", 0x8000, 0x4000, CRC(70aea0fe) SHA1(018d7a5222f28514908fb1b1513286a6558a6d05)) - ROM_LOAD("a1gtdos.rom", 0xc000, 0x10000, CRC(bb2a0eae) SHA1(4880bf34f1c86fff5456ec2b4cf70d02339e2caa)) - ROM_LOAD("a1gtkdr.rom", 0x1c000, 0x8000, CRC(eaf0d125) SHA1(5b39c1ccd3a213b78e02927f56a9abc72cd8c28d)) - ROM_LOAD("a1gtmus.rom", 0x24000, 0x4000, CRC(f5f93437) SHA1(6aea1aef5ec31c1826c22edf580525f93baad425)) - ROM_LOAD("a1gtopt.rom", 0x28000, 0x4000, CRC(50d11f60) SHA1(b4433a3975c57dd440d6bf12dbd28b2ac1b90ef4)) - ROM_LOAD("a1gtkfn.rom", 0x2c000, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) - ROM_LOAD("a1gtfirm.rom", 0x6c000, 0x400000, CRC(feefeadc) SHA1(e779c338eb91a7dea3ff75f3fde76b8af22c4a3a)) -ROM_END - -void msx2_state::fsa1gt(machine_config &config) -{ - turbor(config); - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive - // 2 Cartridge slots - // FM built-in - // MIDI - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 0, 2, 1, 1, "maincpu", 0x24000).set_ym2413_tag("ym2413"); - add_internal_slot(config, MSX_SLOT_ROM, "opt", 0, 3, 1, 1, "maincpu", 0x28000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 2, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000); /* 128KB?? Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x1c000); - add_internal_slot(config, MSX_SLOT_DISK4, "dos", 3, 2, 1, 3, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "firm", 3, 3, 0, 4, "maincpu", 0x6c000); - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0x00); - - msx_ym2413(config); - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msxr_floplist(config); -} - -/* MSX Turbo-R - Panasonic FS-A1ST */ - -ROM_START(fsa1st) - ROM_REGION(0x46c000, "maincpu", 0) - ROM_LOAD("a1stbios.rom", 0x0000, 0x8000, CRC(77b94ae0) SHA1(f078b5ec56884bfb81481d45c7151418770bff5a)) - ROM_LOAD("a1stext.rom", 0x8000, 0x4000, CRC(2c2c77a4) SHA1(373412f9c32762de1c3a7e27fc3d80614e0a0c8e)) - ROM_LOAD("a1stdos.rom", 0xc000, 0x10000, CRC(1fc71407) SHA1(5d2186658adcf4ce0c2d3232384b5712341108e5)) - ROM_LOAD("a1stkdr.rom", 0x1c000, 0x8000, CRC(eaf0d125) SHA1(5b39c1ccd3a213b78e02927f56a9abc72cd8c28d)) - ROM_LOAD("a1stmus.rom", 0x24000, 0x4000, CRC(fd7dec41) SHA1(e002a9b426732e6c2d31e548c40cf7c122348ce3)) - ROM_LOAD("a1stopt.rom", 0x28000, 0x4000, CRC(c6a4a2a1) SHA1(cb06dea7b025745f9d2b87dcf03ded615287ead3)) - ROM_LOAD("a1stkfn.rom", 0x2c000, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) - ROM_LOAD("a1stfirm.rom", 0x6c000, 0x400000, CRC(139ac99c) SHA1(c212b11fda13f83dafed688c54d098e7e47ab225)) -ROM_END - -void msx2_state::fsa1st(machine_config &config) -{ - turbor(config); - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive - // 2 Cartridge slots - // FM built-in - - add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu", 0x0000); - add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 0, 2, 1, 1, "maincpu", 0x24000).set_ym2413_tag("ym2413"); - add_internal_slot(config, MSX_SLOT_ROM, "opt", 0, 3, 1, 1, "maincpu", 0x28000); - add_cartridge_slot<1>(config, MSX_SLOT_CARTRIDGE, "cartslot1", 1, 0, msx_cart, nullptr); - add_cartridge_slot<2>(config, MSX_SLOT_CARTRIDGE, "cartslot2", 1, 0, msx_cart, nullptr); - add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000); /* 128KB?? Mapper RAM */ - add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); - add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x1c000); - add_internal_slot(config, MSX_SLOT_DISK4, "dos", 3, 2, 1, 3, "maincpu", 0xc000).set_tags("fdc", "fdc:0", "fdc:1"); - add_internal_slot(config, MSX_SLOT_ROM, "firm", 3, 3, 0, 4, "maincpu", 0x6c000); - - MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0x00); - - msx_ym2413(config); - - msx_tc8566af(config); - msx_1_35_dd_drive(config); - msxr_floplist(config); -} - -} // anonymous namespace - - -/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */ -/* MSX1 */ -COMP(1986, ax150, 0, 0, ax150, msx, msx_state, empty_init, "Al Alamiah", "AX-150 (Arabic) (MSX1)", 0) -COMP(1986, ax170, 0, 0, ax170, msx, msx_state, empty_init, "Al Alamiah", "AX-170 (Arabic) (MSX1)", 0) -COMP(1983, canonv8, 0, 0, canonv8, msx, msx_state, empty_init, "Canon", "V-8 (MSX1)", 0) -COMP(1983, canonv10, canonv20, 0, canonv10, msx, msx_state, empty_init, "Canon", "V-10 (MSX1)", 0) -COMP(1983, canonv20, 0, 0, canonv20, msx, msx_state, empty_init, "Canon", "V-20 (MSX1)", 0) -COMP(1983, canonv20e, canonv20, 0, canonv20, msx, msx_state, empty_init, "Canon", "V-20E (MSX1)", 0) // Different Euro keyboard layout? -COMP(1983, canonv20f, canonv20, 0, canonv20, msx, msx_state, empty_init, "Canon", "V-20F (MSX1)", 0) // Different French keyboard layout? -COMP(1983, canonv20g, canonv20, 0, canonv20, msx, msx_state, empty_init, "Canon", "V-20G (MSX1)", 0) // Different German keyboard layout? -COMP(1983, canonv20s, canonv20, 0, canonv20, msx, msx_state, empty_init, "Canon", "V-20S (MSX1)", 0) // Different Spanish keyboard layout? -COMP(1984, mx10, 0, 0, mx10, msx, msx_state, empty_init, "Casio", "MX-10 (MSX1)", 0) -COMP(1984, mx101, mx10, 0, mx101, msx, msx_state, empty_init, "Casio", "MX-101 (MSX1)", 0) -COMP(1984, mx15, mx10, 0, mx15, msx, msx_state, empty_init, "Casio", "MX-15 (MSX1)", 0) -COMP(1984, pv7, 0, 0, pv7, msx, msx_state, empty_init, "Casio", "PV-7 (MSX1)", 0) -COMP(1984, pv16, 0, 0, pv16, msx, msx_state, empty_init, "Casio", "PV-16 (MSX1)", 0) -COMP(198?, cpc88, 0, 0, cpc88, msxkr, msx_state, empty_init, "Daewoo", "CPC-88 (Korea) (MSX1)", 0) -COMP(1984, dpc100, dpc200, 0, dpc100, msxkr, msx_state, empty_init, "Daewoo", "IQ-1000 DPC-100 (Korea) (MSX1)", 0) -COMP(1984, dpc180, dpc200, 0, dpc180, msxkr, msx_state, empty_init, "Daewoo", "IQ-1000 DPC-180 (Korea) (MSX1)", 0) -COMP(1984, dpc200, 0, 0, dpc200, msxkr, msx_state, empty_init, "Daewoo", "IQ-1000 DPC-200 (Korea) (MSX1)", 0) -COMP(1985, dpc200e, 0, 0, dpc200e, msx, msx_state, empty_init, "Daewoo", "DPC-200E (MSX1)", 0) -COMP(1983, cpc50a, cpc51, 0, cpc50a, msxkr, msx_state, empty_init, "Daewoo", "Zemmix CPC-50A (Korea) (MSX1)", 0) -COMP(1983, cpc50b, cpc51, 0, cpc50b, msxkr, msx_state, empty_init, "Daewoo", "Zemmix CPC-50B (Korea) (MSX1)", 0) -COMP(1986, cpc51, 0, 0, cpc51, msxkr, msx_state, empty_init, "Daewoo", "Zemmix CPC-51 (Korea) (MSX1)", 0) -COMP(1985, dgnmsx, 0, 0, dgnmsx, msx, msx_state, empty_init, "Eurohard S.A.", "Dragon MSX-64 (MSX1)", 0) -COMP(1983, fdpc200, 0, 0, fdpc200, msx, msx_state, empty_init, "Fenner", "DPC-200 (Italy) (MSX1)", 0) -COMP(1984, fpc500, 0, 0, fpc500, msx, msx_state, empty_init, "Fenner", "FPC-500 (Italy) (MSX1)", 0) -COMP(1986, fspc800, 0, 0, fspc800, msx, msx_state, empty_init, "Fenner", "SPC-800 (Italy) (MSX1)", 0) -COMP(1984, bruc100, 0, 0, bruc100, msx, msx_state, empty_init, "Frael", "Bruc 100-1 (MSX1)", 0) -COMP(1983, fmx, 0, 0, fmx, msxjp, msx_state, empty_init, "Fujitsu", "FM-X (MSX1)", 0) -COMP(1984, gsfc80u, 0, 0, gsfc80u, msxkr, msx_state, empty_init, "Goldstar", "FC-80U (MSX1)", 0) -COMP(1983, gsfc200, 0, 0, gsfc200, msx, msx_state, empty_init, "Goldstar", "FC-200 (MSX1)", 0) -COMP(198?, gfc1080, 0, 0, gfc1080, msxkr, msx_state, empty_init, "Goldstar", "GFC-1080 (MSX1)", 0) -COMP(198?, gfc1080a, 0, 0, gfc1080a, msxkr, msx_state, empty_init, "Goldstar", "GFC-1080A (MSX1)", 0) -COMP(1983, expert10, expert13, 0, expert10, expert10, msx_state, empty_init, "Gradiente", "Expert 1.0 (Brazil) (MSX1)", 0) -COMP(1984, expert11, expert13, 0, expert11, expert11, msx_state, empty_init, "Gradiente", "Expert 1.1 (Brazil) (MSX1)", 0) -COMP(1984, expert13, 0, 0, expert13, expert11, msx_state, empty_init, "Gradiente", "Expert 1.3 (Brazil) (MSX1)", 0) -COMP(1985, expertdp, 0, 0, expertdp, expert11, msx_state, empty_init, "Gradiente", "Expert DDPlus (Brazil) (MSX1)", 0) -COMP(1984, expertpl, 0, 0, expertpl, expert11, msx_state, empty_init, "Gradiente", "Expert Plus (Brazil) (MSX1)", 0) -COMP(1984, mbh2, 0, 0, mbh2, msxjp, msx_state, empty_init, "Hitachi", "MB-H2 (MSX1)", 0) -COMP(1984, mbh25, 0, 0, mbh25, msxjp, msx_state, empty_init, "Hitachi", "MB-H25 (MSX1)", 0) -COMP(1983, mbh50, 0, 0, mbh50, msxjp, msx_state, empty_init, "Hitachi", "MB-H50 (MSX1)", 0) -COMP(1983, jvchc7gb, 0, 0, jvchc7gb, msx, msx_state, empty_init, "JVC", "HC-7GB (MSX1)", 0) -COMP(198?, mlf48, 0, 0, mlf48, msx, msx_state, empty_init, "Mitsubishi", "ML-F48 (MSX1)", 0) -COMP(1983, mlf80, 0, 0, mlf80, msx, msx_state, empty_init, "Mitsubishi", "ML-F80 (MSX1)", 0) -COMP(1984, mlf110, 0, 0, mlf110, msxjp, msx_state, empty_init, "Mitsubishi", "ML-F110 (MSX1)", 0) -COMP(1984, mlf120, 0, 0, mlf120, msxjp, msx_state, empty_init, "Mitsubishi", "ML-F120 (MSX1)", 0) -COMP(1983, mlfx1, 0, 0, mlfx1, msx, msx_state, empty_init, "Mitsubishi", "ML-FX1 (MSX1)", 0) -COMP(1984, cf1200, 0, 0, cf1200, msxjp, msx_state, empty_init, "National / Matsushita", "CF-1200 (Japan) (MSX1)", 0) -COMP(1983, cf2000, 0, 0, cf2000, msxjp, msx_state, empty_init, "National / Matsushita", "CF-2000 (Japan) (MSX1)", 0) -COMP(1984, cf2700, 0, 0, cf2700, msxjp, msx_state, empty_init, "National / Matsushita", "CF-2700 (Japan) (MSX1)", 0) -COMP(1984, cf3000, 0, 0, cf3000, msxjp, msx_state, empty_init, "National / Matsushita", "CF-3000 (Japan) (MSX1)", 0) -COMP(1985, cf3300, 0, 0, cf3300, msxjp, msx_state, empty_init, "National / Matsushita", "CF-3300 (Japan) (MSX1)", 0) -COMP(1985, fs1300, 0, 0, fs1300, msxjp, msx_state, empty_init, "National / Matsushita", "FS-1300 (Japan) (MSX1)", 0) -COMP(1985, fs4000, 0, 0, fs4000, msxjp, msx_state, empty_init, "National / Matsushita", "FS-4000 (Japan) (MSX1)", 0) -COMP(1985, fs4000a, fs4000, 0, fs4000a, msxjp, msx_state, empty_init, "National / Matsushita", "FS-4000 (alt) (Japan) (MSX1)", 0) -COMP(1983, phc2, 0, 0, phc2, msx, msx_state, empty_init, "Olympia", "PHC-2 (MSX1)" , 0) -COMP(19??, phc28, 0, 0, phc28, msx, msx_state, empty_init, "Olympia", "PHC-28 (MSX1)", 0) -COMP(1984, cf2700g, 0, 0, cf2700g, msx, msx_state, empty_init, "Panasonic", "CF-2700G (Germany) (MSX1)", 0) -COMP(198?, perfect1, 0, 0, perfect1, msx, msx_state, empty_init, "Perfect", "Perfect1 (MSX1)", MACHINE_NOT_WORKING) -COMP(1983, nms801, 0, 0, nms801, msx, msx_state, empty_init, "Philips", "NMS-801 (MSX1)", 0) -COMP(1984, vg8000, vg8010, 0, vg8000, msx, msx_state, empty_init, "Philips", "VG-8000 (MSX1)", 0) -COMP(1984, vg8010, 0, 0, vg8010, msx, msx_state, empty_init, "Philips", "VG-8010 (MSX1)", 0) -COMP(1984, vg8010f, vg8010, 0, vg8010f, msx, msx_state, empty_init, "Philips", "VG-8010F (MSX1)" , 0) -COMP(1985, vg802000, vg802020, 0, vg802000, msx, msx_state, empty_init, "Philips", "VG-8020-00 (MSX1)", 0) -COMP(1985, vg802020, 0, 0, vg802020, msx, msx_state, empty_init, "Philips", "VG-8020-20 (MSX1)", 0) -COMP(19??, vg8020f, vg802020, 0, vg8020f, msx, msx_state, empty_init, "Philips", "VG-8020F (MSX1)", 0) -COMP(1985, piopx7, 0, 0, piopx7, msx, msx_state, empty_init, "Pioneer", "PX-07 Palcom (MSX1)", 0) -COMP(1985, piopx7uk, piopx7, 0, piopx7uk, msx, msx_state, empty_init, "Pioneer", "PX-07UK Palcom (MSX1)", 0) -COMP(1984, piopxv60, piopx7, 0, piopxv60, msxjp, msx_state, empty_init, "Pioneer", "PX-V60 (MSX1)", 0) -COMP(19??, spc800, 0, 0, spc800, msx, msx_state, empty_init, "Samsung", "SPC-800 (MSX1)", 0) -COMP(1985, mpc64, 0, 0, mpc64, msxjp, msx_state, empty_init, "Sanyo", "MPC-64 (MSX1)", 0) -COMP(1985, mpc100, 0, 0, mpc100, msx, msx_state, empty_init, "Sanyo", "MPC-100 (MSX1)", 0) -COMP(1983, mpc200, 0, 0, mpc200, msx, msx_state, empty_init, "Sanyo", "MPC-200 (MSX1)", 0) -COMP(1983, mpc200sp, mpc200, 0, mpc200sp, msx, msx_state, empty_init, "Sanyo", "MPC-200SP (MSX1)", 0) // Spanish keyboard? -COMP(1983, phc28l, 0, 0, phc28l, msx, msx_state, empty_init, "Sanyo", "PHC-28L (MSX1)", 0) -COMP(1983, phc28s, 0, 0, phc28s, msx, msx_state, empty_init, "Sanyo", "PHC-28S (MSX1)", 0) -COMP(19??, mpc10, 0, 0, mpc10, msx, msx_state, empty_init, "Sanyo", "Wavy MPC-10 (MSX1)", 0) -COMP(1985, hotbit11, hotbi13p, 0, hotbit11, hotbit, msx_state, empty_init, "Sharp / Epcom", "HB-8000 Hotbit 1.1 (MSX1)", 0) -COMP(1985, hotbit12, hotbi13p, 0, hotbit12, hotbit, msx_state, empty_init, "Sharp / Epcom", "HB-8000 Hotbit 1.2 (MSX1)", 0) -COMP(1985, hotbi13b, hotbi13p, 0, hotbi13b, hotbit, msx_state, empty_init, "Sharp / Epcom", "HB-8000 Hotbit 1.3b (MSX1)", 0) -COMP(1985, hotbi13p, 0, 0, hotbi13p, hotbit, msx_state, empty_init, "Sharp / Epcom", "HB-8000 Hotbit 1.3p (MSX1)", 0) -COMP(198?, hb10, hb10p, 0, hb10, msxjp, msx_state, empty_init, "Sony", "HB-10 (MSX1)", 0) -COMP(1985, hb10p, 0, 0, hb10p, msx, msx_state, empty_init, "Sony", "HB-10P (MSX1)", 0) -COMP(1984, hb101p, 0, 0, hb101p, msx, msx_state, empty_init, "Sony", "HB-101P (MSX1)", 0) -COMP(1985, hb20p, 0, 0, hb20p, msx, msx_state, empty_init, "Sony", "HB-20P (Spanish) (MSX1)", 0) -COMP(1985, hb201, hb201p, 0, hb201, msxjp, msx_state, empty_init, "Sony", "HB-201 (Japan) (MSX1)", 0) -COMP(1985, hb201p, 0, 0, hb201p, msx, msx_state, empty_init, "Sony", "HB-201P (MSX1)", 0) -COMP(1984, hb501p, 0, 0, hb501p, msx, msx_state, empty_init, "Sony", "HB-501P (MSX1)", 0) -COMP(1983, hb55, hb55p, 0, hb55, msxjp, msx_state, empty_init, "Sony", "HB-55 (MSX1)", 0) -COMP(1983, hb55d, hb55p, 0, hb55d, msx, msx_state, empty_init, "Sony", "HB-55D (Germany) (MSX1)", 0) -COMP(1983, hb55p, 0, 0, hb55p, msx, msx_state, empty_init, "Sony", "HB-55P (MSX1)", 0) -COMP(1984, hb701fd, 0, 0, hb701fd, msxjp, msx_state, empty_init, "Sony", "HB-701FD (MSX1)", 0) -COMP(1983, hb75d, hb75p, 0, hb75d, msx, msx_state, empty_init, "Sony", "HB-75D (Germany) (MSX1)", 0) -COMP(1983, hb75p, 0, 0, hb75p, msx, msx_state, empty_init, "Sony", "HB-75P (MSX1)", 0) -COMP(1985, svi728, 0, 0, svi728, msx, msx_state, empty_init, "Spectravideo", "SVI-728 (MSX1)", 0) -COMP(1985, svi738, 0, 0, svi738, msx, msx_state, empty_init, "Spectravideo", "SVI-738 (MSX1)", 0) -COMP(1983, svi738ar, svi738, 0, svi738ar, msx, msx_state, empty_init, "Spectravideo", "SVI-738 (Arabic) (MSX1)", 0) -COMP(1983, svi738dk, svi738, 0, svi738dk, msx, msx_state, empty_init, "Spectravideo", "SVI-738 (Denmark) (MSX1)", 0) -COMP(1983, svi738sp, svi738, 0, svi738sp, msx, msx_state, empty_init, "Spectravideo", "SVI-738 (Spain) (MSX1)", 0) -COMP(1983, svi738sw, svi738, 0, svi738sw, msx, msx_state, empty_init, "Spectravideo", "SVI-738 (Swedish) (MSX1)", 0) -COMP(1983, svi738pl, svi738, 0, svi738pl, msx, msx_state, empty_init, "Spectravideo", "SVI-738 (Poland) (MSX1)", 0) -COMP(1983, tadpc200, dpc200, 0, tadpc200, msx, msx_state, empty_init, "Talent", "DPC-200 (MSX1)", 0) -COMP(1983, tadpc20a, dpc200, 0, tadpc20a, msx, msx_state, empty_init, "Talent", "DPC-200A (MSX1)", 0) -COMP(1984, hx10, 0, 0, hx10, msx, msx_state, empty_init, "Toshiba", "HX-10 (MSX1)", 0) -COMP(1984, hx10d, hx10, 0, hx10d, msxjp, msx_state, empty_init, "Toshiba", "HX-10D (MSX1)", 0) -COMP(1984, hx10dp, hx10, 0, hx10dp, msxjp, msx_state, empty_init, "Toshiba", "HX-10DP (MSX1)", 0) -COMP(1984, hx10e, hx10, 0, hx10e, msx, msx_state, empty_init, "Toshiba", "HX-10E (MSX1)", 0) -COMP(1984, hx10f, hx10, 0, hx10f, msx, msx_state, empty_init, "Toshiba", "HX-10F (MSX1)", 0) -COMP(1984, hx10s, hx10, 0, hx10s, msx, msx_state, empty_init, "Toshiba", "HX-10S (MSX1)", 0) -COMP(1984, hx10sa, hx10, 0, hx10sa, msxjp, msx_state, empty_init, "Toshiba", "HX-10SA (MSX1)", 0) -COMP(1984, hx20, 0, 0, hx20, msx, msx_state, empty_init, "Toshiba", "HX-20 (MSX1)", 0) -COMP(1984, hx20i, hx20, 0, hx20i, msx, msx_state, empty_init, "Toshiba", "HX-20I (MSX1)", 0) -COMP(1984, hx21, 0, 0, hx21, msxjp, msx_state, empty_init, "Toshiba", "HX-21 (MSX1)", MACHINE_NOT_WORKING) // Does not go into firmware -COMP(1984, hx21i, hx21, 0, hx21i, msx, msx_state, empty_init, "Toshiba", "HX-21I (MSX1)", 0) -COMP(1984, hx22, 0, 0, hx22, msxjp, msx_state, empty_init, "Toshiba", "HX-22 (MSX1)", MACHINE_NOT_WORKING) // Does not go into firmware -COMP(1984, hx22i, hx22, 0, hx22i, msx, msx_state, empty_init, "Toshiba", "HX-22I (MSX1)", 0) -COMP(198?, hc5, hc7, 0, hc5, msxjp, msx_state, empty_init, "Victor", "HC-5 (MSX1)", 0) -COMP(198?, hc6, hc7, 0, hc6, msxjp, msx_state, empty_init, "Victor", "HC-6 (MSX1)", 0) -COMP(198?, hc7, 0, 0, hc7, msxjp, msx_state, empty_init, "Victor", "HC-7 (MSX1)", 0) -COMP(1984, cx5f1, cx5f, 0, cx5f1, msxjp, msx_state, empty_init, "Yamaha", "CX5F (w/SFG01) (MSX1)", 0) -COMP(1984, cx5f, 0, 0, cx5f, msxjp, msx_state, empty_init, "Yamaha", "CX5F (w/SFG05) (MSX1)", 0) -COMP(1984, cx5m, cx5m128, 0, cx5m, msx, msx_state, empty_init, "Yamaha", "CX5M (MSX1)", 0) -COMP(1984, cx5m128, 0, 0, cx5m128, msx, msx_state, empty_init, "Yamaha", "CX5M-128 (MSX1)", 0) -COMP(1984, cx5m2, cx5m128, 0, cx5m2, msx, msx_state, empty_init, "Yamaha", "CX5MII (MSX1)", 0) -COMP(1984, yis303, 0, 0, yis303, msx, msx_state, empty_init, "Yamaha", "YIS303 (MSX1)", 0) -COMP(1984, yis503, 0, 0, yis503, msx, msx_state, empty_init, "Yamaha", "YIS503 (MSX1)", 0) -COMP(19??, yis503f, yis503, 0, yis503f, msx, msx_state, empty_init, "Yamaha", "YIS503F (MSX1)", 0) -COMP(1984, yis503ii, yis503, 0, yis503ii, msx, msx_state, empty_init, "Yamaha", "YIS503II (MSX1)", 0) -COMP(1986, y503iir, yis503, 0, y503iir, msx, msx_state, empty_init, "Yamaha", "YIS503IIR (Russian) (MSX1)", 0) -COMP(1986, y503iir2, yis503, 0, y503iir2, msx, msx_state, empty_init, "Yamaha", "YIS503IIR (Estonian) (MSX1)", 0) -COMP(1984, yis503m, yis503, 0, yis503m, msx, msx_state, empty_init, "Yamaha", "YIS503M (MSX1)", 0) -COMP(1984, yc64, 0, 0, yc64, msx, msx_state, empty_init, "Yashica", "YC-64 (MSX1)", 0) -COMP(1984, mx64, 0, 0, mx64, msxkr, msx_state, empty_init, "Yeno", "MX64 (MSX1)", 0) - -/* MSX2 */ -COMP(1986, ax350, 0, 0, ax350, msx2, msx2_state, empty_init, "Al Alamiah", "AX-350 (Arabic) (MSX2)", 0) -COMP(1986, ax370, 0, 0, ax370, msx2, msx2_state, empty_init, "Al Alamiah", "AX-370 (Arabic) (MSX2)", 0) -COMP(1985, canonv25, 0, 0, canonv25, msx2, msx2_state, empty_init, "Canon", "V-25 (MSX2)", 0) -COMP(1985, canonv30, 0, 0, canonv30, msx2, msx2_state, empty_init, "Canon", "V-30 (MSX2)", 0) -COMP(1985, canonv30f, canonv30, 0, canonv30f, msx2, msx2_state, empty_init, "Canon", "V-30F (MSX2)", 0) -COMP(1986, cpc300, 0, 0, cpc300, msx2kr, msx2_state, empty_init, "Daewoo", "IQ-2000 CPC-300 (Korea) (MSX2)", 0) -COMP(1986, cpc300e, 0, 0, cpc300e, msx2kr, msx2_state, empty_init, "Daewoo", "IQ-2000 CPC-300E (Korea) (MSX2)", 0) -COMP(1985, cpc330k, 0, 0, cpc330k, msx2kr, msx2_state, empty_init, "Daewoo", "CPC-330K KOBO (Korea) (MSX2)", 0) -COMP(1988, cpc400, 0, 0, cpc400, msx2kr, msx2_state, empty_init, "Daewoo", "X-II CPC-400 (Korea) (MSX2)", 0) -COMP(1988, cpc400s, 0, 0, cpc400s, msx2kr, msx2_state, empty_init, "Daewoo", "X-II CPC-400S (Korea) (MSX2)", 0) -COMP(1990, cpc61, 0, 0, cpc61, msx2kr, msx2_state, empty_init, "Daewoo", "Zemmix CPC-61 (Korea) (MSX2)", 0) -COMP(1991, cpg120, 0, 0, cpg120, msx2kr, msx2_state, empty_init, "Daewoo", "Zemmix CPG-120 Normal (Korea) (MSX2)", MACHINE_NOT_WORKING) // v9958 not added -COMP(198?, fpc900, 0, 0, fpc900, msx2, msx2_state, empty_init, "Fenner", "FPC-900 (MSX2)", 0) -COMP(1986, expert20, 0, 0, expert20, msx2, msx2_state, empty_init, "Gradiente", "Expert 2.0 (Brazil) (MSX2)", 0) -COMP(198?, mbh70, 0, 0, mbh70, msx2jp, msx2_state, empty_init, "Hitachi", "MB-H70 (MSX2)", MACHINE_NOT_WORKING) // Firmware not working -COMP(1987, kmc5000, 0, 0, kmc5000, msx2jp, msx2_state, empty_init, "Kawai", "KMC-5000 (MSX2)", 0) -COMP(1985, mlg1, 0, 0, mlg1, msx2, msx2_state, empty_init, "Mitsubishi", "ML-G1 (MSX2)", 0) -COMP(198?, mlg3, 0, 0, mlg3, msx2, msx2_state, empty_init, "Mitsubishi", "ML-G3 (MSX2)", 0) -COMP(1985, mlg10, 0, 0, mlg10, msx2jp, msx2_state, empty_init, "Mitsubishi", "ML-G10 (MSX2)", 0) -COMP(1983, mlg30, 0, 0, mlg30, msx2, msx2_state, empty_init, "Mitsubishi", "ML-G30 (MSX2)", 0) -COMP(1985, fs5500f1, fs5500f2, 0, fs5500f1, msx2jp, msx2_state, empty_init, "National / Matsushita", "FS-5500F1 (Japan) (MSX2)", 0) -COMP(1985, fs5500f2, 0, 0, fs5500f2, msx2jp, msx2_state, empty_init, "National / Matsushita", "FS-5500F2 (Japan) (MSX2)", 0) -COMP(1986, fs4500, 0, 0, fs4500, msx2jp, msx2_state, empty_init, "National / Matsushita", "FS-4500 (Japan) (MSX2)", 0) -COMP(1986, fs4700, 0, 0, fs4700, msx2jp, msx2_state, empty_init, "National / Matsushita", "FS-4700 (Japan) (MSX2)", 0) -COMP(1986, fs5000, 0, 0, fs5000, msx2jp, msx2_state, empty_init, "National / Matsushita", "FS-5000F2 (Japan) (MSX2)", 0) -COMP(1986, fs4600, 0, 0, fs4600, msx2jp, msx2_state, empty_init, "National / Matsushita", "FS-4600 (Japan) (MSX2)", 0) -COMP(1986, fsa1, fsa1a, 0, fsa1, msx2jp, msx2_state, empty_init, "Panasonic / Matsushita", "FS-A1 / 1st released version (Japan) (MSX2)", 0) -COMP(1986, fsa1a, 0, 0, fsa1a, msx2jp, msx2_state, empty_init, "Panasonic / Matsushita", "FS-A1 / 2nd released version (Japan) (MSX2)", 0) -COMP(1987, fsa1mk2, 0, 0, fsa1mk2, msx2jp, msx2_state, empty_init, "Panasonic / Matsushita", "FS-A1MK2 (Japan) (MSX2)", 0) -COMP(1987, fsa1f, 0, 0, fsa1f, msx2jp, msx2_state, empty_init, "Panasonic / Matsushita", "FS-A1F (Japan) (MSX2)", 0) -COMP(1987, fsa1fm, 0, 0, fsa1fm, msx2jp, msx2_state, empty_init, "Panasonic / Matsushita", "FS-A1FM (Japan) (MSX2)", 0) -COMP(1986, nms8220, nms8220a, 0, nms8220, msx2, msx2_state, empty_init, "Philips", "NMS-8220 (12-jun-1986) (MSX2)", 0) -COMP(1986, nms8220a, 0, 0, nms8220a, msx2, msx2_state, empty_init, "Philips", "NMS-8220 (13-aug-1986) (MSX2)", 0) -COMP(1986, vg8230, 0, 0, vg8230, msx2, msx2_state, empty_init, "Philips", "VG-8230 (MSX2)", 0) -COMP(19??, vg8230j, vg8230, 0, vg8230j, msx2jp, msx2_state, empty_init, "Philips", "VG-8230J (MSX2)", MACHINE_NOT_WORKING) // Screen flashes a few times before going into basic -COMP(1986, vg8235, 0, 0, vg8235, msx2, msx2_state, empty_init, "Philips", "VG-8235 (MSX2)", 0) -COMP(1986, vg8235f, vg8235, 0, vg8235f, msx2, msx2_state, empty_init, "Philips", "VG-8235F (MSX2)", 0) -COMP(1986, vg8240, 0, 0, vg8240, msx2, msx2_state, empty_init, "Philips", "VG-8240 (MSX2)", 0) -COMP(1986, nms8245, 0, 0, nms8245, msx2, msx2_state, empty_init, "Philips", "NMS-8245 (MSX2)", 0) -COMP(1986, nms8245f, nms8245, 0, nms8245f, msx2, msx2_state, empty_init, "Philips", "NMS-8245F (MSX2)", 0) -COMP(1986, nms8250, nms8255, 0, nms8250, msx2, msx2_state, empty_init, "Philips", "NMS-8250 (MSX2)", 0) -COMP(1986, nms8250f, nms8255, 0, nms8250f, msx2, msx2_state, empty_init, "Philips", "NMS-8250F (MSX2)", 0) // French keyboard -COMP(19??, nms8250j, nms8255, 0, nms8250j, msx2jp, msx2_state, empty_init, "Philips", "NMS-8250J (MSX2)", 0) -COMP(1986, nms8255, 0, 0, nms8255, msx2, msx2_state, empty_init, "Philips", "NMS-8255 (MSX2)", 0) -COMP(1986, nms8255f, nms8255, 0, nms8255f, msx2, msx2_state, empty_init, "Philips", "NMS-8255F (MSX2)", 0) // French keyboard -COMP(1986, nms8260, 0, 0, nms8260, msx2, msx2_state, empty_init, "Philips", "NMS-8260 (Prototype) (MSX2)", MACHINE_NOT_WORKING) -COMP(1986, nms8280, 0, 0, nms8280, msx2, msx2_state, empty_init, "Philips", "NMS-8280 (MSX2)", 0) -COMP(1986, nms8280f, nms8280, 0, nms8280f, msx2, msx2_state, empty_init, "Philips", "NMS-8280F (MSX2)", 0) // French keyboard -COMP(1986, nms8280g, nms8280, 0, nms8280g, msx2, msx2_state, empty_init, "Philips", "NMS-8280G (MSX2)", 0) -COMP(19??, mpc2300, 0, 0, mpc2300, msx2, msx2_state, empty_init, "Sanyo", "MPC-2300 (MSX2)", MACHINE_NOT_WORKING) // Keyboard responds differently -COMP(198?, mpc2500f, 0, 0, mpc2500f, msx2, msx2_state, empty_init, "Sanyo", "MPC-2500FD (MSX2)", MACHINE_NOT_WORKING) // Russian keyboard? -COMP(19??, mpc25fd, 0, 0, mpc25fd, msx2, msx2_state, empty_init, "Sanyo", "Wavy MPC-25FD (MSX2)", 0) -COMP(198?, mpc27, 0, 0, mpc27, msx2jp, msx2_state, empty_init, "Sanyo", "Wavy MPC-27 (MSX2)", MACHINE_NOT_WORKING) // Light pen not emulated -COMP(1988, phc23, 0, 0, phc23, msx2jp, msx2_state, empty_init, "Sanyo", "Wavy PHC-23 (Japan) (MSX2)", 0) -COMP(198?, phc55fd2, 0, 0, phc55fd2, msx2jp, msx2_state, empty_init, "Sanyo", "Wavy PHC-55FD2 (MSX2)", 0) -COMP(198?, phc77, 0, 0, phc77, msx2jp, msx2_state, empty_init, "Sanyo", "Wavy PHC-77 (MSX2)", MACHINE_NOT_WORKING) // Firmware not emulated -COMP(1986, hbf1, 0, 0, hbf1, msx2jp, msx2_state, empty_init, "Sony", "HB-F1 (Japan) (MSX2)", MACHINE_NOT_WORKING ) // Screen stays a single color after a while -COMP(1987, hbf12, 0, 0, hbf12, msx2jp, msx2_state, empty_init, "Sony", "HB-F1II (Japan) (MSX2)", MACHINE_NOT_WORKING ) // Screen stays a single color after a while -COMP(1987, hbf1xd, 0, 0, hbf1xd, msx2jp, msx2_state, empty_init, "Sony", "HB-F1XD (Japan) (MSX2)", 0) -COMP(1988, hbf1xdm2, 0, 0, hbf1xdm2, msx2jp, msx2_state, empty_init, "Sony", "HB-F1XDMK2 (Japan) (MSX2)", 0) -COMP(19??, hbf5, 0, 0, hbf5, msx2, msx2_state, empty_init, "Sony", "HB-F5 (MSX2)", 0) -COMP(1985, hbf9p, 0, 0, hbf9p, msx2, msx2_state, empty_init, "Sony", "HB-F9P (MSX2)", 0) -COMP(19??, hbf9pr, hbf9p, 0, hbf9pr, msx2, msx2_state, empty_init, "Sony", "HB-F9P Russian (MSX2)", MACHINE_NOT_WORKING) // Keyboard responds differently -COMP(1985, hbf9s, hbf9p, 0, hbf9s, msx2, msx2_state, empty_init, "Sony", "HB-F9S (MSX2)", 0) -COMP(1986, hbf500, hbf500p, 0, hbf500, msx2jp, msx2_state, empty_init, "Sony", "HB-F500 (Japan) (MSX2)", 0) -COMP(198?, hbf500f, hbf500p, 0, hbf500f, msx2, msx2_state, empty_init, "Sony", "HB-F500F (MSX2)", 0) // French keyboard? -COMP(1985, hbf500p, 0, 0, hbf500p, msx2, msx2_state, empty_init, "Sony", "HB-F500P (MSX2)", 0) -COMP(1985, hbf700d, hbf700p, 0, hbf700d, msx2, msx2_state, empty_init, "Sony", "HB-F700D (Germany) (MSX2)", 0) -COMP(1985, hbf700f, hbf700p, 0, hbf700f, msx2, msx2_state, empty_init, "Sony", "HB-F700F (MSX2)", 0) -COMP(1985, hbf700p, 0, 0, hbf700p, msx2, msx2_state, empty_init, "Sony", "HB-F700P (MSX2)", 0) -COMP(1985, hbf700s, hbf700p, 0, hbf700s, msx2, msx2_state, empty_init, "Sony", "HB-F700S (Spain) (MSX2)", 0) -COMP(1986, hbf900, hbf900a, 0, hbf900, msx2jp, msx2_state, empty_init, "Sony", "HB-F900 / 1st released version (Japan) (MSX2)", 0) -COMP(1986, hbf900a, 0, 0, hbf900a, msx2jp, msx2_state, empty_init, "Sony", "HB-F900 / 2nd released version (Japan) (MSX2)", 0) -COMP(1986, hbg900ap, hbg900p, 0, hbg900ap, msx2, msx2_state, empty_init, "Sony", "HB-G900AP (MSX2)", 0 ) -COMP(1986, hbg900p, 0, 0, hbg900p, msx2, msx2_state, empty_init, "Sony", "HB-G900P (MSX2)", 0 ) -COMP(1986, hotbit20, 0, 0, hotbit20, msx2, msx2_state, empty_init, "Sharp / Epcom", "HB-8000 Hotbit 2.0 (MSX2)", 0) // Black screen -COMP(1986, tpc310, 0, 0, tpc310, msx2, msx2_state, empty_init, "Talent", "TPC-310 (MSX2)", 0) -COMP(19??, tpp311, 0, 0, tpp311, msx2, msx2_state, empty_init, "Talent", "TPP-311 (MSX2)", 0) -COMP(19??, tps312, 0, 0, tps312, msx2, msx2_state, empty_init, "Talent", "TPS-312 (MSX2)", 0) -COMP(1986, hx23, hx23i, 0, hx23, msx2, msx2_state, empty_init, "Toshiba", "HX-23 (MSX2)", 0) -COMP(1986, hx23f, hx23i, 0, hx23f, msx2, msx2_state, empty_init, "Toshiba", "HX-23F (MSX2)", 0) -COMP(19??, hx23i, 0, 0, hx23i, msx2, msx2_state, empty_init, "Toshiba", "HX-23I (MSX2)", 0) -COMP(1985, hx33, 0, 0, hx33, msx2jp, msx2_state, empty_init, "Toshiba", "HX-33 (MSX2)", 0) -COMP(1985, hx34, hx34i, 0, hx34, msx2jp, msx2_state, empty_init, "Toshiba", "HX-34 (MSX2)", 0) -COMP(1985, hx34i, 0, 0, hx34i, msx, msx2_state, empty_init, "Toshiba", "HX-34I (MSX2)", 0) -COMP(1985, fstm1, 0, 0, fstm1, msx, msx2_state, empty_init, "Toshiba", "FS-TM1 (MSX2)", 0) -COMP(198?, victhc90, victhc95, 0, victhc90, msxjp, msx2_state, empty_init, "Victor", "HC-90 (MSX2)", MACHINE_NOT_WORKING) // 2nd cpu/turbo not emulated, firmware won't start -COMP(1986, victhc95, 0, 0, victhc95, msxjp, msx2_state, empty_init, "Victor", "HC-95 (MSX2)", MACHINE_NOT_WORKING) // 2nd cpu/turbo not emulated, firmware won't start -COMP(1986, victhc95a, victhc95, 0, victhc95a, msxjp, msx2_state, empty_init, "Victor", "HC-95A (MSX2)", MACHINE_NOT_WORKING) // 2nd cpu/turbo not emulated, firmware won't start -COMP(1986, cx7m, cx7m128, 0, cx7m, msx2, msx2_state, empty_init, "Yamaha", "CX7M (MSX2)", 0) -COMP(1986, cx7m128, 0, 0, cx7m128, msx2, msx2_state, empty_init, "Yamaha", "CX7M/128 (MSX2)", 0) -COMP(198?, y503iiir, 0, 0, y503iiir, msx2, msx2_state, empty_init, "Yamaha", "YIS-503 III R (Russian) (MSX2)", MACHINE_NOT_WORKING) // Russian keyboard, floppy support broken -COMP(198?, y503iiire, y503iiir, 0, y503iiire, msx2, msx2_state, empty_init, "Yamaha", "YIS-503 III R (Estonian) (MSX2)", MACHINE_NOT_WORKING) // Russian/Estonian keyboard, floppy support broken -COMP(1985, yis60464, yis604, 0, yis60464, msx2jp, msx2_state, empty_init, "Yamaha", "YIS604 (64KB) (MSX2)", 0) -COMP(1985, yis604, 0, 0, yis604, msx2jp, msx2_state, empty_init, "Yamaha", "YIS604 (128KB) (MSX2)", 0) -COMP(198?, y805128, y805256, 0, y805128, msx2jp, msx2_state, empty_init, "Yamaha", "YIS805/128 (Russian) (MSX2)", MACHINE_NOT_WORKING) // Floppy support broken -COMP(198?, y805128r2, y805256, 0, y805128r2, msx2jp, msx2_state, empty_init, "Yamaha", "YIS805R2/128 (Russian) (MSX2)", MACHINE_NOT_WORKING) // Floppy support broken -COMP(198?, y805128r2e, y805256, 0, y805128r2e, msx2jp, msx2_state, empty_init, "Yamaha", "YIS805R2/128 (Estonian) (MSX2)", MACHINE_NOT_WORKING) // Floppy support broken -COMP(198?, y805256, 0, 0, y805256, msx2jp, msx2_state, empty_init, "Yamaha", "YIS805/256 (Russian) (MSX2)", MACHINE_NOT_WORKING) // Floppy support broken - -/* MSX2+ */ -COMP(19??, expert3i, 0, 0, expert3i, msx2, msx2_state, empty_init, "Ciel", "Expert 3 IDE (MSX2+)", MACHINE_NOT_WORKING ) // Some hardware not emulated -COMP(1996, expert3t, 0, 0, expert3t, msx2, msx2_state, empty_init, "Ciel", "Expert 3 Turbo (MSX2+)", MACHINE_NOT_WORKING ) // Some hardware not emulated -COMP(19??, expertac, 0, 0, expertac, msx2, msx2_state, empty_init, "Gradiente", "Expert AC88+ (MSX2+)", MACHINE_NOT_WORKING ) // Some hardware not emulated -COMP(19??, expertdx, 0, 0, expertdx, msx2, msx2_state, empty_init, "Gradiente", "Expert DDX+ (MSX2+)", MACHINE_NOT_WORKING ) // Some hardware not emulated -COMP(1988, fsa1fx, 0, 0, fsa1fx, msx2jp, msx2_state, empty_init, "Panasonic / Matsushita", "FS-A1FX (Japan) (MSX2+)", 0 ) -COMP(1988, fsa1wx, fsa1wxa, 0, fsa1wx, msx2jp, msx2_state, empty_init, "Panasonic / Matsushita", "FS-A1WX / 1st released version (Japan) (MSX2+)", 0 ) -COMP(1988, fsa1wxa, 0, 0, fsa1wxa, msx2jp, msx2_state, empty_init, "Panasonic / Matsushita", "FS-A1WX / 2nd released version (Japan) (MSX2+)", 0 ) -COMP(1989, fsa1wsx, 0, 0, fsa1wsx, msx2jp, msx2_state, empty_init, "Panasonic / Matsushita", "FS-A1WSX (Japan) (MSX2+)", 0 ) -COMP(1988, hbf1xdj, 0, 0, hbf1xdj, msx2jp, msx2_state, empty_init, "Sony", "HB-F1XDJ (Japan) (MSX2+)", 0 ) -COMP(1989, hbf1xv, 0, 0, hbf1xv, msx2jp, msx2_state, empty_init, "Sony", "HB-F1XV (Japan) (MSX2+)", 0 ) -COMP(1988, phc70fd, phc70fd2, 0, phc70fd, msx2jp, msx2_state, empty_init, "Sanyo", "WAVY PHC-70FD (Japan) (MSX2+)", 0 ) -COMP(1988, phc70fd2, 0, 0, phc70fd2, msx2jp, msx2_state, empty_init, "Sanyo", "WAVY PHC-70FD2 (Japan) (MSX2+)", 0 ) -COMP(1989, phc35j, 0, 0, phc35j, msx2jp, msx2_state, empty_init, "Sanyo", "WAVY PHC-35J (Japan) (MSX2+)", 0) -COMP(19??, hbf9sp, 0, 0, hbf9sp, msx2jp, msx2_state, empty_init, "Sony", "HB-F9S+ (MSX2+)", 0) - -/* MSX Turbo-R */ -/* Temporary placeholders, Turbo-R hardware is not supported yet */ -COMP(19??, fsa1gt, 0, 0, fsa1gt, msx2jp, msx2_state, empty_init, "Panasonic", "FS-A1GT (MSX Turbo-R)", MACHINE_NOT_WORKING) -COMP(19??, fsa1st, 0, 0, fsa1st, msx2jp, msx2_state, empty_init, "Panasonic", "FS-A1ST (MSX Turbo-R)", MACHINE_NOT_WORKING) diff --git a/src/mame/msx/msx.h b/src/mame/msx/msx.h new file mode 100644 index 00000000000..adec3a584a5 --- /dev/null +++ b/src/mame/msx/msx.h @@ -0,0 +1,365 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +#ifndef MAME_MSX_MSX_H +#define MAME_MSX_MSX_H + +#pragma once + +#include "bus/centronics/ctronics.h" +#include "bus/msx_slot/cartridge.h" +#include "cpu/z80/z80.h" +#include "imagedev/cassette.h" +#include "machine/buffer.h" +#include "machine/i8255.h" +#include "machine/input_merger.h" +#include "machine/rp5c01.h" +#include "msx_switched.h" +#include "sound/ay8910.h" +#include "sound/dac.h" +#include "sound/ymopl.h" +#include "speaker.h" +#include "video/v9938.h" +#include "video/tms9928a.h" + + +class msx_hw_def +{ +public: + msx_hw_def() {} + bool has_cassette() const { return m_has_cassette; } + bool has_printer_port() const { return m_has_printer_port; } + bool has_cartslot() const { return m_has_cartslot; } + bool has_fdc() const { return m_has_fdc; } + msx_hw_def &has_cassette(bool has_cassette) { m_has_cassette = has_cassette; return *this;} + msx_hw_def &has_printer_port(bool has_printer_port) { m_has_printer_port = has_printer_port; return *this; } + msx_hw_def &has_cartslot(bool has_cartslot) { m_has_cartslot = has_cartslot; return *this; } + msx_hw_def &has_fdc(bool has_fdc) { m_has_fdc = has_fdc; return *this; } + +private: + bool m_has_cassette = true; + bool m_has_printer_port = true; + bool m_has_cartslot = false; + bool m_has_fdc = false; +}; + +class msx_state : public driver_device +{ +protected: + msx_state(const machine_config &mconfig, device_type type, const char *tag); + + enum ay8910_type + { + SND_AY8910, + SND_YM2149 + }; + + enum vdp_type + { + VDP_TMS9118, + VDP_TMS9128, + VDP_TMS9129, + VDP_TMS9918, + VDP_TMS9918A, + VDP_TMS9928A, + VDP_TMS9929A + }; + + void msx_base(ay8910_type ay8910_type, machine_config &config, XTAL xtal, int cpu_divider); + void msx1(vdp_type vdp_type, ay8910_type ay8910_type, machine_config &config); + void msx1_add_softlists(machine_config &config); + + template + u8 game_port_r(); + + // configuration helpers + template + auto &add_internal_slot(machine_config &config, T &&type, U &&tag, u8 prim, u8 sec, u8 page, u8 numpages) + { + return add_internal_slot(config, std::forward(type), std::forward(tag), prim, true, sec, page, numpages); + } + template + auto &add_internal_slot(machine_config &config, T &&type, U &&tag, u8 prim, u8 page, u8 numpages) + { + return add_internal_slot(config, std::forward(type), std::forward(tag), prim, false, 0, page, numpages); + } + template + auto &add_internal_slot(machine_config &config, T &&type, U &&tag, u8 prim, u8 sec, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + return add_internal_slot(config, std::forward(type), std::forward(tag), prim, true, sec, page, numpages, region, offset); + } + template + auto &add_internal_slot(machine_config &config, T &&type, U &&tag, u8 prim, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + return add_internal_slot(config, std::forward(type), std::forward(tag), prim, false, 0, page, numpages, region, offset); + } + template + auto &add_internal_disk(machine_config &config, T &&type, U &&tag, u8 prim, u8 sec, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + return add_internal_disk(config, std::forward(type), std::forward(tag), prim, true, sec, page, numpages, region, offset); + } + template + auto &add_internal_disk(machine_config &config, T &&type, U &&tag, u8 prim, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + return add_internal_disk(config, std::forward(type), std::forward(tag), prim, false, 0, page, numpages, region, offset); + } + template + auto &add_internal_slot_irq(machine_config &config, T &&type, U &&tag, u8 prim, u8 sec, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + return add_internal_slot_irq(config, std::forward(type), std::forward(tag), prim, true, sec, page, numpages, region, offset); + } + template + auto &add_internal_slot_irq(machine_config &config, T &&type, U &&tag, u8 prim, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + return add_internal_slot_irq(config, std::forward(type), std::forward(tag), prim, false, 0, page, numpages, region, offset); + } + template + auto &add_internal_slot_irq_mirrored(machine_config &config, T &&type, U &&tag, u8 prim, u8 sec, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + auto &device = add_internal_slot_irq(config, std::forward(type), std::forward(tag), prim, sec, page, numpages, region, offset); + device.set_size(0x4000); + return device; + } + template + auto &add_internal_disk_mirrored(machine_config &config, T &&type, U &&tag, u8 prim, u8 sec, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + return add_internal_disk_mirrored(config, std::forward(type), std::forward(tag), prim, true, sec, page, numpages, region, offset); + } + template + auto &add_internal_disk_mirrored(machine_config &config, T &&type, U &&tag, u8 prim, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + return add_internal_disk_mirrored(config, std::forward(type), std::forward(tag), prim, false, 0, page, numpages, region, offset); + } + template + auto &add_cartridge_slot(machine_config &config, T &&type, U &&tag, u8 prim, u8 sec, V &&intf, const char *deft) + { + return add_cartridge_slot(config, std::forward(type), std::forward(tag), prim, true, sec, intf, deft); + } + template + auto &add_cartridge_slot(machine_config &config, T &&type, U &&tag, u8 prim, V &&intf, const char *deft) + { + return add_cartridge_slot(config, std::forward(type), std::forward(tag), prim, false, 0, intf, deft); + } + template + auto &add_cartridge_slot(machine_config &config, u8 prim, u8 sec) + { + return add_cartridge_slot(config, prim, true, sec); + } + template + auto &add_cartridge_slot(machine_config &config, u8 prim) + { + return add_cartridge_slot(config, prim, false, 0); + } + virtual void driver_start() override; + virtual void machine_start() override; + virtual void machine_reset() override; + + void expanded_slot_w(u8 data); + u8 expanded_slot_r(); + u8 kanji_r(offs_t offset); + void kanji_w(offs_t offset, u8 data); + void ppi_port_a_w(u8 data); + void ppi_port_c_w(u8 data); + u8 ppi_port_b_r(); + u8 psg_port_a_r(); + u8 psg_port_b_r(); + void psg_port_a_w(u8 data); + void psg_port_b_w(u8 data); + + void msx_base_io_map(address_map &map); + void msx1_io_map(address_map &map); + void memory_map(address_map &map); + void memory_expand_slot(int slot); + memory_view::memory_view_entry *get_view(int page, int prim, int sec); + + required_device m_maincpu; + optional_device m_cassette; + required_device m_ay8910; + required_device m_dac; + required_device m_ppi; + optional_device m_tms9928a; + optional_device m_cent_status_in; + optional_device m_cent_ctrl_out; + optional_device m_cent_data_out; + optional_device m_centronics; + required_device m_speaker; + required_device m_mainirq; + required_device m_screen; + optional_memory_region m_region_kanji; + required_ioport_array<2> m_io_joy; + required_ioport m_io_dsw; + required_ioport_array<2> m_io_mouse; + required_ioport_array<11> m_io_key; + output_finder<2> m_leds; + msx_hw_def m_hw_def; + // This is here until more direct rom dumps from kanji font roms become available. + bool m_kanji_fsa1fx = false; + memory_view m_view_page0; + memory_view m_view_page1; + memory_view m_view_page2; + memory_view m_view_page3; + memory_view *m_view[4]; + // There must be a better way to do this + memory_view m_view_slot0_page0; + memory_view m_view_slot0_page1; + memory_view m_view_slot0_page2; + memory_view m_view_slot0_page3; + memory_view m_view_slot1_page0; + memory_view m_view_slot1_page1; + memory_view m_view_slot1_page2; + memory_view m_view_slot1_page3; + memory_view m_view_slot2_page0; + memory_view m_view_slot2_page1; + memory_view m_view_slot2_page2; + memory_view m_view_slot2_page3; + memory_view m_view_slot3_page0; + memory_view m_view_slot3_page1; + memory_view m_view_slot3_page2; + memory_view m_view_slot3_page3; + memory_view *m_exp_view[4][4]; + struct internal_slot + { + int prim; + bool is_expanded; + int sec; + int page; + int numpages; + msx_internal_slot_interface *internal_slot; + }; + std::vector m_internal_slots; + + INTERRUPT_GEN_MEMBER(msx_interrupt); + + // PSG + u8 m_psg_b; + // mouse + u16 m_mouse[2]; + s8 m_mouse_stat[2]; + // kanji + u32 m_kanji_latch; + // memory + bool m_slot_expanded[4]; + u8 m_primary_slot; + u8 m_secondary_slot[4]; + u8 m_port_c_old; + u8 m_keylatch; + +private: + // configuration helpers + template + auto &add_base_slot(machine_config &config, T &&type, U &&tag, u8 prim, bool expanded, u8 sec, u8 page, u8 numpages) + { + auto &device(std::forward(type)(config, std::forward(tag), 0U)); + device.set_memory_space(m_maincpu, AS_PROGRAM); + device.set_io_space(m_maincpu, AS_IO); + device.set_maincpu(m_maincpu); + m_internal_slots.push_back({prim, expanded, sec, page, numpages, &device}); + return device; + } + template + auto &add_internal_slot(machine_config &config, T &&type, U &&tag, u8 prim, bool expanded, u8 sec, u8 page, u8 numpages) + { + auto &device = add_base_slot(config, std::forward(type), std::forward(tag), prim, expanded, sec, page, numpages); + device.set_start_address(page * 0x4000); + device.set_size(numpages * 0x4000); + return device; + } + template + auto &add_internal_slot(machine_config &config, T &&type, U &&tag, u8 prim, bool expanded, u8 sec, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + auto &device = add_internal_slot(config, std::forward(type), std::forward(tag), prim, expanded, sec, page, numpages); + device.set_rom_start(region, offset); + return device; + } + template + auto &add_internal_disk(machine_config &config, T &&type, U &&tag, u8 prim, bool expanded, u8 sec, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + auto &device = add_internal_slot(config, std::forward(type), std::forward(tag), prim, true, sec, page, numpages, region, offset); + m_hw_def.has_fdc(true); + return device; + } + template + auto &add_internal_slot_irq(machine_config &config, T &&type, U &&tag, u8 prim, bool expanded, u8 sec, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + auto &device = add_internal_slot(config, std::forward(type), std::forward(tag), prim, expanded, sec, page, numpages, region, offset); + device.irq_handler().set(m_mainirq, FUNC(input_merger_device::in_w)); + return device; + } + template + auto &add_internal_disk_mirrored(machine_config &config, T &&type, U &&tag, u8 prim, bool expanded, u8 sec, u8 page, u8 numpages, const char *region, u32 offset = 0) + { + // Memory mapped FDC registers are also accessible through page 2 + auto &device = add_internal_disk(config, std::forward(type), std::forward(tag), prim, expanded, sec, page, numpages, region, offset); + device.set_size(0x4000); + return device; + } + template + auto &add_cartridge_slot(machine_config &config, T &&type, U &&tag, u8 prim, bool expanded, u8 sec, V &&intf, const char *deft) + { + auto &device = add_base_slot(config, std::forward(type), std::forward(tag), prim, expanded, sec, 0, 4); + device.option_reset(); + intf(device); + device.set_default_option(deft); + device.set_fixed(false); + device.irq_handler().set(m_mainirq, FUNC(input_merger_device::in_w)); + m_hw_def.has_cartslot(true); + return device; + } + template + auto &add_cartridge_slot(machine_config &config, u8 prim, bool expanded, u8 sec) + { + static const char *tags[4] = { + "cartslot1", "cartslot2", "cartslot3", "cartslot4" + }; + static_assert(N >= 1 && N <= 4, "Invalid cartridge slot number"); + return add_cartridge_slot(config, MSX_SLOT_CARTRIDGE, tags[N-1], prim, expanded, sec, msx_cart, nullptr); + } +}; + + +class msx2_base_state : public msx_state +{ +protected: + msx2_base_state(const machine_config &mconfig, device_type type, const char *tag) + : msx_state(mconfig, type, tag) + , m_v9938(*this, "v9938") + , m_v9958(*this, "v9958") + , m_rtc(*this, "rtc") + , m_rtc_latch(0) + { + } + + virtual void machine_start() override; + + void msx2_base(ay8910_type ay8910_type, machine_config &config); + void msx2(ay8910_type ay8910_type, machine_config &config); + void msx2_pal(ay8910_type ay8910_type, machine_config &config); + void msx2plus_base(ay8910_type ay8910_type, machine_config &config); + void msx2plus(ay8910_type ay8910_type, machine_config &config); + void msx2plus_pal(ay8910_type ay8910_type, machine_config &config); + void turbor(ay8910_type ay8910_type, machine_config &config); + void msx2_add_softlists(machine_config &config); + void msx2plus_add_softlists(machine_config &config); + void turbor_add_softlists(machine_config &config); + void msx_ym2413(machine_config &config); + void msx2_64kb_vram(machine_config &config); + u8 rtc_reg_r(); + void rtc_reg_w(u8 data); + void rtc_latch_w(u8 data); + u8 switched_r(offs_t offset); + void switched_w(offs_t offset, u8 data); + DECLARE_WRITE_LINE_MEMBER(turbo_w); + void msx2_base_io_map(address_map &map); + void msx2_io_map(address_map &map); + void msx2plus_io_map(address_map &map); + + std::vector m_switched; + + optional_device m_v9938; + optional_device m_v9958; + required_device m_rtc; + + // rtc + u8 m_rtc_latch = 0; +}; + +#endif // MAME_MSX_MSX_H diff --git a/src/mame/msx/msx1.cpp b/src/mame/msx/msx1.cpp new file mode 100644 index 00000000000..f831def4f32 --- /dev/null +++ b/src/mame/msx/msx1.cpp @@ -0,0 +1,3801 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol + +#include "emu.h" +#include "msx.h" +#include "msx_keyboard.h" +#include "bus/msx_slot/ax230.h" +#include "bus/msx_slot/disk.h" +#include "bus/msx_slot/msx_rs232.h" +#include "bus/msx_slot/ram.h" +#include "bus/msx_slot/ram_mm.h" +#include "bus/msx_slot/rom.h" + +using namespace msx_keyboard; + + +/*************************************************************************** + + MSX1 Game drivers + +Undumped and/or not emulated: +- Daewoo CPC-200 +- Daewoo Zemmix CPC-50 +- Daewoo Zemmix DTX-1493FW +- General PCT-50 +- General PCT-55 +- Goldstar FC-80 +- Hitachi MB-H21 +- Hitachi MB-H80 (unreleased) +- In Tensai DPC-200CD +- Jotan Holland Bingo +- Misawa-Van CX-5 +- Mitsubishi ML-FX2 +- Mitsubishi ML-TS1 +- Network DPC-200 +- Olympia DPC-200 +- Panasonic FS-3900 +- Philips NMS 800 +- Philips VG-8020/29 - MSX1 +- Philips VG-8020/40 - MSX1 +- Phonola VG-8000 (Italian market, mostly likely same as Philips VG-8000) +- Phonola VG-8010 (Italian market, mostly likely same as Philips VG-8010) +- Phonola VG-8020 (Italian market, mostly likely same as Philips VG-8020) +- Pioneer PX-V7 +- Radiola MK 180 +- Sakhr AH-200 +- Sakhr AX-100 +- Sakhr AX-170F +- Sakhr AX-330 +- Sakhr AX-660 +- Sakhr AX-990 +- Salora MSX (prototypes) +- Sanno PHC-SPC +- Sanno SPCmk-II +- Sanno SPCmk-III +- Sanyo MPC-1 / Wavy1 +- Schneider MC 810 +- Sincorp SBX (Argentina, homebrew) +- Sony HB-10B +- Sony HB-10D +- Sony HB-501F +- Sony HB-75AS +- Sony HB-75B +- Sony HB-701 +- Spectravideo SVI-728 (Arabic) +- Spectravideo SVI-728 (Danish/Norwegian) +- Spectravideo SVI-728 (Swedish/Finnish) +- Talent DPS-201 +- Toshiba HX-10AA +- Toshiba HX-10DPN +- Toshiba HX-10I +- Toshiba HX-10SF +- Toshiba HX-20AR +- Toshiba HX-22CH +- Toshiba HX-22GB +- Toshiba HX-30 +- Tosbiba HX-31 +- Toshiba HX-52 +- Triton PC64 +- Vestel FC-200 +- Victor HC-30 +- Victor HC-60 +- Wandy DPC-200 +- Yamaha CX5 +- Yamaha CX5MA (Australia / New Zealand) +- Yamaha CX5MC (Canada) +- Yamaha CX5ME (UK) +- Yamaha CX5MF (France) +- Yamaha CX5MG (Germany) +- Yamaha CX5MS (Scandinavia) +- Yamaha YIS-603 +- Yeno DPC-64 +***************************************************************************/ + +namespace { + +class msx1_state : public msx_state +{ +public: + msx1_state(const machine_config &mconfig, device_type type, const char *tag) + : msx_state(mconfig, type, tag) + { + } + + void ax150(machine_config &config); + void ax170(machine_config &config); + void ax230(machine_config &config); + void canonv8(machine_config &config); + void canonv10(machine_config &config); + void canonv20(machine_config &config); + void canonv20e(machine_config &config); + void canonv25(machine_config &config); + void cf1200(machine_config &config); + void cf2000(machine_config &config); + void cf2700(machine_config &config); + void cf2700g(machine_config &config); + void cf2700uk(machine_config &config); + void cf3000(machine_config &config); + void cf3300(machine_config &config); + void cpc50a(machine_config &config); + void cpc50b(machine_config &config); + void cpc51(machine_config &config); + void cpc88(machine_config &config); + void cx5f(machine_config &config); + void cx5f1(machine_config &config); + void cx5mu(machine_config &config); + void dgnmsx(machine_config &config); + void dpc100(machine_config &config); + void dpc180(machine_config &config); + void dpc200(machine_config &config); + void dpc200e(machine_config &config); + void expert10(machine_config &config); + void expert11(machine_config &config); + void expert13(machine_config &config); + void expertdp(machine_config &config); + void expertpl(machine_config &config); + void fmx(machine_config &config); + void fdpc200(machine_config &config); + void fpc500(machine_config &config); + void fs1300(machine_config &config); + void fs4000(machine_config &config); + void fs4000a(machine_config &config); + void fspc800(machine_config &config); + void gfc1080(machine_config &config); + void gfc1080a(machine_config &config); + void gsfc80u(machine_config &config); + void gsfc200(machine_config &config); + void hb10(machine_config &config); + void hb10p(machine_config &config); + void hb20p(machine_config &config); + void hb55(machine_config &config); + void hb55d(machine_config &config); + void hb55p(machine_config &config); + void hb75(machine_config &config); + void hb75d(machine_config &config); + void hb75p(machine_config &config); + void hb101(machine_config &config); + void hb101p(machine_config &config); + void hb201(machine_config &config); + void hb201p(machine_config &config); + void hb501p(machine_config &config); + void hb701fd(machine_config &config); + void hb8000(machine_config &config); + void hc5(machine_config &config); + void hc6(machine_config &config); + void hc7(machine_config &config); + void hotbi13b(machine_config &config); + void hotbi13p(machine_config &config); + void hx10(machine_config &config); + void hx10d(machine_config &config); + void hx10dp(machine_config &config); + void hx10e(machine_config &config); + void hx10f(machine_config &config); + void hx10s(machine_config &config); + void hx10sa(machine_config &config); + void hx20(machine_config &config); + void hx20e(machine_config &config); + void hx20i(machine_config &config); + void hx21(machine_config &config); + void hx21f(machine_config &config); + void hx22(machine_config &config); + void hx22i(machine_config &config); + void hx32(machine_config &config); + void hx51i(machine_config &config); + void jvchc7gb(machine_config &config); + void mbh1(machine_config &config); + void mbh1e(machine_config &config); + void mbh2(machine_config &config); + void mbh25(machine_config &config); + void mbh50(machine_config &config); + void ml8000(machine_config &config); + void mlf48(machine_config &config); + void mlf80(machine_config &config); + void mlf110(machine_config &config); + void mlf120(machine_config &config); + void mlfx1(machine_config &config); + void mpc10(machine_config &config); + void mpc64(machine_config &config); + void mpc100(machine_config &config); + void mpc200(machine_config &config); + void mpc200sp(machine_config &config); + void mx10(machine_config &config); + void mx15(machine_config &config); + void mx64(machine_config &config); + void mx101(machine_config &config); + void nms801(machine_config &config); + void perfect1(machine_config &config); + void phc2(machine_config &config); + void phc28(machine_config &config); + void phc28l(machine_config &config); + void phc28s(machine_config &config); + void piopx7(machine_config &config); + void piopx7uk(machine_config &config); + void piopxv60(machine_config &config); + void pv7(machine_config &config); + void pv16(machine_config &config); + void spc800(machine_config &config); + void svi728(machine_config &config); + void sx100(machine_config &config); + void tadpc200(machine_config &config); + void vg8000(machine_config &config); + void vg8010(machine_config &config); + void vg8010f(machine_config &config); + void vg802000(machine_config &config); + void vg802020(machine_config &config); + void vg8020f(machine_config &config); + void yc64(machine_config &config); + void yis303(machine_config &config); + void yis503(machine_config &config); + void yis503f(machine_config &config); +}; + +/* MSX - Al Fateh 100 - rebranded Sakhr / Al Alamiah AX-170, dump needed to verify */ + +/* MSX - Al Fateh 123 - rebranded Sakhr / Al Alamiah AX-230, dump needed to verify */ + +/* MSX - AVT DPC-200 - See Fenner DPC-200 (they are the same machine, same roms) */ + +/* MSX - AVT FC-200 - probably same as Goldstar FC-80, dump needed to verify */ + +/* MSX - Bawareth Perfect MSX1 (DPC-200CD) */ + +ROM_START(perfect1) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("perfect1bios.rom", 0x0000, 0x8000, CRC(a317e6b4) SHA1(e998f0c441f4f1800ef44e42cd1659150206cf79)) + + ROM_REGION(0x8000, "firmware", 0) + ROM_SYSTEM_BIOS(0, "v1990", "1990 Firmware") + ROMX_LOAD("cpc-200bw_v1_0", 0x0000, 0x8000, CRC(d6373270) SHA1(29a9169b605b5881e4a15fcfd65209a4e8679285), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "v1987", "1987 Firmware (v3.21)") + ROMX_LOAD("perfect1arab.rom", 0x0000, 0x8000, CRC(6db04a4d) SHA1(01012a0e2738708861f66b6921b2e2108f2edb54), ROM_BIOS(1)) +ROM_END + +void msx1_state::perfect1(machine_config &config) +{ + // GSS Z8400A PS cpu + // AY-3-8910 + // TMS9129 + // DW64MX1 + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 1, 1, 2, "firmware"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 1); + // expansion slot in slot #2 + + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Canon V-8 */ + +ROM_START(canonv8) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("v8bios.rom", 0x0000, 0x8000, CRC(e941b08e) SHA1(97f9a0b45ee4b34d87ca3f163df32e1f48b0f09c)) +ROM_END + +void msx1_state::canonv8(machine_config &config) +{ + // NEC D780C cpu + // YM2149 in S3527 + // FDC: None, 0 drives + // 1 Cartridge slots + // S3527 + // No printer port + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 3, 1); + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9118, SND_YM2149, config); +} + +/* MSX - Canon V-10 */ + +ROM_START(canonv10) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("v10bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::canonv10(machine_config &config) +{ + // Zilog Z80A + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + msx1(VDP_TMS9918A, SND_YM2149, config); +} + +/* MSX - Canon V-20 */ + +ROM_START(canonv20) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("v20bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::canonv20(machine_config &config) +{ + // NEC D780C cpu + // XTAL: 14.31818(Z80/PSG) + 10.6875(VDP) + // YM2149 + // TMS9918ANL + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9918A, SND_YM2149, config); +} + +/* MSX - Canon V-20E */ + +ROM_START(canonv20e) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("3256m67-5a3_z-2_uk.u20", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) +ROM_END + +void msx1_state::canonv20e(machine_config &config) +{ + // Zilog Z8400A PS Z80A cpu + // XTAL: 14.31818(Z80/PSG) + 10.6875(VDP) + // YM2149 + // TMS9929ANL + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_YM2149, config); +} + +/* MSX - Canon V-20F */ + +ROM_START(canonv20f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("v20fbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(e0e894b7) SHA1(d99eebded5db5fce1e072d08e642c0909bc7efdd)) // need verification +ROM_END + +/* MSX - Canon V-20G */ + +ROM_START(canonv20g) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("v20gbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(d6e704ad) SHA1(d67be6d7d56d7229418f4e122f2ec27990db7d19)) // need verification +ROM_END + +/* MSX - Canon V-20S */ + +ROM_START(canonv20s) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("v20sbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(c72b186e) SHA1(9fb289ea5c11d497ee00703f64e82575d1c59923)) // need verification +ROM_END + +/* MSX - Casio MX-10 */ + +ROM_START(mx10) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("3256d19-5k3_z-1.g2", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::mx10(machine_config &config) +{ + // Z80: uPD780C-1 + // AY-3-8910 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot for KB-10 to add a printer port and 2 more cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + + m_hw_def.has_cassette(false).has_printer_port(false); + msx1(VDP_TMS9118, SND_AY8910, config); +} + +/* MSX - Casio MX-15 */ + +ROM_START(mx15) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mx15bios.rom", 0x0000, 0x8000, CRC(6481230f) SHA1(a7ed5fd940f4e3a33e676840c0a83ac7ee54d972)) +ROM_END + +void msx1_state::mx15(machine_config &config) +{ + // AY-3-8910 + // T6950 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot for KB-15 to add a printer port and 2 more cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Casio MX-101 */ + +ROM_START(mx101) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("3256d19-5k3_z-1", 0x0000, 0x8000, BAD_DUMP CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) // need verification +ROM_END + +void msx1_state::mx101(machine_config &config) +{ + // Z80: uPD780C-1 + // AY-3-8910 + // FDC: None, 0 drives + // 1 Cartridge slots + // 1 Expansion slot for KB-10 to add a printer port and 2 more cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + + m_hw_def.has_cassette(false).has_printer_port(false); + msx1(VDP_TMS9118, SND_AY8910, config); +} + +/* MSX - Casio PV-7 */ + +ROM_START(pv7) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("pv7bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::pv7(machine_config &config) +{ + // AY8910? + // FDC: None, 0 drives + // 1 Cartridge slot + // Non-standard cassette port + // No printer port + // 1 Expansion slot for KB-7 to add a printer port, 2 more cartridge slots, and 8KB RAM + // Z80: uPD780C-1 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1).force_start_address(0xe000); // 8KB RAM + add_cartridge_slot<1>(config, 1); + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9118, SND_AY8910, config); +} + +/* MSX - Casio PV-16 */ + +ROM_START(pv16) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("3256d19-5k3_z-1", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::pv16(machine_config &config) +{ + // NEC UPD780C + // AY-3-8910 + // FDC: None, 0 drives + // 1 Cartridge slot + // No printer port + // 1 Expansion slot for KB-7 to add a printer port, 2 more cartridge slots, and 8KB RAM + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9118, SND_AY8910, config); +} + +/* MSX - CE-TEC MPC-80, German version of Daewoo DPC-200, dump needed to verify */ + +/* MSX - Daewoo CPC-200 */ + +/* MSX - Daewoo CPC-88 */ + +ROM_START(cpc88) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("88bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) // need verification + + ROM_REGION(0x4000, "hangul", 0) + ROM_LOAD("88han.rom", 0x0000, 0x2000, BAD_DUMP CRC(938db440) SHA1(d41676fde0a3047792f93c4a41509b8749e55e74)) // need verification + ROM_RELOAD(0x2000, 0x2000) // Are the contents really mirrored? +ROM_END + +void msx1_state::cpc88(machine_config &config) +{ + // AY-3-8910A + // TMS9928A ? + // FDC: None, 0 drives + // 0 Cartridge slots + // Expansion slot allows addition of cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 2, 1, "hangul"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Daewoo DPC-100 */ + +ROM_START(dpc100) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("100bios.rom", 0x0000, 0x8000, CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) + + ROM_REGION(0x4000, "hangul", 0) + // should be 0x2000? + ROM_LOAD("100han.rom", 0x0000, 0x4000, CRC(97478efb) SHA1(4421fa2504cbce18f7c84b5ea97f04e017007f07)) +ROM_END + +void msx1_state::dpc100(machine_config &config) +{ + // GSS Z8400A PS + // AY-3-8910A + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 2, 1, "hangul"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 3, 1); // 16KB RAM + // expansion slot is in slot #3 + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Daewoo DPC-180 */ + +ROM_START(dpc180) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("180bios.rom", 0x0000, 0x8000, CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) + + ROM_REGION(0x4000, "hangul", 0) + // should be 0x2000? + ROM_LOAD("180han.rom", 0x0000, 0x4000, CRC(97478efb) SHA1(4421fa2504cbce18f7c84b5ea97f04e017007f07)) +ROM_END + +void msx1_state::dpc180(machine_config &config) +{ + // AY-3-8910A + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 2, 1, "hangul"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot is in slot #3 + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Daewoo DPC-200 */ + +ROM_START(dpc200) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("200bios.rom", 0x0000, 0x8000, CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) + + ROM_REGION(0x4000, "hangul", 0) + // should be 0x2000? + ROM_LOAD("200han.rom", 0x0000, 0x4000, CRC(97478efb) SHA1(4421fa2504cbce18f7c84b5ea97f04e017007f07)) +ROM_END + +void msx1_state::dpc200(machine_config &config) +{ + // GSS Z8400A PS cpu + // AY-3-8910A + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 2, 1, "hangul"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot is in slot #3 + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Daewoo DPC-200E (France) */ + +ROM_START(dpc200e) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("dpc200ebios.rom", 0x0000, 0x8000, CRC(d2110d66) SHA1(d3af963e2529662eae63f04a2530454685a1989f)) +ROM_END + +void msx1_state::dpc200e(machine_config &config) +{ + // AY-3-8910 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + // Expansion slot is in slot #3 + + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Daewoo Zemmix CPC-50 */ + +/* MSX - Daewoo Zemmix CPC-50A */ + +ROM_START(cpc50a) + ROM_REGION(0x8000, "mainrom", 0) + // HM6264LP-15 / U0422880 (ic4) + // GMCE? VER1.01 (ic5) + ROM_LOAD("50abios.rom", 0x0000, 0x8000, BAD_DUMP CRC(c3a868ef) SHA1(a08a940aa87313509e00bc5ac7494d53d8e03492)) // need verification +ROM_END + +void msx1_state::cpc50a(machine_config &config) +{ + // NEC uPD780C cpu + // AY-3-8910A + // DW64MX1 + // FDC: None, 0 drives + // 1 Cartridge slot + // No keyboard + // No cassette port + // No printer port + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 3, 1).force_start_address(0xe000); // 8KB RAM + + m_hw_def.has_cassette(false) + .has_printer_port(false); + msx1(VDP_TMS9118, SND_AY8910, config); +} + +/* MSX - Daewoo Zemmix CPC-50B */ + +ROM_START(cpc50b) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("50bbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(c3a868ef) SHA1(a08a940aa87313509e00bc5ac7494d53d8e03492)) // need verification +ROM_END + +void msx1_state::cpc50b(machine_config &config) +{ + // AY-3-8910A + // DW64MX1 + // FDC: None, 0 drives + // 1 Cartridge slot + // No keyboard + // No cassette port + // No printer port + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 3, 1); // 16KB RAM + + m_hw_def.has_cassette(false) + .has_printer_port(false); + msx1(VDP_TMS9118, SND_AY8910, config); +} + +/* MSX - Daewoo Zemmix CPC-51 */ + +ROM_START(cpc51) + ROM_REGION(0x8000, "mainrom", 0) + // Sticker: CPC-51 V 1.01 (ic05) + ROM_LOAD("cpc-51_v_1_01.ic05", 0x0000, 0x8000, CRC(c3a868ef) SHA1(a08a940aa87313509e00bc5ac7494d53d8e03492)) +ROM_END + +void msx1_state::cpc51(machine_config &config) +{ + // GSS Z8400A PS cpu + // AY-3-8910A + // FDC: None, 0 drives + // DW64MX1 + // 1 Cartridge slot + // No keyboard, just a keyboard connector + // No cassette port + // No printer port + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + + m_hw_def.has_cassette(false) + .has_printer_port(false); + msx1(VDP_TMS9118, SND_AY8910, config); +} + +/* MSX - Daewoo Zemmix DTX-1493FW */ + +/* MSX - Dragon MSX-64 */ + +ROM_START(dgnmsx) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("uk1msx048.ic37", 0x0000, 0x4000, BAD_DUMP CRC(24c198be) SHA1(7f8c94cb8913db32a696dec80ffc78e46693f1b7)) // need verification + ROM_LOAD("uk2msx058.ic6", 0x4000, 0x4000, BAD_DUMP CRC(e516e7e5) SHA1(05fedd4b9bfcf4949020c79d32c4c3f03a54fb62)) // need verification +ROM_END + +void msx1_state::dgnmsx(machine_config &config) +{ + // Sharp LH0080A cpu + // AY-3-8910 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Dynadata DPC-200 */ +// GSS Z8400A PS +// AY-3-8910A +// 1 Cartridge slot +// 1 Expansion slot +// TMS9929A + +/* MSX - Fenner DPC-200 */ + +ROM_START(fdpc200) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("dpc200bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) // need verification +ROM_END + +void msx1_state::fdpc200(machine_config &config) +{ + // AY-3-8910 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + // Expansion slot + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Fenner FPC-500 */ + +ROM_START(fpc500) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("fpc500bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) // need verification +ROM_END + +void msx1_state::fpc500(machine_config &config) +{ + // AY-3-8910 + // T6950 vdp + // T7775 msx engine + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Fenner SPC-800 */ + +ROM_START(fspc800) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("spc800bios.u7", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) +ROM_END + +void msx1_state::fspc800(machine_config &config) +{ + // GSS Z8400A + // AY-3-8910A + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Fujitsu FM-X */ + +ROM_START(fmx) + ROM_REGION(0x8000, "mainrom", 0) + // mb62h010 ? + ROM_LOAD("fmxbios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::fmx(machine_config &config) +{ + // 21.4772Mhz + // AY-3-8910A + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 "Fujitsu expansion" slot for MB22450 (to connect FM-X to FM7) or MB22451 (printer port + 16KB ram) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + // Fujitsu expansion slot #1 in slot 1 + add_cartridge_slot<1>(config, 2); + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - General PCT-50 */ + +/* MSX - General PCT-55 */ + +/* MSX - Goldstar FC-80 */ + +/* MSX - Goldstar FC-80U */ + +ROM_START(gsfc80u) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("fc80ubios.rom", 0x0000, 0x8000, CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) + + ROM_REGION(0x4000, "hangul", 0) + ROM_LOAD("fc80uhan.rom", 0x0000, 0x2000, CRC(0cdb8501) SHA1(58dbe73ae80c2c409e766c3ace730ecd7bec89d0)) + ROM_RELOAD(0x2000, 0x2000) +ROM_END + +void msx1_state::gsfc80u(machine_config &config) +{ + // AY-3-8910A + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + // Hangul LED + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 2, 1, "hangul"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot in slot #3 + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Goldstar FC-200 */ + +ROM_START(gsfc200) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("fc200bios.rom.u5a", 0x0000, 0x4000, CRC(61f473fb) SHA1(c425750bbb2ae1d278216b45029d303e37d8df2f)) + ROM_LOAD("fc200bios.rom.u5b", 0x4000, 0x4000, CRC(1a99b1a1) SHA1(e18f72271b64693a2a2bc226e1b9ebd0448e07c0)) +ROM_END + +void msx1_state::gsfc200(machine_config &config) +{ + // AY-3-8910A + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot in slot #3 + + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Goldstar GFC-1080 */ + +ROM_START(gfc1080) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("gfc1080bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(d9cdd4a6) SHA1(6b0be712b9c95c1e912252ab5703e1c0bc457d9e)) // need verification + + ROM_REGION(0x4000, "hangul", 0) + ROM_LOAD("gfc1080han.rom", 0x0000, 0x4000, BAD_DUMP CRC(f209448c) SHA1(141b44212ba28e7d03e0b54126fedd9e0807dc42)) // need verification + + ROM_REGION(0x4000, "pasocalc", 0) + ROM_LOAD("gfc1080pasocalc.rom", 0x0000, 0x4000, BAD_DUMP CRC(4014f7ea) SHA1(a5581fa3ce10f90f15ba3dc53d57b02d6e4af172)) // need verification +ROM_END + +void msx1_state::gfc1080(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 2, 1, "hangul"); + add_internal_slot(config, MSX_SLOT_ROM, "pasocalc", 0, 3, 1, "pasocalc"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot in slot #3 + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Goldstar GFC-1080A */ + +ROM_START(gfc1080a) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("gfc1080abios.rom", 0x0000, 0x8000, BAD_DUMP CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) // need verification + + ROM_REGION(0x4000, "hangul", 0) + ROM_LOAD("gfc1080ahan.rom", 0x0000, 0x2000, BAD_DUMP CRC(0cdb8501) SHA1(58dbe73ae80c2c409e766c3ace730ecd7bec89d0)) // need verification + ROM_RELOAD(0x2000, 0x2000) +ROM_END + +void msx1_state::gfc1080a(machine_config &config) +{ + // AY-3-8910A + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 2, 1, "hangul"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot in slot #3 + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Gradiente Expert 1.3 - source? */ + +ROM_START(expert13) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("expbios13.rom", 0x0000, 0x8000, BAD_DUMP CRC(5638bc38) SHA1(605f5af3f358c6811f54e0173bad908614a198c0)) // need verification +ROM_END + +void msx1_state::expert13(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2 Cartridge slots? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Gradiente Expert DDPlus */ +ROM_START(expertdp) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("eddpbios.rom", 0x0000, 0x8000, CRC(efb4b972) SHA1(d6720845928ee848cfa88a86accb067397685f02)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("eddpdisk.rom", 0x0000, 0x4000, CRC(549f1d90) SHA1(f1525de4e0b60a6687156c2a96f8a8b2044b6c56)) +ROM_END + +void msx1_state::expertdp(machine_config &config) +{ + // T7766A (AY-3-8910A compatible, integrated in T7937A) + // FDC: mb8877a, 1 3.5" DSDD drive + // non-standard cassette port + // non-standard printer port + // 2 Cartridge slots + // T6950 (integrated in T7937A) + // MSX Engine T7937A (also VDP) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64KB RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK2_MB8877, "diskrom", 3, 3, 1, 2, "diskrom"); + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Gradiente Expert Plus */ + +ROM_START(expertpl) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("exppbios.rom", 0x0000, 0x8000, CRC(efb4b972) SHA1(d6720845928ee848cfa88a86accb067397685f02)) + + ROM_REGION(0x4000, "demo", 0) + ROM_LOAD("exppdemo.rom", 0x0000, 0x4000, CRC(a9bbef64) SHA1(d4cea8c815f3eeabe0c6a1c845f902ec4318bf6b)) +ROM_END + +void msx1_state::expertpl(machine_config &config) +{ + // T7766A (AY-3-8910 compatible in T7937A) + // FDC: None, 0 drives + // 2 Cartridge slots + // MSX Engine T7937A (with T6950 VDP and T7766A psg) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "demo", 3, 3, 2, 1, "demo"); + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Gradiente Expert XP-800 (1.0) */ + +ROM_START(expert10) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("expbios.rom", 0x0000, 0x8000, CRC(07610d77) SHA1(ef3e010eb57e4476700a3bbff9d2119ab3acdf62)) +ROM_END + +void msx1_state::expert10(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // non-standard cassette port + // non-standard printer port + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // when no cartridge is inserted the expansion slot can be used in this slot + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9128, SND_AY8910, config); +} + +/* MSX - Gradiente Expert XP-800 (1.1) / GPC-1 */ +ROM_START(expert11) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("expbios11.rom", 0x0000, 0x8000, CRC(efb4b972) SHA1(d6720845928ee848cfa88a86accb067397685f02)) +ROM_END + +void msx1_state::expert11(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // when no cartridge is inserted the expansion slot can be used in this slot + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9128, SND_AY8910, config); +} + +/* MSX - Hitachi MB-H1 */ + +ROM_START(mbh1) + ROM_REGION(0xc000, "mainrom", 0) + ROM_LOAD("mbh1bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("mbh1firm.rom", 0x0000, 0x2000, CRC(83f5662b) SHA1(3e005832138ffde8b1c36025754f81c2112b236d)) +ROM_END + +void msx1_state::mbh1(machine_config &config) +{ + // AY-3-8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // Speed controller (normal, slow 1, slow 2) + // Firmware should be bypassed when a cartridge is inserted + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 1, 1, "firmware"); + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Hitachi MB-H1E */ + +ROM_START(mbh1e) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mbh1bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) // need verification +ROM_END + +void msx1_state::mbh1e(machine_config &config) +{ + // AY-3-8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // Speed controller (normal, slow 1, slow 2) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Hitachi MB-H2 */ + +ROM_START(mbh2) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mbh2bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("mbh2firm.rom", 0x0000, 0x4000, CRC(4f03c947) SHA1(e2140fa2e8e59090ecccf55b62323ea9dcc66d0b)) +ROM_END + +void msx1_state::mbh2(machine_config &config) +{ + // AY-3-8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // Builtin cassette player + // Speed controller (normal, slow 1, slow 2) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 2, 1, "firmware"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Hitachi MB-H21 */ + +/* MSX - Hitachi MB-H25 */ + +ROM_START(mbh25) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mbh25bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) // need verification +ROM_END + +void msx1_state::mbh25(machine_config &config) +{ + // AY-3-8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // Speed controller (normal, slow 1, slow 2) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + msx1(VDP_TMS9118, SND_AY8910, config); +} + +/* MSX - Hitachi MB-H50 */ + +ROM_START(mbh50) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mbh50bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::mbh50(machine_config &config) +{ + // YM2149 in S3527 + // FDC: None, 0 drives + // 2 Cartridge slots + // T6950A + // MSX-Engine S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + + msx1(VDP_TMS9928A, SND_YM2149, config); +} + +/* MSX - Hitachi MB-H80 (unreleased) */ + +/* MSX - In Tensai DPC-200CD */ + +/* MSX - JVC HC-7E / HC-7GB (different power supplies) */ + +ROM_START(jvchc7gb) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hc7gbbios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) +ROM_END + +void msx1_state::jvchc7gb(machine_config &config) +{ + // AY-3-8910A + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Jotan Holland Bingo */ + +/* MSX - Misawa-Van CX-5 */ + +/* MSX - Mitsubishi ML-8000 */ + +ROM_START(ml8000) + ROM_REGION(0x8000, "mainrom", 0) + // Same contents as standard 32kb bios with sha1 302afb5d8be26c758309ca3df611ae69cced2821 + // split across 4 eeproms + ROM_LOAD("1.ic56", 0x0000, 0x2000, BAD_DUMP CRC(782e39fd) SHA1(ad20865df0d33ee5379b69be984302fb85d74c5a)) // need verification + ROM_LOAD("2.ic32", 0x2000, 0x2000, BAD_DUMP CRC(d859cf14) SHA1(b6894ed3cd5be5a73a93fd02d275d6c1237310e6)) // need verification + ROM_LOAD("3.ic26", 0x4000, 0x2000, BAD_DUMP CRC(b3211adf) SHA1(fad7be46d1137f636c23dc01e498cc38cff486e3)) // need verification + ROM_LOAD("4.ic22", 0x6000, 0x2000, BAD_DUMP CRC(24e09092) SHA1(d6fdff0fa86a248ce319888275d1c634480b58c4)) // need verification +ROM_END + +void msx1_state::ml8000(machine_config &config) +{ + // NEC uPD780C + // AY-3-8910 + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Mitsubishi ML-F48 */ + +ROM_START(mlf48) + ROM_REGION(0x8000, "mainrom", 0) + // 4j3 hn613256p m82 ? + ROM_LOAD("mlf48bios.ic2d", 0x0000, 0x8000, BAD_DUMP CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) // needs verification +ROM_END + +void msx1_state::mlf48(machine_config &config) +{ + // NEC uPD780C + // AY-3-8910A + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 2); + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9929A, SND_AY8910, config); // videochip needs verification +} + +/* MSX - Mitsubishi ML-F80 */ + +ROM_START(mlf80) + ROM_REGION(0x8000, "mainrom", 0) + // 4j1 hn613256p m82 ? + ROM_LOAD("mlf80bios.ic2d", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) +ROM_END + +void msx1_state::mlf80(machine_config &config) +{ + // 21.3750MHz + // AY-3-8910A + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9929A, SND_AY8910, config); // videochip needs verification +} + +/* MSX - Mitsubishi ML-F110 */ + +ROM_START(mlf110) + ROM_REGION(0x8000, "mainrom", 0) + // 4j1 mn613256p d35 + ROM_LOAD("hn613256p.ic6d", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::mlf110(machine_config &config) +{ + // NEC uPD780C + // AY-3-8910A + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 2); + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Mitsubishi ML-F120 / ML-F120D */ + +ROM_START(mlf120) + ROM_REGION(0x8000, "mainrom", 0) + // 4k3 hn613256p d35 ? + // 904p874h11 ? + ROM_LOAD("hn613256p.ic6d", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("t704p890h11.ic8d", 0x0000, 0x4000, CRC(4b5f3173) SHA1(21a9f60cb6370d0617ce54c42bb7d8e40a4ab560)) +ROM_END + +void msx1_state::mlf120(machine_config &config) +{ + // NEC uPD780C + // AY-3-8910A + // FDC: None, 0 drives + // 2 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 1, 1, "firmware"); + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Mitsubishi ML-F120D (functionality wise same as ML-F120 but with RGB out instead of composite) +Different PCB from ML-F120: +21.4772Mhz +TMS9928A +AY-3-8910 +3 ROMs? - labels unreadable, locations ic5?, ic7f, ic10f + */ + +/* MSX - Mitsubishi ML-FX1 */ + +ROM_START(mlfx1) + ROM_REGION(0x8000, "mainrom", 0) + // 5c1 hn613256p t21 t704p874h21-u + ROM_LOAD("mlfx1bios.ic6c", 0x0000, 0x8000, CRC(62867dce) SHA1(0cbe0df4af45e8f531e9c761403ac9e71808f20c)) +ROM_END + +void msx1_state::mlfx1(machine_config &config) +{ + // NEC uPD780C + // YM2149 (in S3527 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // MSX-Engine S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_YM2149, config); +} + +/* MSX - Mitsubishi ML-FX2 */ + +/* MSX - Mitsubishi ML-TS1 */ + +/* MSX - National CF-1200 */ + +ROM_START(cf1200) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("1200bios.rom", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) +ROM_END + +void msx1_state::cf1200(machine_config &config) +{ + // AY8910, needs verification + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + msx1(VDP_TMS9918A, SND_AY8910, config); // soundchip needs verification +} + +/* MSX - National CF-2000 */ + +ROM_START(cf2000) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("2000bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::cf2000(machine_config &config) +{ + // AY-3-8910A, needs verification + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + msx1(VDP_TMS9928A, SND_AY8910, config); // soundchip needs verification +} + +/* MSX - National CF-2700 */ + +ROM_START(cf2700) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("2700bios.rom.ic32", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) +ROM_END + +void msx1_state::cf2700(machine_config &config) +{ + // NEC upD780C + // AY-3-8910A + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - National CF-3000 */ + +ROM_START(cf3000) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("3000bios.rom", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) +ROM_END + +void msx1_state::cf3000(machine_config &config) +{ + // AY-3-8910 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - National CF-3300 */ + +ROM_START(cf3300) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("3300bios.rom", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("3300disk.rom", 0x0000, 0x4000, CRC(549f1d90) SHA1(f1525de4e0b60a6687156c2a96f8a8b2044b6c56)) +ROM_END + +void msx1_state::cf3300(machine_config &config) +{ + // AY8910/YM2149? + // FDC: mb8877a, 1 3.5" SSDD drive + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64KB RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK2_MB8877_SS, "diskrom", 3, 1, 1, 2, "diskrom"); + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - National FS-1300 */ + +ROM_START(fs1300) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("1300bios.rom", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) +ROM_END + +void msx1_state::fs1300(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - National FS-4000 */ + +ROM_START(fs4000) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("4000bios.rom", 0x0000, 0x8000, CRC(071135e0) SHA1(df48902f5f12af8867ae1a87f255145f0e5e0774)) + + ROM_REGION(0x8000, "word", 0) + ROM_LOAD("4000word.rom", 0x0000, 0x8000, CRC(950b6c87) SHA1(931d6318774bd495a32ec3dabf8d0edfc9913324)) + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("4000kdr.rom", 0x0000, 0x8000, CRC(ebaa5a1e) SHA1(77bd67d5d10d459d343e79eafcd8e17eb0f209dd)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("4000kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) +ROM_END + +void msx1_state::fs4000(machine_config &config) +{ + // YM2149 in S3527 + // FDC: None, 0 drives + // 2 Cartridge slots + // MSX-Engine S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 0, 0, 2, "word"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "kdr"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + + msx1(VDP_TMS9128, SND_YM2149, config); +} + +/* MSX - National FS-4000 (Alt) */ + +ROM_START(fs4000a) + ROM_REGION(0x8000 ,"mainrom", 0) + ROM_LOAD("4000bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(071135e0) SHA1(df48902f5f12af8867ae1a87f255145f0e5e0774)) // need verification + + ROM_REGION(0x8000, "word", 0) + ROM_LOAD("4000wora.rom", 0x0000, 0x8000, BAD_DUMP CRC(52f4cdf7) SHA1(acbac3cb5b700254bed2cacc19fa54f1950f371d)) // need verification + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("4000kdra.rom", 0x0000, 0x8000, BAD_DUMP CRC(b2db6bf5) SHA1(3a9a942ed888dd641cddf8deada1879c454df3c6)) // need verification + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("4000kfn.rom", 0, 0x20000, BAD_DUMP CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) // need verification +ROM_END + +void msx1_state::fs4000a(machine_config &config) +{ + // YM2149 in S3527 + // FDC: None, 0 drives + // 2 Cartridge slots + // MSX-Engine S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "word", 3, 0, 0, 2, "word"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "kdr"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + + msx1(VDP_TMS9128, SND_YM2149, config); +} + +/* MSX - Network DPC-200 */ + +/* MSX - Olympia DPC-200 */ +// GSS Z8400A PS +// AY-3-8910A +// ic8 ROM 9256C-0047 R09256C-INT + +/* MSX - Olympia PHC-2 */ + +ROM_START(phc2) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("r09256c-fra.ic8", 0x0000, 0x8000, CRC(d2110d66) SHA1(d3af963e2529662eae63f04a2530454685a1989f)) +ROM_END + +void msx1_state::phc2(machine_config &config) +{ + // AY-3-8910 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + // Expansion slot in slot #3 + + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Olympia PHC-28 */ + +ROM_START(phc28) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("phc28bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(eceb2802) SHA1(195950173701abeb460a1a070d83466f3f53b337)) // need verification +ROM_END + +void msx1_state::phc28(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2 Cartridge slots + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + // Expansion slot in slot #3 + + msx1(VDP_TMS9929A, SND_AY8910, config); // soundchip and videochip need verification +} + +/* MSX - Panasonic CF-2700 (Germany) */ + +ROM_START(cf2700g) + ROM_REGION(0x8000, "mainrom", 0) + // mn23257rfa + ROM_LOAD("cf2700g.ic32", 0x0000, 0x8000, CRC(4aa194f4) SHA1(69bf27b610e11437dad1f7a1c37a63179a293d12)) +ROM_END + +void msx1_state::cf2700g(machine_config &config) +{ + // NEC uPD780C + // AY-3-8910A + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Panasonic CF-2700 (UK) */ + +ROM_START(cf2700uk) + ROM_REGION(0x8000, "mainrom", 0) + // mn23257rfa + ROM_LOAD("cf2700uk.ic32", 0x0000, 0x8000, CRC(15e503de) SHA1(5e6b1306a30bbb46af61487d1a3cc1b0a69004c3)) +ROM_END + +void msx1_state::cf2700uk(machine_config &config) +{ + // NEC uPD780C + // AY-3-8910A + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Panasonic FS-3900 */ + +/* MSX - Philips NMS 800 */ +// SGS Z8400AB1 +// AY-3-8910A +// TMS9129 +// U3 - ST27256-25CP +// 0 Cartridge slots +// No printer port + +/* MSX - Philips NMS 801 */ + +ROM_START(nms801) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("801bios.rom", 0x0000, 0x8000, CRC(fa089461) SHA1(21329398c0f350e330b353f45f21aa7ba338fc8d)) +ROM_END + +void msx1_state::nms801(machine_config &config) +{ + // SGS Z8400AB1 + // AY-3-8910A + // FDC: None, 0 drives + // 0 Cartridge slots + // No printer port + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Philips VG-8000 */ + +ROM_START(vg8000) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("8000bios.rom", 0x0000, 0x8000, CRC(efd970b0) SHA1(42252cf87deeb58181a7bfec7c874190a1351779)) +ROM_END + +void msx1_state::vg8000(machine_config &config) +{ + // SGS Z8400AB1 + // AY-3-8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // No printer port + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Philips VG-8010 / VG-8010/00 */ + +ROM_START(vg8010) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("vg8000v1_0.663", 0x0000, 0x8000, CRC(efd970b0) SHA1(42252cf87deeb58181a7bfec7c874190a1351779)) +ROM_END + +void msx1_state::vg8010(machine_config &config) +{ + // SGS Z8400AB1 + // AY-3-8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // No printer port + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Philips VG-8010F / VG-8010/19 */ + +ROM_START(vg8010f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("8010fbios.663", 0x0000, 0x8000, CRC(df57c9ca) SHA1(898630ad1497dc9a329580c682ee55c4bcb9c30c)) +ROM_END + +void msx1_state::vg8010f(machine_config &config) +{ + // SGS Z8400AB1 + // AY-3-8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // No printer port + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Philips VG-8020-00 */ + +ROM_START(vg802000) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("8020-00bios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) +ROM_END + +void msx1_state::vg802000(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_YM2149, config); +} + +/* MSX - Philips VG-8020/19 / VG-8020F */ + +ROM_START(vg8020f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("8020-19bios.u11", 0x0000, 0x8000, CRC(70ce2d45) SHA1(ae4a6632d4456ef44603e72f5acd5bbcd6c0d124)) +ROM_END + +void msx1_state::vg8020f(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_YM2149, config); +} + +/* MSX - Philips VG-8020/20 */ + +ROM_START(vg802020) + ROM_REGION(0x8000, "mainrom", 0) + // m38256-k5 z-4 int rev1 + ROM_LOAD("8020-20bios.u11", 0x0000, 0x8000, CRC(a317e6b4) SHA1(e998f0c441f4f1800ef44e42cd1659150206cf79)) +ROM_END + +void msx1_state::vg802020(machine_config &config) +{ + // Zilog Z8400APS + // YM2149 (in S-3527 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9129, SND_YM2149, config); +} + +/* MSX - Phonola VG-8000 (Italian market, mostly likely same as Philips VG-8000) */ + +/* MSX - Phonola VG-8010 (Italian market, mostly likely same as Philips VG-8010) */ + +/* MSX - Phonola VG-8020 (Italian market, mostly likely same as Philips VG-8020) */ + +/* MSX - Pioneer PX-7 + +|---------------------------------------| +| CN1 CN2 | +| | +| | +| IC33 |---------------------------------| +| CN3 | +| IC32 IC34 IC38 IC40 | +| IC20 | +| IC15 IC18 IC43 IC8 IC35 IC6 |----IC3---| | +| |----------| IC21 | +| IC16 IC19 |---IC13---| IC7 IC10 | +| |----------| IC36 IC29 --- | +| IC17 IC14 X2 | | | +| |--IC12---| |----IC1-----| IC37 |I| | +| IC28 IC11 |---------| |------------| X1 |C| | +| |2| | +| |----IC4----| |----IC5----| IC39 IC9 IC42 IC44 | | | +| |-----------| |-----------| --- | +| | +| IC45 IC31 IC30 IC41 | +| | +| CN4 CN5 CN6 CN7 CN8 | +|-------------------------------------------------------------------------| + +Notes: + X1 - 3.579MHz + X2 - 500kHz + IC1 - Sharp LH0080A Z80A-CPU-D + IC2 - TMS91289NL + IC3 - MB111S112 Z10 (500kHz) + IC4 - M5L8255AP-5 + IC5 - YM2149F + IC6,IC7,IC8,IC10,IC45 - SN74LS367AN + IC9 - SN74LS245N + IC11,IC34 - SN74LS139N + IC12 - YM2301-23908 / 53 18 85 A (might indicate a version) + IC13 - Pioneer PD5031 2364-213 514100 (M5L2764-213) + IC14,IC17,IC30,IC31 - SN74LS157N + IC15-IC19 - MB81416-12 + IC20,IC21 - TMS4416-I5NL + IC28 - SN74LS153N + IC29 - SN74LS02N + IC32 - SN74LS374N + IC33 - M5218P + IC35 - SN74LS74AN + IC36 - SN74LS30N + IC37-IC39 - SN74LS04N + IC40,IC41 - SN74LS05N + IC42 - SN74LS08N + IC43,IC44 - SN74LS32N + CN1 - Printer + CN2 - Cassette recorder + CN3 - Expansion slot + CN4 - Keyboard + CN5 - Keyboard + CN6 - Controller #1 + CN7 - Controller #2 + CN8 - Expansion slot + + */ + +// BIOS is for an international keyboard while the machine has a Japanese layout +ROM_START(piopx7) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ym2301.ic12", 0x0000, 0x8000, BAD_DUMP CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) + + ROM_REGION(0x4000, "pbasic", 0) + ROM_LOAD("pd5031.ic13", 0x0000, 0x2000, CRC(a5d0c0b9) SHA1(665d805f96616e1037f1823050657b7849899283)) // v1.0 + ROM_FILL(0x2000, 0x2000, 0x6e) +ROM_END + +void msx1_state::piopx7(machine_config &config) +{ + // TMS9928ANL VDP with sync/overlay interface + // AY-3-8910 PSG + // Pioneer System Remote (SR) system control interface + // FDC: None, 0 drives + // 2 Cartridge slots + + // Line-level stereo audio input can be mixed with sound output, balance controlled with slider on front panel + // Front-panel switch allows audio input to be passed through bypassing the mixing circuit + // Line input can be muted under software control, e.g. when loading data from Laserdisc + // Right channel of line input is additionally routed via some signal processing to the cassette input for loading data from Laserdisc + + // PSG port B bits 0-5 can be used to drive controller pins 1-6, 1-7, 2-6, 2-7, 1-8 and 2-8 low if 0 is written + + // Slot #2 7FFE is the SR control register LCON + // Bit 7 R = /ACK (significant with acknowledge 1->0 with respect to remote control signal transmission) + // Bit 0 R = RMCLK (clock produced by dividing CLK1/CLK2 frequency by 128) + // Bit 0 W = /REM (high output with bit serial data output generated in synchronisation with RMCLK) + + // Slot #2 7FFF is the video overlay control register VCON + // Bit 7 R = /EXTV (low when external video input available; high when not available) + // Bit 7 W = Mute (line input signal muting) + // Bit 0 R = INTEXV (interrupt available when external video signal OFF, reset on read) + // Bit 0 W = /OVERLAY (0 = superimpose, 1 = non-superimpose) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_ROM, "pbasic", 2, 1, 1, "pbasic"); + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Pioneer PX-7UK */ + +ROM_START(piopx7uk) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("px7ukbios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) + + ROM_REGION(0x4000, "pbasic", 0) + ROM_LOAD("px7ukpbasic.rom", 0x0000, 0x2000, CRC(91e0df72) SHA1(4f0102cdc27216fd9bcdb9663db728d2ccd8ca6d)) // v1,1 + ROM_FILL(0x2000, 0x2000, 0x6e) + +// Is this a cartridge that came with the machine? +// ROM_REGION(0x8000, "videoart", 0) +// ROM_LOAD("videoart.rom", 0x0000, 0x8000, CRC(0ba148dc) SHA1(b7b4e4cd40a856bb071976e6cf0f5e546fc86a78)) +ROM_END + +void msx1_state::piopx7uk(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_ROM, "pbasic", 2, 1, 1, "pbasic"); + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9129, SND_YM2149, config); +} + +/* MSX - Pioneer PX-V60 */ + +ROM_START(piopxv60) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("pxv60bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) + + ROM_REGION(0x4000, "pbasic", 0) + ROM_LOAD("pd5031.rom", 0x0000, 0x2000, CRC(91e0df72) SHA1(4f0102cdc27216fd9bcdb9663db728d2ccd8ca6d)) // v1.1 + ROM_FILL(0x2000, 0x2000, 0x6E) +ROM_END + +void msx1_state::piopxv60(machine_config &config) +{ + // Sharp LH0080A + // YM2149 in S3527 + // FDC: None, 0 drives + // 2 Cartridge slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_ROM, "pbasic", 2, 1, 1, "pbasic"); + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9128, SND_YM2149, config); +} + +/* MSX - Pioneer PX-V7 */ + +/* MSX - Radiola MK 180 */ + +/* MSX - Sakhr AH-200 */ + +/* MSX - Sakhr AX-100 */ + +/* MSX - Sakhr AX-150 */ + +ROM_START(ax150) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ax150bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(bd95c436) SHA1(5e094fca95ab8e91873ee372a3f1239b9a48a48d)) // need verification + + ROM_REGION(0x8000, "arabic", 0) + ROM_LOAD("ax150arab.rom", 0x0000, 0x8000, BAD_DUMP CRC(339cd1aa) SHA1(0287b2ec897b9196788cd9f10c99e1487d7adbbb)) // need verification +ROM_END + +void msx1_state::ax150(machine_config &config) +{ + // YM2149 in S3527 + // FDC: None, 0 drives + // 2 Cartridge slots + // YM2220 (compatible with TMS9918) + // MSX-Engine S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "arabic", 0, 1, 1, 2, "arabic"); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 0, 2, 0, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + msx1(VDP_TMS9918, SND_YM2149, config); +} + +/* MSX - Sakhr AX-170 */ + +ROM_START (ax170) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ax170bios.rom", 0x0000, 0x8000, CRC(bd95c436) SHA1(5e094fca95ab8e91873ee372a3f1239b9a48a48d)) + + ROM_REGION(0x8000, "arabic", 0) + ROM_LOAD("ax170arab.rom", 0x0000, 0x8000, CRC(339cd1aa) SHA1(0287b2ec897b9196788cd9f10c99e1487d7adbbb)) +ROM_END + +void msx1_state::ax170(machine_config &config) +{ + // AY-3-8910 in T7937 + // FDC: None, 0 drives + // 2 Cartridge slots + // T6950 in T7937 + // T7937 (in ax170mk2) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "arabic", 1, 1, 2, "arabic"); + add_cartridge_slot<1>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64KB RAM + add_cartridge_slot<2>(config, 3, 3); + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Sakhr AX-170F */ + +/* MSX - Sakhr AX-230 */ + +ROM_START (ax230) + ROM_REGION(0x20000, "mainrom", 0) + ROM_LOAD("qxxca0259.ic125", 0x0000, 0x20000, CRC(f1a3e650) SHA1(0340707c5de2310dcf5e569b7db4c6a6a5590cb7)) + + ROM_REGION(0x100000, "games", 0) + ROM_LOAD("qxxca0270.ic127", 0x00000, 0x100000, CRC(103c11c4) SHA1(620a209bdfdb65a22380031fce654bd1df61def2)) +ROM_END + +void msx1_state::ax230(machine_config &config) +{ + // AY-3-8910 in T7937 + // FDC: None, 0 drives + // 2 Cartridge slots + // T6950 in T7937 + // T7937 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + // TODO: is and if so, how is the rest of ic125 accessed? + add_internal_slot(config, MSX_SLOT_ROM, "arabic1", 1, 1, 1, "mainrom", 0xc000); + add_internal_slot(config, MSX_SLOT_ROM, "arabic2", 1, 2, 1, "mainrom", 0x8000); + add_cartridge_slot<1>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64KB RAM + add_internal_slot(config, MSX_SLOT_AX230, "games", 3, 3, 1, 2, "games"); + + msx1(VDP_TMS9918, SND_AY8910, config); +} + +/* MSX - Sakhr AX-330 */ + +/* MSX - Sakhr AX-660 */ + +/* MSX - Sakhr AX-990 */ + +/* MSX - Salora MSX (prototypes) */ + +/* MSX - Samsung SPC-800 */ + +ROM_START(spc800) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("spc800bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(3ab0cd3b) SHA1(171b587bd5a947a13f3114120b6e7baca3b57d78)) // need verification + + ROM_REGION(0x4000, "hangul", 0) + ROM_LOAD("spc800han.rom", 0x0000, 0x4000, BAD_DUMP CRC(5ae2b013) SHA1(1e7616261a203580c1044205ad8766d104f1d874)) // need verification +ROM_END + +void msx1_state::spc800(machine_config &config) +{ + // AY-3-8910 + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 2, 1, "hangul"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB?? RAM + // Expansion slot in slot #3 + + msx1(VDP_TMS9118, SND_AY8910, config); +} + +/* MSX - Sanno PHC-SPC */ + +/* MSX - Sanno SPCmk-II */ + +/* MSX - Sanno SPCmk-III */ + +/* MSX - Sanyo MPC-1 / Wavy1 */ + +/* MSX - Sanyo MPC-10 / Wavy10 */ + +/* MSX - Sanyo MPC-64 */ + +ROM_START(mpc64) + ROM_REGION(0x8000, "mainrom", 0) + // hn613256p t22 5c1 ? + ROM_LOAD("mpc64bios.ic111", 0x0000, 0x8000, BAD_DUMP CRC(d6e704ad) SHA1(d67be6d7d56d7229418f4e122f2ec27990db7d19)) // needs verification +ROM_END + +void msx1_state::mpc64(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Sanyo MPC-100 */ + +ROM_START(mpc100) + ROM_REGION(0x8000, "mainrom", 0) + // hn613256p 4j1 ? + ROM_LOAD("mpc100bios.ic122", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) +ROM_END + +void msx1_state::mpc100(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Sanyo MPC-200 */ + +ROM_START(mpc200) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mpc200bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) // need verification +ROM_END + +void msx1_state::mpc200(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // T6950 + // T7775 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Sanyo MPC-200SP (same as Sanyo MPC-200 ?) */ + +ROM_START(mpc200sp) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mpcsp200bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(bcd79900) SHA1(fc8c2b69351e60dc902add232032c2d69f00e41e)) // need verification +ROM_END + +void msx1_state::mpc200sp(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2? Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Sanyo PHC-28L */ + +ROM_START(phc28l) + ROM_REGION(0x8000, "mainrom", 0) + // 5a1 hn613256p g42 + ROM_LOAD("28lbios.ic20", 0x0000, 0x8000, CRC(d2110d66) SHA1(d3af963e2529662eae63f04a2530454685a1989f)) +ROM_END + +void msx1_state::phc28l(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_YM2149, config); +} + +/* MSX - Sanyo PHC-28S */ + +ROM_START(phc28s) + ROM_REGION(0x8000, "mainrom", 0) + // 4l1 hn613256p m74 + ROM_LOAD("28sbios.ic2", 0x0000, 0x8000, CRC(e5cf6b3c) SHA1(b1cce60ef61c058f5e42ef7ac635018d1a431168)) +ROM_END + +void msx1_state::phc28s(machine_config &config) +{ + // 10.738MHz and 3.574545MHz + // AY8910 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 2); // 32KB RAM + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Sanyo Wavy MPC-10 */ + +ROM_START(mpc10) + ROM_REGION(0x8000, "mainrom", 0) + // Split across 2 roms? (image hard to read) + // ic14? hn613256p d24 ? + // ic15? hn613256p d25 ? + ROM_LOAD("mpc10.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::mpc10(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #2 + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 2); // 32KB RAM + + msx1(VDP_TMS9918, SND_AY8910, config); +} + +/* MSX - Schneider MC 810 */ + +/* MSX - Sharp Epcom HB-8000 (HotBit) */ + +ROM_START(hb8000) + ROM_REGION(0x8000, "mainrom", 0) + ROM_SYSTEM_BIOS(0, "v12", "v1.2") + ROMX_LOAD("hotbit12.ic28", 0x0000, 0x8000, CRC(f59a4a0c) SHA1(9425815446d468058705bae545ffa13646744a87), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "v11", "v1.1") + ROMX_LOAD("hotbit11.ic28", 0x0000, 0x8000, CRC(b6942694) SHA1(663f8c512d04d213fa616b0db5eefe3774012a4b), ROM_BIOS(1)) + // v1.0 missing +ROM_END + +void msx1_state::hb8000(machine_config &config) +{ + // AY8910 and YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9128, SND_AY8910, config); +} + +/* MSX - Sharp Epcom HB-8000 (HotBit 1.3b) */ + +ROM_START(hotbi13b) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hotbit13b.rom", 0x0000, 0x8000, BAD_DUMP CRC(7a19820e) SHA1(e0c2bfb078562d15acabc5831020a2370ea87052)) // need verification +ROM_END + +void msx1_state::hotbi13b(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2 Cartridge slots? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Sharp Epcom HB-8000 (HotBit 1.3p) */ + +ROM_START(hotbi13p) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hotbit13p.rom", 0x0000, 0x8000, BAD_DUMP CRC(150e239c) SHA1(942f9507d206cd8156f15601fe8032fcf0e3875b)) // need verification +ROM_END + +void msx1_state::hotbi13p(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2 Cartridge slots? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Sincorp SBX (Argentina, homebrew) */ + +/* MSX - Sony HB-10 */ + +ROM_START(hb10) + ROM_REGION(0x8000, "mainrom", 0) + // 5h3 hn613256p c78 + // 3l1 hn613256p c78 ? + ROM_LOAD("hb10bios.ic12", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::hb10(machine_config &config) +{ + // YM2149 (in S-S3527 MSX-Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // S3527 MSX-Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + msx1(VDP_TMS9118, SND_YM2149, config); +} + +/* MSX - Sony HB-10B */ + +/* MSX - Sony HB-10D */ +// ic12 - tmm23256p + +/* MSX - Sony HB-10P */ + +ROM_START(hb10p) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("10pbios.ic12", 0x0000, 0x8000, CRC(0f488dd8) SHA1(5e7c8eab238712d1e18b0219c0f4d4dae180420d)) +ROM_END + +void msx1_state::hb10p(machine_config &config) +{ + // XTAL: 3.579545 + 22.168(VDP) + // YM2149 (in S3527 MSX-Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // T6950 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + // A mirror of RAM appears in slot #0, page #3 + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_YM2149, config); +} + +/* MSX - Sony HB-20P */ + +ROM_START(hb20p) + ROM_REGION(0x8000, "mainrom", 0) + // lh2359z3 + ROM_LOAD("20pbios.ic12", 0x0000, 0x8000, CRC(15ddeb5c) SHA1(63050d2d21214a721cc55f152c22b7be8061ac33)) +ROM_END + +void msx1_state::hb20p(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + // T6950A + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + // A mirror of RAM appears in slot #0, page #3 + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_YM2149, config); +} + +/* MSX - Sony HB-201 */ + +ROM_START(hb201) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("201bios.ic9", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("201note.ic8", 0x0000, 0x4000, CRC(74567244) SHA1(0f4f09f1a6ef7535b243afabfb44a3a0eb0498d9)) +ROM_END + +void msx1_state::hb201(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 2, 1, "firmware"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9118, SND_YM2149, config); +} + +/* MSX - Sony HB-201P */ + +ROM_START(hb201p) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("201pbios.rom.ic9", 0x0000, 0x8000, CRC(0f488dd8) SHA1(5e7c8eab238712d1e18b0219c0f4d4dae180420d)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("201pnote.rom.ic8", 0x0000, 0x4000, CRC(1ff9b6ec) SHA1(e84d3ec7a595ee36b50e979683c84105c1871857)) +ROM_END + +void msx1_state::hb201p(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 2, 1, "firmware"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9129, SND_YM2149, config); +} + +/* MSX - Sony HB-501F */ +// ic1 - tmm23256p +// YM2149 +// TMS9129 +// S3527 + +/* MSX - Sony HB-501P */ + +ROM_START(hb501p) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("501pbios.rom", 0x0000, 0x8000, CRC(0f488dd8) SHA1(5e7c8eab238712d1e18b0219c0f4d4dae180420d)) +ROM_END + +void msx1_state::hb501p(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + // T6950 + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_YM2149, config); +} + +/* MSX - Sony HB-55 (Version 1) */ + +ROM_START(hb55) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hb55bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) // need verification + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("hb55note.rom", 0x0000, 0x2000, BAD_DUMP CRC(5743ab55) SHA1(b9179db93608c4da649532e704f072e0a3ea1b22)) // need verification +ROM_END + +void msx1_state::hb55(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 2, 1, "firmware"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #3 + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Sony HB-55D, is this HB-55 2nd version? */ + +ROM_START(hb55d) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("55dbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(7e2b32dd) SHA1(38a645febd0e0fe86d594f27c2d14be995acc730)) // need verification + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("55dnote.rom", 0x0000, 0x4000, BAD_DUMP CRC(8aae0494) SHA1(97ce59892573cac3c440efff6d74c8a1c29a5ad3)) // need verification +ROM_END + +void msx1_state::hb55d(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2 Cartridge slots? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 2, 1, "firmware", 0x8000); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 3, 1); // 16KB RAM + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Sony HB-55P */ + +ROM_START(hb55p) + ROM_REGION(0x8000, "mainrom", 0) + // Are there machines with ic42 and ic43 populated like this? + // Image on msx.org shows only ic42 and ic44 populated (for hb-55) +// ROM_LOAD("55pbios.ic42", 0x0000, 0x4000, CRC(24c198be) SHA1(7f8c94cb8913db32a696dec80ffc78e46693f1b7)) +// ROM_LOAD("55pbios.ic43", 0x4000, 0x4000, CRC(e516e7e5) SHA1(05fedd4b9bfcf4949020c79d32c4c3f03a54fb62)) + ROM_LOAD("55pbios.ic42", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("55pnote.ic44", 0x0000, 0x4000, CRC(492b12f8) SHA1(b262aedc71b445303f84efe5e865cbb71fd7d952)) +ROM_END + +void msx1_state::hb55p(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 2, 1, "firmware"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Sony HB-75 */ + +ROM_START(hb75) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("75bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("75note.rom", 0x0000, 0x4000, CRC(2433dd0b) SHA1(5f26319aec3354a94e2a98e07b2c70046bc45417)) +ROM_END + +void msx1_state::hb75(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 2, 1, "firmware"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot in slot #3 + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Sony HB-75AS */ + +/* MSX - Sony HB-75B */ + +/* MSX - Sony HB-75D */ + +ROM_START(hb75d) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("75dbios.rom", 0x0000, 0x8000, CRC(7e2b32dd) SHA1(38a645febd0e0fe86d594f27c2d14be995acc730)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("75dnote.rom", 0x0000, 0x4000, CRC(8aae0494) SHA1(97ce59892573cac3c440efff6d74c8a1c29a5ad3)) +ROM_END + +void msx1_state::hb75d(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 2, 1, "firmware"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Sony HB-75F */ + +/* MSX - Sony HB-75P */ + +ROM_START(hb75p) + ROM_REGION(0x8000, "mainrom", 0) + // Are there machines with ic42 and ic43 populated like this? + // HB-75P internal image on msx.org only has 2 roms populated (ic42 and ic44) +// ROM_LOAD("75pbios.ic42", 0x0000, 0x4000, CRC(24c198be) SHA1(7f8c94cb8913db32a696dec80ffc78e46693f1b7)) +// ROM_LOAD("75pbios.ic43", 0x4000, 0x4000, CRC(e516e7e5) SHA1(05fedd4b9bfcf4949020c79d32c4c3f03a54fb62)) + ROM_LOAD("75pbios.ic42", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("75pnote.ic44", 0x0000, 0x4000, CRC(492b12f8) SHA1(b262aedc71b445303f84efe5e865cbb71fd7d952)) +ROM_END + +void msx1_state::hb75p(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 2, 1, "firmware"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Sony HB-101 */ + +ROM_START(hb101) + ROM_REGION(0x8000, "mainrom", 0) + // 4l1 hn613256p d78 + ROM_LOAD("101pbios.ic108", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) + + ROM_REGION(0x4000, "firmware", 0) + // m38128a-91 4202 + ROM_LOAD("101pnote.ic111", 0x0000, 0x4000, CRC(f62e75f6) SHA1(64adb7fcf9b86f59d8658badb02f58e61bb15712)) +ROM_END + +void msx1_state::hb101(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 1, 1, "firmware"); + + msx1(VDP_TMS9118, SND_YM2149, config); +} + +/* MSX - Sony HB-101P */ + +ROM_START(hb101p) + ROM_REGION(0x8000, "mainrom", 0) + // m38256-7b 5411 + ROM_LOAD("101pbios.ic9", 0x0000, 0x8000, CRC(0f488dd8) SHA1(5e7c8eab238712d1e18b0219c0f4d4dae180420d)) + + ROM_REGION(0x4000, "firmware", 0) + // m38128a-f6 5501 + ROM_LOAD("101pnote.ic8", 0x0000, 0x4000, CRC(525017c2) SHA1(8ffc24677fd9d2606a79718764261cdf02434f0a)) +ROM_END + +void msx1_state::hb101p(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 1, 1, "firmware"); + + msx1(VDP_TMS9929A, SND_YM2149, config); +} + +/* MSX - Sony HB-701 */ + +/* MSX - Sony HB-701FD */ + +ROM_START(hb701fd) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hb701fdbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("hb701fddisk.rom", 0x0000, 0x4000, BAD_DUMP CRC(71961d9d) SHA1(2144036d6573d666143e890e5413956bfe8f66c5)) // need verification +ROM_END + +void msx1_state::hb701fd(machine_config &config) +{ + // YM2149 + // FDC: WD2793, 1 3.5" SSDD drive + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64KB RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_SS, "disk", 3, 1, 1, 2, "diskrom"); + + msx1(VDP_TMS9928A, SND_YM2149, config); +} + +/* MSX - Spectravideo SVI-728 */ + +ROM_START(svi728) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("728bios.rom", 0x0000, 0x8000, CRC(1ce9246c) SHA1(ea6a82cf8c6e65eb30b98755c8577cde8d9186c0)) +ROM_END + +void msx1_state::svi728(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 1 Cartridge slots, 1 Expansion slot (eg for SVI-707) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "mainmirror", 0, 2, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + // Expansion slot (for eg SVI-707) in slot #3 + + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Spectravideo SVI-728 (Arabic) */ + +/* MSX - Spectravideo SVI-728 (Danish/Norwegian) */ + +/* MSX - Spectravideo SVI-728 (Spanish) */ + +ROM_START(svi728es) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("728esbios.rom", 0x0000, 0x8000, CRC(76c5e381) SHA1(82415ee031721d1954bfa42e1c6dd79d71c692d6)) +ROM_END + +/* MSX - Spectravideo SVI-728 (Swedish/Finnish) */ + +/* MSX - Talent DPC-200 */ + +// Spanish keyboard +ROM_START(tadpc200) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("dpc200bios.rom", 0x0000, 0x8000, CRC(01ad4fab) SHA1(d5bf4814ea694481c8badbb8de8d56a08ee03cc0)) +ROM_END + +// International keyboard +ROM_START(tadpc200b) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("dpc200altbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) // need verification +ROM_END + +void msx1_state::tadpc200(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 1 Cartridge slot + // DW64MX1 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + // Expansion slot in slot #3 + + msx1(VDP_TMS9129, SND_AY8910, config); +} + +/* MSX - Talent DPS-201 */ + +/* MSX - Toshiba HX-10 / HX-10P +Code on PCB: MSX TUK + |---------------------------|-------------------|-------------| + | CN1 CN2 CN3 CN4 CN5 | + | |---------------------------| | + | |---------------------------| | + | CN6 | + | IC40 | + | CN7 | + | IC38 IC32 IC33 IC37 | + | | + | Q2 IC31 IC34 IC35 | + | Q1 CN8 | + | IC39 | + | |--IC15------| |--IC2----| |----IC1-----| | + | |------------| |---------| |------------| | + | IC30 | + | IC3 IC4 CN9 | + | |-----IC15-------| | + | IC17 IC18 IC7 IC8 |----------------| | + | IC27 | + | IC19 IC20 IC9 IC10 |----IC25------| | +|----| | |--------------| IC26 | +| Q | | IC21 IC22 IC11 IC12 | +| | | | +| S | | IC23 IC24 IC13 IC14 IC29 IC28 | +| L | | | +| | | CN11 CN10 | +|----| |-------------------------------------------------------------| + +Notes: + Mainboard components: + IC1 - Sharp LH0080A Z80A-CPU-D + IC2 - MB83256 + IC3,IC4,IC27,IC28 - Texas Instruments SN74LS157N + IC7-IC14 - HM4864AP + IC15 - Toshiba TCX-1007 (64pin custom chip) + IC16 - 40pin chip covered with some kind of heatsink(?), probably TMS9929A + IC17-IC24 - 4116-3 + IC25 - AY-3-8910A + IC26 - SN74LS09N + IC29 - HD74LS145P + IC30-IC34 - M74LS367AP + IC35 - MB74LS74A + IC37 - HD74LS373P + IC38 - Toshiba TC74HCU04P + IC39 - HD74LS08P + IC40 - TA75559P + Q1 - 10687.5 + Q2 - 3579545 + CN1 - Cassette connector + CN2 - RF connector + CN3 - Audio connector + CN4 - Video connector + CN5 - Expansion connector + CN6 - Cartridge connector + CN7 - Printer connector + CN8 - Joystick 2 connector + CN9 - Joystick 1 connector + CN10 - Keyboard connector 1 + CN11 - Keyboard connector 2 + + Extra pcb (video related?) components:: + Q - 4.433619 + S - 74LS04 + L - LVA510 + */ + +ROM_START(hx10) + ROM_REGION(0x8000, "mainrom", 0) + // tmm23256p + ROM_LOAD("hx10bios.ic2", 0x0000, 0x8000, CRC(5486b711) SHA1(4dad9de7c28b452351cc12910849b51bd9a37ab3)) +ROM_END + +void msx1_state::hx10(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 1 Cartridge slot, 1 Toshiba Expension slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot in slot #3 + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Toshiba HX-10AA */ + +/* MSX - Toshiba HX-10D */ + +ROM_START(hx10d) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx10dbios.ic5", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::hx10d(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot in slot #3 + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Toshiba HX-10DP */ + +ROM_START(hx10dp) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx10dpbios.ic2", 0x0000, 0x8000, BAD_DUMP CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) // need verification +ROM_END + +void msx1_state::hx10dp(machine_config &config) +{ + // AY8910? + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot in slot #3 + + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Toshiba HX-10DPN */ + +/* MSX - Toshiba HX-10E */ + +ROM_START(hx10e) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx10ebios.rom", 0x0000, 0x8000, BAD_DUMP CRC(5486b711) SHA1(4dad9de7c28b452351cc12910849b51bd9a37ab3)) // need verification +ROM_END + +void msx1_state::hx10e(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot in slot #3 + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Toshiba HX-10F */ + +ROM_START(hx10f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx10fbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(e0e894b7) SHA1(d99eebded5db5fce1e072d08e642c0909bc7efdd)) // need verification +ROM_END + +void msx1_state::hx10f(machine_config &config) +{ + // AY8910? + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + // Expansion slot in slot #3 + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Toshiba HX-10I */ + +/* MSX - Toshiba HX-10S */ + +// BIOS is for an international keyboard but the machine had a japanese keyboard layout so that cannot be correct +ROM_START(hx10s) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx10sbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(5486b711) SHA1(4dad9de7c28b452351cc12910849b51bd9a37ab3)) // need verification +ROM_END + +void msx1_state::hx10s(machine_config &config) +{ + // AY8910? + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #3 + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Toshiba HX-10SA */ + +ROM_START(hx10sa) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx10sabios.rom", 0x0000, 0x8000, BAD_DUMP CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) // need verification +ROM_END + +void msx1_state::hx10sa(machine_config &config) +{ + // AY8910? + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #3 + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9918A, SND_AY8910, config); +} + +/* MSX - Toshiba HX-10SF */ + +/* MSX - Toshiba HX-20 */ + +// BIOS is for an internation keyboard but the machine had japanese keyboard layout +// Firmware is in English +ROM_START(hx20) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx20bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) // need verification + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("hx20word.rom", 0x0000, 0x8000, BAD_DUMP CRC(39b3e1c0) SHA1(9f7cfa932bd7dfd0d9ecaadc51655fb557c2e125)) // need verification +ROM_END + +void msx1_state::hx20(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2 Cartridge slots + // HX-R701 RS-232 optional + // T6950 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 0, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 3, 1, 2, "firmware"); + + msx1(VDP_TMS9129, SND_YM2149, config); +} + +/* MSX - Toshiba HX-20AR */ +// TMS9128 + +/* MSX - Toahiba HX-20E */ + +ROM_START(hx20e) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("tmm23256p_2023.ic2", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("tc53257p_2047.ic3", 0x0000, 0x8000, CRC(39b3e1c0) SHA1(9f7cfa932bd7dfd0d9ecaadc51655fb557c2e125)) +ROM_END + +void msx1_state::hx20e(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + // T6950 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 0, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 3, 1, 2, "firmware"); + + msx1(VDP_TMS9129, SND_YM2149, config); +} + +/* MSX - Toshiba HX-20I */ + +ROM_START(hx20i) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx20ibios.rom", 0x0000, 0x8000, BAD_DUMP CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) // need verification + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("hx20iword.rom", 0x0000, 0x8000, BAD_DUMP CRC(39b3e1c0) SHA1(9f7cfa932bd7dfd0d9ecaadc51655fb557c2e125)) // need verification +ROM_END + +void msx1_state::hx20i(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2 Cartridge slots + // T6950 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 0, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 3, 1, 2, "firmware"); + + msx1(VDP_TMS9129, SND_YM2149, config); +} + +/* MSX - Toshiba HX-21 */ + +ROM_START(hx21) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("tmm23256p_2011.ic2", 0x0000, 0x8000, CRC(83ba6fde) SHA1(01600d06d83072d4e757b29728555efde2c79705)) + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("tmm23256p_2014.ic3", 0x0000, 0x8000, CRC(87508e78) SHA1(4e2ec9c0294a18a3ab463f182f9333d2af68cdca)) +ROM_END + +void msx1_state::hx21(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // HX-R701 RS-232 optional + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 0, 4); // 64KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 3, 1, 2, "firmware"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware_mirror1", 3, 3, 0, 1, "firmware"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware_mirror2", 3, 3, 3, 1, "firmware", 0x4000); + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Toshiba HX-21F */ + +ROM_START(hx21f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx21fbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) // need verification + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("hx21fword.rom", 0x0000, 0x8000, BAD_DUMP CRC(f9e29c66) SHA1(3289336b2c12161fd926a7e5ce865770ae7038af)) // need verification +ROM_END + +void msx1_state::hx21f(machine_config &config) +{ + // AY8910/YM2149? + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 2, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 3, 1, 2, "firmware"); + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Toshiba HX-22 */ + +ROM_START(hx22) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("tms23256p_2011.ic2", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("tms23256p_2014.ic3", 0x0000, 0x8000, CRC(87508e78) SHA1(4e2ec9c0294a18a3ab463f182f9333d2af68cdca)) +ROM_END + +void msx1_state::hx22(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // RS232C builtin + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 0, 4); // 64KB RAM + add_internal_slot_irq<3>(config, MSX_SLOT_RS232_TOSHIBA, "firmware", 3, 3, 1, 2, "firmware"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware_mirror1", 3, 3, 0, 1, "firmware"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware_mirror2", 3, 3, 3, 1, "firmware", 0x4000); + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Toshiba HX-22CH */ + +/* MSX - Toshibe HX-22GB */ + +/* MSX - Toshiba HX-22I */ + +ROM_START(hx22i) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("tmm23256p_2023.ic2", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("tmm23256p_2046.ic3", 0x0000, 0x8000, CRC(f9e29c66) SHA1(3289336b2c12161fd926a7e5ce865770ae7038af)) +ROM_END + +void msx1_state::hx22i(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // RS232C builtin + // Z80: LH0080A + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 2, 2); // 32KB RAM + add_internal_slot_irq<3>(config, MSX_SLOT_RS232_TOSHIBA, "firmware", 3, 3, 1, 2, "firmware"); + + msx1(VDP_TMS9929A, SND_AY8910, config); +} + +/* MSX - Toshiba HX-30 */ + +/* MSX - Tosbiba HX-31 */ + +/* MSX - Toshiba HX-32 */ + +ROM_START(hx32) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx32bios.ic3", 0x0000, 0x8000, CRC(83ba6fde) SHA1(01600d06d83072d4e757b29728555efde2c79705)) + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("hx32firm.ic2", 0x0000, 0x8000, CRC(efc3aca7) SHA1(ed589da7f359a4e139a23cd82d9a6a6fa3d70db0)) + + // Same as HX-M200 Kanji cartridge + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("hx32kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) +ROM_END + +void msx1_state::hx32(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + // HX-R701 RS-232 optional + // T6950 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 0, 4); // 64KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 3, 1, 2, "firmware"); + + msx1(VDP_TMS9928A, SND_YM2149, config); +} + +/* MSX - Toshiba HX-51I */ + +ROM_START(hx51i) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("tmm23256ad_2023.ic8", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) +ROM_END + +void msx1_state::hx51i(machine_config &config) +{ + // AY8910 in T7937 + // FDC: None, 0 drives + // 2 Cartridge slots + // T6950 in T7937 + // T7937 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 2); // 32KB RAM + + msx1(VDP_TMS9918, SND_AY8910, config); +} + +/* MSX - Toshiba HX-52 */ + +/* MSX - Triton PC64 */ + +/* MSX - Vestel FC-200 */ + +/* MSX - Victor HC-5 */ + +ROM_START(hc5) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hc5bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) // need verification +ROM_END + +void msx1_state::hc5(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives, + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #2 + // Module slot in slot #3 + + msx1(VDP_TMS9928A, SND_YM2149, config); +} + +/* MSX - Victor HC-6 */ + +ROM_START(hc6) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hc6bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) // need verification +ROM_END + +void msx1_state::hc6(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives, + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #2 + // Module slot in slot #3 + + msx1(VDP_TMS9928A, SND_YM2149, config); +} + +/* MSX - Victor HC-7 */ + +ROM_START(hc7) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hc7bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("hc7firm.rom", 0x0000, 0x4000, CRC(7d62951d) SHA1(e211534064ea6f436f2e7458ded35c398f17b761)) +ROM_END + +void msx1_state::hc7(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives, + // 2 Cartridge slots? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 3, 1, "firmware"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +/* MSX - Victor HC-30 */ + +/* MSX - Victor HC-60 */ + +/* MSX - Wandy DPC-200 */ + +/* MSX - Yamaha CX5 */ + +/* MSX - Yamaha CX5F (with SFG01) */ + +ROM_START(cx5f1) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("cx5fbios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +// ROM_LOAD("cx5fbios.rom", 0x0000, 0x8000, CRC(dc662057) SHA1(36d77d357a5fd15af2ab266ee66e5091ba4770a3)) +ROM_END + +void msx1_state::cx5f1(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Yamaha expansion slot (50 pins) + // 1 Yamaha module slot (60 pins) + // S-5327 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + // Expansion bus in slot #2 + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, msx_yamaha_60pin, "sfg01"); + + msx1(VDP_TMS9928A, SND_YM2149, config); +} + +/* MSX - Yamaha CX5F (with SFG05) */ + +ROM_START(cx5f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("cx5fbios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +// ROM_LOAD("cx5fbios.rom", 0x0000, 0x8000, CRC(dc662057) SHA1(36d77d357a5fd15af2ab266ee66e5091ba4770a3)) +ROM_END + +void msx1_state::cx5f(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Yamaha expansion slot (50 pins) + // 1 Yamaha module slot (60 pins) + // S-5327 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + // Expansion bus in slot #2 + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, msx_yamaha_60pin, "sfg05"); + + msx1(VDP_TMS9928A, SND_YM2149, config); +} + +/* MSX - Yamaha CX5MA (Australia / New Zealand */ + +/* MSX - Yamaha CX5MC (Canada) */ + +/* MSX - Yamaha CX5ME (UK) */ + +/* MSX - Yamaha CX5MF (France) */ + +/* MSX - Yamaha CX5MG (Germany) */ + +/* MSX - Yamaha CX5MS (Scandinavia) */ + +/* MSX - Yamaha CX5MU (USA) */ + +ROM_START(cx5mu) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ym2301-23907.tmm23256p-2011", 0x0000, 0x8000, CRC(e2242b53) SHA1(706dd67036baeec7127e4ccd8c8db8f6ce7d0e4c)) +ROM_END + +void msx1_state::cx5mu(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot (50 pins) + // 1 Module slot (60 pins interface instead of regular 50 pin cartridge interface) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #2 + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, msx_yamaha_60pin, "sfg01"); + + msx1(VDP_TMS9918A, SND_YM2149, config); +} + +/* MSX - Yamaha SX-100 */ + +ROM_START(sx100) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("sx100bios.rom", 0x0000, 0x8000, CRC(3b08dc03) SHA1(4d0c37ad722366ac7aa3d64291c3db72884deb2d)) +ROM_END + +void msx1_state::sx100(machine_config &config) +{ + // YM2149 in S3527 + // FDC: None, 0 drives + // 1 Cartridge slot + // YM2220, TMS9918 compatible + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + + msx1(VDP_TMS9918, SND_YM2149, config); +} + +/* MSX - Yamaha YIS-303 */ + +// BIOS is for an international keyboard while the machine has a Japanese layout +ROM_START(yis303) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ym2301-23907.tmm23256p-2011", 0x0000, 0x8000, BAD_DUMP CRC(e2242b53) SHA1(706dd67036baeec7127e4ccd8c8db8f6ce7d0e4c)) +ROM_END + +void msx1_state::yis303(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Yamaha expansion slot (50 pin) + // 1 Yamaha module slot (60 pin) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 3, 1); // 16KB RAM + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #2 + // mounting sfg01 works, sfg05 does not + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, 0, msx_yamaha_60pin, nullptr); + + m_hw_def.has_printer_port(false); + msx1(VDP_TMS9918A, SND_YM2149, config); +} + +/* MSX - Yamaha YIS-503 */ + +ROM_START(yis503) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yis503bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) +ROM_END + +void msx1_state::yis503(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Yamaha expansion slot + // 1 Yamaha module slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #2 + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, msx_yamaha_60pin, nullptr); + + msx1(VDP_TMS9928A, SND_YM2149, config); +} + +/* MSX - Yamaha YIS-503F */ + +ROM_START(yis503f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yis503f.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) +ROM_END + +void msx1_state::yis503f(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Yamaha expansion slot (50 pin) + // 1 Yamaha module slot (60 pin) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #2 + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, msx_yamaha_60pin, nullptr); + + msx1(VDP_TMS9929A, SND_YM2149, config); +} + +/* MSX - Yamaha YIS-603 */ + +/* MSX - Yashica YC-64 */ + +ROM_START(yc64) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yc64bios.u20", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) +ROM_END + +void msx1_state::yc64(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx1(VDP_TMS9929A, SND_YM2149, config); +} + +/* MSX - Yeno DPC-64 */ + +/* MSX - Yeno MX64 */ + +ROM_START(mx64) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("tmm23256p_7953.ic2d", 0x0000, 0x8000, BAD_DUMP CRC(e0e894b7) SHA1(d99eebded5db5fce1e072d08e642c0909bc7efdd)) // need verification +ROM_END + +void msx1_state::mx64(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 2 Cartridge slots + + // slot layout needs verification + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 2, 0, 4); // 64KB RAM + add_cartridge_slot<2>(config, 3); + + msx1(VDP_TMS9928A, SND_AY8910, config); +} + +} // anonymous namespace + + +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME */ +/* MSX1 */ +COMP(1986, perfect1, 0, 0, perfect1, msx, msx1_state, empty_init, "Bawareth", "Perfect MSX1 (MSX1, Middle East)", 0) +COMP(1985, canonv8, 0, 0, canonv8, msxjp, msx1_state, empty_init, "Canon", "V-8 (MSX1, Japan)", 0) +COMP(1984, canonv10, canonv20, 0, canonv10, msxjp, msx1_state, empty_init, "Canon", "V-10 (MSX1, Japan)", 0) +COMP(1984, canonv20, 0, 0, canonv20, msxjp, msx1_state, empty_init, "Canon", "V-20 (MSX1, Japan)", 0) +COMP(1985, canonv20e, canonv20, 0, canonv20e, msxuk, msx1_state, empty_init, "Canon", "V-20E (MSX1, UK)", 0) +COMP(1985, canonv20f, canonv20, 0, canonv20e, msxfr, msx1_state, empty_init, "Canon", "V-20F (MSX1, France)", 0) +COMP(198?, canonv20g, canonv20, 0, canonv20e, msxde, msx1_state, empty_init, "Canon", "V-20G (MSX1, Germany)", 0) +COMP(198?, canonv20s, canonv20, 0, canonv20e, msxsp, msx1_state, empty_init, "Canon", "V-20S (MSX1, Spain)", 0) +COMP(1985, mx10, mx15, 0, mx10, msxjp, msx1_state, empty_init, "Casio", "MX-10 (MSX1, Japan)", 0) +COMP(1987, mx101, mx15, 0, mx101, msxjp, msx1_state, empty_init, "Casio", "MX-101 (MSX1, Japan)", 0) +COMP(1986, mx15, 0, 0, mx15, msx, msx1_state, empty_init, "Casio", "MX-15 (MSX1, International)", 0) +COMP(1984, pv7, pv16, 0, pv7, msxjp, msx1_state, empty_init, "Casio", "PV-7 (MSX1, Japan)", 0) +COMP(1985, pv16, 0, 0, pv16, msxjp, msx1_state, empty_init, "Casio", "PV-16 (MSX1, Japan)", 0) +COMP(1984, cpc88, 0, 0, cpc88, msxkr, msx1_state, empty_init, "Daewoo", "CPC-88 (MSX1, Korea)", 0) +COMP(1984, dpc100, dpc200, 0, dpc100, msxkr, msx1_state, empty_init, "Daewoo", "IQ-1000 DPC-100 (MSX1, Korea)", 0) +COMP(1984, dpc180, dpc200, 0, dpc180, msxkr, msx1_state, empty_init, "Daewoo", "IQ-1000 DPC-180 (MSX1, Korea)", 0) +COMP(1984, dpc200, 0, 0, dpc200, msxkr, msx1_state, empty_init, "Daewoo", "IQ-1000 DPC-200 (MSX1, Korea)", 0) +COMP(1985, dpc200e, 0, 0, dpc200e, msxfr, msx1_state, empty_init, "Daewoo", "DPC-200E (MSX1, French)", 0) +COMP(1986, cpc50a, cpc51, 0, cpc50a, msxkr, msx1_state, empty_init, "Daewoo", "Zemmix CPC-50A (MSX1, Korea)", 0) +COMP(1987, cpc50b, cpc51, 0, cpc50b, msxkr, msx1_state, empty_init, "Daewoo", "Zemmix CPC-50B (MSX1, Korea)", 0) +COMP(1988, cpc51, 0, 0, cpc51, msxkr, msx1_state, empty_init, "Daewoo", "Zemmix CPC-51 (MSX1, Korea)", 0) +COMP(1985, dgnmsx, 0, 0, dgnmsx, msxuk, msx1_state, empty_init, "Eurohard S.A.", "Dragon MSX-64 (MSX1, Spain)", 0) +COMP(1985, fdpc200, 0, 0, fdpc200, msx, msx1_state, empty_init, "Fenner", "DPC-200 (MSX1, Italy)", 0) +COMP(1985, fpc500, 0, 0, fpc500, msx, msx1_state, empty_init, "Fenner", "FPC-500 (MSX1, Italy)", 0) +COMP(1984, fspc800, 0, 0, fspc800, msxuk, msx1_state, empty_init, "Fenner", "SPC-800 (MSX1, Italy)", 0) +COMP(1983, fmx, 0, 0, fmx, msxjp, msx1_state, empty_init, "Fujitsu", "FM-X (MSX1, Japan)", 0) +COMP(1984, gsfc80u, 0, 0, gsfc80u, msxkr, msx1_state, empty_init, "Goldstar", "FC-80U (MSX1, Korea)", 0) +COMP(1984, gsfc200, 0, 0, gsfc200, msx, msx1_state, empty_init, "Goldstar", "FC-200 (MSX1, Europe)", 0) +COMP(1985, gfc1080, 0, 0, gfc1080, msxkr, msx1_state, empty_init, "Goldstar", "GFC-1080 (MSX1, Korea)", 0) +COMP(1985, gfc1080a, 0, 0, gfc1080a, msxkr, msx1_state, empty_init, "Goldstar", "GFC-1080A (MSX1, Korea)", 0) +COMP(1985, expert10, expert13, 0, expert10, expert10, msx1_state, empty_init, "Gradiente", "Expert XP-800 (1.0) (MSX1, Brazil)", 0) +COMP(198?, expert11, expert13, 0, expert11, expert11, msx1_state, empty_init, "Gradiente", "Expert XP-800 (1.1) / Expert GPC-1 (MSX1, Brazil)", 0) +COMP(198?, expert13, 0, 0, expert13, expert11, msx1_state, empty_init, "Gradiente", "Expert 1.3 (MSX1, Brazil)", 0) +COMP(1989, expertdp, 0, 0, expertdp, expert11, msx1_state, empty_init, "Gradiente", "Expert DDPlus (MSX1, Brazil)", 0) +COMP(1989, expertpl, 0, 0, expertpl, expert11, msx1_state, empty_init, "Gradiente", "Expert Plus (MSX1, Brazil)", 0) +COMP(1983, mbh1, 0, 0, mbh1, msxjp, msx1_state, empty_init, "Hitachi", "MB-H1 (MSX1, Japan)", 0) +COMP(1984, mbh1e, mbh1, 0, mbh1e, msxjp, msx1_state, empty_init, "Hitachi", "MB-H1E (MSX1, Japan)", 0) +COMP(1984, mbh2, 0, 0, mbh2, msxjp, msx1_state, empty_init, "Hitachi", "MB-H2 (MSX1, Japan)", 0) +COMP(1988, mbh25, 0, 0, mbh25, msxjp, msx1_state, empty_init, "Hitachi", "MB-H25 (MSX1, Japan)", 0) +COMP(1986, mbh50, 0, 0, mbh50, msxjp, msx1_state, empty_init, "Hitachi", "MB-H50 (MSX1, Japan)", 0) +COMP(1985, jvchc7gb, 0, 0, jvchc7gb, msxuk, msx1_state, empty_init, "JVC", "HC-7E / HC-7GB (MSX1, Europe)", 0) +COMP(1983, ml8000, 0, 0, ml8000, msxjp, msx1_state, empty_init, "Mitsubishi", "ML-8000 (MSX1, Japan)", 0) +COMP(1984, mlf48, 0, 0, mlf48, msxuk, msx1_state, empty_init, "Mitsubishi", "ML-F48 (MSX1, UK)", 0) +COMP(1984, mlf80, 0, 0, mlf80, msxuk, msx1_state, empty_init, "Mitsubishi", "ML-F80 (MSX1, UK)", 0) +COMP(1984, mlf110, 0, 0, mlf110, msxjp, msx1_state, empty_init, "Mitsubishi", "ML-F110 (MSX1, Japan)", 0) +COMP(1984, mlf120, 0, 0, mlf120, msxjp, msx1_state, empty_init, "Mitsubishi", "ML-F120 (MSX1, Japan)", 0) +COMP(1986, mlfx1, 0, 0, mlfx1, mlfx1, msx1_state, empty_init, "Mitsubishi", "ML-FX1 (MSX1, Spain)", 0) +COMP(1985, cf1200, 0, 0, cf1200, msxjp, msx1_state, empty_init, "National", "CF-1200 (MSX1, Japan)", 0) +COMP(1983, cf2000, 0, 0, cf2000, msxjp, msx1_state, empty_init, "National", "CF-2000 (MSX1, Japan)", 0) +COMP(1984, cf2700, 0, 0, cf2700, msxjp, msx1_state, empty_init, "National", "CF-2700 (MSX1, Japan)", 0) +COMP(1984, cf3000, 0, 0, cf3000, cf3000, msx1_state, empty_init, "National", "CF-3000 (MSX1, Japan)", 0) +COMP(1985, cf3300, 0, 0, cf3300, cf3000, msx1_state, empty_init, "National", "CF-3300 (MSX1, Japan)", 0) +COMP(1985, fs1300, 0, 0, fs1300, msxjp, msx1_state, empty_init, "National", "FS-1300 (MSX1, Japan)", 0) +COMP(1985, fs4000, 0, 0, fs4000, fs4000, msx1_state, empty_init, "National", "FS-4000 (MSX1, Japan)", 0) +COMP(1985, fs4000a, fs4000, 0, fs4000a, fs4000, msx1_state, empty_init, "National", "FS-4000 (alt) (MSX1, Japan)", 0) +COMP(1985, phc2, 0, 0, phc2, msxfr, msx1_state, empty_init, "Olympia", "PHC-2 (MSX1, France)" , 0) +COMP(1984, phc28, 0, 0, phc28, msxfr, msx1_state, empty_init, "Olympia", "PHC-28 (MSX1, France)", 0) +COMP(1985, cf2700g, cf2700uk, 0, cf2700g, msxde, msx1_state, empty_init, "Panasonic", "CF-2700 (MSX1, Germany)", 0) +COMP(1985, cf2700uk, 0, 0, cf2700uk, msxuk, msx1_state, empty_init, "Panasonic", "CF-2700 (MSX1, UK)", 0) +COMP(1989, nms801, 0, 0, nms801, msx, msx1_state, empty_init, "Philips", "NMS-801 (MSX1, Italy)", 0) +COMP(1984, vg8000, vg8010, 0, vg8000, vg8010, msx1_state, empty_init, "Philips", "VG-8000 (MSX1, Europe)", 0) +COMP(1985, vg8010, 0, 0, vg8010, vg8010, msx1_state, empty_init, "Philips", "VG-8010 / VG-8010/00 (MSX1, Europe)", 0) +COMP(1985, vg8010f, vg8010, 0, vg8010f, vg8010f, msx1_state, empty_init, "Philips", "VG-8010F / VG-8010/19 (MSX1, French)" , 0) +COMP(1985, vg802000, vg802020, 0, vg802000, msx, msx1_state, empty_init, "Philips", "VG-8020/00 (MSX1, Europe)", 0) +COMP(1985, vg8020f, vg802020, 0, vg8020f, msxfr, msx1_state, empty_init, "Philips", "VG-8020/19 / VG-8020F (MSX1, French)", 0) +COMP(1985, vg802020, 0, 0, vg802020, msx, msx1_state, empty_init, "Philips", "VG-8020/20 (MSX1, Europe)", 0) +COMP(1984, piopx7, 0, 0, piopx7, msxjp, msx1_state, empty_init, "Pioneer", "PX-07 Palcom (MSX1, Japan)", 0) +COMP(1985, piopx7uk, piopx7, 0, piopx7uk, msxuk, msx1_state, empty_init, "Pioneer", "PX-07UK Palcom (MSX1, UK)", 0) +COMP(1986, piopxv60, piopx7, 0, piopxv60, msxjp, msx1_state, empty_init, "Pioneer", "PX-V60 (MSX1, Japan)", 0) +COMP(1986, ax150, 0, 0, ax150, msx, msx1_state, empty_init, "Sakhr", "AX-150 (MSX1, Arabic)", 0) +COMP(1986, ax170, 0, 0, ax170, msx, msx1_state, empty_init, "Sakhr", "AX-170 (MSX1, Arabic)", 0) +COMP(1986, ax230, 0, 0, ax230, msx, msx1_state, empty_init, "Sakhr", "AX-230 (MSX1, Arabic)", MACHINE_IMPERFECT_GRAPHICS) +COMP(1984, spc800, 0, 0, spc800, msxkr, msx1_state, empty_init, "Samsung", "SPC-800 (MSX1, Korea)", 0) +COMP(1983, mpc10, 0, 0, mpc10, msxjp, msx1_state, empty_init, "Sanyo", "MPC-10 / Wavy10 (MSX1, Japan)", 0) +COMP(1985, mpc64, 0, 0, mpc64, msxde, msx1_state, empty_init, "Sanyo", "MPC-64 (MSX1, Germany)", 0) +COMP(1985, mpc100, 0, 0, mpc100, msxuk, msx1_state, empty_init, "Sanyo", "MPC-100 (MSX1, UK)", 0) +COMP(1985, mpc200, 0, 0, mpc200, msxuk, msx1_state, empty_init, "Sanyo", "MPC-200 (MSX1, UK)", 0) // Is this the same as MPC-200SP, is it even real ? +COMP(1985, mpc200sp, mpc200, 0, mpc200sp, msxsp, msx1_state, empty_init, "Sanyo", "MPC-200SP (MSX1, Spain)", 0) +COMP(1985, phc28l, 0, 0, phc28l, msxfr, msx1_state, empty_init, "Sanyo", "PHC-28L (MSX1, France)", 0) +COMP(1984, phc28s, 0, 0, phc28s, msxuk, msx1_state, empty_init, "Sanyo", "PHC-28S (MSX1, France)", 0) +COMP(1985, hb8000, 0, 0, hb8000, hotbit, msx1_state, empty_init, "Sharp / Epcom", "HB-8000 Hotbit (MSX1, Brazil)", 0) +COMP(198?, hotbi13b, hotbi13p, 0, hotbi13b, hotbit, msx1_state, empty_init, "Sharp / Epcom", "HB-8000 Hotbit 1.3b (MSX1, Brazil)", 0) +COMP(198?, hotbi13p, 0, 0, hotbi13p, hotbit, msx1_state, empty_init, "Sharp / Epcom", "HB-8000 Hotbit 1.3p (MSX1, Brazil)", 0) +COMP(1985, hb10, hb10p, 0, hb10, msxjp, msx1_state, empty_init, "Sony", "HB-10 (MSX1, Japan)", 0) +COMP(1986, hb10p, 0, 0, hb10p, msxuk, msx1_state, empty_init, "Sony", "HB-10P (MSX1, Netherlands)", 0) +COMP(1984, hb101, hb101p, 0, hb101, msxjp, msx1_state, empty_init, "Sony", "HB-101 (MSX1, Japan)", 0) +COMP(1984, hb101p, 0, 0, hb101p, msxuk, msx1_state, empty_init, "Sony", "HB-101P (MSX1, Europe)", 0) +COMP(1986, hb20p, 0, 0, hb20p, msxsp, msx1_state, empty_init, "Sony", "HB-20P (MSX1, Spain)", 0) +COMP(1985, hb201, hb201p, 0, hb201, msxjp, msx1_state, empty_init, "Sony", "HB-201 (MSX1, Japan)", 0) +COMP(1985, hb201p, 0, 0, hb201p, msxuk, msx1_state, empty_init, "Sony", "HB-201P (MSX1, Europe)", 0) +COMP(1984, hb501p, 0, 0, hb501p, msxuk, msx1_state, empty_init, "Sony", "HB-501P (MSX1, Europe)", 0) +COMP(1983, hb55, hb55p, 0, hb55, msxjp, msx1_state, empty_init, "Sony", "HB-55 (MSX1, Japan)", 0) +COMP(1984, hb55d, hb55p, 0, hb55d, msxde, msx1_state, empty_init, "Sony", "HB-55D (MSX1, Germany)", 0) +COMP(1984, hb55p, 0, 0, hb55p, msxuk, msx1_state, empty_init, "Sony", "HB-55P (MSX1, Europe)", 0) +COMP(1984, hb701fd, 0, 0, hb701fd, msxjp, msx1_state, empty_init, "Sony", "HB-701FD (MSX1, Japan)", 0) +COMP(1984, hb75, hb75p, 0, hb75, msxjp, msx1_state, empty_init, "Sony", "HB-75 (MSX1, Japan)", 0) +COMP(1984, hb75d, hb75p, 0, hb75d, msxde, msx1_state, empty_init, "Sony", "HB-75D (MSX1, Germany)", 0) +COMP(1984, hb75p, 0, 0, hb75p, msxuk, msx1_state, empty_init, "Sony", "HB-75P (MSX1, Europe)", 0) +COMP(1984, svi728, 0, 0, svi728, svi728, msx1_state, empty_init, "Spectravideo", "SVI-728 (MSX1, International)", 0) +COMP(1984, svi728es, svi728, 0, svi728, svi728sp, msx1_state, empty_init, "Spectravideo", "SVI-728 (MSX1, Spanish)", 0) +COMP(1986, tadpc200, dpc200, 0, tadpc200, msxsp, msx1_state, empty_init, "Talent", "DPC-200 (MSX1, Argentina, Spanish keyboard)", 0) +COMP(1986, tadpc200b, dpc200, 0, tadpc200, msx, msx1_state, empty_init, "Talent", "DPC-200 (MSX1, Argentina, international keyboard)", 0) +COMP(1984, hx10, 0, 0, hx10, msx, msx1_state, empty_init, "Toshiba", "HX-10AA (MSX1, Europe)", 0) +COMP(1983, hx10d, hx10, 0, hx10d, msxjp, msx1_state, empty_init, "Toshiba", "HX-10D (MSX1, Japan)", 0) +COMP(1984, hx10dp, hx10, 0, hx10dp, msxjp, msx1_state, empty_init, "Toshiba", "HX-10DP (MSX1, Japan)", 0) +COMP(1984, hx10e, hx10, 0, hx10e, msx, msx1_state, empty_init, "Toshiba", "HX-10E (MSX1, Spain)", 0) +COMP(1984, hx10f, hx10, 0, hx10f, msx, msx1_state, empty_init, "Toshiba", "HX-10F (MSX1, France)", 0) +COMP(1983, hx10s, hx10, 0, hx10s, msxjp, msx1_state, empty_init, "Toshiba", "HX-10S (MSX1, Japan)", 0) +COMP(1984, hx10sa, hx10, 0, hx10sa, msxjp, msx1_state, empty_init, "Toshiba", "HX-10SA (MSX1, Japan)", 0) +COMP(1984, hx20, 0, 0, hx20, msxjp, msx1_state, empty_init, "Toshiba", "HX-20 (MSX1, Japan)", 0) +COMP(1985, hx20e, hx20, 0, hx20e, msx, msx1_state, empty_init, "Toshiba", "HX-20E (MSX1, Spain)", 0) +COMP(1985, hx20i, hx20, 0, hx20i, msx, msx1_state, empty_init, "Toshiba", "HX-20I (MSX1, Italy)", 0) +COMP(1984, hx21, 0, 0, hx21, msxjp, msx1_state, empty_init, "Toshiba", "HX-21 (MSX1, Japan)", 0) +COMP(1985, hx21f, hx21, 0, hx21f, msx, msx1_state, empty_init, "Toshiba", "HX-21F (MSX1, France)", 0) +COMP(1984, hx22, 0, 0, hx22, msxjp, msx1_state, empty_init, "Toshiba", "HX-22 (MSX1, Japan)", 0) +COMP(1985, hx22i, hx22, 0, hx22i, msx, msx1_state, empty_init, "Toshiba", "HX-22I (MSX1, Italy)", 0) +COMP(1985, hx32, 0, 0, hx32, msxjp, msx1_state, empty_init, "Toshiba", "HX-32 (MSX1, Japan)", 0) +COMP(1985, hx51i, 0, 0, hx51i, msx, msx1_state, empty_init, "Toshiba", "HX-51I (MSX1, Italy, Spain)", 0) +COMP(1983, hc5, hc7, 0, hc5, msxjp, msx1_state, empty_init, "Victor", "HC-5 (MSX1, Japan)", 0) +COMP(1984, hc6, hc7, 0, hc6, msxjp, msx1_state, empty_init, "Victor", "HC-6 (MSX1, Japan)", 0) +COMP(1985, hc7, 0, 0, hc7, msxjp, msx1_state, empty_init, "Victor", "HC-7 (MSX1, Japan)", 0) +COMP(1984, cx5f1, cx5f, 0, cx5f1, msxjp, msx1_state, empty_init, "Yamaha", "CX5F w/SFG01 (MSX1, Japan)", 0) +COMP(1984, cx5f, 0, 0, cx5f, msxjp, msx1_state, empty_init, "Yamaha", "CX5F w/SFG05 (MSX1, Japan)", 0) +COMP(1984, cx5mu, 0, 0, cx5mu, msx, msx1_state, empty_init, "Yamaha", "CX5MU (MSX1, USA)", 0) +COMP(1985, sx100, 0, 0, sx100, msxjp, msx1_state, empty_init, "Yamaha", "SX-100 (MSX1, Japan)", 0) +COMP(1984, yis303, 0, 0, yis303, msxjp, msx1_state, empty_init, "Yamaha", "YIS303 (MSX1, Japan)", 0) +COMP(1984, yis503, 0, 0, yis503, msxjp, msx1_state, empty_init, "Yamaha", "YIS503 (MSX1, Japan)", 0) +COMP(1984, yis503f, yis503, 0, yis503f, msxuk, msx1_state, empty_init, "Yamaha", "YIS503F (MSX1, French)", 0) +COMP(1984, yc64, 0, 0, yc64, msxuk, msx1_state, empty_init, "Yashica", "YC-64 (MSX1, Europe)", 0) +COMP(1985, mx64, 0, 0, mx64, msxfr, msx1_state, empty_init, "Yeno", "MX64 (MSX1, France)", 0) diff --git a/src/mame/msx/msx1_bruc100.cpp b/src/mame/msx/msx1_bruc100.cpp new file mode 100644 index 00000000000..103885612b1 --- /dev/null +++ b/src/mame/msx/msx1_bruc100.cpp @@ -0,0 +1,118 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol + +/* +** TODO: +** - Not all keypad keys hooked up yet +*/ + +#include "emu.h" +#include "msx.h" +#include "msx_keyboard.h" +#include "bus/msx_slot/bruc100.h" +#include "bus/msx_slot/ram.h" +#include "bus/msx_slot/ram_mm.h" + +using namespace msx_keyboard; + + +namespace { + +class bruc100_state : public msx_state +{ +public: + bruc100_state(const machine_config &mconfig, device_type type, const char *tag); + + void bruc100(machine_config &config); + void bruc100a(machine_config &config); + +private: + required_device m_bruc100_firm; + + void io_map(address_map &map); + void port90_w(u8 data); +}; + + +bruc100_state::bruc100_state(const machine_config &mconfig, device_type type, const char *tag) + : msx_state(mconfig, type, tag) + , m_bruc100_firm(*this, "firm") +{ +} + +void bruc100_state::io_map(address_map &map) +{ + msx1_io_map(map); + map(0x90, 0x90).w(FUNC(bruc100_state::port90_w)); +} + +void bruc100_state::port90_w(u8 data) +{ + m_bruc100_firm->select_bank(BIT(data, 7)); + m_cent_ctrl_out->write(data); +} + +/* MSX - Frael Bruc 100-1 */ + +ROM_START(bruc100) + ROM_REGION(0x10000, "mainrom", 0) + ROM_LOAD("v1_1_mcl", 0x0000, 0x8000, CRC(c7bc4298) SHA1(3abca440cba16ac5e162b602557d30169f77adab)) + ROM_LOAD("f_v1_0", 0x8000, 0x2000, CRC(707a62b6) SHA1(e4ffe02abbda17986cb161c332e9e54d24fd053c)) + ROM_RELOAD(0xa000, 0x2000) +ROM_END + +void bruc100_state::bruc100(machine_config &config) +{ + // AY-3-8910 + // FDC: None, 0 drives + // Non-standard cassette port + // 0 Cartridge slots + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_BRUC100, "firm", 0, 0, 2, "mainrom"); + // Expansion slot in slot 1 + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 4).set_total_size(0x10000); // 64KB RAM + + msx1(VDP_TMS9129, SND_AY8910, config); + m_maincpu->set_addrmap(AS_IO, &bruc100_state::io_map); +} + +/* MSX - Frael Bruc 100-2 */ + +ROM_START(bruc100a) + ROM_REGION(0x10000, "mainrom", 0) + ROM_LOAD("bruc100-2bios.rom", 0x0000, 0x8000, CRC(24464a7b) SHA1(88611b54cdbb79aa5380570f3dfef8b3a1cc2057)) + // v1.3 + ROM_SYSTEM_BIOS(0, "v13", "v1.3 firmware") + ROMX_LOAD("bruc100_2_firmware1.3.rom", 0x8000, 0x8000, CRC(286fd001) SHA1(85ab6946950d4e329d5703b5defcce46cd96a50e), ROM_BIOS(0)) + // v1.2 + ROM_SYSTEM_BIOS(1, "v12", "v1.2 firmware") + ROMX_LOAD("c_v1_2.u8", 0x8000, 0x8000, CRC(de12f81d) SHA1(f92d3aaa314808b7a9a14c40871d24f0d558ea00), ROM_BIOS(1)) + // v1.1 + ROM_SYSTEM_BIOS(2, "v11", "v1.1 firmware") + // Firmware 1.1 - 8kb bootlogo rom (mirrored to 2000-3fff) + ROMX_LOAD("bruc100_2_firmware1.2.rom", 0x8000, 0x2000, CRC(54d60863) SHA1(b4c9a06054cda5fd31311a79cc06e6f018cf828f), ROM_BIOS(2)) + ROMX_LOAD("bruc100_2_firmware1.2.rom", 0xa000, 0x2000, CRC(54d60863) SHA1(b4c9a06054cda5fd31311a79cc06e6f018cf828f), ROM_BIOS(2)) +ROM_END + +void bruc100_state::bruc100a(machine_config &config) +{ + // AY-3-8910 + // FDC: None, 0 drives + // Non-standard cassette port + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_BRUC100, "firm", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + // Expansion slot in slot 3 + + msx1(VDP_TMS9129, SND_AY8910, config); + m_maincpu->set_addrmap(AS_IO, &bruc100_state::io_map); +} + +} // anonymous namespace + +COMP(1987, bruc100, 0, 0, bruc100, bruc100, bruc100_state, empty_init, "Frael", "Bruc 100-1 (MSX1, Italy)", 0) +COMP(1988, bruc100a, bruc100, 0, bruc100a, bruc100, bruc100_state, empty_init, "Frael", "Bruc 100-2 (MSX1, Italy)", 0) diff --git a/src/mame/msx/msx1_v9938.cpp b/src/mame/msx/msx1_v9938.cpp new file mode 100644 index 00000000000..ebd161124c8 --- /dev/null +++ b/src/mame/msx/msx1_v9938.cpp @@ -0,0 +1,489 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol + +#include "emu.h" +#include "msx.h" +#include "msx_keyboard.h" +#include "bus/msx_slot/disk.h" +#include "bus/msx_slot/msx_rs232.h" +#include "bus/msx_slot/ram.h" +#include "bus/msx_slot/ram_mm.h" +#include "bus/msx_slot/rom.h" + +using namespace msx_keyboard; + +/*************************************************************************** + + MSX1 with v9938 Game drivers + +Undumped and/or not emulated: +- Sakhr AX-200 (Arabic/French) +- Spectravideo SVI-738 (German) +- Yamaha CX5MII-128A (Australia, New Zealand) +- Yamaha CX5MII-128 C (Canada) +- Yamaha CX5MII-128 E (UK) +- Yamaha CX5MII-128 F (France) +- Yamaha CX5MII-128 G (Germany) +- Yamaha CX5MII-128 P (Spain) +- Yamaha CX5MII-128 S (Scandinavia) +- Yamaha CX5MII-128 U (USA) +- Yamaha CX5MIIA (Australia, New Zealand) +- Yamaha CX5MIIC (Canada) +- Yamaha CX5MIIE (UK) +- Yamaha CX5MIIF (France) +- Yamaha CX5MIIG (Germany) +- Yamaha CX5MIIP (Spain) +- Yamaha CX5MIIS (Scandinavia) +- Yamaha CX5MIIU (USA) +***************************************************************************/ + +namespace { + +class msx1_v9938_state : public msx_state +{ +public: + msx1_v9938_state(const machine_config &mconfig, device_type type, const char *tag); + + void ax200(machine_config &mconfig); + void ax200m(machine_config &mconfig); + void cx5m128(machine_config &config); + void cx5miib(machine_config &config); + void svi738(machine_config &config); + void svi738ar(machine_config &config); + void tadpc200a(machine_config &config); + void y503iir(machine_config &config); + void y503iir2(machine_config &config); + void yis503ii(machine_config &config); + +protected: + void msx1_v9938(ay8910_type ay8910_type, machine_config &config); + void msx1_v9938_pal(ay8910_type ay8910_type, machine_config &config); + + void io_map(address_map &map); + + required_device m_v9938; +}; + +msx1_v9938_state::msx1_v9938_state(const machine_config &mconfig, device_type type, const char *tag) + : msx_state(mconfig, type, tag) + , m_v9938(*this, "v9938") +{ +} + +void msx1_v9938_state::io_map(address_map &map) +{ + msx_base_io_map(map); + map(0x98, 0x9b).rw(m_v9938, FUNC(v9938_device::read), FUNC(v9938_device::write)); +} + +void msx1_v9938_state::msx1_v9938(ay8910_type ay8910_type, machine_config &config) +{ + msx_base(ay8910_type, config, 21.477272_MHz_XTAL, 6); + + m_maincpu->set_addrmap(AS_IO, &msx1_v9938_state::io_map); + + // video hardware + V9938(config, m_v9938, 21.477272_MHz_XTAL); + m_v9938->set_screen_ntsc(m_screen); + m_v9938->set_vram_size(0x4000); + m_v9938->int_cb().set(m_mainirq, FUNC(input_merger_device::in_w<0>)); + + // Software lists + msx1_add_softlists(config); +} + +void msx1_v9938_state::msx1_v9938_pal(ay8910_type ay8910_type, machine_config &config) +{ + msx1_v9938(ay8910_type, config); + m_v9938->set_screen_pal(m_screen); +} + +/* MSX - Sakhr AX-200 (Arabic/English) */ + +ROM_START (ax200) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ax200bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(cae98b30) SHA1(079c018739c37485f3d64ef2145a0267fce6e20e)) // need verification + + ROM_REGION(0x8000, "arabic", 0) + ROM_LOAD("ax200arab.rom", 0x0000, 0x8000, BAD_DUMP CRC(b041e610) SHA1(7574cc5655805ea316011a8123b064917f06f83c)) // need verification +ROM_END + +void msx1_v9938_state::ax200(machine_config &config) +{ + // YM2149 in S3527 + // FDC: None, 0 drives + // 2 Cartridge slots + // V9938 + // MSX Engine S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 0, 2, 0, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "arabic", 0, 3, 1, 2, "arabic"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, msx_yamaha_60pin, nullptr); + + msx1_v9938_pal(SND_YM2149, config); +} + +/* MSX - Sakhr AX-200 (Arabic/French) */ + +/* MSX - Sakhr AX-200M (Arabic/English) */ + +ROM_START (ax200m) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ax200bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(cae98b30) SHA1(079c018739c37485f3d64ef2145a0267fce6e20e)) // need verification + + ROM_REGION(0x8000, "arabic", 0) + ROM_LOAD("ax200arab.rom", 0x0000, 0x8000, BAD_DUMP CRC(b041e610) SHA1(7574cc5655805ea316011a8123b064917f06f83c)) // need verification +ROM_END + +void msx1_v9938_state::ax200m(machine_config &config) +{ + // YM2149 in S3527 + // FDC: None, 0 drives + // 2 Cartridge slots + // V9938 + // MSX Engine S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 0, 2, 0, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "arabic", 0, 3, 1, 2, "arabic"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + // Dumped unit had a SFG05 with version M5.00.011 rom + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, msx_yamaha_60pin, "sfg05"); + + msx1_v9938_pal(SND_YM2149, config); +} + +/* MSX - Spectravideo SVI-738 */ + +ROM_START(svi738) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("738bios.rom", 0x0000, 0x8000, CRC(ad007d62) SHA1(c53b3f2c00f31683914f7452f3f4d94ae2929c0d)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("738disk.rom", 0x0000, 0x4000, CRC(acd27a36) SHA1(99a40266bc296cef1d432cb0caa8df1a7e570be4)) + + ROM_REGION(0x4000, "rs232rom", ROMREGION_ERASEFF) + ROM_LOAD("738232c.rom", 0x0000, 0x2000, CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) +ROM_END + +void msx1_v9938_state::svi738(machine_config &config) +{ + // AY8910 + // FDC: fd1793, 1 3.5" SSDD drive + // 1 Cartridge slot + // builtin 80 columns card (V9938) + // RS-232C interface + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + add_internal_slot_irq<2>(config, MSX_SLOT_RS232_SVI738, "rs232", 3, 0, 1, 1, "rs232rom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK2_FD1793_SS, "disk", 3, 1, 1, 2, "diskrom"); + + msx1_v9938_pal(SND_AY8910, config); +} + +/* MSX - Spectravideo SVI-738 Arabic */ + +ROM_START(svi738ar) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("738arbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(ad007d62) SHA1(c53b3f2c00f31683914f7452f3f4d94ae2929c0d)) // need verification + + ROM_REGION(0x8000, "arab", 0) + ROM_LOAD("738arab.rom", 0x0000, 0x8000, BAD_DUMP CRC(339cd1aa) SHA1(0287b2ec897b9196788cd9f10c99e1487d7adbbb)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("738ardisk.rom", 0x0000, 0x4000, BAD_DUMP CRC(acd27a36) SHA1(99a40266bc296cef1d432cb0caa8df1a7e570be4)) // meed verification + + ROM_REGION(0x4000, "rs232rom", ROMREGION_ERASEFF) + ROM_LOAD("738ar232c.rom", 0x0000, 0x2000, BAD_DUMP CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) // need verification +ROM_END + +void msx1_v9938_state::svi738ar(machine_config &config) +{ + svi738(config); + add_internal_slot(config, MSX_SLOT_ROM, "arab", 3, 3, 1, 2, "arab"); +} + +/* MSX - Spectravideo SVI-738 Danish/Norwegian */ + +ROM_START(svi738dk) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("738dkbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(88720320) SHA1(1bda5af20cb86565bdc1ebd1e59a691fed7f9256)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("738dkdisk.rom", 0x0000, 0x4000, BAD_DUMP CRC(fb884df4) SHA1(6d3a530ae822ec91f6444c681c9b08b9efadc7e7)) // need verification + + ROM_REGION(0x4000, "rs232rom", ROMREGION_ERASEFF) + ROM_LOAD("738dk232c.rom", 0x0000, 0x2000, BAD_DUMP CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) // need verification +ROM_END + +/* MSX - Spectravideo SVI-738 German */ + +/* MSX - Spectravideo SVI-738 Polish */ + +ROM_START(svi738pl) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("738plbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(431b8bf5) SHA1(c90077ed84133a947841e07856e71133ba779da6)) // IC51 on board, need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("738disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(acd27a36) SHA1(99a40266bc296cef1d432cb0caa8df1a7e570be4)) // need verification + + ROM_REGION(0x4000, "rs232rom", ROMREGION_ERASEFF) + ROM_LOAD("738232c.rom", 0x0000, 0x2000, BAD_DUMP CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) // need verification +ROM_END + +/* MSX - Spectravideo SVI-738 Spanish */ + +ROM_START(svi738sp) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("738spbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(f0c0cbb9) SHA1(5f04d5799ed72ea4993e7c4302a1dd55ac1ea8cd)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("738spdisk.rom", 0x0000, 0x4000, BAD_DUMP CRC(fb884df4) SHA1(6d3a530ae822ec91f6444c681c9b08b9efadc7e7)) // need verification + + ROM_REGION(0x4000, "rs232rom", ROMREGION_ERASEFF) + ROM_LOAD("738sp232c.rom", 0x0000, 0x2000, BAD_DUMP CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) // need verification +ROM_END + +/* MSX - Spectravideo SVI-738 Swedish/Finnish */ + +ROM_START(svi738sw) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("738sebios.rom", 0x0000, 0x8000, CRC(c8ccdaa0) SHA1(87f4d0fa58cfe9cef818a3185df2735e6da6168c)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("738sedisk.rom", 0x0000, 0x4000, CRC(fb884df4) SHA1(6d3a530ae822ec91f6444c681c9b08b9efadc7e7)) + + ROM_REGION(0x4000, "rs232rom", ROMREGION_ERASEFF) + ROM_LOAD("738se232c.rom", 0x0000, 0x2000, CRC(3353dcc6) SHA1(4e9384c9d137f0ab65ffc5a78f04cd8c9df6c8b7)) +ROM_END + +/* MSX - Talent DPC-200A */ + +ROM_START(tadpc200a) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("dpc200abios.rom", 0x0000, 0x8000, BAD_DUMP CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) // need verification +ROM_END + +void msx1_v9938_state::tadpc200a(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 1 Cartridge slot + // S1985 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 1, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 2); + // Expansion slot + + msx1_v9938_pal(SND_YM2149, config); +} + +/* MSX - Yamaha CX5MII-128A (Australia, New Zealand) */ + +/* MSX - Yamaha CX5MII-128B (Italy) */ + +// Exact region unknown +ROM_START(cx5m128) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("cx5m128bios.rom", 0x0000, 0x8000, CRC(7973e080) SHA1(ea4a723cf098be7d7b40f23a7ab831cf5e2190d7)) + + 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) +{ + // YM2149 in S3527 + // FDC: None, 0 drives + // 2 Cartridge slots + // 1 Mini cart slot (with YRM-502) + // 1 Yamaha Module slot + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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_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"); + + msx1_v9938_pal(SND_YM2149, config); +} + +/* MSX - Yamaha CX5MII-128 C (Canada) */ + +/* MSX - Yamaha CX5MII-128 E (UK) */ + +/* MSX - Yamaha CX5MII-128 F (France) */ + +/* MSX - Yamaha CX5MII-128 G (Germany) */ + +/* MSX - Yamaha CX5MII-128 P (Spain) */ + +/* MSX - Yamaha CX5MII-128 S (Scandinavia) */ + +/* MSX - Yamaha CX5MII-128 U (USA) */ + +/* MSX - Yamaha CX5MIIA (Australia, New Zealand) */ + +/* MSX - Yamaha CX5MIIB (Italy) */ + +ROM_START(cx5miib) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("cx5mii_basic-bios1.rom", 0x0000, 0x8000, CRC(507b2caa) SHA1(0dde59e8d98fa524961cd37b0e100dbfb42cf576)) + + 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) +{ + // YM2149 in S3527 + // FDC: None, 0 drives + // 2 Cartridge slots + // 1 Mini cartridge slot (with YRM-502) + // 1 Module slot + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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_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"); + + msx1_v9938_pal(SND_YM2149, config); +} + +/* MSX - Yamaha CX5MIIC (Canada) */ + +/* MSX - Yamaha CX5MIIE (UK) */ + +/* MSX - Yamaha CX5MIIF (France) */ + +/* MSX - Yamaha CX5MIIG (Germany) */ + +/* MSX - Yamaha CX5MIIP (Spain) */ + +/* MSX - Yamaha CX5MIIS (Scandinavia) */ + +/* MSX - Yamaha CX5MIIU (USA) */ + +/* MSX - Yamaha YIS-503II */ + +ROM_START(yis503ii) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yis503iibios.rom", 0x0000, 0x8000, CRC(3b08dc03) SHA1(4d0c37ad722366ac7aa3d64291c3db72884deb2d)) +ROM_END + +void msx1_v9938_state::yis503ii(machine_config &config) +{ + // YM2149 in S3527 + // FDC: None, 0 drives + // S3527 + // 2 Cartridge slots + // 1 Yamaha module slot (60 pin) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, 3, msx_yamaha_60pin, nullptr); + + msx1_v9938(SND_YM2149, config); +} + +/* MSX - Yamaha YIS503-IIR Russian */ + +ROM_START(y503iir) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yis503iirbios.rom", 0x0000, 0x8000, CRC(e751d55c) SHA1(807a823d4cac527c9f3758ed412aa2584c7f6d37)) +// This is in the module slot by default +// ROM_LOAD("yis503iirnet.rom", 0xc000, 0x2000, CRC(0731db3f) SHA1(264fbb2de69fdb03f87dc5413428f6aa19511a7f)) +ROM_END + +void msx1_v9938_state::y503iir(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // 1 Mini cartridge slot + // 1 Yamaha module slot + // S-3527 MSX Engine + // V9938 VDP + + 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_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); + + msx1_v9938_pal(SND_YM2149, config); +} + +/* MSX - Yamaha YIS503-IIR Estonian */ + +ROM_START(y503iir2) + ROM_REGION(0x10000, "mainrom", 0) + ROM_LOAD("yis503ii2bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(1548cee3) SHA1(42c7fff25b1bd90776ac0aea971241aedce8947d)) // need verification +// This is in the module slot by default +// ROM_LOAD("yis503iirnet.rom", 0xc000, 0x2000, CRC(0731db3f) SHA1(264fbb2de69fdb03f87dc5413428f6aa19511a7f)) +ROM_END + +void msx1_v9938_state::y503iir2(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // 1 Mini cartridge slot + // 1 Yamaha module slot + // S-3527 MSX Engine + // V9938 VDP + + 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_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); + + msx1_v9938_pal(SND_YM2149, config); +} + +} // anonymous namespace + +COMP(1986, ax200, 0, 0, ax200, msx, msx1_v9938_state, empty_init, "Sakhr", "AX-200 (MSX1, Arabic/English)", 0) +COMP(1986, ax200m, ax200, 0, ax200m, msx, msx1_v9938_state, empty_init, "Sakhr", "AX-200M (MSX1, Arabic/English)", 0) +COMP(1985, svi738, 0, 0, svi738, msx, msx1_v9938_state, empty_init, "Spectravideo", "SVI-738 (MSX1, International)", 0) +COMP(1987, svi738ar, svi738, 0, svi738ar, msx, msx1_v9938_state, empty_init, "Spectravideo", "SVI-738 (MSX1, Arabic)", 0) +COMP(1985, svi738dk, svi738, 0, svi738, svi738dk, msx1_v9938_state, empty_init, "Spectravideo", "SVI-738 (MSX1, Denmark, Norway)", 0) +COMP(1986, svi738pl, svi738, 0, svi738, msx, msx1_v9938_state, empty_init, "Spectravideo", "SVI-738 (MSX1, Poland)", 0) +COMP(1985, svi738sp, svi738, 0, svi738, msxsp, msx1_v9938_state, empty_init, "Spectravideo", "SVI-738 (MSX1, Spain)", 0) +COMP(1985, svi738sw, svi738, 0, svi738, svi738sw, msx1_v9938_state, empty_init, "Spectravideo", "SVI-738 (MSX1, Finland, Sweden)", 0) +COMP(1988, tadpc200a, dpc200, 0, tadpc200a, msx, msx1_v9938_state, empty_init, "Talent", "DPC-200A (MSX1, Argentina)", 0) // Should have a Spanish keyboard layout? +COMP(1984, cx5m128, 0, 0, cx5m128, msx, msx1_v9938_state, empty_init, "Yamaha", "CX5M-128 (MSX1)", 0) +COMP(1984, cx5miib, cx5m128, 0, cx5miib, msx, msx1_v9938_state, empty_init, "Yamaha", "CX5MIIB (MSX1, Italy)", 0) +COMP(1985, yis503ii, yis503, 0, yis503ii, msxjp, msx1_v9938_state, empty_init, "Yamaha", "YIS503II (MSX1, Japan)", 0) +COMP(1985, y503iir, yis503, 0, y503iir, msxru, msx1_v9938_state, empty_init, "Yamaha", "YIS503IIR (MSX1, USSR)", 0) +COMP(1986, y503iir2, yis503, 0, y503iir2, y503iir2, msx1_v9938_state, empty_init, "Yamaha", "YIS503IIR (MSX1, Estonian)", 0) diff --git a/src/mame/msx/msx2.cpp b/src/mame/msx/msx2.cpp new file mode 100644 index 00000000000..c9f57a24894 --- /dev/null +++ b/src/mame/msx/msx2.cpp @@ -0,0 +1,4691 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol + +#include "emu.h" +#include "msx.h" +#include "msx_kanji12.h" +#include "msx_keyboard.h" +#include "msx_matsushita.h" +#include "msx_s1985.h" +#include "msx_systemflags.h" +#include "bus/msx_slot/bunsetsu.h" +#include "bus/msx_slot/disk.h" +#include "bus/msx_slot/fs4600.h" +#include "bus/msx_slot/fsa1fm.h" +#include "bus/msx_slot/msx_rs232.h" +#include "bus/msx_slot/msx_write.h" +#include "bus/msx_slot/music.h" +#include "bus/msx_slot/panasonic08.h" +#include "bus/msx_slot/ram.h" +#include "bus/msx_slot/ram_mm.h" +#include "bus/msx_slot/rom.h" +#include "bus/msx_slot/sony08.h" + +using namespace msx_keyboard; + + +/*************************************************************************** + + MSX2 Game drivers + +Undumped and/or not emulated: +- AVT CPC-300 (prototype) +- Bawareth Perfect MSX2 +- Daisen Sangyo MX-2021 +- Laser MSX2 (unreleased) +- ML-TS2 +- Philips NMS 8245 Home Banking (Italy) +- Perfect Perfect2 - MSX2 +- Phonola NMS 8245 +- Phonola NMS 8280 +- Phonola VG-8235 +- Sanyo MPC-25F +- Sanyo MPC-25FK +- Sanyo PCT-100 +- Sony HB-F750 (prototype) +- Sony HB-G900D +- Sony HB-G900F +- Sony HB-T600 +- Sony HB-T7 +- Talent DPC-300 +- Victor HC-90(A) +- Victor HC-90(B) +- Victor HC-90(V) +- Victor HC-90(T) +- Wandy CPC-300 +***************************************************************************/ + +namespace { + +class msx2_state : public msx2_base_state +{ +public: + msx2_state(const machine_config &mconfig, device_type type, const char *tag) + : msx2_base_state(mconfig, type, tag) + { + } + + void ax350(machine_config &config); + void ax350ii(machine_config &config); + void ax350iif(machine_config &config); + void ax370(machine_config &config); + void ax500(machine_config &config); + void canonv25(machine_config &config); + void canonv30(machine_config &config); + void canonv30f(machine_config &config); + void cpc300(machine_config &config); + void cpc300e(machine_config &config); + void cpc330k(machine_config &config); + void cpc400(machine_config &config); + void cpc400s(machine_config &config); + void cpc61(machine_config &config); + void cpg120(machine_config &config); + void cx7128(machine_config &config); + void cx7m128(machine_config &config); + void expert20(machine_config &config); + void expert3i(machine_config &config); + void expert3t(machine_config &config); + void expertac(machine_config &config); + void expertdx(machine_config &config); + void fpc900(machine_config &config); + void kmc5000(machine_config &config); + void mbh70(machine_config &config); + void mlg1(machine_config &config); + void mlg3(machine_config &config); + void mlg10(machine_config &config); + void mlg30(machine_config &config); + void mlg30_2(machine_config &config); + void mpc2300(machine_config &config); + void mpc2500f(machine_config &config); + void mpc25fd(machine_config &config); + void mpc25fs(machine_config &config); + void mpc27(machine_config &config); + void fs4500(machine_config &config); + void fs4600f(machine_config &config); + void fs4700f(machine_config &config); + void fs5000f2(machine_config &config); + void fs5500f1(machine_config &config); + void fs5500f2(machine_config &config); + void fsa1(machine_config &config); + void fsa1a(machine_config &config); + void fsa1f(machine_config &config); + void fsa1fm(machine_config &config); + void fsa1fx(machine_config &config); + void fsa1gt(machine_config &config); + void fsa1st(machine_config &config); + void fsa1mk2(machine_config &config); + void fsa1wsx(machine_config &config); + void fsa1wx(machine_config &config); + void fsa1wxa(machine_config &config); + void fstm1(machine_config &config); + void hbf1(machine_config &config); + void hbf1ii(machine_config &config); + void hbf1xd(machine_config &config); + void hbf1xdj(machine_config &config); + void hbf1xv(machine_config &config); + void hbf5(machine_config &config); + void hbf500(machine_config &config); + void hbf500_2(machine_config &config); + void hbf500f(machine_config &config); + void hbf500p(machine_config &config); + void hbf700d(machine_config &config); + void hbf700f(machine_config &config); + void hbf700p(machine_config &config); + void hbf700s(machine_config &config); + void hbf900(machine_config &config); + void hbf900a(machine_config &config); + void hbf9p(machine_config &config); + void hbf9pr(machine_config &config); + void hbf9s(machine_config &config); + void hbg900ap(machine_config &config); + void hbg900p(machine_config &config); + void hotbit20(machine_config &config); + void hx23(machine_config &config); + void hx23f(machine_config &config); + void hx33(machine_config &config); + void hx34(machine_config &config); + void mbh3(machine_config &config); + void nms8220(machine_config &config); + void nms8245(machine_config &config); + void nms8245f(machine_config &config); + void nms8250(machine_config &config); + void nms8255(machine_config &config); + void nms8255f(machine_config &config); + void nms8260(machine_config &config); + void nms8280(machine_config &config); + void nms8280f(machine_config &config); + void nms8280g(machine_config &config); + void phc23(machine_config &config); + void phc23jb(machine_config &config); + void phc35j(machine_config &config); + void phc55fd2(machine_config &config); + void phc70fd(machine_config &config); + void phc70fd2(machine_config &config); + void phc77(machine_config &config); + void tpc310(machine_config &config); + void tpp311(machine_config &config); + void tps312(machine_config &config); + void ucv102(machine_config &config); + void vg8230(machine_config &config); + void vg8235(machine_config &config); + void vg8235f(machine_config &config); + void vg8240(machine_config &config); + void victhc80(machine_config &config); + void victhc90(machine_config &config); + void victhc95(machine_config &config); + void victhc95a(machine_config &config); + void y503iiir(machine_config &config); + void y503iiire(machine_config &config); + void yis604(machine_config &config); + void y805128(machine_config &config); + void y805128r2(machine_config &config); + void y805128r2e(machine_config &config); + void y805256(machine_config &config); +}; + +/* MSX2 - AVT CPC-300 (prototype) */ + +/* MSX2 - Bawareth Perfect MSX2 */ + +/* MSX2 - Canon V-25 */ + +ROM_START(canonv25) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("v25bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("v25ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) +ROM_END + +void msx2_state::canonv25(machine_config &config) +{ + // YM2149 (in S3527 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // S3527 + // 64KB VRAM + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + + msx2(SND_YM2149, config); + msx2_64kb_vram(config); +} + +/* MSX2 - Canon V-30F */ + +ROM_START(canonv30f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("v30fbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("v30fext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("v30fdisk.rom", 0x0000, 0x4000, CRC(b499277c) SHA1(33117c47543a4eb00392cb9ff4e503004999a97a)) +ROM_END + +void msx2_state::canonv30f(machine_config &config) +{ + // YM2149 (in S3527 MSX Engine) + // FDC: mb8877a, 1 3.5" DSDD drive + // 2 Cartridge slots + // S3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK7_MB8877, "disk", 3, 1, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM + + msx2(SND_YM2149, config); +} + +/* MSX2 - Daewoo CPC-300 */ + +ROM_START(cpc300) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("300bios.rom", 0x0000, 0x8000, CRC(53850907) SHA1(affa3c5cd8db79a1450ad8a7f405a425b251653d)) + + ROM_REGION(0x8000, "subrom", 0) + ROM_LOAD("300ext.rom", 0x0000, 0x8000, CRC(d64da39c) SHA1(fb51c505adfbc174df94289fa894ef969f5357bc)) + + ROM_REGION(0x8000, "hangul", 0) + ROM_LOAD("300han.rom", 0x0000, 0x8000, CRC(e78cd87f) SHA1(47a9d9a24e4fc6f9467c6e7d61a02d45f5a753ef)) +ROM_END + +void msx2_state::cpc300(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + // S-1985 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 1, 1, 2, "hangul"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 128KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 3, 0, 2, "subrom"); + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #3 + + MSX_S1985(config, "s1985", 0); + msx2(SND_YM2149, config); +} + +/* MSX2 - Daewoo CPC-300E */ + +ROM_START(cpc300e) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("300ebios.rom", 0x0000, 0x8000, CRC(53850907) SHA1(affa3c5cd8db79a1450ad8a7f405a425b251653d)) + + ROM_REGION(0x8000, "subrom", 0) + ROM_LOAD("300eext.rom", 0x0000, 0x8000, CRC(c52bddda) SHA1(09f7d788698a23aa7eec140237e907d4c37cbfe0)) + + ROM_REGION(0x8000, "hangul", 0) + ROM_LOAD("300ehan.rom", 0x0000, 0x8000, CRC(e78cd87f) SHA1(47a9d9a24e4fc6f9467c6e7d61a02d45f5a753ef)) +ROM_END + +void msx2_state::cpc300e(machine_config &config) +{ + // YM2149 in S1985 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + // No clockchip + // No joystick ports + // S1985 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 1, 1, 2, "hangul"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 128KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 3, 0, 2, "subrom"); + add_cartridge_slot<1>(config, 1); + // Expansion slot in slot #3 + + MSX_S1985(config, "s1985", 0); + msx2(SND_YM2149, config); +} + +/* MSX2 - Daewoo CPC-330K */ + +ROM_START(cpc330k) + ROM_REGION(0x18000, "mainrom", 0) + ROM_LOAD("330kbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(53850907) SHA1(affa3c5cd8db79a1450ad8a7f405a425b251653d)) // need verification + + ROM_REGION(0x8000, "subrom", 0) + ROM_LOAD("330kext.rom", 0x0000, 0x8000, BAD_DUMP CRC(5d685cca) SHA1(97afbadd8fe34ab658cce8222a27cdbe19bcef39)) // need verification + + ROM_REGION(0x8000, "hangul", 0) + ROM_LOAD("330khan.rom", 0x0000, 0x4000, BAD_DUMP CRC(3d6dd335) SHA1(d2b058989a700ca772b9591f42c01ed0f45f74d6)) // need verification +ROM_END + +void msx2_state::cpc330k(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 1 Cartridge slot + // 1 Expansion slot + // DW64MX1 + // Ergonomic keyboard, 2 builtin game controllers + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 1, 1, 2, "hangul"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 3, 0, 2, "subrom"); + add_cartridge_slot<1>(config, 1); + + msx2(SND_AY8910, config); +} + +/* MSX2 - Daewoo CPC-400 */ + +ROM_START(cpc400) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("400bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(53850907) SHA1(affa3c5cd8db79a1450ad8a7f405a425b251653d)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("400disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(5fa517df) SHA1(914f6ccb25d78621186001f2f5e2aaa2d628cd0c)) // need verification + + ROM_REGION(0x8000, "subrom", 0) + ROM_LOAD("400ext.rom", 0x0000, 0x8000, BAD_DUMP CRC(2ba104a3) SHA1(b6d3649a6647fa9f6bd61efc317485a20901128f)) // need verification + + ROM_REGION(0x8000, "hangul", 0) + ROM_LOAD("400han.rom", 0x0000, 0x8000, BAD_DUMP CRC(a8ead5e3) SHA1(87936f808423dddfd00629056d6807b4be1dc63e)) // need verification + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("400kfn.rom", 0, 0x20000, BAD_DUMP CRC(b663c605) SHA1(965f4982790f1817bcbabbb38c8777183b231a55)) // need verification +ROM_END + +void msx2_state::cpc400(machine_config &config) +{ + // AY8910 + // FDC: mb8877a, 1 3.5" DS?DD drive + // 1 Cartridge slot + // 1 Expansion slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 1, 1, 2, "hangul"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 128KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 3, 0, 2, "subrom"); + add_cartridge_slot<1>(config, 1); + add_internal_disk_mirrored(config, MSX_SLOT_DISK2_MB8877, "disk", 2, 1, 2, "diskrom"); + // Expansion slot in slot #3 + + msx2(SND_AY8910, config); +} + +/* MSX2 - Daewoo CPC-400S */ + +ROM_START(cpc400s) + ROM_REGION(0x10000, "mainrom", 0) + // bios, disk, and sub + ROM_LOAD("400sbios.u38", 0x0000, 0x10000, CRC(dbb0f26d) SHA1(75f5f0a5a2e8f0935f33bb3cf07b83dd3e5f3347)) + + ROM_REGION(0x10000, "hangul", 0) + // hangul and kanji driver + ROM_LOAD("400shan.u44", 0x0000, 0x10000, CRC(5fdb493c) SHA1(6b640c1d8cbeda6ca7d6facd16a206b62e059eee)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("400skfn.rom", 0, 0x20000, CRC(fa85368c) SHA1(30fff22e3e3d464993707488442721a5e56a9707)) +ROM_END + +void msx2_state::cpc400s(machine_config &config) +{ + // AY8910 + // FDC: mb8877a, 1 3.5" DS?DD drive + // 1 Cartridge slot + // DW64MX1 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul1", 0, 1, 1, 1, "hangul", 0x4000); + add_internal_slot(config, MSX_SLOT_ROM, "kfn", 0, 1, 2, 1, "hangul", 0xc000); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 128KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 3, 0, 1, "mainrom", 0xc000); + add_internal_slot(config, MSX_SLOT_ROM, "hangul2", 0, 3, 1, 1, "hangul"); + add_cartridge_slot<1>(config, 1); + add_internal_disk_mirrored(config, MSX_SLOT_DISK2_MB8877, "disk", 2, 1, 2, "mainrom", 0x8000); + // Expansion slot in slot #3 + + msx2(SND_AY8910, config); +} + +/* MSX2 - Daewoo Zemmix CPC-61 */ + +ROM_START(cpc61) + ROM_REGION(0x10000, "mainrom", 0) + ROM_LOAD("cpc64122.rom", 0x0000, 0x10000, CRC(914dcad9) SHA1(dd3c39c8cfa06ec69f54c95c3b2291e3da7bd4f2)) +ROM_END + +void msx2_state::cpc61(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 1 Cartridge slot + // DW64MX1 + // No keyboard, but a keyboard connector + // No printer port + // No cassette port + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "hangul", 0, 1, 1, 1, "mainrom", 0xc000); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM? + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 3, 0, 1, "mainrom", 0x8000); + add_cartridge_slot<1>(config, 1); + + m_hw_def.has_cassette(false) + .has_printer_port(false); + msx2(SND_AY8910, config); +} + +/* MSX2 - Daewoo Zemmix CPG-120 Normal */ + +ROM_START(cpg120) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("cpg120bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(b80c8e45) SHA1(310a02a9746bc062834e0cf2fabf7f3e0f7e829e)) // need verification + + ROM_REGION(0x8000, "subrom", 0) + ROM_LOAD("cpg120ext.rom", 0x0000, 0x8000, BAD_DUMP CRC(b3d740b4) SHA1(7121c3c5ee6e4931fceda14a06f4c0e3b8eda437)) // need verification + + ROM_REGION(0x4000, "music", 0) + ROM_LOAD("cpg128music.rom", 0x0000, 0x4000, BAD_DUMP CRC(73491999) SHA1(b9ee4f30a36e283a2b1b9a28a70ab9b9831570c6)) // need verification +ROM_END + +void msx2_state::cpg120(machine_config &config) +{ + // By pressing the turbo button the CPU can switched between 3.579545 and 5.369317 MHz + // YM2149 (in S1985) + // FDC: None, 0 drives + // 2 Cartridge slots? + // S-1985 MSX Engine + // V9958 VDP + // FM built in + // No keyboard, bot a keyboard connector? + // No clock chip? + // No printer port + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "saubrom", 0, 3, 0, 2, "subrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 2, 1, 1, "music").set_ym2413_tag("ym2413"); + add_cartridge_slot<2>(config, 3); + + MSX_S1985(config, "s1985", 0); + + msx_ym2413(config); + m_hw_def.has_printer_port(false); + msx2plus(SND_AY8910, config); +} + +/* MSX2 - Daisen Sangyo MX-2021 */ + +/* MSX2 - Fenner FPC-900 */ + +ROM_START(fpc900) + ROM_REGION(0x10000, "mainrom", 0) + ROM_LOAD("fpc900bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("fpc900ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("fpc900disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) // need verification +ROM_END + +void msx2_state::fpc900(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: WD2793?, 1 3.5" DSDD drive + // 2? Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x40000); // 256KB? Mapper RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 3, 1, 2, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - GR8Bit (should probably be a separate driver) */ + +/* MSX2 - Gradiente Expert 2.0 */ + +ROM_START(expert20) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("exp20bios.rom", 0x0000, 0x8000, CRC(6bacdce4) SHA1(9c43106dba3ae2829e9a11dffa9d000ed6d6454c)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("exp20ext.rom", 0x0000, 0x4000, CRC(08ced880) SHA1(4f2a7e0172f0214f025f23845f6e053d0ffd28e8)) + + ROM_REGION(0x4000, "xbasic", 0) + ROM_LOAD("xbasic2.rom", 0x0000, 0x4000, CRC(2825b1a0) SHA1(47370bec7ca1f0615a54eda548b07fbc0c7ef398)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("microsoldisk.rom", 0x0000, 0x4000, CRC(6704ef81) SHA1(a3028515ed829e900cc8deb403e17b09a38bf9b0)) +ROM_END + +void msx2_state::expert20(machine_config &config) +{ + // AY8910/YM2149? + // FDC: microsol, 1? 3.5"? DS?DD drive + // 2 Cartridge slots? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 1, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "xbasic", 1, 1, 1, 1, "xbasic"); + add_internal_disk(config, MSX_SLOT_DISK5_WD2793, "disk", 1, 3, 1, 1, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 128KB Mapper RAM + add_cartridge_slot<2>(config, 3); + + msx2_pal(SND_AY8910, config); +} + +/* MSX2 - Hitachi MB-H3 */ + +ROM_START(mbh3) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mbh3bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("mbh3sub.rom", 0x000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("mbh3firm.rom", 0x0000, 0x8000, CRC(8c844173) SHA1(74ee82cc09ffcf78f6e9a3f0d993f8f80d81444c)) +ROM_END + +void msx2_state::mbh3(machine_config &config) +{ + // YM2149 in S3527 + // FDC: None, 0 drives + // 64KB VRAM + // Touchpad + // 2 Cartrdige slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 0, 1, 2, "firmware"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM + + msx2(SND_YM2149, config); + msx2_64kb_vram(config); +} + +/* MSX2 - Hitachi MB-H70 */ + +ROM_START(mbh70) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mbh70bios.rom" , 0x0000, 0x8000, BAD_DUMP CRC(a27c563d) SHA1(c1e46c00f1e38fc9e0ab487bf0513bd93ce61f3f)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("mbh70ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("mbh70disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(05661a3f) SHA1(e695fc0c917577a3183901a08ca9e5f9c60b8317)) // need verification + + ROM_REGION(0x100000, "firmware", 0) + ROM_LOAD("mbh70halnote.rom", 0x0000, 0x100000, BAD_DUMP CRC(40313fec) SHA1(1af617bfd11b10a71936c606174a80019762ea71)) // need verification + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("mbh70kfn.rom", 0x0000, 0x20000, BAD_DUMP CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) // need verification +ROM_END + +void msx2_state::mbh70(machine_config &config) +{ + // YM2149 (in S-1985) + // FDC: WD2793?, 2? 3.5" DSDD drives + // S-1985 MSX Engine + // 3 Cartridge slots? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_SONY08, "firmware", 0, 3, 0, 4, "firmware"); + 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"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N_2_DRIVES, "disk", 3, 0, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Kawai KMC-5000 */ + +ROM_START(kmc5000) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("kmc5000bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("kmc5000ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("kmc5000disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(e25cacca) SHA1(607cfca605eaf82e3efa33459d6583efb7ecc13b)) // need verification + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("kmc5000kdr.rom", 0x0000, 0x8000, BAD_DUMP CRC(2dbea5ec) SHA1(ea35cc2cad9cfdf56cae224d8ee41579de37f000)) // need verification + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("kmc5000kfn.rom", 0, 0x20000, BAD_DUMP CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) // need verification +ROM_END + +void msx2_state::kmc5000(machine_config &config) +{ + // YM2149 (in S-1985) + // FDC: TC8566AF?, 1? 3.5" DSDD drive + // S-1985 MSX Engine + // 2? Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "kdr"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK3_TC8566, "disk", 3, 2, 1, 2, "diskrom"); + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Laser MSX2 (unreleased) */ + +/* MSX2 - Mitsubishi ML-G1 */ + +ROM_START(mlg1) + // ic8f - hn27256g-25 (paint?) + // ic10f - hn613128pn33-sp2 - t704p874h52 (sub?) + // ic11f - hn613256pdc1 - t704p874h50 (bios?) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mlg1bios.rom", 0x0000, 0x8000, CRC(0cc7f817) SHA1(e4fdf518a8b9c8ab4290c21b83be2c347965fc24)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("mlg1ext.rom", 0x0000, 0x4000, CRC(dc0951bd) SHA1(1e9a955943aeea9b1807ddf1250ba6436d8dd276)) + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("mlg1paint.rom", 0x0000, 0x8000, CRC(64df1750) SHA1(5cf0abca6dbcf940bc33c433ecb4e4ada02fbfe6)) +ROM_END + +void msx2_state::mlg1(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: None, 0 drives + // S3527 MSX Engine + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 3, 0, 2, "firmware"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Mitsubishi ML-G3 */ + +ROM_START(mlg3) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mlg3bios.rom", 0x0000, 0x8000, CRC(0cc7f817) SHA1(e4fdf518a8b9c8ab4290c21b83be2c347965fc24)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("mlg3ext.rom", 0x0000, 0x4000, CRC(dc0951bd) SHA1(1e9a955943aeea9b1807ddf1250ba6436d8dd276)) + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("mlg3disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(b94ebc7a) SHA1(30ba1144c872a0bb1c91768e75a2c28ab1f4e3c6)) + + ROM_REGION(0x4000, "rs232", 0) + ROM_LOAD("mlg3rs232c.rom", 0x0000, 0x2000, CRC(849b325e) SHA1(b1ac74c2550d553579c1176f5dfde814218ec311)) + ROM_RELOAD(0x2000, 0x2000) +ROM_END + +void msx2_state::mlg3(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: wd2793?, 1 3.5" DSDD drive + // S-1985 MSX Engine + // 4 Cartridge slots (3 internal, 1 taken by RS232 board) + // S3527 + // RS232 with switch. What does the switch do? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N, "disk", 3, 0, 1, 2, "diskrom"); + add_cartridge_slot<3>(config, 3, 1); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + add_internal_slot_irq<4>(config, MSX_SLOT_RS232_MITSUBISHI, "rs232", 3, 3, 1, 1, "rs232"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Mitsubishi ML-G10 */ + +ROM_START(mlg10) + // ic8f - 00000210 - hn27256g-25 + // ic10f - 5j1 - hn613128p - m50 - t704p874h42-g + // ic11f - 5j1 - hn613256p - cn9 - t704p874h40-g + ROM_REGION(0xc000, "mainrom", 0) + ROM_LOAD("mlg10bios.rom", 0x0000, 0x8000, CRC(a27c563d) SHA1(c1e46c00f1e38fc9e0ab487bf0513bd93ce61f3f)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("mlg10ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("g10firm.rom", 0x0000, 0x8000, CRC(dd4007f9) SHA1(789bb6cdb2d1ed0348f36336da11b149d74e4d9f)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("mlg10kfn.rom", 0, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) +ROM_END + +void msx2_state::mlg10(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: None, 0 drives + // S3527 MSX Engine + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 3, 0, 2, "firmware"); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Mitsubishi ML-G30 Model 1 */ + +ROM_START(mlg30) + ROM_REGION(0x10000, "mainrom", 0) + ROM_LOAD("g30bios.rom", 0x0000, 0x8000, CRC(a27c563d) SHA1(c1e46c00f1e38fc9e0ab487bf0513bd93ce61f3f)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("g30ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("g30disk.rom", 0x0000, 0x4000, CRC(a90be8d5) SHA1(f7c3ac138918a493eb91628ed88cf37999059579)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("g30kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) +ROM_END + +void msx2_state::mlg30(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: wd2793/tc8566af?, 1 3.5" DSDD drives + // 4 Cartridge slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N, "disk", 3, 0, 1, 2, "diskrom"); + add_cartridge_slot<3>(config, 3, 1); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM + add_cartridge_slot<4>(config, 3, 3); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Mitsubishi ML-G30 Model 2 */ + +ROM_START(mlg30_2) + ROM_REGION(0x10000, "mainrom", 0) + ROM_LOAD("g30bios.rom", 0x0000, 0x8000, CRC(a27c563d) SHA1(c1e46c00f1e38fc9e0ab487bf0513bd93ce61f3f)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("g30ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("g30disk.rom", 0x0000, 0x4000, CRC(995e6bf6) SHA1(6069d63c68b03fa56de040fb5f52eeadbffe2a2c)) + + ROM_REGION(0x4000, "rs232", 0) + ROM_LOAD("g30rs232c.rom", 0x0000, 0x2000, CRC(15d6ba9e) SHA1(782e54cf88eb4a974631eaa707aad97d3eb1ea14)) + ROM_RELOAD(0x2000, 0x2000) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("g30kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) +ROM_END + +void msx2_state::mlg30_2(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: wd2793/tc8566af?, 2 3.5" DSDD drives + // 4 Cartridge slots (1 taken by RS232 board) + // S3527 + // RS232 with switch. What does the switch do? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N_2_DRIVES, "disk", 3, 0, 1, 2, "diskrom"); + add_cartridge_slot<3>(config, 3, 1); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM + add_internal_slot_irq<4>(config, MSX_SLOT_RS232_MITSUBISHI, "rs232", 3, 3, 1, 1, "rs232"); + + msx2(SND_YM2149, config); +} + +/* MSX2 - ML-TS100 (should be a separate driver) */ + +/* MSX2 - ML-TS100M2 (should be a separate driver) */ + +/* MSX2 - ML-TS2 */ + +/* MSX2 - NTT Captain Multi-Station (should be a separate driver due to the added V99C37-F) */ + +/* MSX2 - National FS-4500 */ + +ROM_START(fs4500) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("4500bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("4500ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "font", 0) + ROM_LOAD("4500font.rom", 0x0000, 0x4000, CRC(4bd54f95) SHA1(3ce8e35790eb4689b21e14c7ecdd4b63943ee158)) + + ROM_REGION(0x8000, "jukugo", 0) + ROM_LOAD("4500buns.rom", 0x0000, 0x8000, CRC(c9398e11) SHA1(e89ea1e8e583392e2dd9debb8a4b6a162f58ba91)) + + ROM_REGION(0x8000, "jusho", 0) + ROM_LOAD("4500jush.rom", 0x0000, 0x8000, CRC(4debfd2d) SHA1(6442c1c5cece64c6dae90cc6ae3675f070d93e06)) + + ROM_REGION(0xc000, "wordpro1", 0) + ROM_LOAD("4500wor1.rom", 0x0000, 0xc000, CRC(0c8b5cfb) SHA1(3f047469b62d93904005a0ea29092e892724ce0b)) + + ROM_REGION(0xc000, "wordpro2", 0) + ROM_LOAD("4500wor2.rom", 0x0000, 0xc000, CRC(d9909451) SHA1(4c8ea05c09b40c41888fa18db065575a317fda16)) + + ROM_REGION(0x4000, "kdr1", 0) + ROM_LOAD("4500kdr1.rom", 0x0000, 0x4000, CRC(f8c7f0db) SHA1(df07e89fa0b1c7874f9cdf184c136f964fea4ff4)) + + ROM_REGION(0x4000, "kdr2", 0) + ROM_LOAD("4500kdr2.rom", 0x0000, 0x4000, CRC(69e87c31) SHA1(c63db26660da96af56f8a7d3ea18544b9ae5a37c)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("4500kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) + + ROM_REGION(0x20000, "bunsetsu", 0) + ROM_LOAD("4500budi.rom", 0, 0x20000, CRC(f94590f8) SHA1(1ebb06062428fcdc66808a03761818db2bba3c73)) +ROM_END + +void msx2_state::fs4500(machine_config &config) +{ + // YM2149 (in S3527 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // S3527 MSX Engine + // Matsushita switched device + // 8KB SRAM (NEC D4364C-15L) + // Builtin thermal printer + // Switch to switch between JP50on and JIS keyboard layout + // Switch to switch between internal and external printer + // Switch to bypass the firmware + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "font", 0, 2, 0, 1, "font"); + add_internal_slot(config, MSX_SLOT_BUNSETSU, "jukugo", 0, 2, 1, 2, "jukugo").set_bunsetsu_region_tag("bunsetsu"); + add_internal_slot(config, MSX_SLOT_ROM, "jusho", 0, 3, 1, 2, "jusho"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "wordpro1", 3, 0, 0, 3, "wordpro1"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr1", 3, 0, 3, 1, "kdr1"); + add_internal_slot(config, MSX_SLOT_ROM, "wordpro2", 3, 1, 0, 3, "wordpro2"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr2", 3, 1, 3, 1, "kdr2"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + + MSX_MATSUSHITA(config, "matsushita", 0); + msx2(SND_YM2149, config); +} + +/* MSX2 - National FS-4600F */ + +ROM_START(fs4600f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("4600bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("4600ext.rom", 0x0000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("4600disk.rom", 0x0000, 0x4000, CRC(ae4e65b7) SHA1(073feb8bb645d935e099afaf61e6f04f52adee42)) + + ROM_REGION(0x4000, "font1", 0) + ROM_LOAD("4600fon1.rom", 0x0000, 0x4000, CRC(7391389b) SHA1(31292b9ca9fe7d1d8833530f44c0a5671bfefe4e)) + + ROM_REGION(0x4000, "font2", 0) + ROM_LOAD("4600fon2.rom", 0x0000, 0x4000, CRC(c3a6b445) SHA1(02155fc25c9bd23e1654fe81c74486351e1ecc28)) + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("4600kdr.rom", 0x0000, 0x8000, CRC(b2db6bf5) SHA1(3a9a942ed888dd641cddf8deada1879c454df3c6)) + + ROM_REGION(0x100000, "firmware", 0) + ROM_LOAD("4600firm.rom", 0x0000, 0x100000, CRC(1df57472) SHA1(005794c10a4237de3907ba4a44d436078d3c06c2)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("4600kfn.rom", 0, 0x20000, CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) + + /* Matsushita 12 dots Kanji ROM must be emulated */ + ROM_REGION(0x20000, "kanji12", 0) + ROM_LOAD("4600kf12.rom", 0, 0x20000, CRC(340d1ef7) SHA1(a7a23dc01314e88381eee88b4878b39931ab4818)) +ROM_END + +void msx2_state::fs4600f(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: mb8877a, 1 3.5" DSDD drive + // 2 Cartridge slots + // S-1985 MSX Engine + // 8KB SRAM (NEC D4364C-15L) + // Builtin thermal printer + // Switch to switch between JP50on and JIS keyboard layout + // Switch to switch between internal and external printer + // Switch to bypass the firmware + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "font1", 0, 2, 0, 1, "font1"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 0, 2, 1, 2, "kdr"); + add_internal_slot(config, MSX_SLOT_ROM, "font2", 0, 3, 0, 1, "font2"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_FS4600, "firmware", 3, 1, 0, 4, "firmware"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 128KB Mapper RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK2_MB8877, "disk", 3, 3, 1, 2, "diskrom"); + + msx_kanji12_device &kanji12(MSX_KANJI12(config, "kanji12", 0)); + kanji12.set_rom_start("kanji12"); + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - National FS-4700 */ + +ROM_START(fs4700f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("4700bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("4700ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "diskrom", 0) + // ic403 - disk basic - copyright mei - 1986 das4700j1 + ROM_LOAD("4700disk.rom", 0x0000, 0x4000, CRC(1e7d6512) SHA1(78cd7f847e77fd8cd51a647efb2725ba93f4c471)) + + ROM_REGION(0x4000, "font", 0) + ROM_LOAD("4700font.rom", 0x0000, 0x4000, CRC(4bd54f95) SHA1(3ce8e35790eb4689b21e14c7ecdd4b63943ee158)) + + ROM_REGION(0x8000, "jukugo", 0) + ROM_LOAD("4700buns.rom", 0x0000, 0x8000, CRC(c9398e11) SHA1(e89ea1e8e583392e2dd9debb8a4b6a162f58ba91)) + + ROM_REGION(0x8000, "jusho", 0) + ROM_LOAD("4700jush.rom", 0x0000, 0x8000, CRC(4debfd2d) SHA1(6442c1c5cece64c6dae90cc6ae3675f070d93e06)) + + ROM_REGION(0xc000, "wordpro1", 0) + ROM_LOAD("4700wor1.rom", 0x0000, 0xc000, CRC(5f39a727) SHA1(f5af1d2a8bcf247f78847e1a9d995e581df87e8e)) + + ROM_REGION(0xc000, "wordpro2", 0) + ROM_LOAD("4700wor2.rom", 0x0000, 0xc000, CRC(d9909451) SHA1(4c8ea05c09b40c41888fa18db065575a317fda16)) + + ROM_REGION(0x4000, "kdr1", 0) + ROM_LOAD("4700kdr1.rom", 0x0000, 0x4000, CRC(f8c7f0db) SHA1(df07e89fa0b1c7874f9cdf184c136f964fea4ff4)) + + ROM_REGION(0x4000, "kdr2", 0) + ROM_LOAD("4700kdr2.rom", 0x0000, 0x4000, CRC(69e87c31) SHA1(c63db26660da96af56f8a7d3ea18544b9ae5a37c)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("4700kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) + + ROM_REGION(0x20000, "bunsetsu", 0) + ROM_LOAD("4700budi.rom", 0, 0x20000, CRC(f94590f8) SHA1(1ebb06062428fcdc66808a03761818db2bba3c73)) +ROM_END + +void msx2_state::fs4700f(machine_config &config) +{ + // YM2149 (in S3527 MSX Engine) + // FDC: mb8877a, 1 3.5" DSDD drive + // 2 Cartridge slots + // S3527 MSX Engine + // Matsushita switched device + // 8KB SRAM (NEC D4364C-15L) + // Builtin thermal printer + // Switch to switch between JP50on and JIS keyboard layout + // Switch to switch between internal and external printer + // Switch to bypass the firmware + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "font", 0, 2, 0, 1, "font"); + add_internal_slot(config, MSX_SLOT_BUNSETSU, "buns", 0, 2, 1, 2, "jukugo").set_bunsetsu_region_tag("bunsetsu"); + add_internal_slot(config, MSX_SLOT_ROM, "jusho", 0, 3, 1, 2, "jusho"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "wordpro1", 3, 0, 0, 3, "wordpro1"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr1", 3, 0, 3, 1, "kdr1"); + add_internal_slot(config, MSX_SLOT_ROM, "wordpro2", 3, 1, 0, 3, "wordpro2"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr2", 3, 1, 3, 1, "kdr2"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK2_MB8877, "disk", 3, 3, 1, 2, "diskrom"); + + MSX_S1985(config, "s1985", 0); + + MSX_MATSUSHITA(config, "matsushita", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - National FS-5000F2 */ + +ROM_START(fs5000f2) + ROM_REGION(0x18000, "mainrom", ROMREGION_ERASEFF) + ROM_LOAD("5000bios.rom", 0x0000, 0x8000, CRC(a44ea707) SHA1(59967765d6e9328909dee4dac1cbe4cf9d47d315)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("5000ext.rom", 0x0000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("5000disk.rom", 0x0000, 0x4000, CRC(ae4e65b7) SHA1(073feb8bb645d935e099afaf61e6f04f52adee42)) + + ROM_REGION(0x8000, "setup", 0) + ROM_LOAD("5000rtc.rom", 0x0000, 0x8000, CRC(03351598) SHA1(98bbfa3ab07b7a5cad55d7ddf7cbd9440caa2a86)) + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("5000kdr.rom", 0x0000, 0x8000, CRC(b2db6bf5) SHA1(3a9a942ed888dd641cddf8deada1879c454df3c6)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("5000kfn.rom", 0, 0x20000, CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) +ROM_END + +void msx2_state::fs5000f2(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: wd2793, 2 3.5" DSDD drives + // 3 Expansion slots + // 2 Cartridge slots + // S-1985 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "cn904", 0, 1, 0, 4, "mainrom", 0x8000); // expansion slot + add_internal_slot(config, MSX_SLOT_ROM, "cn906", 0, 2, 0, 4, "mainrom", 0x8000); // expansion slot + add_internal_slot(config, MSX_SLOT_ROM, "cn907", 0, 3, 0, 4, "mainrom", 0x8000); // expansion slot + 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"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 0, 1, 2, "kdr"); + add_internal_slot(config, MSX_SLOT_ROM, "rtcrom", 3, 1, 1, 2, "setup"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 128KB Mapper RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK2_WD2793_2_DRIVES, "disk", 3, 3, 1, 2, "diskrom"); + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - National FS-5500F1 */ + +ROM_START(fs5500f1) + // ic206 + // OS1 ROM + // MATSUSHITA + // 1985 DAS5500A1 + // DFQT9062ZA + // MSL27256K + // + // ic208 + // HKN ROM + // MASTUSHITA + // 1985 DAS5500E1 + // DFQT9068ZA + // + // ic209 + // API ROM + // MATSUSHITA + // 1985 DAS500C1 + // DFQT9064ZA + // MSL27256K + // + // ic210 + // OS2 ROM + // MATSUSHITA + // 1985 DAS5500B1 + // DFQT9063ZA + // HN4827128G-25 + // + // ic211 + // FDC ROM + // MATSUSHITA + // 1985 DAS5500F1 + // DFQT9067ZA + // HN4827128G-25 + ROM_REGION(0x18000, "mainrom", ROMREGION_ERASEFF) + ROM_LOAD("5500bios.rom", 0x0000, 0x8000, CRC(5bf38e13) SHA1(44e0dd215b2a9f0770dd76fb49187c05b083eed9)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("5500ext.rom", 0x0000, 0x4000, CRC(3c42c367) SHA1(4be8371f3b03e70ddaca495958345f3c4f8e2d36)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("5500disk.rom", 0x0000, 0x4000, CRC(1e7d6512) SHA1(78cd7f847e77fd8cd51a647efb2725ba93f4c471)) + + ROM_REGION(0x8000, "impose", 0) + ROM_LOAD("5500imp.rom", 0x0000, 0x8000, CRC(6173a88c) SHA1(b677a861b67e8763a11d5dcf52416b42493ade57)) + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("5500kdr.rom", 0x0000, 0x8000, CRC(b2db6bf5) SHA1(3a9a942ed888dd641cddf8deada1879c454df3c6)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("tc531000p_6611.ic212", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) +ROM_END + +void msx2_state::fs5500f1(machine_config &config) +{ + // YM2149 in (S3527 MSX Engine) + // FDC: mb8877a, 1 3.5" DSDD drive + // 3 Expansion slots + // 2 Cartridge slots + // S3527 MSX Engine + // Matsushita switched device + // Switch to switch between JP50on and JIS keyboard layout + // Switch to bypass the firmware + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "cn904", 0, 1, 0, 4, "mainrom", 0x8000); // expansion slot + add_internal_slot(config, MSX_SLOT_ROM, "cn906", 0, 2, 0, 4, "mainrom", 0x8000); // expansion slot + add_internal_slot(config, MSX_SLOT_ROM, "cn908", 0, 3, 0, 4, "mainrom", 0x8000); // expansion slot + 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"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 0, 1, 2, "kdr"); + add_internal_slot(config, MSX_SLOT_ROM, "impose", 3, 1, 1, 2, "impose"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK2_MB8877, "disk", 3, 3, 1, 2, "diskrom"); + + MSX_MATSUSHITA(config, "matsushita", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - National FS-5500F2 */ + +ROM_START(fs5500f2) + ROM_REGION(0x18000, "mainrom", ROMREGION_ERASEFF) + ROM_LOAD("5500bios.rom", 0x0000, 0x8000, CRC(5bf38e13) SHA1(44e0dd215b2a9f0770dd76fb49187c05b083eed9)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("5500ext.rom", 0x0000, 0x4000, CRC(3c42c367) SHA1(4be8371f3b03e70ddaca495958345f3c4f8e2d36)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("5500disk.rom", 0x0000, 0x4000, CRC(1e7d6512) SHA1(78cd7f847e77fd8cd51a647efb2725ba93f4c471)) + + ROM_REGION(0x8000, "impose", 0) + ROM_LOAD("5500imp.rom", 0x0000, 0x8000, CRC(6173a88c) SHA1(b677a861b67e8763a11d5dcf52416b42493ade57)) + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("5500kdr.rom", 0x0000, 0x8000, CRC(b2db6bf5) SHA1(3a9a942ed888dd641cddf8deada1879c454df3c6)) + + ROM_REGION(0x20000, "kanji", 0) + // ic212 - tc531000p + ROM_LOAD("5500kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) +ROM_END + +void msx2_state::fs5500f2(machine_config &config) +{ + // YM2149 in (S3527 MSX Engine) + // FDC: mb8877a, 2 3.5" DSDD drives + // 3 Expansion slots + // 2 Cartridge slots + // S3527 MSX Engine + // Matsushita switched device + // Switch to switch between JP50on and JIS keyboard layout + // Switch to bypass the firmware + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "cn904", 0, 1, 0, 4, "mainrom", 0x8000); // expansion slot + add_internal_slot(config, MSX_SLOT_ROM, "cn906", 0, 2, 0, 4, "mainrom", 0x8000); // expansion slot + add_internal_slot(config, MSX_SLOT_ROM, "cn908", 0, 3, 0, 4, "mainrom", 0x8000); // expansion slot + 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"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 0, 1, 2, "kdr"); + add_internal_slot(config, MSX_SLOT_ROM, "impose", 3, 1, 1, 2, "impose"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK2_MB8877_2_DRIVES, "disk", 3, 3, 1, 2, "diskrom"); + + MSX_MATSUSHITA(config, "matsushita", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Panasonic FS-A1 */ + +ROM_START(fsa1) + ROM_REGION(0x20000, "mainrom", 0) + ROM_LOAD("fsa1.ic3", 0x00000, 0x20000, CRC(4d6dae42) SHA1(7bbe3f355d3129592268ae87f40ea7e3ced88f98)) +ROM_END + +void msx2_state::fsa1(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: None, 0 drives + // S1985 + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64 KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 2, "mainrom", 0x8000); + add_internal_slot(config, MSX_SLOT_ROM, "deskpac1", 3, 2, 1, 2, "mainrom", 0x10000); + add_internal_slot(config, MSX_SLOT_ROM, "deskpac2", 3, 3, 1, 2, "mainrom", 0x18000); + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Panasonic FS-A1 (a) */ + +ROM_START(fsa1a) + ROM_REGION(0x1c000, "maincpu", 0) + ROM_LOAD("a1bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + ROM_LOAD("a1ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) + ROM_LOAD("a1desk1a.rom", 0xc000, 0x8000, CRC(25b5b170) SHA1(d9307bfdaab1312d25e38af7c0d3a7671a9f716b)) + ROM_LOAD("a1desk2.rom", 0x14000, 0x8000, CRC(7f6f4aa1) SHA1(7f5b76605e3d898cc4b5aacf1d7682b82fe84353)) +ROM_END + +void msx2_state::fsa1a(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: None, 0 drives + // S1985 + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 2, "maincpu"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 0, 4); // 64KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); + add_internal_slot(config, MSX_SLOT_ROM, "desk1", 3, 2, 1, 2, "maincpu", 0xc000); + add_internal_slot(config, MSX_SLOT_ROM, "desk2", 3, 3, 1, 2, "maincpu", 0x14000); + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Panasonic FS-A1F */ + +ROM_START(fsa1f) + ROM_REGION(0x20000, "mainrom", 0) + ROM_LOAD("da1024d0365r.ic18", 0x00000, 0x20000, CRC(64a53ec8) SHA1(9a62d7a5ccda974261f7c0600476d85e10deb99b)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("da531p6616_0.ic17", 0, 0x20000, CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) // da531p6616-0 - tc531000ap-6616 +ROM_END + +void msx2_state::fsa1f(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: tc8566af, 1 3.5" DSDD drive + // S1985 + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "mainrom", 0x8000); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "mainrom", 0x10000); + add_internal_disk_mirrored(config, MSX_SLOT_DISK3_TC8566, "disk", 3, 2, 1, 2, "mainrom", 0xc000); + add_internal_slot(config, MSX_SLOT_ROM, "cockpit", 3, 3, 1, 2, "mainrom", 0x18000); + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Panasonic FS-A1FM */ + +ROM_START(fsa1fm) + // Everything should be in one rom?? + // da534p66220 - tc534000p-6620 - ic12 - 4mbit rom + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("a1fmbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("a1fmext.rom", 0x0000, 0x4000, CRC(ad295b5d) SHA1(d552319a19814494e3016de4b8f010e8f7b97e02)) + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("a1fmdisk.rom", 0x0000, 0x4000, BAD_DUMP CRC(e25cacca) SHA1(607cfca605eaf82e3efa33459d6583efb7ecc13b)) + + ROM_REGION(0x100000, "firmware", 0) + ROM_LOAD("a1fmfirm.rom", 0x000000, 0x100000, CRC(8ce0ece7) SHA1(f89e3d8f3b6855c29d71d3149cc762e0f6918ad5)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("a1fmkfn.rom", 0, 0x20000, CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) + + ROM_REGION(0x20000, "kanji12", 0) + ROM_LOAD("a1fmkf12.rom", 0, 0x20000, CRC(340d1ef7) SHA1(a7a23dc01314e88381eee88b4878b39931ab4818)) +ROM_END + +void msx2_state::fsa1fm(machine_config &config) +{ + // AY8910 (in T9769) + // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots + // T9769 + // 8KB SRAM + // Integrated 1200baud modem + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_FSA1FM, "modem", 3, 1, 1, 1, "firmware"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK3_TC8566, "disk", 3, 2, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_FSA1FM2, "firmware", 3, 3, 0, 3, "firmware"); + + msx_kanji12_device &kanji12(MSX_KANJI12(config, "kanji12", 0)); + kanji12.set_rom_start("kanji12"); + + msx2(SND_AY8910, config); +} + +/* MSX2 - Panasonic FS-A1MK2 */ + +ROM_START(fsa1mk2) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("a1mkbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("a1mk2ext.rom", 0x0000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) + + ROM_REGION(0x8000, "deskpac1", 0) + ROM_LOAD("a1mkcoc1.rom", 0x0000, 0x8000, CRC(0eda3f57) SHA1(2752cd89754c05abdf7c23cba132d38e3ef0f27d)) + + ROM_REGION(0x4000, "deskpac2", 0) + ROM_LOAD("a1mkcoc2.rom", 0x0000, 0x4000, CRC(756d7128) SHA1(e194d290ebfa4595ce0349ea2fc15442508485b0)) + + ROM_REGION(0x8000, "deskpac3", 0) + ROM_LOAD("a1mkcoc3.rom", 0x0000, 0x8000, CRC(c1945676) SHA1(a3f4e2e4934074925d775afe30ac72f150ede543)) +ROM_END + +void msx2_state::fsa1mk2(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: None, 0 drives + // 2 Cartridge slots + // S1985 + // pause button + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); // 64 KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "deskpac1", 3, 1, 1, 2, "deskpac1"); + add_internal_slot(config, MSX_SLOT_ROM, "deskpac2", 3, 2, 1, 1, "deskpac2"); + add_internal_slot(config, MSX_SLOT_ROM, "deskpac3", 3, 3, 1, 2, "deskpac3"); + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Philips HCS 280 */ + +/* MSX2 - Philips NMS 8220 - 2 possible sets (/00 /16) */ + +ROM_START(nms8220) + ROM_REGION(0x20000, "mainrom", 0) + ROM_LOAD("m531000-52_68503.u14", 0x0000, 0x20000, CRC(f506d7ab) SHA1(e761e7081c613ad4893a664334ce105841d0e80e)) + + ROM_REGION(0x4000, "designer", 0) + ROM_SYSTEM_BIOS(0, "v1308", "13-08-1986 Designer") + ROMX_LOAD("8220pena.u13", 0x0000, 0x4000, CRC(17817b5a) SHA1(5df95d033ae70b107697b69470126ce1b7ae9eb5), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "v1206", "12-06-1986 Designer") + ROMX_LOAD("8220pen.u13", 0x0000, 0x4000, CRC(3d38c53e) SHA1(cb754aed85b3e97a7d3c5894310df7ca18f89f41), ROM_BIOS(1)) +ROM_END + +void msx2_state::nms8220(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom", 0x10000); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 0, 1, "mainrom", 0x18000); + // Memory mapper blocks mirrored every 8 blocks: 4x ram, 4x empty, 4x ram, 4x empty, etc + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000).set_ramio_bits(0xf8); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "designer", 3, 3, 1, 1, "designer"); + add_internal_slot(config, MSX_SLOT_ROM, "designer_mirror", 3, 3, 2, 1, "designer"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips NMS 8245 - 2 possible sets (/00 /16) */ +/* /00 - A16 = 0 */ +/* /16 - A16 = 1 */ +/* /19 - Azerty keyboard */ + +ROM_START(nms8245) + ROM_REGION(0x10000, "mainrom", 0) + ROM_SYSTEM_BIOS(0, "v1.08", "v1.08") + ROMX_LOAD("v1_08.u7", 0x00000, 0x10000, CRC(69d5cbe6) SHA1(cc57c1dcd7249ea9f8e2547244592e7d97308ed0), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "v1.06", "v1.06") + ROMX_LOAD("v1_06.u7", 0x00000, 0x10000, CRC(be4ae17e) SHA1(cc57c1dcd7249ea9f8e2547244592e7d97308ed0), ROM_BIOS(1)) + ROM_SYSTEM_BIOS(2, "v1.05", "v1.05") + ROMX_LOAD("v1_05.u7", 0x00000, 0x10000, CRC(cef8895d) SHA1(cc57c1dcd7249ea9f8e2547244592e7d97308ed0), ROM_BIOS(2)) +ROM_END + +void msx2_state::nms8245(machine_config &config) +{ + // XTAL: 21328.1 (different from default) + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 0, 1, "mainrom", 0x8000); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 3, 1, 2, "mainrom", 0xc000); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips NMS 8245/19 */ + +ROM_START(nms8245f) + ROM_REGION(0x20000, "maincpu", 0) + ROM_LOAD("nms8245.u7", 0x0000, 0x20000, BAD_DUMP CRC(0c827d5f) SHA1(064e706cb1f12b99b329944ceeedc0efc3b2d9be)) +ROM_END + +void msx2_state::nms8245f(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 2, "maincpu", 0x10000); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "maincpu", 0x18000); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 3, 1, 2, "maincpu", 0x1c000); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips NMS 8245 Home Banking (Italy) */ + +/* MSX2 - Philips NMS 8250/00 */ + +ROM_START(nms8250) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("d23c256eac.ic119", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("d23128ec.ic118", 0x0000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_SYSTEM_BIOS(0, "v1.08", "v1.08 diskrom") + ROMX_LOAD("v1.08.ic117", 0x0000, 0x4000, CRC(61f6fcd3) SHA1(dab3e6f36843392665b71b04178aadd8762c6589), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "unknown", "Unknown version diskrom") + ROMX_LOAD("jq00014.ic117", 0x0000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef), ROM_BIOS(1)) +ROM_END + +void msx2_state::nms8250(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + // ROM is mirrored in all 4 pages + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom1", 3, 0, 1, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom2", 3, 0, 2, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom3", 3, 0, 3, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + // ROM is not mirrored but the FDC registers are in all pages + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 3, 1, 2, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips NMS 8250/16 */ + +ROM_START(nms8250_16) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("bios.ic119", 0x0000, 0x8000, CRC(5e3caf18) SHA1(ee0d8ccfc247368078d27183c34b3a5c0f4ae0f1)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("sub.ic118", 0x0000, 0x4000, CRC(0a0aeb2f) SHA1(b83770cca8453a153d7e260070a3a3c059d64ed3)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("jq00014.ic117", 0x0000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) +ROM_END + +/* MSX2 - Philips NMS 8250/19 */ + +ROM_START(nms8250_19) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("nms8250fbios.ic119", 0x0000, 0x8000, CRC(bee21533) SHA1(d18694e9e7040b2851fe985cefb89766868a2fd3)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("nms8250fext.ic118", 0x0000, 0x4000, CRC(781ba055) SHA1(fd4bcc81a8160a1dea06036c5f79d200f948f4d6)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("nms8250fdisk.ic117", 0x0000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) +ROM_END + +/* MSX2 - Philips NMS 8255 */ + +ROM_START(nms8255) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("8255bios.rom.ic119", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("8255ext.rom.ic118", 0x0000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("8255disk.rom.ic117", 0x0000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) +ROM_END + +void msx2_state::nms8255(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793, 2 3.5" DSDD drives + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + // ROM is mirrored in all 4 pages + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom1", 3, 0, 1, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom2", 3, 0, 2, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom3", 3, 0, 3, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + // ROM is not mirrored but the FDC registers are in all pages + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_2_DRIVES, "disk", 3, 3, 1, 2, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips NMS 8255/19 */ + +ROM_START(nms8255f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("nms8255fbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(5cd35ced) SHA1(b034764e6a8978db60b1d652917f5e24a66a7925)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("nms8255fext.rom", 0x0000, 0x4000, BAD_DUMP CRC(781ba055) SHA1(fd4bcc81a8160a1dea06036c5f79d200f948f4d6)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("nms8255fdisk.rom", 0x0000, 0x4000, BAD_DUMP CRC(13b60725) SHA1(58ba1887e8fd21c912b6859cae6514bd874ffcca)) // need verification +ROM_END + +void msx2_state::nms8255f(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793, 2 3.5" DSDD drives + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_2_DRIVES, "disk", 3, 3, 1, 2, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips NMS 8260 */ +/* Prototype created by JVC for Philips. Based on an NMS-8250 with the floppy drive removed and replaced with a 20MB JVC harddisk */ + +ROM_START(nms8260) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("nms8260bios.rom", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("nms8260ext.rom", 0x0000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("nms8260disk.rom", 0x0000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) + + ROM_REGION(0x4000, "hddrom", 0) + ROM_LOAD("nms8260hdd.rom", 0x0000, 0x4000, CRC(0051afc3) SHA1(77f9fe964f6d8cb8c4af3b5fe63ce6591d5288e6)) +ROM_END + +void msx2_state::nms8260(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793, 0 3.5" DSDD drives + // 2 Cartridge slots + // S-3527 MSX Engine + // HDD + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_ROM, "hddrom", 2, 1, 1, "hddrom"); + // ROM is mirrored in all 4 pages + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom1", 3, 0, 1, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom2", 3, 0, 2, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom3", 3, 0, 3, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + // There is actually only an FDC inside with a floppy controller to attach an external floppy drive + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_0, "disk", 3, 3, 1, 2, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips NMS 8280 - 5 possible sets (/00 /02 /09 /16 /19) */ + +ROM_START(nms8280) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("8280bios.rom.ic119", 0x0000, 0x8000, BAD_DUMP CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("8280ext.rom.ic118", 0x0000, 0x4000, BAD_DUMP CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("8280disk.rom.ic117", 0x0000, 0x4000, BAD_DUMP CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) // need verification +ROM_END + +void msx2_state::nms8280(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: wd2793, 2 3.5" DSDD drives + // 2 Cartridge slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_2_DRIVES, "disk", 3, 3, 1, 2, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips NMS 8280F */ + +ROM_START(nms8280f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("8280fbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(5cd35ced) SHA1(b034764e6a8978db60b1d652917f5e24a66a7925)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("8280fext.rom", 0x0000, 0x4000, BAD_DUMP CRC(781ba055) SHA1(fd4bcc81a8160a1dea06036c5f79d200f948f4d6)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("8280fdisk.rom", 0x0000, 0x4000, BAD_DUMP CRC(13b60725) SHA1(58ba1887e8fd21c912b6859cae6514bd874ffcca)) // need verification +ROM_END + +void msx2_state::nms8280f(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: wd2793, 2 3.5" DSDD drives + // 2 Cartridge slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_2_DRIVES, "disk", 3, 3, 1, 2, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips NMS 8280G */ + +ROM_START(nms8280g) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("8280gbios.rom.ic119", 0x0000, 0x8000, BAD_DUMP CRC(8fa060e2) SHA1(b17d9bea0eb16a1aa2d0ccbd7c9488da9f57698e)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("8280gext.rom.ic118", 0x0000, 0x4000, BAD_DUMP CRC(41e36d03) SHA1(4ab7b2030d022f5486abaab22aaeaf8aa23e05f3)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("8280gdisk.rom.ic117", 0x0000, 0x4000, BAD_DUMP CRC(d0beebb8) SHA1(d1001f93c87ff7fb389e418e33bf7bc81bdbb65f)) // need verification +ROM_END + +void msx2_state::nms8280g(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: wd2793, 2 3.5" DSDD drives + // 2 Cartridge slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_2_DRIVES, "disk", 3, 3, 1, 2, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips VG-8230 (u11 - exp, u12 - basic, u13 - disk */ + +ROM_START(vg8230) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("8230bios.rom.u12", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("8230ext.rom.u11", 0x0000, 0x4000, CRC(8f84f783) SHA1(3288894e1be6af705871499b23c85732dbc40993)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("8230disk.rom.u13", 0x0000, 0x4000, CRC(7639758a) SHA1(0f5798850d11b316a4254b222ca08cc4ad6d4da2)) +ROM_END + +void msx2_state::vg8230(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793, 1 3.5" SSDD drive + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + add_internal_disk(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 3, 1, 1, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips VG-8235 (/00 and /20) */ +/* 9 versions: + * /00 NL,BE QWERTY 2.0 + * /02 DE QWERTZ 2.0 + * /16 ES QWERTY with ñ 2.0 + * /19 FR,BE AZERTY 2.0 + * /20 NL,BE QWERTY 2.1 + * /22 DE QWERTZ 2.1 + * /29 DE QWERTZ 2.1 + * /36 ES QWERTY with ñ 2.1 + * /39 FR,BE AZERTY 2.1 + */ + +ROM_START(vg8235) + ROM_SYSTEM_BIOS(0, "r20", "VG8235/20") + ROM_SYSTEM_BIOS(1, "r00", "VG8235/00") + + ROM_REGION(0x8000, "mainrom", 0) + ROMX_LOAD("8235_20.u48", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e), ROM_BIOS(0)) + ROMX_LOAD("8235_00.u48", 0x0000, 0x8000, CRC(f05ed518) SHA1(5e1a4bd6826b29302a1eb88c340477e7cbd0b50a), ROM_BIOS(1)) + + ROM_REGION(0x4000, "subrom", 0) + ROMX_LOAD("8235_20.u49", 0x0000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02), ROM_BIOS(0)) + ROMX_LOAD("8235_00.u49", 0x0000, 0x4000, CRC(474439d1) SHA1(c289dad246364e2dd716c457ca5eecf98e76c9ab), ROM_BIOS(1)) + + ROM_REGION(0x4000, "diskrom", 0) + // Different versions might exist and mixed between /00 and /20 + ROMX_LOAD("8235_20.u50", 0x0000, 0x4000, CRC(0efbea8a) SHA1(1ee2abc68a81ae7e39548985021b6532f31171b2), ROM_BIOS(0)) + ROMX_LOAD("8235_00.u50", 0x0000, 0x4000, CRC(f39342ce) SHA1(7ce255ab63ba79f81d8b83d66f1108062d0b61f1), ROM_BIOS(1)) +ROM_END + +void msx2_state::vg8235(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793, 1 3.5" SSDD drive + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 3, 1, 2, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips VG-8235F (/19 and /39) */ + +ROM_START(vg8235f) + ROM_SYSTEM_BIOS(0, "r39", "VG8235/39") + ROM_SYSTEM_BIOS(1, "r19", "VG8235/19") + + ROM_REGION(0x8000, "mainrom", 0) + ROMX_LOAD("8235_39.u48", 0x0000, 0x8000, CRC(5cd35ced) SHA1(b034764e6a8978db60b1d652917f5e24a66a7925), ROM_BIOS(0)) + ROMX_LOAD("8235_19.u48", 0x0000, 0x8000, BAD_DUMP CRC(c0577a50) SHA1(3926cdd91fa89657a811463e48cfbdb350676e51), ROM_BIOS(1)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROMX_LOAD("8235_39.u49", 0x0000, 0x4000, CRC(781ba055) SHA1(fd4bcc81a8160a1dea06036c5f79d200f948f4d6), ROM_BIOS(0)) + ROMX_LOAD("8235_19.u49", 0x0000, 0x4000, BAD_DUMP CRC(e235d5c8) SHA1(792e6b2814ab783d06c7576c1e3ccd6a9bbac34a), ROM_BIOS(1)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROMX_LOAD("8235_39.u50", 0x0000, 0x4000, CRC(768549a9) SHA1(959060445e92eb980ddd9df3ef9cfefcae2de1d0), ROM_BIOS(0)) + ROMX_LOAD("8235_19.u50", 0x0000, 0x4000, BAD_DUMP CRC(768549a9) SHA1(959060445e92eb980ddd9df3ef9cfefcae2de1d0), ROM_BIOS(1)) // need verification +ROM_END + +void msx2_state::vg8235f(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793, 1 3.5" SSDD drive + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_SS, "disk", 3, 3, 1, 2, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Philips VG-8240 (unreleased) */ + +ROM_START(vg8240) + ROM_REGION(0x10000, "mainrom", 0) + ROM_LOAD("8240bios.rom", 0x0000, 0x8000, CRC(6cdaf3a5) SHA1(6103b39f1e38d1aa2d84b1c3219c44f1abb5436e)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("8240ext.rom", 0x0000, 0x4000, CRC(66237ecf) SHA1(5c1f9c7fb655e43d38e5dd1fcc6b942b2ff68b02)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("8240disk.rom", 0x0000, 0x4000, CRC(ca3307d3) SHA1(c3efedda7ab947a06d9345f7b8261076fa7ceeef)) +ROM_END + +void msx2_state::vg8240(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots? + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 3, 1, 2, "diskrom"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Phonola NMS 8245 */ + +/* MSX2 - Phonola NMS 8280 */ + +/* MSX2 - Phonola VG-8235 */ + +/* MSX2 - Pioneer UC-V102 */ + +ROM_START(ucv102) + ROM_REGION(0x8000, "mainrom", 0) + // Machine is not supposed to display the MSX logo on startup + ROM_LOAD("uc-v102bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(a27c563d) SHA1(c1e46c00f1e38fc9e0ab487bf0513bd93ce61f3f)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("uc-v102sub.rom", 0x0000, 0x4000, BAD_DUMP CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) + + ROM_REGION(0x4000, "rs232", ROMREGION_ERASEFF) + ROM_LOAD("uc-v102rs232.rom", 0x0000, 0x2000, CRC(7c6790fc) SHA1(a4f19371fd09b73f2776cb637b0e9cbd8415f8eb)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("uc-v102disk.rom", 0x0000, 0x4000, CRC(a90be8d5) SHA1(f7c3ac138918a493eb91628ed88cf37999059579)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("kanjifont.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) +ROM_END + +void msx2_state::ucv102(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: wd1793, 2 3.5" DSDD drives + // 1 Cartridge slots + // S1985 + // RS232 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + add_cartridge_slot<1>(config, 1); + add_internal_slot_irq<2>(config, MSX_SLOT_RS232, "rs232", 2, 1, 1, "rs232"); + // Expansion slot 1 connects to slots 2-1 and 3-1 (2x 50 pin) + // Expansion slot 2 connects to slots 2-2 and 3-2 (2x 50 pin) + // Expansion slot 3 connects to slots 2-3 and 3-3 (2x 50 pin) + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_FD1793, "disk", 3, 1, 2, "diskrom"); // Mitsubishi MSW1793 + + MSX_S1985(config, "s1985", 0); + + m_hw_def.has_cassette(false); + msx2(SND_YM2149, config); +} + +/* MSX2 - Sakhr AX-350 */ + +ROM_START(ax350) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ax350bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(ea306155) SHA1(35195ab67c289a0b470883464df66bc6ea5b00d3)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("ax350ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(7c7540b7) SHA1(ebb76f9061e875365023523607db610f2eda1d26)) // need verification + + ROM_REGION(0x8000, "arabic", 0) + ROM_LOAD("ax350arab.rom", 0x0000, 0x8000, BAD_DUMP CRC(c0d8fc85) SHA1(2c9600c6e0025fee10d249e97448ecaa37e38c42)) // need verification + + ROM_REGION(0x8000, "swp", 0) + ROM_LOAD("ax350swp.rom", 0x0000, 0x8000, BAD_DUMP CRC(076f40fc) SHA1(4b4508131dca6d811694ae6379f41364c477de58)) // need verification + + ROM_REGION(0x10000, "painter", 0) + ROM_LOAD("ax350paint.rom", 0x0000, 0x10000, BAD_DUMP CRC(18956e3a) SHA1(ace202e87337fbc54fea21e22c0b3af0abe6f4ae)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("ax350disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(1e7d6512) SHA1(78cd7f847e77fd8cd51a647efb2725ba93f4c471)) // need verification +ROM_END + +void msx2_state::ax350(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: wd2793/tc8566af?, 1 3.5" DSDD drive + // 2 Cartridge slots + // S1985 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "arabic", 0, 1, 1, 2, "arabic"); + add_internal_slot(config, MSX_SLOT_ROM, "swp", 0, 2, 1, 2, "swp"); + add_internal_slot(config, MSX_SLOT_ROM, "painter", 0, 3, 0, 4, "painter"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_disk_mirrored(config, MSX_SLOT_DISK2_WD2793, "disk", 3, 1, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + + MSX_S1985(config, "s1985", 0); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sakhr AX-350 II */ + +ROM_START(ax350ii) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ax350iibios.rom", 0x0000, 0x8000, CRC(ea306155) SHA1(35195ab67c289a0b470883464df66bc6ea5b00d3)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("ax350iiext.rom", 0x0000, 0x4000, CRC(7c7540b7) SHA1(ebb76f9061e875365023523607db610f2eda1d26)) + + ROM_REGION(0x8000, "arabic", 0) + ROM_LOAD("ax350iiarab.rom", 0x0000, 0x8000, CRC(e62f9bc7) SHA1(f8cd4c05083decfc098cff077e055a4ae1e91a73)) + + ROM_REGION(0x8000, "swp", 0) + ROM_LOAD("ax350iiword.rom", 0x0000, 0x8000, CRC(307ae37c) SHA1(3a74e73b94d066b0187feb743c5eceddf0c61c2b)) + + ROM_REGION(0x10000, "painter", 0) + ROM_LOAD("ax350iipaint.rom", 0x0000, 0x10000, CRC(18956e3a) SHA1(ace202e87337fbc54fea21e22c0b3af0abe6f4ae)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("ax350iidisk.rom", 0x0000, 0x4000, CRC(d07782a6) SHA1(358e69f427390041b5aa28018550a88f996bddb6)) +ROM_END + +void msx2_state::ax350ii(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: wd2793/tc8566af?, 1 3.5" DSDD drive (mb8877a in pcb picture) + // 2 Cartridge slots + // S1985 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "arabic", 0, 1, 1, 2, "arabic"); + add_internal_slot(config, MSX_SLOT_ROM, "swp", 0, 2, 1, 2, "swp"); + add_internal_slot(config, MSX_SLOT_ROM, "painter", 0, 3, 0, 4, "painter"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + // mirroring not confirmed + add_internal_disk_mirrored(config, MSX_SLOT_DISK8_MB8877, "disk", 3, 1, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + + MSX_S1985(config, "s1985", 0); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sakhr AX-350 II F */ + +ROM_START(ax350iif) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ax350iifbios.rom", 0x0000, 0x8000, CRC(5cd35ced) SHA1(b034764e6a8978db60b1d652917f5e24a66a7925)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("ax350iifext.rom", 0x0000, 0x4000, CRC(16afa2e9) SHA1(4cbceba8f37f08272b612b6fc212eeaf379da9c3)) + + ROM_REGION(0x8000, "arabic", 0) + ROM_LOAD("ax350iifarab.rom", 0x0000, 0x8000, CRC(a64c3192) SHA1(5077b9c86ce1dc0a22c71782dac7fb3ca2a467e0)) + + ROM_REGION(0x8000, "swp", 0) + ROM_LOAD("ax350iifword.rom", 0x0000, 0x8000, CRC(097fd8ca) SHA1(54ff13b58868018fcd43c916b8d7c7200ebdcabe)) + + ROM_REGION(0x10000, "painter", 0) + ROM_LOAD("ax350iifpaint.rom", 0x0000, 0x10000, CRC(18956e3a) SHA1(ace202e87337fbc54fea21e22c0b3af0abe6f4ae)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("ax350iifdisk.rom", 0x0000, 0x4000, CRC(5eb46cd5) SHA1(bd0ad648d728c691fcee08eaaaa95e15e29c0d0d)) +ROM_END + +void msx2_state::ax350iif(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: wd2793/tc8566af?, 1 3.5" DSDD drive (mb8877a in pcb picture) + // 2 Cartridge slots + // S1985 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "arabic", 0, 1, 1, 2, "arabic"); + add_internal_slot(config, MSX_SLOT_ROM, "swp", 0, 2, 1, 2, "swp"); + add_internal_slot(config, MSX_SLOT_ROM, "painter", 0, 3, 0, 4, "painter"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + // mirroring not confirmed + add_internal_disk_mirrored(config, MSX_SLOT_DISK8_MB8877, "disk", 3, 1, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + + MSX_S1985(config, "s1985", 0); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sakhr AX-370 */ + +ROM_START(ax370) + ROM_REGION(0x30000, "mainrom", 0) + ROM_LOAD("ax370bios.rom", 0x0000, 0x8000, CRC(ea306155) SHA1(35195ab67c289a0b470883464df66bc6ea5b00d3)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("ax370ext.rom", 0x0000, 0x4000, CRC(3c011d12) SHA1(ee9c6a073766bef2220a57372f5c0dbfc6e55c8c)) + + ROM_REGION(0x8000, "arabic", 0) + ROM_LOAD("ax370arab.rom", 0x0000, 0x8000, CRC(66c2c71e) SHA1(0c08e799a7cf130ae2b9bc93f28bd4959cee6fdc)) + + ROM_REGION(0x8000, "swp", 0) + ROM_LOAD("ax370swp.rom", 0x0000, 0x8000, CRC(076f40fc) SHA1(4b4508131dca6d811694ae6379f41364c477de58)) + + ROM_REGION(0x8000, "sakhr", 0) + ROM_LOAD("ax370sakhr.rom", 0x0000, 0x8000, CRC(71a356ce) SHA1(8167117a003824220c36775682acbb36b3733c5e)) + + ROM_REGION(0x10000, "painter", 0) + ROM_LOAD("ax370paint.rom", 0x00000, 0x10000, CRC(0394cb41) SHA1(1c9a5867d39f6f02a0a4ef291904623e2521c2c5)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("ax370disk.rom", 0x0000, 0x4000, CRC(db7f1125) SHA1(9efa744be8355675e7bfdd3976bbbfaf85d62e1d)) +ROM_END + +void msx2_state::ax370(machine_config &config) +{ + // AY8910 (in T9769B) + // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots + // V9958 + // T9769B + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "arabic", 0, 1, 1, 2, "arabic"); + add_internal_slot(config, MSX_SLOT_ROM, "swp", 0, 2, 1, 2, "swp"); + add_internal_slot(config, MSX_SLOT_ROM, "sakhr", 0, 3, 1, 2, "sakhr"); + 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"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK3_TC8566, "disk", 3, 0, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_ROM, "painter", 3, 1, 0, 4, "painter"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x20000).set_ramio_bits(0xf8); // 128KB Mapper RAM + + msx2plus_pal(SND_AY8910, config); +} + +/* MSX2 - Sakhr AX-500 */ + +ROM_START(ax500) + ROM_REGION(0x30000, "mainrom", 0) + ROM_LOAD("ax500bios.rom", 0x0000, 0x8000, CRC(0a6e2e13) SHA1(dd1b577ea3ea69de84a68d311261392881f9eac3)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("ax500ext.rom", 0x0000, 0x4000, CRC(c9186a21) SHA1(7f86af13e81259a0db8f70d8a7e026fb918ee652)) + + ROM_REGION(0x8000, "arabic", 0) + ROM_LOAD("ax500arab.rom", 0x0000, 0x8000, CRC(11830686) SHA1(92bac0b2995f54f0eebf167cd447361a6a4923eb)) + + ROM_REGION(0x8000, "swp", 0) + ROM_LOAD("ax500swp.rom", 0x0000, 0x8000, CRC(17ed0610) SHA1(8674d000a52ec01fd80c8cb7cbaa66d4c3ca5cf7)) + + ROM_REGION(0xc000, "sakhr", 0) + ROM_LOAD("ax500sakhr.rom", 0x0000, 0xc000, CRC(bee11490) SHA1(8e889999ecec302f05d3bd0a0f127b489fcf3739)) + + ROM_REGION(0x10000, "painter", 0) + ROM_LOAD("ax500paint.rom", 0x00000, 0x10000, CRC(c32ea7ec) SHA1(80872d997d18e1a633e70b9da35a0d28113073e5)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("ax500disk.rom", 0x0000, 0x4000, CRC(a7d7746e) SHA1(a953bef071b603d6280bdf7ab6249c2e6f1a4cd8)) +ROM_END + +void msx2_state::ax500(machine_config &config) +{ + // YM2149 (in S9185) + // FDC: wd2793?, 2 3.5" DSDD drives + // 2 Cartridge slots + // S1985 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "arabic", 0, 1, 1, 2, "arabic"); + add_internal_slot(config, MSX_SLOT_ROM, "swp", 0, 2, 1, 2, "swp"); + add_internal_slot(config, MSX_SLOT_ROM, "sakhr", 0, 3, 1, 2, "sakhr"); + 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"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK8_WD2793_2_DRIVES, "disk", 3, 0, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_ROM, "painter", 3, 1, 0, 4, "painter"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x40000).set_ramio_bits(0xf8); // 256KB Mapper RAM + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "module", 3, 3, msx_yamaha_60pin, nullptr); + + MSX_S1985(config, "s1985", 0); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sanyo MPC-2300 */ + +ROM_START(mpc2300) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("2300bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(e7d08e29) SHA1(0f851ee7a1cf79819f61cc89e9948ee72a413802)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("2300ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(3d7dc718) SHA1(e1f834b28c3ee7c9f79fe6fbf2b23c8a0617892b)) // need verification +ROM_END + +void msx2_state::mpc2300(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: None, 0 drives + // 2 Cartridge slots? + // S1985 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000); // 128KB?? Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sanyo MPC-2500FD */ + +ROM_START(mpc2500f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mpc2500fdbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(e7d08e29) SHA1(0f851ee7a1cf79819f61cc89e9948ee72a413802)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("mpc2500fdext.rom", 0x0000, 0x4000, BAD_DUMP CRC(3d7dc718) SHA1(e1f834b28c3ee7c9f79fe6fbf2b23c8a0617892b)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("mpc2500fddisk.rom", 0x0000, 0x4000, BAD_DUMP CRC(38454059) SHA1(58ac78bba29a06645ca8d6a94ef2ac68b743ad32)) // need verification +ROM_END + +void msx2_state::mpc2500f(machine_config &config) +{ + // YM2149 + // FDC: wd2793?, 1? 3.5" DSDD drive? + // 2 Cartridge slots? + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 2, 0, 1, "subrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 1, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x10000); // 64KB?? Mapper RAM + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sanyo MPC-25F */ + +/* MSX2 - Sanyo MPC-25FD */ + +ROM_START(mpc25fd) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("25fdbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("25fdext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("25fddisk.rom", 0x0000, 0x4000, CRC(1a91f241) SHA1(bdbc75aacba4ea0f359694f304ae436914733460)) +ROM_END + +void msx2_state::mpc25fd(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793, 1 drive + // 1 Cartridge slot (slot 1) + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 2, 3, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom_mirror1", 2, 3, 1, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom_mirror2", 2, 3, 2, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom_mirror3", 2, 3, 3, 1, "subrom"); + // Mirrored in all 4 pages (only rom or also registers?) + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 1, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sanyo MPC-25FK */ + +/* MSX2 - Sanyo MPC-25FS */ + +ROM_START(mpc25fs) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("25fdbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("25fdext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("25fddisk.rom", 0x0000, 0x4000, CRC(0fa7b10e) SHA1(50f4098a77e7af7093e29cc8683d2b34b2d07b13)) +ROM_END + +void msx2_state::mpc25fs(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793, 1 drive + // 1 Cartridge slot (slot 1) + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 2, 3, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom_mirror1", 2, 3, 1, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom_mirror2", 2, 3, 2, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom_mirror3", 2, 3, 3, 1, "subrom"); + // Mirrored in all 4 pages (only rom or also registers?) + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_SS, "disk", 3, 1, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sanyo Wavy MPC-27 */ + +ROM_START(mpc27) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("mpc27bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("mpc27ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(90ca25b5) SHA1(fd9fa78bac25aa3c0792425b21d14e364cf7eea4)) // need verificaiton + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("mpc27disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(38454059) SHA1(58ac78bba29a06645ca8d6a94ef2ac68b743ad32)) // need verification + + ROM_REGION(0x4000, "lpen", 0) + ROM_LOAD("mlp27.rom", 0x0000, 0x2000, BAD_DUMP CRC(8f9e6ba0) SHA1(c3a47480c9dd2235f40f9a53dab68e3c48adca01)) // need verification + ROM_RELOAD(0x2000, 0x2000) +ROM_END + +void msx2_state::mpc27(machine_config &config) +{ + // YM2149 (in S-3527 MSX Engine) + // FDC: wd2793?, 1 drive + // 2 Cartridge slots? + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000); // 128KB?? RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_SS, "disk", 3, 2, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_ROM, "lpen", 3, 3, 1, 1, "lpen"); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sanyo PCT-100 */ + +/* MSX2 - Sanyo PHC-23 - "Wavy23" (and PHC-23J with different keyboard layout) */ + +ROM_START(phc23) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("23bios.rom", 0x0000, 0x8000, CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("23ext.rom", 0x0000, 0x4000, CRC(90ca25b5) SHA1(fd9fa78bac25aa3c0792425b21d14e364cf7eea4)) +ROM_END + +void msx2_state::phc23(machine_config &config) +{ + // YM2149 (in S3527 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // S3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sanyo PHC-23J(B) / PHC-23J(GR) - "Wavy23" */ + +ROM_START(phc23jb) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("23bios.rom", 0x0000, 0x8000, CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("23ext.rom", 0x0000, 0x4000, CRC(90ca25b5) SHA1(fd9fa78bac25aa3c0792425b21d14e364cf7eea4)) +ROM_END + +void msx2_state::phc23jb(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // S-1985 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + + MSX_S1985(config, "s1985", 0); + msx2(SND_YM2149, config); +} + +/* MSX2 - Sanyo Wavy PHC-55FD2 */ + +ROM_START(phc55fd2) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("phc55fd2bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("phc55fd2ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(90ca25b5) SHA1(fd9fa78bac25aa3c0792425b21d14e364cf7eea4)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("phc55fd2disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(38454059) SHA1(58ac78bba29a06645ca8d6a94ef2ac68b743ad32)) // need verification +ROM_END + +void msx2_state::phc55fd2(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: wd2793?, 2 3.5" DSDD drives + // 2 Cartridge slots + // S-1985 MSX Engine + // T9763 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000); // 128KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_2_DRIVES, "disk", 3, 2, 1, 2, "diskrom"); + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sanyo Wavy PHC-77 */ + +ROM_START(phc77) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("phc77bios.rom", 0x0000, 0x8000, CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("phc77ext.rom", 0x0000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("phc77disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(7c79759a) SHA1(a427b0c9a344c87b587568ecca7fee0abbe72189)) // Floppy registers visible in dump + + ROM_REGION(0x80000, "msxwrite", 0) + ROM_LOAD("phc77msxwrite.rom", 0x00000, 0x80000, CRC(ef02e4f3) SHA1(4180544158a57c99162269e33e4f2c77c9fce84e)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("phc77kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) +ROM_END + +void msx2_state::phc77(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: wd2793?, 1 drive; looks like mb8877a + // 1 Cartridge slot + // S-1985 MSX Engine + // SRAM? + // Builtin printer + // Switch to turn off firmware + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_MSX_WRITE, "msxwrite", 2, 1, 2, "msxwrite"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 0, 1, "subrom"); + add_internal_disk(config, MSX_SLOT_DISK9_WD2793_N, "disk", 3, 0, 1, 1, "diskrom"); + add_cartridge_slot<2>(config, 3, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 3, 0, 4); // 64KB RAM + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sharp Epcom HotBit 2.0 - is this an officially released machine? */ + +ROM_START(hotbit20) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hb2bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(0160e8c9) SHA1(d0cfc35f22b150a1cb10decae4841dfe63b78251)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("hb2ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(08ced880) SHA1(4f2a7e0172f0214f025f23845f6e053d0ffd28e8)) // need verification + + ROM_REGION(0x4000, "xbasic", 0) + ROM_LOAD("xbasic2.rom", 0x0000, 0x4000, BAD_DUMP CRC(2825b1a0) SHA1(47370bec7ca1f0615a54eda548b07fbc0c7ef398)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("microsoldisk.rom", 0x0000, 0x4000, BAD_DUMP CRC(6704ef81) SHA1(a3028515ed829e900cc8deb403e17b09a38bf9b0)) // need verification +ROM_END + +void msx2_state::hotbit20(machine_config &config) +{ + // AY8910/YM2149? + // FDC: microsol, 1 or 2 drives? + // 2 Cartridge slots? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1, 0); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 1, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "xbasic", 1, 1, 1, 1, "xbasic"); + add_internal_disk(config, MSX_SLOT_DISK5_WD2793, "disk", 1, 3, 1, 1, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 128KB Mapper RAM + add_cartridge_slot<2>(config, 3); + + msx2_pal(SND_AY8910, config); +} + +/* MSX2 - Sony HB-F1 */ + +ROM_START(hbf1) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("f1bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("f1ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "firmware1", 0) + ROM_LOAD("f1note1.rom", 0x0000, 0x4000, CRC(84810ea8) SHA1(9db72bb78792595a12499c821048504dc96ef848)) + + ROM_REGION(0x8000, "firmware2", 0) + ROM_LOAD("f1note2.rom", 0x0000, 0x8000, CRC(e32e5ee0) SHA1(aa78fc9bcd2343f84cf790310a768ee47f90c841)) + + ROM_REGION(0x8000, "firmware3", 0) + ROM_LOAD("f1note3.rom", 0x0000, 0x8000, CRC(73eb9329) SHA1(58accf41a90693874b86ce98d8d43c27beb8b6dc)) +ROM_END + +void msx2_state::hbf1(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: None, 0 drives + // 2 Cartridge slots + // S1985 + // pause button + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware1", 3, 0, 1, 1, "firmware1"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware2", 3, 1, 1, 2, "firmware2"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware3", 3, 2, 1, 2, "firmware3"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 3, 0, 4); // 64KB RAM + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F1II */ + +ROM_START(hbf1ii) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("f12bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("f12ext.rom", 0x0000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) + + ROM_REGION(0x4000, "firmware1", 0) + ROM_LOAD("f12note1.rom", 0x0000, 0x4000, CRC(dcacf970) SHA1(30d914cda2180889a40a3328e0a0c1327f4eaa10)) + + ROM_REGION(0x8000, "firmware2", 0) + ROM_LOAD("f12note2.rom", 0x0000, 0x8000, CRC(b0241a61) SHA1(ed2fea5c2a3c2e58d4f69f9d636e08574486a2b1)) + + ROM_REGION(0x8000, "firmware3", 0) + ROM_LOAD("f12note3.rom", 0x0000, 0x8000, CRC(44a10e6a) SHA1(917d1c079e03c4a44de864f123d03c4e32c8daae)) +ROM_END + +void msx2_state::hbf1ii(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: None, 0 drives + // 2 Cartridge slots + // S1985 + // rensha-turbo slider + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware1", 3, 0, 1, 1, "firmware1"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware2", 3, 1, 1, 2, "firmware2"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware3", 3, 2, 1, 2, "firmware3"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 3, 0, 4); // 64KB RAM + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F1XD / HB-F1XDmk2 */ +/* HB-F1XDmk2 is a cost-reduced version of HB-F1XD but identical in emulation */ + +ROM_START(hbf1xd) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("f1xdbios.rom.ic27", 0x0000, 0x8000, CRC(ba81b3dd) SHA1(4ce41fcc1a603411ec4e99556409c442078f0ecf)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("f1xdext.rom.ic27", 0x0000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("f1xddisk.rom.ic27", 0x0000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) +ROM_END + +void msx2_state::hbf1xd(machine_config &config) +{ + // YM2149 (in S-1895 MSX Engine) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + // S-1985 MSX Engine + // pause button + // speed controller slider + // rensha turbo slider + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N, "disk", 3, 0, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 3, 0, 4); // 64KB RAM + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F5 */ + +ROM_START(hbf5) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hbf5bios.ic25", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("hbf5ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("hbf5note.rom", 0x0000, 0x4000, CRC(0cdc0777) SHA1(06ba91d6732ee8a2ecd5dcc38b0ce42403d86708)) +ROM_END + +void msx2_state::hbf5(machine_config &config) +{ + // YM2149 + // FDC: None, 0 drives + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 1, 1, 1, "firmware"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 0, 2, 0, 4); // 64KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F500 */ + +ROM_START(hbf500) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("f500bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("f500ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("f500disk.rom", 0x0000, 0x4000, CRC(f7f5b0ea) SHA1(e93b8da1e8dddbb3742292b0e5e58731b90e9313)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("f500kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) +ROM_END + +void msx2_state::hbf500(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 0, 1, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 0, 2, 0, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F500 2nd version (slot layout is different) */ + +ROM_START(hbf500_2) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("f500bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("f500ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("f500disk.rom", 0x0000, 0x4000, CRC(f7f5b0ea) SHA1(e93b8da1e8dddbb3742292b0e5e58731b90e9313)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("f500kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) +ROM_END + +void msx2_state::hbf500_2(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 1, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 2, 0, 4); // 64KB RAM + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F500F */ + +ROM_START(hbf500f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hbf500fbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(440dae3c) SHA1(fedd9b682d056ddd1e9b3d281723e12f859b2e69)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("hbf500fext.rom", 0x0000, 0x4000, BAD_DUMP CRC(e235d5c8) SHA1(792e6b2814ab783d06c7576c1e3ccd6a9bbac34a)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("hbf500fdisk.rom", 0x0000, 0x4000, BAD_DUMP CRC(6e718f5c) SHA1(0e081572f84555dc13bdb0c7044a19d6c164d985)) // need verification +ROM_END + +void msx2_state::hbf500f(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: wd2793, 1 3.5" DSDD drive + // 3 Cartridge slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N, "disk", 0, 1, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 0, 2, 0, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_cartridge_slot<3>(config, 3); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F500P */ + +ROM_START(hbf500p) + ROM_REGION(0x10000, "mainrom", 0) + ROM_LOAD("500pbios.rom.ic41", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) + // FDC register contents at 7ff8-7fff + ROM_LOAD("500pext.ic47", 0x8000, 0x8000, BAD_DUMP CRC(cdd4824a) SHA1(505031f1e8396a6e0cb11c1540e6e7f6999d1191)) +ROM_END + +void msx2_state::hbf500p(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: wd2793, 1 3.5" DSDD drive + // 3 Cartridge slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "mainrom", 0x8000); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N, "disk", 0, 1, 1, 2, "mainrom", 0xc000); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 0, 2, 0, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_cartridge_slot<3>(config, 3); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F700D */ + +ROM_START(hbf700d) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("700dbios.rom.ic5", 0x0000, 0x8000, CRC(e975aa79) SHA1(cef16eb95502ba6ab2265fcafcedde470a101541)) + + ROM_REGION(0x8000, "extrom", 0) + // dumps as listed in openMSX and blueMSX + // ROM_LOAD("700dsub.ic6", 0x0000, 0x4000, CRC(8f84f783) SHA1(3288894e1be6af705871499b23c85732dbc40993)) + // ROM_LOAD("700ddisk.ic6", 0x4000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) + // + // however according to the service manual these should be in the same rom chip + // concatenation of 3288894e1be6af705871499b23c85732dbc40993 and 12f2cc79b3d09723840bae774be48c0d721ec1c6 + ROM_LOAD("700dext.ic6", 0x0000, 0x8000, BAD_DUMP CRC(2aba42dc) SHA1(9dee68aab6c921b0b20862a3f2f4e38ff8d155c0)) // to be verified with direct dump +ROM_END + +void msx2_state::hbf700d(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + // S-1985 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "extrom", 3, 0, 0, 1, "extrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N, "disk", 3, 0, 1, 2, "extrom", 0x4000); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); // 256KB Mapper RAM + + MSX_S1985(config, "s1985", 0); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F700F */ + +ROM_START(hbf700f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("700fbios.ic5", 0x0000, 0x8000, CRC(440dae3c) SHA1(fedd9b682d056ddd1e9b3d281723e12f859b2e69)) + + ROM_REGION(0x8000, "extrom", 0) + // dumps as listed in openMSX and blueMSX + // ROM_LOAD("700fsub.ic6", 0x0000, 0x4000, CRC(e235d5c8) SHA1(792e6b2814ab783d06c7576c1e3ccd6a9bbac34a)) + // ROM_LOAD("700fdisk.ic6", 0x4000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) + // + // however according to the service manual these should be in the same rom chip + // concatenation of 792e6b2814ab783d06c7576c1e3ccd6a9bbac34a and 12f2cc79b3d09723840bae774be48c0d721ec1c6 + ROM_LOAD("700fext.ic6", 0x0000, 0x8000, BAD_DUMP CRC(463db23b) SHA1(2ab5be13b356692e75a5d76a23f8e4cfc094b3df)) // to be verified with direct dump +ROM_END + +void msx2_state::hbf700f(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + // S1985 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "extrom", 3, 0, 0, 1, "extrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N, "disk", 3, 0, 1, 2, "extrom", 0x4000); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); // 256KB Mapper RAM + + MSX_S1985(config, "s1985", 0); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F700P */ + +ROM_START(hbf700p) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("700pbios.rom.ic5", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) + + ROM_REGION(0x8000, "extrom", 0) + // dumps as listed in openMSX / blueMSX + // openMSX also lists 24624c5fa3a8069b1d865cdea8a029f15c1955ea for the subrom but the disk rom + // part of that machine is 'certainly not original' so this may also not be original. + // ROM_LOAD("700psub.ic6", 0x0000, 0x4000, CRC(8f84f783) SHA1(3288894e1be6af705871499b23c85732dbc40993)) + // ROM_LOAD("700pdisk.ic6", 0x4000, 0x4000, CRC(1d9cc7f6) SHA1(3376cf9dd2b1ac9b41bf6bf6598b33136e86f9d5)) + // + // however according to the service manual these should be in the same rom chip + // concatenation of 3288894e1be6af705871499b23c85732dbc40993 and 3376cf9dd2b1ac9b41bf6bf6598b33136e86f9d5 + ROM_LOAD("700pext.ic6", 0x0000, 0x8000, BAD_DUMP CRC(63e1bffc) SHA1(496698a60432490dc1306c8cc1d4a6ded275261a)) // to be verified with direct dump +ROM_END + +void msx2_state::hbf700p(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + // S-1985 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "extrom", 3, 0, 0, 1, "extrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 0, 1, 2, "extrom", 0x4000); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); // 256KB Mapper RAM + + MSX_S1985(config, "s1985", 0); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F700S */ + +ROM_START(hbf700s) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("700sbios.rom.ic5", 0x0000, 0x8000, CRC(c2b889a5) SHA1(4811956f878c3e03da46317f787cdc4bebc86f47)) + + ROM_REGION(0x8000, "extrom", 0) + // dumps as listed in openMSX / blueMSX + // ROM_LOAD("700ssub.ic6", 0x0000, 0x4000, CRC(dc0951bd) SHA1(1e9a955943aeea9b1807ddf1250ba6436d8dd276)) + // ROM_LOAD("700sdisk.ic6", 0x4000, 0x4000, CRC(1d9cc7f6) SHA1(3376cf9dd2b1ac9b41bf6bf6598b33136e86f9d5)) + // + // however according to the service manual these should be in the same rom chip + // concatenation of 1e9a955943aeea9b1807ddf1250ba6436d8dd276 and 3376cf9dd2b1ac9b41bf6bf6598b33136e86f9d5 + ROM_LOAD("700sext.ic6", 0x0000, 0x8000, BAD_DUMP CRC(28d1badf) SHA1(ae3ed88a2d7034178e08f7bdf5409f462bf67fc9)) // to be verified with direct dump +ROM_END + +void msx2_state::hbf700s(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + // S1985 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "extrom", 3, 0, 0, 1, "extrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 0, 1, 2, "extrom", 0x4000); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 3, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); // 256KB Mapper RAM + + MSX_S1985(config, "s1985", 0); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F750 (prototype) */ + +/* MSX2 - Sony HB-F900 */ + +ROM_START(hbf900) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("f900bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("f900ext.rom", 0x0000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("f900disk.rom", 0x0000, 0x4000, CRC(f83d0ea6) SHA1(fc760d1d7b16370abc7eea39955f230b95b37df6)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("f900util.rom", 0x0000, 0x4000, CRC(bc6c7c66) SHA1(558b7383544542cf7333700ff90c3efbf93ba2a3)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("f900kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) +ROM_END + +void msx2_state::hbf900(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: wd2793, 2 3.5" DSDD drives + // 2 Cartridge slots + // S1985 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 1, 0, 4).set_total_size(0x40000).set_ramio_bits(0x80); // 256KB Mapper RAM + add_internal_disk(config, MSX_SLOT_DISK1_WD2793_2_DRIVES, "disk", 3, 2, 1, 1, "diskrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 3, 1, 1, "firmware"); + + MSX_S1985(config, "s1985", 0); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F900 (a) */ + +ROM_START(hbf900a) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("f900bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("f900ext.rom", 0x0000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("f900disa.rom", 0x0000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("f900util.rom", 0x0000, 0x4000, CRC(bc6c7c66) SHA1(558b7383544542cf7333700ff90c3efbf93ba2a3)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("f900kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) +ROM_END + +/* MSX2 - Sony HB-F9P */ + +ROM_START(hbf9p) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("f9pbios.rom.ic11", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) + + ROM_REGION(0x8000, "subfirm", 0) + // dumps as listed in openMSX / blueMSX + // ROM_LOAD("f9psub.rom", 0x0000, 0x4000, CRC(7c456c8b) SHA1(7b4a96402847decfc110ff9eda713bdcd218bd83)) + // ROM_LOAD("f9pfirm2.rom", 0x0000, 0x4000, CRC(dea2cb50) SHA1(8cc1f7ceeef745bb34e80253971e137213671486)) + // concatenation of 7b4a96402847decfc110ff9eda713bdcd218bd83 and 8cc1f7ceeef745bb34e80253971e137213671486 + ROM_LOAD("f9pfirm1.ic12", 0x0000, 0x8000, BAD_DUMP CRC(524f67aa) SHA1(41a186afced50ca6312cb5b6c4adb684faca6232)) + + ROM_REGION(0x8000, "firmware", 0) + // like in HB-F9S, the halves should be swapped? + ROM_LOAD("f9pfirm2.rom.ic13", 0x0000, 0x8000, BAD_DUMP CRC(ea97069f) SHA1(2d1880d1f5a6944fcb1b198b997a3d90ecd1903d)) +ROM_END + +void msx2_state::hbf9p(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // S-1985 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "subfirm", 3, 0, 0, 2, "subfirm"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 1, 1, 2, "firmware"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 128KB Mapper RAM + + MSX_S1985(config, "s1985", 0); + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F9P Russian */ + +ROM_START(hbf9pr) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("f9prbios.rom", 0x0000, 0x8000, CRC(f465311b) SHA1(7f440ec7295d889b097e1b66bf9bc5ce086f59aa)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("f9prext.rom", 0x0000, 0x4000, CRC(d701adac) SHA1(a6d7b1fd4ee896ca7513d02c033fc9a8aa065235)) +ROM_END + +void msx2_state::hbf9pr(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // S-1985 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 0, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "ext_mirror", 3, 0, 1, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM + + MSX_S1985(config, "s1985", 0); + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sony HB-F9S */ + +ROM_START(hbf9s) + ROM_REGION(0x18000, "mainrom", 0) + ROM_LOAD("f9sbios.ic11", 0x0000, 0x8000, CRC(c2b889a5) SHA1(4811956f878c3e03da46317f787cdc4bebc86f47)) + + ROM_REGION(0x8000, "subfirm", 0) + ROM_LOAD("f9sfirm1.ic12", 0x0000, 0x8000, CRC(cf39620b) SHA1(1166a93d7185ba024bdf2bfa9a30e1c447fb6db1)) + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("f9sfirm2.ic13", 0x0000, 0x8000, CRC(4a271395) SHA1(7efac54dd8f580f3b7809ab35db4ae58f0eb84d1)) +ROM_END + +void msx2_state::hbf9s(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: None, 0 drives + // 2 Cartridge slots + // S-1985 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "subfirm", 3, 0, 0, 2, "subfirm"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware_lo", 3, 1, 1, 1, "firmware", 0x4000); + add_internal_slot(config, MSX_SLOT_ROM, "firmware_hi", 3, 1, 2, 1, "firmware"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 128KB Mapper RAM + + MSX_S1985(config, "s1985", 0); + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sony HB-G900AP */ + +/* IC109 - 32KB Basic ROM SLOT#00 0000-7FFF */ +/* IC112 - 16KB Basic ROM SLOT#01 0000-3FFF */ +/* IC117 - 16KB Disk ROM SLOT#01 4000-7FFF */ +/* IC123 - 32KB ROM RS232C ROM SLOT#02 4000-7FFF / Video Utility ROM SLOT#03 4000-7FFF */ + +/* MSX2 - Sony HB-G900AP */ +ROM_START(hbg900ap) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("g900bios.ic109", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("g900ext.ic112", 0x0000, 0x4000, CRC(8f84f783) SHA1(3288894e1be6af705871499b23c85732dbc40993)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("g900disk.ic117", 0x0000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) + + ROM_REGION(0x4000, "rs232", 0) + // Contents very likely to be ok, but should be inside a single rom together with firmware + ROM_LOAD("g900232c.rom", 0x0000, 0x2000, BAD_DUMP CRC(be88e5f7) SHA1(b2776159a7b92d74308b434a6b3e5feba161e2b7)) + + ROM_REGION(0x4000, "firmware", 0) + // Contents very likely to be ok, but should be inside a single rom together with rs232 code + ROM_LOAD("g900util.rom", 0x0000, 0x4000, BAD_DUMP CRC(ecf6abcf) SHA1(6bb18cd2d69f124ad0c7c23a13eb0d2139037696)) +ROM_END + +void msx2_state::hbg900ap(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + // S1985 + // rs232 switch for terminal / modem operation + // rs232 2kb ram + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N, "disk", 0, 1, 1, 2, "diskrom"); + add_internal_slot_irq_mirrored<3>(config, MSX_SLOT_RS232_SONY, "rs232", 0, 2, 0, 4, "rs232"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 3, 1, 1, "firmware"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + // slot #3 is expanded + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x80000).set_ramio_bits(0x80); // 512KB Mapper RAM + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Sony HB-G900D */ + +/* MSX2 - Sony HB-G900F */ + +/* MSX2 - Sony HB-G900P - 3x 32KB ROMs */ + +ROM_START(hbg900p) + ROM_REGION(0x18000, "mainrom", 0) + ROM_LOAD("g900bios.rom", 0x0000, 0x8000, CRC(b31c851d) SHA1(0de3c802057560560a03d7965fcc4cff69f8575c)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("g900ext.rom", 0x0000, 0x4000, CRC(8f84f783) SHA1(3288894e1be6af705871499b23c85732dbc40993)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("g900disk.rom", 0x0000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6)) + + ROM_REGION(0x4000, "rs232", 0) + ROM_LOAD("g900232c.rom", 0x0000, 0x2000, CRC(be88e5f7) SHA1(b2776159a7b92d74308b434a6b3e5feba161e2b7)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("g900util.rom", 0x0000, 0x4000, CRC(d0417c20) SHA1(8779b004e7605a3c419825f0373a5d8fa84e1d5b)) +ROM_END + +void msx2_state::hbg900p(machine_config &config) +{ + // AY8910 + // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N, "diskrom", 0, 1, 1, 2, "diskrom"); + add_internal_slot_irq_mirrored<3>(config, MSX_SLOT_RS232_SONY, "rs232", 0, 2, 0, 4, "rs232"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 3, 1, 1, "firmware"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram", 3, 0, 4); // 64KB RAM + + msx2_pal(SND_AY8910, config); +} + +/* MSX2 - Sony HB-T600 */ + +/* MSX2 - Sony HB-T7 */ + +/* MSX2 - Talent DPC-300 */ + +/* MSX2 - Talent TPC-310 */ + +ROM_START(tpc310) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("tpc310bios.rom", 0x0000, 0x8000, CRC(8cd3e845) SHA1(7bba23669b7abfb6a142f9e1735b847d6e4e8267)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("tpc310ext.rom", 0x0000, 0x4000, CRC(094a9e7a) SHA1(39dfc46260f99b670916b1e55f67a5d4136e6e54)) + + ROM_REGION(0x4000, "turbo", 0) + ROM_LOAD("tpc310turbo.rom", 0x0000, 0x4000, CRC(0ea62a4d) SHA1(181bf58da7184e128cd419da3109b93344a543cf)) + + ROM_REGION(0x8000, "firmware", 0) + ROM_LOAD("tpc310acc.rom", 0x0000, 0x8000, CRC(4fb8fab3) SHA1(cdeb0ed8adecaaadb78d5a5364fd603238591685)) +ROM_END + +void msx2_state::tpc310(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: None, 0 drives + // 1 Cartridge slot (slot 2) + // S-1985 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 1, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 128KB Mapper RAM + add_cartridge_slot<1>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "turbo", 3, 0, 1, 1, "turbo"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 1, 1, 2, "firmware"); + // Expansion slot in slot #3-2 + + MSX_S1985(config, "s1985", 0); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Talent TPP-311 */ + +ROM_START(tpp311) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("311bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(8cd3e845) SHA1(7bba23669b7abfb6a142f9e1735b847d6e4e8267)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("311ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(094a9e7a) SHA1(39dfc46260f99b670916b1e55f67a5d4136e6e54)) // need verification + + ROM_REGION(0x8000, "logo", 0) + ROM_LOAD("311logo.rom", 0x0000, 0x8000, BAD_DUMP CRC(0e6ecb9f) SHA1(e45ddc5bf1a1e63756d11fb43fc50276ca35cab0)) // need verification +ROM_END + +void msx2_state::tpp311(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: None, 0 drives + // 0 Cartridge slots? + // S1985 + // 64KB VRAM + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 1, 0, 4).set_total_size(0x10000); // 64KB?? Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "logo", 2, 1, 2, "logo"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 1, "subrom"); + + MSX_S1985(config, "s1985", 0); + + msx2_pal(SND_YM2149, config); + msx2_64kb_vram(config); +} + +/* MSX2 - Talent TPS-312 */ + +ROM_START(tps312) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("312bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(8cd3e845) SHA1(7bba23669b7abfb6a142f9e1735b847d6e4e8267)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("312ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(094a9e7a) SHA1(39dfc46260f99b670916b1e55f67a5d4136e6e54)) // need verification + + ROM_REGION(0x8000, "plan", 0) + ROM_LOAD("312plan.rom", 0x0000, 0x8000, BAD_DUMP CRC(b3a6aaf6) SHA1(6de80e863cdd7856ab7aac4c238224a5352bda3b)) // need verification + + ROM_REGION(0x4000, "write", 0) + ROM_LOAD("312write.rom", 0x0000, 0x4000, BAD_DUMP CRC(63c6992f) SHA1(93682f5baba7697c40088e26f99ee065c78e83b8)) // need verification +ROM_END + +void msx2_state::tps312(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: None, 0 drives + // 1 Cartridge slot + // 64KB VRAM + // S1985 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 1, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + add_cartridge_slot<1>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 0, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "write", 3, 0, 1, 1, "write"); + add_internal_slot(config, MSX_SLOT_ROM, "plan", 3, 1, 0, 2, "plan"); + add_internal_slot(config, MSX_SLOT_ROM, "plan_mirror", 3, 1, 2, 2, "plan"); + // Expansion slot in slot #3-2 + + MSX_S1985(config, "s1985", 0); + + msx2_pal(SND_YM2149, config); + msx2_64kb_vram(config); +} + +/* MSX2 - Toshiba FS-TM1 */ + +ROM_START(fstm1) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("fstm1bios.rom", 0x0000, 0x8000, CRC(d1e11d52) SHA1(7a69e9b9595f3b0060155f4b419c915d4d9d8ca1)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("fstm1ext.rom", 0x0000, 0x4000, CRC(4eebe9b1) SHA1(a4bdbdb20bf9fd3c492a890fbf541bf092eaa8e1)) + + ROM_REGION(0x8000, "deskpac1", 0) + ROM_LOAD("fstm1desk1.rom", 0x0000, 0x8000, CRC(8b802086) SHA1(30737040d90c136d34dd409fe579bc4cca11c469)) + + ROM_REGION(0x8000, "deskpac2", 0) + ROM_LOAD("fstm1desk2.rom", 0x0000, 0x8000, CRC(304820ea) SHA1(ff6e07d3976b0874164fae680ae028d598752049)) +ROM_END + +void msx2_state::fstm1(machine_config &config) +{ + // YM2149 (in S-1985) + // FDC: None, 0 drives + // 2 Cartridge slots + // S-1985 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "deskpac1", 3, 1, 1, 2, "deskpac1"); + add_internal_slot(config, MSX_SLOT_ROM, "deskpac2", 3, 3, 1, 2, "deskpac2"); + + MSX_S1985(config, "s1985", 0); + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Toshiba HX-23 */ + +ROM_START(hx23) + // roms from hx23f, assumed to be the same for hx23 but need verification + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx23bios.ic2", 0x0000, 0x8000, BAD_DUMP CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) // need verification + + ROM_REGION(0x8000, "subjwp", 0) + ROM_LOAD("hx23subjwp.ic52", 0x0000, 0x8000, BAD_DUMP CRC(478016bf) SHA1(6ecf73a1dd55b363c2e68cc6245ece979aec1fc5)) // need verification + + ROM_REGION(0x8000, "rs232jwp", 0) + ROM_LOAD("hx23rs232jwp.ic3", 0x0000, 0x8000, BAD_DUMP CRC(60160d3b) SHA1(0958361ac9b19782cf7017b2e762b416e0203f37)) // need verification +ROM_END + +void msx2_state::hx23(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // 64KB VRAM + // HX-R701 RS-232 optional + // TCX-1012 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 0, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "sub", 3, 1, 0, 1, "subjwp"); + add_internal_slot(config, MSX_SLOT_ROM, "jwp", 3, 1, 2, 1, "subjwp", 0x4000); + add_internal_slot(config, MSX_SLOT_ROM, "rs232jwp", 3, 3, 1, 2, "rs232jwp"); + + msx2_pal(SND_AY8910, config); + msx2_64kb_vram(config); +} + +/* MSX2 - Toshiba HX-23F */ + +ROM_START(hx23f) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hx23bios.ic2", 0x0000, 0x8000, BAD_DUMP CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) // need verification + + ROM_REGION(0x8000, "subjwp", 0) + ROM_LOAD("hx23subjwp.ic52", 0x0000, 0x8000, BAD_DUMP CRC(478016bf) SHA1(6ecf73a1dd55b363c2e68cc6245ece979aec1fc5)) // need verification + + ROM_REGION(0x8000, "rs232jwp", 0) + ROM_LOAD("hx23rs232jwp.ic3", 0x0000, 0x8000, BAD_DUMP CRC(60160d3b) SHA1(0958361ac9b19782cf7017b2e762b416e0203f37)) // need verification +ROM_END + +void msx2_state::hx23f(machine_config &config) +{ + // AY8910 + // FDC: None, 0 drives + // 2 Cartridge slots + // HX-R701 RS-232 optional + // TCX-1012 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 2, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 3, 0, 0, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "sub", 3, 1, 0, 1, "subjwp"); + add_internal_slot(config, MSX_SLOT_ROM, "jwp", 3, 1, 2, 1, "subjwp", 0x4000); + add_internal_slot(config, MSX_SLOT_ROM, "rs232jwp", 3, 3, 1, 2, "rs232jwp"); + + msx2_pal(SND_AY8910, config); +} + +/* MSX2 - Toshiba HX-33 */ + +ROM_START(hx33) + ROM_REGION(0x20000, "mainrom", 0) + ROM_LOAD("hx33bios.ic7", 0x0000, 0x20000, CRC(8dd5502b) SHA1(5e057526fe39d79e88e7ff1ce02ed669bd38929e)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("hx33kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) +ROM_END + +void msx2_state::hx33(machine_config &config) +{ + // YM2149 + // FDC: None, 0, drives + // 2 Cartridge slots + // TCX-2001 + TCX-2002 + // HX-R702 RS-232 optional + // 2KB SRAM + // copy button + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "mainrom", 0x8000); + add_internal_slot(config, MSX_SLOT_RS232_TOSHIBA_HX3X, "firmware", 3, 3, 1, 2, "mainrom", 0xc000); + + msx2(SND_YM2149, config); + msx2_64kb_vram(config); +} + +/* MSX@ - Toshiba HX-34 */ + +ROM_START(hx34) + ROM_REGION(0x20000, "mainrom", 0) + ROM_LOAD("hx33bios.ic7", 0x0000, 0x20000, CRC(8dd5502b) SHA1(5e057526fe39d79e88e7ff1ce02ed669bd38929e)) + + ROM_REGION(0x4000, "diskrom", 0) + // hx34disk.rom has contents of floppy registers at offset 3ff0-3ff7 and mirrored at 3ff8-3fff + ROM_LOAD("hx34disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(626b719d) SHA1(c88ef953b21370cbaef5e82575d093d6f9047ec6)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("hx34kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) +ROM_END + +void msx2_state::hx34(machine_config &config) +{ + // YM2149 + // FDC: wd2793??, 1 3.5" DSDD drive + // 2 Cartridge slots + // TCX-2001 + TCX-2002 + // HX-R703 RS232 optional + // 2KB SRAM + // copy button + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "mainrom", 0x8000); + add_internal_disk(config, MSX_SLOT_DISK6_WD2793_N, "disk", 3, 2, 1, 1, "diskrom"); + add_internal_slot(config, MSX_SLOT_RS232_TOSHIBA_HX3X, "firmware", 3, 3, 1, 2, "mainrom", 0xc000); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Victor HC-80 */ + +ROM_START(victhc80) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hc80bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("hc80ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("hc80firm.rom", 0x0000, 0x4000, CRC(30e8c08d) SHA1(7f498db2f431b9c0b42dac1c7ca46a236b780228)) +ROM_END + +void msx2_state::victhc80(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: None, 0 drives + // 2 Cartridge slots + // S3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram1", 0, 0, 2, 2); // 32KB RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_RAM, "ram2", 0, 2, 0, 2); // 32KB RAM + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 2, 1, "firmware"); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Victor HC-90 */ + +ROM_START(victhc90) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hc90bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("hc90ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("hc90disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(11bca2ed) SHA1(a7a34671bddb48fa6c74182e2977f9129558ec32)) // need verification + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("hc90firm.rom", 0x0000, 0x4000, BAD_DUMP CRC(53791d91) SHA1(caeffdd654394726c8c0824b21af7ff51c0b1031)) // need verification + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("hc90kfn.rom", 0x0000, 0x20000, BAD_DUMP CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) // need verification +ROM_END + +void msx2_state::victhc90(machine_config &config) +{ + // YM2149 + // FDC: mb8877a?, 1 3.5" DSDD drive + // RS232C builtin + // 2nd CPU HD-64B180 @ 6.144 MHz + // 1 Cartridge slot (slot 1 or 2?) + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot_irq<2>(config, MSX_SLOT_RS232, "firmware", 0, 1, 1, 1, "firmware"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + add_cartridge_slot<1>(config, 1); + add_internal_disk(config, MSX_SLOT_DISK10_MB8877, "disk", 3, 1, 1, "diskrom"); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Victor HC-90(A) */ + +/* MSX2 - Victor HC-90(B) */ + +/* MSX2 - Victor HC-90(V) */ + +/* MSX2 - Victor HC-90(T) */ + +/* MSX2 - Victor HC-95 */ + +ROM_START(victhc95) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hc95bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("hc95ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("hc95disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(11bca2ed) SHA1(a7a34671bddb48fa6c74182e2977f9129558ec32)) // need verification + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("hc95firm.rom", 0x0000, 0x4000, BAD_DUMP CRC(53791d91) SHA1(caeffdd654394726c8c0824b21af7ff51c0b1031)) // need verification + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("hc95kfn.rom", 0x0000, 0x20000, BAD_DUMP CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) // need verification +ROM_END + +void msx2_state::victhc95(machine_config &config) +{ + // YM2149 + // FDC: mb8877a, 2 3.5" DSDD drive + // RS232C builtin + // 2nd CPU HD-64B180 @ 6.144 MHz + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 1, 1, 1, "firmware"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + // 96 pin expansion bus in slot #0-3 + add_cartridge_slot<1>(config, 1); + // 96 pin expansion bus in slot #2 + add_internal_disk(config, MSX_SLOT_DISK10_MB8877_2_DRIVES, "disk", 3, 1, 1, "diskrom"); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Victor HC-95A */ + +ROM_START(victhc95a) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("hc95abios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("hc95aext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) + + ROM_REGION(0x4000, "diskrom", 0) + // FDC register contents at 3ff8-3fff + ROM_LOAD("hc95adisk.rom", 0x0000, 0x4000, BAD_DUMP CRC(11bca2ed) SHA1(a7a34671bddb48fa6c74182e2977f9129558ec32)) + + ROM_REGION(0x4000, "firmware", 0) + ROM_LOAD("hc95afirm.rom", 0x0000, 0x4000, CRC(53791d91) SHA1(caeffdd654394726c8c0824b21af7ff51c0b1031)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("hc95akfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) +ROM_END + +void msx2_state::victhc95a(machine_config &config) +{ + // YM2149 + // FDC: mb8877a, 2 3.5" DSDD drive + // RS232C builtin + // 2nd CPU HD-64B180 @ 6.144 MHz + // 1 Cartridge slot + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 0, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 0, 1, 1, 1, "firmware"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 0, 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM + // 96 pin expansion bus in slot #0-3 + add_cartridge_slot<1>(config, 1); + // 96 pin expansion bus in slot #2 + add_internal_disk(config, MSX_SLOT_DISK10_MB8877_2_DRIVES, "disk", 3, 1, 1, "diskrom"); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Wandy CPC-300 */ + +/* MSX2 - Yamaha CX7/128 */ + +ROM_START(cx7128) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("cx7mbios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("cx7mext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) +ROM_END + +void msx2_state::cx7128(machine_config &config) +{ + // YM2149 (in S3527) + // FDC: None, 0 drives + // 2 Cartridge slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, nullptr); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Yamaha CX7M/128 */ + +ROM_START(cx7m128) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("cx7mbios.rom", 0x0000, 0x8000, BAD_DUMP CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) // needs verification + + 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) +{ + // YM2149 (in S3527) + // FDC: None, 0 drives + // 2 Cartridge slots + // S3527 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, "sfg05"); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Yamaha YIS-503 III R (student) */ + +ROM_START(y503iiir) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yis503iiirbios.rom", 0x0000, 0x8000, CRC(e7d08e29) SHA1(0f851ee7a1cf79819f61cc89e9948ee72a413802)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("yis503iiirext.rom", 0x0000, 0x4000, CRC(34d21778) SHA1(03bf6d2ac86f5c9ab618e155442787c700f99fed)) + + ROM_REGION(0x4000, "cpm", 0) + ROM_LOAD("yis503iiircpm.rom", 0x0000, 0x4000, CRC(417bf00e) SHA1(f4f7a54cdf5a9dd6c59f7cb219c2c5eb0a00fa8a)) + + ROM_REGION(0x8000, "network", 0) + // TODO: Which one is correct?? + // has 2 * 2KB RAM? + ROM_LOAD("yis503iiirnet.rom", 0x0000, 0x8000, CRC(0e345b43) SHA1(e8fd2bbc1bdab12c73a0fec178a190f9063547bb)) + ROM_LOAD("yis503iiirnet.rom", 0x0000, 0x8000, CRC(75331cac) SHA1(307a7be064442feb4ab2e1a2bc971b138c1a1169)) +ROM_END + +void msx2_state::y503iiir(machine_config &config) +{ + // YM2149 (in S-3527) + // FDC: None, 0 drives + // 2 Cartridge slots + // Networking builtin + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + 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"); + add_internal_slot(config, MSX_SLOT_ROM, "cpm", 3, 0, 1, 1, "cpm"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM + // Yamaha expansion slot in slot #3-3 + add_internal_slot(config, MSX_SLOT_ROM, "network", 3, 3, 1, 2, "network"); + + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Yamaha YIS-503 III R Estonian */ + +ROM_START(y503iiire) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yis503iiirebios.rom", 0x0000, 0x8000, CRC(d0c20f54) SHA1(ebb7eb540a390509edfd36c84288ba85e63f2d1f)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("yis503iiireext.rom", 0x0000, 0x4000, CRC(34d21778) SHA1(03bf6d2ac86f5c9ab618e155442787c700f99fed)) + + ROM_REGION(0x4000, "cpm", 0) + ROM_LOAD("yis503iiirecpm.rom", 0x0000, 0x4000, CRC(417bf00e) SHA1(f4f7a54cdf5a9dd6c59f7cb219c2c5eb0a00fa8a)) + + ROM_REGION(0x8000, "network", 0) + // TODO: Which one is correct?? + ROM_LOAD("yis503iiirnet.rom", 0x0000, 0x8000, CRC(0e345b43) SHA1(e8fd2bbc1bdab12c73a0fec178a190f9063547bb)) + ROM_LOAD("yis503iiirnet.rom", 0x0000, 0x8000, CRC(75331cac) SHA1(307a7be064442feb4ab2e1a2bc971b138c1a1169)) +ROM_END + +/* MSX2 - Yamaha YIS604/128 */ + +ROM_START(yis604) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yis604bios.rom", 0x0000, 0x8000, CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("yis604ext.rom", 0x0000, 0x4000, CRC(4a48779c) SHA1(b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33)) +ROM_END + +void msx2_state::yis604(machine_config &config) +{ + // YM2149 (in S-3527) + // FDC: None, 0 drives + // 2 Cartridge slots + // S-3527 MSX Engine + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + 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_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); + + msx2(SND_YM2149, config); +} + +/* MSX2 - Yamaha YIS-805/128 */ + +ROM_START(y805128) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yis805128bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("yis805128ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("yis805128disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(ab94a273) SHA1(4b08a057e5863ade179dcf8bc9377e90940e6d61)) // need verification + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("yis805128kfn.rom", 0x0000, 0x20000, BAD_DUMP CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) // need verification +ROM_END + +void msx2_state::y805128(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: wd2793?, 1 3.5" DSDD drive + // 2 Cartridge slots + // S1985 MSX Engine + // 2KB SRAM + // no mini cartridge slot? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + 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); + add_internal_disk_mirrored(config, MSX_SLOT_DISK11_WD2793, "disk", 3, 0, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM + // Default: SKW-05 + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, nullptr); + + MSX_S1985(config, "s1985", 0); + msx2(SND_YM2149, config); +} + +/* MSX2 - Yamaha YIS-805/256 */ + +ROM_START(y805256) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yis805256bios.rom", 0x0000, 0x8000, BAD_DUMP CRC(9b3e7b97) SHA1(0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd)) // need verification + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("yis805256ext.rom", 0x0000, 0x4000, BAD_DUMP CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344)) // need verification + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("yis805256disk.rom", 0x0000, 0x4000, BAD_DUMP CRC(ab94a273) SHA1(4b08a057e5863ade179dcf8bc9377e90940e6d61)) // need verification + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("yis805256kfn.rom", 0x0000, 0x20000, BAD_DUMP CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) // need verification +ROM_END + +void msx2_state::y805256(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: wd2793?, 2 3.5" DSDD drives + // 2 Cartridge slots + // S1985 MSX Engine + // 2KB SRAM + // RS232C + // no mini cartridge slot? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + 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); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_2_DRIVES, "disk", 3, 0, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x40000); // 256KB Mapper RAM + // Default: SKW-05 + add_cartridge_slot<3>(config, MSX_SLOT_YAMAHA_EXPANSION, "expansion", 3, 3, msx_yamaha_60pin, nullptr); + + MSX_S1985(config, "s1985", 0); + msx2(SND_YM2149, config); +} + +/* MSX2 - Yamaha YIS-805/128R2 (teacher) */ + +ROM_START(y805128r2) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yis805128r2bios.rom", 0x0000, 0x8000, CRC(e7d08e29) SHA1(0f851ee7a1cf79819f61cc89e9948ee72a413802)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("yis805128r2ext.rom", 0x0000, 0x4000, CRC(34d21778) SHA1(03bf6d2ac86f5c9ab618e155442787c700f99fed)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("yis805128r2disk.rom", 0x0000, 0x4000, CRC(9eb7e24d) SHA1(3a481c7b7e4f0406a55952bc5b9f8cf9d699376c)) + + ROM_REGION(0x8000, "network", 0) + // has 2 * 2KB RAM ? + ROM_LOAD("yis805128r2net.rom", 0x0000, 0x8000, CRC(0e345b43) SHA1(e8fd2bbc1bdab12c73a0fec178a190f9063547bb)) + + ROM_REGION(0x10000, "firmware", 0) + ROM_LOAD("yis805128r2paint.rom", 0x00000, 0x10000, CRC(1bda68a3) SHA1(7fd2a28c4fdaeb140f3c8c8fb90271b1472c97b9)) +ROM_END + +void msx2_state::y805128r2(machine_config &config) +{ + // YM2149 (in S1985) + // FDC: wd2793?, 1 3.5" DSDD drive + // 2 Cartridge slots + // S1985 MSX Engine + // Networking built in + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 0, 0, 4, "firmware"); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 1, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 2, 0, 4).set_total_size(0x20000); // 128KB Mapper RAM + // This is actually the module slot + add_internal_slot(config, MSX_SLOT_ROM, "network", 3, 3, 0, 2, "network", 0x00000); + + MSX_S1985(config, "s1985", 0); + msx2_pal(SND_YM2149, config); +} + +/* MSX2 - Yamaha YIS-805/128R2 Estonian */ + +ROM_START(y805128r2e) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("yis805128r2ebios.rom", 0x0000, 0x8000, CRC(d0c20f54) SHA1(ebb7eb540a390509edfd36c84288ba85e63f2d1f)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("yis805128r2eext.rom", 0x0000, 0x4000, CRC(34d21778) SHA1(03bf6d2ac86f5c9ab618e155442787c700f99fed)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("yis805128r2edisk.rom", 0x0000, 0x4000, CRC(9eb7e24d) SHA1(3a481c7b7e4f0406a55952bc5b9f8cf9d699376c)) + + ROM_REGION(0x8000, "network", 0) + ROM_LOAD("yis805128r2enet.rom", 0x0000, 0x8000, CRC(0e345b43) SHA1(e8fd2bbc1bdab12c73a0fec178a190f9063547bb)) + + ROM_REGION(0x10000, "firmware", 0) + ROM_LOAD("yis805128r2epaint.rom", 0x00000, 0x10000, CRC(1bda68a3) SHA1(7fd2a28c4fdaeb140f3c8c8fb90271b1472c97b9)) +ROM_END + +/******************************** MSX 2+ **********************************/ + +/* MSX2+ - Ciel Expert 3 IDE */ + +ROM_START(expert3i) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("exp30bios.rom", 0x0000, 0x8000, CRC(a10bb1ce) SHA1(5029cf47031b22bd5d1f68ebfd3be6d6da56dfe9)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("exp30ext.rom", 0x0000, 0x4000, CRC(6bcf4100) SHA1(cc1744c6c513d6409a142b4fb42fbe70a95d9b7f)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("cieldisk.rom", 0x0000, 0x4000, CRC(bb550b09) SHA1(0274dd9b5096065a7f4ed019101124c9bd1d56b8)) + + ROM_REGION(0x4000, "music", 0) + ROM_LOAD("exp30mus.rom", 0x0000, 0x4000, CRC(9881b3fd) SHA1(befebc916bfdb5e8057040f0ae82b5517a7750db)) + + ROM_REGION(0x10000, "ide", 0) + ROM_LOAD("ide240a.rom", 0x00000, 0x10000, CRC(7adf857f) SHA1(8a919dbeed92db8c06a611279efaed8552810239)) +ROM_END + +void msx2_state::expert3i(machine_config &config) +{ + // AY8910/YM2149? + // FDC: wd2793, 1 or 2? drives + // 2 Cartridge slots? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 1, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_MUSIC, "music", 1, 1, 1, 1, "music").set_ym2413_tag("ym2413"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 1, 2, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_ROM, "ide", 1, 3, 0, 4, "ide"); /* IDE hardware needs to be emulated */ + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 4).set_total_size(0x40000); // 256KB?? Mapper RAM + add_cartridge_slot<2>(config, 3); + + msx_ym2413(config); + + msx2plus(SND_AY8910, config); +} + +/* MSX2+ - Ciel Expert 3 Turbo +This one is a full motherboard by CIEL (not an upgrade kit), created to replace the motherboard of a Gradiente Expert (which means that only the case, the analog boards and the keyboard remains Gradiente). This new motherboard has the following built-in features: + +1) MSX2+ +2) Support either 3.57MHz or 7.14MHz natively, switched either by software (*1) or by a hardware-switch on the front panel. Turbo-led included. +3) Up to 4MB of Memory Mapper (1MB is the most common configuration) +4) MSX-Music +5) 4 expansion slots (two external on the front panel, two internal) +6) Stereo sound (YM2413 channels 0-6 on right, PSG+YM2413 channels 7-9 on left) +7) Support the V9938 instead of the V9958 by switching some jumpers +8) The main-ram can be placed on slot 2 or slot 3, using jumpers (slot 2 is the default) + + +*1: A routine hidden inside the BIOS frame-0 is used to switch the turbo. + */ + +/* Uses a Z84C0010 - CMOS processor working at 7 MHz */ +ROM_START(expert3t) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("exp30bios.rom", 0x0000, 0x8000, CRC(a10bb1ce) SHA1(5029cf47031b22bd5d1f68ebfd3be6d6da56dfe9)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("exp30ext.rom", 0x0000, 0x4000, CRC(6bcf4100) SHA1(cc1744c6c513d6409a142b4fb42fbe70a95d9b7f)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("cieldisk.rom", 0x0000, 0x4000, CRC(bb550b09) SHA1(0274dd9b5096065a7f4ed019101124c9bd1d56b8)) + + ROM_REGION(0x4000, "music", 0) + ROM_LOAD("exp30mus.rom", 0x0000, 0x4000, CRC(9881b3fd) SHA1(befebc916bfdb5e8057040f0ae82b5517a7750db)) + + ROM_REGION(0x4000, "turbo", 0) + ROM_LOAD("turbo.rom", 0x0000, 0x4000, CRC(ab528416) SHA1(d468604269ae7664ac739ea9f922a05e14ffa3d1)) +ROM_END + +void msx2_state::expert3t(machine_config &config) +{ + // AY8910 + // FDC: wd2793?, 1 or 2? drives + // 4 Cartridge/Expansion slots? + // FM/YM2413 built-in + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1, 0); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 1, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_MUSIC, "music", 1, 1, 1, 1, "music").set_ym2413_tag("ym2413"); + add_internal_slot(config, MSX_SLOT_ROM, "turbo", 1, 2, 1, 1, "turbo"); /* Turbo hardware needs to be emulated */ + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 1, 3, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 4).set_total_size(0x40000); // 256KB Mapper RAM + add_cartridge_slot<2>(config, 3); + + msx_ym2413(config); + + msx2plus(SND_AY8910, config); +} + +/* MSX2+ - Gradiente Expert AC88+ */ + +ROM_START(expertac) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ac88bios.rom", 0x0000, 0x8000, CRC(9ce0da44) SHA1(1fc2306911ab6e1ebdf7cb8c3c34a7f116414e88)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("ac88ext.rom", 0x0000, 0x4000, CRC(c74c005c) SHA1(d5528825c7eea2cfeadd64db1dbdbe1344478fc6)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("panadisk.rom", 0x0000, 0x4000, CRC(17fa392b) SHA1(7ed7c55e0359737ac5e68d38cb6903f9e5d7c2b6)) + + ROM_REGION(0x4000, "asm", 0) + ROM_LOAD("ac88asm.rom", 0x0000, 0x4000, CRC(a8a955ae) SHA1(91e522473a8470511584df3ee5b325ea5e2b81ef)) + + ROM_REGION(0x4000, "xbasic", 0) + ROM_LOAD("xbasic2.rom", 0x0000, 0x4000, CRC(2825b1a0) SHA1(47370bec7ca1f0615a54eda548b07fbc0c7ef398)) +ROM_END + +void msx2_state::expertac(machine_config &config) +{ + // AY8910/YM2149? + // FDC: wd2793?, 1 or 2? drives + // 2 Cartridge slots? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM?? + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "asm", 3, 1, 1, 1, "asm"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793, "disk", 3, 2, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_ROM, "xbasic", 3, 3, 1, 1, "xbasic"); + + msx2plus(SND_AY8910, config); +} + +/* MSX2+ - Gradiente Expert DDX+ */ + +ROM_START(expertdx) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("ddxbios.rom", 0x0000, 0x8000, CRC(e00af3dc) SHA1(5c463dd990582e677c8206f61035a7c54d8c67f0)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("ddxext.rom", 0x0000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("panadisk.rom", 0x0000, 0x4000, CRC(17fa392b) SHA1(7ed7c55e0359737ac5e68d38cb6903f9e5d7c2b6)) + + ROM_REGION(0x4000, "xbasic", 0) + ROM_LOAD("xbasic2.rom", 0x0000, 0x4000, CRC(2825b1a0) SHA1(47370bec7ca1f0615a54eda548b07fbc0c7ef398)) + + ROM_REGION(0x8000, "kanjirom", 0) + ROM_LOAD("kanji.rom", 0x0000, 0x8000, CRC(b4fc574d) SHA1(dcc3a67732aa01c4f2ee8d1ad886444a4dbafe06)) +ROM_END + +void msx2_state::expertdx(machine_config &config) +{ + // AY8910/YM2149? + // FDC: tc8566af, 1 3.5" DSDD drive? + // 2 Cartridge slots? + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1, 0); + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 1, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "xbasic", 1, 2, 1, 1, "xbasic"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK3_TC8566, "disk", 1, 3, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 2, 0, 4).set_total_size(0x10000); // 64KB Mapper RAM?? + add_cartridge_slot<2>(config, 3); + /* Kanji? */ + + msx2plus(SND_AY8910, config); +} + +/* MSX2+ - Panasonic FS-A1FX */ + +ROM_START(fsa1fx) + ROM_REGION(0x40000, "maincpu", 0) + ROM_LOAD("a1fx.ic16", 0, 0x40000, CRC(c0b2d882) SHA1(623cbca109b6410df08ee7062150a6bda4b5d5d4)) + + // Kanji rom contents are the first half of the single rom +// ROM_REGION(0x20000, "kanji", 0) + ROM_REGION(0x40000, "kanji", 0) + ROM_LOAD("a1fx.ic16", 0, 0x40000, CRC(c0b2d882) SHA1(623cbca109b6410df08ee7062150a6bda4b5d5d4)) +ROM_END + +void msx2_state::fsa1fx(machine_config &config) +{ + // AY8910 (in T9769) + // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots + // T9769(B) + // ren-sha turbo slider + // pause button + // firmware switch + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "maincpu", 0x30000); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "maincpu", 0x38000); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x28000); + add_internal_disk_mirrored(config, MSX_SLOT_DISK3_TC8566, "disk", 3, 2, 1, 2, "maincpu", 0x3c000); + add_internal_slot(config, MSX_SLOT_ROM, "firmware", 3, 3, 1, 2, "maincpu", 0x20000); + + msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0)); + matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w)); + + MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); + + m_kanji_fsa1fx = true; + msx2plus(SND_AY8910, config); +} + +/* MSX2+ - Panasonic FS-A1WSX */ + +ROM_START(fsa1wsx) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("a1wsbios.rom", 0x0000, 0x8000, CRC(358ec547) SHA1(f4433752d3bf876bfefb363c749d4d2e08a218b6)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("a1wsext.rom", 0x0000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("a1wsdisk.rom", 0x0000, 0x4000, CRC(17fa392b) SHA1(7ed7c55e0359737ac5e68d38cb6903f9e5d7c2b6)) + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("a1wskdr.rom", 0x0000, 0x8000, CRC(b4fc574d) SHA1(dcc3a67732aa01c4f2ee8d1ad886444a4dbafe06)) + + ROM_REGION(0x4000, "msxmusic", 0) + ROM_LOAD("a1wsmusp.rom", 0x0000, 0x4000, CRC(5c32eb29) SHA1(aad42ba4289b33d8eed225d42cea930b7fc5c228)) + + ROM_REGION(0x200000, "firmware", 0) + ROM_LOAD("a1wsfirm.rom", 0x000000, 0x200000, CRC(e363595d) SHA1(3330d9b6b76e3c4ccb7cf252496ed15d08b95d3f)) + + ROM_REGION(0x40000, "kanji", 0) + ROM_LOAD("a1wskfn.rom", 0, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) +ROM_END + +void msx2_state::fsa1wsx(machine_config &config) +{ + // AY8910 (in T9769) + // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots + // FM built-in + // T9769(C) + // ren-sha turbo slider + // firmware switch + // pause button + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_MUSIC, "msxmusic", 0, 2, 1, 1, "msxmusic").set_ym2413_tag("ym2413"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "kdr"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK3_TC8566, "disk", 3, 2, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_PANASONIC08, "firmware", 3, 3, 0, 4, "firmware"); + + msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0)); + matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w)); + + MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); + + msx_ym2413(config); + + msx2plus(SND_AY8910, config); +} + +/* MSX2+ - Panasonic FS-A1WX */ + +ROM_START(fsa1wx) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("a1wxbios.rom", 0x0000, 0x8000, CRC(19771608) SHA1(e90f80a61d94c617850c415e12ad70ac41e66bb7)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("a1wxext.rom", 0x0000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("a1wxdisk.rom", 0x0000, 0x4000, CRC(905daa1b) SHA1(bb59c849898d46a23fdbd0cc04ab35088e74a18d)) + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("a1wxkdr.rom", 0x0000, 0x8000, CRC(a068cba9) SHA1(1ef3956f7f918873fb9b031339bba45d1e5e5878)) + + ROM_REGION(0x4000, "msxmusic", 0) + ROM_LOAD("a1wxmusp.rom", 0x0000, 0x4000, CRC(456e494e) SHA1(6354ccc5c100b1c558c9395fa8c00784d2e9b0a3)) + + ROM_REGION(0x200000, "firmware", 0) + ROM_LOAD("a1wxfirm.rom", 0x000000, 0x200000, CRC(283f3250) SHA1(d37ab4bd2bfddd8c97476cbe7347ae581a6f2972)) + + ROM_REGION(0x40000, "kanji", 0) + ROM_LOAD("a1wxkfn.rom", 0, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) +ROM_END + +void msx2_state::fsa1wx(machine_config &config) +{ + // AY8910 (in T9769) + // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots + // FM built-in + // MSX Engine T9769A/B + // ren-sha turbo slider + // firmware switch + // pause button + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_MUSIC, "msxmusic", 0, 2, 1, 1, "msxmusic").set_ym2413_tag("ym2413"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "kdr"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK3_TC8566, "disk", 3, 2, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_PANASONIC08, "firmware", 3, 3, 0, 4, "firmware"); + + msx_matsushita_device &matsushita(MSX_MATSUSHITA(config, "matsushita", 0)); + matsushita.turbo_callback().set(FUNC(msx2_state::turbo_w)); + + MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); + + msx_ym2413(config); + + msx2plus(SND_AY8910, config); +} + +/* MSX2+ - Panasonic FS-A1WX (a) */ + +ROM_START(fsa1wxa) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("a1wxbios.rom", 0x0000, 0x8000, CRC(19771608) SHA1(e90f80a61d94c617850c415e12ad70ac41e66bb7)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("a1wxext.rom", 0x0000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("a1wxdisk.rom", 0x0000, 0x4000, CRC(2bda0184) SHA1(2a0d228afde36ac7c5d3c2aac9c7c664dd071a8c)) + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("a1wxkdr.rom", 0x0000, 0x8000, CRC(a068cba9) SHA1(1ef3956f7f918873fb9b031339bba45d1e5e5878)) + + ROM_REGION(0x4000, "msxmusic", 0) + ROM_LOAD("a1wxmusp.rom", 0x0000, 0x4000, CRC(456e494e) SHA1(6354ccc5c100b1c558c9395fa8c00784d2e9b0a3)) + + ROM_REGION(0x200000, "firmware", 0) + ROM_LOAD("a1wxfira.rom", 0x000000, 0x200000, CRC(58440a8e) SHA1(8e0d4a77e7d5736e8225c2df4701509363eb230f)) + + ROM_REGION(0x40000, "kanji", 0) + ROM_LOAD("a1wxkfn.rom", 0, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) +ROM_END + +/* MSX2+ - Sanyo Wavy PHC-35J */ + +ROM_START(phc35j) + ROM_REGION(0x8000, "mainrom", 0) + ROM_LOAD("35jbios.rom", 0x0000, 0x8000, CRC(358ec547) SHA1(f4433752d3bf876bfefb363c749d4d2e08a218b6)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("35jext.rom", 0x0000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("35jkdr.rom", 0x0000, 0x8000, CRC(b4fc574d) SHA1(dcc3a67732aa01c4f2ee8d1ad886444a4dbafe06)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("35jkfn.rom", 0, 0x20000, CRC(c9651b32) SHA1(84a645becec0a25d3ab7a909cde1b242699a8662)) +ROM_END + +void msx2_state::phc35j(machine_config &config) +{ + // AY8910 (in T9769) + // FDC: None, 0 drives + // 2 Cartridge slots + // T9769A + // ren-sha turbo slider + // pause button + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "kdr"); + + MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); + msx2plus(SND_AY8910, config); +} + +/* MSX2+ - Sanyo Wavy PHC-70FD */ + +ROM_START(phc70fd) + ROM_REGION(0x20000, "mainrom", 0) + ROM_LOAD("phc-70fd.rom", 0x0000, 0x20000, CRC(d2307ddf) SHA1(b6f2ca2e8a18d6c7cd326cb8d1a1d7d747f23059)) +// ROM_LOAD("70fdbios.rom", 0x0000, 0x8000, CRC(19771608) SHA1(e90f80a61d94c617850c415e12ad70ac41e66bb7)) +// ROM_LOAD("70fdext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) +// ROM_LOAD("70fddisk.rom", 0xc000, 0x4000, CRC(db7f1125) SHA1(9efa744be8355675e7bfdd3976bbbfaf85d62e1d)) +// ROM_LOAD("70fdkdr.rom", 0x10000, 0x8000, CRC(a068cba9) SHA1(1ef3956f7f918873fb9b031339bba45d1e5e5878)) +// ROM_LOAD("70fdmus.rom", 0x18000, 0x4000, CRC(5c32eb29) SHA1(aad42ba4289b33d8eed225d42cea930b7fc5c228)) +// ROM_LOAD("70fdbas.rom", 0x1c000, 0x4000, CRC(da7be246) SHA1(22b3191d865010264001b9d896186a9818478a6b)) + + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD("70fdkfn.rom", 0, 0x20000, CRC(c9651b32) SHA1(84a645becec0a25d3ab7a909cde1b242699a8662)) +ROM_END + +void msx2_state::phc70fd(machine_config &config) +{ + // AY8910 (in T9769) + // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots + // T9769 + // FM built-in + // ren-sha turbo slider + // pause button + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom", 0x10000); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "mainrom", 0x18000); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "mainrom", 0x8000); + add_internal_disk_mirrored(config, MSX_SLOT_DISK3_TC8566, "disk", 3, 2, 1, 2, "mainrom", 0x1c000); + add_internal_slot(config, MSX_SLOT_MUSIC, "msxmusic", 3, 3, 1, 1, "mainrom", 0x00000).set_ym2413_tag("ym2413"); + add_internal_slot(config, MSX_SLOT_ROM, "basickun", 3, 3, 2, 1, "mainrom", 0x04000); + + MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); + + msx_ym2413(config); + + msx2plus(SND_AY8910, config); +} + +/* MSX2+ - Sanyo Wavy PHC-70FD2 */ + +ROM_START(phc70fd2) + ROM_REGION(0x20000, "mainrom", 0) + ROM_LOAD("70f2bios.rom", 0x0000, 0x8000, CRC(19771608) SHA1(e90f80a61d94c617850c415e12ad70ac41e66bb7)) + + ROM_REGION(0x4000, "subrom", 0) + ROM_LOAD("70f2ext.rom", 0x0000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) + + ROM_REGION(0x4000, "diskrom", 0) + ROM_LOAD("70f2disk.rom", 0x0000, 0x4000, CRC(db7f1125) SHA1(9efa744be8355675e7bfdd3976bbbfaf85d62e1d)) + + ROM_REGION(0x8000, "kdr", 0) + ROM_LOAD("70f2kdr.rom", 0x0000, 0x8000, CRC(a068cba9) SHA1(1ef3956f7f918873fb9b031339bba45d1e5e5878)) + + ROM_REGION(0x4000, "msxmusic", 0) + ROM_LOAD("70f2mus.rom", 0x0000, 0x4000, CRC(5c32eb29) SHA1(aad42ba4289b33d8eed225d42cea930b7fc5c228)) + + ROM_REGION(0x4000, "basickun", 0) + ROM_LOAD("70f2bas.rom", 0x0000, 0x4000, CRC(da7be246) SHA1(22b3191d865010264001b9d896186a9818478a6b)) + + ROM_REGION(0x40000, "kanji", 0) + ROM_LOAD("70f2kfn.rom", 0, 0x40000, CRC(9a850db9) SHA1(bcdb4dae303dfe5234f372d70a5e0271d3202c36)) +ROM_END + +void msx2_state::phc70fd2(machine_config &config) +{ + // AY8910 + // FDC: tc8566af, 2 3.5" DSDD drives + // 2 Cartridge slots + // FM built-in + // T9769 + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 2, "mainrom"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "subrom"); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "kdr"); + add_internal_disk_mirrored(config, MSX_SLOT_DISK3_TC8566_2_DRIVES, "disk", 3, 2, 1, 2, "diskrom"); + add_internal_slot(config, MSX_SLOT_MUSIC, "msxmusic", 3, 3, 1, 1, "msxmusic").set_ym2413_tag("ym2413"); + add_internal_slot(config, MSX_SLOT_ROM, "basickun", 3, 3, 2, 1, "basickun"); + + MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0xff); + + msx_ym2413(config); + + msx2plus(SND_AY8910, config); +} + +/* MSX2+ - Sony HB-F1XDJ */ + +ROM_START(hbf1xdj) + ROM_REGION(0x20000, "mainrom", 0) + ROM_LOAD("hb-f1xdj_main.rom", 0x0000, 0x20000, CRC(d89bab74) SHA1(f2a1d326d72d4c70ea214d7883838de8847a82b7)) + + ROM_REGION(0x100000, "firmware", 0) + ROM_LOAD("f1xjfirm.rom", 0x000000, 0x100000, CRC(77be583f) SHA1(ade0c5ba5574f8114d7079050317099b4519e88f)) + + ROM_REGION(0x40000, "kanji", 0) + ROM_LOAD("f1xjkfn.rom", 0, 0x40000, CRC(7016dfd0) SHA1(218d91eb6df2823c924d3774a9f455492a10aecb)) +ROM_END + +void msx2_state::hbf1xdj(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: MB89311, 1 3.5" DSDD drive + // 2 Cartridge slots + // FM built-in + // S-1985 MSX Engine + // speed controller + // pause button + // ren-sha turbo + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_SONY08, "firmware", 0, 3, 0, 4, "firmware"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "mainrom", 0x8000); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "mainrom", 0x10000); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N, "disk", 3, 2, 1, 2, "mainrom", 0xc000); + add_internal_slot(config, MSX_SLOT_MUSIC, "msxmusic", 3, 3, 1, 1, "mainrom", 0x18000).set_ym2413_tag("ym2413"); + + MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0x00); + + MSX_S1985(config, "s1985", 0); + + msx_ym2413(config); + + msx2plus(SND_YM2149, config); +} + +/* MSX2+ - Sony HB-F1XV */ + +ROM_START(hbf1xv) + ROM_REGION(0x20000, "mainrom", 0) + ROM_LOAD("hb-f1xdj_main.rom", 0x0000, 0x20000, CRC(d89bab74) SHA1(f2a1d326d72d4c70ea214d7883838de8847a82b7)) + + ROM_REGION(0x100000, "firmware", 0) + ROM_LOAD("f1xvfirm.rom", 0x0, 0x100000, CRC(77be583f) SHA1(ade0c5ba5574f8114d7079050317099b4519e88f)) + + ROM_REGION(0x40000, "kanji", 0) + ROM_LOAD("f1xvkfn.rom", 0, 0x40000, CRC(7016dfd0) SHA1(218d91eb6df2823c924d3774a9f455492a10aecb)) +ROM_END + +void msx2_state::hbf1xv(machine_config &config) +{ + // YM2149 (in S-1985 MSX Engine) + // FDC: mb89311, 1 3.5" DSDD drives + // 2 Cartridge slots + // FM built-in + // S-1985 MSX Engine + // speed controller + // pause button + // ren-sha turbo + + add_internal_slot(config, MSX_SLOT_ROM, "mainrom", 0, 0, 0, 2, "mainrom"); + add_internal_slot(config, MSX_SLOT_SONY08, "firmware", 0, 3, 0, 4, "firmware"); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x10000).set_ramio_bits(0x80); // 64KB Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "subrom", 3, 1, 0, 1, "mainrom", 0x8000); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "mainrom", 0x10000); + add_internal_disk_mirrored(config, MSX_SLOT_DISK1_WD2793_N, "disk", 3, 2, 1, 2, "mainrom", 0xc000); + add_internal_slot(config, MSX_SLOT_MUSIC, "msxmusic", 3, 3, 1, 1, "mainrom", 0x18000).set_ym2413_tag("ym2413"); + + MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0x00); + + MSX_S1985(config, "s1985", 0); + + msx_ym2413(config); + + msx2plus(SND_YM2149, config); +} + +/* MSX Turbo-R - Panasonic FS-A1GT */ + +ROM_START(fsa1gt) + ROM_REGION(0x46c000, "maincpu", 0) + ROM_LOAD("a1gtbios.rom", 0x0000, 0x8000, CRC(937c8dbb) SHA1(242e73d8284a012b275c0a266844ebbc4269d787)) + ROM_LOAD("a1gtext.rom", 0x8000, 0x4000, CRC(70aea0fe) SHA1(018d7a5222f28514908fb1b1513286a6558a6d05)) + ROM_LOAD("a1gtdos.rom", 0xc000, 0x10000, CRC(bb2a0eae) SHA1(4880bf34f1c86fff5456ec2b4cf70d02339e2caa)) + ROM_LOAD("a1gtkdr.rom", 0x1c000, 0x8000, CRC(eaf0d125) SHA1(5b39c1ccd3a213b78e02927f56a9abc72cd8c28d)) + ROM_LOAD("a1gtmus.rom", 0x24000, 0x4000, CRC(f5f93437) SHA1(6aea1aef5ec31c1826c22edf580525f93baad425)) + ROM_LOAD("a1gtopt.rom", 0x28000, 0x4000, CRC(50d11f60) SHA1(b4433a3975c57dd440d6bf12dbd28b2ac1b90ef4)) + ROM_LOAD("a1gtkfn.rom", 0x2c000, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) + ROM_LOAD("a1gtfirm.rom", 0x6c000, 0x400000, CRC(feefeadc) SHA1(e779c338eb91a7dea3ff75f3fde76b8af22c4a3a)) +ROM_END + +void msx2_state::fsa1gt(machine_config &config) +{ + // AY8910 (in T9769) + // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots + // T9769C + S1990 + // FM built-in + // Microphone + // MIDI-in + // MIDI-out + // firmware switch + // pause button + // ren-sha turbo slider + + add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu"); + add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 0, 2, 1, 1, "maincpu", 0x24000).set_ym2413_tag("ym2413"); + add_internal_slot(config, MSX_SLOT_ROM, "opt", 0, 3, 1, 1, "maincpu", 0x28000); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000); // 128KB?? Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x1c000); + add_internal_disk(config, MSX_SLOT_DISK4_TC8566, "dos", 3, 2, 1, 3, "maincpu", 0xc000); + add_internal_slot(config, MSX_SLOT_ROM, "firm", 3, 3, 0, 4, "maincpu", 0x6c000); + + MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0x00); + + msx_ym2413(config); + + turbor(SND_AY8910, config); +} + +/* MSX Turbo-R - Panasonic FS-A1ST */ + +ROM_START(fsa1st) + ROM_REGION(0x46c000, "maincpu", 0) + ROM_LOAD("a1stbios.rom", 0x0000, 0x8000, CRC(77b94ae0) SHA1(f078b5ec56884bfb81481d45c7151418770bff5a)) + ROM_LOAD("a1stext.rom", 0x8000, 0x4000, CRC(2c2c77a4) SHA1(373412f9c32762de1c3a7e27fc3d80614e0a0c8e)) + ROM_LOAD("a1stdos.rom", 0xc000, 0x10000, CRC(1fc71407) SHA1(5d2186658adcf4ce0c2d3232384b5712341108e5)) + ROM_LOAD("a1stkdr.rom", 0x1c000, 0x8000, CRC(eaf0d125) SHA1(5b39c1ccd3a213b78e02927f56a9abc72cd8c28d)) + ROM_LOAD("a1stmus.rom", 0x24000, 0x4000, CRC(fd7dec41) SHA1(e002a9b426732e6c2d31e548c40cf7c122348ce3)) + ROM_LOAD("a1stopt.rom", 0x28000, 0x4000, CRC(c6a4a2a1) SHA1(cb06dea7b025745f9d2b87dcf03ded615287ead3)) + ROM_LOAD("a1stkfn.rom", 0x2c000, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) + ROM_LOAD("a1stfirm.rom", 0x6c000, 0x400000, CRC(139ac99c) SHA1(c212b11fda13f83dafed688c54d098e7e47ab225)) +ROM_END + +void msx2_state::fsa1st(machine_config &config) +{ + // AY8910 (in T9769) + // FDC: tc8566af, 1 3.5" DSDD drive + // T9769C + S1990 + // 2 Cartridge slots + // FM built-in + // microphone + // firmware switch + // pause button + // ren-sha turbo slider + + add_internal_slot(config, MSX_SLOT_ROM, "bios", 0, 0, 0, 2, "maincpu"); + add_internal_slot(config, MSX_SLOT_MUSIC, "mus", 0, 2, 1, 1, "maincpu", 0x24000).set_ym2413_tag("ym2413"); + add_internal_slot(config, MSX_SLOT_ROM, "opt", 0, 3, 1, 1, "maincpu", 0x28000); + add_cartridge_slot<1>(config, 1); + add_cartridge_slot<2>(config, 2); + add_internal_slot(config, MSX_SLOT_RAM_MM, "ram_mm", 3, 0, 0, 4).set_total_size(0x20000); // 128KB?? Mapper RAM + add_internal_slot(config, MSX_SLOT_ROM, "ext", 3, 1, 0, 1, "maincpu", 0x8000); + add_internal_slot(config, MSX_SLOT_ROM, "kdr", 3, 1, 1, 2, "maincpu", 0x1c000); + add_internal_disk(config, MSX_SLOT_DISK4_TC8566, "dos", 3, 2, 1, 3, "maincpu", 0xc000); + add_internal_slot(config, MSX_SLOT_ROM, "firm", 3, 3, 0, 4, "maincpu", 0x6c000); + + MSX_SYSTEMFLAGS(config, "sysflags", m_maincpu, 0x00); + + msx_ym2413(config); + + turbor(SND_AY8910, config); +} + +} // anonymous namespace + +/* MSX2 */ +COMP(1985, canonv25, 0, 0, canonv25, msxjp, msx2_state, empty_init, "Canon", "V-25 (MSX2, Japan)", 0) +COMP(1985, canonv30f, 0, 0, canonv30f, msx2, msx2_state, empty_init, "Canon", "V-30F (MSX2, Japan)", 0) +COMP(1986, cpc300, 0, 0, cpc300, msx2kr, msx2_state, empty_init, "Daewoo", "IQ-2000 CPC-300 (MSX2, Korea)", 0) +COMP(1987, cpc300e, 0, 0, cpc300e, msx2kr, msx2_state, empty_init, "Daewoo", "IQ-2000 CPC-300E (MSX2, Korea)", 0) +COMP(1988, cpc330k, 0, 0, cpc330k, msx2kr, msx2_state, empty_init, "Daewoo", "CPC-330K KOBO (MSX2, Korea)", 0) +COMP(1987, cpc400, 0, 0, cpc400, msx2kr, msx2_state, empty_init, "Daewoo", "X-II CPC-400 (MSX2, Korea)", 0) +COMP(1988, cpc400s, 0, 0, cpc400s, msx2kr, msx2_state, empty_init, "Daewoo", "X-II CPC-400S (MSX2, Korea)", 0) +COMP(1990, cpc61, 0, 0, cpc61, msxkr, msx2_state, empty_init, "Daewoo", "Zemmix CPC-61 (MSX2, Korea)", 0) +COMP(1991, cpg120, 0, 0, cpg120, msx2kr, msx2_state, empty_init, "Daewoo", "Zemmix CPG-120 Normal (MSX2, Korea)", 0) +COMP(1986, fpc900, 0, 0, fpc900, msx2, msx2_state, empty_init, "Fenner", "FPC-900 (MSX2, Italy)", 0) +COMP(1986, expert20, 0, 0, expert20, msx2, msx2_state, empty_init, "Gradiente", "Expert 2.0 (MSX2, Brazil)", 0) +COMP(1985, mbh3, 0, 0, mbh3, msx2jp, msx2_state, empty_init, "Hitachi", "MB-H3 (MSX2, Japan)", 0) +COMP(1986, mbh70, 0, 0, mbh70, msx2jp, msx2_state, empty_init, "Hitachi", "MB-H70 (MSX2, Japan)", MACHINE_NOT_WORKING) // How to enter/use the firmware? +COMP(1987, kmc5000, 0, 0, kmc5000, msx2jp, msx2_state, empty_init, "Kawai", "KMC-5000 (MSX2, Japan)", 0) +COMP(1986, mlg1, 0, 0, mlg1, msx2sp, msx2_state, empty_init, "Mitsubishi", "ML-G1 (MSX2, Spain)", 0) +COMP(1986, mlg3, 0, 0, mlg3, msx2sp, msx2_state, empty_init, "Mitsubishi", "ML-G3 (MSX2, Spain)", 0) +COMP(1985, mlg10, 0, 0, mlg10, msx2jp, msx2_state, empty_init, "Mitsubishi", "ML-G10 (MSX2, Japan)", 0) +COMP(1985, mlg30, 0, 0, mlg30, msx2jp, msx2_state, empty_init, "Mitsubishi", "ML-G30 Model 1 (MSX2, Japan)", 0) +COMP(1985, mlg30_2, 0, 0, mlg30_2, msx2jp, msx2_state, empty_init, "Mitsubishi", "ML-G30 Model 2 (MSX2, Japan)", 0) +COMP(1986, fs4500, 0, 0, fs4500, msx2jp, msx2_state, empty_init, "National", "FS-4500 (MSX2, Japan)", 0) +COMP(1986, fs4600f, 0, 0, fs4600f, msx2jp, msx2_state, empty_init, "National", "FS-4600F (MSX2, Japan)", 0) +COMP(1986, fs4700f, 0, 0, fs4700f, msx2jp, msx2_state, empty_init, "National", "FS-4700F (MSX2, Japan)", 0) +COMP(1986, fs5000f2, 0, 0, fs5000f2, msx2jp, msx2_state, empty_init, "National", "FS-5000F2 (MSX2, Japan)", 0) +COMP(1985, fs5500f1, fs5500f2, 0, fs5500f1, msx2jp, msx2_state, empty_init, "National", "FS-5500F1 (MSX2, Japan)", 0) +COMP(1985, fs5500f2, 0, 0, fs5500f2, msx2jp, msx2_state, empty_init, "National", "FS-5500F2 (MSX2, Japan)", 0) +COMP(1986, fsa1, fsa1a, 0, fsa1, msxjp, msx2_state, empty_init, "Panasonic", "FS-A1 / 1st released version (MSX2, Japan)", 0) +COMP(1986, fsa1a, 0, 0, fsa1a, msxjp, msx2_state, empty_init, "Panasonic", "FS-A1 / 2nd released version (MSX2, Japan)", 0) +COMP(1987, fsa1mk2, 0, 0, fsa1mk2, msx2jp, msx2_state, empty_init, "Panasonic", "FS-A1MK2 (MSX2, Japan)", 0) +COMP(1987, fsa1f, 0, 0, fsa1f, msx2jp, msx2_state, empty_init, "Panasonic", "FS-A1F (MSX2, Japan)", 0) +COMP(1988, fsa1fm, 0, 0, fsa1fm, msx2jp, msx2_state, empty_init, "Panasonic", "FS-A1FM (MSX2, Japan)", MACHINE_NOT_WORKING) // Modem not emulated, firmware partially working +COMP(1987, nms8220, 0, 0, nms8220, msx, msx2_state, empty_init, "Philips", "NMS 8220 (MSX2, Europe)", 0) +COMP(1987, nms8245, 0, 0, nms8245, msx, msx2_state, empty_init, "Philips", "NMS 8245 (MSX2, Europe)", 0) +COMP(1987, nms8245f, nms8245, 0, nms8245f, msxfr, msx2_state, empty_init, "Philips", "NMS 8245F (MSX2, France)", 0) +COMP(1987, nms8250, nms8255, 0, nms8250, msx2, msx2_state, empty_init, "Philips", "NMS 8250 (MSX2, Europe)", 0) +COMP(1987, nms8250_16, nms8255, 0, nms8250, msx2sp, msx2_state, empty_init, "Philips", "NMS 8250/16 (MSX2, Spain)", 0) +COMP(1987, nms8250_19, nms8255, 0, nms8250, msx2fr, msx2_state, empty_init, "Philips", "NMS 8250/19 (MSX2, France)", 0) +COMP(1987, nms8255, 0, 0, nms8255, msx2, msx2_state, empty_init, "Philips", "NMS 8255 (MSX2, Europe)", 0) +COMP(1987, nms8255f, nms8255, 0, nms8255f, msx2fr, msx2_state, empty_init, "Philips", "NMS 8255F (MSX2, France)", 0) +COMP(1987, nms8260, 0, 0, nms8260, msx2, msx2_state, empty_init, "Philips", "NMS 8260 (MSX2, Prototype)", MACHINE_NOT_WORKING) +COMP(1987, nms8280, 0, 0, nms8280, msx2, msx2_state, empty_init, "Philips", "NMS 8280 (MSX2, Europe)", 0) +COMP(1986, nms8280f, nms8280, 0, nms8280f, msx2fr, msx2_state, empty_init, "Philips", "NMS 8280F (MSX2, France)", 0) +COMP(1986, nms8280g, nms8280, 0, nms8280g, msx2de, msx2_state, empty_init, "Philips", "NMS 8280G (MSX2, Germany)", 0) +COMP(1986, vg8230, 0, 0, vg8230, msx, msx2_state, empty_init, "Philips", "VG-8230 (MSX2, Netherlands)", 0) +COMP(1986, vg8235, 0, 0, vg8235, msx, msx2_state, empty_init, "Philips", "VG-8235 (MSX2, Europe)", 0) +COMP(1986, vg8235f, vg8235, 0, vg8235f, msxfr, msx2_state, empty_init, "Philips", "VG-8235F (MSX2, France)", 0) +COMP(1986, vg8240, 0, 0, vg8240, msx, msx2_state, empty_init, "Philips", "VG-8240 (MSX2, Prototype)", 0) +COMP(1987, ucv102, 0, 0, ucv102, msx2jp, msx2_state, empty_init, "Pioneer", "UC-V102 (MSX2, Japan)", 0) +COMP(1987, ax350, ax350ii, 0, ax350, msx, msx2_state, empty_init, "Sakhr", "AX-350 (MSX2, Arabic)", 0) +COMP(1987, ax350ii, 0, 0, ax350ii, msx, msx2_state, empty_init, "Sakhr", "AX-350 II (MSX2, Arabic)", 0) +COMP(1987, ax350iif, ax350ii, 0, ax350iif, msxfr, msx2_state, empty_init, "Sakhr", "AX-350 II F (MSX2, Arabic)", 0) +COMP(1988, ax370, 0, 0, ax370, msx2, msx2_state, empty_init, "Sakhr", "AX-370 (MSX2, Arabic)", 0) +COMP(1987, ax500, 0, 0, ax500, msx2, msx2_state, empty_init, "Sakhr", "AX-500 (MSX2, Arabic)", 0) +COMP(1987, mpc2300, 0, 0, mpc2300, msxru, msx2_state, empty_init, "Sanyo", "MPC-2300 (MSX2, USSR)", 0) +COMP(1987, mpc2500f, 0, 0, mpc2500f, msx2ru, msx2_state, empty_init, "Sanyo", "MPC-2500FD (MSX2, USSR)", 0) +COMP(1985, mpc25fd, 0, 0, mpc25fd, msx2jp, msx2_state, empty_init, "Sanyo", "MPC-25FD (MSX2, Japan)", 0) +COMP(1985, mpc25fs, 0, 0, mpc25fs, msx2jp, msx2_state, empty_init, "Sanyo", "MPC-25FS (MSX2, Japan)", 0) +COMP(1985, mpc27, 0, 0, mpc27, msx2jp, msx2_state, empty_init, "Sanyo", "MPC-27 (MSX2, Japan)", MACHINE_NOT_WORKING) // Light pen not emulated +COMP(1986, phc23, 0, 0, phc23, msx2jp, msx2_state, empty_init, "Sanyo", "PHC-23 / Wavy23 (MSX2, Japan)", 0) +//COMP(1987, phc23j, 0, 0, phc23, msx2jp, msx2_state, empty_init, "Sanyo", "PHC-23J / Wavy23 (MSX2, Japan)", 0) // different keyboard layout +COMP(1987, phc23jb, 0, 0, phc23jb, msx2jp, msx2_state, empty_init, "Sanyo", "PHC-23JB / Wavy23 (MSX2, Japan)", 0) +COMP(1988, phc55fd2, 0, 0, phc55fd2, msx2jp, msx2_state, empty_init, "Sanyo", "PHC-55FD2 / Wavy55FD2 (MSX2, Japan)", 0) +COMP(1987, phc77, 0, 0, phc77, msx2jp, msx2_state, empty_init, "Sanyo", "PHC-77 / Wavy77 (MSX2, Japan)", 0) +COMP(1986, hotbit20, 0, 0, hotbit20, msx2, msx2_state, empty_init, "Sharp / Epcom", "HB-8000 Hotbit 2.0 (MSX2)", 0) +COMP(1986, hbf1, hbf1xd, 0, hbf1, msxjp, msx2_state, empty_init, "Sony", "HB-F1 (MSX2, Japan)", 0) +COMP(1987, hbf1ii, hbf1xd, 0, hbf1ii, msxjp, msx2_state, empty_init, "Sony", "HB-F1II (MSX2, Japan)", 0) +COMP(1987, hbf1xd, 0, 0, hbf1xd, msx2jp, msx2_state, empty_init, "Sony", "HB-F1XD (MSX2, Japan)", 0) +COMP(1985, hbf5, 0, 0, hbf5, msx2jp, msx2_state, empty_init, "Sony", "HB-F5 (MSX2, Japan)", 0) +COMP(1986, hbf9p, 0, 0, hbf9p, msx2uk, msx2_state, empty_init, "Sony", "HB-F9P (MSX2, Europe)", 0) +COMP(19??, hbf9pr, hbf9p, 0, hbf9pr, msx2ru, msx2_state, empty_init, "Sony", "HB-F9P (MSX2, Russian, prototype)", 0) +COMP(1986, hbf9s, hbf9p, 0, hbf9s, msx2sp, msx2_state, empty_init, "Sony", "HB-F9S (MSX2, Spain)", 0) +COMP(1986, hbf500, hbf500p, 0, hbf500, msx2jp, msx2_state, empty_init, "Sony", "HB-F500 (MSX2, Japan)", 0) +COMP(1986, hbf500_2, hbf500p, 0, hbf500_2, msx2jp, msx2_state, empty_init, "Sony", "HB-F500 2nd version (MSX2, Japan)", 0) +COMP(1986, hbf500f, hbf500p, 0, hbf500f, msx2fr, msx2_state, empty_init, "Sony", "HB-F500F (MSX2, France)", 0) +COMP(1986, hbf500p, 0, 0, hbf500p, msx2, msx2_state, empty_init, "Sony", "HB-F500P (MSX2, Europe)", 0) +COMP(1986, hbf700d, hbf700p, 0, hbf700d, msx2de, msx2_state, empty_init, "Sony", "HB-F700D (MSX2, Germany)", 0) +COMP(1986, hbf700f, hbf700p, 0, hbf700f, msx2fr, msx2_state, empty_init, "Sony", "HB-F700F (MSX2, France)", 0) +COMP(1986, hbf700p, 0, 0, hbf700p, msx2uk, msx2_state, empty_init, "Sony", "HB-F700P (MSX2, Europe)", 0) +COMP(1986, hbf700s, hbf700p, 0, hbf700s, msx2sp, msx2_state, empty_init, "Sony", "HB-F700S (MSX2, Spain)", 0) +COMP(1986, hbf900, hbf900a, 0, hbf900, msx2jp, msx2_state, empty_init, "Sony", "HB-F900 (MSX2, Japan)", 0) +COMP(1986, hbf900a, 0, 0, hbf900, msx2jp, msx2_state, empty_init, "Sony", "HB-F900 (alt) (MSX2, Japan)", 0) +COMP(1987, hbg900ap, hbg900p, 0, hbg900ap, msx2uk, msx2_state, empty_init, "Sony", "HB-G900AP (MSX2, Europe)", MACHINE_NOT_WORKING) // rs232 not communicating +COMP(1986, hbg900p, 0, 0, hbg900p, msx2uk, msx2_state, empty_init, "Sony", "HB-G900P (MSX2, Europe)", MACHINE_NOT_WORKING) // rs232 not communicating +COMP(1987, tpc310, 0, 0, tpc310, msxsp, msx2_state, empty_init, "Talent", "TPC-310 (MSX2, Argentina)", 0) +COMP(1987, tpp311, 0, 0, tpp311, msxsp, msx2_state, empty_init, "Talent", "TPP-311 (MSX2, Argentina)", 0) +COMP(1987, tps312, 0, 0, tps312, msxsp, msx2_state, empty_init, "Talent", "TPS-312 (MSX2, Argentina)", 0) +COMP(1985, hx23, hx23f, 0, hx23, msxjp, msx2_state, empty_init, "Toshiba", "HX-23 (MSX2, Japan)", MACHINE_NOT_WORKING) // firmware goes into an infinite loop on the title screen +COMP(1985, hx23f, 0, 0, hx23f, msxjp, msx2_state, empty_init, "Toshiba", "HX-23F (MSX2, Japan)", MACHINE_NOT_WORKING) // firmware goes into an infinite loop on the title screen +COMP(1985, hx33, hx34, 0, hx33, msxjp, msx2_state, empty_init, "Toshiba", "HX-33 w/HX-R702 (MSX2, Japan)", MACHINE_NOT_WORKING) // half the pixels are missing in the firmware? +COMP(1985, hx34, 0, 0, hx34, msx2jp, msx2_state, empty_init, "Toshiba", "HX-34 w/HX-R703 (MSX2, Japan)", 0) +COMP(1986, fstm1, 0, 0, fstm1, msx, msx2_state, empty_init, "Toshiba", "FS-TM1 (MSX2, Italy)", 0) +COMP(1986, victhc80, 0, 0, victhc80, msxjp, msx2_state, empty_init, "Victor", "HC-80 (MSX2, Japan)", 0) +COMP(1986, victhc90, victhc95, 0, victhc90, msx2jp, msx2_state, empty_init, "Victor", "HC-90 (MSX2, Japan)", MACHINE_NOT_WORKING) // 2nd cpu/turbo not emulated, firmware won't start +COMP(1986, victhc95, 0, 0, victhc95, msx2jp, msx2_state, empty_init, "Victor", "HC-95 (MSX2, Japan)", MACHINE_NOT_WORKING) // 2nd cpu/turbo not emulated, firmware won't start +COMP(1986, victhc95a, victhc95, 0, victhc95a, msx2jp, msx2_state, empty_init, "Victor", "HC-95A (MSX2, Japan)", MACHINE_NOT_WORKING) // 2nd cpu/turbo not emulated, firmware won't start +COMP(1985, cx7128, cx7m128, 0, cx7128, msxjp, msx2_state, empty_init, "Yamaha", "CX7/128 (MSX2, Japan)", 0) +COMP(1985, cx7m128, 0, 0, cx7m128, msxjp, msx2_state, empty_init, "Yamaha", "CX7M/128 (MSX2, Japan)", 0) +COMP(1985, y503iiir, 0, 0, y503iiir, msxru, msx2_state, empty_init, "Yamaha", "YIS-503 III R (MSX2, USSR)", MACHINE_NOT_WORKING) // network not implemented +COMP(198?, y503iiire, y503iiir, 0, y503iiir, msx2, msx2_state, empty_init, "Yamaha", "YIS-503 III R (MSX2, Estonian)", MACHINE_NOT_WORKING) // network not implemented +COMP(1985, yis604, 0, 0, yis604, msx2jp, msx2_state, empty_init, "Yamaha", "YIS604/128 (MSX2, Japan)", 0) +COMP(1986, y805128, y805256, 0, y805128, msx2jp, msx2_state, empty_init, "Yamaha", "YIS805/128 (MSX2, Japan)", MACHINE_NOT_WORKING) // Floppy support broken +COMP(1986, y805128r2, y805256, 0, y805128r2, msx2, msx2_state, empty_init, "Yamaha", "YIS805/128R2 (MSX2, USSR)", MACHINE_NOT_WORKING) // Floppy support broken, network not implemented +COMP(198?, y805128r2e, y805256, 0, y805128r2, y503iir2, msx2_state, empty_init, "Yamaha", "YIS805/128R2 (MSX2, Estonian)", MACHINE_NOT_WORKING) // Floppy support broken, network not implemented +COMP(198?, y805256, 0, 0, y805256, msx2jp, msx2_state, empty_init, "Yamaha", "YIS805/256 (MSX2, Japan)", MACHINE_NOT_WORKING) // Floppy support broken? + +/* MSX2+ */ +COMP(19??, expert3i, 0, 0, expert3i, msx2, msx2_state, empty_init, "Ciel", "Expert 3 IDE (MSX2+, Brazil)", MACHINE_NOT_WORKING) // Some hardware not emulated +COMP(1996, expert3t, 0, 0, expert3t, msx2, msx2_state, empty_init, "Ciel", "Expert 3 Turbo (MSX2+, Brazil)", MACHINE_NOT_WORKING) // Some hardware not emulated +COMP(19??, expertac, 0, 0, expertac, msx2, msx2_state, empty_init, "Gradiente", "Expert AC88+ (MSX2+, Brazil)", MACHINE_NOT_WORKING) // Some hardware not emulated +COMP(19??, expertdx, 0, 0, expertdx, msx2, msx2_state, empty_init, "Gradiente", "Expert DDX+ (MSX2+, Brazil)", MACHINE_NOT_WORKING) // Some hardware not emulated +COMP(1988, fsa1fx, 0, 0, fsa1fx, msx2jp, msx2_state, empty_init, "Panasonic", "FS-A1FX (MSX2+, Japan)", 0) +COMP(1989, fsa1wsx, 0, 0, fsa1wsx, msx2jp, msx2_state, empty_init, "Panasonic", "FS-A1WSX (MSX2+, Japan)", 0) +COMP(1988, fsa1wx, fsa1wxa, 0, fsa1wx, msx2jp, msx2_state, empty_init, "Panasonic", "FS-A1WX / 1st released version (MSX2+, Japan)", 0) +COMP(1988, fsa1wxa, 0, 0, fsa1wx, msx2jp, msx2_state, empty_init, "Panasonic", "FS-A1WX / 2nd released version (MSX2+, Japan)", 0) +COMP(1988, phc70fd, phc70fd2, 0, phc70fd, msx2jp, msx2_state, empty_init, "Sanyo", "PHC-70FD / Wavy70FD (MSX2+, Japan)", 0) +COMP(1989, phc70fd2, 0, 0, phc70fd2, msx2jp, msx2_state, empty_init, "Sanyo", "PHC-70FD2 / Wavy70FD2 (MSX2+, Japan)", 0) +COMP(1989, phc35j, 0, 0, phc35j, msx2jp, msx2_state, empty_init, "Sanyo", "PHC-35J / Wavy35 (MSX2+, Japan)", 0) +COMP(1988, hbf1xdj, 0, 0, hbf1xdj, msx2jp, msx2_state, empty_init, "Sony", "HB-F1XDJ (MSX2+, Japan)", 0) +COMP(1989, hbf1xv, 0, 0, hbf1xv, msx2jp, msx2_state, empty_init, "Sony", "HB-F1XV (MSX2+, Japan)", 0) + +/* MSX Turbo-R */ +/* Temporary placeholders, Turbo-R hardware is not supported yet */ +COMP(1991, fsa1gt, 0, 0, fsa1gt, msx2jp, msx2_state, empty_init, "Panasonic", "FS-A1GT (MSX Turbo-R, Japan)", MACHINE_NOT_WORKING) +COMP(1991, fsa1st, 0, 0, fsa1st, msx2jp, msx2_state, empty_init, "Panasonic", "FS-A1ST (MSX Turbo-R, Japan)", MACHINE_NOT_WORKING) diff --git a/src/mame/msx/msx_kanji12.cpp b/src/mame/msx/msx_kanji12.cpp new file mode 100644 index 00000000000..e5d43ec64ed --- /dev/null +++ b/src/mame/msx/msx_kanji12.cpp @@ -0,0 +1,88 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +#include "emu.h" +#include "msx_kanji12.h" + + +DEFINE_DEVICE_TYPE(MSX_KANJI12, msx_kanji12_device, "msx_kanji12", "MSX Kanji12") + +msx_kanji12_device::msx_kanji12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, MSX_KANJI12, tag, owner, clock) + , m_rom_region(*this, finder_base::DUMMY_TAG) + , m_selected(false) +{ +} + + +void msx_kanji12_device::device_start() +{ + // Sanity checks + if (m_rom_region->bytes() != 0x20000) + { + fatalerror("Memory region '%s' has incorrect size for rom slot '%s'\n", m_rom_region.finder_tag(), tag()); + } + + save_item(NAME(m_selected)); + save_item(NAME(m_row)); + save_item(NAME(m_col)); + save_item(NAME(m_address)); +} + + +u8 msx_kanji12_device::switched_read(offs_t offset) +{ + if (m_selected) + { + switch (offset) + { + case 0: + // Manufacturer ID number register + return MANUFACTURER_ID ^ 0xff; + + case 9: + if (m_address < m_rom_region->bytes()) + { + uint8_t data = m_rom_region->base()[m_address]; + if (!machine().side_effects_disabled()) + m_address++; + return data; + } + break; + + default: + logerror("msx_kanji12: unhandled read from offset %02x\n", offset); + break; + } + } + + return 0xff; +} + + +void msx_kanji12_device::switched_write(offs_t offset, u8 data) +{ + if (offset == 0) + { + // Manufacturer ID number register + m_selected = (data == MANUFACTURER_ID); + } + else if (m_selected) + { + switch (offset) + { + case 7: + m_row = data; + m_address = 0x800 + (m_row * 192 + m_col) * 18; + break; + + case 8: + m_col = data; + m_address = 0x800 + (m_row * 192 + m_col) * 18; + break; + + default: + logerror("msx_kanji12: unhandled write %02x to offset %02x\n", data, offset); + break; + } + } +} diff --git a/src/mame/msx/msx_kanji12.h b/src/mame/msx/msx_kanji12.h new file mode 100644 index 00000000000..ea8c1ae6477 --- /dev/null +++ b/src/mame/msx/msx_kanji12.h @@ -0,0 +1,41 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +#ifndef MAME_MSX_MSX_KANJI12_H +#define MAME_MSX_MSX_KANJI12_H + +#pragma once + +#include "msx_switched.h" + + +DECLARE_DEVICE_TYPE(MSX_KANJI12, msx_kanji12_device) + + +class msx_kanji12_device : public device_t, + public msx_switched_interface +{ +public: + msx_kanji12_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + // configuration helpers + void set_rom_start(const char *region) { m_rom_region.set_tag(region); } + + // msx_switched_interface overrides + virtual u8 switched_read(offs_t offset) override; + virtual void switched_write(offs_t offset, u8 data) override; + +protected: + // device-level overrides + virtual void device_start() override; + +private: + static constexpr u8 MANUFACTURER_ID = 0xf7; + required_memory_region m_rom_region; + + bool m_selected; + u8 m_row; + u8 m_col; + u32 m_address; +}; + +#endif // MAME_MSX_MSX_KANJI12_H diff --git a/src/mame/msx/msx_keyboard.cpp b/src/mame/msx/msx_keyboard.cpp new file mode 100644 index 00000000000..de62392ea5e --- /dev/null +++ b/src/mame/msx/msx_keyboard.cpp @@ -0,0 +1,828 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol + +#include "emu.h" +#include "msx_keyboard.h" + +namespace msx_keyboard { + +static INPUT_PORTS_START(msx_dips) + PORT_START("JOY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_DIPNAME(0x80, 0, "Game port 1") + PORT_DIPSETTING(0x00, DEF_STR(Joystick)) + PORT_DIPSETTING(0x80, "Mouse") + + PORT_START("JOY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(2) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(2) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_PLAYER(2) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_DIPNAME(0x80, 0, "Game port 2") + PORT_DIPSETTING(0x00, DEF_STR(Joystick)) + PORT_DIPSETTING(0x80, "Mouse") + + PORT_START("DSW") + PORT_DIPNAME(0x40, 0, "Swap game port 1 and 2") + PORT_DIPSETTING(0, DEF_STR(No)) + PORT_DIPSETTING(0x40, DEF_STR(Yes)) + + PORT_START("MOUSE0") + PORT_BIT(0xff00, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) + PORT_BIT(0x00ff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) + + PORT_START("MOUSE1") + PORT_BIT(0xff00, 0x00, IPT_TRACKBALL_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(2) + PORT_BIT(0x00ff, 0x00, IPT_TRACKBALL_Y) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(2) +INPUT_PORTS_END + +/* 2008-05 FP: About keyboards + +Even if some later Philips (and maybe others) models started to use a layout similar to current +PC keyboards, common MSX keyboards have a couple of keys which do not fit usual mapping +- the key in the 1st row before 'Backspace', 3rd key from '0', here re-mapped to KEYCODE_BACKSLASH2 +- the last key in the 4th row, 4th key from 'M' (not counting Shift), here re-mapped to KEYCODE_TILDE + +These keys corresponds to the following symbols + + input_port | msx | msxuk | msxjp | msxkr |hotbit |expert | + ------------------------------------------------------------- + BACKSLASH2 | \ | | \ | | ¥ | | ₩ | | \ ^ | { } | + ------------------------------------------------------------- + TILDE | DK* | DK* | _ | _ | < > | / ? | + +* DK = "Dead Key" +msx2 input_ports have the same symbols as their msx counterparts. + +TO DO: +- check Expert 1.0 layout with the real thing +- check Korean layout + +Additional note about natural keyboard support: currently, +- "Graph" is mapped to 'F6' (this key could be labeled "L Graph") +- "Code" is mapped to 'F7' (this key could be labeled "R Graph", "Kana" or "Hangul") +- "Stop" is mapped to 'F8' +- "Select" is mapped to 'F9' +*/ + + +INPUT_PORTS_START(msx) + PORT_START("KEY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') + + PORT_START("KEY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\\') PORT_CHAR('|') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') + + PORT_START("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('`') PORT_CHAR('~') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Dead Key") PORT_CODE(KEYCODE_TILDE) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') + + PORT_START("KEY3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') + + PORT_START("KEY4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') + + PORT_START("KEY5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') + + PORT_START("KEY6") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("GRAPH") PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(F6)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CODE") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F7)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1 F6") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2 F7") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F3 F8") PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) + + PORT_START("KEY7") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F4 F9") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F5 F10") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("STOP") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(F8)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SELECT") PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(F9)) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) + + PORT_START("KEY8") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL") PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) + + PORT_START("KEY9") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("KEY10") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_INCLUDE(msx_dips) +INPUT_PORTS_END + + +INPUT_PORTS_START(msxde) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR(0xa7) // U+00A7, section sign + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/') + + PORT_MODIFY("KEY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR(0xdf) // U+00DF, sharp s + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_NAME("Dead key") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('<') PORT_CHAR('>') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(0xfc) PORT_CHAR(0xdc) // U+00FC, u with diaeresis, and U+00DC, U with diaeresis + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('+') PORT_CHAR('*') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xf6) PORT_CHAR(0xd6) // U+00F6, o with diaeresis, and U+00D6, O with diaeresis + + PORT_MODIFY("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0xe4) PORT_CHAR(0xc4) // U+00E4, a with diaeresis, and U+00C4, A with diaeresis + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('#') PORT_CHAR('^') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('-') PORT_CHAR('_') + + PORT_MODIFY("KEY5") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('y') PORT_CHAR('Y') +INPUT_PORTS_END + + +INPUT_PORTS_START(msxfr) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR(0xe0) PORT_CHAR('0') // U+00E0, a with grave + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('&') PORT_CHAR('1') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR(0xe9) PORT_CHAR('2') // U+00E9, e with acute + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('"') PORT_CHAR('3') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('\'') PORT_CHAR('4') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('(') PORT_CHAR('5') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR(0xa7) PORT_CHAR('6') // U+00A7, section sign + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR(0xe8) PORT_CHAR('7') // U+00E8, e with grave + + PORT_MODIFY("KEY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('!') PORT_CHAR('8') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR(0xe7) PORT_CHAR('9') // U+00E7, c with cedilla + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR(')') PORT_CHAR(0xb0) // U+00B0, degree + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') PORT_CHAR('_') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('#') PORT_CHAR(0xa3) // U+00A3 - GBP sign + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("Dead key") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('$') PORT_CHAR('*') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR('m') PORT_CHAR('M') + + PORT_MODIFY("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0xf9) PORT_CHAR('%') // U+00F9 u grave + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('<') PORT_CHAR('>') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(';') PORT_CHAR('.') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR(':') PORT_CHAR('/') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('=') PORT_CHAR('+') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('q') PORT_CHAR('Q') + + PORT_MODIFY("KEY4") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR(',') PORT_CHAR('?') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') + + PORT_MODIFY("KEY5") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('w') PORT_CHAR('W') +INPUT_PORTS_END + + +INPUT_PORTS_START(msxjp) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') + + PORT_MODIFY("KEY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('=') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('^') PORT_CHAR('~') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR(0xa5) PORT_CHAR('|') // U+00A5 - Yen sign + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') PORT_CHAR('`') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') + + PORT_MODIFY("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(':') PORT_CHAR('*') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("_") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('_') + + PORT_MODIFY("KEY6") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("KANA") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F7)) +INPUT_PORTS_END + + +INPUT_PORTS_START(msxkr) + PORT_INCLUDE(msxjp) + + PORT_MODIFY("KEY1") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR(0xffe6) PORT_CHAR('|') // U+FFE6 Won sign + + PORT_MODIFY("KEY6") + PORT_BIT(0x0010, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Hangul") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F7)) +INPUT_PORTS_END + + +INPUT_PORTS_START(msxru) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR(')') PORT_CHAR('9') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('+') PORT_CHAR(';') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('!') PORT_CHAR('1') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('"') PORT_CHAR('2') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('#') PORT_CHAR('3') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR(0xa4) PORT_CHAR('4') // U+00A4 Currency sign + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('%') PORT_CHAR('5') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('&') PORT_CHAR('6') + + PORT_MODIFY("KEY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('\'') PORT_CHAR('7') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('(') PORT_CHAR('8') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('$') PORT_CHAR('0') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('_') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('-') PORT_CHAR('^') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('*') PORT_CHAR(':') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR('v') PORT_CHAR('V') + + PORT_MODIFY("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\\') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('>') PORT_CHAR('.') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR('b') PORT_CHAR('B') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('@') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('<') PORT_CHAR(',') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('?') PORT_CHAR('/') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('i') PORT_CHAR('I') + + PORT_MODIFY("KEY3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('w') PORT_CHAR('W') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('u') PORT_CHAR('U') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('p') PORT_CHAR('P') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('r') PORT_CHAR('R') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('o') PORT_CHAR('O') + + PORT_MODIFY("KEY4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('l') PORT_CHAR('L') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('x') PORT_CHAR('X') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('t') PORT_CHAR('T') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('j') PORT_CHAR('J') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('k') PORT_CHAR('K') + + PORT_MODIFY("KEY5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('y') PORT_CHAR('Y') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('e') PORT_CHAR('E') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('g') PORT_CHAR('G') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('c') PORT_CHAR('C') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('|') PORT_CHAR('~') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('n') PORT_CHAR('N') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('q') PORT_CHAR('Q') +INPUT_PORTS_END + + +INPUT_PORTS_START(msxsp) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY1") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xf1) PORT_CHAR(0xd1) // U+00F1 and U+00D1, n/N with tilde + + PORT_MODIFY("KEY2") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(';') PORT_CHAR(':') +INPUT_PORTS_END + + +INPUT_PORTS_START(msxuk) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY2") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(0xa3) PORT_CHAR('~') // U+00A3 - GBP sign +INPUT_PORTS_END + + +INPUT_PORTS_START(bruc100) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("Keypad *") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CUT LINE/DEL CUT?") // DEL CUT / CUT LINE? + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xe2\x86\x90WORD") // <-WORD + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("\xe2\x86\x92WORD") // ->WORD + + PORT_MODIFY("KEY10") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("END LINE") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('$') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('"') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('?') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('>') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('<') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR(')') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CHAR('(') +INPUT_PORTS_END + + +INPUT_PORTS_START(cf3000) + PORT_INCLUDE(msxjp) + + PORT_MODIFY("KEY9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) + + PORT_MODIFY("KEY10") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("Keypad *") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("Keypad .") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS_PAD) PORT_CHAR(UCHAR_MAMEKEY(EQUALS_PAD)) +INPUT_PORTS_END + + +INPUT_PORTS_START(expert10) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY2") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(0xc7) PORT_CHAR(0xe7) + + PORT_MODIFY("KEY6") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CONTROL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_SHIFT_2) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("L GRA") PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(F6)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("R GRA") PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(F7)) + + PORT_MODIFY("KEY9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) + PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED) +INPUT_PORTS_END + + +INPUT_PORTS_START(expert11) + PORT_INCLUDE(expert10) + + PORT_MODIFY("KEY0") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') + + PORT_MODIFY("KEY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('\'') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('{') PORT_CHAR('}') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('\'') PORT_CHAR('`') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('[') PORT_CHAR(']') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('~') PORT_CHAR('^') + + PORT_MODIFY("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('*') PORT_CHAR('@') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xc7) PORT_CHAR(0xe7) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('/') PORT_CHAR('?') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR(';') PORT_CHAR(':') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') +INPUT_PORTS_END + + +INPUT_PORTS_START(fs4000) + PORT_INCLUDE(msxjp) + + PORT_MODIFY("KEY9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) // PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("Keypad *") /* Mapped by the bios but there is actually no key for this */ + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) // PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) /* Mapped by the bios but there is actually no key for this */ + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) // PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) /* Mapped by the bios but there is actually no key for this */ + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) + + PORT_MODIFY("KEY10") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA_PAD) PORT_CHAR(UCHAR_MAMEKEY(COMMA_PAD)) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("Keypad .") +INPUT_PORTS_END + + +INPUT_PORTS_START(hotbit) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY0") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('"') + + PORT_MODIFY("KEY1") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('\'') PORT_CHAR('`') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('"') PORT_CHAR('`') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xc7) PORT_CHAR(0xe7) + + PORT_MODIFY("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('~') PORT_CHAR('^') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('[') PORT_CHAR(']') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('<') PORT_CHAR('>') +INPUT_PORTS_END + + +INPUT_PORTS_START(mlfx1) + PORT_INCLUDE(msxuk) + + PORT_MODIFY("KEY9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("Keypad *") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) + + PORT_MODIFY("KEY10") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(COMMA_PAD)) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) PORT_NAME("Keypad .") +INPUT_PORTS_END + + +static INPUT_PORTS_START(svi728_keypad) + PORT_MODIFY("KEY9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_NAME("Keypad *") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_MODIFY("KEY10") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) +INPUT_PORTS_END + + +INPUT_PORTS_START(svi728) + PORT_INCLUDE(msx) + PORT_INCLUDE(svi728_keypad) +INPUT_PORTS_END + + +INPUT_PORTS_START(svi728sp) + PORT_INCLUDE(msxsp) + PORT_INCLUDE(svi728_keypad) +INPUT_PORTS_END + + +INPUT_PORTS_START(svi738dk) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/') + + PORT_MODIFY("KEY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('+') PORT_CHAR('?') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('\'') PORT_CHAR('`') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('<') PORT_CHAR('>') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(0xe5) PORT_CHAR(0xc5) // U+00E5 and U+00C5, a/A with ring above + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('@') PORT_CHAR('^') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xe6) PORT_CHAR(0xc6) // U+00E6 and U+00C6, ae/AE + + PORT_MODIFY("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0xf8) PORT_CHAR(0xd8) // U+00F8 and U+00D8, o/O with stroke + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('~') PORT_CHAR('*') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('-') PORT_CHAR('_') +INPUT_PORTS_END + + +INPUT_PORTS_START(svi738sw) + PORT_INCLUDE(svi738dk) + + PORT_MODIFY("KEY1") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(0xe9) PORT_CHAR(0xc9) // U+00E9 and U+00C9, e/E with acute + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR(0xe5) PORT_CHAR(0xc5) // U+00E5 and U+00C5, a/A with ring above + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(0xfc) PORT_CHAR(0xdc) // U+00FC and U+00DC, u/U with diaeresis + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(0xf6) PORT_CHAR(0xd6) // U+00F6 and U+00D6, o/O with diaeresis + + PORT_MODIFY("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0xe4) PORT_CHAR(0xc4) // U+00F8 and U+00D8, a/A with diaeresis + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\'') PORT_CHAR('*') +INPUT_PORTS_END + + +INPUT_PORTS_START(vg8010) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\\') PORT_CHAR('|') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Dead Key") PORT_CODE(KEYCODE_TILDE) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') + + PORT_MODIFY("KEY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('`') PORT_CHAR('~') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') + + PORT_MODIFY("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') + + PORT_MODIFY("KEY3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') + + PORT_MODIFY("KEY4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') + + PORT_MODIFY("KEY5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') +INPUT_PORTS_END + + +INPUT_PORTS_START(vg8010f) + PORT_INCLUDE(vg8010) + + PORT_MODIFY("KEY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(';') PORT_CHAR('.') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('&') PORT_CHAR('1') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('#') PORT_CHAR(0xa3) // U+00A3 - GBP sign + + PORT_MODIFY("KEY1") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('q') PORT_CHAR('Q') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('<') PORT_CHAR('>') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') PORT_CHAR('_') + + PORT_MODIFY("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR(',') PORT_CHAR('?') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('w') PORT_CHAR('W') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('$') PORT_CHAR('*') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR(0xe0) PORT_CHAR('0') // U+00E0, a with grave + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('!') PORT_CHAR('8') + + PORT_MODIFY("KEY3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('=') PORT_CHAR('+') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR(0xe9) PORT_CHAR('2') // U+00E9, e with acute + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR(')') PORT_CHAR(0xb0) // U+00B0, degree + + PORT_MODIFY("KEY4") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR(0xe8) PORT_CHAR('7') // U+00E8, e with grave + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('"') PORT_CHAR('3') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0xf9) PORT_CHAR('%') // U+00F9, u grave + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR(0xa7) PORT_CHAR('6') // U+00A7, section sign + + PORT_MODIFY("KEY5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR(':') PORT_CHAR('/') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('\'') PORT_CHAR('4') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("Dead key") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR(0xe7) PORT_CHAR('9') // U+00E7, c with cedilla + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('(') PORT_CHAR('5') +INPUT_PORTS_END + + +INPUT_PORTS_START(y503iir2) + PORT_INCLUDE(msx) + + PORT_MODIFY("KEY0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('/') + + PORT_MODIFY("KEY1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('+') PORT_CHAR('?') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('\'') PORT_CHAR('`') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH2) PORT_CHAR('\'') PORT_CHAR('*') + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR('\\') PORT_CHAR('|') + + PORT_MODIFY("KEY2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('<') PORT_CHAR('>') + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('^') PORT_CHAR('~') + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';') + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':') + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('-') PORT_CHAR('_') +INPUT_PORTS_END + + +static INPUT_PORTS_START(msx2_keypad) + PORT_MODIFY("KEY9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) + + PORT_MODIFY("KEY10") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD)) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(COMMA_PAD)) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR(UCHAR_MAMEKEY(DEL_PAD)) +INPUT_PORTS_END + + +INPUT_PORTS_START(msx2) + PORT_INCLUDE(msx) + PORT_INCLUDE(msx2_keypad) +INPUT_PORTS_END + + +INPUT_PORTS_START(msx2de) + PORT_INCLUDE(msxde) + PORT_INCLUDE(msx2_keypad) +INPUT_PORTS_END + + +INPUT_PORTS_START(msx2fr) + PORT_INCLUDE(msxfr) + PORT_INCLUDE(msx2_keypad) +INPUT_PORTS_END + + +INPUT_PORTS_START(msx2jp) + PORT_INCLUDE(msxjp) + PORT_INCLUDE(msx2_keypad) +INPUT_PORTS_END + + +INPUT_PORTS_START(msx2kr) + PORT_INCLUDE(msxkr) + PORT_INCLUDE(msx2_keypad) +INPUT_PORTS_END + + +INPUT_PORTS_START(msx2ru) + PORT_INCLUDE(msxru) + PORT_INCLUDE(msx2_keypad) +INPUT_PORTS_END + + +INPUT_PORTS_START(msx2sp) + PORT_INCLUDE(msxsp) + PORT_INCLUDE(msx2_keypad) +INPUT_PORTS_END + + +INPUT_PORTS_START(msx2uk) + PORT_INCLUDE(msxuk) + PORT_INCLUDE(msx2_keypad) +INPUT_PORTS_END + +} // msx_keyboard namespace diff --git a/src/mame/msx/msx_keyboard.h b/src/mame/msx/msx_keyboard.h new file mode 100644 index 00000000000..1b4eda11669 --- /dev/null +++ b/src/mame/msx/msx_keyboard.h @@ -0,0 +1,43 @@ +// license:BSD-3-Clause +// copyright-holders:Wilbert Pol +#ifndef MAME_MSX_MSX_KEYBOARD_H +#define MAME_MSX_MSX_KEYBOARD_H + +#pragma once + +namespace msx_keyboard { + +INPUT_PORTS_EXTERN(msx); +INPUT_PORTS_EXTERN(msxde); +INPUT_PORTS_EXTERN(msxfr); +INPUT_PORTS_EXTERN(msxjp); +INPUT_PORTS_EXTERN(msxkr); +INPUT_PORTS_EXTERN(msxru); +INPUT_PORTS_EXTERN(msxsp); +INPUT_PORTS_EXTERN(msxuk); +INPUT_PORTS_EXTERN(bruc100); +INPUT_PORTS_EXTERN(cf3000); +INPUT_PORTS_EXTERN(expert10); +INPUT_PORTS_EXTERN(expert11); +INPUT_PORTS_EXTERN(fs4000); +INPUT_PORTS_EXTERN(hotbit); +INPUT_PORTS_EXTERN(mlfx1); +INPUT_PORTS_EXTERN(svi728); +INPUT_PORTS_EXTERN(svi728sp); +INPUT_PORTS_EXTERN(svi738dk); +INPUT_PORTS_EXTERN(svi738sw); +INPUT_PORTS_EXTERN(vg8010); +INPUT_PORTS_EXTERN(vg8010f); +INPUT_PORTS_EXTERN(y503iir2); +INPUT_PORTS_EXTERN(msx2); +INPUT_PORTS_EXTERN(msx2de); +INPUT_PORTS_EXTERN(msx2fr); +INPUT_PORTS_EXTERN(msx2jp); +INPUT_PORTS_EXTERN(msx2kr); +INPUT_PORTS_EXTERN(msx2ru); +INPUT_PORTS_EXTERN(msx2sp); +INPUT_PORTS_EXTERN(msx2uk); + +} + +#endif // MAME_MSX_MSX_KEYBOARD_H diff --git a/src/mame/msx/msx_matsushita.cpp b/src/mame/msx/msx_matsushita.cpp index 1153b3c21b3..ad4da191b66 100644 --- a/src/mame/msx/msx_matsushita.cpp +++ b/src/mame/msx/msx_matsushita.cpp @@ -3,11 +3,10 @@ #include "emu.h" #include "msx_matsushita.h" -const uint8_t manufacturer_id = 0x08; DEFINE_DEVICE_TYPE(MSX_MATSUSHITA, msx_matsushita_device, "msx_matsushita", "Matsushita switched device") -msx_matsushita_device::msx_matsushita_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_matsushita_device::msx_matsushita_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_MATSUSHITA, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_io_config(*this, "CONFIG") @@ -20,22 +19,19 @@ msx_matsushita_device::msx_matsushita_device(const machine_config &mconfig, cons { } - -static INPUT_PORTS_START( matsushita ) +static INPUT_PORTS_START(matsushita) PORT_START("CONFIG") - PORT_CONFNAME( 0x80, 0x00, "Firmware switch") - PORT_CONFSETTING( 0x00, "On" ) - PORT_CONFSETTING( 0x80, "Off" ) + PORT_CONFNAME(0x80, 0x00, "Firmware switch") + PORT_CONFSETTING(0x00, "On") + PORT_CONFSETTING(0x80, "Off") PORT_BIT(0x7F, IP_ACTIVE_LOW, IPT_UNUSED) INPUT_PORTS_END - ioport_constructor msx_matsushita_device::device_input_ports() const { - return INPUT_PORTS_NAME( matsushita ); + return INPUT_PORTS_NAME(matsushita); } - void msx_matsushita_device::device_start() { m_turbo_out_cb.resolve_safe(); @@ -50,42 +46,38 @@ void msx_matsushita_device::device_start() save_item(NAME(m_pattern)); } - void msx_matsushita_device::nvram_default() { - memset(&m_sram[0], 0x00, m_sram.size()); + std::fill_n(m_sram.data(), m_sram.size(), 0); } - bool msx_matsushita_device::nvram_read(util::read_stream &file) { size_t actual; return !file.read(&m_sram[0], m_sram.size(), actual) && actual == m_sram.size(); } - bool msx_matsushita_device::nvram_write(util::write_stream &file) { size_t actual; return !file.write(&m_sram[0], m_sram.size(), actual) && actual == m_sram.size(); } - -uint8_t msx_matsushita_device::switched_read(offs_t offset) +u8 msx_matsushita_device::switched_read(offs_t offset) { if (m_selected) { switch (offset) { case 0x00: - return manufacturer_id ^ 0xff; + return MANUFACTURER_ID ^ 0xff; case 0x01: return m_io_config->read(); case 0x03: { - uint8_t result = (((m_pattern & 0x80) ? m_nibble1 : m_nibble2) << 4) | ((m_pattern & 0x40) ? m_nibble1 : m_nibble2); + u8 result = ((BIT(m_pattern, 7) ? m_nibble1 : m_nibble2) << 4) | (BIT(m_pattern, 6) ? m_nibble1 : m_nibble2); if (!machine().side_effects_disabled()) m_pattern = (m_pattern << 2) | (m_pattern >> 6); @@ -110,40 +102,11 @@ uint8_t msx_matsushita_device::switched_read(offs_t offset) } -/* - 03 <- 10 - 04 <- fe - 4x read 04 and store at CC46-CC49 - - 03 <- 10 - 04 <- ce - 4x read 04 and store at CC4A-CC4D - - 03 <- 10 - 04 <- fe - 4x read 04 and store at CC4E-CC51 - - - 03 <- 10 - 04 <- fc - 4x read 04 and store at CC46-CC49 - - 03 <- 10 - 04 <- cc - 4x read 04 and store at CC4A-CC4D - - 03 <- 10 - 04 <- fc - 4x read 04 and store at CC4E-CC51 - -*/ - - -void msx_matsushita_device::switched_write(offs_t offset, uint8_t data) +void msx_matsushita_device::switched_write(offs_t offset, u8 data) { if (offset == 0) { - m_selected = (data == manufacturer_id); + m_selected = (data == MANUFACTURER_ID); } else if (m_selected) { diff --git a/src/mame/msx/msx_matsushita.h b/src/mame/msx/msx_matsushita.h index f03a2d9a866..0a898f7ba00 100644 --- a/src/mame/msx/msx_matsushita.h +++ b/src/mame/msx/msx_matsushita.h @@ -1,8 +1,9 @@ // license:BSD-3-Clause // copyright-holders:Wilbert Pol -#ifndef MAME_MACHINE_MSX_MATSUSHITA_H -#define MAME_MACHINE_MSX_MATSUSHITA_H +#ifndef MAME_MSX_MSX_MATSUSHITA_H +#define MAME_MSX_MSX_MATSUSHITA_H +#pragma once #include "msx_switched.h" @@ -15,12 +16,12 @@ class msx_matsushita_device : public device_t, public device_nvram_interface { public: - msx_matsushita_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_matsushita_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); auto turbo_callback() { return m_turbo_out_cb.bind(); } - virtual uint8_t switched_read(offs_t offset) override; - virtual void switched_write(offs_t offset, uint8_t data) override; + virtual u8 switched_read(offs_t offset) override; + virtual void switched_write(offs_t offset, u8 data) override; protected: // device-level overrides @@ -33,14 +34,16 @@ protected: virtual bool nvram_write(util::write_stream &file) override; private: + static constexpr u8 MANUFACTURER_ID = 0x08; + required_ioport m_io_config; devcb_write_line m_turbo_out_cb; bool m_selected; - uint16_t m_address; - std::vector m_sram; - uint8_t m_nibble1; - uint8_t m_nibble2; - uint8_t m_pattern; + u16 m_address; + std::vector m_sram; + u8 m_nibble1; + u8 m_nibble2; + u8 m_pattern; }; -#endif // MAME_MACHINE_MSX_MATSUSHITA_H +#endif // MAME_MSX_MSX_MATSUSHITA_H diff --git a/src/mame/msx/msx_s1985.cpp b/src/mame/msx/msx_s1985.cpp index fddbd56315e..188815691e9 100644 --- a/src/mame/msx/msx_s1985.cpp +++ b/src/mame/msx/msx_s1985.cpp @@ -3,11 +3,10 @@ #include "emu.h" #include "msx_s1985.h" -const uint8_t manufacturer_id = 0xfe; DEFINE_DEVICE_TYPE(MSX_S1985, msx_s1985_device, "msx_s1985", "MSX-Engine S1985") -msx_s1985_device::msx_s1985_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_s1985_device::msx_s1985_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_S1985, tag, owner, clock) , device_nvram_interface(mconfig, *this) , m_selected(false) @@ -32,7 +31,7 @@ void msx_s1985_device::device_start() void msx_s1985_device::nvram_default() { - memset(m_backup_ram, 0xff, sizeof(m_backup_ram)); + std::fill(std::begin(m_backup_ram), std::end(m_backup_ram), 0xff); } @@ -50,33 +49,33 @@ bool msx_s1985_device::nvram_write(util::write_stream &file) } -uint8_t msx_s1985_device::switched_read(offs_t offset) +u8 msx_s1985_device::switched_read(offs_t offset) { if (m_selected) { switch (offset) { case 0: - /// Manufacturer ID number register - return manufacturer_id ^ 0xff; + // Manufacturer ID number register + return MANUFACTURER_ID ^ 0xff; case 2: - /// Back-up RAM read + // Back-up RAM read return m_backup_ram[m_backup_ram_address]; case 7: { // Pattern and foreground/background color read - uint8_t data = (m_pattern & 0x80) ? m_color2 : m_color1; + u8 data = BIT(m_pattern, 7) ? m_color2 : m_color1; - if(!machine().side_effects_disabled()) + if (!machine().side_effects_disabled()) m_pattern = (m_pattern << 1) | (m_pattern >> 7); return data; } default: - printf("msx_s1985: unhandled read from offset %02x\n", offset); + logerror("msx_s1985: unhandled read from offset %02x\n", offset); break; } } @@ -85,24 +84,24 @@ uint8_t msx_s1985_device::switched_read(offs_t offset) } -void msx_s1985_device::switched_write(offs_t offset, uint8_t data) +void msx_s1985_device::switched_write(offs_t offset, u8 data) { if (offset == 0) { - /// Manufacturer ID number register - m_selected = (data == manufacturer_id); + // Manufacturer ID number register + m_selected = (data == MANUFACTURER_ID); } else if (m_selected) { switch (offset) { case 1: - /// Back-up RAM address latch + // Back-up RAM address latch m_backup_ram_address = data & 0x0f; break; case 2: - /// Back-up RAM write + // Back-up RAM write m_backup_ram[m_backup_ram_address] = data; break; @@ -118,7 +117,7 @@ void msx_s1985_device::switched_write(offs_t offset, uint8_t data) break; default: - printf("msx_s1985: unhandled write %02x to offset %02x\n", data, offset); + logerror("msx_s1985: unhandled write %02x to offset %02x\n", data, offset); break; } } diff --git a/src/mame/msx/msx_s1985.h b/src/mame/msx/msx_s1985.h index edf463c69ee..eb0fa0d417f 100644 --- a/src/mame/msx/msx_s1985.h +++ b/src/mame/msx/msx_s1985.h @@ -1,8 +1,9 @@ // license:BSD-3-Clause // copyright-holders:Wilbert Pol -#ifndef MAME_MACHINE_MSX_S1985_H -#define MAME_MACHINE_MSX_S1985_H +#ifndef MAME_MSX_MSX_S1985_H +#define MAME_MSX_MSX_S1985_H +#pragma once #include "msx_switched.h" @@ -15,11 +16,11 @@ class msx_s1985_device : public device_t, public device_nvram_interface { public: - msx_s1985_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_s1985_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // msx_switched_interface overrides - virtual uint8_t switched_read(offs_t offset) override; - virtual void switched_write(offs_t offset, uint8_t data) override; + virtual u8 switched_read(offs_t offset) override; + virtual void switched_write(offs_t offset, u8 data) override; protected: // device-level overrides @@ -31,12 +32,13 @@ protected: virtual bool nvram_write(util::write_stream &file) override; private: + static constexpr u8 MANUFACTURER_ID = 0xfe; bool m_selected; - uint8_t m_backup_ram_address; - uint8_t m_backup_ram[0x10]; - uint8_t m_color1; - uint8_t m_color2; - uint8_t m_pattern; + u8 m_backup_ram_address; + u8 m_backup_ram[0x10]; + u8 m_color1; + u8 m_color2; + u8 m_pattern; }; -#endif // MAME_MACHINE_MSX_S1985_H +#endif // MAME_MSX_MSX_S1985_H diff --git a/src/mame/msx/msx_switched.h b/src/mame/msx/msx_switched.h index 4039886f73c..d1918c7cadb 100644 --- a/src/mame/msx/msx_switched.h +++ b/src/mame/msx/msx_switched.h @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:Wilbert Pol -#ifndef MAME_MACHINE_MSX_SWITCHED_H -#define MAME_MACHINE_MSX_SWITCHED_H +#ifndef MAME_MSX_MSX_SWITCHED_H +#define MAME_MSX_MSX_SWITCHED_H #pragma once @@ -9,8 +9,8 @@ class msx_switched_interface { public: - virtual uint8_t switched_read(offs_t offset) = 0; - virtual void switched_write(offs_t offset, uint8_t data) = 0; + virtual u8 switched_read(offs_t offset) = 0; + virtual void switched_write(offs_t offset, u8 data) = 0; }; -#endif // MAME_MACHINE_MSX_SWITCHED_H +#endif // MAME_MSX_MSX_SWITCHED_H diff --git a/src/mame/msx/msx_systemflags.cpp b/src/mame/msx/msx_systemflags.cpp index 06f59d6e5bd..2c6ab4be7ce 100644 --- a/src/mame/msx/msx_systemflags.cpp +++ b/src/mame/msx/msx_systemflags.cpp @@ -7,7 +7,7 @@ DEFINE_DEVICE_TYPE(MSX_SYSTEMFLAGS, msx_systemflags_device, "msx_systemflags", "MSX System Flags") -msx_systemflags_device::msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +msx_systemflags_device::msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MSX_SYSTEMFLAGS, tag, owner, clock) , m_initial_value(0xff) , m_system_flags(0xff) @@ -15,7 +15,6 @@ msx_systemflags_device::msx_systemflags_device(const machine_config &mconfig, co { } - void msx_systemflags_device::device_start() { m_system_flags = m_initial_value; @@ -28,14 +27,12 @@ void msx_systemflags_device::device_start() space.install_read_handler(0xf4, 0xf4, read8smo_delegate(*this, FUNC(msx_systemflags_device::read))); } - -uint8_t msx_systemflags_device::read() +u8 msx_systemflags_device::read() { return m_system_flags; } - -void msx_systemflags_device::write(uint8_t data) +void msx_systemflags_device::write(u8 data) { m_system_flags = data; } diff --git a/src/mame/msx/msx_systemflags.h b/src/mame/msx/msx_systemflags.h index 33616ac5860..c05da5e1892 100644 --- a/src/mame/msx/msx_systemflags.h +++ b/src/mame/msx/msx_systemflags.h @@ -1,7 +1,9 @@ // license:BSD-3-Clause // copyright-holders:Wilbert Pol -#ifndef MAME_MACHINE_MSX_SYSTEMFLAGS_H -#define MAME_MACHINE_MSX_SYSTEMFLAGS_H +#ifndef MAME_MSX_MSX_SYSTEMFLAGS_H +#define MAME_MSX_MSX_SYSTEMFLAGS_H + +#pragma once /* Some MSX2+ and TurboR machines have a 'system flags' I/O port ($F4). @@ -15,29 +17,29 @@ class msx_systemflags_device : public device_t { public: template - msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&maincpu_tag, uint8_t initial_value) + msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&maincpu_tag, u8 initial_value) : msx_systemflags_device(mconfig, tag, owner, 0) { set_maincpu_tag(std::forward(maincpu_tag)); set_initial_value(initial_value); } - msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + msx_systemflags_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // configuration helpers template void set_maincpu_tag(T &&maincpu_tag) { m_maincpu.set_tag(std::forward(maincpu_tag)); } - void set_initial_value(uint8_t initial_value) { m_initial_value = initial_value; } + void set_initial_value(u8 initial_value) { m_initial_value = initial_value; } - uint8_t read(); - void write(uint8_t data); + u8 read(); + void write(u8 data); protected: virtual void device_start() override; private: - uint8_t m_initial_value; - uint8_t m_system_flags; + u8 m_initial_value; + u8 m_system_flags; required_device m_maincpu; }; -#endif // MAME_MACHINE_MSX_SYSTEMFLAGS_H +#endif // MAME_MSX_MSX_SYSTEMFLAGS_H -- cgit v1.2.3