diff options
author | 2014-05-14 19:04:52 +0000 | |
---|---|---|
committer | 2014-05-14 19:04:52 +0000 | |
commit | c74226bb26acd1afdcc59f20e174d126423f60b9 (patch) | |
tree | 67a584a596dc13b820cfdbe411eaf826852475ff /src | |
parent | 8ab3ccb194ff9cb37bda434489a82da854b24af6 (diff) |
(MESS) msx.c: [Wilbert Pol]
- Reimplemented the cartridge slots as slot devices.
- Moved the msx slot layouts to inline machine configuration.
- Started adding support for a few more firmware types.
- Add turbo support to Panasonic FS-A1FX/FS-A1WX/FS-A1WSX.
Diffstat (limited to 'src')
49 files changed, 6850 insertions, 5440 deletions
diff --git a/src/emu/bus/bus.mak b/src/emu/bus/bus.mak index 9067f5bca1d..d0436681130 100644 --- a/src/emu/bus/bus.mak +++ b/src/emu/bus/bus.mak @@ -389,6 +389,38 @@ endif #------------------------------------------------- # +#@src/emu/bus/msx_slot/slot.h,BUSES += MSX_SLOT +#------------------------------------------------- + +ifneq ($(filter MSX_SLOT,$(BUSES)),) +OBJDIRS += $(BUSOBJ)/msx_slot +BUSOBJS += $(BUSOBJ)/msx_slot/bunsetsu.o +BUSOBJS += $(BUSOBJ)/msx_slot/cartridge.o +BUSOBJS += $(BUSOBJ)/msx_slot/disk.o +BUSOBJS += $(BUSOBJ)/msx_slot/fs4600.o +BUSOBJS += $(BUSOBJ)/msx_slot/music.o +BUSOBJS += $(BUSOBJ)/msx_slot/panasonic08.o +BUSOBJS += $(BUSOBJ)/msx_slot/rom.o +BUSOBJS += $(BUSOBJ)/msx_slot/ram.o +BUSOBJS += $(BUSOBJ)/msx_slot/ram_mm.o +BUSOBJS += $(BUSOBJ)/msx_slot/slot.o +OBJDIRS += $(BUSOBJ)/msx_cart +BUSOBJS += $(BUSOBJ)/msx_cart/ascii.o +BUSOBJS += $(BUSOBJ)/msx_cart/cartridge.o +BUSOBJS += $(BUSOBJ)/msx_cart/crossblaim.o +BUSOBJS += $(BUSOBJ)/msx_cart/fmpac.o +BUSOBJS += $(BUSOBJ)/msx_cart/konami.o +BUSOBJS += $(BUSOBJ)/msx_cart/korean.o +BUSOBJS += $(BUSOBJ)/msx_cart/majutsushi.o +BUSOBJS += $(BUSOBJ)/msx_cart/msxdos2.o +BUSOBJS += $(BUSOBJ)/msx_cart/nomapper.o +BUSOBJS += $(BUSOBJ)/msx_cart/rtype.o +BUSOBJS += $(BUSOBJ)/msx_cart/superloderunner.o +endif + + +#------------------------------------------------- +# #@src/emu/bus/kc/kc.h,BUSES += KC #------------------------------------------------- diff --git a/src/emu/bus/msx_cart/ascii.c b/src/emu/bus/msx_cart/ascii.c new file mode 100644 index 00000000000..fa8d7a51d12 --- /dev/null +++ b/src/emu/bus/msx_cart/ascii.c @@ -0,0 +1,442 @@ +#include "emu.h" +#include "ascii.h" + + +const device_type MSX_CART_ASCII8 = &device_creator<msx_cart_ascii8>; +const device_type MSX_CART_ASCII16 = &device_creator<msx_cart_ascii16>; +const device_type MSX_CART_ASCII8_SRAM = &device_creator<msx_cart_ascii8_sram>; +const device_type MSX_CART_ASCII16_SRAM = &device_creator<msx_cart_ascii16_sram>; + + +msx_cart_ascii8::msx_cart_ascii8(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_ASCII8, "MSX Cartridge - ASCII8", tag, owner, clock, "msx_cart_ascii8", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_bank_mask(0) +{ + for (int i = 0; i < 4; i++) + { + m_selected_bank[i] = 0; + m_bank_base[i] = NULL; + } +} + + +void msx_cart_ascii8::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_ascii8::restore_banks), this)); +} + + +void msx_cart_ascii8::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_reset() +{ + for (int i = 0; i < 4; i++) + { + m_selected_bank[i] = 0; + } +} + + +void msx_cart_ascii8::initialize_cartridge() +{ + UINT32 size = get_rom_size(); + + if ( size > 256 * 0x2000 ) + { + fatalerror("ascii8: ROM is too big\n"); + } + + UINT16 banks = size / 0x2000; + + if (size != banks * 0x2000 || (~(banks - 1) % banks)) + { + fatalerror("ascii8: Invalid ROM size\n"); + } + + m_bank_mask = banks - 1; + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_ascii8::read_cart) +{ + if ( offset >= 0x4000 && offset < 0xC000 ) + { + return m_bank_base[(offset - 0x4000) >> 13][offset & 0x1fff]; + } + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_ascii8::write_cart) +{ + if (offset >= 0x6000 && offset < 0x8000) + { + UINT8 bank = (offset / 0x800) & 0x03; + + m_selected_bank[bank] = data; + m_bank_base[bank] = get_rom_base() + (m_selected_bank[bank] & m_bank_mask ) * 0x2000; + } +} + + + +msx_cart_ascii16::msx_cart_ascii16(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_ASCII16, "MSX Cartridge - ASCII16", tag, owner, clock, "msx_cart_ascii16", __FILE__) + , 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] = NULL; + } +} + + +void msx_cart_ascii16::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_ascii16::restore_banks), this)); +} + + +void msx_cart_ascii16::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_reset() +{ + for (int i = 0; i < 2; i++) + { + m_selected_bank[i] = 0; + } +} + + +void msx_cart_ascii16::initialize_cartridge() +{ + UINT32 size = get_rom_size(); + + if ( size > 256 * 0x4000 ) + { + fatalerror("ascii16: ROM is too big\n"); + } + + UINT16 banks = size / 0x4000; + + if (size != banks * 0x4000 || (~(banks - 1) % banks)) + { + fatalerror("ascii16: Invalid ROM size\n"); + } + + m_bank_mask = banks - 1; + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_ascii16::read_cart) +{ + if ( offset >= 0x4000 && offset < 0xC000 ) + { + return m_bank_base[offset >> 15][offset & 0x3fff]; + } + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_ascii16::write_cart) +{ + 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; + } +} + + + + + +msx_cart_ascii8_sram::msx_cart_ascii8_sram(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_ASCII8_SRAM, "MSX Cartridge - ASCII8 w/SRAM", tag, owner, clock, "msx_cart_ascii8_sram", __FILE__) + , msx_cart_interface(mconfig, *this) + , 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] = NULL; + } +} + + +void msx_cart_ascii8_sram::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_ascii8_sram::restore_banks), this)); +} + + +void msx_cart_ascii8_sram::setup_bank(UINT8 bank) +{ + if (m_selected_bank[bank] & ~(m_sram_select_mask | m_bank_mask)) + { + // Nothing is mapped + m_bank_base[bank] = NULL; + } + 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::restore_banks() +{ + for (int i = 0; i < 4; i++) + { + setup_bank(i); + } +} + + +void msx_cart_ascii8_sram::device_reset() +{ + for (int i = 0; i < 4; i++) + { + m_selected_bank[i] = 0; + } +} + + +void msx_cart_ascii8_sram::initialize_cartridge() +{ + UINT32 size = get_rom_size(); + + if ( size > 128 * 0x2000 ) + { + fatalerror("ascii8_sram: ROM is too big\n"); + } + + UINT16 banks = size / 0x2000; + + if (size != banks * 0x2000 || (~(banks - 1) % banks)) + { + fatalerror("ascii8_sram: Invalid ROM size\n"); + } + + if (get_sram_size() != 0x2000) + { + fatalerror("ascii8_sram: Unsupported SRAM size\n"); + } + + m_bank_mask = banks - 1; + m_sram_select_mask = banks; + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_ascii8_sram::read_cart) +{ + if ( offset >= 0x4000 && offset < 0xC000 ) + { + UINT8 *bank_base = m_bank_base[(offset - 0x4000) >> 13]; + + if (bank_base != NULL) + { + return bank_base[offset & 0x1fff]; + } + } + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_ascii8_sram::write_cart) +{ + if (offset >= 0x6000 && offset < 0x8000) + { + UINT8 bank = (offset / 0x800) & 0x03; + + m_selected_bank[bank] = data; + setup_bank(bank); + } + else if (offset >= 0x8000 && offset < 0xc000) + { + UINT8 bank = (offset & 0x2000) ? 3 : 2; + + 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; + } + } +} + + + +msx_cart_ascii16_sram::msx_cart_ascii16_sram(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_ASCII16_SRAM, "MSX Cartridge - ASCII16 w/SRAM", tag, owner, clock, "msx_cart_ascii16_sram", __FILE__) + , msx_cart_interface(mconfig, *this) + , 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] = NULL; + } +} + + +void msx_cart_ascii16_sram::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_ascii16_sram::restore_banks), this)); +} + + +void msx_cart_ascii16_sram::setup_bank(UINT8 bank) +{ + if (m_selected_bank[bank] & ~(m_sram_select_mask | m_bank_mask)) + { + // Nothing is mapped + m_bank_base[bank] = NULL; + } + 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::restore_banks() +{ + for (int i = 0; i < 2; i++) + { + setup_bank(i); + } +} + + +void msx_cart_ascii16_sram::device_reset() +{ + for (int i = 0; i < 2; i++) + { + m_selected_bank[i] = 0; + } +} + + +void msx_cart_ascii16_sram::initialize_cartridge() +{ + UINT32 size = get_rom_size(); + + if ( size > 128 * 0x4000 ) + { + fatalerror("ascii16_sram: ROM is too big\n"); + } + + UINT16 banks = size / 0x4000; + + if (size != banks * 0x4000 || (~(banks - 1) % banks)) + { + fatalerror("ascii16_sram: Invalid ROM size\n"); + } + + if (get_sram_size() != 0x800) + { + fatalerror("ascii16_sram: Unsupported SRAM size\n"); + } + + m_bank_mask = banks - 1; + m_sram_select_mask = banks; + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_ascii16_sram::read_cart) +{ + if ( offset >= 0x4000 && offset < 0xC000 ) + { + UINT8 bank = offset >> 15; + + if (m_bank_base[bank] != NULL) + { + 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; +} + + +WRITE8_MEMBER(msx_cart_ascii16_sram::write_cart) +{ + 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; + } + } +} + diff --git a/src/emu/bus/msx_cart/ascii.h b/src/emu/bus/msx_cart/ascii.h new file mode 100644 index 00000000000..24ad955e32f --- /dev/null +++ b/src/emu/bus/msx_cart/ascii.h @@ -0,0 +1,116 @@ +#ifndef __MSX_CART_ASCII_H +#define __MSX_CART_ASCII_H + +#include "bus/msx_cart/cartridge.h" + + +extern const device_type MSX_CART_ASCII8; +extern const device_type MSX_CART_ASCII16; +extern const device_type MSX_CART_ASCII8_SRAM; +extern const device_type MSX_CART_ASCII16_SRAM; + + +class msx_cart_ascii8 : public device_t + , public msx_cart_interface +{ +public: + msx_cart_ascii8(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + UINT8 m_bank_mask; + UINT8 m_selected_bank[4]; + UINT8 *m_bank_base[4]; +}; + + +class msx_cart_ascii16 : public device_t + , public msx_cart_interface +{ +public: + msx_cart_ascii16(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + UINT8 m_bank_mask; + UINT8 m_selected_bank[2]; + UINT8 *m_bank_base[2]; +}; + + +class msx_cart_ascii8_sram : public device_t + , public msx_cart_interface +{ +public: + msx_cart_ascii8_sram(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + UINT8 m_bank_mask; + UINT8 m_selected_bank[4]; + UINT8 *m_bank_base[4]; + UINT8 m_sram_select_mask; + + void setup_bank(UINT8 bank); +}; + + +class msx_cart_ascii16_sram : public device_t + , public msx_cart_interface +{ +public: + msx_cart_ascii16_sram(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + UINT8 m_bank_mask; + UINT8 m_selected_bank[2]; + UINT8 *m_bank_base[2]; + UINT8 m_sram_select_mask; + + void setup_bank(UINT8 bank); +}; + + +#endif + diff --git a/src/emu/bus/msx_cart/cartridge.c b/src/emu/bus/msx_cart/cartridge.c new file mode 100644 index 00000000000..6c724982526 --- /dev/null +++ b/src/emu/bus/msx_cart/cartridge.c @@ -0,0 +1,59 @@ + +#include "emu.h" +#include "cartridge.h" +#include "ascii.h" +#include "crossblaim.h" +#include "fmpac.h" +#include "konami.h" +#include "korean.h" +#include "majutsushi.h" +#include "msxdos2.h" +#include "nomapper.h" +#include "rtype.h" +#include "superloderunner.h" + + +SLOT_INTERFACE_START(msx_cart) + SLOT_INTERFACE_INTERNAL("nomapper", MSX_CART_NOMAPPER) + SLOT_INTERFACE_INTERNAL("msxdos2", MSX_CART_MSXDOS2) + SLOT_INTERFACE_INTERNAL("konami_scc", MSX_CART_KONAMI_SCC) + SLOT_INTERFACE_INTERNAL("konami", MSX_CART_KONAMI) + SLOT_INTERFACE_INTERNAL("ascii8", MSX_CART_ASCII8) + SLOT_INTERFACE_INTERNAL("ascii16", MSX_CART_ASCII16) + SLOT_INTERFACE_INTERNAL("gamemaster2", MSX_CART_GAMEMASTER2) + SLOT_INTERFACE_INTERNAL("ascii8_sram", MSX_CART_ASCII8_SRAM) + SLOT_INTERFACE_INTERNAL("ascii16_sram", MSX_CART_ASCII16_SRAM) + SLOT_INTERFACE_INTERNAL("rtype", MSX_CART_RTYPE) + SLOT_INTERFACE_INTERNAL("majutsushi", MSX_CART_MAJUTSUSHI) + SLOT_INTERFACE_INTERNAL("fmpac", MSX_CART_FMPAC) + SLOT_INTERFACE_INTERNAL("superloderunner", MSX_CART_SUPERLODERUNNER) + SLOT_INTERFACE_INTERNAL("synthesizer", MSX_CART_SYNTHESIZER) + SLOT_INTERFACE_INTERNAL("cross_blaim", MSX_CART_CROSSBLAIM) +// SLOT_INTERFACE_INTERNAL("disk_rom", MSX_CART_DISK_ROM) + SLOT_INTERFACE_INTERNAL("korean_80in1", MSX_CART_KOREAN_80IN1) + SLOT_INTERFACE_INTERNAL("korean_90in1", MSX_CART_KOREAN_90IN1) + SLOT_INTERFACE_INTERNAL("korean_126in1", MSX_CART_KOREAN_126IN1) + SLOT_INTERFACE_INTERNAL("sound_snatcher", MSX_CART_SOUND_SNATCHER) + SLOT_INTERFACE_INTERNAL("sound_sdsnatch", MSX_CART_SOUND_SDSNATCHER) +SLOT_INTERFACE_END + + +msx_cart_interface::msx_cart_interface(const machine_config &mconfig, device_t &device) + : device_slot_card_interface(mconfig, device) +{ +} + +void msx_cart_interface::rom_alloc(UINT32 size) +{ + m_rom.resize(size); +} + +void msx_cart_interface::ram_alloc(UINT32 size) +{ + m_ram.resize(size); +} + +void msx_cart_interface::sram_alloc(UINT32 size) +{ + m_sram.resize(size); +} diff --git a/src/emu/bus/msx_cart/cartridge.h b/src/emu/bus/msx_cart/cartridge.h new file mode 100644 index 00000000000..bcd51c263a7 --- /dev/null +++ b/src/emu/bus/msx_cart/cartridge.h @@ -0,0 +1,42 @@ +#ifndef __MSX_CART_CARTRIDGE_H +#define __MSX_CART_CARTRIDGE_H + + +SLOT_INTERFACE_EXTERN(msx_cart); + + +class msx_cart_interface : public device_slot_card_interface +{ +public: + msx_cart_interface(const machine_config &mconfig, device_t &device); + + // This is called after loading cartridge contents and allows the cartridge + // implementation to perform some additional initialization based on the + // cartridge contents. + virtual void initialize_cartridge() {} + + // reading and writing + virtual DECLARE_READ8_MEMBER(read_cart) { return 0xff; } + virtual DECLARE_WRITE8_MEMBER(write_cart) {} + + // ROM/RAM/SRAM management + // Mainly used by the cartridge slot when loading images + void rom_alloc(UINT32 size); + void ram_alloc(UINT32 size); + void sram_alloc(UINT32 size); + + UINT8* get_rom_base() { return m_rom; } + UINT8* get_ram_base() { return m_ram; } + UINT8* get_sram_base() { return m_sram; } + UINT32 get_rom_size() { return m_rom.count(); } + UINT32 get_ram_size() { return m_ram.count(); } + UINT32 get_sram_size() { return m_sram.count(); } + +protected: + dynamic_buffer m_rom; + dynamic_buffer m_ram; + dynamic_buffer m_sram; +}; + + +#endif diff --git a/src/emu/bus/msx_cart/crossblaim.c b/src/emu/bus/msx_cart/crossblaim.c new file mode 100644 index 00000000000..304364a84db --- /dev/null +++ b/src/emu/bus/msx_cart/crossblaim.c @@ -0,0 +1,81 @@ +#include "emu.h" +#include "crossblaim.h" + +const device_type MSX_CART_CROSSBLAIM = &device_creator<msx_cart_crossblaim>; + + +msx_cart_crossblaim::msx_cart_crossblaim(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_CROSSBLAIM, "MSX Cartridge - Cross Blaim", tag, owner, clock, "msx_cart_crossblaim", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_selected_bank(1) +{ + for (int i = 0; i < 4; i++) + { + m_bank_base[i] = NULL; + } +} + + +void msx_cart_crossblaim::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_crossblaim::restore_banks), this)); +} + + +void msx_cart_crossblaim::setup_bank() +{ + m_bank_base[0] = ( m_selected_bank & 2 ) ? NULL : 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 ) ? NULL : get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000; +} + + +void msx_cart_crossblaim::restore_banks() +{ + m_bank_base[1] = get_rom_base(); + setup_bank(); +} + + +void msx_cart_crossblaim::device_reset() +{ + m_selected_bank = 1; +} + + +void msx_cart_crossblaim::initialize_cartridge() +{ + if (get_rom_size() != 0x10000) + { + fatalerror("crossblaim: Invalid ROM size\n"); + } + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_crossblaim::read_cart) +{ + UINT8 *bank_base = m_bank_base[offset >> 14]; + + if (bank_base != NULL) + { + return bank_base[offset & 0x3fff]; + } + + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_crossblaim::write_cart) +{ + m_selected_bank = data & 3; + if (m_selected_bank == 0) + { + m_selected_bank = 1; + } + setup_bank(); +} + diff --git a/src/emu/bus/msx_cart/crossblaim.h b/src/emu/bus/msx_cart/crossblaim.h new file mode 100644 index 00000000000..36251bdb937 --- /dev/null +++ b/src/emu/bus/msx_cart/crossblaim.h @@ -0,0 +1,35 @@ +#ifndef __MSX_CART_CROSSBLAIM_H +#define __MSX_CART_CROSSBLAIM_H + +#include "bus/msx_cart/cartridge.h" + + +extern const device_type MSX_CART_CROSSBLAIM; + + +class msx_cart_crossblaim : public device_t + , public msx_cart_interface +{ +public: + msx_cart_crossblaim(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + UINT8 m_selected_bank; + UINT8 *m_bank_base[4]; + + void setup_bank(); +}; + + +#endif diff --git a/src/emu/bus/msx_cart/fmpac.c b/src/emu/bus/msx_cart/fmpac.c new file mode 100644 index 00000000000..62703094b22 --- /dev/null +++ b/src/emu/bus/msx_cart/fmpac.c @@ -0,0 +1,172 @@ +/********************************************************************************** + +When backing up the SRAM from an FM-PAC the file seems to be prefixed +with: PAC2 BACKUP DATA. We only store the raw sram contents. + +**********************************************************************************/ + +#include "emu.h" +#include "fmpac.h" + +const device_type MSX_CART_FMPAC = &device_creator<msx_cart_fmpac>; + + +msx_cart_fmpac::msx_cart_fmpac(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_FMPAC, "MSX Cartridge - FM-PAC", tag, owner, clock, "msx_cart_fmpac", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_ym2413(*this, "ym2413") + , m_selected_bank(0) + , m_bank_base(NULL) + , m_sram_active(false) + , m_opll_active(false) + , m_1ffe(0) + , m_1fff(0) + , m_7ff6(0) +{ +} + + +static MACHINE_CONFIG_FRAGMENT( fmpac ) + // 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'. + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("ym2413", YM2413, XTAL_10_738635MHz/3) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) +MACHINE_CONFIG_END + + +machine_config_constructor msx_cart_fmpac::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( fmpac ); +} + + +void msx_cart_fmpac::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)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_fmpac::restore_banks), this)); + + // Install IO read/write handlers + address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO); + space.install_write_handler(0x7c, 0x7d, write8_delegate(FUNC(msx_cart_fmpac::write_ym2413), this)); +} + + +void msx_cart_fmpac::restore_banks() +{ + m_bank_base = get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000; +} + + +void msx_cart_fmpac::device_reset() +{ + m_selected_bank = 0; + m_sram_active = false; + m_opll_active = false; + m_1ffe = 0; + m_1fff = 0; + m_7ff6 = 0; +} + + +void msx_cart_fmpac::initialize_cartridge() +{ + if ( get_rom_size() != 0x10000 ) + { + fatalerror("fmpac: Invalid ROM size\n"); + } + + if ( get_sram_size() != 0x2000 ) + { + fatalerror("fmpac: Invalid SRAM size\n"); + } + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_fmpac::read_cart) +{ + 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; +} + + +WRITE8_MEMBER(msx_cart_fmpac::write_cart) +{ + 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); + } + + switch (offset) + { + case 0x7ff4: + case 0x7ff5: + if (m_opll_active) + { + m_ym2413->write(space, 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; + } + +} + + +WRITE8_MEMBER(msx_cart_fmpac::write_ym2413) +{ + if (m_opll_active) + { + m_ym2413->write(space, offset & 1, data); + } +} + diff --git a/src/emu/bus/msx_cart/fmpac.h b/src/emu/bus/msx_cart/fmpac.h new file mode 100644 index 00000000000..d6d44d091d8 --- /dev/null +++ b/src/emu/bus/msx_cart/fmpac.h @@ -0,0 +1,44 @@ +#ifndef __MSX_CART_FMPAC_H +#define __MSX_CART_FMPAC_H + +#include "bus/msx_cart/cartridge.h" +#include "sound/2413intf.h" + + +extern const device_type MSX_CART_FMPAC; + + +class msx_cart_fmpac : public device_t + , public msx_cart_interface +{ +public: + msx_cart_fmpac(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + virtual machine_config_constructor device_mconfig_additions() const; + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + + DECLARE_WRITE8_MEMBER(write_ym2413); + +private: + required_device<ym2413_device> m_ym2413; + + UINT8 m_selected_bank; + UINT8 *m_bank_base; + bool m_sram_active; + bool m_opll_active; + UINT8 m_1ffe; + UINT8 m_1fff; + UINT8 m_7ff6; +}; + + +#endif diff --git a/src/emu/bus/msx_cart/konami.c b/src/emu/bus/msx_cart/konami.c new file mode 100644 index 00000000000..ee8115efd07 --- /dev/null +++ b/src/emu/bus/msx_cart/konami.c @@ -0,0 +1,862 @@ +#include "emu.h" +#include "konami.h" + +const device_type MSX_CART_KONAMI = &device_creator<msx_cart_konami>; +const device_type MSX_CART_KONAMI_SCC = &device_creator<msx_cart_konami_scc>; +const device_type MSX_CART_GAMEMASTER2 = &device_creator<msx_cart_gamemaster2>; +const device_type MSX_CART_SYNTHESIZER = &device_creator<msx_cart_synthesizer>; +const device_type MSX_CART_SOUND_SNATCHER = &device_creator<msx_cart_konami_sound_snatcher>; +const device_type MSX_CART_SOUND_SDSNATCHER = &device_creator<msx_cart_konami_sound_sdsnatcher>; + + +msx_cart_konami::msx_cart_konami(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_KONAMI, "MSX Cartridge - KONAMI", tag, owner, clock, "msx_cart_konami", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_bank_mask(0) +{ + for (int i = 0; i < 3; i++) + { + m_selected_bank[i] = 0; + } + for (int i = 0; i < 8; i++) + { + m_bank_base[i] = NULL; + } +} + + +void msx_cart_konami::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_konami::restore_banks), this)); +} + + +void msx_cart_konami::restore_banks() +{ + m_bank_base[0] = get_rom_base(); + m_bank_base[1] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; + m_bank_base[2] = get_rom_base(); + m_bank_base[3] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; + m_bank_base[4] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; + m_bank_base[5] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; + m_bank_base[6] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; + m_bank_base[7] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; +} + + +void msx_cart_konami::device_reset() +{ + for (int i = 0; i < 3; i++) + { + m_selected_bank[i] = i + 1; + } +} + + +void msx_cart_konami::initialize_cartridge() +{ + UINT32 size = get_rom_size(); + + if ( get_rom_size() > 256 * 0x2000 ) + { + fatalerror("konami: ROM is too big\n"); + } + + UINT16 banks = size / 0x2000; + + if (size != banks * 0x2000 || (~(banks - 1) % banks)) + { + fatalerror("konami: Invalid ROM size\n"); + } + + m_bank_mask = banks - 1; + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_konami::read_cart) +{ + return m_bank_base[offset >> 13][offset & 0x1fff]; +} + + +WRITE8_MEMBER(msx_cart_konami::write_cart) +{ + switch (offset) + { + case 0x6000: + m_selected_bank[0] = data; + m_bank_base[1] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; + m_bank_base[3] = get_rom_base() + ( m_selected_bank[0] & m_bank_mask ) * 0x2000; + break; + + case 0x8000: + m_selected_bank[1] = data; + m_bank_base[4] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; + m_bank_base[6] = get_rom_base() + ( m_selected_bank[1] & m_bank_mask ) * 0x2000; + break; + + case 0xa000: + m_selected_bank[2] = data; + m_bank_base[5] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; + m_bank_base[7] = get_rom_base() + ( m_selected_bank[2] & m_bank_mask ) * 0x2000; + break; + } +} + + + + +msx_cart_konami_scc::msx_cart_konami_scc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_KONAMI_SCC, "MSX Cartridge - KONAMI+SCC", tag, owner, clock, "msx_cart_konami_scc", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_k051649(*this, "k051649") + , m_bank_mask(0) + , m_scc_active(false) +{ + for (int i = 0; i < 4; i++) + { + m_selected_bank[i] = 0; + } + for (int i = 0; i < 8; i++) + { + m_bank_base[i] = NULL; + } +} + + +static MACHINE_CONFIG_FRAGMENT( konami_scc ) + // 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'. + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("k051649", K051649, XTAL_10_738635MHz/3/2) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) +MACHINE_CONFIG_END + + +machine_config_constructor msx_cart_konami_scc::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( konami_scc ); +} + + +void msx_cart_konami_scc::device_start() +{ + save_item(NAME(m_selected_bank)); + save_item(NAME(m_scc_active)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_konami_scc::restore_banks), this)); +} + + +void msx_cart_konami_scc::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_reset() +{ + for (int i = 0; i < 4; i++) + { + m_selected_bank[i] = i; + } + m_scc_active = false; +} + + +void msx_cart_konami_scc::initialize_cartridge() +{ + UINT32 size = get_rom_size(); + + if ( get_rom_size() > 256 * 0x2000 ) + { + fatalerror("konami_scc: ROM is too big\n"); + } + + UINT16 banks = size / 0x2000; + + if (size != banks * 0x2000 || (~(banks - 1) % banks)) + { + fatalerror("konami_scc: Invalid ROM size\n"); + } + + m_bank_mask = banks - 1; + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_konami_scc::read_cart) +{ + if ( m_scc_active && offset >= 0x9800 && offset < 0xa000 ) + { + if (offset & 0x80) + { + if ((offset & 0xff) >= 0xe0) + { + return m_k051649->k051649_test_r(space, offset & 0xff); + } + return 0xff; + } + else + { + return m_k051649->k051649_waveform_r(space, offset & 0x7f); + } + } + + return m_bank_base[offset >> 13][offset & 0x1fff]; +} + + +WRITE8_MEMBER(msx_cart_konami_scc::write_cart) +{ + switch (offset & 0xf800) + { + 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(space, offset, data); + } + else if (offset < 0xa0) + { + offset &= 0x0f; + if (offset < 0x0a) + { + m_k051649->k051649_frequency_w(space, offset, data); + } + else if (offset < 0x0f) + { + m_k051649->k051649_volume_w(space, offset - 0xa, data); + } + else + { + m_k051649->k051649_keyonoff_w(space, 0, data); + } + } + else if (offset >= 0xe0) + { + m_k051649->k051649_test_w(space, offset, 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; + } +} + + + + + + +msx_cart_gamemaster2::msx_cart_gamemaster2(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_GAMEMASTER2, "MSX Cartridge - GAMEMASTER2", tag, owner, clock, "msx_cart_gamemaster2", __FILE__) + , msx_cart_interface(mconfig, *this) +{ + for (int i = 0; i < 3; i++) + { + m_selected_bank[i] = 0; + } + for (int i = 0; i < 8; i++) + { + m_bank_base[i] = NULL; + } +} + + +void msx_cart_gamemaster2::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_gamemaster2::restore_banks), this)); +} + + +void msx_cart_gamemaster2::setup_bank(UINT8 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::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_reset() +{ + for (int i = 0; i < 3; i++) + { + m_selected_bank[i] = i + 1; + } +} + + +void msx_cart_gamemaster2::initialize_cartridge() +{ + if ( get_rom_size() != 0x20000 ) + { + fatalerror("gamemaster2: Invalid ROM size\n"); + } + + if (get_sram_size() != 0x2000) + { + fatalerror("gamemaster2: Invalid SRAM size\n"); + } + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_gamemaster2::read_cart) +{ + UINT8 bank = offset >> 13; + + 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]; +} + + +WRITE8_MEMBER(msx_cart_gamemaster2::write_cart) +{ + 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; + } +} + + + + + +msx_cart_synthesizer::msx_cart_synthesizer(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_SYNTHESIZER, "MSX Cartridge - Synthesizer", tag, owner, clock, "msx_cart_synthesizer", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_bank_base(NULL) + , m_dac(*this, "dac") +{ +} + + +static MACHINE_CONFIG_FRAGMENT( synthesizer ) + // 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'. + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("dac", DAC, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20) +MACHINE_CONFIG_END + + +machine_config_constructor msx_cart_synthesizer::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( synthesizer ); +} + + +void msx_cart_synthesizer::device_start() +{ +} + + +void msx_cart_synthesizer::initialize_cartridge() +{ + if ( get_rom_size() != 0x8000 ) + { + fatalerror("synthesizer: Invalid ROM size\n"); + } + + m_bank_base = get_rom_base(); +} + + +READ8_MEMBER(msx_cart_synthesizer::read_cart) +{ + if (offset >= 0x4000 && offset < 0xc000 ) + { + return m_bank_base[offset - 0x4000]; + } + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_synthesizer::write_cart) +{ + if ((offset & 0xc010) == 0x4000) + { + m_dac->write_unsigned8(data); + } +} + + + + +msx_cart_konami_sound::msx_cart_konami_sound(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) + : device_t(mconfig, type, name, tag, owner, clock, shortname, source) + , msx_cart_interface(mconfig, *this) + , m_k052539(*this, "k052539") + , m_scc_active(false) + , m_sccplus_active(false) + , m_scc_mode(0) +{ + for (int i = 0; i < 4; i++) + { + m_selected_bank[i] = 0; + } + for (int i = 0; i < 8; i++) + { + m_bank_base[i] = NULL; + } + for (int i = 0; i < 16; i++) + { + m_ram_bank[i] = NULL; + } + for (int i = 0; i < 4; i++) + { + m_ram_enabled[i] = false; + } +} + + +static MACHINE_CONFIG_FRAGMENT( konami_sound ) + // 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'. + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("k052539", K051649, XTAL_10_738635MHz/3/2) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) +MACHINE_CONFIG_END + + +machine_config_constructor msx_cart_konami_sound::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( konami_sound ); +} + + +void msx_cart_konami_sound::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)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_konami_sound::restore_banks), this)); +} + + +void msx_cart_konami_sound::restore_banks() +{ + for (int i = 0; i < 4; i++) + { + setup_bank(i); + } +} + + +void msx_cart_konami_sound::setup_bank(UINT8 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; + } +} + + +void msx_cart_konami_sound::device_reset() +{ + 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; +} + + +void msx_cart_konami_sound::initialize_cartridge() +{ + restore_banks(); +} + + +READ8_MEMBER(msx_cart_konami_sound::read_cart) +{ + if ( m_scc_active && offset >= 0x9800 && offset < 0x9fe0 ) + { + offset &= 0xff; + if (offset < 0x80) + { + return m_k052539->k051649_waveform_r(space, offset); + } + if (offset < 0xa0) + { + return 0xff; + } + if (offset < 0xc0) + { + return m_k052539->k051649_waveform_r(space, offset & 0x9f); + } + if (offset < 0xe0) + { + return m_k052539->k051649_test_r(space, offset & 0xff); + } + return 0xff; + } + else if ( m_sccplus_active && offset >= 0xb800 && offset < 0xbfe0) + { + offset &= 0xff; + + if (offset < 0xa0) + { + return m_k052539->k052539_waveform_r(space, offset); + } + if (offset >= 0xc0 && offset < 0xe0) + { + return m_k052539->k051649_test_r(space, offset); + } + return 0xff; + } + + UINT8 *base = m_bank_base[offset >> 13]; + + if (base != NULL) + { + return base[offset & 0x1fff]; + } + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_konami_sound::write_cart) +{ + switch (offset & 0xe000) + { + case 0x4000: + if (m_ram_enabled[0] && m_bank_base[2] != NULL) + { + 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] != NULL) + { + 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] != NULL) + { + 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(space, offset, data); + } + else if (offset < 0xa0) + { + offset &= 0x0f; + if (offset < 0x0a) + { + m_k052539->k051649_frequency_w(space, offset, data); + } + else if (offset < 0x0f) + { + m_k052539->k051649_volume_w(space, offset - 0xa, data); + } + else + { + m_k052539->k051649_keyonoff_w(space, 0, data); + } + } + else if (offset >= 0xe0) + { + m_k052539->k051649_test_w(space, offset, data); + } + } + break; + } + break; + + case 0xa000: + if (m_ram_enabled[3] && m_bank_base[1] != NULL) + { + 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(space, offset, data); + } + else if (offset < 0xc0) + { + offset &= 0x0f; + if (offset < 0x0a) + { + m_k052539->k051649_frequency_w(space, offset, data); + } + else if (offset < 0x0f) + { + m_k052539->k051649_volume_w(space, offset - 0x0a, data); + } + else if (offset == 0x0f) + { + m_k052539->k051649_keyonoff_w(space, 0, data); + } + } + else if (offset < 0xe0) + { + m_k052539->k051649_test_w(space, offset, data); + } + } + } + break; + } + break; + } +} + + +msx_cart_konami_sound_snatcher::msx_cart_konami_sound_snatcher(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : msx_cart_konami_sound(mconfig, MSX_CART_SOUND_SNATCHER, "MSX Cartridge - Sound Snatcher", tag, owner, clock, "msx_cart_sound_snatcher", __FILE__) +{ +} + + +void msx_cart_konami_sound_snatcher::initialize_cartridge() +{ + msx_cart_konami_sound::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_sdsnatcher::msx_cart_konami_sound_sdsnatcher(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : msx_cart_konami_sound(mconfig, MSX_CART_SOUND_SDSNATCHER, "MSX Cartridge - Sound SD Snatcher", tag, owner, clock, "msx_cart_sound_sdsnatcher", __FILE__) +{ +} + + +void msx_cart_konami_sound_sdsnatcher::initialize_cartridge() +{ + msx_cart_konami_sound::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; + } + +} + diff --git a/src/emu/bus/msx_cart/konami.h b/src/emu/bus/msx_cart/konami.h new file mode 100644 index 00000000000..18d0429d302 --- /dev/null +++ b/src/emu/bus/msx_cart/konami.h @@ -0,0 +1,169 @@ +#ifndef __MSX_CART_KONAMI_H +#define __MSX_CART_KONAMI_H + +#include "bus/msx_cart/cartridge.h" +#include "sound/k051649.h" +#include "sound/dac.h" + + +extern const device_type MSX_CART_KONAMI; +extern const device_type MSX_CART_KONAMI_SCC; +extern const device_type MSX_CART_GAMEMASTER2; +extern const device_type MSX_CART_SYNTHESIZER; +extern const device_type MSX_CART_SOUND_SNATCHER; +extern const device_type MSX_CART_SOUND_SDSNATCHER; + + +class msx_cart_konami : public device_t + , public msx_cart_interface +{ +public: + msx_cart_konami(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + UINT8 m_bank_mask; + UINT8 m_selected_bank[3]; + UINT8 *m_bank_base[8]; +}; + + +class msx_cart_konami_scc : public device_t + , public msx_cart_interface +{ +public: + msx_cart_konami_scc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + virtual machine_config_constructor device_mconfig_additions() const; + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + required_device<k051649_device> m_k051649; + + UINT8 m_bank_mask; + UINT8 m_selected_bank[4]; + UINT8 *m_bank_base[8]; + bool m_scc_active; +}; + + +class msx_cart_gamemaster2 : public device_t + , public msx_cart_interface +{ +public: + msx_cart_gamemaster2(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + UINT8 m_selected_bank[3]; + UINT8 *m_bank_base[8]; + + void setup_bank(UINT8 bank); +}; + + +class msx_cart_synthesizer : public device_t + , public msx_cart_interface +{ +public: + msx_cart_synthesizer(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual machine_config_constructor device_mconfig_additions() const; + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + +private: + UINT8 *m_bank_base; + required_device<dac_device> m_dac; +}; + + +class msx_cart_konami_sound : public device_t + , public msx_cart_interface +{ +public: + msx_cart_konami_sound(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + virtual machine_config_constructor device_mconfig_additions() const; + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +protected: + UINT8 *m_ram_bank[16]; + +private: + // This is actually a K052539 + required_device<k051649_device> m_k052539; + + UINT8 m_selected_bank[4]; + UINT8 *m_bank_base[8]; + bool m_scc_active; + bool m_sccplus_active; + bool m_ram_enabled[4]; + UINT8 m_scc_mode; + + void setup_bank(UINT8 bank); +}; + + +class msx_cart_konami_sound_snatcher : public msx_cart_konami_sound +{ +public: + msx_cart_konami_sound_snatcher(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + virtual void initialize_cartridge(); +}; + + +class msx_cart_konami_sound_sdsnatcher : public msx_cart_konami_sound +{ +public: + msx_cart_konami_sound_sdsnatcher(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + virtual void initialize_cartridge(); +}; + + +#endif diff --git a/src/emu/bus/msx_cart/korean.c b/src/emu/bus/msx_cart/korean.c new file mode 100644 index 00000000000..a6688cb3340 --- /dev/null +++ b/src/emu/bus/msx_cart/korean.c @@ -0,0 +1,297 @@ +#include "emu.h" +#include "korean.h" + +const device_type MSX_CART_KOREAN_80IN1 = &device_creator<msx_cart_korean_80in1>; +const device_type MSX_CART_KOREAN_90IN1 = &device_creator<msx_cart_korean_90in1>; +const device_type MSX_CART_KOREAN_126IN1 = &device_creator<msx_cart_korean_126in1>; + + +msx_cart_korean_80in1::msx_cart_korean_80in1(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_KOREAN_80IN1, "MSX Cartridge - Korean 80-in-1", tag, owner, clock, "msx_cart_korean_80in1", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_bank_mask(0) +{ + for (int i = 0; i < 4; i++) + { + m_selected_bank[i] = i; + m_bank_base[i] = NULL; + } +} + + +void msx_cart_korean_80in1::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_korean_80in1::restore_banks), this)); +} + + +void msx_cart_korean_80in1::setup_bank(UINT8 bank) +{ + m_bank_base[bank] = get_rom_base() + ( m_selected_bank[bank] & m_bank_mask ) * 0x2000; +} + + +void msx_cart_korean_80in1::restore_banks() +{ + for (int i = 0; i < 4; i++) + { + setup_bank(i); + } +} + + +void msx_cart_korean_80in1::device_reset() +{ + for (int i = 0; i < 4; i++) + { + m_selected_bank[i] = i; + } +} + + +void msx_cart_korean_80in1::initialize_cartridge() +{ + UINT32 size = get_rom_size(); + + if ( size > 256 * 0x2000 ) + { + fatalerror("korean_80in1: ROM is too big\n"); + } + + UINT16 banks = size / 0x2000; + + if (size != banks * 0x2000 || (~(banks - 1) % banks)) + { + fatalerror("korean_80in1: Invalid ROM size\n"); + } + + m_bank_mask = banks - 1; + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_korean_80in1::read_cart) +{ + if (offset >= 0x4000 && offset < 0xc000) + { + return m_bank_base[(offset - 0x4000) >> 13][offset & 0x1fff]; + } + + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_korean_80in1::write_cart) +{ + if (offset >= 0x4000 && offset < 0x4004) + { + UINT8 bank = offset & 3; + + m_selected_bank[bank] = data; + setup_bank(bank); + } +} + + + + + +msx_cart_korean_90in1::msx_cart_korean_90in1(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_KOREAN_90IN1, "MSX Cartridge - Korean 90-in-1", tag, owner, clock, "msx_cart_korean_90in1", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_bank_mask(0) + , m_selected_bank(0) +{ + for (int i = 0; i < 4; i++) + { + m_bank_base[i] = NULL; + } +} + + +void msx_cart_korean_90in1::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_korean_90in1::restore_banks), this)); + + // Install IO read/write handlers + address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO); + space.install_write_handler(0x77, 0x77, write8_delegate(FUNC(msx_cart_korean_90in1::banking), this)); +} + + +void msx_cart_korean_90in1::restore_banks() +{ + UINT8 *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_reset() +{ + m_selected_bank = 0; +} + + +void msx_cart_korean_90in1::initialize_cartridge() +{ + UINT32 size = get_rom_size(); + + if ( size > 64 * 0x4000 ) + { + fatalerror("korean_90in1: ROM is too big\n"); + } + + UINT16 banks = size / 0x4000; + + if (size != banks * 0x4000 || (~(banks - 1) % banks)) + { + fatalerror("korean_90in1: Invalid ROM size\n"); + } + + m_bank_mask = banks - 1; + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_korean_90in1::read_cart) +{ + if (offset >= 0x4000 && offset < 0xc000) + { + return m_bank_base[(offset - 0x4000) >> 13][offset & 0x1fff]; + } + + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_korean_90in1::banking) +{ + m_selected_bank = data; + restore_banks(); +} + + + + + +msx_cart_korean_126in1::msx_cart_korean_126in1(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_KOREAN_126IN1, "MSX Cartridge - Korean 126-in-1", tag, owner, clock, "msx_cart_korean_126in1", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_bank_mask(0) +{ + for (int i = 0; i < 2; i++) + { + m_selected_bank[i] = i; + m_bank_base[i] = NULL; + } +} + + +void msx_cart_korean_126in1::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_korean_126in1::restore_banks), this)); +} + + +void msx_cart_korean_126in1::setup_bank(UINT8 bank) +{ + m_bank_base[bank] = get_rom_base() + ( m_selected_bank[bank] & m_bank_mask ) * 0x4000; +} + + +void msx_cart_korean_126in1::restore_banks() +{ + for (int i = 0; i < 2; i++) + { + setup_bank(i); + } +} + + +void msx_cart_korean_126in1::device_reset() +{ + for (int i = 0; i < 2; i++) + { + m_selected_bank[i] = i; + } +} + + +void msx_cart_korean_126in1::initialize_cartridge() +{ + UINT32 size = get_rom_size(); + + if ( size > 256 * 0x4000 ) + { + fatalerror("korean_126in1: ROM is too big\n"); + } + + UINT16 banks = size / 0x4000; + + if (size != banks * 0x4000 || (~(banks - 1) % banks)) + { + fatalerror("korean_126in1: Invalid ROM size\n"); + } + + m_bank_mask = banks - 1; + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_korean_126in1::read_cart) +{ + if (offset >= 0x4000 && offset < 0xc000) + { + return m_bank_base[offset >> 15][offset & 0x3fff]; + } + + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_korean_126in1::write_cart) +{ + if (offset >= 0x4000 && offset < 0x4002) + { + UINT8 bank = offset & 1; + + m_selected_bank[bank] = data; + setup_bank(bank); + } +} + diff --git a/src/emu/bus/msx_cart/korean.h b/src/emu/bus/msx_cart/korean.h new file mode 100644 index 00000000000..76062632923 --- /dev/null +++ b/src/emu/bus/msx_cart/korean.h @@ -0,0 +1,89 @@ +#ifndef __MSX_CART_KOREAN_H +#define __MSX_CART_KOREAN_H + +#include "bus/msx_cart/cartridge.h" + + +extern const device_type MSX_CART_KOREAN_80IN1; +extern const device_type MSX_CART_KOREAN_90IN1; +extern const device_type MSX_CART_KOREAN_126IN1; + + +class msx_cart_korean_80in1 : public device_t + , public msx_cart_interface +{ +public: + msx_cart_korean_80in1(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + UINT8 m_bank_mask; + UINT8 m_selected_bank[4]; + UINT8 *m_bank_base[4]; + + void setup_bank(UINT8 bank); +}; + + +class msx_cart_korean_90in1 : public device_t + , public msx_cart_interface +{ +public: + msx_cart_korean_90in1(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + + DECLARE_WRITE8_MEMBER(banking); + + void restore_banks(); + +private: + UINT8 m_bank_mask; + UINT8 m_selected_bank; + UINT8 *m_bank_base[4]; +}; + + +class msx_cart_korean_126in1 : public device_t + , public msx_cart_interface +{ +public: + msx_cart_korean_126in1(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + UINT8 m_bank_mask; + UINT8 m_selected_bank[2]; + UINT8 *m_bank_base[2]; + + void setup_bank(UINT8 bank); +}; + + +#endif diff --git a/src/emu/bus/msx_cart/majutsushi.c b/src/emu/bus/msx_cart/majutsushi.c new file mode 100644 index 00000000000..a89ad1f2328 --- /dev/null +++ b/src/emu/bus/msx_cart/majutsushi.c @@ -0,0 +1,114 @@ +#include "emu.h" +#include "majutsushi.h" + +const device_type MSX_CART_MAJUTSUSHI = &device_creator<msx_cart_majutsushi>; + + +msx_cart_majutsushi::msx_cart_majutsushi(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_MAJUTSUSHI, "MSX Cartridge - Majutsushi", tag, owner, clock, "msx_cart_majutsushi", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_dac(*this, "dac") +{ + for (int i = 0; i < 4; i++) + { + m_selected_bank[i] = 0; + } + for (int i = 0; i < 8; i++) + { + m_bank_base[i] = NULL; + } +} + + +static MACHINE_CONFIG_FRAGMENT( majutsushi ) + // 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'. + MCFG_SPEAKER_STANDARD_MONO("mono") + MCFG_SOUND_ADD("dac", DAC, 0) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.10) +MACHINE_CONFIG_END + + +machine_config_constructor msx_cart_majutsushi::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( majutsushi ); +} + + +void msx_cart_majutsushi::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_majutsushi::restore_banks), this)); +} + + +void msx_cart_majutsushi::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_reset() +{ + for (int i = 0; i < 4; i++) + { + m_selected_bank[i] = i; + } +} + + +void msx_cart_majutsushi::initialize_cartridge() +{ + if ( get_rom_size() != 0x20000 ) + { + fatalerror("majutsushi: Invalid ROM size\n"); + } + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_majutsushi::read_cart) +{ + return m_bank_base[offset >> 13][offset & 0x1fff]; +} + + +WRITE8_MEMBER(msx_cart_majutsushi::write_cart) +{ + switch (offset & 0xe000) + { + case 0x4000: + if (offset & 0x1000) + { + m_dac->write_unsigned8(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; + } +} + diff --git a/src/emu/bus/msx_cart/majutsushi.h b/src/emu/bus/msx_cart/majutsushi.h new file mode 100644 index 00000000000..95188585169 --- /dev/null +++ b/src/emu/bus/msx_cart/majutsushi.h @@ -0,0 +1,37 @@ +#ifndef __MSX_CART_MAJUTSUSHI_H +#define __MSX_CART_MAJUTSUSHI_H + +#include "bus/msx_cart/cartridge.h" +#include "sound/dac.h" + + +extern const device_type MSX_CART_MAJUTSUSHI; + + +class msx_cart_majutsushi : public device_t + , public msx_cart_interface +{ +public: + msx_cart_majutsushi(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + virtual machine_config_constructor device_mconfig_additions() const; + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + required_device<dac_device> m_dac; + + UINT8 m_selected_bank[4]; + UINT8 *m_bank_base[8]; +}; + + +#endif diff --git a/src/emu/bus/msx_cart/msxdos2.c b/src/emu/bus/msx_cart/msxdos2.c new file mode 100644 index 00000000000..10af9d6de28 --- /dev/null +++ b/src/emu/bus/msx_cart/msxdos2.c @@ -0,0 +1,66 @@ +#include "emu.h" +#include "msxdos2.h" + +const device_type MSX_CART_MSXDOS2 = &device_creator<msx_cart_msxdos2>; + + +msx_cart_msxdos2::msx_cart_msxdos2(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_MSXDOS2, "MSX Cartridge - MSXDOS2", tag, owner, clock, "msx_cart_msxdos2", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_selected_bank(0) + , m_bank_base(NULL) +{ +} + + +void msx_cart_msxdos2::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_msxdos2::restore_banks), this)); +} + + +void msx_cart_msxdos2::restore_banks() +{ + m_bank_base = get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000; +} + + +void msx_cart_msxdos2::device_reset() +{ + m_selected_bank = 0; +} + + +void msx_cart_msxdos2::initialize_cartridge() +{ + if (get_rom_size() != 0x10000) + { + fatalerror("msxdos2: Invalid ROM size\n"); + } + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_msxdos2::read_cart) +{ + if (offset >= 0x4000 && offset < 0x8000) + { + return m_bank_base[offset & 0x3fff]; + } + + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_msxdos2::write_cart) +{ + if (offset == 0x6000) + { + m_selected_bank = data; + restore_banks(); + } +} + diff --git a/src/emu/bus/msx_cart/msxdos2.h b/src/emu/bus/msx_cart/msxdos2.h new file mode 100644 index 00000000000..eeaaf584e4a --- /dev/null +++ b/src/emu/bus/msx_cart/msxdos2.h @@ -0,0 +1,33 @@ +#ifndef __MSX_CART_MSXDOS2_H +#define __MSX_CART_MSXDOS2_H + +#include "bus/msx_cart/cartridge.h" + + +extern const device_type MSX_CART_MSXDOS2; + + +class msx_cart_msxdos2 : public device_t + , public msx_cart_interface +{ +public: + msx_cart_msxdos2(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + UINT8 m_selected_bank; + UINT8 *m_bank_base; +}; + + +#endif diff --git a/src/emu/bus/msx_cart/nomapper.c b/src/emu/bus/msx_cart/nomapper.c new file mode 100644 index 00000000000..faa91b3d1dc --- /dev/null +++ b/src/emu/bus/msx_cart/nomapper.c @@ -0,0 +1,49 @@ + +#include "emu.h" +#include "nomapper.h" + +const device_type MSX_CART_NOMAPPER = &device_creator<msx_cart_nomapper>; + + +msx_cart_nomapper::msx_cart_nomapper(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_NOMAPPER, "MSX Cartridge - ROM", tag, owner, clock, "msx_cart_nomapper", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_start_address(0) + , m_end_address(0) +{ +} + +void msx_cart_nomapper::device_start() +{ +} + +void msx_cart_nomapper::initialize_cartridge() +{ + UINT32 size = get_rom_size(); + + m_start_address = 0x4000; + + if (size <= 0x4000) + { + // Check if this ROM should be in page 2 + + UINT8 *rom = get_rom_base(); + + if (rom[0] == 'A' && rom[1] == 'B' && (rom[3] & 0x80)) + { + m_start_address = 0x8000; + } + } + + m_end_address = MIN(m_start_address + size, 0x10000); +} + +READ8_MEMBER(msx_cart_nomapper::read_cart) +{ + if ( offset >= m_start_address && offset < m_end_address ) + { + return get_rom_base()[offset - m_start_address]; + } + return 0xff; +} + diff --git a/src/emu/bus/msx_cart/nomapper.h b/src/emu/bus/msx_cart/nomapper.h new file mode 100644 index 00000000000..c469f776cdc --- /dev/null +++ b/src/emu/bus/msx_cart/nomapper.h @@ -0,0 +1,28 @@ +#ifndef __MSX_CART_NOMAPPER_H +#define __MSX_CART_NOMAPPER_H + +#include "bus/msx_cart/cartridge.h" + + +extern const device_type MSX_CART_NOMAPPER; + + +class msx_cart_nomapper : public device_t + , public msx_cart_interface +{ +public: + msx_cart_nomapper(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + +private: + UINT32 m_start_address; + UINT32 m_end_address; +}; + +#endif diff --git a/src/emu/bus/msx_cart/rtype.c b/src/emu/bus/msx_cart/rtype.c new file mode 100644 index 00000000000..25c1ec18f89 --- /dev/null +++ b/src/emu/bus/msx_cart/rtype.c @@ -0,0 +1,77 @@ +#include "emu.h" +#include "rtype.h" + +const device_type MSX_CART_RTYPE = &device_creator<msx_cart_rtype>; + + +msx_cart_rtype::msx_cart_rtype(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_RTYPE, "MSX Cartridge - R-Type", tag, owner, clock, "msx_cart_rtype", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_selected_bank(0) +{ + for (int i = 0; i < 2; i++) + { + m_bank_base[i] = NULL; + } +} + + +void msx_cart_rtype::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_rtype::restore_banks), this)); +} + + +void msx_cart_rtype::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_reset() +{ + m_selected_bank = 15; +} + + +void msx_cart_rtype::initialize_cartridge() +{ + if ( get_rom_size() != 0x80000 && get_rom_size() != 0x60000 ) + { + fatalerror("rtype: Invalid ROM size\n"); + } + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_rtype::read_cart) +{ + if (offset >= 0x4000 && offset < 0xc000) + { + return m_bank_base[offset >> 15][offset & 0x3fff]; + } + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_rtype::write_cart) +{ + 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; + } +} + diff --git a/src/emu/bus/msx_cart/rtype.h b/src/emu/bus/msx_cart/rtype.h new file mode 100644 index 00000000000..999ba3232ff --- /dev/null +++ b/src/emu/bus/msx_cart/rtype.h @@ -0,0 +1,33 @@ +#ifndef __MSX_CART_RTYPE_H +#define __MSX_CART_RTYPE_H + +#include "bus/msx_cart/cartridge.h" + + +extern const device_type MSX_CART_RTYPE; + + +class msx_cart_rtype : public device_t + , public msx_cart_interface +{ +public: + msx_cart_rtype(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + virtual DECLARE_WRITE8_MEMBER(write_cart); + + void restore_banks(); + +private: + UINT8 m_selected_bank; + UINT8 *m_bank_base[2]; +}; + + +#endif diff --git a/src/emu/bus/msx_cart/superloderunner.c b/src/emu/bus/msx_cart/superloderunner.c new file mode 100644 index 00000000000..8337ca63254 --- /dev/null +++ b/src/emu/bus/msx_cart/superloderunner.c @@ -0,0 +1,61 @@ +#include "emu.h" +#include "superloderunner.h" + +const device_type MSX_CART_SUPERLODERUNNER = &device_creator<msx_cart_superloderunner>; + + +msx_cart_superloderunner::msx_cart_superloderunner(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_CART_SUPERLODERUNNER, "MSX Cartridge - Super Lode Runner", tag, owner, clock, "msx_cart_superloderunner", __FILE__) + , msx_cart_interface(mconfig, *this) + , m_selected_bank(0) + , m_bank_base(NULL) +{ +} + + +void msx_cart_superloderunner::device_start() +{ + save_item(NAME(m_selected_bank)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_cart_superloderunner::restore_banks), this)); + + // Install evil memory write handler + address_space &space = machine().device<cpu_device>("maincpu")->space(AS_PROGRAM); + space.install_write_handler(0x0000, 0x0000, write8_delegate(FUNC(msx_cart_superloderunner::banking), this)); +} + + +void msx_cart_superloderunner::restore_banks() +{ + m_bank_base = get_rom_base() + (m_selected_bank & 0x0f) * 0x4000; +} + + +void msx_cart_superloderunner::initialize_cartridge() +{ + if (get_rom_size() != 0x20000) + { + fatalerror("crossblaim: Invalid ROM size\n"); + } + + restore_banks(); +} + + +READ8_MEMBER(msx_cart_superloderunner::read_cart) +{ + if (offset >= 0x8000 && offset < 0xc000) + { + return m_bank_base[offset & 0x3fff]; + } + + return 0xff; +} + + +WRITE8_MEMBER(msx_cart_superloderunner::banking) +{ + m_selected_bank = data; + restore_banks(); +} + diff --git a/src/emu/bus/msx_cart/superloderunner.h b/src/emu/bus/msx_cart/superloderunner.h new file mode 100644 index 00000000000..5508f3f361f --- /dev/null +++ b/src/emu/bus/msx_cart/superloderunner.h @@ -0,0 +1,33 @@ +#ifndef __MSX_CART_SUPERLODERUNNER_H +#define __MSX_CART_SUPERLODERUNNER_H + +#include "bus/msx_cart/cartridge.h" + + +extern const device_type MSX_CART_SUPERLODERUNNER; + + +class msx_cart_superloderunner : public device_t + , public msx_cart_interface +{ +public: + msx_cart_superloderunner(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + + virtual void initialize_cartridge(); + + virtual DECLARE_READ8_MEMBER(read_cart); + + DECLARE_WRITE8_MEMBER(banking); + + void restore_banks(); + +private: + UINT8 m_selected_bank; + UINT8 *m_bank_base; +}; + + +#endif diff --git a/src/emu/bus/msx_slot/bunsetsu.c b/src/emu/bus/msx_slot/bunsetsu.c new file mode 100644 index 00000000000..49d529bc003 --- /dev/null +++ b/src/emu/bus/msx_slot/bunsetsu.c @@ -0,0 +1,77 @@ +/* + Emulation for the bunsetsu internal firmware mapper found in a number of MSX machines +*/ + +#include "emu.h" +#include "bunsetsu.h" + + +const device_type MSX_SLOT_BUNSETSU = &device_creator<msx_slot_bunsetsu_device>; + + +msx_slot_bunsetsu_device::msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : msx_slot_rom_device(mconfig, MSX_SLOT_BUNSETSU, "MSX Internal BUNSETSU", tag, owner, clock, "msx_slot_bunsetsu", __FILE__) + , m_bunsetsu_region(NULL) + , m_bunsetsu_region_tag(NULL) + , m_bunsetsu_address(0) +{ +} + + +void msx_slot_bunsetsu_device::device_start() +{ + msx_slot_rom_device::device_start(); + + if (m_bunsetsu_region_tag == NULL) + { + fatalerror("msx_slot_bunsetsu_device: no bunsetsu region tag specified\n"); + } + + m_bunsetsu_region = owner()->memregion(m_bunsetsu_region_tag); + + if (m_bunsetsu_region == NULL) + { + fatalerror("msx_slot_bunsetsu_device: Unable to find region with tag '%s'\n", m_bunsetsu_region_tag); + } + + if (m_bunsetsu_region->bytes() != 0x20000) + { + fatalerror("msx_slot_bunsetsu_device: Bunsetsu region must be 0x20000 bytes.\n"); + } +} + + +void msx_slot_bunsetsu_device::device_reset() +{ + m_bunsetsu_address = 0; +} + + +READ8_MEMBER(msx_slot_bunsetsu_device::read) +{ + if (offset == 0xbfff) + { + return m_bunsetsu_region->u8(m_bunsetsu_address++ & 0x1ffff); + } + return msx_slot_rom_device::read(space, offset); +} + + +WRITE8_MEMBER(msx_slot_bunsetsu_device::write) +{ + switch (offset) + { + case 0xbffc: + m_bunsetsu_address = (m_bunsetsu_address & 0xffff00) | data; + break; + + case 0xbffd: + m_bunsetsu_address = (m_bunsetsu_address & 0xff00ff) | (data << 8); + break; + + case 0xbffe: + m_bunsetsu_address = (m_bunsetsu_address & 0x00ffff) | (data << 16); + break; + } +} + diff --git a/src/emu/bus/msx_slot/bunsetsu.h b/src/emu/bus/msx_slot/bunsetsu.h new file mode 100644 index 00000000000..d798cc52b34 --- /dev/null +++ b/src/emu/bus/msx_slot/bunsetsu.h @@ -0,0 +1,38 @@ +#ifndef __MSX_SLOT_BUNSETSU_H +#define __MSX_SLOT_BUNSETSU_H + +#include "bus/msx_slot/slot.h" +#include "bus/msx_slot/rom.h" + + +extern const device_type MSX_SLOT_BUNSETSU; + + +#define MCFG_MSX_SLOT_BUNSETSU_ADD(_tag, _startpage, _numpages, _region, _offset, _bunsetsu_region_tag) \ + MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_BUNSETSU, _startpage, _numpages) \ + msx_slot_rom_device::set_rom_start(*device, _region, _offset); \ + msx_slot_bunsetsu_device::set_bunsetsu_region_tag(*device, _bunsetsu_region_tag); \ + +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 clock); + + // static configuration helpers + static void set_bunsetsu_region_tag(device_t &device, const char *tag) { dynamic_cast<msx_slot_bunsetsu_device &>(device).m_bunsetsu_region_tag = tag; } + + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read); + virtual DECLARE_WRITE8_MEMBER(write); + +private: + memory_region *m_bunsetsu_region; + const char *m_bunsetsu_region_tag; + UINT32 m_bunsetsu_address; +}; + + +#endif + diff --git a/src/emu/bus/msx_slot/cartridge.c b/src/emu/bus/msx_slot/cartridge.c new file mode 100644 index 00000000000..199d1c8a1b7 --- /dev/null +++ b/src/emu/bus/msx_slot/cartridge.c @@ -0,0 +1,317 @@ +#include "emu.h" +#include "bus/msx_slot/cartridge.h" +#include "hashfile.h" + + +enum +{ + NOMAPPER = 0, + ASCII8, + ASCII8_SRAM, + ASCII16, + ASCII16_SRAM, + CROSSBLAIM, + GAMEMASTER2, + KOREAN_80IN1, + KOREAN_90IN1, + KOREAN_126IN1, + FMPAC, + RTYPE, + KONAMI, + KONAMI_SCC, + SUPERLODERUNNER, + MAJUTSUSHI, + DISK_ROM, + SYNTHESIZER, + MSXDOS2 +}; + + +const device_type MSX_SLOT_CARTRIDGE = &device_creator<msx_slot_cartridge_device>; + + +msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_SLOT_CARTRIDGE, "MSX Cartridge slot", tag, owner, clock, "msx_slot_cartridge", __FILE__) + , device_image_interface(mconfig, *this) + , device_slot_interface(mconfig, *this) + , msx_internal_slot_interface() +{ +} + + +static const struct +{ + int pcb_id; + const char *slot_option; +} slot_list[] = +{ + { NOMAPPER, "nomapper" }, + { ASCII8, "ascii8" }, + { ASCII8_SRAM, "ascii8_sram" }, + { ASCII16, "ascii16" }, + { ASCII16_SRAM, "ascii16_sram" }, + { CROSSBLAIM, "cross_blaim" }, + { GAMEMASTER2, "gamemaster2" }, + { KOREAN_80IN1, "korean_80in1" }, + { KOREAN_90IN1, "korean_90in1" }, + { KOREAN_126IN1, "korean_126in1" }, + { FMPAC, "fmpac" }, + { RTYPE, "rtype" }, + { KONAMI, "konami" }, + { KONAMI_SCC, "konami_scc" }, + { SUPERLODERUNNER, "superloderunner" }, + { MAJUTSUSHI, "majutsushi" }, + { DISK_ROM, "disk_rom" }, + { SYNTHESIZER, "synthesizer" }, + { MSXDOS2, "msxdos2" } +}; + + +static const char *msx_cart_get_slot_option(int type) +{ + for (int i = 0; i < ARRAY_LENGTH(slot_list); i++) + { + if (slot_list[i].pcb_id == type) + return slot_list[i].slot_option; + } + + return slot_list[0].slot_option; +} + + +void msx_slot_cartridge_device::device_start() +{ + m_cartridge = dynamic_cast<msx_cart_interface *>(get_card_device()); +} + + +bool msx_slot_cartridge_device::call_load() +{ + if ( m_cartridge ) + { + if ( software_entry() ) + { + // Allocate and copy rom contents + UINT32 length = get_software_region_length("rom"); + + m_cartridge->rom_alloc( length ); + UINT8 *rom_base = m_cartridge->get_rom_base(); + memcpy(rom_base, get_software_region("rom"), length); + + // Allocate ram + length = get_software_region_length("ram"); + m_cartridge->ram_alloc( length ); + + // Allocate sram + length = get_software_region_length("sram"); + m_cartridge->sram_alloc( length ); + } + else + { + UINT32 length = this->length(); + + UINT32 length_aligned = 0x4000; + while (length_aligned < length ) + { + length_aligned *= 2; + } + + m_cartridge->rom_alloc(length_aligned); + m_cartridge->ram_alloc(0); + m_cartridge->sram_alloc(0); + + if (fread(m_cartridge->get_rom_base(), length) != length) + { + seterror(IMAGE_ERROR_UNSPECIFIED, "Unable to fully read file"); + return IMAGE_INIT_FAIL; + } + + // Check if there's some mapper related + astring extrainfo; + if (hashfile_extrainfo(*this, extrainfo)) + { + } + } + + m_cartridge->initialize_cartridge(); + + if (m_cartridge->get_sram_size() > 0) + { + battery_load(m_cartridge->get_sram_base(), m_cartridge->get_sram_size(), 0x00); + } + } + return IMAGE_INIT_PASS; +} + + +void msx_slot_cartridge_device::call_unload() +{ + if (m_cartridge) + { + if (m_cartridge->get_sram_size() > 0) + { + battery_save(m_cartridge->get_sram_base(), m_cartridge->get_sram_size()); + } + } +} + + +bool msx_slot_cartridge_device::call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) +{ + load_software_part_region(*this, swlist, swname, start_entry); + return true; +} + + +int msx_slot_cartridge_device::get_cart_type(UINT8 *rom, UINT32 length) +{ + if (length < 0x2000) + { + return -1; + } + + if (length < 0x10000) + { + return NOMAPPER; + } + + if ( (rom[0x10] == 'Y') && (rom[0x11] == 'Z') && (length > 0x18000) ) + { + return GAMEMASTER2; + } + + int kon4 = 0, kon5 = 0, asc8 = 0, asc16 = 0; + + for (int i=0; i < length-3; i++) + { + if (rom[i] == 0x32 && rom[i+1] == 0) + { + switch (rom[i+2]) + { + case 0x60: + case 0x70: + asc16++; + asc8++; + break; + + case 0x68: + case 0x78: + asc8++; + asc16--; + break; + } + + switch (rom[i+2]) + { + case 0x60: + case 0x80: + case 0xa0: + kon4++; + break; + + case 0x50: + case 0x70: + case 0x90: + case 0xb0: + kon5++; + break; + } + } + } + + if (MAX (kon4, kon5) > MAX (asc8, asc16) ) + { + return (kon5 > kon4) ? KONAMI_SCC : KONAMI; + } + else + { + return (asc8 > asc16) ? ASCII8 : ASCII16; + } + + return NOMAPPER; +} + + +void msx_slot_cartridge_device::get_default_card_software(astring &result) +{ + if (open_image_file(mconfig().options())) + { + const char *slot_string = "nomapper"; + UINT32 length = core_fsize(m_file); + dynamic_buffer rom(length); + int type = NOMAPPER; + + // Check if there's some mapper related information in the hashfiles + astring extrainfo; + if (hashfile_extrainfo(*this, extrainfo)) + { + int extrainfo_type = -1; + if (1 == sscanf(extrainfo.cstr(), "%d", &extrainfo_type)) + { + static const struct { int extrainfo; int mapper; } extrainfo_map[] = { + //{ 0, NOMAPPER }, + { 1, MSXDOS2 }, + { 2, KONAMI_SCC }, + { 3, KONAMI }, + { 4, ASCII8 }, + { 5, ASCII16 }, + { 6, GAMEMASTER2 }, + { 7, ASCII8_SRAM }, + { 8, ASCII16_SRAM }, + { 9, RTYPE }, + { 10, MAJUTSUSHI }, + { 11, FMPAC }, + { 12, SUPERLODERUNNER }, + { 13, SYNTHESIZER }, + { 14, CROSSBLAIM }, + { 15, DISK_ROM }, + { 16, KOREAN_80IN1 }, + { 17, KOREAN_126IN1 } + }; + + for (int i = 0; i < ARRAY_LENGTH(extrainfo_map); i++) + { + if (extrainfo_map[i].extrainfo == extrainfo_type) + { + type = extrainfo_map[i].mapper; + } + } + } + } + + if (type == NOMAPPER) + { + // Not identified through hashfile, try automatic detection + type = get_cart_type(rom, length); + } + + if (type > NOMAPPER) + { + slot_string = msx_cart_get_slot_option(type); + } + + result.cpy(slot_string); + return; + } + software_get_default_slot(result, "nomapper"); +} + + +READ8_MEMBER(msx_slot_cartridge_device::read) +{ + if ( m_cartridge ) + { + return m_cartridge->read_cart(space, offset); + } + return 0xFF; +} + + +WRITE8_MEMBER(msx_slot_cartridge_device::write) +{ + if ( m_cartridge ) + { + m_cartridge->write_cart(space, offset, data); + } +} + diff --git a/src/emu/bus/msx_slot/cartridge.h b/src/emu/bus/msx_slot/cartridge.h new file mode 100644 index 00000000000..6716dc3ca14 --- /dev/null +++ b/src/emu/bus/msx_slot/cartridge.h @@ -0,0 +1,57 @@ +#ifndef __MSX_SLOT_CARTRIDGE_H +#define __MSX_SLOT_CARTRIDGE_H + +#include "slot.h" +#include "bus/msx_cart/cartridge.h" + + +extern const device_type MSX_SLOT_CARTRIDGE; + + +#define MCFG_MSX_SLOT_CARTRIDGE_ADD(_tag) \ + MCFG_DEVICE_ADD(_tag, MSX_SLOT_CARTRIDGE, 0) \ + MCFG_DEVICE_SLOT_INTERFACE(msx_cart, NULL, false) + + +class msx_slot_cartridge_device : public device_t + , public device_image_interface + , public device_slot_interface + , public msx_internal_slot_interface +{ +public: + // construction/destruction + msx_slot_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // device-level overrides + virtual void device_start(); + virtual void device_config_complete() { update_names(MSX_SLOT_CARTRIDGE, "cartridge", "cart"); } + + // image-level overrides + virtual bool call_load(); + virtual void call_unload(); + virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry); + virtual iodevice_t image_type() const { return IO_CARTSLOT; } + virtual bool is_readable() const { return true; } + virtual bool is_writeable() const { return false; } + virtual bool is_creatable() const { return false; } + virtual bool must_be_loaded() const { return false; } + virtual bool is_reset_on_load() const { return true; } + virtual const option_guide *create_option_guide() const { return NULL; } + virtual const char *image_interface() const { return "msx_cart"; } + virtual const char *file_extensions() const { return "mx1,bin,rom"; } + + // slot interface overrides + virtual void get_default_card_software(astring &result); + + // msx_internal_slot-level overrides + virtual DECLARE_READ8_MEMBER(read); + virtual DECLARE_WRITE8_MEMBER(write); + +private: + msx_cart_interface *m_cartridge; + + int get_cart_type(UINT8 *rom, UINT32 length); +}; + +#endif + diff --git a/src/emu/bus/msx_slot/disk.c b/src/emu/bus/msx_slot/disk.c new file mode 100644 index 00000000000..3995bbc73e6 --- /dev/null +++ b/src/emu/bus/msx_slot/disk.c @@ -0,0 +1,369 @@ +/* +From: erbo@xs4all.nl (erik de boer) + +sony and philips have used (almost) the same design +and this is the memory layout +but it is not a msx standard ! + +WD1793 or wd2793 registers + +address + +7FF8H read status register + write command register +7FF9H r/w track register (r/o on NMS 8245 and Sony) +7FFAH r/w sector register (r/o on NMS 8245 and Sony) +7FFBH r/w data register + + +hardware registers + +address + +7FFCH r/w bit 0 side select +7FFDH r/w b7>M-on , b6>in-use , b1>ds1 , b0>ds0 (all neg. logic) +7FFEH not used +7FFFH read b7>drq , b6>intrq + +set on 7FFDH bit 2 always to 0 (some use it as disk change reset) + +*/ + +#include "emu.h" +#include "disk.h" + + +const device_type MSX_SLOT_DISK1 = &device_creator<msx_slot_disk1_device>; +const device_type MSX_SLOT_DISK2 = &device_creator<msx_slot_disk2_device>; + + +msx_slot_disk_device::msx_slot_disk_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) + : msx_slot_rom_device(mconfig, type, name, tag, owner, clock, shortname, source) + , m_fdc(NULL) + , m_floppy0(NULL) + , m_floppy1(NULL) + , m_floppy(NULL) + , m_fdc_tag(NULL) + , m_floppy0_tag(NULL) + , m_floppy1_tag(NULL) +{ +} + + +void msx_slot_disk_device::device_start() +{ + msx_slot_rom_device::device_start(); + + if (m_fdc_tag == NULL) + { + fatalerror("msx_slot_disk_device: no FDC tag specified\n"); + } + + m_fdc = owner()->subdevice<wd_fdc_analog_t>(m_fdc_tag); + m_floppy0 = owner()->subdevice<floppy_connector>(m_floppy0_tag); + m_floppy1 = owner()->subdevice<floppy_connector>(m_floppy1_tag); + + if (m_fdc == NULL) + { + fatalerror("msx_slot_disk_device: Unable to find FDC with tag '%s'\n", m_fdc_tag); + } + + if (m_floppy0 == NULL && m_floppy1 == NULL) + { + logerror("msx_slot_disk_device: Warning: both floppy0 and floppy1 were not found\n"); + } +} + + +msx_slot_disk1_device::msx_slot_disk1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : msx_slot_disk_device(mconfig, MSX_SLOT_DISK1, "MSX Internal floppy type 1", tag, owner, clock, "msx_slot_disk1", __FILE__) + , m_side_control(0) + , m_control(0) +{ +} + + +void msx_slot_disk1_device::device_start() +{ + msx_slot_disk_device::device_start(); + + save_item(NAME(m_side_control)); + save_item(NAME(m_control)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_slot_disk1_device::post_load), this)); +} + + +void msx_slot_disk1_device::device_reset() +{ + m_fdc->dden_w(false); +} + + +void msx_slot_disk1_device::post_load() +{ + UINT8 data = m_control; + + // To make sure the FDD busy led status gets set correctly + m_control ^= 0x40; + + set_control(data); +} + + +void msx_slot_disk1_device::set_side_control(UINT8 data) +{ + m_side_control = data; + + if (m_floppy) + { + m_floppy->ss_w(m_side_control & 0x01); + } +} + + +void msx_slot_disk1_device::set_control(UINT8 data) +{ + UINT8 old_m_control = m_control; + + m_control = data; + + switch (m_control & 0x03) + { + case 0: + case 2: + m_floppy = m_floppy0 ? m_floppy0->get_device() : NULL; + break; + + case 1: + m_floppy = m_floppy1 ? m_floppy1->get_device() : NULL; + break; + + default: + m_floppy = NULL; + break; + } + + if (m_floppy) + { + m_floppy->mon_w((m_control & 0x80) ? 0 : 1); + m_floppy->ss_w(m_side_control & 0x01); + } + + m_fdc->set_floppy(m_floppy); + + if ((old_m_control ^ m_control) & 0x40) + { + set_led_status(machine(), 0, !(m_control & 0x40)); + } +} + + +READ8_MEMBER(msx_slot_disk1_device::read) +{ + 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); + } + + return msx_slot_rom_device::read(space, offset); +} + + +WRITE8_MEMBER(msx_slot_disk1_device::write) +{ + 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; + } +} + + +msx_slot_disk2_device::msx_slot_disk2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : msx_slot_disk_device(mconfig, MSX_SLOT_DISK2, "MSX Internal floppy type 2", tag, owner, clock, "msx_slot_disk2", __FILE__) + , m_control(0) +{ +} + + +void msx_slot_disk2_device::device_start() +{ + msx_slot_disk_device::device_start(); + + save_item(NAME(m_control)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_slot_disk2_device::post_load), this)); +} + + +void msx_slot_disk2_device::device_reset() +{ + m_fdc->dden_w(false); +} + + +void msx_slot_disk2_device::post_load() +{ + UINT8 data = m_control; + + // To make sure the FDD busy led status gets set correctly + m_control ^= 0x40; + + set_control(data); +} + + +void msx_slot_disk2_device::set_control(UINT8 data) +{ + UINT8 old_m_control = m_control; + + m_control = data; + + switch (m_control & 3) + { + case 1: + m_floppy = m_floppy0 ? m_floppy0->get_device() : NULL; + break; + + case 2: + m_floppy = m_floppy1 ? m_floppy1->get_device() : NULL; + break; + + default: + m_floppy = NULL; + break; + } + + if (m_floppy) + { + m_floppy->mon_w((m_control & 0x08) ? 0 : 1); + m_floppy->ss_w((m_control & 0x04) ? 0 : 1); + } + + m_fdc->set_floppy(m_floppy); + + if ((old_m_control ^ m_control) & 0x40) + { + set_led_status(machine(), 0, !(m_control & 0x40)); + } +} + + +READ8_MEMBER(msx_slot_disk2_device::read) +{ + 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); + } + + return msx_slot_rom_device::read(space, offset); +} + + +WRITE8_MEMBER(msx_slot_disk2_device::write) +{ + 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: + printf("Unmapped write writing %02x to %04x\n", data, offset); + break; + } +} + diff --git a/src/emu/bus/msx_slot/disk.h b/src/emu/bus/msx_slot/disk.h new file mode 100644 index 00000000000..afeff77d527 --- /dev/null +++ b/src/emu/bus/msx_slot/disk.h @@ -0,0 +1,97 @@ +#ifndef __MSX_SLOT_DISK_H +#define __MSX_SLOT_DISK_H + +#include "bus/msx_slot/slot.h" +#include "bus/msx_slot/rom.h" +#include "machine/wd_fdc.h" +#include "imagedev/flopdrv.h" +#include "imagedev/floppy.h" + + +extern const device_type MSX_SLOT_DISK1; +extern const device_type MSX_SLOT_DISK2; + + +#define MCFG_MSX_SLOT_DISK1_ADD(_tag, _startpage, _numpages, _region, _offset, _fdc_tag, _floppy0_tag, _floppy1_tag) \ + MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_DISK1, _startpage, _numpages) \ + msx_slot_rom_device::set_rom_start(*device, _region, _offset); \ + msx_slot_disk_device::set_fdc_tag(*device, _fdc_tag); \ + msx_slot_disk_device::set_floppy0_tag(*device, _floppy0_tag); \ + msx_slot_disk_device::set_floppy1_tag(*device, _floppy1_tag); + +#define MCFG_MSX_SLOT_DISK2_ADD(_tag, _startpage, _numpages, _region, _offset, _fdc_tag, _floppy0_tag, _floppy1_tag) \ + MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_DISK2, _startpage, _numpages) \ + msx_slot_rom_device::set_rom_start(*device, _region, _offset); \ + msx_slot_disk_device::set_fdc_tag(*device, _fdc_tag); \ + msx_slot_disk_device::set_floppy0_tag(*device, _floppy0_tag); \ + msx_slot_disk_device::set_floppy1_tag(*device, _floppy1_tag); + + +class msx_slot_disk_device : public msx_slot_rom_device +{ +public: + msx_slot_disk_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + + virtual void device_start(); + + // static configuration helpers + static void set_fdc_tag(device_t &device, const char *tag) { dynamic_cast<msx_slot_disk_device &>(device).m_fdc_tag = tag; } + static void set_floppy0_tag(device_t &device, const char *tag) { dynamic_cast<msx_slot_disk_device &>(device).m_floppy0_tag = tag; } + static void set_floppy1_tag(device_t &device, const char *tag) { dynamic_cast<msx_slot_disk_device &>(device).m_floppy1_tag = tag; } + +protected: + wd_fdc_analog_t *m_fdc; + floppy_connector *m_floppy0; + floppy_connector *m_floppy1; + floppy_image_device *m_floppy; + +private: + const char *m_fdc_tag; + const char *m_floppy0_tag; + const char *m_floppy1_tag; +}; + + +class msx_slot_disk1_device : public msx_slot_disk_device +{ +public: + msx_slot_disk1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read); + virtual DECLARE_WRITE8_MEMBER(write); + + void post_load(); + +private: + UINT8 m_side_control; + UINT8 m_control; + + void set_control(UINT8 data); + void set_side_control(UINT8 data); +}; + + +class msx_slot_disk2_device : public msx_slot_disk_device +{ +public: + msx_slot_disk2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read); + virtual DECLARE_WRITE8_MEMBER(write); + + void post_load(); + +private: + UINT8 m_control; + + void set_control(UINT8 data); +}; + +#endif + diff --git a/src/emu/bus/msx_slot/fs4600.c b/src/emu/bus/msx_slot/fs4600.c new file mode 100644 index 00000000000..76adbc65411 --- /dev/null +++ b/src/emu/bus/msx_slot/fs4600.c @@ -0,0 +1,162 @@ +/* + Emulation for the internal firmware mapper in the National FS-4600. +*/ + +#include "emu.h" +#include "fs4600.h" + + +const device_type MSX_SLOT_FS4600 = &device_creator<msx_slot_fs4600_device>; + + +msx_slot_fs4600_device::msx_slot_fs4600_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_SLOT_FS4600, "MSX Internal FS4600 Firmware", tag, owner, clock, "msx_slot_fs4600", __FILE__) + , msx_internal_slot_interface() + , m_nvram(*this, "nvram") + , m_region(NULL) + , m_region_offset(0) + , m_rom(NULL) + , m_sram_address(0) + , m_control(0) +{ + for (int i = 0; i < 4; i++) + { + m_selected_bank[i] = 0; + m_bank_base[i] = 0; + } + memset(m_sram, 0, sizeof(m_sram)); +} + + +static MACHINE_CONFIG_FRAGMENT( fs4600 ) + MCFG_NVRAM_ADD_0FILL("nvram") +MACHINE_CONFIG_END + + +machine_config_constructor msx_slot_fs4600_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( fs4600 ); +} + + +void msx_slot_fs4600_device::set_rom_start(device_t &device, const char *region, UINT32 offset) +{ + msx_slot_fs4600_device &dev = downcast<msx_slot_fs4600_device &>(device); + + dev.m_region = region; + dev.m_region_offset = offset; +} + + +void msx_slot_fs4600_device::device_start() +{ + assert(m_region != NULL ); + + memory_region *m_rom_region = owner()->memregion(m_region); + + // Sanity checks + if (m_rom_region == NULL ) + { + fatalerror("Rom slot '%s': Unable to find memory region '%s'\n", tag(), m_region); + } + if (m_rom_region->bytes() < m_region_offset + 0x100000) + { + fatalerror("Memory region '%s' is too small for the FS4600 firmware\n", m_region); + } + + m_rom = m_rom_region->base() + m_region_offset; + m_nvram->set_base(m_sram, 0x1000); + + save_item(NAME(m_selected_bank)); + save_item(NAME(m_sram_address)); + save_item(NAME(m_control)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_slot_fs4600_device::restore_banks), this)); + + restore_banks(); +} + + +void msx_slot_fs4600_device::restore_banks() +{ + for (int i = 0; i < 4; i++) + { + m_bank_base[i] = m_rom + ( ( m_selected_bank[i] * 0x4000 ) & 0x0fffff ); + } +} + + +READ8_MEMBER(msx_slot_fs4600_device::read) +{ + 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]; +} + + +WRITE8_MEMBER(msx_slot_fs4600_device::write) +{ + 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("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("Unhandled write %02x to %04x\n", data, offset);; + break; + } + } + } +} + diff --git a/src/emu/bus/msx_slot/fs4600.h b/src/emu/bus/msx_slot/fs4600.h new file mode 100644 index 00000000000..61f855e7a08 --- /dev/null +++ b/src/emu/bus/msx_slot/fs4600.h @@ -0,0 +1,45 @@ +#ifndef __MSX_SLOT_FS4600_H +#define __MSX_SLOT_FS4600_H + +#include "slot.h" +#include "machine/nvram.h" + + +extern const device_type MSX_SLOT_FS4600; + + +#define MCFG_MSX_SLOT_FS4600_ADD(_tag, _startpage, _numpages, _region, _offset) \ + MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_FS4600, _startpage, _numpages) \ + msx_slot_fs4600_device::set_rom_start(*device, _region, _offset); + +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 clock); + + // static configuration helpers + static void set_rom_start(device_t &device, const char *region, UINT32 offset); + + virtual void device_start(); + virtual machine_config_constructor device_mconfig_additions() const; + + virtual DECLARE_READ8_MEMBER(read); + virtual DECLARE_WRITE8_MEMBER(write); + + void restore_banks(); + +private: + required_device<nvram_device> m_nvram; + const char *m_region; + UINT32 m_region_offset; + const UINT8 *m_rom; + UINT8 m_selected_bank[4]; + const UINT8 *m_bank_base[4]; + UINT32 m_sram_address; + UINT8 m_sram[0x1000]; + UINT8 m_control; +}; + + +#endif diff --git a/src/emu/bus/msx_slot/music.c b/src/emu/bus/msx_slot/music.c new file mode 100644 index 00000000000..77e8369fef4 --- /dev/null +++ b/src/emu/bus/msx_slot/music.c @@ -0,0 +1,69 @@ +#include "emu.h" +#include "music.h" + + +const device_type MSX_SLOT_MUSIC = &device_creator<msx_slot_music_device>; + + +msx_slot_music_device::msx_slot_music_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : msx_slot_rom_device(mconfig, MSX_SLOT_MUSIC, "MSX Internal MSX-MUSIC", tag, owner, clock, "msx_slot_music", __FILE__) + , m_ym2413(NULL) + , m_ym2413_tag(NULL) + , m_opll_active(false) + , m_unlock(0) +{ +} + + +void msx_slot_music_device::device_start() +{ + msx_slot_rom_device::device_start(); + + if (m_ym2413_tag == NULL) + { + fatalerror("msx_slot_music_device: no YM2413 tag specified\n"); + } + + m_ym2413 = owner()->subdevice<ym2413_device>(m_ym2413_tag); + + if (m_ym2413 == NULL) + { + fatalerror("msx_slot_ym2413_device: Unable to find YM2413 with tag '%s'\n", m_ym2413_tag); + } + + // Install IO read/write handlers + address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO); + space.install_write_handler(0x7c, 0x7d, write8_delegate(FUNC(msx_slot_music_device::write_ym2413), this)); +} + + +void msx_slot_music_device::device_reset() +{ + m_opll_active = false; +} + + +READ8_MEMBER(msx_slot_music_device::read) +{ + return msx_slot_rom_device::read(space, offset); +} + + +WRITE8_MEMBER(msx_slot_music_device::write) +{ + if (m_unlock == 0xbe && data == 0x41) + { + m_opll_active = true; + } + m_unlock = data; +} + + +WRITE8_MEMBER(msx_slot_music_device::write_ym2413) +{ + if (m_opll_active) + { + m_ym2413->write(space, offset & 1, data); + } +} + diff --git a/src/emu/bus/msx_slot/music.h b/src/emu/bus/msx_slot/music.h new file mode 100644 index 00000000000..0dda5bf779c --- /dev/null +++ b/src/emu/bus/msx_slot/music.h @@ -0,0 +1,43 @@ +#ifndef __MSX_SLOT_MUSIC_H +#define __MSX_SLOT_MUSIC_H + + +#include "bus/msx_slot/slot.h" +#include "bus/msx_slot/rom.h" +#include "sound/2413intf.h" + + +extern const device_type MSX_SLOT_MUSIC; + + +#define MCFG_MSX_SLOT_MUSIC_ADD(_tag, _startpage, _numpages, _region, _offset, _ym2413_tag) \ + MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_MUSIC, _startpage, _numpages) \ + msx_slot_rom_device::set_rom_start(*device, _region, _offset); \ + msx_slot_music_device::set_ym2413_tag(*device, _ym2413_tag); \ + +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 clock); + + // static configuration helpers + static void set_ym2413_tag(device_t &device, const char *tag) { dynamic_cast<msx_slot_music_device &>(device).m_ym2413_tag = tag; } + + virtual void device_start(); + virtual void device_reset(); + + virtual DECLARE_READ8_MEMBER(read); + virtual DECLARE_WRITE8_MEMBER(write); + + DECLARE_WRITE8_MEMBER(write_ym2413); + +private: + ym2413_device *m_ym2413; + const char *m_ym2413_tag; + bool m_opll_active; + UINT8 m_unlock; +}; + + +#endif + diff --git a/src/emu/bus/msx_slot/panasonic08.c b/src/emu/bus/msx_slot/panasonic08.c new file mode 100644 index 00000000000..af762c32cfa --- /dev/null +++ b/src/emu/bus/msx_slot/panasonic08.c @@ -0,0 +1,176 @@ +/* + + Emulation of the firmware mapper as found in Panasonic FS-A1WX andFS-A1WSX machines. + +Todo: +- Anything besides the basic mapping +- SRAM? +*/ + +#include "emu.h" +#include "panasonic08.h" + + +const device_type MSX_SLOT_PANASONIC08 = &device_creator<msx_slot_panasonic08_device>; + + +msx_slot_panasonic08_device::msx_slot_panasonic08_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_SLOT_PANASONIC08, "MSX Internal Panasonic08", tag, owner, clock, "msx_slot_panasonic08", __FILE__) + , msx_internal_slot_interface() + , m_region(NULL) + , m_region_offset(0) + , m_rom(NULL) + , m_control(0) +{ + for (int i = 0; i < 8; i++) + { + m_selected_bank[i] = 0; + m_bank_base[i] = 0; + } + memset(m_sram, 0, sizeof(m_sram)); +} + + +static MACHINE_CONFIG_FRAGMENT( panasonic08 ) +MACHINE_CONFIG_END + + +machine_config_constructor msx_slot_panasonic08_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( panasonic08 ); +} + + +void msx_slot_panasonic08_device::set_rom_start(device_t &device, const char *region, UINT32 offset) +{ + msx_slot_panasonic08_device &dev = downcast<msx_slot_panasonic08_device &>(device); + + dev.m_region = region; + dev.m_region_offset = offset; +} + + +void msx_slot_panasonic08_device::device_start() +{ + assert(m_region != NULL ); + + memory_region *m_rom_region = owner()->memregion(m_region); + + // Sanity checks + if (m_rom_region == NULL ) + { + fatalerror("Rom slot '%s': Unable to find memory region '%s'\n", tag(), m_region); + } + if (m_rom_region->bytes() < m_region_offset + 0x200000) + { + fatalerror("Memory region '%s' is too small for the FS4600 firmware\n", m_region); + } + + m_rom = m_rom_region->base() + m_region_offset; + + save_item(NAME(m_selected_bank)); + save_item(NAME(m_control)); + save_item(NAME(m_sram)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_slot_panasonic08_device::restore_banks), this)); + + restore_banks(); +} + + +void msx_slot_panasonic08_device::map_bank(int bank) +{ + 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; + } + else + { + m_bank_base[bank] = m_rom + ( ( m_selected_bank[bank] * 0x2000 ) & 0x1fffff ); + } +} + + +void msx_slot_panasonic08_device::restore_banks() +{ + for (int i = 0; i < 8; i++) + { + map_bank(i); + } +} + + +READ8_MEMBER(msx_slot_panasonic08_device::read) +{ + 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]; +} + + +WRITE8_MEMBER(msx_slot_panasonic08_device::write) +{ + if ((offset & 0xc000) == 0x8000) + { + UINT8 bank = m_selected_bank[offset >> 13]; + if (bank >= 0x80 && bank < 0x84) // Are these banks were sram is present? Mirroring? + { + logerror("panasonic08: writing %02x to sram %04x\n", data, offset & 0x1fff); + m_sram[offset & 0x1fff] = data; + } + } + + 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: + 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: + m_selected_bank[5] = data; + map_bank(5); + break; + + case 0x7ff9: + m_control = data; + break; + + default: + logerror("Unhandled write %02x to %04x\n", data, offset); + break; + } +} + diff --git a/src/emu/bus/msx_slot/panasonic08.h b/src/emu/bus/msx_slot/panasonic08.h new file mode 100644 index 00000000000..6eedae2d505 --- /dev/null +++ b/src/emu/bus/msx_slot/panasonic08.h @@ -0,0 +1,44 @@ +#ifndef __MSX_SLOT_PANASONIC08_H +#define __MSX_SLOT_PANASONIC08_H + +#include "slot.h" + + +extern const device_type MSX_SLOT_PANASONIC08; + + +#define MCFG_MSX_SLOT_PANASONIC08_ADD(_tag, _startpage, _numpages, _region, _offset) \ + MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_PANASONIC08, _startpage, _numpages) \ + msx_slot_panasonic08_device::set_rom_start(*device, _region, _offset); + +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 clock); + + // static configuration helpers + static void set_rom_start(device_t &device, const char *region, UINT32 offset); + + virtual void device_start(); + virtual machine_config_constructor device_mconfig_additions() const; + + virtual DECLARE_READ8_MEMBER(read); + virtual DECLARE_WRITE8_MEMBER(write); + + void restore_banks(); + +private: + const char *m_region; + UINT32 m_region_offset; + const UINT8 *m_rom; + UINT8 m_selected_bank[8]; + const UINT8 *m_bank_base[8]; + UINT8 m_control; + UINT8 m_sram[0x2000]; + + void map_bank(int bank); +}; + + +#endif diff --git a/src/emu/bus/msx_slot/ram.c b/src/emu/bus/msx_slot/ram.c new file mode 100644 index 00000000000..f3a46daf8dc --- /dev/null +++ b/src/emu/bus/msx_slot/ram.c @@ -0,0 +1,36 @@ + + +#include "emu.h" +#include "ram.h" + +const device_type MSX_SLOT_RAM = &device_creator<msx_slot_ram_device>; + +msx_slot_ram_device::msx_slot_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_SLOT_RAM, "MSX Internal RAM", tag, owner, clock, "msx_slot_ram", __FILE__) + , msx_internal_slot_interface() +{ +} + +void msx_slot_ram_device::device_start() +{ + m_ram.resize(m_size); + save_item(NAME(m_ram)); +} + +READ8_MEMBER(msx_slot_ram_device::read) +{ + if ( offset >= m_start_address && offset < m_end_address ) + { + return m_ram[ offset - m_start_address ]; + } + return 0xFF; +} + +WRITE8_MEMBER(msx_slot_ram_device::write) +{ + if ( offset >= m_start_address && offset < m_end_address ) + { + m_ram[offset - m_start_address] = data; + } +} + diff --git a/src/emu/bus/msx_slot/ram.h b/src/emu/bus/msx_slot/ram.h new file mode 100644 index 00000000000..9f66808b234 --- /dev/null +++ b/src/emu/bus/msx_slot/ram.h @@ -0,0 +1,26 @@ +#ifndef __MSX_SLOT_RAM_H +#define __MSX_SLOT_RAM_H + +#include "slot.h" + +#define MCFG_MSX_SLOT_RAM_ADD(_tag, _startpage, _numpages) \ + MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_RAM, _startpage, _numpages) \ + +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 clock); + + virtual void device_start(); + + virtual DECLARE_READ8_MEMBER(read); + virtual DECLARE_WRITE8_MEMBER(write); + +private: + dynamic_array<UINT8> m_ram; +}; + +extern const device_type MSX_SLOT_RAM; + +#endif diff --git a/src/emu/bus/msx_slot/ram_mm.c b/src/emu/bus/msx_slot/ram_mm.c new file mode 100644 index 00000000000..3c5bc7b47a1 --- /dev/null +++ b/src/emu/bus/msx_slot/ram_mm.c @@ -0,0 +1,79 @@ +#include "emu.h" +#include "ram_mm.h" + +const device_type MSX_SLOT_RAM_MM = &device_creator<msx_slot_ram_mm_device>; + +msx_slot_ram_mm_device::msx_slot_ram_mm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_SLOT_RAM_MM, "MSX Internal Memory Mapped RAM", tag, owner, clock, "msx_slot_ram_mm", __FILE__) + , msx_internal_slot_interface() + , m_total_size(0) + , m_bank_mask(0) + , m_ramio_set_bits(0) +{ +} + +void msx_slot_ram_mm_device::device_start() +{ + // Valid mapper sizes are 64KB, 128KB, 256KB, 512KB, 1MB, 2MB, and 4MB */ + switch (m_total_size) + { + 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; + 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)); + + machine().save().register_postload(save_prepost_delegate(FUNC(msx_slot_ram_mm_device::restore_banks), this)); + + // Install IO read/write handlers + address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO); + space.install_read_handler(0xFC, 0xFF, read8_delegate(FUNC(msx_slot_ram_mm_device::read_mapper_bank), this)); + space.install_write_handler(0xFC, 0xFF, write8_delegate(FUNC(msx_slot_ram_mm_device::write_mapper_bank), this)); +} + +void msx_slot_ram_mm_device::restore_banks() +{ + for ( int i = 0; i < 3; i++ ) + { + m_bank_base[i] = m_ram + 0x4000 * ( m_bank_selected[i] & m_bank_mask ); + } +} + +READ8_MEMBER(msx_slot_ram_mm_device::read) +{ + return m_bank_base[offset >> 14][offset & 0x3fff]; +} + +WRITE8_MEMBER(msx_slot_ram_mm_device::write) +{ + m_bank_base[offset >> 14][offset & 0x3fff] = data; +} + +READ8_MEMBER(msx_slot_ram_mm_device::read_mapper_bank) +{ + return m_bank_selected[offset & 3] | m_ramio_set_bits; +} + +WRITE8_MEMBER(msx_slot_ram_mm_device::write_mapper_bank) +{ + offset &= 3; + + m_bank_selected[offset] = data; + m_bank_base[offset] = m_ram + 0x4000 * ( m_bank_selected[offset] & m_bank_mask ); +} + diff --git a/src/emu/bus/msx_slot/ram_mm.h b/src/emu/bus/msx_slot/ram_mm.h new file mode 100644 index 00000000000..5027fa428e1 --- /dev/null +++ b/src/emu/bus/msx_slot/ram_mm.h @@ -0,0 +1,44 @@ +#ifndef __MSX_SLOT_RAM_MM_H +#define __MSX_SLOT_RAM_MM_H + +#include "slot.h" + +#define MCFG_MSX_SLOT_RAM_MM_ADD(_tag, _total_size) \ + MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_RAM_MM, 0, 4) \ + msx_slot_ram_mm_device::set_total_size(*device, _total_size); + +#define MCFG_MSX_SLOT_RAMM_SET_RAMIO_BITS(_ramio_set_bits) \ + msx_slot_ram_mm_device::set_ramio_set_bits(*device, _ramio_set_bits); + +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 clock); + + static void set_total_size(device_t &device, UINT32 total_size) { dynamic_cast<msx_slot_ram_mm_device &>(device).m_total_size = total_size; } + static void set_ramio_set_bits(device_t &device, UINT8 ramio_set_bits) { dynamic_cast<msx_slot_ram_mm_device &>(device).m_ramio_set_bits = ramio_set_bits; } + + virtual void device_start(); + + virtual DECLARE_READ8_MEMBER(read); + virtual DECLARE_WRITE8_MEMBER(write); + + DECLARE_READ8_MEMBER(read_mapper_bank); + DECLARE_WRITE8_MEMBER(write_mapper_bank); + + void restore_banks(); + +private: + dynamic_array<UINT8> m_ram; + UINT32 m_total_size; + UINT8 m_bank_mask; + UINT8 m_bank_selected[4]; + UINT8 *m_bank_base[4]; + UINT8 m_ramio_set_bits; +}; + +extern const device_type MSX_SLOT_RAM_MM; + +#endif + diff --git a/src/emu/bus/msx_slot/rom.c b/src/emu/bus/msx_slot/rom.c new file mode 100644 index 00000000000..fcae656ac41 --- /dev/null +++ b/src/emu/bus/msx_slot/rom.c @@ -0,0 +1,66 @@ +#include "emu.h" +#include "rom.h" + + +const device_type MSX_SLOT_ROM = &device_creator<msx_slot_rom_device>; + + +msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MSX_SLOT_ROM, "MSX Internal ROM", tag, owner, clock, "msx_slot_rom", __FILE__) + , msx_internal_slot_interface() + , m_region(NULL) + , m_region_offset(0) + , m_rom(NULL) +{ +} + + +msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) + : device_t(mconfig, type, name, tag, owner, clock, shortname, source) + , msx_internal_slot_interface() + , m_region(NULL) + , m_region_offset(0) + , m_rom(NULL) +{ +} + + +void msx_slot_rom_device::set_rom_start(device_t &device, const char *region, UINT32 offset) +{ + msx_slot_rom_device &dev = downcast<msx_slot_rom_device &>(device); + + dev.m_region = region; + dev.m_region_offset = offset; +} + + +void msx_slot_rom_device::device_start() +{ + assert(m_region != NULL ); + + memory_region *m_rom_region = owner()->memregion(m_region); + + // Sanity checks + if (m_rom_region == NULL ) + { + fatalerror("Rom slot '%s': Unable to find memory region '%s'\n", tag(), m_region); + } + if (m_rom_region->bytes() < m_region_offset + m_size) + { + fatalerror("Memory region '%s' is too small for rom slot '%s'\n", m_region, tag()); + } + + m_rom = m_rom_region->base() + m_region_offset; +} + + +READ8_MEMBER(msx_slot_rom_device::read) +{ + if ( offset >= m_start_address && offset < m_end_address ) + { + return m_rom[ offset - m_start_address ]; + } + return 0xFF; +} + + diff --git a/src/emu/bus/msx_slot/rom.h b/src/emu/bus/msx_slot/rom.h new file mode 100644 index 00000000000..dfed30f902d --- /dev/null +++ b/src/emu/bus/msx_slot/rom.h @@ -0,0 +1,32 @@ +#ifndef __MSX_SLOT_ROM_H +#define __MSX_SLOT_ROM_H + +#include "slot.h" + +#define MCFG_MSX_SLOT_ROM_ADD(_tag, _startpage, _numpages, _region, _offset) \ + MCFG_MSX_INTERNAL_SLOT_ADD(_tag, MSX_SLOT_ROM, _startpage, _numpages) \ + msx_slot_rom_device::set_rom_start(*device, _region, _offset); + +class msx_slot_rom_device : public device_t, + public msx_internal_slot_interface +{ +public: + msx_slot_rom_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); + msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // static configuration helpers + static void set_rom_start(device_t &device, const char *region, UINT32 offset); + + virtual void device_start(); + + virtual DECLARE_READ8_MEMBER(read); + +private: + const char *m_region; + UINT32 m_region_offset; + const UINT8 *m_rom; +}; + +extern const device_type MSX_SLOT_ROM; + +#endif diff --git a/src/emu/bus/msx_slot/slot.c b/src/emu/bus/msx_slot/slot.c new file mode 100644 index 00000000000..ad8b08634ec --- /dev/null +++ b/src/emu/bus/msx_slot/slot.c @@ -0,0 +1,35 @@ +/*********************************************************************************************************** + + MSX (logical) internal slot interfacing + +The MSX standard uses logically defined slots, subslots, and pages to access rom and optional components +in a system. There are no physical slots inside the system. A piece of rom/component can occur in multiple +pages; and multiple pieces of rom/ram/components can occur in a single slot. + +***********************************************************************************************************/ + +#include "emu.h" +#include "slot.h" + +msx_internal_slot_interface::msx_internal_slot_interface() + : m_start_address(0) + , m_size(0) + , m_end_address(0) +{ +} + +void msx_internal_slot_interface::set_start_address(device_t &device, UINT32 start_address) +{ + msx_internal_slot_interface &dev = dynamic_cast<msx_internal_slot_interface &>(device); + dev.m_start_address = start_address; + dev.m_end_address = dev.m_start_address + dev.m_size; +} + +void msx_internal_slot_interface::set_size(device_t &device, UINT32 size) +{ + msx_internal_slot_interface &dev = dynamic_cast<msx_internal_slot_interface &>(device); + + dev.m_size = size; + dev.m_end_address = dev.m_start_address + dev.m_size; +} + diff --git a/src/emu/bus/msx_slot/slot.h b/src/emu/bus/msx_slot/slot.h new file mode 100644 index 00000000000..3ddf36a038f --- /dev/null +++ b/src/emu/bus/msx_slot/slot.h @@ -0,0 +1,37 @@ +/*********************************************************************************************************** + + MSX (logical) internal slot/page interfacing + +The MSX standard uses logically defined slots, subslots, and pages to access rom and optional components +in a system. There are no physical slots inside the system. A piece of rom/component can occur in multiple +pages; and multiple pieces of rom/ram/components can occur in a single slot. + +***********************************************************************************************************/ + +#ifndef __MSX_SLOT_SLOT_H +#define __MSX_SLOT_SLOT_H + +#define MCFG_MSX_INTERNAL_SLOT_ADD(_tag, _type, _startpage, _numpages) \ + MCFG_DEVICE_ADD(_tag, _type, 0) \ + msx_internal_slot_interface::set_start_address(*device, _startpage * 0x4000); \ + msx_internal_slot_interface::set_size(*device, _numpages * 0x4000); + +class msx_internal_slot_interface +{ +public: + msx_internal_slot_interface(); + + // static configuration helpers + static void set_start_address(device_t &device, UINT32 start_address); + static void set_size(device_t &device, UINT32 size); + + virtual DECLARE_READ8_MEMBER(read) { return 0xFF; } + virtual DECLARE_WRITE8_MEMBER(write) { } + +protected: + UINT32 m_start_address; + UINT32 m_size; + UINT32 m_end_address; +}; + +#endif diff --git a/src/mess/drivers/msx.c b/src/mess/drivers/msx.c index 21413d0a441..534b87982d9 100644 --- a/src/mess/drivers/msx.c +++ b/src/mess/drivers/msx.c @@ -1,9 +1,90 @@ /* ** msx.c : driver for MSX ** -** Todo: -** - Add Turbo-R support -** - Add support for other MSX models (de,fr,jp,ru etc.) +** +** Todo/known issues: +** - expertdp: Floppy support broken +** - cf3300: Floppy support broken +** - piopx7: Laserdisc integration doesn't exist +** - spc800: Haven't been able to test operation of the han rom yet +** - svi728: Expansion slot not emulated +** - svi738: Floppy support broken causing the system not to boot into basic anymore +** - svi738: v9938 not emulated +** - svi738: rs232c not emulated +** - hx10: Expansion slot not emulated (hx10s also??) +** - cx5m, cx5m128, cx5m2: sfg not emulated +** - cx5m128: Firmware not emulated? +** - y503iir: Keyboard not responding correctly +** - y503iir, y503iir2: RTC not emulated +** - y503iir, y503iir2: Net not emulated +** - y503iir, y503iir2: Floppy support broken +** - yis503m: sfg not emulated +** - ax350: Floppy support broken +** - ax370: Floppy not emulated +** - cpc300: How to get passed MSX-TUTOR? +** - cpc300e: How to test han support? +** - cpc400: How to test han support? +** - cpc400: Floppy support broken +** - cpc400s: Floppy support broken +** - expert20: Does not boot +** - fs4500: Firmware not emulated +** - fs4500: Matsuhita switched device not emulated +** - fs4600: Firmware not emulated +** - fs4600: Kanji12 not emulated +** - fs4600: Floppy support broken +** - fs4700: Firmware not emulated +** - fs4700: Floppy support broken +** - fs4700: Matsushita switched device not emulated +** - fs5000: Does not boot; floppy support broken +** - fs5500: Floppy support broken +** - fs5500: Matsushita switched device not emulated +** - fsa1f: Floppy not emulated +** - fsa1fm: Floppy not emulated +** - fsa1fm: Firmware not emulated +** - fsa1fm: kanji12 not emulated +** - nms8280, nms8280g: Digitizer functionality not emulated +** - vg8230j: Floppy support broken? +** - hotbit20: Does not boot +** - hbf1: Does not boot +** - hbf12: Does not boot +** - hbf1xd: Does not boot because of floppy being broken +** - hbf1xdm2: Does not boot because of floppy being broken +** - hbf5: Does not boot +** - hbf500p: Does not boot because of floppy being broken +** - hbf700d: Does not boot when no floppy disk is present +** - hbf700f: Does not boot when no floppy disk is present +** - hbf900a: Does not boot when no floppy disk is present +** - hbg900ap: Does not boot when no floppy disk is present +** - hbg900p: Does not boot when no floppy disk is present +** - tpc310: Floppy support broken +** - tpp311: Firmware not working? +** - tps312: Firmware? +** - hx23: Firmware? +** - hx23f: Firmware support broken, can't get into basic +** - cx7m: sfg not emulated +** - expert3i: IDE not emulated +** - expert3t: Turbo not emulated +** - expertac: Does not boot +** - expertdx: Floppy not emulated +** - fsa1fx: Floppy not emulated +** - fsa1fx: Keeps rebooting into firmware +** - fsa1wsx: Firmware not emulated +** - fsa1wsx: Floppy not emulated +** - fsa1wx: Firmware not emulated +** - fsa1wx: Floppy not emulated +** - fsa1wxa: Firmware not emulated +** - fsa1wxa: Floppy not emulated +** - phc70fd: Floppy not emulated +** - phc70fd2: Floppy not emulated +** - hbf1xdj: Firmware not emulated +** - hbf1xdj: Does not boot when no floppy disk is present +** - hbf1xv: Firmare not emulated +** - hbf1xv: Does not boot when no floppy disk is present +** - hbf9sp: Firmware not working, can't get into basic +** - fsa1gt: Add Turbo-R support +** - fsa1st: Add Turbo-R support +** +************************************************************************ This following list is probably incomplete. Corrections are welcome. + @@ -343,21 +424,13 @@ Spectravideo SVI-707 - MB8877A - 1 5.25" SSDD drive (320KB) - There seem to be 2 #include "includes/msx.h" #include "bus/centronics/covox.h" #include "formats/dsk_dsk.h" +#include "machine/msx_matsushita.h" +#include "machine/msx_s1985.h" static ADDRESS_MAP_START ( msx_memory_map, AS_PROGRAM, 8, msx_state ) - AM_RANGE( 0x0000, 0x1fff) AM_READ_BANK("bank1") AM_WRITE(msx_page0_w) - AM_RANGE( 0x2000, 0x3fff) AM_READ_BANK("bank2") AM_WRITE(msx_page0_1_w) - AM_RANGE( 0x4000, 0x5fff) AM_READ_BANK("bank3") AM_WRITE(msx_page1_w) - AM_RANGE( 0x6000, 0x7ff7) AM_READ_BANK("bank4") AM_WRITE(msx_page1_1_w) - AM_RANGE( 0x7ff8, 0x7fff) AM_READ_BANK("bank5") AM_WRITE(msx_page1_2_w) - AM_RANGE( 0x8000, 0x97ff) AM_READ_BANK("bank6") AM_WRITE(msx_page2_w) - AM_RANGE( 0x9800, 0x9fff) AM_READ_BANK("bank7") AM_WRITE(msx_page2_1_w) - AM_RANGE( 0xa000, 0xb7ff) AM_READ_BANK("bank8") AM_WRITE(msx_page2_2_w) - AM_RANGE( 0xb800, 0xbfff) AM_READ_BANK("bank9") AM_WRITE(msx_page2_3_w) - AM_RANGE( 0xc000, 0xdfff) AM_READ_BANK("bank10") AM_WRITE(msx_page3_w) - AM_RANGE( 0xe000, 0xfffe) AM_READ_BANK("bank11") AM_WRITE(msx_page3_1_w) - AM_RANGE( 0xffff, 0xffff) AM_READWRITE(msx_sec_slot_r, msx_sec_slot_w) + AM_RANGE(0x0000, 0xfffe) AM_READWRITE(msx_mem_read, msx_mem_write) + AM_RANGE(0xffff, 0xffff) AM_READWRITE(msx_sec_slot_r, msx_sec_slot_w) ADDRESS_MAP_END @@ -373,8 +446,7 @@ WRITE8_MEMBER(msx_state::msx_ay8910_w) static ADDRESS_MAP_START ( msx_io_map, AS_IO, 8, msx_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE( 0x77, 0x77) AM_WRITE(msx_90in1_w) - AM_RANGE( 0x7c, 0x7d) AM_WRITE(msx_fmpac_w) + // 0x7c - 0x7d : MSX-MUSIC/FM-PAC write port. Handlers will be installed if MSX-MUSIC is present in a system AM_RANGE( 0x90, 0x90) AM_DEVREAD("cent_status_in", input_buffer_device, read) AM_RANGE( 0x90, 0x90) AM_DEVWRITE("cent_ctrl_out", output_latch_device, write) AM_RANGE( 0x91, 0x91) AM_DEVWRITE("cent_data_out", output_latch_device, write) @@ -383,14 +455,15 @@ static ADDRESS_MAP_START ( msx_io_map, AS_IO, 8, msx_state ) AM_RANGE( 0x98, 0x98) AM_DEVREADWRITE("tms9928a", tms9928a_device, vram_read, vram_write) AM_RANGE( 0x99, 0x99) AM_DEVREADWRITE("tms9928a", tms9928a_device, register_read, register_write) AM_RANGE( 0xd8, 0xd9) AM_READWRITE(msx_kanji_r, msx_kanji_w) + // 0xfc - 0xff : Memory mapper I/O ports. I/O handlers will be installed if a memory mapper is present in a system ADDRESS_MAP_END static ADDRESS_MAP_START ( msx2_io_map, AS_IO, 8, msx_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE( 0x77, 0x77) AM_WRITE(msx_90in1_w) - AM_RANGE( 0x7c, 0x7d) AM_WRITE(msx_fmpac_w) + AM_RANGE( 0x40, 0x4f) AM_READWRITE(msx_switched_r, msx_switched_w) + // 0x7c - 0x7d : MSX-MUSIC/FM-PAC write port. Handlers will be installed if MSX-MUSIC is present in a system AM_RANGE( 0x90, 0x90) AM_DEVREAD("cent_status_in", input_buffer_device, read) AM_RANGE( 0x90, 0x90) AM_DEVWRITE("cent_ctrl_out", output_latch_device, write) AM_RANGE( 0x91, 0x91) AM_DEVWRITE("cent_data_out", output_latch_device, write) @@ -400,15 +473,15 @@ static ADDRESS_MAP_START ( msx2_io_map, AS_IO, 8, msx_state ) AM_RANGE( 0xb4, 0xb4) AM_WRITE(msx_rtc_latch_w) AM_RANGE( 0xb5, 0xb5) AM_READWRITE(msx_rtc_reg_r, msx_rtc_reg_w) AM_RANGE( 0xd8, 0xd9) AM_READWRITE(msx_kanji_r, msx_kanji_w) - AM_RANGE( 0xfc, 0xff) AM_READWRITE(msx_ram_mapper_r, msx_ram_mapper_w) + // 0xfc - 0xff : Memory mapper I/O ports. I/O handlers will be installed if a memory mapper is present in a system ADDRESS_MAP_END static ADDRESS_MAP_START ( msx2p_io_map, AS_IO, 8, msx_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE( 0x77, 0x77) AM_WRITE(msx_90in1_w) - AM_RANGE( 0x7c, 0x7d) AM_WRITE(msx_fmpac_w) + AM_RANGE( 0x40, 0x4f) AM_READWRITE(msx_switched_r, msx_switched_w) + // 0x7c - 0x7d : MSX-MUSIC/FM-PAC write port. Handlers will be installed if MSX-MUSIC is present in a system AM_RANGE( 0x90, 0x90) AM_DEVREAD("cent_status_in", input_buffer_device, read) AM_RANGE( 0x90, 0x90) AM_DEVWRITE("cent_ctrl_out", output_latch_device, write) AM_RANGE( 0x91, 0x91) AM_DEVWRITE("cent_data_out", output_latch_device, write) @@ -418,7 +491,12 @@ static ADDRESS_MAP_START ( msx2p_io_map, AS_IO, 8, msx_state ) AM_RANGE( 0xb4, 0xb4) AM_WRITE(msx_rtc_latch_w) AM_RANGE( 0xb5, 0xb5) AM_READWRITE(msx_rtc_reg_r, msx_rtc_reg_w) AM_RANGE( 0xd8, 0xd9) AM_READWRITE(msx_kanji_r, msx_kanji_w) - AM_RANGE( 0xfc, 0xff) AM_READWRITE(msx_ram_mapper_r, msx_ram_mapper_w) + // 0xfc - 0xff : Memory mapper I/O ports. I/O handlers will be installed if a memory mapper is present in a system +ADDRESS_MAP_END + + +DEVICE_ADDRESS_MAP_START( switched_device_map, 8, msx_state ) + ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_END @@ -1045,6 +1123,16 @@ static INPUT_PORTS_START( msx2kr ) PORT_INCLUDE( msx_dips ) INPUT_PORTS_END + +// Some MSX2+ can switch the z80 clock between 3.5 and 5.3 MHz +WRITE_LINE_MEMBER(msx_state::turbo_w) +{ + // 0 - 5.369317 MHz + // 1 - 3.579545 MHz + m_maincpu->set_unscaled_clock(state ? XTAL_21_4772MHz/6 : XTAL_21_4772MHz/4); +} + + #define MSX_XBORDER_PIXELS 15 #define MSX_YBORDER_PIXELS 27 #define MSX_TOTAL_XRES_PIXELS 256 + (MSX_XBORDER_PIXELS * 2) @@ -1052,54 +1140,22 @@ INPUT_PORTS_END #define MSX_VISIBLE_XBORDER_PIXELS 8 #define MSX_VISIBLE_YBORDER_PIXELS 24 -static MACHINE_CONFIG_FRAGMENT( msx_cartslot_1 ) - MCFG_CARTSLOT_ADD("cart1") - MCFG_CARTSLOT_EXTENSION_LIST("mx1,rom") - MCFG_CARTSLOT_NOT_MANDATORY - MCFG_CARTSLOT_INTERFACE("msx_cart") - MCFG_CARTSLOT_LOAD(msx_state, msx_cart) - MCFG_CARTSLOT_UNLOAD(msx_state, msx_cart) -MACHINE_CONFIG_END - -static MACHINE_CONFIG_FRAGMENT( msx_cartslot_2 ) - MCFG_CARTSLOT_ADD("cart2") - MCFG_CARTSLOT_EXTENSION_LIST("mx1,rom") - MCFG_CARTSLOT_NOT_MANDATORY - MCFG_CARTSLOT_INTERFACE("msx_cart") - MCFG_CARTSLOT_LOAD(msx_state, msx_cart) - MCFG_CARTSLOT_UNLOAD(msx_state, msx_cart) -MACHINE_CONFIG_END - -static MACHINE_CONFIG_FRAGMENT( msx1_1_cartslot ) - MCFG_FRAGMENT_ADD( msx_cartslot_1 ) - /* Software lists */ +static MACHINE_CONFIG_FRAGMENT( msx1_cartlist ) MCFG_SOFTWARE_LIST_ADD("cart_list","msx1_cart") MACHINE_CONFIG_END -static MACHINE_CONFIG_FRAGMENT( msx1_2_cartslots ) - MCFG_FRAGMENT_ADD( msx_cartslot_1 ) - MCFG_FRAGMENT_ADD( msx_cartslot_2 ) - - /* Software lists */ - MCFG_SOFTWARE_LIST_ADD("cart_list","msx1_cart") +static MACHINE_CONFIG_FRAGMENT( msx1_floplist ) + MCFG_SOFTWARE_LIST_ADD("flop_list","msx1_flop") MACHINE_CONFIG_END -static MACHINE_CONFIG_FRAGMENT( msx2_1_cartslot ) - MCFG_FRAGMENT_ADD( msx_cartslot_1 ) - - /* Software lists */ +static MACHINE_CONFIG_FRAGMENT( msx2_cartlist ) MCFG_SOFTWARE_LIST_ADD("cart_list","msx2_cart") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_list","msx1_cart") + MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_cart_list","msx1_cart") MACHINE_CONFIG_END -static MACHINE_CONFIG_FRAGMENT( msx2_2_cartslots ) - MCFG_FRAGMENT_ADD( msx_cartslot_1 ) - MCFG_FRAGMENT_ADD( msx_cartslot_2 ) - - /* Software lists */ - MCFG_SOFTWARE_LIST_ADD("cart_list","msx2_cart") - MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_list","msx1_cart") +static MACHINE_CONFIG_FRAGMENT( msx2_floplist ) + MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("msx1_flop_list","msx1_flop") MACHINE_CONFIG_END FLOPPY_FORMATS_MEMBER( msx_state::floppy_formats ) @@ -1114,8 +1170,6 @@ SLOT_INTERFACE_END static MACHINE_CONFIG_FRAGMENT( msx_fd1793 ) MCFG_FD1793x_ADD("fdc", XTAL_4MHz / 4) MCFG_WD_FDC_FORCE_READY - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(msx_state, msx_wd179x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(msx_state, msx_wd179x_drq_w)) MACHINE_CONFIG_END static MACHINE_CONFIG_FRAGMENT( msx_wd2793 ) @@ -1124,30 +1178,23 @@ static MACHINE_CONFIG_FRAGMENT( msx_wd2793 ) // SSO/-ENMF + -DDEN + ENP + -5/8 - pulled low MCFG_WD2793x_ADD("fdc", XTAL_4MHz / 4) MCFG_WD_FDC_FORCE_READY - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(msx_state, msx_wd179x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(msx_state, msx_wd179x_drq_w)) MACHINE_CONFIG_END static MACHINE_CONFIG_FRAGMENT( msx_mb8877a ) MCFG_MB8877x_ADD("fdc", XTAL_4MHz / 4) - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(msx_state, msx_wd179x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(msx_state, msx_wd179x_drq_w)) + MCFG_WD_FDC_FORCE_READY MACHINE_CONFIG_END static MACHINE_CONFIG_FRAGMENT( msx_tc8566af ) // TODO: Implement TC8566AF, the fragment below is to keep the core happy MCFG_WD2793x_ADD("fdc", XTAL_4MHz / 4) MCFG_WD_FDC_FORCE_READY - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(msx_state, msx_wd179x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(msx_state, msx_wd179x_drq_w)) MACHINE_CONFIG_END static MACHINE_CONFIG_FRAGMENT( msx_microsol ) // TODO: Implement MICROSOL, the fragment below is to keep the core happy MCFG_WD2793x_ADD("fdc", XTAL_4MHz / 4) MCFG_WD_FDC_FORCE_READY - MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(msx_state, msx_wd179x_intrq_w)) - MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(msx_state, msx_wd179x_drq_w)) MACHINE_CONFIG_END static MACHINE_CONFIG_FRAGMENT( msx_1_35_ssdd_drive ) @@ -1163,6 +1210,11 @@ static MACHINE_CONFIG_FRAGMENT( msx_2_35_dd_drive ) MCFG_FLOPPY_DRIVE_ADD("fdc:1", msx_floppies, "35dd", msx_state::floppy_formats) MACHINE_CONFIG_END +static MACHINE_CONFIG_FRAGMENT( msx_ym2413 ) + MCFG_SOUND_ADD("ym2413", YM2413, XTAL_21_4772MHz/6) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) +MACHINE_CONFIG_END + static MACHINE_CONFIG_START( msx, msx_state ) /* basic machine hardware */ MCFG_CPU_ADD("maincpu", Z80, XTAL_10_738635MHz/3) /* 3.579545 MHz */ @@ -1192,10 +1244,6 @@ static MACHINE_CONFIG_START( msx, msx_state ) MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(msx_state, msx_psg_port_a_w)) MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(msx_state, msx_psg_port_b_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_ADD("k051649", K051649, XTAL_10_738635MHz/3/2) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) - MCFG_SOUND_ADD("ym2413", YM2413, XTAL_10_738635MHz/3) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) /* printer */ MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer") @@ -1288,10 +1336,6 @@ static MACHINE_CONFIG_START( msx2, msx_state ) MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(msx_state, msx_psg_port_a_w)) MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(msx_state, msx_psg_port_b_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_ADD("k051649", K051649, XTAL_21_4772MHz/6/2) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) - MCFG_SOUND_ADD("ym2413", YM2413, XTAL_21_4772MHz/6) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) /* printer */ MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer") @@ -1360,10 +1404,6 @@ static MACHINE_CONFIG_START( msx2p, msx_state ) MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(msx_state, msx_psg_port_a_w)) MCFG_AY8910_PORT_B_WRITE_CB(WRITE8(msx_state, msx_psg_port_b_w)) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30) - MCFG_SOUND_ADD("k051649", K051649, XTAL_21_4772MHz/6/2) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) - MCFG_SOUND_ADD("ym2413", YM2413, XTAL_21_4772MHz/6) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) /* printer */ MCFG_CENTRONICS_ADD("centronics", centronics_printers, "printer") @@ -1412,16 +1452,13 @@ ROM_START (msx) ROM_LOAD ("msx.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) ROM_END -MSX_LAYOUT_INIT (msx) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( msx_gen, msx_pal ) - MCFG_MSX_LAYOUT(msx) - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Al Alamiah AX-170 */ @@ -1432,20 +1469,19 @@ ROM_START (ax170) ROM_LOAD ("ax170arab.rom", 0x8000, 0x8000, CRC(339cd1aa) SHA1(0287b2ec897b9196788cd9f10c99e1487d7adbbb)) ROM_END -MSX_LAYOUT_INIT (ax170) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 1, 2, ROM, 0x8000, 0x8000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END static MACHINE_CONFIG_DERIVED( ax170, msx_pal ) - MCFG_MSX_LAYOUT(ax170) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("arab", 1, 0, 1, 2, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 2, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Canon V-10 */ @@ -1455,19 +1491,17 @@ ROM_START (canonv10) ROM_LOAD ("v10bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) ROM_END -MSX_LAYOUT_INIT (canonv10) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 3, 1, RAM, 0x4000, 0xC000) /* 16KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( canonv10, msx_pal ) - MCFG_MSX_LAYOUT(canonv10) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 3, 1) /* 16KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot12", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Canon V-20 */ @@ -1476,19 +1510,17 @@ ROM_START (canonv20) ROM_LOAD ("v20bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) ROM_END -MSX_LAYOUT_INIT (canonv20) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( canonv20, msx_pal ) - MCFG_MSX_LAYOUT(canonv20) // YM2149 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Casio PV-16 */ @@ -1498,19 +1530,17 @@ ROM_START (pv16) ROM_LOAD("pv16.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) ROM_END -MSX_LAYOUT_INIT(pv16) - MSX_LAYOUT_SLOT(0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT(0, 0, 3, 1, RAM, 0x4000, 0xC000) /* 16KB RAM */ - MSX_LAYOUT_SLOT(1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( pv16, msx_ntsc ) - MCFG_MSX_LAYOUT(pv16) - // AY8910 + // AY8910 // FDC: None, 0 drives // 1 Cartridge slot - MCFG_FRAGMENT_ADD( msx1_1_cartslot ) // No printer port + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 0, 0, 3, 1) /* 16KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Daewoo DPC-100 */ @@ -1521,20 +1551,18 @@ ROM_START (dpc100) ROM_LOAD ("100han.rom", 0x8000, 0x4000, CRC(97478efb) SHA1(4421fa2504cbce18f7c84b5ea97f04e017007f07)) ROM_END -MSX_LAYOUT_INIT (dpc100) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 3, 1, RAM, 0x4000, 0xC000) /* 16KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( dpc100, msx_ntsc ) - MCFG_MSX_LAYOUT(dpc100) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("han", 0, 0, 2, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 3, 1) /* 16KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Daewoo DPC-180 */ @@ -1545,20 +1573,18 @@ ROM_START (dpc180) ROM_LOAD ("180han.rom", 0x8000, 0x4000, CRC(97478efb) SHA1(4421fa2504cbce18f7c84b5ea97f04e017007f07)) ROM_END -MSX_LAYOUT_INIT (dpc180) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( dpc180, msx_ntsc ) - MCFG_MSX_LAYOUT(dpc180) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("han", 0, 0, 2, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 2, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Daewoo DPC-200 */ @@ -1569,20 +1595,18 @@ ROM_START (dpc200) ROM_LOAD ("200han.rom", 0x8000, 0x4000, CRC(97478efb) SHA1(4421fa2504cbce18f7c84b5ea97f04e017007f07)) ROM_END -MSX_LAYOUT_INIT (dpc200) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( dpc200, msx_ntsc ) - MCFG_MSX_LAYOUT(dpc200) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("han", 0, 0, 2, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Goldstar FC-200 */ @@ -1593,19 +1617,17 @@ ROM_START (gsfc200) ROM_LOAD ("fc200bios.rom.u5b", 0x4000, 0x4000, CRC(1a99b1a1) SHA1(e18f72271b64693a2a2bc226e1b9ebd0448e07c0)) ROM_END -MSX_LAYOUT_INIT (gsfc200) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( gsfc200, msx_pal ) - MCFG_MSX_LAYOUT(gsfc200) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("rom", 0, 0, 0, 2,"maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Gradiente Expert 1.0 */ @@ -1615,19 +1637,17 @@ ROM_START (expert10) ROM_LOAD ("expbios.rom", 0x0000, 0x8000, CRC(07610d77) SHA1(ef3e010eb57e4476700a3bbff9d2119ab3acdf62)) ROM_END -MSX_LAYOUT_INIT (expert10) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( expert10, msx_ntsc ) - MCFG_MSX_LAYOUT(expert10) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Gradiente Expert 1.1 */ @@ -1636,19 +1656,17 @@ ROM_START (expert11) ROM_LOAD ("expbios11.rom", 0x0000, 0x8000, CRC(efb4b972) SHA1(d6720845928ee848cfa88a86accb067397685f02)) ROM_END -MSX_LAYOUT_INIT (expert11) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( expert11, msx_ntsc ) - MCFG_MSX_LAYOUT(expert11) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Gradiente Expert 1.3 */ @@ -1657,19 +1675,17 @@ ROM_START (expert13) ROM_LOAD ("expbios13.rom", 0x0000, 0x8000, CRC(5638bc38) SHA1(605f5af3f358c6811f54e0173bad908614a198c0)) ROM_END -MSX_LAYOUT_INIT (expert13) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( expert13, msx_ntsc ) - MCFG_MSX_LAYOUT(expert13) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 2, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Gradiente Expert DDPlus */ @@ -1679,24 +1695,23 @@ ROM_START (expertdp) ROM_LOAD ("eddpdisk.rom", 0x8000, 0x4000, CRC(549f1d90) SHA1(f1525de4e0b60a6687156c2a96f8a8b2044b6c56)) ROM_END -MSX_LAYOUT_INIT (expertdp) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM2, 0x4000, 0x8000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( expertdp, msx_ntsc ) - MCFG_MSX_LAYOUT(expertdp) // AY8910/YM2149? // FDC: mb8877a, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_mb8877a ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - MCFG_SOFTWARE_LIST_ADD("flop_list","msx1_flop") // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // MSX Engine T7937A + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_DISK2("disk", 3, 3, 1, 1, "maincpu", 0x8000) + + MCFG_FRAGMENT_ADD( msx_mb8877a ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx1_floplist ) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Gradiente Expert Plus */ @@ -1707,21 +1722,19 @@ ROM_START (expertpl) ROM_LOAD ("exppdemo.rom", 0x8000, 0x4000, CRC(a9bbef64) SHA1(d4cea8c815f3eeabe0c6a1c845f902ec4318bf6b)) ROM_END -MSX_LAYOUT_INIT (expertpl) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 3, 2, 1, ROM, 0x4000, 0x8000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( expertpl, msx_ntsc ) - MCFG_MSX_LAYOUT(expertpl) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // MSX Engine T7937A + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_ROM("demo", 3, 3, 2, 1, "maincpu", 0x8000) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - JVC HC-7GB */ @@ -1731,19 +1744,17 @@ ROM_START (jvchc7gb) ROM_LOAD ("hc7gbbios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) ROM_END -MSX_LAYOUT_INIT (jvchc7gb) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( jvchc7gb, msx_pal ) - MCFG_MSX_LAYOUT(jvchc7gb) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("rom", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Mitsubishi ML-F80 */ @@ -1753,19 +1764,17 @@ ROM_START (mlf80) ROM_LOAD ("mlf80bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) ROM_END -MSX_LAYOUT_INIT (mlf80) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( mlf80, msx_pal ) - MCFG_MSX_LAYOUT(mlf80) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 1, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 2, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Mitsubishi ML-FX1 */ @@ -1775,19 +1784,17 @@ ROM_START (mlfx1) ROM_LOAD ("mlfx1bios.rom", 0x0000, 0x8000, CRC(62867dce) SHA1(0cbe0df4af45e8f531e9c761403ac9e71808f20c)) ROM_END -MSX_LAYOUT_INIT (mlfx1) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( mlfx1, msx_pal ) - MCFG_MSX_LAYOUT(mlfx1) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - National CF-1200 */ @@ -1797,19 +1804,17 @@ ROM_START (cf1200) ROM_LOAD ("1200bios.rom", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) ROM_END -MSX_LAYOUT_INIT (cf1200) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 3, 1, RAM, 0x4000, 0xC000) /* 16KB RAM */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cf1200, msx_ntsc ) - MCFG_MSX_LAYOUT(cf1200) // AY8910 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 0, 0, 3, 1) /* 16KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - National CF-2000 */ @@ -1819,19 +1824,17 @@ ROM_START (cf2000) ROM_LOAD ("2000bios.rom", 0x0000, 0x8000, CRC(ee229390) SHA1(302afb5d8be26c758309ca3df611ae69cced2821)) ROM_END -MSX_LAYOUT_INIT (cf2000) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 3, 1, RAM, 0x4000, 0xC000) /* 16KB RAM */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cf2000, msx_ntsc ) - MCFG_MSX_LAYOUT(cf2000) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 0, 0, 3, 1) /* 16KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - National CF-2700 */ @@ -1840,19 +1843,17 @@ ROM_START (cf2700) ROM_LOAD ("2700bios.rom.ic32", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) ROM_END -MSX_LAYOUT_INIT (cf2700) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cf2700, msx_ntsc ) - MCFG_MSX_LAYOUT(cf2700) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 0, 0, 2, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - National CF-3000 */ @@ -1862,19 +1863,17 @@ ROM_START (cf3000) ROM_LOAD ("3000bios.rom", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) ROM_END -MSX_LAYOUT_INIT (cf3000) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cf3000, msx_ntsc ) - MCFG_MSX_LAYOUT(cf3000) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 1, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 2, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - National CF-3300 */ @@ -1884,23 +1883,22 @@ ROM_START (cf3300) ROM_LOAD ("3300disk.rom", 0x8000, 0x4000, CRC(549f1d90) SHA1(f1525de4e0b60a6687156c2a96f8a8b2044b6c56)) ROM_END -MSX_LAYOUT_INIT (cf3300) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 1, 1, 1, DISK_ROM2, 0x4000, 0x8000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cf3300, msx_ntsc ) - MCFG_MSX_LAYOUT(cf3300) // AY8910/YM2149? // FDC: mb8877a, 1 3.5" SSDD drive + // 2 Cartridge slots + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_DISK2("disk", 3, 1, 1, 1, "maincpu", 0x8000) + MCFG_FRAGMENT_ADD( msx_mb8877a ) MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) - MCFG_SOFTWARE_LIST_ADD("flop_list","msx1_flop") - // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + MCFG_FRAGMENT_ADD( msx1_floplist ) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - National FS-1300 */ @@ -1910,19 +1908,17 @@ ROM_START (fs1300) ROM_LOAD ("1300bios.rom", 0x0000, 0x8000, CRC(5ad03407) SHA1(c7a2c5baee6a9f0e1c6ee7d76944c0ab1886796c)) ROM_END -MSX_LAYOUT_INIT (fs1300) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fs1300, msx_ntsc ) - MCFG_MSX_LAYOUT(fs1300) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - National FS-4000 */ @@ -1936,21 +1932,19 @@ ROM_START (fs4000) ROM_LOAD ("4000kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) ROM_END -MSX_LAYOUT_INIT (fs4000) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 2, ROM, 0x8000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x10000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fs4000, msx_ntsc ) - MCFG_MSX_LAYOUT(fs4000) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("word", 3, 0, 0, 2, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x10000) + MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /*MSX - Olympia PHC-2*/ @@ -1960,19 +1954,17 @@ ROM_START (phc2) ROM_LOAD ("phc2bios.rom", 0x0000, 0x8000, CRC(4f7bb04b) SHA1(ab0177624d46dd77ab4f50ffcb983c3ba88223f4)) ROM_END -MSX_LAYOUT_INIT (phc2) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( phc2, msx_pal ) - MCFG_MSX_LAYOUT(phc2) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Olympia PHC-28 */ @@ -1982,19 +1974,17 @@ ROM_START (phc28) ROM_LOAD ("phc28bios.rom", 0x0000, 0x8000, CRC(eceb2802) SHA1(195950173701abeb460a1a070d83466f3f53b337)) ROM_END -MSX_LAYOUT_INIT (phc28) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( phc28, msx_pal ) - MCFG_MSX_LAYOUT(phc28) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 2, 2) /* 32KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Panasonic CF-2700G */ @@ -2004,19 +1994,17 @@ ROM_START (cf2700g) ROM_LOAD ("cf2700g.rom", 0x0000, 0x8000, CRC(4aa194f4) SHA1(69bf27b610e11437dad1f7a1c37a63179a293d12)) ROM_END -MSX_LAYOUT_INIT (cf2700g) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB?? RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cf2700g, msx_pal ) - MCFG_MSX_LAYOUT(cf2700g) // AY8910 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 1, 0, 0, 4) /* 64KB?? RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 2, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Philips NMS-801 */ @@ -2026,19 +2014,14 @@ ROM_START (nms801) ROM_LOAD ("801bios.rom", 0x0000, 0x8000, CRC(fa089461) SHA1(21329398c0f350e330b353f45f21aa7ba338fc8d)) ROM_END -MSX_LAYOUT_INIT (nms801) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( nms801, msx_pal ) - MCFG_MSX_LAYOUT(nms801) // AY8910 // FDC: None, 0 drives // 0 Cartridge slots // No printer port + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ MACHINE_CONFIG_END /* MSX - Philips VG-8000 */ @@ -2048,20 +2031,18 @@ ROM_START (vg8000) ROM_LOAD ("8000bios.rom", 0x0000, 0x8000, CRC(efd970b0) SHA1(42252cf87deeb58181a7bfec7c874190a1351779)) ROM_END -MSX_LAYOUT_INIT (vg8000) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 3, 1, RAM, 0x4000, 0x0000) /* 16KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( vg8000, msx_pal ) - MCFG_MSX_LAYOUT(vg8000) // AY8910 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // No printer port + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 3, 1) /* 16KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Philips VG-8010 */ @@ -2071,20 +2052,18 @@ ROM_START (vg8010) ROM_LOAD ("8010bios.rom", 0x0000, 0x8000, CRC(efd970b0) SHA1(42252cf87deeb58181a7bfec7c874190a1351779)) ROM_END -MSX_LAYOUT_INIT (vg8010) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( vg8010, msx_pal ) - MCFG_MSX_LAYOUT(vg8010) // AY8910 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // No printer port + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 2, 2) /* 32KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Philips VG-8010F */ @@ -2094,20 +2073,18 @@ ROM_START (vg8010f) ROM_LOAD ("8010fbios.rom", 0x0000, 0x8000, CRC(df57c9ca) SHA1(898630ad1497dc9a329580c682ee55c4bcb9c30c)) ROM_END -MSX_LAYOUT_INIT (vg8010f) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( vg8010f, msx_pal ) - MCFG_MSX_LAYOUT(vg8010f) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // No printer port + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 2, 2) /* 32KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Philips VG-8020-00 */ @@ -2117,19 +2094,17 @@ ROM_START (vg802000) ROM_LOAD ("8020-00bios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) ROM_END -MSX_LAYOUT_INIT (vg802000) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( vg802000, msx_pal ) - MCFG_MSX_LAYOUT(vg802000) // YM2149 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Philips VG-8020-20 */ @@ -2139,20 +2114,18 @@ ROM_START (vg802020) ROM_LOAD ("8020-20bios.rom", 0x0000, 0x8000, CRC(A317E6B4) SHA1(E998F0C441F4F1800EF44E42CD1659150206CF79)) ROM_END -MSX_LAYOUT_INIT (vg802020) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( vg802020, msx_pal ) - MCFG_MSX_LAYOUT(vg802020) // YM2149 (in S-3527 MSX Engine) // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) /* 64KB Mapper RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Philips VG-8020F */ @@ -2162,20 +2135,18 @@ ROM_START (vg8020f) ROM_LOAD ("vg8020f.rom", 0x0000, 0x8000, CRC(6e692fa1) SHA1(9eaad185efc8e224368d1db4949eb9659c26fb2c)) ROM_END -MSX_LAYOUT_INIT (vg8020f) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM, 0x10000, 0x0000) /* 64KB?? RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( vg8020f, msx_pal ) - MCFG_MSX_LAYOUT(vg8020f) // YM2149 (in S-3527 MSX Engine) // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB?? RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Pioneer PX-7 */ @@ -2187,20 +2158,18 @@ ROM_START (piopx7) ROM_FILL( 0xa000, 0x2000, 0x6E ) ROM_END -MSX_LAYOUT_INIT (piopx7) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 1, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( piopx7, msx_pal ) - MCFG_MSX_LAYOUT(piopx7) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 0, 0, 2, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_ROM("rom2", 2, 0, 1, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Samsung SPC-800 */ @@ -2211,20 +2180,18 @@ ROM_START (spc800) ROM_LOAD ("spc800han.rom", 0x8000, 0x4000, CRC(5ae2b013) SHA1(1e7616261a203580c1044205ad8766d104f1d874)) ROM_END -MSX_LAYOUT_INIT (spc800) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 4, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB?? RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( spc800, msx_ntsc ) - MCFG_MSX_LAYOUT(spc800) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("han", 0, 0, 4, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 0, 4) /* 64KB?? RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sanyo MPC-64 */ @@ -2234,19 +2201,17 @@ ROM_START (mpc64) ROM_LOAD ("mpc64bios.rom", 0x0000, 0x8000, CRC(d6e704ad) SHA1(d67be6d7d56d7229418f4e122f2ec27990db7d19)) ROM_END -MSX_LAYOUT_INIT (mpc64) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( mpc64, msx_ntsc ) - MCFG_MSX_LAYOUT(mpc64) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sanyo MPC-100 */ @@ -2256,19 +2221,17 @@ ROM_START (mpc100) ROM_LOAD ("mpc100bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) ROM_END -MSX_LAYOUT_INIT (mpc100) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( mpc100, msx_pal ) - MCFG_MSX_LAYOUT(mpc100) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sanyo PHC-28L */ @@ -2278,19 +2241,17 @@ ROM_START (phc28l) ROM_LOAD ("28lbios.rom", 0x0000, 0x8000, CRC(d2110d66) SHA1(d3af963e2529662eae63f04a2530454685a1989f)) ROM_END -MSX_LAYOUT_INIT (phc28l) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 0, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 0, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( phc28l, msx_pal ) - MCFG_MSX_LAYOUT(phc28l) // YM2149 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sanyo PHC-28S */ @@ -2300,19 +2261,17 @@ ROM_START (phc28s) ROM_LOAD ("28sbios.rom", 0x0000, 0x8000, CRC(e5cf6b3c) SHA1(b1cce60ef61c058f5e42ef7ac635018d1a431168)) ROM_END -MSX_LAYOUT_INIT (phc28s) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( phc28s, msx_pal ) - MCFG_MSX_LAYOUT(phc28s) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 2, 2) /* 32KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sanyo Wavy MPC-10 */ @@ -2322,19 +2281,17 @@ ROM_START (mpc10) ROM_LOAD ("mpc10.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) ROM_END -MSX_LAYOUT_INIT (mpc10) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( mpc10, msx_pal ) - MCFG_MSX_LAYOUT(mpc10) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 2, 2) /* 32KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sharp Epcom HotBit 1.1 */ @@ -2344,19 +2301,17 @@ ROM_START (hotbit11) ROM_LOAD ("hotbit11.rom", 0x0000, 0x8000, CRC(b6942694) SHA1(663f8c512d04d213fa616b0db5eefe3774012a4b)) ROM_END -MSX_LAYOUT_INIT (hotbit11) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hotbit11, msx_ntsc ) - MCFG_MSX_LAYOUT(hotbit11) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sharp Epcom HotBit 1.2 */ @@ -2366,19 +2321,17 @@ ROM_START (hotbit12) ROM_LOAD ("hotbit12.rom", 0x0000, 0x8000, CRC(f59a4a0c) SHA1(9425815446d468058705bae545ffa13646744a87)) ROM_END -MSX_LAYOUT_INIT (hotbit12) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hotbit12, msx_ntsc ) - MCFG_MSX_LAYOUT(hotbit12) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sharp Epcom HotBit 1.3b */ @@ -2388,19 +2341,17 @@ ROM_START (hotbi13b) ROM_LOAD ("hotbit13b.rom", 0x0000, 0x8000, CRC(7a19820e) SHA1(e0c2bfb078562d15acabc5831020a2370ea87052)) ROM_END -MSX_LAYOUT_INIT (hotbi13b) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hotbi13b, msx_ntsc ) - MCFG_MSX_LAYOUT(hotbi13b) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sharp Epcom HotBit 1.3p */ @@ -2410,19 +2361,17 @@ ROM_START (hotbi13p) ROM_LOAD ("hotbit13p.rom", 0x0000, 0x8000, CRC(150e239c) SHA1(942f9507d206cd8156f15601fe8032fcf0e3875b)) ROM_END -MSX_LAYOUT_INIT (hotbi13p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hotbi13p, msx_ntsc ) - MCFG_MSX_LAYOUT(hotbi13p) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sony HB-10P */ @@ -2432,19 +2381,17 @@ ROM_START (hb10p) ROM_LOAD ("10pbios.rom", 0x0000, 0x8000, CRC(0f488dd8) SHA1(5e7c8eab238712d1e18b0219c0f4d4dae180420d)) ROM_END -MSX_LAYOUT_INIT (hb10p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hb10p, msx_pal ) - MCFG_MSX_LAYOUT(hb10p) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sony HB-20P */ @@ -2454,19 +2401,17 @@ ROM_START (hb20p) ROM_LOAD ("20pbios.rom", 0x0000, 0x8000, CRC(21af423f) SHA1(365c93d7652c9f727221689bcc348652832a7b7a)) ROM_END -MSX_LAYOUT_INIT (hb20p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hb20p, msx_pal ) - MCFG_MSX_LAYOUT(hb20p) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sony HB-201 */ @@ -2478,20 +2423,18 @@ ROM_START (hb201) ROM_FILL( 0xc000, 0x4000, 0xff ) ROM_END -MSX_LAYOUT_INIT (hb201) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 2, ROM, 0x8000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hb201, msx_ntsc ) - MCFG_MSX_LAYOUT(hb201) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("note", 0, 0, 2, 2, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sony HB-201P */ @@ -2502,20 +2445,18 @@ ROM_START (hb201p) ROM_LOAD ("201pnote.rom.ic8", 0x8000, 0x4000, CRC(1ff9b6ec) SHA1(e84d3ec7a595ee36b50e979683c84105c1871857)) ROM_END -MSX_LAYOUT_INIT (hb201p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hb201p, msx_pal ) - MCFG_MSX_LAYOUT(hb201p) // YM2149 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("note", 0, 0, 2, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sony HB-501P */ @@ -2525,19 +2466,17 @@ ROM_START (hb501p) ROM_LOAD ("501pbios.rom", 0x0000, 0x8000, CRC(0f488dd8) SHA1(5e7c8eab238712d1e18b0219c0f4d4dae180420d)) ROM_END -MSX_LAYOUT_INIT (hb501p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hb501p, msx_pal ) - MCFG_MSX_LAYOUT(hb501p) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sony HB-55D */ @@ -2548,20 +2487,18 @@ ROM_START (hb55d) ROM_LOAD ("55dnote.rom", 0x8000, 0x4000, CRC(8aae0494) SHA1(97ce59892573cac3c440efff6d74c8a1c29a5ad3)) ROM_END -MSX_LAYOUT_INIT (hb55d) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 3, 1, RAM, 0x4000, 0xC000) /* 16KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hb55d, msx_pal ) - MCFG_MSX_LAYOUT(hb55d) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("note", 0, 0, 2, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 3, 1) /* 16KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sony HB-55P */ @@ -2573,20 +2510,18 @@ ROM_START (hb55p) ROM_LOAD ("55pnote.ic44", 0x8000, 0x4000, CRC(492b12f8) SHA1(b262aedc71b445303f84efe5e865cbb71fd7d952)) ROM_END -MSX_LAYOUT_INIT (hb55p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 3, 1, RAM, 0x4000, 0xC000) /* 16KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hb55p, msx_pal ) - MCFG_MSX_LAYOUT(hb55p) // AY8910 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("note", 0, 0, 2, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 3, 1) /* 16KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sony HB-75D */ @@ -2597,20 +2532,18 @@ ROM_START (hb75d) ROM_LOAD ("75dnote.rom", 0x8000, 0x4000, CRC(8aae0494) SHA1(97ce59892573cac3c440efff6d74c8a1c29a5ad3)) ROM_END -MSX_LAYOUT_INIT (hb75d) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hb75d, msx_pal ) - MCFG_MSX_LAYOUT(hb75d) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("note", 0, 0, 2, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Sony HB-75P */ @@ -2622,20 +2555,18 @@ ROM_START (hb75p) ROM_LOAD ("75pnote.ic44", 0x8000, 0x4000, CRC(492b12f8) SHA1(b262aedc71b445303f84efe5e865cbb71fd7d952)) ROM_END -MSX_LAYOUT_INIT (hb75p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hb75p, msx_pal ) - MCFG_MSX_LAYOUT(hb75p) // AY8910 // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("note", 0, 0, 2, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Spectravideo SVI-728 */ @@ -2646,20 +2577,18 @@ ROM_START (svi728) // ROM_LOAD ("707disk.rom", 0x8000, 0x4000, CRC(f9978853) SHA1(6aa856cc56eb98863c9da7a566571605682b5c6b)) ROM_END -MSX_LAYOUT_INIT (svi728) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) -// MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM2, 0x4000, 0x8000) -// MSX_LAYOUT_SLOT (3, 1, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( svi728, msx_pal ) - MCFG_MSX_LAYOUT(svi728) // AY8910 // FDC: None, 0 drives // 1 Cartridge slots, 1 Expansion slot (eg for SVI-707) - MCFG_FRAGMENT_ADD( msx1_1_cartslot ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 1, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot", 2, 0) +// MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM2, 0x4000, 0x8000) +// MSX_LAYOUT_SLOT (3, 1, 0, 4, CARTRIDGE2, 0x0000, 0x0000) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Spectravideo SVI-738 */ @@ -2672,26 +2601,25 @@ ROM_START (svi738) ROM_FILL (0xe000, 0x2000, 0xff) ROM_END -MSX_LAYOUT_INIT (svi738) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 1, 1, 1, DISK_ROM2, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( svi738, msx_pal ) - MCFG_MSX_LAYOUT(svi738) // AY8910 // FDC: wd1793, 1 3.5" SSDD drive - MCFG_FRAGMENT_ADD( msx_fd1793 ) - MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) - MCFG_SOFTWARE_LIST_ADD("flop_list","msx1_flop") // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // builtin 80 columns card (V9938) // RS-232C interface + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 1, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 2, 0) + MCFG_MSX_LAYOUT_ROM("rs232", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_DISK2("disk", 3, 1, 1, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 2) + + MCFG_FRAGMENT_ADD( msx_fd1793 ) + MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) + MCFG_FRAGMENT_ADD( msx1_floplist ) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Spectravideo SVI-738 Swedish */ @@ -2704,26 +2632,25 @@ ROM_START (svi738sw) ROM_FILL (0xe000, 0x2000, 0xff) ROM_END -MSX_LAYOUT_INIT (svi738sw) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 1, 1, 1, DISK_ROM2, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( svi738sw, msx_pal ) - MCFG_MSX_LAYOUT(svi738sw) // AY8910 // FDC: wd2793, 1 3.5" SSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) - MCFG_SOFTWARE_LIST_ADD("flop_list","msx1_flop") // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // builtin 80 columns card (V9938) // RS-232C interface + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 1, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 2, 0) + MCFG_MSX_LAYOUT_ROM("rs232", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_DISK2("disk", 3, 1, 1, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 2) + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) + MCFG_FRAGMENT_ADD( msx1_floplist ) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Spectravideo SVI-738 Poland*/ @@ -2736,26 +2663,25 @@ ROM_START (svi738pl) ROM_FILL (0xe000, 0x2000, 0xff) ROM_END -MSX_LAYOUT_INIT (svi738pl) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 1, 1, 1, DISK_ROM2, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( svi738pl, msx_pal ) - MCFG_MSX_LAYOUT(svi738pl) // AY8910 // FDC: wd2793, 1 3.5" SSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) - MCFG_SOFTWARE_LIST_ADD("flop_list","msx1_flop") // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // builtin 80 columns card (V9938) // RS-232C interface + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 1, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 2, 0) + MCFG_MSX_LAYOUT_ROM("rs232", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_DISK2("disk", 3, 1, 1, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 2) + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) + MCFG_FRAGMENT_ADD( msx1_floplist ) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Talent DPC-200 / Daewoo DPC-200E */ @@ -2765,19 +2691,17 @@ ROM_START (tadpc200) ROM_LOAD ("dpc200bios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) ROM_END -MSX_LAYOUT_INIT (tadpc200) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( tadpc200, msx_pal ) - MCFG_MSX_LAYOUT(tadpc200) // AY8910 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 1, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 2, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Talent DPC-200A */ @@ -2787,19 +2711,17 @@ ROM_START (tadpc20a) ROM_LOAD ("dpc200abios.rom", 0x0000, 0x8000, CRC(8205795e) SHA1(829c00c3114f25b3dae5157c0a238b52a3ac37db)) ROM_END -MSX_LAYOUT_INIT (tadpc20a) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( tadpc20a, msx_pal ) - MCFG_MSX_LAYOUT(tadpc20a) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 1, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 2, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Toshiba HX-10 */ @@ -2810,19 +2732,17 @@ ROM_START (hx10) ROM_LOAD ("tcx-1007.ic15", 0x0000, 0x8000, CRC(5486b711) SHA1(4dad9de7c28b452351cc12910849b51bd9a37ab3)) ROM_END -MSX_LAYOUT_INIT (hx10) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - //MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) // Expansion slot -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hx10, msx_pal ) - MCFG_MSX_LAYOUT(hx10) // AY8910 // FDC: None, 0 drives // 1 Cartridge slot, 1 Toshiba Expension slot - MCFG_FRAGMENT_ADD( msx1_1_cartslot ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 0, 4) /* 64KB RAM */ + //MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) // Expansion slot + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Toshiba HX-10S */ @@ -2832,19 +2752,17 @@ ROM_START (hx10s) ROM_LOAD ("hx10sbios.rom", 0x0000, 0x8000, CRC(5486b711) SHA1(4dad9de7c28b452351cc12910849b51bd9a37ab3)) ROM_END -MSX_LAYOUT_INIT (hx10s) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 3, 1, RAM, 0x4000, 0xC000) /* 16KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hx10s, msx_pal ) - MCFG_MSX_LAYOUT(hx10s) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 3, 1) /* 16KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Toshiba HX-20 */ @@ -2855,22 +2773,20 @@ ROM_START (hx20) ROM_LOAD ("hx20word.rom", 0x8000, 0x8000, CRC(39b3e1c0) SHA1(9f7cfa932bd7dfd0d9ecaadc51655fb557c2e125)) ROM_END -MSX_LAYOUT_INIT (hx20) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 2, ROM, 0x8000, 0x8000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hx20, msx_pal ) - MCFG_MSX_LAYOUT(hx20) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // T6950 VDP instead of TMS9928A + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram1", 0, 0, 2, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram2", 3, 0, 2, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_ROM("word", 3, 3, 1, 2, "maincpu", 0x8000) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yamaha CX5M / Yamaha CX5M-2 */ @@ -2881,20 +2797,18 @@ ROM_START (cx5m) ROM_LOAD ("sfg05m.rom", 0x8000, 0x8000, CRC(6c2545c9) SHA1(bc4b242647116f4886bb92e86421f97b1be51938)) ROM_END -MSX_LAYOUT_INIT (cx5m) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 2, RAM, 0x8000, 0x8000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 2, ROM, 0x8000, 0x8000) /* SFG */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cx5m, msx_pal ) - MCFG_MSX_LAYOUT(cx5m) // YM2149 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram", 0, 0, 2, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("sfg", 3, 0, 0, 2, "maincpu", 0x8000) /* SFG */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yamaha CX5M-128 */ @@ -2907,22 +2821,20 @@ ROM_START (cx5m128) ROM_LOAD ("yrm502.rom", 0x14000,0x4000, CRC(5330fe21) SHA1(7b1798561ee1844a7d6432924fbee9b4fc591c19)) ROM_END -MSX_LAYOUT_INIT (cx5m128) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 1, ROM, 0x4000, 0x14000) /* YRM-502 */ - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 0, 2, ROM, 0x8000, 0xc000) /* SFG-05 */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cx5m128, msx_pal ) - MCFG_MSX_LAYOUT(cx5m128) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 1, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("yrm", 3, 1, 1, 1, "maincpu", 0x14000) /* YRM-502 */ + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_LAYOUT_ROM("sfg", 3, 3, 0, 2, "maincpu", 0xc000) /* SFG-05 */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yamaha CX5MII */ @@ -2934,21 +2846,19 @@ ROM_START (cx5m2) ROM_LOAD ("sfg05.rom", 0xc000, 0x8000, CRC(2425c279) SHA1(d956167e234f60ad916120437120f86fc8c3c321)) ROM_END -MSX_LAYOUT_INIT (cx5m2) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 0, 2, ROM, 0x8000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cx5m2, msx_pal ) - MCFG_MSX_LAYOUT(cx5m2) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 1, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_LAYOUT_ROM("sfg", 3, 3, 0, 2, "maincpu", 0xc000) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yamaha YIS303 */ @@ -2959,20 +2869,18 @@ ROM_START (yis303) ROM_FILL( 0x8000, 0xc000, 0xff ) ROM_END -MSX_LAYOUT_INIT (yis303) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 3, ROM, 0xC000, 0x0000) /* Fill FF */ - MSX_LAYOUT_SLOT (3, 0, 3, 1, RAM, 0x4000, 0xC000) /* 16KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( yis303, msx_pal ) - MCFG_MSX_LAYOUT(yis303) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("fillff", 3, 0, 0, 3, "maincpu", 0x0000) /* Fill FF */ + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 3, 1) /* 16KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yamaha YIS503 */ @@ -2983,20 +2891,18 @@ ROM_START (yis503) ROM_FILL( 0x8000, 0x8000, 0xff ) ROM_END -MSX_LAYOUT_INIT (yis503) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 3, ROM, 0xC000, 0x0000) /* Fill FF */ - MSX_LAYOUT_SLOT (3, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( yis503, msx_pal ) - MCFG_MSX_LAYOUT(yis503) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("fillff", 3, 0, 0, 3, "maincpu", 0x0000) /* Fill FF */ + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 2, 2) /* 32KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yamaha YIS503F */ @@ -3006,19 +2912,17 @@ ROM_START (yis503f) ROM_LOAD ("yis503f.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) ROM_END -MSX_LAYOUT_INIT (yis503f) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB?? RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( yis503f, msx_pal ) - MCFG_MSX_LAYOUT(yis503f) // YM2149 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB?? RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yamaha YIS503II */ @@ -3028,77 +2932,76 @@ ROM_START (yis503ii) ROM_LOAD ("yis503iibios.rom", 0x0000, 0x8000, CRC(e2242b53) SHA1(706dd67036baeec7127e4ccd8c8db8f6ce7d0e4c)) ROM_END -MSX_LAYOUT_INIT (yis503ii) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( yis503ii, msx_pal ) - MCFG_MSX_LAYOUT(yis503ii) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yamaha YIS503IIR Russian */ ROM_START (y503iir) - ROM_REGION (0xe000, "maincpu",0) + 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 -MSX_LAYOUT_INIT (y503iir) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 1, 1, 1, DISK_ROM2, 0x4000, 0x8000) /* National disk */ - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, ROM, 0x2000, 0xc000) /* Net */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( y503iir, msx_pal ) - MCFG_MSX_LAYOUT(y503iir) // YM2149 (in S-3527 MSX Engine) // FDC: wd2793/mb8877?, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) // S-3527 MSX Engine // RTC // V9938 VDP + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_DISK2("disk", 3, 1, 1, 1, "maincpu", 0x8000) /* National disk */ + MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_ROM("net", 3, 3, 1, 1, "maincpu", 0xc000) /* Net */ + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx1_floplist ) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yamaha YIS503IIR Estonian */ ROM_START (y503iir2) - ROM_REGION (0xe000, "maincpu",0) + 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 -MSX_LAYOUT_INIT (y503iir2) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 1, 1, 1, DISK_ROM2, 0x4000, 0x8000) /* National disk */ - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, ROM, 0x2000, 0xc000) /* Net */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( y503iir2, msx_pal ) - MCFG_MSX_LAYOUT(y503iir2) // AY8910/YM2149? // FDC: wd2793/mb8877?, 1 3.5" DSDD drive? + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_DISK2("disk", 3, 1, 1, 1, "maincpu", 0x8000) /* National disk */ + MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_ROM("net", 3, 3, 1, 1, "maincpu", 0xc000) /* Net */ + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + MCFG_FRAGMENT_ADD( msx1_floplist ) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yamaha YIS503M */ @@ -3109,20 +3012,18 @@ ROM_START (yis503m) ROM_LOAD ("sfg05m.rom", 0x8000, 0x8000, CRC(6c2545c9) SHA1(bc4b242647116f4886bb92e86421f97b1be51938)) ROM_END -MSX_LAYOUT_INIT (yis503m) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 2, ROM, 0x8000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( yis503m, msx_pal ) - MCFG_MSX_LAYOUT(yis503m) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("sfg", 3, 0, 0, 2, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 2, 2) /* 32KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yashica YC-64 */ @@ -3132,18 +3033,16 @@ ROM_START (yc64) ROM_LOAD ("yc64bios.rom", 0x0000, 0x8000, CRC(e9ccd789) SHA1(8963fc041975f31dc2ab1019cfdd4967999de53e)) ROM_END -MSX_LAYOUT_INIT (yc64) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( yc64, msx_pal ) - MCFG_MSX_LAYOUT(yc64) // YM2149 // FDC: None, 0 drives // 1 Cartridge slot (slot 1) - MCFG_FRAGMENT_ADD( msx1_1_cartslot ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Yeno MX64 */ @@ -3153,19 +3052,17 @@ ROM_START (mx64) ROM_LOAD ("mx64bios.rom", 0x0000, 0x8000, CRC(e0e894b7) SHA1(d99eebded5db5fce1e072d08e642c0909bc7efdd)) ROM_END -MSX_LAYOUT_INIT (mx64) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( mx64, msx_ntsc ) - MCFG_MSX_LAYOUT(mx64) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_RAM("ram", 2, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END /* MSX - Frael Bruc 100-1 */ @@ -3175,19 +3072,17 @@ ROM_START (bruc100) ROM_LOAD( "bruc100-1bios.rom", 0x0000, 0x8000, CRC(c7bc4298) SHA1(3abca440cba16ac5e162b602557d30169f77adab)) ROM_END -MSX_LAYOUT_INIT (bruc100) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( bruc100, msx_pal ) - MCFG_MSX_LAYOUT(bruc100) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx1_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx1_cartlist ) MACHINE_CONFIG_END @@ -3200,24 +3095,22 @@ ROM_START (msx2) ROM_LOAD ("msx2.rom", 0x0000, 0x8000, CRC(f05ed518) SHA1(5e1a4bd6826b29302a1eb88c340477e7cbd0b50a)) ROM_LOAD ("msx2ext.rom", 0x8000, 0x4000, CRC(95db2959) SHA1(e7905d16d2ccd57a013c122dc432106cd59ef52c)) ROM_LOAD ("disk.rom", 0xc000, 0x4000, CRC(b7c58fad) SHA1(bc517b4a248c3a1338c5efc937b0128b6a783808)) - ROM_LOAD_OPTIONAL ("fmpac.rom", 0x10000, 0x10000, CRC(0e84505d) SHA1(9d789166e3caf28e4742fe933d962e99618c633d)) ROM_END -MSX_LAYOUT_INIT (msx2) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( msx2_gen, msx2_pal ) - MCFG_MSX_LAYOUT(msx2) + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 3, 0x20000) /* 128KB Mapper RAM */ MCFG_MSX_RAMIO_SET_BITS(0xf8) - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Al Alamiah AX-350 */ @@ -3234,27 +3127,27 @@ ROM_START (ax350) ROM_LOAD ("ax350disk.rom", 0x40000, 0x4000, CRC(1e7d6512) SHA1(78cd7f847e77fd8cd51a647efb2725ba93f4c471)) ROM_END -MSX_LAYOUT_INIT (ax350) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) /* Bios */ - MSX_LAYOUT_SLOT (0, 1, 0, 1, ROM, 0x4000, 0x8000) /* Ext */ - MSX_LAYOUT_SLOT (0, 1, 1, 2, ROM, 0x8000, 0x20000) /* Arab */ - MSX_LAYOUT_SLOT (0, 2, 1, 2, ROM, 0x8000, 0x28000) /* SWP */ - MSX_LAYOUT_SLOT (0, 3, 0, 4, ROM, 0x10000, 0x30000) /* Paint */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 1, 1, 1, DISK_ROM2, 0x4000, 0x40000) /* Disk */ - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( ax350, msx2_pal ) - MCFG_MSX_LAYOUT(ax350) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // AY8910/YM2149? // FDC: wd2793/tc8566af?, 1 3.5" DSDD drive + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) /* Bios */ + MCFG_MSX_LAYOUT_ROM("ext", 0, 1, 0, 1, "maincpu", 0x8000) /* Ext */ + MCFG_MSX_LAYOUT_ROM("arab", 0, 1, 1, 2, "maincpu", 0x20000) /* Arab */ + MCFG_MSX_LAYOUT_ROM("swp", 0, 2, 1, 2, "maincpu", 0x28000) /* SWP */ + MCFG_MSX_LAYOUT_ROM("paint", 0, 3, 0, 4, "maincpu", 0x30000) /* Paint */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_DISK2("disk", 3, 1, 1, 1, "maincpu", 0x40000) /* Disk */ + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Al Alamiah AX-370 */ @@ -3271,27 +3164,27 @@ ROM_START (ax370) ROM_LOAD ("ax370disk.rom", 0x40000, 0x4000, CRC(60f8baba) SHA1(95de8809d2758fc0a743390ea5085b602e59e101)) ROM_END -MSX_LAYOUT_INIT (ax370) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) /* Bios */ - MSX_LAYOUT_SLOT (0, 2, 1, 2, ROM, 0x8000, 0x28000) /* SWP */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) /* Ext */ - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) /* Arab */ - //MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0x40000) /* TC8566AF Disk controller*/ - MSX_LAYOUT_SLOT (3, 3, 0, 4, ROM, 0x10000, 0x30000) /* Paint */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( ax370, msx2_pal ) - MCFG_MSX_LAYOUT(ax370) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // AY8910/YM2149? // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) /* Bios */ + MCFG_MSX_LAYOUT_ROM("swp", 0, 2, 1, 2, "maincpu", 0x28000) /* SWP */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) /* Ext */ + MCFG_MSX_LAYOUT_ROM("arab", 3, 1, 1, 2, "maincpu", 0x20000) /* Arab */ +// MCFG_MSX_LAYOUT_DISK("disk", 3, 2, 1, 1, "maincpu", 0x40000) /* TC8566AF Disk controller*/ + MCFG_MSX_LAYOUT_ROM("paint", 3, 3, 0, 4, "maincpu", 0x30000) /* Paint */ + MCFG_FRAGMENT_ADD( msx_tc8566af ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Daewoo CPC-300 */ @@ -3305,23 +3198,23 @@ ROM_START (cpc300) ROM_LOAD ("300han.rom", 0x28000, 0x8000, CRC(e78cd87f) SHA1(47a9d9a24e4fc6f9467c6e7d61a02d45f5a753ef)) ROM_END -MSX_LAYOUT_INIT (cpc300) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 1, 2, ROM, 0x8000, 0x28000) - MSX_LAYOUT_SLOT (0, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (0, 3, 0, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cpc300, msx2 ) - MCFG_MSX_LAYOUT(cpc300) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1985 MSX Engine) // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("han", 0, 1, 1, 2, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 0, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 0, 3, 0, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Daewoo CPC-300E */ @@ -3336,22 +3229,20 @@ ROM_START (cpc300e) ROM_LOAD ("300ehan.rom", 0x28000, 0x4000, BAD_DUMP CRC(5afea78d) SHA1(f08c91f8c78d681e1f02eaaaaafb87ad81112b60)) ROM_END -MSX_LAYOUT_INIT (cpc300e) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 1, 1, ROM, 0x4000, 0x28000) - MSX_LAYOUT_SLOT (0, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (0, 3, 0, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cpc300e, msx2 ) - MCFG_MSX_LAYOUT(cpc300e) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("han", 0, 1, 1, 1, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 0, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 0, 3, 0, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Daewoo CPC-400 */ @@ -3368,25 +3259,25 @@ ROM_START (cpc400) ROM_LOAD ("400kfn.rom", 0, 0x20000, CRC(b663c605) SHA1(965f4982790f1817bcbabbb38c8777183b231a55)) ROM_END -MSX_LAYOUT_INIT (cpc400) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 1, 2, ROM, 0x8000, 0x28000) - MSX_LAYOUT_SLOT (0, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (0, 3, 0, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 1, 1, DISK_ROM2, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cpc400, msx2 ) - MCFG_MSX_LAYOUT(cpc400) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: mb8877a, 1 3.5" DS?DD drive + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("han", 0, 1, 1, 2, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 0, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 0, 3, 0, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_DISK2("disk", 2, 0, 1, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + MCFG_FRAGMENT_ADD( msx_mb8877a ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Daewoo CPC-400S */ @@ -3404,26 +3295,28 @@ ROM_START (cpc400s) ROM_LOAD ("400skfn.rom", 0, 0x20000, CRC(fa85368c) SHA1(30fff22e3e3d464993707488442721a5e56a9707)) ROM_END -MSX_LAYOUT_INIT (cpc400s) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 1, 2, ROM, 0x8000, 0x28000) - MSX_LAYOUT_SLOT (0, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (0, 3, 0, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 1, 1, DISK_ROM2, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cpc400s, msx2 ) - MCFG_MSX_LAYOUT(cpc400s) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1985 MSX Engine) // FDC: mb8877a, 1 3.5" DS?DD drive - MCFG_FRAGMENT_ADD( msx_mb8877a ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("han", 0, 1, 1, 2, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 0, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 0, 3, 0, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_DISK2("disk", 2, 0, 1, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx_mb8877a ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Gradiente Expert 2.0 */ @@ -3438,25 +3331,25 @@ ROM_START (expert20) ROM_LOAD ("microsoldisk.rom", 0x24000, 0x4000, CRC(6704ef81) SHA1(a3028515ed829e900cc8deb403e17b09a38bf9b0)) ROM_END -MSX_LAYOUT_INIT (expert20) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (1, 1, 0, 1, ROM, 0x4000, 0x8000) /* EXT */ - MSX_LAYOUT_SLOT (1, 1, 1, 1, ROM, 0x4000, 0x20000) /* BASIC */ - MSX_LAYOUT_SLOT (1, 3, 1, 1, DISK_ROM, 0x4000, 0x24000) /* Microsol controller */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( expert20, msx2_pal ) - MCFG_MSX_LAYOUT(expert20) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: microsol, 1? 3.5"? DS?DD drive + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_ROM("ext", 1, 1, 0, 1, "maincpu", 0x8000) /* EXT */ + MCFG_MSX_LAYOUT_ROM("xbasic", 1, 1, 1, 1, "maincpu", 0x20000) /* BASIC */ + MCFG_MSX_LAYOUT_DISK1("disk", 1, 3, 1, 1, "maincpu", 0x24000) /* Microsol controller */ + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 2, 0, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + MCFG_FRAGMENT_ADD( msx_microsol ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Mitsubishi ML-G30 Model 1/Model 2 */ @@ -3466,26 +3359,28 @@ ROM_START (mlg30) 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_LOAD ("g30kfn.rom", 0x20000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) -ROM_END -MSX_LAYOUT_INIT (mlg30) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) /* Slot 2 subslot 0 */ - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ -MSX_LAYOUT_END + ROM_REGION(0x20000, "kanji", 0) + ROM_LOAD ("g30kfn.rom", 0x0000, 0x20000, CRC(d23d4d2d) SHA1(db03211b7db46899df41db2b1dfbec972109a967)) +ROM_END static MACHINE_CONFIG_DERIVED( mlg30, msx2 ) - MCFG_MSX_LAYOUT(mlg30) // AY8910/YM2149? // FDC: wd2793/tc8566af?, 1 or 2? 3.5" DSDD drives + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) /* Slot 2 subslot 0 */ + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) /* 64KB Mapper RAM */ + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - National FS-4500 */ @@ -3512,27 +3407,29 @@ ROM_START (fs4500) ROM_LOAD ("4500budi.rom", 0, 0x20000, CRC(f94590f8) SHA1(1ebb06062428fcdc66808a03761818db2bba3c73)) ROM_END -MSX_LAYOUT_INIT (fs4500) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (0, 2, 0, 1, ROM, 0x4000, 0x20000) - MSX_LAYOUT_SLOT (0, 3, 1, 2, ROM, 0x8000, 0x2c000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 3, ROM, 0xc000, 0x34000) - MSX_LAYOUT_SLOT (3, 0, 3, 1, ROM, 0x4000, 0x4c000) - MSX_LAYOUT_SLOT (3, 1, 0, 3, ROM, 0xc000, 0x40000) - MSX_LAYOUT_SLOT (3, 1, 3, 1, ROM, 0x4000, 0x50000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fs4500, msx2 ) - MCFG_MSX_LAYOUT(fs4500) // YM2149 (in S-1985 MSX Engine) // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + // Matsushita switched device + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("ext", 0, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("font", 0, 2, 0, 1, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_BUNSETSU("buns", 0, 2, 2, 2, "maincpu", 0x24000, "bunsetsu") + MCFG_MSX_LAYOUT_ROM("jush", 0, 3, 1, 2, "maincpu", 0x2c000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("wor1", 3, 0, 0, 3, "maincpu", 0x34000) + MCFG_MSX_LAYOUT_ROM("kdr1", 3, 0, 3, 1, "maincpu", 0x4c000) + MCFG_MSX_LAYOUT_ROM("wor2", 3, 1, 0, 3, "maincpu", 0x40000) + MCFG_MSX_LAYOUT_ROM("kdr2", 3, 1, 3, 1, "maincpu", 0x50000) + MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */ + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - National FS-4600 */ @@ -3557,29 +3454,32 @@ ROM_START (fs4600) ROM_LOAD ("4600kf12.rom", 0, 0x20000, CRC(340d1ef7) SHA1(a7a23dc01314e88381eee88b4878b39931ab4818)) ROM_END -MSX_LAYOUT_INIT (fs4600) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (0, 2, 0, 1, ROM, 0x4000, 0x20000) - MSX_LAYOUT_SLOT (0, 2, 1, 2, ROM, 0x8000, 0x28000) - MSX_LAYOUT_SLOT (0, 3, 0, 1, ROM, 0x4000, 0x24000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 1, 0, 4, ASCII16, 0x100000, 0x30000) /* National FS-4600 Mapper must be emulated */ - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM2, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fs4600, msx2 ) - MCFG_MSX_LAYOUT(fs4600) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1985 MSX Engine) // FDC: mb8877a, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_mb8877a ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("ext", 0, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("fon1", 0, 2, 0, 1, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_ROM("kdr", 0, 2, 1, 2, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_ROM("fon2", 0, 3, 0, 1, "maincpu", 0x24000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + //MCFG_MSX_LAYOUT_("firm", 3, 1, 0, 4, ASCII16, 0x100000, 0x30000) /* National FS-4600 Mapper must be emulated */ + MCFG_MSX_LAYOUT_FS4600("firm", 3, 1, 0, 4, "maincpu", 0x30000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_DISK2("disk", 3, 3, 1, 1, "maincpu", 0xc000) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx_mb8877a ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - National FS-4700 */ @@ -3607,30 +3507,34 @@ ROM_START (fs4700) ROM_LOAD ("4700budi.rom", 0, 0x20000, CRC(f94590f8) SHA1(1ebb06062428fcdc66808a03761818db2bba3c73)) ROM_END -MSX_LAYOUT_INIT (fs4700) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (0, 2, 0, 1, ROM, 0x4000, 0x20000) - MSX_LAYOUT_SLOT (0, 3, 1, 2, ROM, 0x8000, 0x2c000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 3, ROM, 0xc000, 0x34000) - MSX_LAYOUT_SLOT (3, 0, 3, 1, ROM, 0x4000, 0x4c000) - MSX_LAYOUT_SLOT (3, 1, 0, 3, ROM, 0xc000, 0x40000) - MSX_LAYOUT_SLOT (3, 1, 3, 1, ROM, 0x4000, 0x50000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM2, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fs4700, msx2 ) - MCFG_MSX_LAYOUT(fs4700) // YM2149 (in S-1985 MSX Engine) // FDC: mb8877a, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_mb8877a ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + // Matsushita switched device + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("ext", 0, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("font", 0, 2, 0, 1, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_BUNSETSU("buns", 0, 2, 1, 2, "maincpu", 0x24000, "bunsetsu") + MCFG_MSX_LAYOUT_ROM("jush", 0, 3, 1, 2, "maincpu", 0x2c000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("wor1", 3, 0, 0, 3, "maincpu", 0x34000) + MCFG_MSX_LAYOUT_ROM("kdr1", 3, 0, 3, 1, "maincpu", 0x4c000) + MCFG_MSX_LAYOUT_ROM("wor2", 3, 1, 0, 3, "maincpu", 0x40000) + MCFG_MSX_LAYOUT_ROM("kdr2", 3, 1, 3, 1, "maincpu", 0x50000) + MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_DISK2("disk", 3, 3, 1, 1, "maincpu", 0xc000) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx_mb8877a ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - National FS-5000 */ @@ -3649,30 +3553,32 @@ ROM_START (fs5000) ROM_LOAD ("5000kfn.rom", 0, 0x20000, CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) ROM_END -MSX_LAYOUT_INIT (fs5000) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 0, 4, ROM, 0x10000, 0x10000) - MSX_LAYOUT_SLOT (0, 2, 0, 4, ROM, 0x10000, 0x10000) - MSX_LAYOUT_SLOT (0, 3, 0, 4, ROM, 0x10000, 0x10000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 2, ROM, 0x8000, 0x28000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM2, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fs5000, msx2 ) - MCFG_MSX_LAYOUT(fs5000) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1985 MSX Engine) // FDC: wd2793, 2 3.5" DSDD drives - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_2_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("empty1", 0, 1, 0, 4, "maincpu", 0x10000) + MCFG_MSX_LAYOUT_ROM("empty2", 0, 2, 0, 4, "maincpu", 0x10000) + MCFG_MSX_LAYOUT_ROM("empty3", 0, 3, 0, 4, "maincpu", 0x10000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 0, 1, 2, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_ROM("rtcrom", 3, 1, 1, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_DISK2("disk", 3, 3, 1, 1, "maincpu", 0xc000) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_2_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - National FS-5500F1/F2*/ @@ -3693,29 +3599,32 @@ ROM_START (fs5500) ROM_LOAD ("5500kfn.rom", 0, 0x20000, CRC(956dc96d) SHA1(9ed3ab6d893632b9246e91b412cd5db519e7586b)) ROM_END -MSX_LAYOUT_INIT (fs5500) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 0, 4, ROM, 0x10000, 0x10000) - MSX_LAYOUT_SLOT (0, 2, 0, 4, ROM, 0x10000, 0x10000) - MSX_LAYOUT_SLOT (0, 3, 0, 4, ROM, 0x10000, 0x10000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 2, ROM, 0x8000, 0x28000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM2, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fs5500, msx2 ) - MCFG_MSX_LAYOUT(fs5500) // YM2149 in (S-1985 MSX Engine) // FDC: mb8877a, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_mb8877a ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + // Matsushita switched device + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("empty1", 0, 1, 0, 4, "maincpu", 0x10000) + MCFG_MSX_LAYOUT_ROM("empty2", 0, 2, 0, 4, "maincpu", 0x10000) + MCFG_MSX_LAYOUT_ROM("empty3", 0, 3, 0, 4, "maincpu", 0x10000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 0, 1, 2, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_ROM("imp", 3, 1, 1, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_DISK2("disk", 3, 3, 1, 1, "maincpu", 0xc000) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx_mb8877a ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Panasonic FS-A1 */ @@ -3730,22 +3639,20 @@ ROM_START (fsa1) ROM_LOAD ("a1desk2.rom", 0x28000, 0x8000, CRC(7f6f4aa1) SHA1(7f5b76605e3d898cc4b5aacf1d7682b82fe84353)) ROM_END -MSX_LAYOUT_INIT (fsa1) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64 KB RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 1, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 3, 1, 2, ROM, 0x8000, 0x28000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fsa1, msx2 ) - MCFG_MSX_LAYOUT(fsa1) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64 KB RAM */ + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("desk1", 3, 2, 1, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_ROM("desk2", 3, 3, 1, 2, "maincpu", 0x28000) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Panasonic FS-A1 (a) */ @@ -3760,22 +3667,20 @@ ROM_START (fsa1a) ROM_LOAD ("a1desk2.rom", 0x28000, 0x8000, CRC(7f6f4aa1) SHA1(7f5b76605e3d898cc4b5aacf1d7682b82fe84353)) ROM_END -MSX_LAYOUT_INIT (fsa1a) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 1, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 3, 1, 2, ROM, 0x8000, 0x28000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fsa1a, msx2 ) - MCFG_MSX_LAYOUT(fsa1a) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram", 3, 0, 0, 4) /* 64KB RAM */ + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("desk1", 3, 2, 1, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_ROM("desk2", 3, 3, 1, 2, "maincpu", 0x28000) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Panasonic FS-A1F */ @@ -3794,26 +3699,26 @@ ROM_START (fsa1f) ROM_LOAD ("a1fkfn.rom", 0, 0x20000, CRC(c61ddc5d) SHA1(5e872d5853698731a0ed22fb72dbcdfd59cd19c3)) ROM_END -MSX_LAYOUT_INIT (fsa1f) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) -/* MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ - MSX_LAYOUT_SLOT (3, 3, 1, 2, ROM, 0x8000, 0x28000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fsa1f, msx2 ) - MCFG_MSX_LAYOUT(fsa1f) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("fkdr", 3, 1, 1, 2, "maincpu", 0x20000) +/* MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ + MCFG_MSX_LAYOUT_ROM("fcock", 3, 3, 1, 2, "maincpu", 0x28000) + MCFG_FRAGMENT_ADD( msx_tc8566af ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Panasonic FS-A1FM */ @@ -3835,27 +3740,27 @@ ROM_START (fsa1fm) ROM_LOAD ("a1fmkf12.rom", 0, 0x20000, CRC(340d1ef7) SHA1(a7a23dc01314e88381eee88b4878b39931ab4818)) ROM_END -MSX_LAYOUT_INIT (fsa1fm) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) +static MACHINE_CONFIG_DERIVED( fsa1fm, msx2 ) + // AY8910/YM2149? + // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots + // Integrated 1200baud modem + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) /* MSX_LAYOUT_SLOT (3, 1, 1, 4, MODEM_ROM, 0x20000, 0x20000) */ /* Modem Mapper of FS-CM1/A1FM must be emulated */ /* MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ /* MSX_LAYOUT_SLOT (3, 3, 0, 4, FSA1FM_ROM, 0x100000, 0x20000) */ /* Panasonic FS-A1FM Mapper must be emulated */ -MSX_LAYOUT_END -static MACHINE_CONFIG_DERIVED( fsa1fm, msx2 ) - MCFG_MSX_LAYOUT(fsa1fm) - MCFG_MSX_RAMIO_SET_BITS(0x80) - // AY8910/YM2149? - // FDC: tc8566af, 1 3.5" DSDD drive MCFG_FRAGMENT_ADD( msx_tc8566af ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) - // Integrated 1200baud modem + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Panasonic FS-A1MK2 */ @@ -3871,24 +3776,22 @@ ROM_START (fsa1mk2) ROM_LOAD ("a1mkcoc3.rom", 0x2c000, 0x8000, CRC(c1945676) SHA1(a3f4e2e4934074925d775afe30ac72f150ede543)) ROM_END -MSX_LAYOUT_INIT (fsa1mk2) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64 KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 2, 1, 1, ROM, 0x4000, 0x28000) - MSX_LAYOUT_SLOT (3, 3, 1, 2, ROM, 0x8000, 0x2c000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fsa1mk2, msx2 ) - MCFG_MSX_LAYOUT(fsa1mk2) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64 KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("coc1", 3, 1, 1, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_ROM("coc2", 3, 2, 1, 1, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_ROM("coc3", 3, 3, 1, 2, "maincpu", 0x2c000) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips NMS-8220 - 2 possible sets (/00 /16) */ @@ -3902,23 +3805,21 @@ ROM_START (nms8220) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (nms8220) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( nms8220, msx2_pal ) - MCFG_MSX_LAYOUT(nms8220) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // YM2149 (in S-3527 MSX Engine) // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_ROM("pen", 3, 3, 1, 1, "maincpu", 0xc000) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips NMS-8220 (a) */ @@ -3932,23 +3833,21 @@ ROM_START (nms8220a) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (nms8220a) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( nms8220a, msx2_pal ) - MCFG_MSX_LAYOUT(nms8220a) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // YM2149 (in S-3527 MSX Engine) // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_ROM("pen", 3, 3, 1, 1, "maincpu", 0xc000) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips NMS-8245 - 2 possible sets (/00 /16) */ @@ -3963,25 +3862,25 @@ ROM_START (nms8245) ROM_LOAD ("nms8245.u7", 0x20000, 0x20000, BAD_DUMP CRC(0c827d5f) SHA1(064e706cb1f12b99b329944ceeedc0efc3b2d9be)) ROM_END -MSX_LAYOUT_INIT (nms8245) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x28000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0x2c000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( nms8245, msx2_pal ) - MCFG_MSX_LAYOUT(nms8245) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // YM2149 (in S-3527 MSX Engine) // FDC: wd2793, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext",3, 0, 0, 1, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0x2c000) + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips NMS-8245F */ @@ -3994,25 +3893,25 @@ ROM_START (nms8245f) ROM_LOAD ("nms8245.u7", 0x20000, 0x20000, BAD_DUMP CRC(0c827d5f) SHA1(064e706cb1f12b99b329944ceeedc0efc3b2d9be)) ROM_END -MSX_LAYOUT_INIT (nms8245f) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x30000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x38000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0x3c000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( nms8245f, msx2_pal ) - MCFG_MSX_LAYOUT(nms8245f) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // YM2149 (in S-3527 MSX Engine) // FDC: wd2793, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x30000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x38000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0x3c000) + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips NMS-8250 */ @@ -4027,25 +3926,25 @@ ROM_START (nms8250) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (nms8250) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( nms8250, msx2_pal ) - MCFG_MSX_LAYOUT(nms8250) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // YM2149 (in S-3527 MSX Engine) // FDC: wd2793, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0xc000) + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips NMS-8250J */ @@ -4058,23 +3957,23 @@ ROM_START (nms8250j) ROM_LOAD ("8250jkfn.rom", 0x20000, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) ROM_END -MSX_LAYOUT_INIT (nms8250j) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( nms8250j, msx2 ) - MCFG_MSX_LAYOUT(nms8250j) // AY8910/YM2149? // FDC: wd2793?, 1 3.5" DSDD drive + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0xc000) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips NMS-8255 */ @@ -4088,25 +3987,25 @@ ROM_START (nms8255) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (nms8255) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( nms8255, msx2_pal ) - MCFG_MSX_LAYOUT(nms8255) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // YM2149 (in S-3527 MSX Engine) // FDC: wd2793, 2 3.5" DSDD drives - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_2_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0xc000) + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_2_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips NMS-8280 - 2 possible sets (/00 /16) */ @@ -4120,24 +4019,24 @@ ROM_START (nms8280) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (nms8280) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( nms8280, msx2_pal ) - MCFG_MSX_LAYOUT(nms8280) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // AY8910/YM2149? // FDC: wd2793, 2 3.5" DSDD drives + // 2 Cartridge slots + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0xc000) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_2_35_dd_drive ) - // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips NMS-8280G */ @@ -4151,24 +4050,24 @@ ROM_START (nms8280g) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (nms8280g) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( nms8280g, msx2_pal ) - MCFG_MSX_LAYOUT(nms8280g) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // AY8910/YM2149? // FDC: wd2793, 2 3.5" DSDD drives + // 2 Cartridge slots + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0xc000) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_2_35_dd_drive ) - // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips VG-8230 (u11 - exp, u12 - basic, u13 - disk */ @@ -4182,25 +4081,25 @@ ROM_START (vg8230) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (vg8230) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( vg8230, msx2_pal ) - MCFG_MSX_LAYOUT(vg8230) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // YM2149 (in S-3527 MSX Engine) // FDC: wd2793, 1 3.5" SSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0xc000) + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips VG-8230J */ @@ -4215,23 +4114,23 @@ ROM_START (vg8230j) ROM_LOAD ("8230jkfn.rom", 0x20000, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) ROM_END -MSX_LAYOUT_INIT (vg8230j) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( vg8230j, msx2 ) - MCFG_MSX_LAYOUT(vg8230j) // AY8910/YM2149? // FDC: wd2793?, 1 3.5" SSDD drive? + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0xc000) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips VG-8235 3 psosible basic and ext roms (/00 /02 /19) */ @@ -4245,25 +4144,25 @@ ROM_START (vg8235) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (vg8235) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( vg8235, msx2_pal ) - MCFG_MSX_LAYOUT(vg8235) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // YM2149 (in S-3527 MSX Engine) // FDC: wd2793, 1 3.5" SSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0xc000) + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips VG-8235F */ @@ -4277,25 +4176,25 @@ ROM_START (vg8235f) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (vg8235f) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( vg8235f, msx2_pal ) - MCFG_MSX_LAYOUT(vg8235f) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // YM2149 (in S-3527 MSX Engine) // FDC: wd2793, 1 3.5" SSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0xc000) + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_ssdd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Philips VG-8240 */ @@ -4309,24 +4208,24 @@ ROM_START (vg8240) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (vg8240) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( vg8240, msx2_pal ) - MCFG_MSX_LAYOUT(vg8240) - MCFG_MSX_RAMIO_SET_BITS(0xf8) // AY8910/YM2149? // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0xf8) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 3, 1, 1, "maincpu", 0xc000) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sanyo MPC-2300 */ @@ -4339,20 +4238,18 @@ ROM_START (mpc2300) ROM_FILL (0xc000, 0x14000, 0) ROM_END -MSX_LAYOUT_INIT (mpc2300) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB?? Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( mpc2300, msx2 ) - MCFG_MSX_LAYOUT(mpc2300) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x20000) /* 128KB?? Mapper RAM */ + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sanyo Wavy MPC-25FD */ @@ -4364,23 +4261,23 @@ ROM_START (mpc25fd) ROM_LOAD ("25fddisk.rom", 0xc000, 0x4000, CRC(38454059) SHA1(58ac78bba29a06645ca8d6a94ef2ac68b743ad32)) ROM_END -MSX_LAYOUT_INIT (mpc25fd) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 3, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 128KB?? RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( mpc25fd, msx2 ) - MCFG_MSX_LAYOUT(mpc25fd) // YM2149 (in S-3527 MSX Engine) // FDC: wd2793, 1 drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 1 Cartridge slot (slot 1) - MCFG_FRAGMENT_ADD( msx2_1_cartslot ) // S-3527 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot", 1, 0) + MCFG_MSX_LAYOUT_ROM("ext", 2, 3, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 1, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB?? RAM */ + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sanyo Wavy PHC-23 = PHC-23J(B)*/ @@ -4393,21 +4290,21 @@ ROM_START (phc23) ROM_FILL (0xc000, 0x14000, 0) ROM_END -MSX_LAYOUT_INIT (phc23) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( phc23, msx2 ) - MCFG_MSX_LAYOUT(phc23) // YM2149 (in S-1985 MSX Engine) // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM("ram", 3, 2, 0, 4) /* 64KB RAM */ + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sharp Epcom HotBit 2.0 */ @@ -4422,25 +4319,25 @@ ROM_START (hotbit20) ROM_LOAD ("microsoldisk.rom", 0x24000, 0x4000, CRC(6704ef81) SHA1(a3028515ed829e900cc8deb403e17b09a38bf9b0)) ROM_END -MSX_LAYOUT_INIT (hotbit20) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (1, 1, 0, 1, ROM, 0x4000, 0x8000) /* EXT */ - MSX_LAYOUT_SLOT (1, 1, 1, 1, ROM, 0x4000, 0x20000) /* BASIC */ - MSX_LAYOUT_SLOT (1, 3, 1, 1, DISK_ROM, 0x4000, 0x24000) /* Microsol controller */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hotbit20, msx2_pal ) - MCFG_MSX_LAYOUT(hotbit20) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: microsol, 1 or 2 drives? + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_ROM("ext", 1, 1, 0, 1, "maincpu", 0x8000) /* EXT */ + MCFG_MSX_LAYOUT_ROM("xbasic", 1, 1, 1, 1, "maincpu", 0x20000) /* BASIC */ + MCFG_MSX_LAYOUT_DISK1("disk", 1, 3, 1, 1, "maincpu", 0x24000) /* Microsol controller */ + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 2, 0, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + MCFG_FRAGMENT_ADD( msx_microsol ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F1 */ @@ -4456,23 +4353,21 @@ ROM_START (hbf1) ROM_LOAD ("f1note3.rom", 0x2c000, 0x8000, CRC(73eb9329) SHA1(58accf41a90693874b86ce98d8d43c27beb8b6dc)) ROM_END -MSX_LAYOUT_INIT (hbf1) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, ROM, 0x4000, 0x20000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x24000) - MSX_LAYOUT_SLOT (3, 2, 1, 2, ROM, 0x8000, 0x2c000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, RAM, 0x10000, 0x0000) /* 64KB RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf1, msx2 ) - MCFG_MSX_LAYOUT(hbf1) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("note1", 3, 0, 1, 1, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_ROM("note2", 3, 1, 1, 2, "maincpu", 0x24000) + MCFG_MSX_LAYOUT_ROM("note3", 3, 2, 1, 2, "maincpu", 0x2c000) + MCFG_MSX_LAYOUT_RAM("ram", 3, 3, 0, 4) /* 64KB RAM */ + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F1II */ @@ -4488,24 +4383,22 @@ ROM_START (hbf12) ROM_LOAD ("f12note3.rom", 0x2c000, 0x8000, CRC(44a10e6a) SHA1(917d1c079e03c4a44de864f123d03c4e32c8daae)) ROM_END -MSX_LAYOUT_INIT (hbf12) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, ROM, 0x4000, 0x20000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x24000) - MSX_LAYOUT_SLOT (3, 2, 1, 2, ROM, 0x8000, 0x2c000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf12, msx2 ) - MCFG_MSX_LAYOUT(hbf12) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("note1", 3, 0, 1, 1, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_ROM("note2", 3, 1, 1, 2, "maincpu", 0x24000) + MCFG_MSX_LAYOUT_ROM("note3", 3, 2, 1, 2, "maincpu", 0x2c000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 3, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F1XD */ @@ -4519,25 +4412,27 @@ ROM_START (hbf1xd) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (hbf1xd) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf1xd, msx2 ) - MCFG_MSX_LAYOUT(hbf1xd) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1895 MSX Engine) // FDC: wd2793, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 3, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F1XDMK2 */ @@ -4551,24 +4446,24 @@ ROM_START (hbf1xdm2) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (hbf1xdm2) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf1xdm2, msx2 ) - MCFG_MSX_LAYOUT(hbf1xdm2) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 3, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F5 */ @@ -4580,21 +4475,19 @@ ROM_START (hbf5) ROM_LOAD ("hbf5note.rom", 0xc000, 0x4000, CRC(0cdc0777) SHA1(06ba91d6732ee8a2ecd5dcc38b0ce42403d86708)) ROM_END -MSX_LAYOUT_INIT (hbf5) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (0, 1, 2, 1, ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (0, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB?? Mapper RAM */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf5, msx2_pal ) - MCFG_MSX_LAYOUT(hbf5) // YM2149 // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("ext", 0, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("note", 0, 1, 2, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 0, 2, 0x10000) /* 64KB?? Mapper RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F500 */ @@ -4611,24 +4504,24 @@ ROM_START (hbf500) ROM_LOAD ("f500kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) ROM_END -MSX_LAYOUT_INIT (hbf500) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (0, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (0, 1, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (0, 2, 0, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf500, msx2 ) - MCFG_MSX_LAYOUT(hbf500) // AY8910/YM2149? // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram1", 0, 0, 2, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_ROM("ext", 0, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 0, 1, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM("ram2", 0, 2, 0, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F500P */ @@ -4641,25 +4534,25 @@ ROM_START (hbf500p) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (hbf500p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (0, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (0, 1, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (0, 2, 0, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, ROM, 0x10000, 0x10000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf500p, msx2_pal ) - MCFG_MSX_LAYOUT(hbf500p) // AY8910/YM2149? // FDC: wd2793, 1 3.5" DSDD drive + // 3 Cartridge slots or 2 Cartridge slots and 1 expansion slot ? + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 3 Cartridge slots or 2 Cartridge slots and 1 expansion slot ? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram1", 0, 0, 2, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_ROM("ext", 0, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 0, 1, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM("ram2", 0, 2, 0, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("empty", 3, 0, 0, 4, "maincpu", 0x10000) // Empty? or is this the 3rd cartridge/expansion slot ? 0x10000 used to be the "special" loading spot for the fmpac rom + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F700D */ @@ -4672,25 +4565,27 @@ ROM_START (hbf700d) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (hbf700d) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, RAM_MM, 0x40000, 0x0000) /* 256KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf700d, msx2_pal ) - MCFG_MSX_LAYOUT(hbf700d) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1985 MSX Engine) // FDC: wd2793, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 3, 0x40000) /* 256KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F700F */ @@ -4703,24 +4598,24 @@ ROM_START (hbf700f) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (hbf700f) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, RAM_MM, 0x40000, 0x0000) /* 256KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf700f, msx2_pal ) - MCFG_MSX_LAYOUT(hbf700f) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 3, 0x40000) /* 256KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F700P */ @@ -4733,25 +4628,27 @@ ROM_START (hbf700p) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (hbf700p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, RAM_MM, 0x40000, 0x0000) /* 256KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf700p, msx2_pal ) - MCFG_MSX_LAYOUT(hbf700p) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1985 MSX Engine) // FDC: wd2793, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 3, 0x40000) /* 256KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F700S */ @@ -4764,24 +4661,24 @@ ROM_START (hbf700s) ROM_FILL (0x10000, 0x10000, 0) ROM_END -MSX_LAYOUT_INIT (hbf700s) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, RAM_MM, 0x40000, 0x0000) /* 256KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf700s, msx2_pal ) - MCFG_MSX_LAYOUT(hbf700s) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 3, 0x40000) /* 256KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F900 */ @@ -4798,25 +4695,25 @@ ROM_START (hbf900) ROM_LOAD ("f900kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) ROM_END -MSX_LAYOUT_INIT (hbf900) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 1, 0, 4, RAM_MM, 0x40000, 0x0000) /* 256KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, ROM, 0x4000, 0x10000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf900, msx2 ) - MCFG_MSX_LAYOUT(hbf900) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: wd2793, 2 3.5" DSDD drives + // 2 Cartridge slots + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 1, 0x40000) /* 256KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("empty", 3, 3, 1, 1, "maincpu", 0x10000) // Empty/unknown, optional fmpac rom used to be loaded here, or should the util rom be loaded? + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_2_35_dd_drive ) - // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F900 (a) */ @@ -4833,25 +4730,25 @@ ROM_START (hbf900a) ROM_LOAD ("f900kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799)) ROM_END -MSX_LAYOUT_INIT (hbf900a) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 1, 0, 4, RAM_MM, 0x40000, 0x0000) /* 256KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, ROM, 0x4000, 0x10000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf900a, msx2 ) - MCFG_MSX_LAYOUT(hbf900a) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: wd2793, 2 3.5" DSDD drives + // 2 Cartridge slots + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 0, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 1, 0x40000) /* 256KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("empty", 3, 3, 1, 1, "maincpu", 0x10000) // Empty/unknown, optional fmpac rom used to be loaded here, or should the util rom be loaded? + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_2_35_dd_drive ) - // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F9P */ @@ -4865,24 +4762,23 @@ ROM_START (hbf9p) ROM_LOAD ("f9pfirm2.rom.ic13", 0x20000, 0x8000, CRC(ea97069f) SHA1(2d1880d1f5a6944fcb1b198b997a3d90ecd1903d)) ROM_END -MSX_LAYOUT_INIT (hbf9p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf9p, msx2_pal ) - MCFG_MSX_LAYOUT(hbf9p) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1985 MSX Engine) // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("firm1", 3, 0, 0, 2, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("firm2", 3, 1, 1, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F9P Russian */ @@ -4893,21 +4789,21 @@ ROM_START (hbf9pr) ROM_LOAD ("f9prext.rom", 0x8000, 0x4000, CRC(8b966f50) SHA1(65253cb38ab11084f355a2d4ad78fa6c64cbe660)) ROM_END -MSX_LAYOUT_INIT (hbf9pr) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf9pr, msx2_pal ) - MCFG_MSX_LAYOUT(hbf9pr) // YM2149 (in S-1985 MSX Engine) // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-F9S */ @@ -4921,24 +4817,23 @@ ROM_START (hbf9s) ROM_LOAD ("f9sfirm2.ic13", 0x20000, 0x8000, CRC(ea97069f) SHA1(2d1880d1f5a6944fcb1b198b997a3d90ecd1903d)) ROM_END -MSX_LAYOUT_INIT (hbf9s) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf9s, msx2_pal ) - MCFG_MSX_LAYOUT(hbf9s) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1985 MSX Engine) // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) - // S-1985 MSX Engine + // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("firm1", 3, 0, 0, 2, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("firm2", 3, 1, 1, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-G900AP */ @@ -4960,26 +4855,26 @@ ROM_START (hbg900ap) ROM_LOAD ("g900util.rom", 0x24000, 0x4000, CRC(d0417c20) SHA1(8779b004e7605a3c419825f0373a5d8fa84e1d5b)) ROM_END -MSX_LAYOUT_INIT (hbg900ap) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (0, 1, 1, 1, DISK_ROM, 0x4000, 0xc000) -/* MSX_LAYOUT_SLOT (0, 2, 1, 1, ROM, 0x4000, 0x20000) */ /* RS232C must be emulated */ - MSX_LAYOUT_SLOT (0, 3, 1, 1, ROM, 0x4000, 0x24000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x80000, 0x0000) /* 512KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbg900ap, msx2_pal ) - MCFG_MSX_LAYOUT(hbg900ap) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("ext", 0, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 0, 1, 1, 1, "maincpu", 0xc000) +/* MSX_LAYOUT_SLOT ("rs232c", 0, 2, 1, 1, "maincpu", 0x20000) */ /* RS232C must be emulated */ + MCFG_MSX_LAYOUT_ROM("util", 0, 3, 1, 1, "maincpu", 0x24000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x80000) /* 512KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Sony HB-G900P - 3x 32KB ROMs */ @@ -4995,26 +4890,26 @@ ROM_START (hbg900p) ROM_LOAD ("g900util.rom", 0x24000, 0x4000, CRC(d0417c20) SHA1(8779b004e7605a3c419825f0373a5d8fa84e1d5b)) ROM_END -MSX_LAYOUT_INIT (hbg900p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (0, 1, 1, 1, DISK_ROM, 0x4000, 0xc000) -/* MSX_LAYOUT_SLOT (0, 2, 1, 1, ROM, 0x4000, 0x20000) */ /* RS232C must be emulated */ - MSX_LAYOUT_SLOT (0, 3, 1, 1, ROM, 0x4000, 0x24000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbg900p, msx2_pal ) - MCFG_MSX_LAYOUT(hbg900p) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: wd2793, 1 3.5" DSDD drive + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("ext", 0, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_DISK1("disk", 0, 1, 1, 1, "maincpu", 0xc000) +/* MSX_LAYOUT_SLOT ("rs232c", 0, 2, 1, 1, "maincpu", 0x20000) */ /* RS232C must be emulated */ + MCFG_MSX_LAYOUT_ROM("util", 0, 3, 1, 1, "maincpu", 0x24000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Talent TPC-310 */ @@ -5029,26 +4924,28 @@ ROM_START (tpc310) ROM_LOAD ("tpc310acc.rom", 0x24000, 0x8000, CRC(4fb8fab3) SHA1(cdeb0ed8adecaaadb78d5a5364fd603238591685)) ROM_END -MSX_LAYOUT_INIT (tpc310) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 1, 1, ROM, 0x4000, 0x20000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x24000) - MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM2, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( tpc310, msx2_pal ) - MCFG_MSX_LAYOUT(tpc310) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1985 MSX Engine) // FDC: mb8877a?, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_mb8877a ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 1 Cartridge slot (slot 2) - MCFG_FRAGMENT_ADD( msx2_1_cartslot ) // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 1, 0, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("turbo", 3, 0, 1, 1, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_ROM("acc", 3, 1, 1, 2, "maincpu", 0x24000) + MCFG_MSX_LAYOUT_DISK2("disk", 3, 2, 1, 1, "maincpu", 0xc000) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx_mb8877a ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Talent TPP-311 */ @@ -5060,18 +4957,15 @@ ROM_START (tpp311) ROM_LOAD ("311logo.rom", 0x20000, 0x8000, CRC(0e6ecb9f) SHA1(e45ddc5bf1a1e63756d11fb43fc50276ca35cab0)) ROM_END -MSX_LAYOUT_INIT (tpp311) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB?? Mapper RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( tpp311, msx2_pal ) - MCFG_MSX_LAYOUT(tpp311) // AY8910/YM2149? // FDC: None, 0 drives // 0 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 1, 0, 0x10000) /* 64KB?? Mapper RAM */ + MCFG_MSX_LAYOUT_ROM("logo", 2, 0, 0, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) MACHINE_CONFIG_END /* MSX2 - Talent TPS-312 */ @@ -5084,22 +4978,20 @@ ROM_START (tps312) ROM_LOAD ("312write.rom", 0x28000, 0x4000, CRC(63c6992f) SHA1(93682f5baba7697c40088e26f99ee065c78e83b8)) ROM_END -MSX_LAYOUT_INIT (tps312) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB?? Mapper RAM */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x28000) - MSX_LAYOUT_SLOT (3, 2, 0, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( tps312, msx2_pal ) - MCFG_MSX_LAYOUT(tps312) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 1, 0, 0x20000) /* 128KB?? Mapper RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("write", 3, 1, 0, 1, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_ROM("plan", 3, 2, 0, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 3) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Toshiba HX-23 */ @@ -5114,23 +5006,20 @@ ROM_START (hx23) ROM_FILL (0x28000, 0x8000, 0) ROM_END -MSX_LAYOUT_INIT (hx23) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 0, 2, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 2, RAM, 0x8000, 0x0000) /* 32KB RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, ROM, 0x10000, 0x20000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hx23, msx2_pal ) - MCFG_MSX_LAYOUT(hx23) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_RAM("ram1", 0, 0, 2, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM("ram2", 3, 0, 0, 2) /* 32KB RAM */ + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("word", 3, 3, 0, 4, "maincpu", 0x20000) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Toshiba HX-23F */ @@ -5145,22 +5034,20 @@ ROM_START (hx23f) ROM_FILL (0x28000, 0x8000, 0) ROM_END -MSX_LAYOUT_INIT (hx23f) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, ROM, 0x10000, 0x20000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hx23f, msx2_pal ) - MCFG_MSX_LAYOUT(hx23f) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x20000) /* 128KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("word", 3, 3, 0, 4, "maincpu", 0x20000) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Yamaha CX7M */ @@ -5174,22 +5061,20 @@ ROM_START (cx7m) ROM_LOAD ("sfg05m.rom", 0x20000, 0x8000, CRC(6c2545c9) SHA1(bc4b242647116f4886bb92e86421f97b1be51938)) ROM_END -MSX_LAYOUT_INIT (cx7m) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 0, 2, ROM, 0x8000, 0x20000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cx7m, msx2_pal ) - MCFG_MSX_LAYOUT(cx7m) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("ext", 0, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("sfg", 3, 3, 0, 2, "maincpu", 0x20000) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2 - Yamaha CX7M-128 */ @@ -5204,23 +5089,21 @@ ROM_START (cx7m128) ROM_LOAD ("yrm502.rom", 0x28000, 0x4000, CRC(51f7ddd1) SHA1(2a4b4a4657e3077df8a88f98210b76883d3702b1)) ROM_END -MSX_LAYOUT_INIT (cx7m128) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 1, 1, 1, ROM, 0x4000, 0x28000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 3, 0, 2, ROM, 0x8000, 0x20000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( cx7m128, msx2_pal ) - MCFG_MSX_LAYOUT(cx7m128) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_ROM("ext", 0, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("yrm502", 3, 1, 1, 1, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("sfg", 3, 3, 0, 2, "maincpu", 0x20000) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /******************************** MSX 2+ **********************************/ @@ -5231,30 +5114,29 @@ ROM_START (msx2p) ROM_REGION (0x28000, "maincpu",0) ROM_LOAD ("msx2p.rom", 0x0000, 0x8000, CRC(00870134) SHA1(e2fbd56e42da637609d23ae9df9efd1b4241b18a)) ROM_LOAD ("msx2pext.rom", 0x8000, 0x4000, CRC(b8ba44d3) SHA1(fe0254cbfc11405b79e7c86c7769bd6322b04995)) - ROM_LOAD_OPTIONAL ("disk.rom", 0xc000, 0x4000, CRC(b7c58fad) SHA1(bc517b4a248c3a1338c5efc937b0128b6a783808)) - ROM_LOAD_OPTIONAL ("fmpac.rom", 0x10000, 0x10000, CRC(0e84505d) SHA1(9d789166e3caf28e4742fe933d962e99618c633d)) + ROM_LOAD ("disk.rom", 0xc000, 0x4000, CRC(b7c58fad) SHA1(bc517b4a248c3a1338c5efc937b0128b6a783808)) + ROM_LOAD ("fmpac.rom", 0x10000, 0x10000, CRC(0e84505d) SHA1(9d789166e3caf28e4742fe933d962e99618c633d)) ROM_LOAD ("msx2pkdr.rom", 0x20000, 0x8000, CRC(a068cba9) SHA1(1ef3956f7f918873fb9b031339bba45d1e5e5878)) ROM_REGION(0x20000, "kanji", 0) ROM_LOAD ("msx2pkfn.rom", 0, 0x20000, CRC(b244f6cf) SHA1(e0e99cd91e88ce2676445663f832c835d74d6fd4)) ROM_END -MSX_LAYOUT_INIT (msx2p) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( msx2pgen, msx2p ) - MCFG_MSX_LAYOUT(msx2p) + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x20000) /* 128KB Mapper RAM */ MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Ciel Expert 3 IDE */ @@ -5268,25 +5150,27 @@ ROM_START (expert3i ) ROM_LOAD ("ide240a.rom", 0x20000, 0x10000, CRC(7adf857f) SHA1(8a919dbeed92db8c06a611279efaed8552810239)) ROM_END -MSX_LAYOUT_INIT (expert3i) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (1, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 1, 1, 1, ROM, 0x4000, 0x10000) - MSX_LAYOUT_SLOT (1, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (1, 3, 0, 4, ROM, 0x10000, 0x20000) /* IDE hardware needs to be emulated */ - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM_MM, 0x40000, 0x0000) /* 256KB?? Mapper RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( expert3i, msx2p ) - MCFG_MSX_LAYOUT(expert3i) // AY8910/YM2149? // FDC: wd2793, 1 or 2? drives + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_ROM("ext", 1, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_MUSIC("mus", 1, 1, 1, 1, "maincpu", 0x10000) + MCFG_MSX_LAYOUT_DISK1("disk", 1, 2, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_ROM("ide", 1, 3, 0, 4, "maincpu", 0x20000) /* IDE hardware needs to be emulated */ + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 2, 0, 0x40000) /* 256KB?? Mapper RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx_ym2413 ) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Ciel Expert 3 Turbo */ @@ -5301,26 +5185,28 @@ ROM_START (expert3t ) ROM_LOAD ("turbo.rom", 0x20000, 0x4000, CRC(ab528416) SHA1(d468604269ae7664ac739ea9f922a05e14ffa3d1)) ROM_END -MSX_LAYOUT_INIT (expert3t) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (1, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 1, 1, 1, ROM, 0x4000, 0x10000) - MSX_LAYOUT_SLOT (1, 2, 1, 1, ROM, 0x4000, 0x20000) /* Turbo hardware needs to be emulated */ - MSX_LAYOUT_SLOT (1, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM_MM, 0x40000, 0x0000) /* 256KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( expert3t, msx2p ) - MCFG_MSX_LAYOUT(expert3t) // AY8910 // FDC: wd2793?, 1 or 2? drives + // 4 Cartridge/Expansion slots? + // FM/YM2413 built-in + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_ROM("ext", 1, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_MUSIC("mus", 1, 1, 1, 1, "maincpu", 0x10000) + MCFG_MSX_LAYOUT_ROM("turbo", 1, 2, 1, 1, "maincpu", 0x20000) /* Turbo hardware needs to be emulated */ + MCFG_MSX_LAYOUT_DISK1("disk", 1, 3, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 2, 0, 0x40000) /* 256KB Mapper RAM */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + + MCFG_FRAGMENT_ADD( msx_ym2413 ) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 4 Cartridge/Expansion slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) - // FM/YM2413 built-in + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Gradiente Expert AC88+ */ @@ -5334,25 +5220,25 @@ ROM_START (expertac) ROM_LOAD ("xbasic2.rom", 0x24000, 0x4000, CRC(2825b1a0) SHA1(47370bec7ca1f0615a54eda548b07fbc0c7ef398)) ROM_END -MSX_LAYOUT_INIT (expertac) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM?? */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 1, ROM, 0x4000, 0x20000) - MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 3, 1, 1, ROM, 0x4000, 0x24000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( expertac, msx2p ) - MCFG_MSX_LAYOUT(expertac) // AY8910/YM2149? // FDC: wd2793?, 1 or 2? drives + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM?? */ + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("asm", 3, 1, 1, 1, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_ROM("xbasic", 3, 3, 1, 1, "maincpu", 0x24000) + MCFG_FRAGMENT_ADD( msx_wd2793 ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Gradiente Expert DDX+ */ @@ -5366,25 +5252,25 @@ ROM_START (expertdx) ROM_LOAD ("kanji.rom", 0x30000, 0x8000, CRC(b4fc574d) SHA1(dcc3a67732aa01c4f2ee8d1ad886444a4dbafe06)) ROM_END -MSX_LAYOUT_INIT (expertdx) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (1, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (1, 2, 1, 1, ROM, 0x4000, 0x20000) - //MSX_LAYOUT_SLOT (1, 3, 1, 1, DISK_ROM, 0x4000, 0xc000) /* TC8566AF Disk controller /* TC8566AF Disk controller*/*/ - MSX_LAYOUT_SLOT (2, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM?? */ - MSX_LAYOUT_SLOT (3, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - /* Kanji? */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( expertdx, msx2p ) - MCFG_MSX_LAYOUT(expertdx) // AY8910/YM2149? // FDC: tc8566af, 1 3.5" DSDD drive? + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_ROM("ext", 1, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("xbasic", 1, 2, 1, 1, "maincpu", 0x20000) + //MCFG_MSX_LAYOUT_DISK1("disk", 1, 3, 1, 1, "maincpu", 0xc000) /* TC8566AF Disk controller /* TC8566AF Disk controller*/*/ + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 2, 0, 0x10000) /* 64KB Mapper RAM?? */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 3, 0) + /* Kanji? */ + MCFG_FRAGMENT_ADD( msx_tc8566af ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Panasonic FS-A1FX */ @@ -5403,26 +5289,29 @@ ROM_START (fsa1fx) ROM_LOAD ("a1fxkfn.rom", 0, 0x20000, CRC(b244f6cf) SHA1(e0e99cd91e88ce2676445663f832c835d74d6fd4)) ROM_END -MSX_LAYOUT_INIT (fsa1fx) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) -/* MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ - MSX_LAYOUT_SLOT (3, 3, 1, 2, ROM, 0x8000, 0x28000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fsa1fx, msx2p ) - MCFG_MSX_LAYOUT(fsa1fx) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots? + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x20000) +/* MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ + MCFG_MSX_LAYOUT_ROM("cock", 3, 3, 1, 2, "maincpu", 0x28000) + + MCFG_MSX_MATSUSHITA_ADD( "matsushita" ) + MCFG_MSX_MATSUSHITA_TURBO_CB(WRITELINE(msx_state, turbo_w)) + MCFG_FRAGMENT_ADD( msx_tc8566af ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Panasonic FS-A1WSX */ @@ -5443,28 +5332,34 @@ ROM_START (fsa1wsx) ROM_LOAD ("a1wskfn.rom", 0, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) ROM_END -MSX_LAYOUT_INIT (fsa1wsx) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 2, 1, 1, ROM, 0x4000, 0x28000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) -/* MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ -/* MSX_LAYOUT_SLOT (3, 3, 1, 4, PANASONIC08, 0x200000, 0x30000) */ /* Panasonic 08KB Mapper must be emulated */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fsa1wsx, msx2p ) - MCFG_MSX_LAYOUT(fsa1wsx) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: tc8566af, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_tc8566af ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // FM built-in + // No cassette port + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_MUSIC("mus", 0, 2, 1, 1, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x20000) +/* MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ + MCFG_MSX_LAYOUT_PANASONIC08("firm", 3, 3, 0, 4, "maincpu", 0x30000) + + MCFG_MSX_MATSUSHITA_ADD( "matsushita" ) + MCFG_MSX_MATSUSHITA_TURBO_CB(WRITELINE(msx_state, turbo_w)) + + MCFG_FRAGMENT_ADD( msx_ym2413 ) + + MCFG_FRAGMENT_ADD( msx_tc8566af ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Panasonic FS-A1WX */ @@ -5485,28 +5380,34 @@ ROM_START (fsa1wx) ROM_LOAD ("a1wxkfn.rom", 0, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) ROM_END -MSX_LAYOUT_INIT (fsa1wx) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 2, 1, 1, ROM, 0x4000, 0x28000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) -/* MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ -/* MSX_LAYOUT_SLOT (3, 3, 1, 4, PANASONIC08, 0x200000, 0x30000) */ /* Panasonic 08KB Mapper must be emulated */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fsa1wx, msx2p ) - MCFG_MSX_LAYOUT(fsa1wx) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: tc8566af, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_tc8566af ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // FM built-in + // MSX Engine T9769A + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_MUSIC("mus", 0, 2, 1, 1, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x20000) +/* MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ + MCFG_MSX_LAYOUT_PANASONIC08("firm", 3, 3, 0, 4, "maincpu", 0x30000) + + MCFG_MSX_MATSUSHITA_ADD( "matsushita" ) + MCFG_MSX_MATSUSHITA_TURBO_CB(WRITELINE(msx_state, turbo_w)) + + MCFG_FRAGMENT_ADD( msx_ym2413 ) + + MCFG_FRAGMENT_ADD( msx_tc8566af ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Panasonic FS-A1WX (a) */ @@ -5526,28 +5427,33 @@ ROM_START (fsa1wxa) ROM_LOAD ("a1wxkfn.rom", 0, 0x40000, CRC(1f6406fb) SHA1(5aff2d9b6efc723bc395b0f96f0adfa83cc54a49)) ROM_END -MSX_LAYOUT_INIT (fsa1wxa) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 2, 1, 1, ROM, 0x4000, 0x28000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) -/* MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ -/* MSX_LAYOUT_SLOT (3, 3, 1, 4, PANASONIC08, 0x200000, 0x30000) */ /* Panasonic 08KB Mapper must be emulated */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fsa1wxa, msx2p ) - MCFG_MSX_LAYOUT(fsa1wxa) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: tc8566af, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_tc8566af ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // FM built-in + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_MUSIC("mus", 0, 2, 1, 1, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x20000) +/* MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ + MCFG_MSX_LAYOUT_PANASONIC08("firm", 3, 3, 0, 4, "maincpu", 0x30000) + + MCFG_MSX_MATSUSHITA_ADD( "matsushita" ) + MCFG_MSX_MATSUSHITA_TURBO_CB(WRITELINE(msx_state, turbo_w)) + + MCFG_FRAGMENT_ADD( msx_ym2413 ) + + MCFG_FRAGMENT_ADD( msx_tc8566af ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Sanyo Wavy PHC-35J */ @@ -5564,22 +5470,20 @@ ROM_START (phc35j) ROM_LOAD ("35jkfn.rom", 0, 0x20000, CRC(c9651b32) SHA1(84a645becec0a25d3ab7a909cde1b242699a8662)) ROM_END -MSX_LAYOUT_INIT (phc35j) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( phc35j, msx2p ) - MCFG_MSX_LAYOUT(phc35j) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x20000) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Sanyo Wavy PHC-70FD1 */ @@ -5599,28 +5503,30 @@ ROM_START (phc70fd) ROM_LOAD ("70fdkfn.rom", 0, 0x20000, CRC(c9651b32) SHA1(84a645becec0a25d3ab7a909cde1b242699a8662)) ROM_END -MSX_LAYOUT_INIT (phc70fd) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) -/* MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, ROM, 0x4000, 0x28000) - MSX_LAYOUT_SLOT (3, 3, 2, 1, ROM, 0x4000, 0x2c000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( phc70fd, msx2p ) - MCFG_MSX_LAYOUT(phc70fd) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: tc8566af, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_tc8566af ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // FM built-in + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x20000) +/* MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ + MCFG_MSX_LAYOUT_MUSIC("mus", 3, 3, 1, 1, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_ROM("bas", 3, 3, 2, 1, "maincpu", 0x2c000) + + MCFG_FRAGMENT_ADD( msx_ym2413 ) + + MCFG_FRAGMENT_ADD( msx_tc8566af ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Sanyo Wavy PHC-70FD2 */ @@ -5639,28 +5545,30 @@ ROM_START (phc70fd2) ROM_LOAD ("70f2kfn.rom", 0, 0x40000, CRC(9a850db9) SHA1(bcdb4dae303dfe5234f372d70a5e0271d3202c36)) ROM_END -MSX_LAYOUT_INIT (phc70fd2) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) -/* MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ - MSX_LAYOUT_SLOT (3, 3, 1, 1, ROM, 0x4000, 0x28000) - MSX_LAYOUT_SLOT (3, 3, 2, 1, ROM, 0x4000, 0x2c000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( phc70fd2, msx2p ) - MCFG_MSX_LAYOUT(phc70fd2) - MCFG_MSX_RAMIO_SET_BITS(0x80) // AY8910/YM2149? // FDC: tc8566af, 2 3.5" DSDD drives - MCFG_FRAGMENT_ADD( msx_tc8566af ) - MCFG_FRAGMENT_ADD( msx_2_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // FM built-in + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x20000) +/* MCFG_MSX_LAYOUT_DISK("disk", 3, 2, 1, 1, "maincpu", 0xc000) */ /* FDC Emulation of TC8566AF must be emulated */ + MCFG_MSX_LAYOUT_MUSIC("mus", 3, 3, 1, 1, "maincpu", 0x28000) + MCFG_MSX_LAYOUT_ROM("bas", 3, 3, 2, 1, "maincpu", 0x2c000) + + MCFG_FRAGMENT_ADD( msx_ym2413 ) + + MCFG_FRAGMENT_ADD( msx_tc8566af ) + MCFG_FRAGMENT_ADD( msx_2_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Sony HB-F1XDJ */ @@ -5681,29 +5589,33 @@ ROM_START (hbf1xdj) ROM_LOAD ("f1xjkfn.rom", 0, 0x40000, CRC(7016dfd0) SHA1(218d91eb6df2823c924d3774a9f455492a10aecb)) ROM_END -MSX_LAYOUT_INIT (hbf1xdj) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) -/* MSX_LAYOUT_SLOT (0, 3, 1, 4, SONY08, 0x100000, 0x30000) */ /* Sony 08KB MSX-JE Mapper must be emulated */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 3, 1, 1, ROM, 0x4000, 0x28000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf1xdj, msx2p ) - MCFG_MSX_LAYOUT(hbf1xdj) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1985 MSX Engine) // FDC: wd2793, 1 3.5" DSDD drive - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // FM built-in // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) +/* MCFG_MSX_LAYOUT_("firm", 0, 3, 1, 4, SONY08, 0x100000, 0x30000) */ /* Sony 08KB MSX-JE Mapper must be emulated */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_MUSIC("mus", 3, 3, 1, 1, "maincpu", 0x28000) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx_ym2413 ) + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Sony HB-F1XV */ @@ -5724,29 +5636,33 @@ ROM_START (hbf1xv) ROM_LOAD ("f1xvkfn.rom", 0, 0x40000, CRC(7016dfd0) SHA1(218d91eb6df2823c924d3774a9f455492a10aecb)) ROM_END -MSX_LAYOUT_INIT (hbf1xv) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) -/* MSX_LAYOUT_SLOT (0, 3, 1, 4, SONY08, 0x100000, 0x30000) */ /* Sony 08KB MSX-JE Mapper must be emulated */ - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x20000) - MSX_LAYOUT_SLOT (3, 2, 1, 1, DISK_ROM, 0x4000, 0xc000) - MSX_LAYOUT_SLOT (3, 3, 1, 1, ROM, 0x4000, 0x28000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf1xv, msx2p ) - MCFG_MSX_LAYOUT(hbf1xv) - MCFG_MSX_RAMIO_SET_BITS(0x80) // YM2149 (in S-1985 MSX Engine) // FDC: wd2793, 1 3.5" DSDD drives - MCFG_FRAGMENT_ADD( msx_wd2793 ) - MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) // FM built-in // S-1985 MSX Engine + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) +/* MCFG_MSX_LAYOUT_("firm", 0, 3, 1, 4, SONY08, 0x100000, 0x30000) */ /* Sony 08KB MSX-JE Mapper must be emulated */ + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x10000) /* 64KB Mapper RAM */ + MCFG_MSX_RAMIO_SET_BITS(0x80) + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_DISK1("disk", 3, 2, 1, 1, "maincpu", 0xc000) + MCFG_MSX_LAYOUT_MUSIC("mus", 3, 3, 1, 1, "maincpu", 0x28000) + + MCFG_MSX_S1985_ADD("s1985") + + MCFG_FRAGMENT_ADD( msx_ym2413 ) + + MCFG_FRAGMENT_ADD( msx_wd2793 ) + MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX2+ - Sony HB-F9S+ */ @@ -5759,22 +5675,20 @@ ROM_START (hbf9sp) ROM_LOAD ("f9spfrm2.rom", 0x24000, 0x8000, CRC(ea97069f) SHA1(2d1880d1f5a6944fcb1b198b997a3d90ecd1903d)) ROM_END -MSX_LAYOUT_INIT (hbf9sp) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (1, 0, 0, 4, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 4, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 0, 2, 1, ROM, 0x4000, 0x20000) - MSX_LAYOUT_SLOT (3, 1, 2, 2, ROM, 0x8000, 0x24000) - MSX_LAYOUT_SLOT (3, 2, 0, 4, RAM_MM, 0x10000, 0x0000) /* 64KB?? Mapper RAM */ -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( hbf9sp, msx2p ) - MCFG_MSX_LAYOUT(hbf9sp) // AY8910/YM2149? // FDC: None, 0 drives // 2 Cartridge slots? - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_ROM("ext", 3, 0, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("firm1", 3, 0, 2, 1, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_ROM("firm2", 3, 1, 2, 2, "maincpu", 0x24000) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 2, 0x10000) /* 64KB?? Mapper RAM */ + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX Turbo-R - Panasonic FS-A1GT */ @@ -5791,29 +5705,31 @@ ROM_START (fsa1gt) ROM_LOAD ("a1gtfirm.rom", 0x80000, 0x400000, CRC(feefeadc) SHA1(e779c338eb91a7dea3ff75f3fde76b8af22c4a3a)) ROM_END -MSX_LAYOUT_INIT (fsa1gt) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 2, 1, 1, ROM, 0x4000, 0x38000) - MSX_LAYOUT_SLOT (0, 3, 1, 1, ROM, 0x4000, 0x3c000) - MSX_LAYOUT_SLOT (1, 0, 0, 0, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 0, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB?? Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x30000) - MSX_LAYOUT_SLOT (3, 2, 1, 3, ROM, 0xc000, 0x20000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, ROM, 0x10000, 0x80000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fsa1gt, msx2 ) - MCFG_MSX_LAYOUT(fsa1gt) // AY8910/YM2149? // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots + // FM built-in + // MIDI + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_MUSIC("mus", 0, 2, 1, 1, "maincpu", 0x38000) + MCFG_MSX_LAYOUT_ROM("opt", 0, 3, 1, 1, "maincpu", 0x3c000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x20000) /* 128KB?? Mapper RAM */ + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x30000) + MCFG_MSX_LAYOUT_ROM("dos", 3, 2, 1, 3, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_ROM("firm", 3, 3, 0, 4, "maincpu", 0x80000) + + MCFG_FRAGMENT_ADD( msx_ym2413 ) + MCFG_FRAGMENT_ADD( msx_tc8566af ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) - // FM built-in - // MIDI + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END /* MSX Turbo-R - Panasonic FS-A1ST */ @@ -5830,28 +5746,30 @@ ROM_START (fsa1st) ROM_LOAD ("a1stfirm.rom", 0x80000, 0x400000, CRC(139ac99c) SHA1(c212b11fda13f83dafed688c54d098e7e47ab225)) ROM_END -MSX_LAYOUT_INIT (fsa1st) - MSX_LAYOUT_SLOT (0, 0, 0, 2, ROM, 0x8000, 0x0000) - MSX_LAYOUT_SLOT (0, 2, 1, 1, ROM, 0x4000, 0x38000) - MSX_LAYOUT_SLOT (0, 3, 1, 1, ROM, 0x4000, 0x3c000) - MSX_LAYOUT_SLOT (1, 0, 0, 0, CARTRIDGE1, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (2, 0, 0, 0, CARTRIDGE2, 0x0000, 0x0000) - MSX_LAYOUT_SLOT (3, 0, 0, 4, RAM_MM, 0x20000, 0x0000) /* 128KB?? Mapper RAM */ - MSX_LAYOUT_SLOT (3, 1, 0, 1, ROM, 0x4000, 0x8000) - MSX_LAYOUT_SLOT (3, 1, 1, 2, ROM, 0x8000, 0x30000) - MSX_LAYOUT_SLOT (3, 2, 1, 3, ROM, 0xc000, 0x20000) - MSX_LAYOUT_SLOT (3, 3, 0, 4, ROM, 0x10000, 0x80000) -MSX_LAYOUT_END - static MACHINE_CONFIG_DERIVED( fsa1st, msx2 ) - MCFG_MSX_LAYOUT(fsa1st) // AY8910/YM2149? // FDC: tc8566af, 1 3.5" DSDD drive + // 2 Cartridge slots + // FM built-in + + MCFG_MSX_LAYOUT_ROM("bios", 0, 0, 0, 2, "maincpu", 0x0000) + MCFG_MSX_LAYOUT_MUSIC("mus", 0, 2, 1, 1, "maincpu", 0x38000) + MCFG_MSX_LAYOUT_ROM("opt", 0, 3, 1, 1, "maincpu", 0x3c000) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot1", 1, 0) + MCFG_MSX_LAYOUT_CARTRIDGE("cartslot2", 2, 0) + MCFG_MSX_LAYOUT_RAM_MM("ram_mm", 3, 0, 0x20000) /* 128KB?? Mapper RAM */ + MCFG_MSX_LAYOUT_ROM("ext", 3, 1, 0, 1, "maincpu", 0x8000) + MCFG_MSX_LAYOUT_ROM("kdr", 3, 1, 1, 2, "maincpu", 0x30000) + MCFG_MSX_LAYOUT_ROM("dos", 3, 2, 1, 3, "maincpu", 0x20000) + MCFG_MSX_LAYOUT_ROM("firm", 3, 3, 0, 4, "maincpu", 0x80000) + + MCFG_FRAGMENT_ADD( msx_ym2413 ) + MCFG_FRAGMENT_ADD( msx_tc8566af ) MCFG_FRAGMENT_ADD( msx_1_35_dd_drive ) - // 2 Cartridge slots - MCFG_FRAGMENT_ADD( msx2_2_cartslots ) - // FM built-in + MCFG_FRAGMENT_ADD( msx2_floplist ) + + MCFG_FRAGMENT_ADD( msx2_cartlist ) MACHINE_CONFIG_END diff --git a/src/mess/includes/msx.h b/src/mess/includes/msx.h index 791340f2448..a13621db31e 100644 --- a/src/mess/includes/msx.h +++ b/src/mess/includes/msx.h @@ -16,7 +16,6 @@ #include "sound/ay8910.h" #include "sound/dac.h" #include "sound/wave.h" -#include "sound/k051649.h" #include "sound/2413intf.h" #include "video/v9938.h" #include "video/tms9928a.h" @@ -28,124 +27,155 @@ #include "formats/msx_dsk.h" //#include "osdepend.h" #include "hashfile.h" -#include "includes/msx_slot.h" #include "machine/wd_fdc.h" #include "imagedev/floppy.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" -#define MSX_MAX_CARTS (2) #define TC8521_TAG "rtc" -#define MCFG_MSX_LAYOUT(_layout) \ - msx_state::set_layout(*owner, msx_slot_layout_##_layout); +#define MCFG_MSX_LAYOUT_ROM(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ + MCFG_MSX_SLOT_ROM_ADD(_tag, _page, _numpages, _region, _offset) \ + msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); + +#define MCFG_MSX_LAYOUT_RAM(_tag, _prim, _sec, _page, _numpages) \ + MCFG_MSX_SLOT_RAM_ADD(_tag, _page, _numpages) \ + msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); + +#define MCFG_MSX_LAYOUT_CARTRIDGE(_tag, _prim, _sec) \ + MCFG_MSX_SLOT_CARTRIDGE_ADD(_tag) \ + msx_state::install_slot_pages(*owner, _prim, _sec, 0, 4, device); + +#define MCFG_MSX_LAYOUT_RAM_MM(_tag, _prim, _sec, _total_size) \ + MCFG_MSX_SLOT_RAM_MM_ADD(_tag, _total_size) \ + msx_state::install_slot_pages(*owner, _prim, _sec, 0, 4, device); #define MCFG_MSX_RAMIO_SET_BITS(_ramio_set_bits) \ - msx_state::set_ramio_set_bits(*owner, _ramio_set_bits); + MCFG_MSX_SLOT_RAMM_SET_RAMIO_BITS(_ramio_set_bits) + +#define MCFG_MSX_LAYOUT_DISK1(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ + MCFG_MSX_SLOT_DISK1_ADD(_tag, _page, _numpages, _region, _offset, "fdc", "fdc:0", "fdc:1") \ + msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); + +#define MCFG_MSX_LAYOUT_DISK2(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ + MCFG_MSX_SLOT_DISK2_ADD(_tag, _page, _numpages, _region, _offset, "fdc", "fdc:0", "fdc:1") \ + msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); + +#define MCFG_MSX_LAYOUT_MUSIC(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ + MCFG_MSX_SLOT_MUSIC_ADD(_tag, _page, _numpages, _region, _offset, "ym2413" ) \ + msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); + +#define MCFG_MSX_LAYOUT_BUNSETSU(_tag, _prim, _sec, _page, _numpages, _region, _offset, _bunsetsu_tag) \ + MCFG_MSX_SLOT_BUNSETSU_ADD(_tag, _page, _numpages, _region, _offset, _bunsetsu_tag) \ + msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); + +#define MCFG_MSX_LAYOUT_FS4600(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ + MCFG_MSX_SLOT_FS4600_ADD(_tag, _page, _numpages, _region, _offset) \ + msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); + +#define MCFG_MSX_LAYOUT_PANASONIC08(_tag, _prim, _sec, _page, _numpages, _region, _offset) \ + MCFG_MSX_SLOT_PANASONIC08_ADD(_tag, _page, _numpages, _region, _offset) \ + msx_state::install_slot_pages(*owner, _prim, _sec, _page, _numpages, device); + 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_layout(NULL), - m_maincpu(*this, "maincpu"), - m_v9938(*this, "v9938"), - m_v9958(*this, "v9958"), - m_cassette(*this, "cassette"), - m_ay8910(*this, "ay8910"), - m_ym(*this, "ym2413"), - m_k051649(*this, "k051649"), - m_dac(*this, "dac"), - m_rtc(*this, TC8521_TAG), - m_fdc(*this, "fdc"), - m_floppy0(*this, "fdc:0"), - m_floppy1(*this, "fdc:1"), - m_floppy(NULL), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_bank5(*this, "bank5"), - m_bank6(*this, "bank6"), - m_bank7(*this, "bank7"), - m_bank8(*this, "bank8"), - m_bank9(*this, "bank9"), - m_bank10(*this, "bank10"), - m_bank11(*this, "bank11"), - m_region_maincpu(*this, "maincpu"), - m_region_kanji(*this, "kanji"), - m_io_joy0(*this, "JOY0"), - m_io_joy1(*this, "JOY1"), - m_io_dsw(*this, "DSW"), - m_io_mouse0(*this, "MOUSE0"), - m_io_mouse1(*this, "MOUSE1"), - m_io_key0(*this, "KEY0"), - m_io_key1(*this, "KEY1"), - m_io_key2(*this, "KEY2"), - m_io_key3(*this, "KEY3"), - m_io_key4(*this, "KEY4"), - m_io_key5(*this, "KEY5") { } + : driver_device(mconfig, type, tag) + , m_psg_b(0) + , m_rtc_latch(0) + , m_kanji_latch(0) + , m_primary_slot(0) + , m_port_c_old(0) + , m_keylatch(0) + , m_current_switched_device(0) + , m_maincpu(*this, "maincpu") + , m_v9938(*this, "v9938") + , m_v9958(*this, "v9958") + , m_cassette(*this, "cassette") + , m_ay8910(*this, "ay8910") + , m_dac(*this, "dac") + , m_rtc(*this, TC8521_TAG) + , m_switched_device_as_config("switched_device", ENDIANNESS_LITTLE, 8, 16, 0, address_map_delegate(FUNC(msx_state::switched_device_map), this)) + , m_region_maincpu(*this, "maincpu") + , m_region_kanji(*this, "kanji") + , m_io_joy0(*this, "JOY0") + , m_io_joy1(*this, "JOY1") + , m_io_dsw(*this, "DSW") + , m_io_mouse0(*this, "MOUSE0") + , m_io_mouse1(*this, "MOUSE1") + , m_io_key0(*this, "KEY0") + , m_io_key1(*this, "KEY1") + , m_io_key2(*this, "KEY2") + , m_io_key3(*this, "KEY3") + , m_io_key4(*this, "KEY4") + , m_io_key5(*this, "KEY5") + { + 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] = NULL; + } + } + } + m_mouse[0] = m_mouse[1] = 0; + m_mouse_stat[0] = m_mouse_stat[1] = 0; + } // static configuration helpers - static void set_layout(device_t &device, const msx_slot_layout *layout) { downcast<msx_state &>(device).m_layout = layout; } - static void set_ramio_set_bits(device_t &device, UINT8 ramio_set_bits) { downcast<msx_state &>(device).m_ramio_set_bits = ramio_set_bits; } - - DECLARE_WRITE8_MEMBER(msx_page0_w); - DECLARE_WRITE8_MEMBER(msx_page0_1_w); - DECLARE_WRITE8_MEMBER(msx_page1_w); - DECLARE_WRITE8_MEMBER(msx_page1_1_w); - DECLARE_WRITE8_MEMBER(msx_page1_2_w); - DECLARE_WRITE8_MEMBER(msx_page2_w); - DECLARE_WRITE8_MEMBER(msx_page2_1_w); - DECLARE_WRITE8_MEMBER(msx_page2_2_w); - DECLARE_WRITE8_MEMBER(msx_page2_3_w); - DECLARE_WRITE8_MEMBER(msx_page3_w); - DECLARE_WRITE8_MEMBER(msx_page3_1_w); + static void install_slot_pages(device_t &owner, UINT8 prim, UINT8 sec, UINT8 page, UINT8 numpages, device_t *device); + + DECLARE_ADDRESS_MAP(switched_device_map, 8); DECLARE_WRITE8_MEMBER(msx_sec_slot_w); DECLARE_READ8_MEMBER(msx_sec_slot_r); - DECLARE_WRITE8_MEMBER(msx_ram_mapper_w); - DECLARE_READ8_MEMBER(msx_ram_mapper_r); DECLARE_READ8_MEMBER(msx_kanji_r); DECLARE_WRITE8_MEMBER(msx_kanji_w); - DECLARE_WRITE8_MEMBER(msx_90in1_w); DECLARE_WRITE8_MEMBER(msx_ppi_port_a_w); DECLARE_WRITE8_MEMBER(msx_ppi_port_c_w); DECLARE_READ8_MEMBER(msx_ppi_port_b_r); - DECLARE_WRITE8_MEMBER(msx_fmpac_w); DECLARE_READ8_MEMBER(msx_rtc_reg_r); DECLARE_WRITE8_MEMBER(msx_rtc_reg_w); DECLARE_WRITE8_MEMBER(msx_rtc_latch_w); - DECLARE_WRITE_LINE_MEMBER(msx_wd179x_intrq_w); - DECLARE_WRITE_LINE_MEMBER(msx_wd179x_drq_w); + DECLARE_READ8_MEMBER(msx_mem_read); + DECLARE_WRITE8_MEMBER(msx_mem_write); + DECLARE_READ8_MEMBER(msx_switched_r); + DECLARE_WRITE8_MEMBER(msx_switched_w); + DECLARE_WRITE_LINE_MEMBER(turbo_w); /* PSG */ int m_psg_b; - int m_opll_active; /* mouse */ UINT16 m_mouse[2]; int m_mouse_stat[2]; /* rtc */ int m_rtc_latch; - /* disk */ - UINT8 m_dsk_stat; + /* kanji */ int m_kanji_latch; /* memory */ - const msx_slot_layout *m_layout; - slot_state *m_cart_state[MSX_MAX_CARTS]; - slot_state *m_state[4]; - const msx_slot *m_slot[4]; - UINT8 *m_ram_pages[4]; - UINT8 *m_empty, m_ram_mapper[4]; - UINT8 m_ramio_set_bits; - slot_state *m_all_state[4][4][4]; - int m_slot_expanded[4]; + 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 m_primary_slot; UINT8 m_secondary_slot[4]; - UINT8 m_superloderunner_bank; - UINT8 m_korean90in1_bank; - UINT8 *m_top_page; int m_port_c_old; - int keylatch; + int m_keylatch; + UINT8 m_current_switched_device; void msx_memory_map_all (); void msx_memory_map_page (UINT8 page); void msx_ch_reset_core (); @@ -156,14 +186,8 @@ public: optional_device<v9958_device> m_v9958; required_device<cassette_image_device> m_cassette; required_device<ay8910_device> m_ay8910; - required_device<ym2413_device> m_ym; - optional_device<k051649_device> m_k051649; required_device<dac_device> m_dac; optional_device<rp5c01_device> m_rtc; - optional_device<wd_fdc_analog_t> m_fdc; - optional_device<floppy_connector> m_floppy0; - optional_device<floppy_connector> m_floppy1; - floppy_image_device *m_floppy; DECLARE_FLOPPY_FORMATS(floppy_formats); DECLARE_READ8_MEMBER(msx_psg_port_a_r); @@ -180,34 +204,13 @@ public: TIMER_DEVICE_CALLBACK_MEMBER(msx2p_interrupt); DECLARE_WRITE8_MEMBER(msx_ay8910_w); void msx_memory_init(); - void msx_memory_set_carts(); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( msx_cart ); - DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( msx_cart ); DECLARE_WRITE_LINE_MEMBER(msx_vdp_interrupt); - // from msx_slot - DECLARE_READ8_MEMBER(konami_scc_bank5); - DECLARE_READ8_MEMBER(msx_diskrom_page1_r); - DECLARE_READ8_MEMBER(msx_diskrom_page2_r); - DECLARE_READ8_MEMBER(msx_diskrom2_page1_r); - DECLARE_READ8_MEMBER(msx_diskrom2_page2_r); - DECLARE_READ8_MEMBER(soundcartridge_scc); - DECLARE_READ8_MEMBER(soundcartridge_sccp); - - required_memory_bank m_bank1; - required_memory_bank m_bank2; - required_memory_bank m_bank3; - required_memory_bank m_bank4; - required_memory_bank m_bank5; - required_memory_bank m_bank6; - required_memory_bank m_bank7; - required_memory_bank m_bank8; - required_memory_bank m_bank9; - required_memory_bank m_bank10; - required_memory_bank m_bank11; - protected: + virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == 0) ? &m_switched_device_as_config : NULL; } + + address_space_config m_switched_device_as_config; required_memory_region m_region_maincpu; optional_memory_region m_region_kanji; required_ioport m_io_joy0; diff --git a/src/mess/includes/msx_slot.h b/src/mess/includes/msx_slot.h deleted file mode 100644 index e304cf8e857..00000000000 --- a/src/mess/includes/msx_slot.h +++ /dev/null @@ -1,215 +0,0 @@ -/***************************************************************************** - * - * includes/msx_slot.h - * - ****************************************************************************/ - -#ifndef MSX_SLOT_H_ -#define MSX_SLOT_H_ - - -enum { - MSX_LAYOUT_SLOT_ENTRY, - MSX_LAYOUT_LAST -}; - -struct msx_slot_layout { - int entry; - int type; - int slot_primary, slot_secondary, slot_page, page_extent; - int size, option; -}; - -#define MSX_LAYOUT_INIT(msx) \ -static const msx_slot_layout msx_slot_layout_##msx[] = { -#define MSX_LAYOUT_SLOT(prim, sec, page, extend, type, size, option) \ - { \ - MSX_LAYOUT_SLOT_ENTRY, \ - SLOT_##type, \ - prim, \ - sec, \ - page, \ - extend, \ - size, \ - option \ - }, - -#define MSX_LAYOUT_END \ - { \ - MSX_LAYOUT_LAST, \ - SLOT_END, \ - 0, \ - 0, \ - 0, \ - 0, \ - 0, \ - 0 \ - } \ -}; - - -enum msx_slot_type { - SLOT_EMPTY = 0, - SLOT_MSXDOS2, - SLOT_KONAMI_SCC, - SLOT_KONAMI, - SLOT_ASCII8, - SLOT_ASCII16, - SLOT_GAMEMASTER2, - SLOT_ASCII8_SRAM, - SLOT_ASCII16_SRAM, - SLOT_RTYPE, - SLOT_MAJUTSUSHI, - SLOT_FMPAC, - SLOT_SUPERLODERUNNER, - SLOT_SYNTHESIZER, - SLOT_CROSS_BLAIM, - SLOT_DISK_ROM, - SLOT_KOREAN_80IN1, - SLOT_KOREAN_126IN1, - SLOT_KOREAN_90IN1, - SLOT_LAST_CARTRIDGE_TYPE = SLOT_KOREAN_90IN1, - SLOT_SOUNDCARTRIDGE, - SLOT_ROM, - SLOT_RAM, - SLOT_RAM_MM, - SLOT_CARTRIDGE1, - SLOT_CARTRIDGE2, - SLOT_DISK_ROM2, - SLOT_END -}; - -enum msx_mem_type { - MSX_MEM_ROM, - MSX_MEM_RAM, - MSX_MEM_HANDLER -}; - -struct slot_state { - int m_type; - int m_start_page; - int m_bank_mask; - int m_banks[4]; - int m_size; - UINT8 *m_mem; - const char *m_sramfile; - union { - struct { - UINT8 *mem; - int sram_support; - int sram_active; - int opll_active; - } fmpac; - struct { - int active; - } scc; - struct { - UINT8 *mem; - int sram_mask; - int empty_mask; - } sram; - struct { - int scc_active; - int sccp_active; - int ram_mode[4]; - int banks_saved[4]; - int mode; - } sccp; - } m_cart; -}; - -struct msx_slot { - int slot_type; - int mem_type; - char name[32]; - int (*init)(running_machine &machine, slot_state*, int page, UINT8 *mem, int size); - void (*reset)(running_machine &machine, slot_state*); - void (*map)(running_machine &machine, slot_state*, int page); - void (*write)(running_machine &machine, slot_state*, UINT16, UINT8); - int (*loadsram)(running_machine &machine, slot_state*); - int (*savesram)(running_machine &machine, slot_state*); -}; - -extern const msx_slot msx_slot_list[]; - -#define MSX_SLOT_START \ -const msx_slot msx_slot_list[] = { -#define MSX_SLOT_ROM(type, ent) { \ - type, \ - MSX_MEM_ROM, \ - #type, \ - slot_##ent##_init, \ - slot_##ent##_reset, \ - slot_##ent##_map, \ - NULL, \ - NULL, \ - NULL \ -}, - -#define MSX_SLOT_RAM(type, ent) { \ - type, \ - MSX_MEM_RAM, \ - #type, \ - slot_##ent##_init, \ - slot_##ent##_reset, \ - slot_##ent##_map, \ - NULL, \ - NULL, \ - NULL \ -}, - -#define MSX_SLOT(type, ent) { \ - type, \ - MSX_MEM_HANDLER, \ - #type, \ - slot_##ent##_init, \ - slot_##ent##_reset, \ - slot_##ent##_map, \ - slot_##ent##_write, \ - NULL, \ - NULL \ -}, - -#define MSX_SLOT_SRAM(type, ent) { \ - type, \ - MSX_MEM_HANDLER, \ - #type, \ - slot_##ent##_init, \ - slot_##ent##_reset, \ - slot_##ent##_map, \ - slot_##ent##_write, \ - slot_##ent##_loadsram, \ - slot_##ent##_savesram \ -}, - -#define MSX_SLOT_NULL(type) { \ - type, \ - MSX_MEM_ROM, \ - #type, \ - NULL, \ - NULL, \ - NULL, \ - NULL, \ - NULL, \ - NULL \ -}, - -#define MSX_SLOT_END \ - { SLOT_END, 0, "", NULL, NULL, NULL, NULL, NULL } \ -}; - -#define MSX_SLOT_INIT(nm) static int \ - slot_##nm##_init (running_machine &machine, slot_state *state, int page, UINT8 *mem, int size) -#define MSX_SLOT_MAP(nm) \ - static void slot_##nm##_map (running_machine &machine, slot_state *state, int page) -#define MSX_SLOT_WRITE(nm) \ - static void slot_##nm##_write (running_machine &machine, slot_state *state, UINT16 addr, UINT8 val) -#define MSX_SLOT_RESET(nm) \ - static void slot_##nm##_reset (running_machine &machine, slot_state *state) -#define MSX_SLOT_LOADSRAM(nm) \ - static int slot_##nm##_loadsram (running_machine &machine, slot_state *state) -#define MSX_SLOT_SAVESRAM(nm) \ - static int slot_##nm##_savesram (running_machine &machine, slot_state *state) - - -#endif /* MSX_SLOT_H_ */ diff --git a/src/mess/machine/msx.c b/src/mess/machine/msx.c index c2c82e9f777..9b635c9fb2f 100644 --- a/src/mess/machine/msx.c +++ b/src/mess/machine/msx.c @@ -16,347 +16,9 @@ #define VERBOSE 0 -static int msx_probe_type (UINT8* pmem, int size) -{ - int kon4, kon5, asc8, asc16, i; - - if (size <= 0x10000) return 0; - - if ( (pmem[0x10] == 'Y') && (pmem[0x11] == 'Z') && (size > 0x18000) ) - return 6; - - kon4 = kon5 = asc8 = asc16 = 0; - - for (i=0;i<size-3;i++) - { - if (pmem[i] == 0x32 && pmem[i+1] == 0) - { - switch (pmem[i+2]) - { - case 0x60: - case 0x70: - asc16++; - asc8++; - break; - case 0x68: - case 0x78: - asc8++; - asc16--; - } - - switch (pmem[i+2]) - { - case 0x60: - case 0x80: - case 0xa0: - kon4++; - break; - case 0x50: - case 0x70: - case 0x90: - case 0xb0: - kon5++; - } - } - } - - if (MAX (kon4, kon5) > MAX (asc8, asc16) ) - return (kon5 > kon4) ? 2 : 3; - else - return (asc8 > asc16) ? 4 : 5; -} - -DEVICE_IMAGE_LOAD_MEMBER(msx_state,msx_cart) -{ - int size; - int size_aligned; - UINT8 *mem; - int type = -1; - astring extra; - char *sramfile; - slot_state *st; - int id = -1; - - if (strcmp(image.device().tag(),":cart1")==0) - id = 0; - - if (strcmp(image.device().tag(),":cart2")==0) - id = 1; - - if( id == -1 ) - { - //logerror ("error: invalid cart tag '%s'\n", image->tag); - return IMAGE_INIT_FAIL; - } - - if ( image.software_entry() != NULL ) - { - /* Load software from software list */ - /* TODO: Add proper SRAM (size) handling */ - - const char *mapper = image.get_feature("mapper"); - if (mapper != NULL) - { - static const struct { const char *mapper_name; int mapper_type; } mapper_types[] = - { - { "NOMAPPER", SLOT_EMPTY }, - { "M60002-0125SP", SLOT_ASCII8 }, - { "LZ93A13", SLOT_ASCII8 }, - { "NEOS MR6401", SLOT_ASCII8 }, - { "BS6202", SLOT_ASCII8 }, - { "BS6101", SLOT_ASCII8 }, - { "M60002-0125SP-16", SLOT_ASCII16 }, - { "LZ93A13-16", SLOT_ASCII16 }, - { "BS6101-16", SLOT_ASCII16 }, - { "MR6401", SLOT_ASCII16 }, - { "CROSS-BLAIM", SLOT_CROSS_BLAIM }, - { "GMASTER2", SLOT_GAMEMASTER2 }, - { "80IN1", SLOT_KOREAN_80IN1 }, - { "90IN1", SLOT_KOREAN_90IN1 }, - { "126IN1", SLOT_KOREAN_126IN1 }, - { "FM-PAC", SLOT_FMPAC }, - { "IREM TAM-S1", SLOT_RTYPE }, - { "KONAMI", SLOT_KONAMI }, - { "KONAMI-SCC", SLOT_KONAMI_SCC }, - { "SUPERLODE", SLOT_SUPERLODERUNNER }, - { "MAJUTSUSHI", SLOT_MAJUTSUSHI }, - { "DISK_ROM", SLOT_DISK_ROM }, - }; - - for (int i = 0; i < ARRAY_LENGTH(mapper_types) && type < 0; i++) - { - if (!core_stricmp(mapper, mapper_types[i].mapper_name)) - type = mapper_types[i].mapper_type; - } - - if (-1 == type) - logerror("Mapper '%s' not recognized!\n", mapper); - } - - UINT8 *tmp_sram = image.get_software_region("sram"); - if (tmp_sram) - { - if (type == SLOT_ASCII8) type = SLOT_ASCII8_SRAM; - if (type == SLOT_ASCII16) type = SLOT_ASCII16_SRAM; - } - - UINT8 *rom_region = image.get_software_region("rom"); - size = size_aligned = image.get_software_region_length("rom"); - - mem = auto_alloc_array(machine(), UINT8, size_aligned); - memcpy(mem, rom_region, size_aligned); - } - else - { - /* Old style image loading */ - - size = image.length (); - if (size < 0x2000) - { - logerror ("cart #%d: error: file is smaller than 2kb, too small to be true!\n", id); - return IMAGE_INIT_FAIL; - } - - /* allocate memory and load */ - size_aligned = 0x2000; - while (size_aligned < size) - size_aligned *= 2; - - mem = auto_alloc_array(machine(),UINT8,size_aligned); - if (!mem) - { - logerror ("cart #%d: error: failed to allocate memory for cartridge\n", id); - return IMAGE_INIT_FAIL; - } - - if (size < size_aligned) - memset (mem, 0xff, size_aligned); - - if (image.fread(mem, size) != size) - { - logerror ("cart #%d: %s: can't read full %d bytes\n", id, image.filename (), size); - return IMAGE_INIT_FAIL; - } - - /* see if msx.crc will tell us more */ - if (!hashfile_extrainfo(image, extra)) - { - logerror("cart #%d: warning: no information in crc file\n", id); - type = -1; - } - else - if ((1 != sscanf(extra.cstr(), "%d", &type) ) || type < 0 || type > SLOT_LAST_CARTRIDGE_TYPE) - { - logerror("cart #%d: warning: information in crc file not valid\n", id); - type = -1; - } - else - logerror ("cart #%d: info: cart extra info: '%s' = %s\n", id, extra.cstr(), msx_slot_list[type].name); - - /* if not, attempt autodetection */ - if (type < 0) - { - type = msx_probe_type (mem, size); - - if (mem[0] != 'A' || mem[1] != 'B') - logerror("cart #%d: %s: May not be a valid ROM file\n", id, image.filename ()); - - logerror("cart #%d: Probed cartridge mapper %d/%s\n", id, type, msx_slot_list[type].name); - } - } - - /* mapper type 0 always needs 64kB */ - if (!type && size_aligned != 0x10000) - { - UINT8 *old_mem = mem; - int old_size_aligned = size_aligned; - - size_aligned = 0x10000; - mem = auto_alloc_array(machine(),UINT8, 0x10000); - if (!mem) - { - auto_free(machine(),old_mem); - logerror ("cart #%d: error: cannot allocate memory\n", id); - return IMAGE_INIT_FAIL; - } - - if (size < 0x10000) - memset (mem + size, 0xff, 0x10000 - size); - - if (size > 0x10000) - { - logerror ("cart #%d: warning: rom truncated to 64kb due to mapperless type (possibly detected)\n", id); - - size = 0x10000; - } - - /* Copy old contents to newly claimed memory */ - memcpy(mem,old_mem,old_size_aligned); - auto_free(machine(),old_mem); - } - - /* mapper type 0 (ROM) might need moving around a bit */ - if (!type) - { - int i, page = 1; - - /* find the correct page */ - if (mem[0] == 'A' && mem[1] == 'B') - { - for (i=2; i<=8; i += 2) - { - if (mem[i] || mem[i+1]) - { - page = mem[i+1] / 0x40; - break; - } - } - } - - if (size <= 0x4000) - { - if (page == 1 || page == 2) - { - /* copy to the respective page */ - memcpy (mem + (page * 0x4000), mem, 0x4000); - memset (mem, 0xff, 0x4000); - } - else - { - /* memory is repeated 4 times */ - page = -1; - memcpy (mem + 0x4000, mem, 0x4000); - memcpy (mem + 0x8000, mem, 0x4000); - memcpy (mem + 0xc000, mem, 0x4000); - } - } - else /*if (size <= 0xc000) */ - { - if (page) - { - /* shift up 16kB; custom memcpy so overlapping memory isn't corrupted. ROM starts in page 1 (0x4000) */ - UINT8 *m; - - page = 1; - i = 0xc000; m = mem + 0xffff; - while (i--) - { - *m = *(m - 0x4000); - m--; - } - memset (mem, 0xff, 0x4000); - } - } - - if (page) - logerror ("cart #%d: info: rom in page %d\n", id, page); - else - logerror ("cart #%d: info: rom duplicted in all pages\n", id); - } - - /* kludge */ - if (type == 0) - type = SLOT_ROM; - - /* allocate and set slot_state for this cartridge */ - st = auto_alloc(machine(),slot_state); - if (!st) - { - logerror ("cart #%d: error: cannot allocate memory for cartridge state\n", id); - return IMAGE_INIT_FAIL; - } - memset (st, 0, sizeof (slot_state)); - - st->m_type = type; - sramfile = auto_alloc_array(machine(), char, strlen (image.filename ()) + 1); - - if (sramfile) - { - char *ext; - - strcpy (sramfile, image.basename ()); - ext = strrchr (sramfile, '.'); - if (ext) - *ext = 0; - - st->m_sramfile = sramfile; - } - - if (msx_slot_list[type].init (machine(), st, 0, mem, size_aligned)) - return IMAGE_INIT_FAIL; - - if (msx_slot_list[type].loadsram) - msx_slot_list[type].loadsram (machine(), st); - - m_cart_state[id] = st; - msx_memory_set_carts(); - - return IMAGE_INIT_PASS; -} - -DEVICE_IMAGE_UNLOAD_MEMBER(msx_state, msx_cart) -{ - int id = -1; - - if (strcmp(image.device().tag(),":cart1")==0) - id = 0; - - if (strcmp(image.device().tag(),":cart2")==0) - id = 1; - - if( id == -1 ) - { - //logerror ("error: invalid cart tag '%s'\n", image->tag); - return; - } - - if (msx_slot_list[m_cart_state[id]->m_type].savesram) - msx_slot_list[m_cart_state[id]->m_type].savesram (machine(), m_cart_state[id]); -} - WRITE_LINE_MEMBER(msx_state::msx_vdp_interrupt) { - m_maincpu->set_input_line(0, (state ? HOLD_LINE : CLEAR_LINE)); + m_maincpu->set_input_line(0, (state ? ASSERT_LINE : CLEAR_LINE)); } void msx_state::msx_ch_reset_core () @@ -373,7 +35,6 @@ MACHINE_START_MEMBER(msx_state,msx) MACHINE_START_MEMBER(msx_state,msx2) { m_port_c_old = 0xff; - m_dsk_stat = 0x3f; } MACHINE_RESET_MEMBER(msx_state,msx) @@ -612,16 +273,6 @@ WRITE8_MEMBER(msx_state::msx_psg_port_b_w) m_psg_b = data; } -WRITE8_MEMBER( msx_state::msx_fmpac_w ) -{ - if (m_opll_active) - { - if (offset == 1) - m_ym->write(space, 1, data); - else - m_ym->write(space, 0, data); - } -} /* ** RTC functions @@ -642,53 +293,6 @@ READ8_MEMBER( msx_state::msx_rtc_reg_r ) return m_rtc->read(space, m_rtc_latch); } -/* -From: erbo@xs4all.nl (erik de boer) - -sony and philips have used (almost) the same design -and this is the memory layout -but it is not a msx standard ! - -WD1793 or wd2793 registers - -address - -7FF8H read status register - write command register -7FF9H r/w track register (r/o on NMS 8245 and Sony) -7FFAH r/w sector register (r/o on NMS 8245 and Sony) -7FFBH r/w data register - - -hardware registers - -address - -7FFCH r/w bit 0 side select -7FFDH r/w b7>M-on , b6>in-use , b1>ds1 , b0>ds0 (all neg. logic) -7FFEH not used -7FFFH read b7>drq , b6>intrq - -set on 7FFDH bit 2 always to 0 (some use it as disk change reset) - -*/ - -WRITE_LINE_MEMBER( msx_state::msx_wd179x_intrq_w ) -{ - if (state) - m_dsk_stat &= ~0x40; - else - m_dsk_stat |= 0x40; -} - -WRITE_LINE_MEMBER( msx_state::msx_wd179x_drq_w ) -{ - if (state) - m_dsk_stat &= ~0x80; - else - m_dsk_stat |= 0x80; -} - /* ** The PPI functions @@ -705,7 +309,7 @@ WRITE8_MEMBER( msx_state::msx_ppi_port_a_w ) WRITE8_MEMBER( msx_state::msx_ppi_port_c_w ) { - keylatch = data & 0x0f; + m_keylatch = data & 0x0f; /* caps lock */ if ( BIT(m_port_c_old ^ data, 6) ) @@ -732,7 +336,7 @@ READ8_MEMBER( msx_state::msx_ppi_port_b_r ) int row, data; ioport_port *keynames[] = { m_io_key0, m_io_key1, m_io_key2, m_io_key3, m_io_key4, m_io_key5 }; - row = keylatch; + row = m_keylatch; if (row <= 10) { data = keynames[row / 2]->read(); @@ -750,198 +354,65 @@ READ8_MEMBER( msx_state::msx_ppi_port_b_r ) * ***********************************************************************/ -void msx_state::msx_memory_init() +void msx_state::install_slot_pages(device_t &owner, UINT8 prim, UINT8 sec, UINT8 page, UINT8 numpages, device_t *device) { - int prim, sec, page, extent, option; - int size = 0; - const msx_slot_layout *layout= (msx_slot_layout*)NULL; - const msx_slot *slot; - slot_state *st; - UINT8 *mem = NULL; - - if ( m_layout == NULL ) { - fatalerror("No msx slot layout defined for this system!\n"); - } + msx_state &msx = downcast<msx_state &>(owner); + msx_internal_slot_interface *internal_slot = dynamic_cast<msx_internal_slot_interface *>(device); - m_empty = auto_alloc_array(machine(), UINT8, 0x4000); - memset (m_empty, 0xff, 0x4000); - - for (prim=0; prim<4; prim++) { - for (sec=0; sec<4; sec++) { - for (page=0; page<4; page++) { - m_all_state[prim][sec][page]= (slot_state*)NULL; - } - } + for ( int i = page; i < MIN(page + numpages, 4); i++ ) + { + msx.m_all_slots[prim][sec][i] = internal_slot; } - - for (layout = m_layout; layout->entry != MSX_LAYOUT_LAST; layout++) { - switch (layout->entry) { - case MSX_LAYOUT_SLOT_ENTRY: - prim = layout->slot_primary; - sec = layout->slot_secondary; - page = layout->slot_page; - extent = layout->page_extent; - - if (layout->slot_secondary) { - m_slot_expanded[layout->slot_primary]= TRUE; - } - - slot = &msx_slot_list[layout->type]; - if (slot->slot_type != layout->type) { - logerror ("internal error: msx_slot_list[%d].type != %d\n", - slot->slot_type, slot->slot_type); - } - - size = layout->size; - option = layout->option; - - if (layout->type != SLOT_CARTRIDGE1 && layout->type != SLOT_CARTRIDGE2) - { - int size_tmp = 0; - if (size < 0x4000) - size_tmp = 0x4000; - else if (size > 0x10000) - size_tmp = 0x10000; - else - size_tmp = size; - int extent_tmp = size_tmp / 0x4000; - if (extent_tmp != extent) - fatalerror("incorrect MSX_LAYOUT_SLOT configuration - expected extent %d but found %d\n", extent, extent_tmp); - } - - if (VERBOSE) - { - logerror ("slot %d/%d/%d-%d: type %s, size 0x%x\n", - prim, sec, page, page + extent - 1, slot->name, size); - } - - st = (slot_state*)NULL; - if (layout->type == SLOT_CARTRIDGE1) { - st = m_cart_state[0]; - if (!st) { - slot = &msx_slot_list[SLOT_SOUNDCARTRIDGE]; - size = 0x20000; - } - } - if (layout->type == SLOT_CARTRIDGE2) { - st = m_cart_state[1]; - if (!st) { - /* Check whether the optional FM-PAC rom is present */ - option = 0x10000; - size = 0x10000; - mem = m_region_maincpu->base() + option; - if (m_region_maincpu->bytes() >= size + option && mem[0] == 'A' && mem[1] == 'B') { - slot = &msx_slot_list[SLOT_FMPAC]; - } - else { - slot = &msx_slot_list[SLOT_EMPTY]; - } - } - } - - if (!st) { - switch (slot->mem_type) { - case MSX_MEM_HANDLER: - case MSX_MEM_ROM: - mem = m_region_maincpu->base() + option; - break; - case MSX_MEM_RAM: - mem = NULL; - break; - } - st = auto_alloc_clear (machine(), slot_state); - memset (st, 0, sizeof (slot_state)); - - if (slot->init (machine(), st, layout->slot_page, mem, size)) { - continue; - } - } - - while (extent--) { - if (page > 3) { - logerror ("internal error: msx_slot_layout wrong, " - "page + extent > 3\n"); - break; - } - m_all_state[prim][sec][page] = st; - page++; - } - break; - } + if ( sec ) + { + msx.m_slot_expanded[prim] = true; } } -void msx_state::msx_memory_reset () +void msx_state::msx_memory_init() { - slot_state *st, *last_st = (slot_state*)NULL; - int prim, sec, page; - - m_primary_slot = 0; + int count_populated_pages = 0; - for (prim=0; prim<4; prim++) + // Populate all unpopulated slots with the dummy interface + for ( int prim = 0; prim < 4; prim++ ) { - m_secondary_slot[prim] = 0; - for (sec=0; sec<4; sec++) + for ( int sec = 0; sec < 4; sec++ ) { - for (page=0; page<4; page++) + for ( int page = 0; page < 4; page++ ) { - st = m_all_state[prim][sec][page]; - if (st && st != last_st) - msx_slot_list[st->m_type].reset (machine(), st); - last_st = st; + if ( m_all_slots[prim][sec][page] == NULL ) + { + m_all_slots[prim][sec][page] = &m_empty_slot; + } + else + { + count_populated_pages++; + } } } } + + if ( count_populated_pages == 0 ) { + fatalerror("No msx slot layout defined for this system!\n"); + } } -void msx_state::msx_memory_set_carts() +void msx_state::msx_memory_reset () { - const msx_slot_layout *layout; - int page; - - if (!m_layout) - return; + m_primary_slot = 0; - for (layout = m_layout; layout->entry != MSX_LAYOUT_LAST; layout++) + for (int prim=0; prim<4; prim++) { - if (layout->entry == MSX_LAYOUT_SLOT_ENTRY) - { - switch (layout->type) - { - case SLOT_CARTRIDGE1: - for (page=0; page<4; page++) - m_all_state[layout->slot_primary][layout->slot_secondary][page] - = m_cart_state[0]; - break; - case SLOT_CARTRIDGE2: - for (page=0; page<4; page++) - m_all_state[layout->slot_primary][layout->slot_secondary][page] - = m_cart_state[1]; - break; - } - } + m_secondary_slot[prim] = 0; } } void msx_state::msx_memory_map_page (UINT8 page) { - int slot_primary; - int slot_secondary; - slot_state *st; - const msx_slot *slot; - - slot_primary = (m_primary_slot >> (page * 2)) & 3; - slot_secondary = (m_secondary_slot[slot_primary] >> (page * 2)) & 3; + int slot_primary = (m_primary_slot >> (page * 2)) & 3; + int slot_secondary = (m_secondary_slot[slot_primary] >> (page * 2)) & 3; - st = m_all_state[slot_primary][slot_secondary][page]; - slot = st ? &msx_slot_list[st->m_type] : &msx_slot_list[SLOT_EMPTY]; - m_state[page] = st; - m_slot[page] = slot; - - if (VERBOSE) - logerror ("mapping %s in %d/%d/%d\n", slot->name, slot_primary, slot_secondary, page); - - slot->map (machine(), st, page); + m_current_page[page] = m_all_slots[slot_primary][slot_secondary][page]; } void msx_state::msx_memory_map_all () @@ -950,94 +421,14 @@ void msx_state::msx_memory_map_all () msx_memory_map_page (i); } -WRITE8_MEMBER( msx_state::msx_page0_w ) -{ - if ( offset == 0 ) - { - m_superloderunner_bank = data; - if (m_slot[2]->slot_type == SLOT_SUPERLODERUNNER) - m_slot[2]->map (machine(), m_state[2], 2); - } - - switch (m_slot[0]->mem_type) - { - case MSX_MEM_RAM: - m_ram_pages[0][offset] = data; - break; - case MSX_MEM_HANDLER: - m_slot[0]->write (machine(), m_state[0], offset, data); - } -} - -WRITE8_MEMBER( msx_state::msx_page0_1_w ) +READ8_MEMBER( msx_state::msx_mem_read ) { - msx_page0_w( space, 0x2000 + offset, data ); + return m_current_page[offset >> 14]->read(space, offset); } -WRITE8_MEMBER( msx_state::msx_page1_w ) +WRITE8_MEMBER( msx_state::msx_mem_write ) { - switch (m_slot[1]->mem_type) - { - case MSX_MEM_RAM: - m_ram_pages[1][offset] = data; - break; - case MSX_MEM_HANDLER: - m_slot[1]->write (machine(), m_state[1], 0x4000 + offset, data); - } -} - -WRITE8_MEMBER( msx_state::msx_page1_1_w ) -{ - msx_page1_w( space, 0x2000 + offset, data ); -} - -WRITE8_MEMBER( msx_state::msx_page1_2_w ) -{ - msx_page1_w( space, 0x3ff8 + offset, data ); -} - -WRITE8_MEMBER( msx_state::msx_page2_w ) -{ - switch (m_slot[2]->mem_type) - { - case MSX_MEM_RAM: - m_ram_pages[2][offset] = data; - break; - case MSX_MEM_HANDLER: - m_slot[2]->write (machine(), m_state[2], 0x8000 + offset, data); - } -} - -WRITE8_MEMBER( msx_state::msx_page2_1_w ) -{ - msx_page2_w( space, 0x1800 + offset, data ); -} - -WRITE8_MEMBER( msx_state::msx_page2_2_w ) -{ - msx_page2_w( space, 0x2000 + offset, data ); -} - -WRITE8_MEMBER( msx_state::msx_page2_3_w ) -{ - msx_page2_w( space, 0x3800 + offset, data ); -} - -WRITE8_MEMBER( msx_state::msx_page3_w ) -{ - switch (m_slot[3]->mem_type) - { - case MSX_MEM_RAM: - m_ram_pages[3][offset] = data; - break; - case MSX_MEM_HANDLER: - m_slot[3]->write (machine(), m_state[3], 0xc000 + offset, data); - } -} - -WRITE8_MEMBER( msx_state::msx_page3_1_w ) -{ - msx_page3_w( space, 0x2000 + offset, data ); + m_current_page[offset >> 14]->write(space, offset, data); } WRITE8_MEMBER( msx_state::msx_sec_slot_w ) @@ -1052,42 +443,21 @@ WRITE8_MEMBER( msx_state::msx_sec_slot_w ) msx_memory_map_all (); } else - msx_page3_w(space, 0x3fff, data); + m_current_page[3]->write(space, 0xffff, data); } READ8_MEMBER( msx_state::msx_sec_slot_r ) { - UINT8 result; int slot = m_primary_slot >> 6; if (m_slot_expanded[slot]) - result = ~m_secondary_slot[slot]; + { + return ~m_secondary_slot[slot]; + } else - result = m_top_page[0x1fff]; - - return result; -} - -WRITE8_MEMBER( msx_state::msx_ram_mapper_w ) -{ - m_ram_mapper[offset] = data; - if (m_slot[offset]->slot_type == SLOT_RAM_MM) - m_slot[offset]->map (machine(), m_state[offset], offset); -} - -READ8_MEMBER( msx_state::msx_ram_mapper_r ) -{ - return m_ram_mapper[offset] | m_ramio_set_bits; -} - -WRITE8_MEMBER( msx_state::msx_90in1_w ) -{ - m_korean90in1_bank = data; - if (m_slot[1]->slot_type == SLOT_KOREAN_90IN1) - m_slot[1]->map (machine(), m_state[1], 1); - - if (m_slot[2]->slot_type == SLOT_KOREAN_90IN1) - m_slot[2]->map (machine(), m_state[2], 2); + { + return m_current_page[3]->read(space, 0xffff); + } } READ8_MEMBER( msx_state::msx_kanji_r ) @@ -1112,3 +482,24 @@ WRITE8_MEMBER( msx_state::msx_kanji_w ) else m_kanji_latch = (m_kanji_latch & 0x1f800) | ((data & 0x3f) << 5); } + +READ8_MEMBER( msx_state::msx_switched_r ) +{ + // Read from selected switched device + return this->space().read_byte( (m_current_switched_device << 8) | offset ); +} + +WRITE8_MEMBER( msx_state::msx_switched_w ) +{ + if (offset == 0) + { + // Select switched device + m_current_switched_device = data; + } + else + { + // Write to selected switched device + this->space().write_byte( (m_current_switched_device << 8) | offset, data ); + } +} + diff --git a/src/mess/machine/msx_slot.c b/src/mess/machine/msx_slot.c deleted file mode 100644 index a5ae53997a8..00000000000 --- a/src/mess/machine/msx_slot.c +++ /dev/null @@ -1,2510 +0,0 @@ -/* - * msx_slot.c : definitions of the different slots - * - * Copyright (C) 2004 Sean Young - * - * Missing: - * - Holy Qu'ran - * like ascii8, with switch address 5000h/5400h/5800h/5c00h, not working. - * - Harry Fox - * 16kb banks, 6000h and 7000h switch address; isn't it really an ascii16? - * - Halnote - * writes to page 0? - * - Playball - * Unemulated D7756C, same as src/drivers/homerun.c - * - Some ascii8 w/ sram need 32kb sram? - * - MegaRAM - * - fmsx painter.rom - */ - -#include "emu.h" -#include "emuopts.h" -#include "machine/i8255.h" -#include "includes/msx_slot.h" -#include "includes/msx.h" -#include "sound/k051649.h" -#include "sound/2413intf.h" -#include "sound/dac.h" -#include "sound/ay8910.h" - -static void msx_cpu_setbank (running_machine &machine, int page, UINT8 *mem) -{ - msx_state *state = machine.driver_data<msx_state>(); - address_space &space = state->m_maincpu->space(AS_PROGRAM); - switch (page) - { - case 1: - state->m_bank1->set_base (mem); - break; - case 2: - state->m_bank2->set_base (mem); - break; - case 3: - state->m_bank3->set_base (mem); - break; - case 4: - state->m_bank4->set_base (mem); - state->m_bank5->set_base (mem + 0x1ff8); - space.install_read_bank(0x7ff8, 0x7fff, "bank5"); - break; - case 5: - state->m_bank6->set_base (mem); - state->m_bank7->set_base (mem + 0x1800); - space.install_read_bank(0x9800, 0x9fff, "bank7"); - break; - case 6: - state->m_bank8->set_base (mem); - state->m_bank9->set_base (mem + 0x1800); - space.install_read_bank(0xb800, 0xbfff, "bank9"); - break; - case 7: - state->m_bank10->set_base (mem); - break; - case 8: - state->m_bank11->set_base (mem); - state->m_top_page = mem; - break; - } -} - -MSX_SLOT_INIT(empty) -{ - state->m_type = SLOT_EMPTY; - - return 0; -} - -MSX_SLOT_RESET(empty) -{ - /* reset void */ -} - -MSX_SLOT_MAP(empty) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - msx_cpu_setbank (machine, page * 2 + 1, drvstate->m_empty); - msx_cpu_setbank (machine, page * 2 + 2, drvstate->m_empty); -} - -MSX_SLOT_INIT(rom) -{ - state->m_type = SLOT_ROM; - state->m_mem = mem; - state->m_size = size; - state->m_start_page = page; - - return 0; -} - -MSX_SLOT_RESET(rom) -{ - /* state-less */ -} - -MSX_SLOT_MAP(rom) -{ - UINT8 *mem = state->m_mem + (page - state->m_start_page) * 0x4000; - - msx_cpu_setbank (machine, page * 2 + 1, mem); - msx_cpu_setbank (machine, page * 2 + 2, mem + 0x2000); -} - -MSX_SLOT_INIT(ram) -{ - state->m_mem = auto_alloc_array(machine, UINT8, size); - memset (state->m_mem, 0, size); - state->m_type = SLOT_RAM; - state->m_start_page = page; - state->m_size = size; - - return 0; -} - -MSX_SLOT_MAP(ram) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - UINT8 *mem = state->m_mem + (page - state->m_start_page) * 0x4000; - - drvstate->m_ram_pages[page] = mem; - msx_cpu_setbank (machine, page * 2 + 1, mem); - msx_cpu_setbank (machine, page * 2 + 2, mem + 0x2000); -} - -MSX_SLOT_RESET(ram) -{ -} - -MSX_SLOT_INIT(rammm) -{ - int i, mask, nsize; - - nsize = 0x10000; /* 64 kb */ - mask = 3; - for (i=0; i<6; i++) - { - if (size == nsize) - { - break; - } - mask = (mask << 1) | 1; - nsize <<= 1; - } - if (i == 6) - { - logerror ("ram mapper: error: must be 64kb, 128kb, 256kb, 512kb, " - "1mb, 2mb or 4mb\n"); - return 1; - } - state->m_mem = auto_alloc_array(machine, UINT8, size); - memset (state->m_mem, 0, size); - - state->m_type = SLOT_RAM_MM; - state->m_start_page = page; - state->m_size = size; - state->m_bank_mask = mask; - - return 0; -} - -MSX_SLOT_RESET(rammm) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - int i; - - for (i=0; i<4; i++) - { - drvstate->m_ram_mapper[i] = 3 - i; - } -} - -MSX_SLOT_MAP(rammm) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - UINT8 *mem = state->m_mem + - 0x4000 * (drvstate->m_ram_mapper[page] & state->m_bank_mask); - - drvstate->m_ram_pages[page] = mem; - msx_cpu_setbank (machine, page * 2 + 1, mem); - msx_cpu_setbank (machine, page * 2 + 2, mem + 0x2000); -} - -MSX_SLOT_INIT(msxdos2) -{ - if (size != 0x10000) - { - logerror ("msxdos2: error: rom file must be 64kb\n"); - return 1; - } - state->m_type = SLOT_MSXDOS2; - state->m_mem = mem; - state->m_size = size; - - return 0; -} - -MSX_SLOT_RESET(msxdos2) -{ - state->m_banks[0] = 0; -} - -MSX_SLOT_MAP(msxdos2) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - if (page != 1) - { - msx_cpu_setbank (machine, page * 2 + 1, drvstate->m_empty); - msx_cpu_setbank (machine, page * 2 + 2, drvstate->m_empty); - } - else - { - msx_cpu_setbank (machine, 3, state->m_mem + state->m_banks[0] * 0x4000); - msx_cpu_setbank (machine, 4, state->m_mem + state->m_banks[0] * 0x4000 + 0x2000); - } -} - -MSX_SLOT_WRITE(msxdos2) -{ - if (addr == 0x6000) - { - state->m_banks[0] = val & 3; - slot_msxdos2_map (machine, state, 1); - } -} - -MSX_SLOT_INIT(konami) -{ - int banks; - - if (size > 0x200000) - { - logerror ("konami: warning: truncating to 2mb\n"); - size = 0x200000; - } - banks = size / 0x2000; - if (size != banks * 0x2000 || (~(banks - 1) % banks)) - { - logerror ("konami: error: must be a 2 power of 8kb\n"); - return 1; - } - state->m_type = SLOT_KONAMI; - state->m_mem = mem; - state->m_size = size; - state->m_bank_mask = banks - 1; - - return 0; -} - -MSX_SLOT_RESET(konami) -{ - int i; - - for (i=0; i<4; i++) state->m_banks[i] = i; -} - -MSX_SLOT_MAP(konami) -{ - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, state->m_mem); - msx_cpu_setbank (machine, 2, state->m_mem + state->m_banks[1] * 0x2000); - break; - case 1: - msx_cpu_setbank (machine, 3, state->m_mem); - msx_cpu_setbank (machine, 4, state->m_mem + state->m_banks[1] * 0x2000); - break; - case 2: - msx_cpu_setbank (machine, 5, state->m_mem + state->m_banks[2] * 0x2000); - msx_cpu_setbank (machine, 6, state->m_mem + state->m_banks[3] * 0x2000); - break; - case 3: - msx_cpu_setbank (machine, 7, state->m_mem + state->m_banks[2] * 0x2000); - msx_cpu_setbank (machine, 8, state->m_mem + state->m_banks[3] * 0x2000); - } -} - -MSX_SLOT_WRITE(konami) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - switch (addr) - { - case 0x6000: - state->m_banks[1] = val & state->m_bank_mask; - slot_konami_map (machine, state, 1); - if (drvstate->m_state[0] == state) - { - slot_konami_map (machine, state, 0); - } - break; - case 0x8000: - state->m_banks[2] = val & state->m_bank_mask; - slot_konami_map (machine, state, 2); - if (drvstate->m_state[3] == state) - { - slot_konami_map (machine, state, 3); - } - break; - case 0xa000: - state->m_banks[3] = val & state->m_bank_mask; - slot_konami_map (machine, state, 2); - if (drvstate->m_state[3] == state) - { - slot_konami_map (machine, state, 3); - } - } -} - -MSX_SLOT_INIT(konami_scc) -{ - int banks; - - if (size > 0x200000) - { - logerror ("konami_scc: warning: truncating to 2mb\n"); - size = 0x200000; - } - banks = size / 0x2000; - if (size != banks * 0x2000 || (~(banks - 1) % banks)) - { - logerror ("konami_scc: error: must be a 2 power of 8kb\n"); - return 1; - } - - state->m_type = SLOT_KONAMI_SCC; - state->m_mem = mem; - state->m_size = size; - state->m_bank_mask = banks - 1; - - return 0; -} - -MSX_SLOT_RESET(konami_scc) -{ - int i; - - for (i=0; i<4; i++) state->m_banks[i] = i; - state->m_cart.scc.active = 0; -} - -READ8_MEMBER(msx_state::konami_scc_bank5) -{ - if (offset & 0x80) - { - if ((offset & 0xff) >= 0xe0) - { - return m_k051649->k051649_test_r(space, offset & 0xff); - } - return 0xff; - } - else - { - return m_k051649->k051649_waveform_r(space, offset & 0x7f); - } -} - -MSX_SLOT_MAP(konami_scc) -{ - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, state->m_mem + state->m_banks[2] * 0x2000); - msx_cpu_setbank (machine, 2, state->m_mem + state->m_banks[3] * 0x2000); - break; - case 1: - msx_cpu_setbank (machine, 3, state->m_mem + state->m_banks[0] * 0x2000); - msx_cpu_setbank (machine, 4, state->m_mem + state->m_banks[1] * 0x2000); - break; - case 2: - msx_cpu_setbank (machine, 5, state->m_mem + state->m_banks[2] * 0x2000); - msx_cpu_setbank (machine, 6, state->m_mem + state->m_banks[3] * 0x2000); - if (state->m_cart.scc.active ) { - msx_state *drvstate = machine.driver_data<msx_state>(); - drvstate->m_maincpu->space(AS_PROGRAM).install_read_handler(0x9800, 0x9fff, read8_delegate(FUNC(msx_state::konami_scc_bank5),drvstate)); - } else { - msx_state *drvstate = machine.driver_data<msx_state>(); - drvstate->m_maincpu->space(AS_PROGRAM).install_read_bank(0x9800, 0x9fff,"bank7"); - } - break; - case 3: - msx_cpu_setbank (machine, 7, state->m_mem + state->m_banks[0] * 0x2000); - msx_cpu_setbank (machine, 8, state->m_mem + state->m_banks[1] * 0x2000); - } -} - -MSX_SLOT_WRITE(konami_scc) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - address_space &space = drvstate->m_maincpu->space(AS_PROGRAM); - if (addr >= 0x5000 && addr < 0x5800) - { - state->m_banks[0] = val & state->m_bank_mask; - slot_konami_scc_map (machine, state, 1); - if (drvstate->m_state[3] == state) - { - slot_konami_scc_map (machine, state, 3); - } - } - else if (addr >= 0x7000 && addr < 0x7800) - { - state->m_banks[1] = val & state->m_bank_mask; - slot_konami_scc_map (machine, state, 1); - if (drvstate->m_state[3] == state) - { - slot_konami_scc_map (machine, state, 3); - } - } - else if (addr >= 0x9000 && addr < 0x9800) - { - state->m_banks[2] = val & state->m_bank_mask; - state->m_cart.scc.active = ((val & 0x3f) == 0x3f); - slot_konami_scc_map (machine, state, 2); - if (drvstate->m_state[0] == state) - { - slot_konami_scc_map (machine, state, 0); - } - } - else if (state->m_cart.scc.active && addr >= 0x9800 && addr < 0xa000) - { - int offset = addr & 0xff; - - if (offset < 0x80) - { - drvstate->m_k051649->k051649_waveform_w (space, offset, val); - } - else if (offset < 0xa0) - { - offset &= 0xf; - if (offset < 0xa) - { - drvstate->m_k051649->k051649_frequency_w (space, offset, val); - } - else if (offset < 0xf) - { - drvstate->m_k051649->k051649_volume_w (space, offset - 0xa, val); - } - else - { - drvstate->m_k051649->k051649_keyonoff_w (space, 0, val); - } - } - else if (offset >= 0xe0) - { - drvstate->m_k051649->k051649_test_w (space, offset, val); - } - } - else if (addr >= 0xb000 && addr < 0xb800) - { - state->m_banks[3] = val & state->m_bank_mask; - slot_konami_scc_map (machine, state, 2); - if (drvstate->m_state[0] == state) - { - slot_konami_scc_map (machine, state, 0); - } - } -} - -MSX_SLOT_INIT(ascii8) -{ - int banks; - - if (size > 0x200000) - { - logerror ("ascii8: warning: truncating to 2mb\n"); - size = 0x200000; - } - banks = size / 0x2000; - if (size != banks * 0x2000 || (~(banks - 1) % banks)) - { - logerror ("ascii8: error: must be a 2 power of 8kb\n"); - return 1; - } - state->m_type = SLOT_ASCII8; - state->m_mem = mem; - state->m_size = size; - state->m_bank_mask = banks - 1; - - return 0; -} - -MSX_SLOT_RESET(ascii8) -{ - int i; - - for (i=0; i<4; i++) state->m_banks[i] = 0; -} - -MSX_SLOT_MAP(ascii8) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - break; - case 1: - msx_cpu_setbank (machine, 3, state->m_mem + state->m_banks[0] * 0x2000); - msx_cpu_setbank (machine, 4, state->m_mem + state->m_banks[1] * 0x2000); - break; - case 2: - msx_cpu_setbank (machine, 5, state->m_mem + state->m_banks[2] * 0x2000); - msx_cpu_setbank (machine, 6, state->m_mem + state->m_banks[3] * 0x2000); - break; - case 3: - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - } -} - -MSX_SLOT_WRITE(ascii8) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - int bank; - - if (addr >= 0x6000 && addr < 0x8000) - { - bank = (addr / 0x800) & 3; - - state->m_banks[bank] = val & state->m_bank_mask; - if (bank <= 1) - { - slot_ascii8_map (machine, state, 1); - } - else if (drvstate->m_state[2] == state) - { - slot_ascii8_map (machine, state, 2); - } - } -} - -MSX_SLOT_INIT(ascii16) -{ - int banks; - - if (size > 0x400000) - { - logerror ("ascii16: warning: truncating to 4mb\n"); - size = 0x400000; - } - banks = size / 0x4000; - if (size != banks * 0x4000 || (~(banks - 1) % banks)) - { - logerror ("ascii16: error: must be a 2 power of 16kb\n"); - return 1; - } - - state->m_type = SLOT_ASCII16; - state->m_mem = mem; - state->m_size = size; - state->m_bank_mask = banks - 1; - - return 0; -} - -MSX_SLOT_RESET(ascii16) -{ - int i; - - for (i=0; i<2; i++) state->m_banks[i] = 0; -} - -MSX_SLOT_MAP(ascii16) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - UINT8 *mem; - - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - break; - case 1: - mem = state->m_mem + state->m_banks[0] * 0x4000; - msx_cpu_setbank (machine, 3, mem); - msx_cpu_setbank (machine, 4, mem + 0x2000); - break; - case 2: - mem = state->m_mem + state->m_banks[1] * 0x4000; - msx_cpu_setbank (machine, 5, mem); - msx_cpu_setbank (machine, 6, mem + 0x2000); - break; - case 3: - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - } -} - -MSX_SLOT_WRITE(ascii16) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - if (addr >= 0x6000 && addr < 0x6800) - { - state->m_banks[0] = val & state->m_bank_mask; - slot_ascii16_map (machine, state, 1); - } - else if (addr >= 0x7000 && addr < 0x7800) - { - state->m_banks[1] = val & state->m_bank_mask; - if (drvstate->m_state[2] == state) - { - slot_ascii16_map (machine, state, 2); - } - } -} - -MSX_SLOT_INIT(ascii8_sram) -{ - static const char sramfile[] = "ascii8"; - int banks; - - state->m_cart.sram.mem = auto_alloc_array(machine, UINT8, 0x2000); - if (size > 0x100000) - { - logerror ("ascii8_sram: warning: truncating to 1mb\n"); - size = 0x100000; - } - banks = size / 0x2000; - if (size != banks * 0x2000 || (~(banks - 1) % banks)) - { - logerror ("ascii8_sram: error: must be a 2 power of 8kb\n"); - return 1; - } - memset (state->m_cart.sram.mem, 0, 0x2000); - state->m_type = SLOT_ASCII8_SRAM; - state->m_mem = mem; - state->m_size = size; - state->m_bank_mask = banks - 1; - state->m_cart.sram.sram_mask = banks; - state->m_cart.sram.empty_mask = ~(banks | (banks - 1)); - if (!state->m_sramfile) - { - state->m_sramfile = sramfile; - } - - return 0; -} - -MSX_SLOT_RESET(ascii8_sram) -{ - int i; - - for (i=0; i<4; i++) state->m_banks[i] = 0; -} - -static UINT8 *ascii8_sram_bank_select (msx_state *drvstate, slot_state *state, int bankno) -{ - int bank = state->m_banks[bankno]; - - if (bank & state->m_cart.sram.empty_mask) - { - return drvstate->m_empty; - } - else if (bank & state->m_cart.sram.sram_mask) - { - return state->m_cart.sram.mem; - } - else - { - return state->m_mem + (bank & state->m_bank_mask) * 0x2000; - } -} - -MSX_SLOT_MAP(ascii8_sram) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - break; - case 1: - msx_cpu_setbank (machine, 3, ascii8_sram_bank_select (drvstate, state, 0)); - msx_cpu_setbank (machine, 4, ascii8_sram_bank_select (drvstate, state, 1)); - break; - case 2: - msx_cpu_setbank (machine, 5, ascii8_sram_bank_select (drvstate, state, 2)); - msx_cpu_setbank (machine, 6, ascii8_sram_bank_select (drvstate, state, 3)); - break; - case 3: - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - } -} - -MSX_SLOT_WRITE(ascii8_sram) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - int bank; - - if (addr >= 0x6000 && addr < 0x8000) - { - bank = (addr / 0x800) & 3; - - state->m_banks[bank] = val; - if (bank <= 1) - { - slot_ascii8_sram_map (machine, state, 1); - } - else if (drvstate->m_state[2] == state) - { - slot_ascii8_sram_map (machine, state, 2); - } - } - if (addr >= 0x8000 && addr < 0xc000) - { - bank = addr < 0xa000 ? 2 : 3; - if (!(state->m_banks[bank] & state->m_cart.sram.empty_mask) && - (state->m_banks[bank] & state->m_cart.sram.sram_mask)) - { - state->m_cart.sram.mem[addr & 0x1fff] = val; - } - } -} - -MSX_SLOT_LOADSRAM(ascii8_sram) -{ - if (!state->m_sramfile) - { - logerror ("ascii8_sram: error: no sram filename provided\n"); - return 1; - } - emu_file f(machine.options().nvram_directory(), OPEN_FLAG_READ); - file_error filerr = f.open(state->m_sramfile); - if (filerr == FILERR_NONE) - { - if (f.read(state->m_cart.sram.mem, 0x2000) == 0x2000) - { - logerror ("ascii8_sram: info: sram loaded\n"); - return 0; - } - memset (state->m_cart.sram.mem, 0, 0x2000); - logerror ("ascii8_sram: warning: could not read sram file\n"); - return 1; - } - - logerror ("ascii8_sram: warning: could not open sram file for reading\n"); - - return 1; -} - -MSX_SLOT_SAVESRAM(ascii8_sram) -{ - if (!state->m_sramfile) - { - return 0; - } - - emu_file f(machine.options().nvram_directory(), OPEN_FLAG_WRITE); - file_error filerr = f.open(state->m_sramfile); - if (filerr == FILERR_NONE) - { - f.write(state->m_cart.sram.mem, 0x2000); - logerror ("ascii8_sram: info: sram saved\n"); - - return 0; - } - - logerror ("ascii8_sram: warning: could not open sram file for saving\n"); - - return 1; -} - -MSX_SLOT_INIT(ascii16_sram) -{ - static const char sramfile[] = "ascii16"; - int banks; - - state->m_cart.sram.mem = auto_alloc_array(machine, UINT8, 0x4000); - - if (size > 0x200000) - { - logerror ("ascii16_sram: warning: truncating to 2mb\n"); - size = 0x200000; - } - banks = size / 0x4000; - if (size != banks * 0x4000 || (~(banks - 1) % banks)) - { - logerror ("ascii16_sram: error: must be a 2 power of 16kb\n"); - return 1; - } - - memset (state->m_cart.sram.mem, 0, 0x4000); - state->m_type = SLOT_ASCII16_SRAM; - state->m_mem = mem; - state->m_size = size; - state->m_bank_mask = banks - 1; - state->m_cart.sram.sram_mask = banks; - state->m_cart.sram.empty_mask = ~(banks | (banks - 1)); - if (!state->m_sramfile) - { - state->m_sramfile = sramfile; - } - - return 0; -} - -MSX_SLOT_RESET(ascii16_sram) -{ - int i; - - for (i=0; i<2; i++) state->m_banks[i] = 0; -} - -static UINT8 *ascii16_sram_bank_select (msx_state *drvstate, slot_state *state, int bankno) -{ - int bank = state->m_banks[bankno]; - - if (bank & state->m_cart.sram.empty_mask) - { - return drvstate->m_empty; - } - else if (bank & state->m_cart.sram.sram_mask) - { - return state->m_cart.sram.mem; - } - else - { - return state->m_mem + (bank & state->m_bank_mask) * 0x4000; - } -} - -MSX_SLOT_MAP(ascii16_sram) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - UINT8 *mem; - - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - break; - case 1: - mem = ascii16_sram_bank_select (drvstate, state, 0); - msx_cpu_setbank (machine, 3, mem); - msx_cpu_setbank (machine, 4, mem + 0x2000); - break; - case 2: - mem = ascii16_sram_bank_select (drvstate, state, 1); - msx_cpu_setbank (machine, 5, mem); - msx_cpu_setbank (machine, 6, mem + 0x2000); - break; - case 3: - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - } -} - -MSX_SLOT_WRITE(ascii16_sram) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - if (addr >= 0x6000 && addr < 0x6800) - { - state->m_banks[0] = val; - slot_ascii16_sram_map (machine, state, 1); - } - else if (addr >= 0x7000 && addr < 0x7800) - { - state->m_banks[1] = val; - if (drvstate->m_state[2] == state) - { - slot_ascii16_sram_map (machine, state, 2); - } - } - else if (addr >= 0x8000 && addr < 0xc000) - { - if (!(state->m_banks[1] & state->m_cart.sram.empty_mask) && - (state->m_banks[1] & state->m_cart.sram.sram_mask)) - { - int offset, i; - - offset = addr & 0x07ff; - for (i=0; i<8; i++) - { - state->m_cart.sram.mem[offset] = val; - offset += 0x0800; - } - } - } -} - -MSX_SLOT_LOADSRAM(ascii16_sram) -{ - UINT8 *p; - - if (!state->m_sramfile) - { - logerror ("ascii16_sram: error: no sram filename provided\n"); - return 1; - } - - emu_file f(machine.options().nvram_directory(), OPEN_FLAG_READ); - file_error filerr = f.open(state->m_sramfile); - if (filerr == FILERR_NONE) - { - p = state->m_cart.sram.mem; - - if (f.read(state->m_cart.sram.mem, 0x200) == 0x200) - { - int /*offset,*/ i; - //offset = 0; - for (i=0; i<7; i++) - { - memcpy (p + 0x800, p, 0x800); - p += 0x800; - } - - logerror ("ascii16_sram: info: sram loaded\n"); - return 0; - } - memset (state->m_cart.sram.mem, 0, 0x4000); - logerror ("ascii16_sram: warning: could not read sram file\n"); - return 1; - } - - logerror ("ascii16_sram: warning: could not open sram file for reading\n"); - - return 1; -} - -MSX_SLOT_SAVESRAM(ascii16_sram) -{ - if (!state->m_sramfile) - { - return 0; - } - emu_file f(machine.options().nvram_directory(), OPEN_FLAG_WRITE); - file_error filerr = f.open(state->m_sramfile); - if (filerr == FILERR_NONE) - { - f.write(state->m_cart.sram.mem, 0x200); - logerror ("ascii16_sram: info: sram saved\n"); - - return 0; - } - - logerror ("ascii16_sram: warning: could not open sram file for saving\n"); - - return 1; -} - -MSX_SLOT_INIT(rtype) -{ - if (!(size == 0x60000 || size == 0x80000)) - { - logerror ("rtype: error: rom file should be exactly 384kb\n"); - return 1; - } - - state->m_type = SLOT_RTYPE; - state->m_mem = mem; - state->m_size = size; - - return 0; -} - -MSX_SLOT_RESET(rtype) -{ - state->m_banks[0] = 15; -} - -MSX_SLOT_MAP(rtype) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - UINT8 *mem; - - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - break; - case 1: - mem = state->m_mem + 15 * 0x4000; - msx_cpu_setbank (machine, 3, mem); - msx_cpu_setbank (machine, 4, mem + 0x2000); - break; - case 2: - mem = state->m_mem + state->m_banks[0] * 0x4000; - msx_cpu_setbank (machine, 5, mem); - msx_cpu_setbank (machine, 6, mem + 0x2000); - break; - case 3: - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - } -} - -MSX_SLOT_WRITE(rtype) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - if (addr >= 0x7000 && addr < 0x8000) - { - int data ; - - if (val & 0x10) - { - data = 0x10 | (val & 7); - } - else - { - data = val & 0x0f; - } - state->m_banks[0] = data; - if (drvstate->m_state[2] == state) - { - slot_rtype_map (machine, state, 2); - } - } -} - -MSX_SLOT_INIT(gmaster2) -{ - UINT8 *p; - static const char sramfile[] = "GameMaster2"; - - if (size != 0x20000) - { - logerror ("gmaster2: error: rom file should be 128kb\n"); - return 1; - } - state->m_type = SLOT_GAMEMASTER2; - state->m_size = size; - state->m_mem = mem; - - p = auto_alloc_array(machine, UINT8, 0x4000); - memset (p, 0, 0x4000); - state->m_cart.sram.mem = p; - if (!state->m_sramfile) - { - state->m_sramfile = sramfile; - } - - return 0; -} - -MSX_SLOT_RESET(gmaster2) -{ - int i; - - for (i=0; i<4; i++) - { - state->m_banks[i] = i; - } -} - -MSX_SLOT_MAP(gmaster2) -{ - switch (page) - { - case 0: - case 1: - msx_cpu_setbank (machine, 1 + page * 2, state->m_mem); /* bank 0 is hardwired */ - if (state->m_banks[1] > 15) - { - msx_cpu_setbank (machine, 2 + page * 2, state->m_cart.sram.mem + - (state->m_banks[1] - 16) * 0x2000); - } - else - { - msx_cpu_setbank (machine, 2 + page * 2, state->m_mem + state->m_banks[1] * 0x2000); - } - break; - case 2: - case 3: - if (state->m_banks[2] > 15) - { - msx_cpu_setbank (machine, 5 + page * 2, state->m_cart.sram.mem + - (state->m_banks[2] - 16) * 0x2000); - } - else - { - msx_cpu_setbank (machine, 5 + page * 2, state->m_mem + state->m_banks[2] * 0x2000); - } - if (state->m_banks[3] > 15) - { - msx_cpu_setbank (machine, 6 + page * 2, state->m_cart.sram.mem + - (state->m_banks[3] - 16) * 0x2000); - } - else - { - msx_cpu_setbank (machine, 6 + page * 2, state->m_mem + state->m_banks[3] * 0x2000); - } - break; - } -} - -MSX_SLOT_WRITE(gmaster2) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - if (addr >= 0x6000 && addr < 0x7000) - { - if (val & 0x10) - { - val = val & 0x20 ? 17 : 16; - } - else - { - val = val & 15; - } - state->m_banks[1] = val; - slot_gmaster2_map (machine, state, 1); - if (drvstate->m_state[0] == state) - { - slot_gmaster2_map (machine, state, 0); - } - } - else if (addr >= 0x8000 && addr < 0x9000) - { - if (val & 0x10) - { - val = val & 0x20 ? 17 : 16; - } - else - { - val = val & 15; - } - state->m_banks[2] = val; - slot_gmaster2_map (machine, state, 2); - if (drvstate->m_state[3] == state) - { - slot_gmaster2_map (machine, state, 3); - } - } - else if (addr >= 0xa000 && addr < 0xb000) - { - if (val & 0x10) - { - val = val & 0x20 ? 17 : 16; - } - else - { - val = val & 15; - } - state->m_banks[3] = val; - slot_gmaster2_map (machine, state, 2); - if (drvstate->m_state[3] == state) - { - slot_gmaster2_map (machine, state, 3); - } - } - else if (addr >= 0xb000 && addr < 0xc000) - { - addr &= 0x0fff; - switch (state->m_banks[3]) - { - case 16: - state->m_cart.sram.mem[addr] = val; - state->m_cart.sram.mem[addr + 0x1000] = val; - break; - case 17: - state->m_cart.sram.mem[addr + 0x2000] = val; - state->m_cart.sram.mem[addr + 0x3000] = val; - break; - } - } -} - -MSX_SLOT_LOADSRAM(gmaster2) -{ - UINT8 *p; - - p = state->m_cart.sram.mem; - - emu_file f(machine.options().nvram_directory(), OPEN_FLAG_READ); - file_error filerr = f.open(state->m_sramfile); - if (filerr == FILERR_NONE) - { - if (f.read(p + 0x1000, 0x2000) == 0x2000) - { - memcpy (p, p + 0x1000, 0x1000); - memcpy (p + 0x3000, p + 0x2000, 0x1000); - logerror ("gmaster2: info: sram loaded\n"); - return 0; - } - memset (p, 0, 0x4000); - logerror ("gmaster2: warning: could not read sram file\n"); - return 1; - } - - logerror ("gmaster2: warning: could not open sram file for reading\n"); - - return 1; -} - -MSX_SLOT_SAVESRAM(gmaster2) -{ - emu_file f(machine.options().nvram_directory(), OPEN_FLAG_WRITE); - file_error filerr = f.open(state->m_sramfile); - if (filerr == FILERR_NONE) - { - f.write(state->m_cart.sram.mem + 0x1000, 0x2000); - logerror ("gmaster2: info: sram saved\n"); - - return 0; - } - - logerror ("gmaster2: warning: could not open sram file for saving\n"); - - return 1; -} - -MSX_SLOT_INIT(diskrom) -{ - if (size != 0x4000) - { - logerror ("diskrom: error: the diskrom should be 16kb\n"); - return 1; - } - - state->m_type = SLOT_DISK_ROM; - state->m_mem = mem; - state->m_size = size; - - return 0; -} - -MSX_SLOT_RESET(diskrom) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - drvstate->m_fdc->soft_reset(); - drvstate->m_fdc->dden_w(false); -} - -READ8_MEMBER(msx_state::msx_diskrom_page1_r) -{ - switch (offset) - { - case 0: return m_fdc->status_r(); - case 1: return m_fdc->track_r(); - case 2: return m_fdc->sector_r(); - case 3: return m_fdc->data_r(); - case 7: return m_dsk_stat; - default: - return m_state[1]->m_mem[offset + 0x3ff8]; - } -} - -READ8_MEMBER(msx_state::msx_diskrom_page2_r) -{ - if (offset >= 0x7f8) - { - switch (offset) - { - case 0x7f8: - return m_fdc->status_r(); - case 0x7f9: - return m_fdc->track_r(); - case 0x7fa: - return m_fdc->sector_r(); - case 0x7fb: - return m_fdc->data_r(); - case 0x7ff: - return m_dsk_stat; - default: - return m_state[2]->m_mem[offset + 0x3800]; - } - } - else - { - return 0xff; - } -} - -MSX_SLOT_MAP(diskrom) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - address_space &space = drvstate->m_maincpu->space(AS_PROGRAM); - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - break; - case 1: - msx_cpu_setbank (machine, 3, state->m_mem); - msx_cpu_setbank (machine, 4, state->m_mem + 0x2000); - space.install_read_handler(0x7ff8, 0x7fff, read8_delegate(FUNC(msx_state::msx_diskrom_page1_r),drvstate)); - break; - case 2: - msx_cpu_setbank (machine, 5, drvstate->m_empty); - msx_cpu_setbank (machine, 6, drvstate->m_empty); - space.install_read_handler(0xb800, 0xbfff, read8_delegate(FUNC(msx_state::msx_diskrom_page2_r),drvstate)); - break; - case 3: - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - break; - } -} - -MSX_SLOT_WRITE(diskrom) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - if (addr >= 0xa000 && addr < 0xc000) - { - addr -= 0x4000; - } - switch (addr) - { - case 0x7ff8: - drvstate->m_fdc->cmd_w(val); - break; - case 0x7ff9: - drvstate->m_fdc->track_w(val); - break; - case 0x7ffa: - drvstate->m_fdc->sector_w(val); - break; - case 0x7ffb: - drvstate->m_fdc->data_w(val); - break; - case 0x7ffc: - if (drvstate->m_floppy) - { - drvstate->m_floppy->ss_w(val & 1); - } - state->m_mem[0x3ffc] = val | 0xfe; - break; - case 0x7ffd: - switch (val & 3) - { - case 0: case 2: - drvstate->m_floppy = (drvstate->m_floppy0) ? drvstate->m_floppy0->get_device() : NULL; - break; - case 1: - drvstate->m_floppy = (drvstate->m_floppy1) ? drvstate->m_floppy1->get_device() : NULL; - break; - default: - drvstate->m_floppy = NULL; - } - if (drvstate->m_floppy) - { - drvstate->m_floppy->mon_w((val & 0x80) ? 0 : 1); - drvstate->m_floppy->ss_w(state->m_mem[0x3ffc] & 1); - } - drvstate->m_fdc->set_floppy(drvstate->m_floppy); - if ((state->m_mem[0x3ffd] ^ val) & 0x40) - { - set_led_status (machine, 0, !(val & 0x40)); - } - state->m_mem[0x3ffd] = (val | 0x7c) & ~0x04; - break; - } -} - -MSX_SLOT_INIT(diskrom2) -{ - if (size != 0x4000) - { - logerror ("diskrom2: error: the diskrom2 should be 16kb\n"); - return 1; - } - - state->m_type = SLOT_DISK_ROM2; - state->m_mem = mem; - state->m_size = size; - - return 0; -} - -MSX_SLOT_RESET(diskrom2) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - drvstate->m_fdc->reset(); -} - -READ8_MEMBER(msx_state::msx_diskrom2_page1_r) -{ - switch (offset) - { - case 0: return m_fdc->status_r(); - case 1: return m_fdc->track_r(); - case 2: return m_fdc->sector_r(); - case 3: return m_fdc->data_r(); - case 4: return m_dsk_stat; - default: - return m_state[1]->m_mem[offset + 0x3ff8]; - } -} - -READ8_MEMBER(msx_state::msx_diskrom2_page2_r) -{ - if (offset >= 0x7b8) - { - switch (offset) - { - case 0x7b8: - return m_fdc->status_r(); - case 0x7b9: - return m_fdc->track_r(); - case 0x7ba: - return m_fdc->sector_r(); - case 0x7bb: - return m_fdc->data_r(); - case 0x7bc: - return m_dsk_stat; - default: - return m_state[2]->m_mem[offset + 0x3800]; - } - } - else - { - return 0xff; - } -} - -MSX_SLOT_MAP(diskrom2) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - address_space &space = drvstate->m_maincpu->space(AS_PROGRAM); - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - break; - case 1: - msx_cpu_setbank (machine, 3, state->m_mem); - msx_cpu_setbank (machine, 4, state->m_mem + 0x2000); - space.install_read_handler(0x7fb8, 0x7fbc, read8_delegate(FUNC(msx_state::msx_diskrom2_page1_r),drvstate)); - break; - case 2: - msx_cpu_setbank (machine, 5, drvstate->m_empty); - msx_cpu_setbank (machine, 6, drvstate->m_empty); - space.install_read_handler(0xb800, 0xbfbc, read8_delegate(FUNC(msx_state::msx_diskrom2_page2_r),drvstate)); - break; - case 3: - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - } -} - -MSX_SLOT_WRITE(diskrom2) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - if (addr >= 0xa000 && addr < 0xc000) - { - addr -= 0x4000; - } - switch (addr) - { - case 0x7fb8: - drvstate->m_fdc->cmd_w(val); - break; - case 0x7fb9: - drvstate->m_fdc->track_w(val); - break; - case 0x7fba: - drvstate->m_fdc->sector_w(val); - break; - case 0x7fbb: - drvstate->m_fdc->data_w(val); - break; - case 0x7fbc: - switch(val & 3) - { - case 1: - drvstate->m_floppy = (drvstate->m_floppy0) ? drvstate->m_floppy0->get_device() : NULL; - break; - case 2: - drvstate->m_floppy = (drvstate->m_floppy1) ? drvstate->m_floppy1->get_device() : NULL; - break; - default: - drvstate->m_floppy = NULL; - } - if (drvstate->m_floppy) { - drvstate->m_floppy->ss_w((val & 4) ? 1 : 0); - drvstate->m_floppy->mon_w((val & 8) ? 0 : 1); - } - state->m_mem[0x3fbc] = val | 0xfe; - drvstate->m_fdc->set_floppy(drvstate->m_floppy); - if ((state->m_mem[0x3fbc] ^ val) & 0x40) - { - set_led_status (machine, 0, !(val & 0x40)); - } - state->m_mem[0x3fbc] = (val | 0x7c) & ~0x04; - break; - } -} - -MSX_SLOT_INIT(synthesizer) -{ - if (size != 0x8000) - { - logerror ("synthesizer: error: rom file must be 32kb\n"); - return 1; - } - state->m_type = SLOT_SYNTHESIZER; - state->m_mem = mem; - state->m_size = size; - - return 0; -} - -MSX_SLOT_RESET(synthesizer) -{ - /* empty */ -} - -MSX_SLOT_MAP(synthesizer) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - break; - case 1: - msx_cpu_setbank (machine, 3, state->m_mem); - msx_cpu_setbank (machine, 4, state->m_mem + 0x2000); - break; - case 2: - msx_cpu_setbank (machine, 5, state->m_mem + 0x4000); - msx_cpu_setbank (machine, 6, state->m_mem + 0x6000); - break; - case 3: - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - } -} - -MSX_SLOT_WRITE(synthesizer) -{ - if (addr >= 0x4000 && addr < 0x8000 && !(addr & 0x0010)) - { - msx_state *drvstate = machine.driver_data<msx_state>(); - drvstate->m_dac->write_unsigned8(val); - } -} - -MSX_SLOT_INIT(majutsushi) -{ - if (size != 0x20000) - { - logerror ("majutsushi: error: rom file must be 128kb\n"); - return 1; - } - state->m_type = SLOT_MAJUTSUSHI; - state->m_mem = mem; - state->m_size = size; - state->m_bank_mask = 0x0f; - - return 0; -} - -MSX_SLOT_RESET(majutsushi) -{ - int i; - - for (i=0; i<4; i++) - { - state->m_banks[i] = i; - } -} - -MSX_SLOT_MAP(majutsushi) -{ - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, state->m_mem + state->m_banks[0] * 0x2000); - msx_cpu_setbank (machine, 2, state->m_mem + state->m_banks[1] * 0x2000); - break; - case 1: - msx_cpu_setbank (machine, 3, state->m_mem + state->m_banks[0] * 0x2000); - msx_cpu_setbank (machine, 4, state->m_mem + state->m_banks[1] * 0x2000); - break; - case 2: - msx_cpu_setbank (machine, 5, state->m_mem + state->m_banks[2] * 0x2000); - msx_cpu_setbank (machine, 6, state->m_mem + state->m_banks[3] * 0x2000); - break; - case 3: - msx_cpu_setbank (machine, 7, state->m_mem + state->m_banks[2] * 0x2000); - msx_cpu_setbank (machine, 8, state->m_mem + state->m_banks[3] * 0x2000); - break; - } -} - -MSX_SLOT_WRITE(majutsushi) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - if (addr >= 0x5000 && addr < 0x6000) - { - drvstate->m_dac->write_unsigned8(val); - } - else if (addr >= 0x6000 && addr < 0x8000) - { - state->m_banks[1] = val & 0x0f; - slot_majutsushi_map (machine, state, 1); - if (drvstate->m_state[0] == state) - { - slot_konami_map (machine, state, 0); - } - } - else if (addr >= 0x8000 && addr < 0xc000) - { - state->m_banks[addr < 0xa000 ? 2 : 3] = val & 0x0f; - slot_majutsushi_map (machine, state, 2); - if (drvstate->m_state[3] == state) - { - slot_konami_map (machine, state, 3); - } - } -} - -MSX_SLOT_INIT(fmpac) -{ - static const char sramfile[] = "fmpac.rom"; - UINT8 *p; - int banks; - - if (size > 0x400000) - { - logerror ("fmpac: warning: truncating rom to 4mb\n"); - size = 0x400000; - } - banks = size / 0x4000; - if (size != banks * 0x4000 || (~(banks - 1) % banks)) - { - logerror ("fmpac: error: must be a 2 power of 16kb\n"); - return 1; - } - - if (!strncmp ((char*)mem + 0x18, "PAC2", 4)) - { - state->m_cart.fmpac.sram_support = 1; - p = auto_alloc_array(machine, UINT8, 0x4000); - memset (p, 0, 0x2000); - memset (p + 0x2000, 0xff, 0x2000); - state->m_cart.fmpac.mem = p; - } - else - { - state->m_cart.fmpac.sram_support = 0; - state->m_cart.fmpac.mem = NULL; - } - - state->m_type = SLOT_FMPAC; - state->m_size = size; - state->m_mem = mem; - state->m_bank_mask = banks - 1; - if (!state->m_sramfile) - { - state->m_sramfile = sramfile; - } - - return 0; -} - -MSX_SLOT_RESET(fmpac) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - int i; - - state->m_banks[0] = 0; - state->m_cart.fmpac.sram_active = 0; - state->m_cart.fmpac.opll_active = 0; - drvstate->m_opll_active = 0; - for (i=0; i<=state->m_bank_mask; i++) - { - state->m_mem[0x3ff6 + i * 0x4000] = 0; - } - - /* NPW 21-Feb-2004 - Adding check for null */ - if (state->m_cart.fmpac.mem) - { - state->m_cart.fmpac.mem[0x3ff6] = 0; - state->m_cart.fmpac.mem[0x3ff7] = 0; - } - - /* IMPROVE: reset sound chip */ -} - -MSX_SLOT_MAP(fmpac) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - if (page == 1) - { - if (state->m_cart.fmpac.sram_active) - { - msx_cpu_setbank (machine, 3, state->m_cart.fmpac.mem); - msx_cpu_setbank (machine, 4, state->m_cart.fmpac.mem + 0x2000); - } - else - { - msx_cpu_setbank (machine, 3, state->m_mem + state->m_banks[0] * 0x4000); - msx_cpu_setbank (machine, 4, state->m_mem + state->m_banks[0] * 0x4000 + 0x2000); - } - } - else - { - msx_cpu_setbank (machine, page * 2 + 1, drvstate->m_empty); - msx_cpu_setbank (machine, page * 2 + 2, drvstate->m_empty); - } -} - -MSX_SLOT_WRITE(fmpac) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - address_space &space = drvstate->m_maincpu->space(AS_PROGRAM); - int i, data; - - if (addr >= 0x4000 && addr < 0x6000 && state->m_cart.fmpac.sram_support) - { - if (state->m_cart.fmpac.sram_active || addr >= 0x5ffe) - { - state->m_cart.fmpac.mem[addr & 0x1fff] = val; - } - - state->m_cart.fmpac.sram_active = - (state->m_cart.fmpac.mem[0x1ffe] == 0x4d && - state->m_cart.fmpac.mem[0x1fff] == 0x69); - } - - switch (addr) - { - case 0x7ff4: - if (state->m_cart.fmpac.opll_active) - { - drvstate->m_ym->write(space, 0, val); - } - break; - case 0x7ff5: - if (state->m_cart.fmpac.opll_active) - { - drvstate->m_ym->write(space, 1, val); - } - break; - case 0x7ff6: - data = val & 0x11; - for (i=0; i<=state->m_bank_mask; i++) - { - state->m_mem[0x3ff6 + i * 0x4000] = data; - } - state->m_cart.fmpac.mem[0x3ff6] = data; - state->m_cart.fmpac.opll_active = val & 1; - if ((drvstate->m_opll_active ^ val) & 1) - { - logerror ("FM-PAC: OPLL %sactivated\n", val & 1 ? "" : "de"); - } - drvstate->m_opll_active = val & 1; - break; - case 0x7ff7: - state->m_banks[0] = val & state->m_bank_mask; - state->m_cart.fmpac.mem[0x3ff7] = val & state->m_bank_mask; - slot_fmpac_map (machine, state, 1); - break; - } -} - -static const char PAC_HEADER[] = "PAC2 BACKUP DATA"; -#define PAC_HEADER_LEN (16) - -MSX_SLOT_LOADSRAM(fmpac) -{ - char buf[PAC_HEADER_LEN]; - - if (!state->m_cart.fmpac.sram_support) - { - logerror ("Your fmpac.rom does not support sram\n"); - return 1; - } - - if (!state->m_sramfile) - { - logerror ("No sram filename provided\n"); - return 1; - } - emu_file f(machine.options().nvram_directory(), OPEN_FLAG_READ); - file_error filerr = f.open(state->m_sramfile); - if (filerr == FILERR_NONE) - { - if ((f.read(buf, PAC_HEADER_LEN) == PAC_HEADER_LEN) && - !strncmp (buf, PAC_HEADER, PAC_HEADER_LEN) && - f.read(state->m_cart.fmpac.mem, 0x1ffe)) - { - logerror ("fmpac: info: sram loaded\n"); - return 0; - } - else - { - logerror ("fmpac: warning: failed to load sram\n"); - return 1; - } - } - - logerror ("fmpac: warning: could not open sram file\n"); - return 1; -} - -MSX_SLOT_SAVESRAM(fmpac) -{ - if (!state->m_cart.fmpac.sram_support || !state->m_sramfile) - { - return 0; - } - - emu_file f(machine.options().nvram_directory(), OPEN_FLAG_WRITE); - file_error filerr = f.open(state->m_sramfile); - if (filerr == FILERR_NONE) - { - if ((f.write(PAC_HEADER, PAC_HEADER_LEN) == PAC_HEADER_LEN) && - (f.write(state->m_cart.fmpac.mem, 0x1ffe) == 0x1ffe)) - { - logerror ("fmpac: info: sram saved\n"); - return 0; - } - else - { - logerror ("fmpac: warning: sram save to file failed\n"); - return 1; - } - } - - logerror ("fmpac: warning: could not open sram file for writing\n"); - - return 1; -} - -MSX_SLOT_INIT(superloderunner) -{ - if (size != 0x20000) - { - logerror ("superloderunner: error: rom file should be exactly " - "128kb\n"); - return 1; - } - state->m_type = SLOT_SUPERLODERUNNER; - state->m_mem = mem; - state->m_size = size; - state->m_start_page = page; - state->m_bank_mask = 7; - - return 0; -} - -MSX_SLOT_RESET(superloderunner) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - drvstate->m_superloderunner_bank = 0; -} - -MSX_SLOT_MAP(superloderunner) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - if (page == 2) - { - UINT8 *mem = state->m_mem + - (drvstate->m_superloderunner_bank & state->m_bank_mask) * 0x4000; - - msx_cpu_setbank (machine, 5, mem); - msx_cpu_setbank (machine, 6, mem + 0x2000); - } - else - { - msx_cpu_setbank (machine, page * 2 + 1, drvstate->m_empty); - msx_cpu_setbank (machine, page * 2 + 2, drvstate->m_empty); - } -} - -MSX_SLOT_INIT(crossblaim) -{ - if (size != 0x10000) - { - logerror ("crossblaim: error: rom file should be exactly 64kb\n"); - return 1; - } - state->m_type = SLOT_CROSS_BLAIM; - state->m_mem = mem; - state->m_size = size; - - return 0; -} - -MSX_SLOT_RESET(crossblaim) -{ - state->m_banks[0] = 1; -} - -MSX_SLOT_MAP(crossblaim) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - UINT8 *mem; - - /* This might look odd, but it's what happens on the real cartridge */ - - switch (page) - { - case 0: - if (state->m_banks[0] < 2){ - mem = state->m_mem + state->m_banks[0] * 0x4000; - msx_cpu_setbank (machine, 1, mem); - msx_cpu_setbank (machine, 2, mem + 0x2000); - } - else - { - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - } - break; - case 1: - msx_cpu_setbank (machine, 3, state->m_mem); - msx_cpu_setbank (machine, 4, state->m_mem + 0x2000); - break; - case 2: - mem = state->m_mem + state->m_banks[0] * 0x4000; - msx_cpu_setbank (machine, 5, mem); - msx_cpu_setbank (machine, 6, mem + 0x2000); - break; - case 3: - if (state->m_banks[0] < 2){ - mem = state->m_mem + state->m_banks[0] * 0x4000; - msx_cpu_setbank (machine, 7, mem); - msx_cpu_setbank (machine, 8, mem + 0x2000); - } - else - { - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - } - } -} - -MSX_SLOT_WRITE(crossblaim) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - UINT8 block = val & 3; - - if (!block) block = 1; - state->m_banks[0] = block; - - if (drvstate->m_state[0] == state) - { - slot_crossblaim_map (machine, state, 0); - } - if (drvstate->m_state[2] == state) - { - slot_crossblaim_map (machine, state, 2); - } - if (drvstate->m_state[3] == state) - { - slot_crossblaim_map (machine, state, 3); - } -} - -MSX_SLOT_INIT(korean80in1) -{ - int banks; - - if (size > 0x200000) - { - logerror ("korean-80in1: warning: truncating to 2mb\n"); - size = 0x200000; - } - banks = size / 0x2000; - if (size != banks * 0x2000 || (~(banks - 1) % banks)) - { - logerror ("korean-80in1: error: must be a 2 power of 8kb\n"); - return 1; - } - state->m_type = SLOT_KOREAN_80IN1; - state->m_mem = mem; - state->m_size = size; - state->m_bank_mask = banks - 1; - - return 0; -} - -MSX_SLOT_RESET(korean80in1) -{ - int i; - - for (i=0; i<4; i++) - { - state->m_banks[i] = i; - } -} - -MSX_SLOT_MAP(korean80in1) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - break; - case 1: - msx_cpu_setbank (machine, 3, state->m_mem + state->m_banks[0] * 0x2000); - msx_cpu_setbank (machine, 4, state->m_mem + state->m_banks[1] * 0x2000); - break; - case 2: - msx_cpu_setbank (machine, 5, state->m_mem + state->m_banks[2] * 0x2000); - msx_cpu_setbank (machine, 6, state->m_mem + state->m_banks[3] * 0x2000); - break; - case 3: - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - } -} - -MSX_SLOT_WRITE(korean80in1) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - int bank; - - if (addr >= 0x4000 && addr < 0x4004) - { - bank = addr & 3; - - state->m_banks[bank] = val & state->m_bank_mask; - if (bank <= 1) - { - slot_korean80in1_map (machine, state, 1); - } - else if (drvstate->m_state[2] == state) - { - slot_korean80in1_map (machine, state, 2); - } - } -} - -MSX_SLOT_INIT(korean90in1) -{ - int banks; - - if (size > 0x100000) - { - logerror ("korean-90in1: warning: truncating to 1mb\n"); - size = 0x100000; - } - banks = size / 0x4000; - if (size != banks * 0x4000 || (~(banks - 1) % banks)) - { - logerror ("korean-90in1: error: must be a 2 power of 16kb\n"); - return 1; - } - state->m_type = SLOT_KOREAN_90IN1; - state->m_mem = mem; - state->m_size = size; - state->m_bank_mask = banks - 1; - - return 0; -} - -MSX_SLOT_RESET(korean90in1) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - drvstate->m_korean90in1_bank = 0; -} - -MSX_SLOT_MAP(korean90in1) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - UINT8 *mem; - UINT8 mask = (drvstate->m_korean90in1_bank & 0xc0) == 0x80 ? 0x3e : 0x3f; - mem = state->m_mem + - ((drvstate->m_korean90in1_bank & mask) & state->m_bank_mask) * 0x4000; - - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - break; - case 1: - msx_cpu_setbank (machine, 3, mem); - msx_cpu_setbank (machine, 4, mem + 0x2000); - break; - case 2: - switch (drvstate->m_korean90in1_bank & 0xc0) - { - case 0x80: /* 32 kb mode */ - mem += 0x4000; - default: /* ie. 0x00 and 0x40: same memory as page 1 */ - msx_cpu_setbank (machine, 5, mem); - msx_cpu_setbank (machine, 6, mem + 0x2000); - break; - case 0xc0: /* same memory as page 1, but swap lower/upper 8kb */ - msx_cpu_setbank (machine, 5, mem + 0x2000); - msx_cpu_setbank (machine, 6, mem); - break; - } - break; - case 3: - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - } -} - -MSX_SLOT_INIT(korean126in1) -{ - int banks; - - if (size > 0x400000) - { - logerror ("korean-126in1: warning: truncating to 4mb\n"); - size = 0x400000; - } - banks = size / 0x4000; - if (size != banks * 0x4000 || (~(banks - 1) % banks)) - { - logerror ("korean-126in1: error: must be a 2 power of 16kb\n"); - return 1; - } - - state->m_type = SLOT_KOREAN_126IN1; - state->m_mem = mem; - state->m_size = size; - state->m_bank_mask = banks - 1; - - return 0; -} - -MSX_SLOT_RESET(korean126in1) -{ - int i; - - for (i=0; i<2; i++) state->m_banks[i] = i; -} - -MSX_SLOT_MAP(korean126in1) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - UINT8 *mem; - - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, drvstate->m_empty); - msx_cpu_setbank (machine, 2, drvstate->m_empty); - break; - case 1: - mem = state->m_mem + state->m_banks[0] * 0x4000; - msx_cpu_setbank (machine, 3, mem); - msx_cpu_setbank (machine, 4, mem + 0x2000); - break; - case 2: - mem = state->m_mem + state->m_banks[1] * 0x4000; - msx_cpu_setbank (machine, 5, mem); - msx_cpu_setbank (machine, 6, mem + 0x2000); - break; - case 3: - msx_cpu_setbank (machine, 7, drvstate->m_empty); - msx_cpu_setbank (machine, 8, drvstate->m_empty); - } -} - -MSX_SLOT_WRITE(korean126in1) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - if (addr >= 0x4000 && addr < 0x4002) - { - int bank = addr & 1; - state->m_banks[bank] = val & state->m_bank_mask; - if (bank == 0) - { - slot_korean126in1_map (machine, state, 1); - } - else if (drvstate->m_state[2] == state) - { - slot_korean126in1_map (machine, state, 2); - } - } -} - -MSX_SLOT_INIT(soundcartridge) -{ - UINT8 *p; - - p = auto_alloc_array(machine, UINT8, 0x20000); - memset (p, 0, 0x20000); - - state->m_mem = p; - state->m_size = 0x20000; - state->m_bank_mask = 15; - state->m_type = SLOT_SOUNDCARTRIDGE; - - return 0; -} - -MSX_SLOT_RESET(soundcartridge) -{ - int i; - - for (i=0; i<4; i++) - { - state->m_banks[i] = i; - state->m_cart.sccp.ram_mode[i] = 0; - state->m_cart.sccp.banks_saved[i] = i; - } - state->m_cart.sccp.mode = 0; - state->m_cart.sccp.scc_active = 0; - state->m_cart.sccp.sccp_active = 0; -} - -READ8_MEMBER(msx_state::soundcartridge_scc) -{ - int reg; - - - if (offset >= 0x7e0) - { - return m_state[2]->m_mem[ - m_state[2]->m_banks[2] * 0x2000 + 0x1800 + offset]; - } - - reg = offset & 0xff; - - if (reg < 0x80) - { - return m_k051649->k051649_waveform_r (space, reg); - } - else if (reg < 0xa0) - { - /* nothing */ - } - else if (reg < 0xc0) - { - /* read wave 5 */ - return m_k051649->k051649_waveform_r (space, 0x80 + (reg & 0x1f)); - } - else if (reg < 0xe0) - { - return m_k051649->k051649_test_r (space, reg); - } - - return 0xff; -} - -READ8_MEMBER(msx_state::soundcartridge_sccp) -{ - int reg; - - if (offset >= 0x7e0) - { - return m_state[2]->m_mem[ - m_state[2]->m_banks[3] * 0x2000 + 0x1800 + offset]; - } - - reg = offset & 0xff; - - if (reg < 0xa0) - { - return m_k051649->k051649_waveform_r (space, reg); - } - else if (reg >= 0xc0 && reg < 0xe0) - { - return m_k051649->k051649_test_r (space, reg); - } - - return 0xff; -} - -MSX_SLOT_MAP(soundcartridge) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - address_space &space = drvstate->m_maincpu->space(AS_PROGRAM); - switch (page) - { - case 0: - msx_cpu_setbank (machine, 1, state->m_mem + state->m_banks[2] * 0x2000); - msx_cpu_setbank (machine, 2, state->m_mem + state->m_banks[3] * 0x2000); - break; - case 1: - msx_cpu_setbank (machine, 3, state->m_mem + state->m_banks[0] * 0x2000); - msx_cpu_setbank (machine, 4, state->m_mem + state->m_banks[1] * 0x2000); - break; - case 2: - msx_cpu_setbank (machine, 5, state->m_mem + state->m_banks[2] * 0x2000); - msx_cpu_setbank (machine, 6, state->m_mem + state->m_banks[3] * 0x2000); - if (state->m_cart.sccp.scc_active) { - space.install_read_handler(0x9800, 0x9fff, read8_delegate(FUNC(msx_state::soundcartridge_scc),drvstate)); - } else { - space.install_read_bank(0x9800, 0x9fff, "bank7"); - } - if (state->m_cart.sccp.scc_active) { - space.install_read_handler(0xb800, 0xbfff, read8_delegate(FUNC(msx_state::soundcartridge_sccp),drvstate)); - } else { - space.install_read_bank(0xb800, 0xbfff, "bank9"); - } - break; - case 3: - msx_cpu_setbank (machine, 7, state->m_mem + state->m_banks[0] * 0x2000); - msx_cpu_setbank (machine, 8, state->m_mem + state->m_banks[1] * 0x2000); - break; - } -} - -MSX_SLOT_WRITE(soundcartridge) -{ - msx_state *drvstate = machine.driver_data<msx_state>(); - address_space &space = drvstate->m_maincpu->space(AS_PROGRAM); - int i; - - if (addr < 0x4000) - { - return; - } - else if (addr < 0x6000) - { - if (state->m_cart.sccp.ram_mode[0]) - { - state->m_mem[state->m_banks[0] * 0x2000 + (addr & 0x1fff)] = val; - } - else if (addr >= 0x5000 && addr < 0x5800) - { - state->m_banks[0] = val & state->m_bank_mask; - state->m_cart.sccp.banks_saved[0] = val; - slot_soundcartridge_map (machine, state, 1); - if (drvstate->m_state[3] == state) - { - slot_soundcartridge_map (machine, state, 3); - } - } - } - else if (addr < 0x8000) - { - if (state->m_cart.sccp.ram_mode[1]) - { - state->m_mem[state->m_banks[1] * 0x2000 + (addr & 0x1fff)] = val; - } - else if (addr >= 0x7000 && addr < 0x7800) - { - state->m_banks[1] = val & state->m_bank_mask; - state->m_cart.sccp.banks_saved[1] = val; - if (drvstate->m_state[3] == state) - { - slot_soundcartridge_map (machine, state, 3); - } - slot_soundcartridge_map (machine, state, 1); - } - } - else if (addr < 0xa000) - { - if (state->m_cart.sccp.ram_mode[2]) - { - state->m_mem[state->m_banks[2] * 0x2000 + (addr & 0x1fff)] = val; - } - else if (addr >= 0x9000 && addr < 0x9800) - { - state->m_banks[2] = val & state->m_bank_mask; - state->m_cart.sccp.banks_saved[2] = val; - state->m_cart.sccp.scc_active = - (((val & 0x3f) == 0x3f) && !(state->m_cart.sccp.mode & 0x20)); - - slot_soundcartridge_map (machine, state, 2); - if (drvstate->m_state[0] == state) - { - slot_soundcartridge_map (machine, state, 0); - } - } - else if (addr >= 0x9800 && state->m_cart.sccp.scc_active) - { - int offset = addr & 0xff; - - if (offset < 0x80) - { - drvstate->m_k051649->k051649_waveform_w (space, offset, val); - } - else if (offset < 0xa0) - { - offset &= 0xf; - - if (offset < 0xa) - { - drvstate->m_k051649->k051649_frequency_w (space, offset, val); - } - else if (offset < 0x0f) - { - drvstate->m_k051649->k051649_volume_w (space, offset - 0xa, val); - } - else if (offset == 0x0f) - { - drvstate->m_k051649->k051649_keyonoff_w (space, 0, val); - } - } - else if (offset < 0xe0) - { - drvstate->m_k051649->k051649_test_w (space, offset, val); - } - } - } - else if (addr < 0xbffe) - { - if (state->m_cart.sccp.ram_mode[3]) - { - state->m_mem[state->m_banks[3] * 0x2000 + (addr & 0x1fff)] = val; - } - else if (addr >= 0xb000 && addr < 0xb800) - { - state->m_cart.sccp.banks_saved[3] = val; - state->m_banks[3] = val & state->m_bank_mask; - state->m_cart.sccp.sccp_active = - (val & 0x80) && (state->m_cart.sccp.mode & 0x20); - slot_soundcartridge_map (machine, state, 2); - if (drvstate->m_state[0] == state) - { - slot_soundcartridge_map (machine, state, 0); - } - } - else if (addr >= 0xb800 && state->m_cart.sccp.sccp_active) - { - int offset = addr & 0xff; - - if (offset < 0xa0) - { - drvstate->m_k051649->k051649_waveform_w (space, offset, val); - } - else if (offset < 0xc0) - { - offset &= 0x0f; - - if (offset < 0x0a) - { - drvstate->m_k051649->k051649_frequency_w (space, offset, val); - } - else if (offset < 0x0f) - { - drvstate->m_k051649->k051649_volume_w (space, offset - 0x0a, val); - } - else if (offset == 0x0f) - { - drvstate->m_k051649->k051649_keyonoff_w (space, 0, val); - } - } - else if (offset < 0xe0) - { - drvstate->m_k051649->k051649_test_w (space, offset, val); - } - } - } - else if (addr < 0xc000) - { - /* write to mode register */ - if ((state->m_cart.sccp.mode ^ val) & 0x20) - { - logerror ("soundcartrige: changed to %s mode\n", - val & 0x20 ? "scc+" : "scc"); - } - state->m_cart.sccp.mode = val; - if (val & 0x10) - { - /* all ram mode */ - for (i=0; i<4; i++) - { - state->m_cart.sccp.ram_mode[i] = 1; - } - } - else - { - state->m_cart.sccp.ram_mode[0] = val & 1; - state->m_cart.sccp.ram_mode[1] = val & 2; - state->m_cart.sccp.ram_mode[2] = (val & 4) && (val & 0x20); - state->m_cart.sccp.ram_mode[3] = 0; - - } - - state->m_cart.sccp.scc_active = - (((state->m_cart.sccp.banks_saved[2] & 0x3f) == 0x3f) && - !(val & 0x20)); - - state->m_cart.sccp.sccp_active = - ((state->m_cart.sccp.banks_saved[3] & 0x80) && (val & 0x20)); - - slot_soundcartridge_map (machine, state, 2); - } -} - -MSX_SLOT_START - MSX_SLOT_ROM (SLOT_EMPTY, empty) - MSX_SLOT (SLOT_MSXDOS2, msxdos2) - MSX_SLOT (SLOT_KONAMI_SCC, konami_scc) - MSX_SLOT (SLOT_KONAMI, konami) - MSX_SLOT (SLOT_ASCII8, ascii8) - MSX_SLOT (SLOT_ASCII16, ascii16) - MSX_SLOT_SRAM (SLOT_GAMEMASTER2, gmaster2) - MSX_SLOT_SRAM (SLOT_ASCII8_SRAM, ascii8_sram) - MSX_SLOT_SRAM (SLOT_ASCII16_SRAM, ascii16_sram) - MSX_SLOT (SLOT_RTYPE, rtype) - MSX_SLOT (SLOT_MAJUTSUSHI, majutsushi) - MSX_SLOT_SRAM (SLOT_FMPAC, fmpac) - MSX_SLOT_ROM (SLOT_SUPERLODERUNNER, superloderunner) - MSX_SLOT (SLOT_SYNTHESIZER, synthesizer) - MSX_SLOT (SLOT_CROSS_BLAIM, crossblaim) - MSX_SLOT (SLOT_DISK_ROM, diskrom) - MSX_SLOT (SLOT_KOREAN_80IN1, korean80in1) - MSX_SLOT (SLOT_KOREAN_126IN1, korean126in1) - MSX_SLOT_ROM (SLOT_KOREAN_90IN1, korean90in1) - MSX_SLOT (SLOT_SOUNDCARTRIDGE, soundcartridge) - MSX_SLOT_ROM (SLOT_ROM, rom) - MSX_SLOT_RAM (SLOT_RAM, ram) - MSX_SLOT_RAM (SLOT_RAM_MM, rammm) - MSX_SLOT_NULL (SLOT_CARTRIDGE1) - MSX_SLOT_NULL (SLOT_CARTRIDGE2) - MSX_SLOT (SLOT_DISK_ROM2, diskrom2) -MSX_SLOT_END diff --git a/src/mess/mess.mak b/src/mess/mess.mak index d1fe3f8e62b..d4687a6082b 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -589,6 +589,7 @@ BUSES += KC BUSES += MACPDS BUSES += MIDI BUSES += MEGADRIVE +BUSES += MSX_SLOT BUSES += NES BUSES += NUBUS BUSES += ORICEXT @@ -1002,7 +1003,9 @@ $(MESSOBJ)/arcadia.a: \ $(MESSOBJ)/ascii.a: \ $(MESS_DRIVERS)/msx.o \ $(MESS_MACHINE)/msx.o \ - $(MESS_MACHINE)/msx_slot.o \ + $(MESS_MACHINE)/msx_switched.o \ + $(MESS_MACHINE)/msx_matsushita.o \ + $(MESS_MACHINE)/msx_s1985.o \ $(MESSOBJ)/at.a: \ $(MESS_MACHINE)/at.o \ |