From 40b5fec0694aac8271d52ebfc6ed1d8489e87482 Mon Sep 17 00:00:00 2001 From: holub Date: Mon, 17 Jul 2023 12:22:51 -0400 Subject: sinclair/scorpion.cpp: Added Scorpion ZS-256 TURBO+. (#11418) bus/spectrum: Added ZXBUS SMUC storage controller. New working clones ------------------ Scorpion, Ltd. Scorpion ZS-256 TURBO+ --- scripts/src/bus.lua | 2 + src/devices/bus/nubus/nubus.h | 2 - src/devices/bus/spectrum/neogs.cpp | 8 +- src/devices/bus/spectrum/smuc.cpp | 140 +++++++++++ src/devices/bus/spectrum/smuc.h | 14 ++ src/devices/bus/spectrum/zxbus.cpp | 11 +- src/devices/bus/spectrum/zxbus.h | 11 +- src/mame/mame.lst | 1 + src/mame/sinclair/pentevo.cpp | 8 +- src/mame/sinclair/scorpion.cpp | 471 ++++++++++++++++++++++++++++++------- src/mame/sinclair/tsconf.cpp | 6 +- 11 files changed, 561 insertions(+), 113 deletions(-) create mode 100644 src/devices/bus/spectrum/smuc.cpp create mode 100644 src/devices/bus/spectrum/smuc.h diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 73fa27a7f6a..cf2cfee66bf 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -4608,6 +4608,8 @@ if (BUSES["ZXBUS"]~=null) then MAME_DIR .. "src/devices/bus/spectrum/zxbus.h", MAME_DIR .. "src/devices/bus/spectrum/neogs.cpp", MAME_DIR .. "src/devices/bus/spectrum/neogs.h", + MAME_DIR .. "src/devices/bus/spectrum/smuc.cpp", + MAME_DIR .. "src/devices/bus/spectrum/smuc.h", } end diff --git a/src/devices/bus/nubus/nubus.h b/src/devices/bus/nubus/nubus.h index 42a68a8b597..f119137ae78 100644 --- a/src/devices/bus/nubus/nubus.h +++ b/src/devices/bus/nubus/nubus.h @@ -34,8 +34,6 @@ public: // construction/destruction virtual ~device_nubus_card_interface(); - void set_nubus_device(); - // helper functions for card devices void install_declaration_rom(const char *romregion, bool mirror_all_mb = false, bool reverse_rom = false); void install_bank(offs_t start, offs_t end, void *data); diff --git a/src/devices/bus/spectrum/neogs.cpp b/src/devices/bus/spectrum/neogs.cpp index 871a192b7b0..2a8b826c4dd 100644 --- a/src/devices/bus/spectrum/neogs.cpp +++ b/src/devices/bus/spectrum/neogs.cpp @@ -85,10 +85,10 @@ public: protected: // device_t implementation - void device_start() override; - void device_reset() override; - const tiny_rom_entry *device_rom_region() const override; - void device_add_mconfig(machine_config &config) override; + virtual void device_start() override; + virtual void device_reset() override; + virtual const tiny_rom_entry *device_rom_region() const override; + virtual void device_add_mconfig(machine_config &config) override; void neogsmap(address_map &map); diff --git a/src/devices/bus/spectrum/smuc.cpp b/src/devices/bus/spectrum/smuc.cpp new file mode 100644 index 00000000000..0df56265cf4 --- /dev/null +++ b/src/devices/bus/spectrum/smuc.cpp @@ -0,0 +1,140 @@ +// license:BSD-3-Clause +// copyright-holders:Andrei I. Holub + +#include "emu.h" +#include "smuc.h" + +#include "bus/ata/ataintf.h" +#include "bus/ata/atapicdr.h" +#include "bus/ata/hdd.h" +#include "machine/ds17x85.h" +#include "machine/i2cmem.h" + +namespace bus::spectrum::zxbus { + +namespace { + +class smuc_device : public device_t, public device_zxbus_card_interface +{ +public: + smuc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, ZXBUS_SMUC, tag, owner, clock) + , device_zxbus_card_interface(mconfig, *this) + , m_rtc(*this, "rtc") + , m_eeprom(*this, "eeprom") + , m_ata(*this, "ata") + { } + +protected: + virtual void device_add_mconfig(machine_config &config) override; + virtual void device_start() override; + virtual void device_reset() override; + +private: + void map_io(address_map &map); + + void port_ffba_w(offs_t offset, u8 data); + u8 ata_r(offs_t offset); + void ata_w(offs_t offset, u8 data); + + required_device m_rtc; //cmos + required_device m_eeprom; //nvram + required_device m_ata; + + u8 m_port_ffba_data; + u8 m_port_7fba_data; + u8 m_ide_hi; +}; + +void smuc_device::port_ffba_w(offs_t offset, u8 data) +{ + if (!BIT(data, 0)) + m_ata->reset(); + + m_eeprom->write_sda(BIT(data, 4)); + m_eeprom->write_wc(BIT(data, 5)); + m_eeprom->write_scl(BIT(data, 6)); + + m_port_ffba_data = data; +} + +u8 smuc_device::ata_r(offs_t offset) +{ + const u8 ata_offset = BIT(offset, 8, 3); + const u16 data = BIT(m_port_ffba_data, 7) + ? m_ata->cs1_r(ata_offset) + : m_ata->cs0_r(ata_offset); + + if (!machine().side_effects_disabled()) + m_ide_hi = data >> 8; + + return data & 0xff; +} + +void smuc_device::ata_w(offs_t offset, u8 data) +{ + const u8 ata_offset = BIT(offset, 8, 3); + const u16 ata_data = (m_ide_hi << 8) | data; + if (BIT(m_port_ffba_data, 7)) + m_ata->cs1_w(ata_offset, ata_data); + else + m_ata->cs0_w(ata_offset, ata_data); +} + + +void smuc_device::map_io(address_map &map) +{ + map(0x118a2, 0x118a2).mirror(0x4718) // 5fba | 0x011xxx101xx010 | Version: 2 + .lr8(NAME([]() { return 0x40; })); + map(0x118a6, 0x118a6).mirror(0x4718) // 5fbe | 0x011xxx101xx110 | Revision: 0 + .lr8(NAME([]() { return 0x28; })); + map(0x138a2, 0x138a2).mirror(0x4718) // 7fba | 0x111xxx101xx010 | VirtualFDD + .lrw8(NAME([this]() { return m_port_7fba_data | 0x37; }) + , NAME([this](offs_t offset, u8 data) { m_port_7fba_data = data; })); + map(0x138a6, 0x138a6).mirror(0x4718) // 7[ef]be | 0x111xxN101xx110 | i8259 - absent in 2.0 + .lr8(NAME([]() { return 0x57; })).nopw(); + map(0x198a2, 0x198a2).mirror(0x4718) // dfba | 1x011xxx101xx010 | DS1685RTC + .lrw8(NAME([this]() { return m_rtc->read(1); }) + , NAME([this](offs_t offset, u8 data) { m_rtc->write(BIT(m_port_ffba_data, 7), data); })); + map(0x198a6, 0x198a6).mirror(0x4718) // d8be | 1x011xxx101xx110 | IDE-Hi + .lrw8(NAME([this]() { return m_ide_hi; }), NAME([this](u8 data) { m_ide_hi = data; })); + map(0x1b8a2, 0x1b8a2).mirror(0x4718) // ffba | 1x111xxx101xx010 | SYS + .lr8(NAME([this]() { return m_eeprom->read_sda() ? 0xff : 0xbf; })).w(FUNC(smuc_device::port_ffba_w)); + map(0x1b8a6, 0x1b8a6).select(0x4718) // f[8-f]be | 1x111NNN101xx110 | IDE#1Fx/#3F6 + .rw(FUNC(smuc_device::ata_r), FUNC(smuc_device::ata_w)); +} + +static void smuc_ata_devices(device_slot_interface &device) +{ + device.option_add("hdd", IDE_HARDDISK); + device.option_add("cdrom", ATAPI_CDROM); +} + +void smuc_device::device_add_mconfig(machine_config &config) +{ + DS1685(config, m_rtc, XTAL(32'768)); + I2C_24C16(config, m_eeprom); + ATA_INTERFACE(config, m_ata).options(smuc_ata_devices, "hdd", "hdd", false); +} + +void smuc_device::device_start() +{ + m_port_7fba_data = 0; + + save_item(NAME(m_port_7fba_data)); + save_item(NAME(m_port_ffba_data)); + save_item(NAME(m_ide_hi)); + + m_zxbus->install_device(0x00000, 0x1ffff, *this, &smuc_device::map_io); +} + +void smuc_device::device_reset() +{ + m_port_ffba_data = 0; +} + +} // anonymous namespace + +} // namespace bus::spectrum::zxbus + +DEFINE_DEVICE_TYPE_PRIVATE(ZXBUS_SMUC, device_zxbus_card_interface, bus::spectrum::zxbus::smuc_device, "smuc", "SMUC") diff --git a/src/devices/bus/spectrum/smuc.h b/src/devices/bus/spectrum/smuc.h new file mode 100644 index 00000000000..87de5539783 --- /dev/null +++ b/src/devices/bus/spectrum/smuc.h @@ -0,0 +1,14 @@ +// license:BSD-3-Clause +// copyright-holders:Andrei I. Holub + +#ifndef MAME_SINCLAIR_SMUC_H +#define MAME_SINCLAIR_SMUC_H + +#pragma once + +#include "zxbus.h" + + +DECLARE_DEVICE_TYPE(ZXBUS_SMUC, device_zxbus_card_interface) + +#endif // MAME_SINCLAIR_SMUC_H diff --git a/src/devices/bus/spectrum/zxbus.cpp b/src/devices/bus/spectrum/zxbus.cpp index d14be5b94c1..f2899d70763 100644 --- a/src/devices/bus/spectrum/zxbus.cpp +++ b/src/devices/bus/spectrum/zxbus.cpp @@ -25,13 +25,12 @@ zxbus_slot_device::zxbus_slot_device(const machine_config &mconfig, device_type void zxbus_slot_device::device_start() { - device_zxbus_card_interface *const intf(get_card_device()); - if (intf) intf->set_zxbusbus(*m_zxbus_bus); + device_zxbus_card_interface *const card(get_card_device()); + if (card) card->set_zxbusbus(*m_zxbus_bus); m_zxbus_bus->add_slot(*this); } - DEFINE_DEVICE_TYPE(ZXBUS, zxbus_device, "zxbus", "ZXBUS bus") zxbus_device::zxbus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) @@ -60,10 +59,6 @@ device_zxbus_card_interface::device_zxbus_card_interface(const machine_config &m { } -device_zxbus_card_interface::~device_zxbus_card_interface() -{ -} - void device_zxbus_card_interface::interface_pre_start() { if (!m_zxbus) @@ -72,8 +67,10 @@ void device_zxbus_card_interface::interface_pre_start() #include "neogs.h" +#include "smuc.h" void zxbus_cards(device_slot_interface &device) { device.option_add("neogs", ZXBUS_NEOGS); + device.option_add("smuc", ZXBUS_SMUC); } diff --git a/src/devices/bus/spectrum/zxbus.h b/src/devices/bus/spectrum/zxbus.h index 39714fc80b8..09aeec5abad 100644 --- a/src/devices/bus/spectrum/zxbus.h +++ b/src/devices/bus/spectrum/zxbus.h @@ -86,7 +86,7 @@ public: zxbus_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); template void set_iospace(T &&tag, int spacenum) { m_iospace.set_tag(std::forward(tag), spacenum); } - template void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(class address_map &map), uint64_t unitmask = ~u64(0)) + template void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(class address_map &map), u64 unitmask = ~u64(0)) { m_iospace->install_device(addrstart, addrend, device, map, unitmask); } @@ -98,7 +98,9 @@ protected: virtual void device_start() override; +private: required_address_space m_iospace; + std::forward_list m_slot_list; }; @@ -107,16 +109,15 @@ DECLARE_DEVICE_TYPE(ZXBUS, zxbus_device) class device_zxbus_card_interface : public device_interface { -public: - virtual ~device_zxbus_card_interface(); - - void set_zxbusbus(zxbus_device &bus) { assert(!device().started()); m_zxbus = &bus; } + friend class zxbus_slot_device; protected: device_zxbus_card_interface(const machine_config &mconfig, device_t &device); virtual void interface_pre_start() override; + void set_zxbusbus(zxbus_device &zxbus) { assert(!device().started()); m_zxbus = &zxbus; } + zxbus_device *m_zxbus; }; diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 65bac9c129a..d9a0c1f2b6a 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -40884,6 +40884,7 @@ kay1024 // profi // quorum // scorpio // +scorpiontb // @source:sinclair/spec128.cpp hc128 // 1991 HC-128 diff --git a/src/mame/sinclair/pentevo.cpp b/src/mame/sinclair/pentevo.cpp index 3fb145d183c..d242bc583b9 100644 --- a/src/mame/sinclair/pentevo.cpp +++ b/src/mame/sinclair/pentevo.cpp @@ -618,10 +618,10 @@ void pentevo_state::pentevo_io(address_map &map) map(0x0057, 0x0057).select(0xff00).rw(FUNC(pentevo_state::spi_port_57_r), FUNC(pentevo_state::spi_port_57_w)); // Mouse - map(0xfadf, 0xfadf).lr8(NAME([this]() { return 0x80 | (m_io_mouse[2]->read() & 0x07); })); - map(0xfbdf, 0xfbdf).lr8(NAME([this]() { return m_io_mouse[0]->read(); })); - map(0xffdf, 0xffdf).lr8(NAME([this]() { return ~m_io_mouse[1]->read(); })); - map(0x001f, 0x001f).mirror(0xff00).lr8(NAME([]() { return 0x00; })); // TODO Kepmston Joystick + map(0xfadf, 0xfadf).lr8(NAME([this]() -> u8 { return 0x80 | (m_io_mouse[2]->read() & 0x07); })); + map(0xfbdf, 0xfbdf).lr8(NAME([this]() -> u8 { return m_io_mouse[0]->read(); })); + map(0xffdf, 0xffdf).lr8(NAME([this]() -> u8 { return ~m_io_mouse[1]->read(); })); + map(0x001f, 0x001f).mirror(0xff00).lr8(NAME([]() -> u8 { return 0x00; })); // TODO Kepmston Joystick // PORTS: Shadow map(0x0000, 0xffff).view(m_io_view); diff --git a/src/mame/sinclair/scorpion.cpp b/src/mame/sinclair/scorpion.cpp index 2f423c80c81..aba4aa326bf 100644 --- a/src/mame/sinclair/scorpion.cpp +++ b/src/mame/sinclair/scorpion.cpp @@ -2,15 +2,24 @@ // copyright-holders:Miodrag Milanovic #include "emu.h" -#include "spec128.h" - #include "beta_m.h" +#include "spec128.h" +#include "bus/spectrum/zxbus.h" #include "machine/timer.h" #include "sound/ay8910.h" +#include "speaker.h" + +#define LOG_IO (1U << 1) +#define LOG_MEM (1U << 2) +#define LOG_WARN (1U << 3) -#include "formats/tzx_cas.h" +#define VERBOSE ( /*LOG_GENERAL | LOG_IO | LOG_MEM |*/ LOG_WARN ) +#include "logmacro.h" +#define LOGIO(...) LOGMASKED(LOG_IO, __VA_ARGS__) +#define LOGMEM(...) LOGMASKED(LOG_MEM, __VA_ARGS__) +#define LOGWARN(...) LOGMASKED(LOG_WARN, __VA_ARGS__) namespace { @@ -19,38 +28,84 @@ class scorpion_state : public spectrum_128_state public: scorpion_state(const machine_config &mconfig, device_type type, const char *tag) : spectrum_128_state(mconfig, type, tag) + , m_bankio(*this, "bankio") , m_beta(*this, BETA_DISK_TAG) + , m_ay(*this, "ay%u", 0U) , m_bank0_rom(*this, "bank0_rom") + , m_io_mouse(*this, "mouse_input%u", 1U) + , m_mod_ay(*this, "MOD_AY") { } void scorpion(machine_config &config); void profi(machine_config &config); void quorum(machine_config &config); + INPUT_CHANGED_MEMBER(on_nmi); + protected: - void machine_start() override; - void machine_reset() override; - void video_start() override; + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + + void scorpion_io(address_map &map); + void scorpion_mem(address_map &map); + void scorpion_switch(address_map &map); + virtual void scorpion_ioext(address_map &map); + void port_7ffd_w(offs_t offset, u8 data); + void port_1ffd_w(offs_t offset, u8 data); + virtual void ay_address_w(u8 data); rectangle get_screen_area() override; + virtual void scorpion_update_memory(); + + memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; + memory_access<17, 0, 0, ENDIANNESS_LITTLE>::specific m_ioext; + required_device m_bankio; + required_device m_beta; + required_device_array m_ay; + + u8 m_is_m1_even; + u8 m_nmi_pending; + u8 m_ay_selected; private: + memory_view m_bank0_rom; + u8 beta_neutral_r(offs_t offset); u8 beta_enable_r(offs_t offset); u8 beta_disable_r(offs_t offset); - void port_7ffd_w(offs_t offset, u8 data); - void port_1ffd_w(offs_t offset, u8 data); - TIMER_DEVICE_CALLBACK_MEMBER(nmi_check_callback); + INTERRUPT_GEN_MEMBER(scorpion_interrupt); - void scorpion_io(address_map &map); - void scorpion_mem(address_map &map); - void scorpion_switch(address_map &map); - void scorpion_update_memory(); + required_ioport_array<3> m_io_mouse; + required_ioport m_mod_ay; + u8 m_ram_banks; +}; - required_device m_beta; +class scorpiontb_state : public scorpion_state +{ +public: + scorpiontb_state(const machine_config &mconfig, device_type type, const char *tag) + : scorpion_state(mconfig, type, tag) + { } + + void scorpiontb(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + + virtual void scorpion_ioext(address_map &map) override; + virtual void ay_address_w(u8 data) override; + + virtual void scorpion_update_memory() override; + +private: + u8 ay_data_r(); + + u8 m_prof_plane; + u8 m_ay_reg; - memory_view m_bank0_rom; - address_space *m_program; }; /****************************************************************************************************/ @@ -83,41 +138,47 @@ D6-D7 - not used. ( yet ? ) void scorpion_state::scorpion_update_memory() { - m_screen->update_now(); - m_screen_location = m_ram->pointer() + (((m_port_7ffd_data & 8) ? 7 : 5) << 14); - - m_bank_ram[3]->set_entry((m_port_7ffd_data & 0x07) | ((m_port_1ffd_data & 0x10)>>1)); - - if (BIT(m_port_1ffd_data, 0)) + if (BIT(m_port_1ffd_data, 0) && !m_nmi_pending) { - m_bank_ram[0]->set_entry(8); - m_bank0_rom.disable(); + m_bank_ram[0]->set_entry(0); + m_bank0_rom.select(0); + LOGMEM("mem: 0=RAM,"); } else { - m_bank_rom[0]->set_entry(BIT(m_port_1ffd_data, 1) ? 2 : BIT(m_port_7ffd_data, 4)); - m_bank0_rom.select(0); + const u8 rom_page = (BIT(m_port_1ffd_data, 1) && !m_nmi_pending) + ? 2 + : ((m_beta->is_active() << 1) | BIT(m_port_7ffd_data, 4)); + + m_bank_rom[0]->set_entry(rom_page); + m_bank0_rom.disable(); + LOGMEM("mem: 0=ROM(%x),", m_bank_rom[0]->entry()); } + m_bank_ram[3]->set_entry(((m_port_7ffd_data & 0x07) | ((m_port_1ffd_data & 0x10) >> 1) | ((m_port_1ffd_data & 0xc0) >> 2)) % m_ram_banks); + LOGMEM("3=RAM(%x)\n", m_bank_ram[3]->entry()); } -TIMER_DEVICE_CALLBACK_MEMBER(scorpion_state::nmi_check_callback) +INTERRUPT_GEN_MEMBER(scorpion_state::scorpion_interrupt) { - if (m_io_nmi->read() & 0x01) - { - m_port_1ffd_data |= 0x02; - scorpion_update_memory(); - m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); - } + m_irq_on_timer->adjust(m_screen->time_until_pos(get_screen_area().top(), get_screen_area().left()) - m_screen->clocks_to_attotime(14344 * 2)); +} + +INPUT_CHANGED_MEMBER(scorpion_state::on_nmi) +{ + m_nmi_pending = newval; } void scorpion_state::port_7ffd_w(offs_t offset, u8 data) { /* disable paging */ - if (m_port_7ffd_data & 0x20) + if (BIT(m_port_7ffd_data, 5)) return; m_port_7ffd_data = data; scorpion_update_memory(); + + m_screen->update_now(); + m_screen_location = m_ram->pointer() + ((BIT(m_port_7ffd_data, 3) ? 7 : 5) << 14); } void scorpion_state::port_1ffd_w(offs_t offset, u8 data) @@ -126,67 +187,106 @@ void scorpion_state::port_1ffd_w(offs_t offset, u8 data) scorpion_update_memory(); } +void scorpion_state::ay_address_w(u8 data) +{ + if ((m_mod_ay->read() == 1) && ((data & 0xfe) == 0xfe)) + m_ay_selected = data & 1; + else + m_ay[m_ay_selected]->address_w(data); +} + u8 scorpion_state::beta_neutral_r(offs_t offset) { - if (m_maincpu->total_cycles() & 1) m_maincpu->eat_cycles(1); + if (m_is_m1_even && (m_maincpu->total_cycles() & 1)) m_maincpu->eat_cycles(1); - return m_program->read_byte(offset); + return m_program.read_byte(offset); } u8 scorpion_state::beta_enable_r(offs_t offset) { if (!machine().side_effects_disabled()) { - if (m_maincpu->total_cycles() & 1) m_maincpu->eat_cycles(1); - - if (m_beta->started() && m_bank_rom[0]->entry() == 1) + if (m_is_m1_even && (m_maincpu->total_cycles() & 1)) m_maincpu->eat_cycles(1); + if (m_beta->started() && !m_beta->is_active()) { m_beta->enable(); - m_bank_rom[0]->set_entry(3); + scorpion_update_memory(); } } - return m_program->read_byte(offset + 0x3d00); + return m_program.read_byte(offset + 0x3d00); } u8 scorpion_state::beta_disable_r(offs_t offset) { if (!machine().side_effects_disabled()) { - if (m_maincpu->total_cycles() & 1) m_maincpu->eat_cycles(1); - - if (m_beta->started() && m_beta->is_active()) + if (m_is_m1_even && (m_maincpu->total_cycles() & 1)) m_maincpu->eat_cycles(1); + if (m_nmi_pending) + { + m_port_1ffd_data |= 0x02; + m_beta->enable(); + scorpion_update_memory(); + m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); + m_nmi_pending = 0; + } + else if (m_beta->started() && m_beta->is_active()) { m_beta->disable(); - m_bank_rom[0]->set_entry(BIT(m_port_7ffd_data, 4)); + scorpion_update_memory(); } } - return m_program->read_byte(offset + 0x4000); + return m_program.read_byte(offset + 0x4000); } void scorpion_state::scorpion_mem(address_map &map) { - map(0x0000, 0x3fff).bankr(m_bank_ram[0]).w(FUNC(scorpion_state::spectrum_128_ram_w<0>)); + map(0x0000, 0x3fff).bankr(m_bank_rom[0]); map(0x0000, 0x3fff).view(m_bank0_rom); - m_bank0_rom[0](0x0000, 0x3fff).bankr(m_bank_rom[0]); + m_bank0_rom[0](0x0000, 0x3fff).bankr(m_bank_ram[0]).w(FUNC(scorpion_state::spectrum_128_ram_w<0>)); map(0x4000, 0x7fff).bankr(m_bank_ram[1]).w(FUNC(scorpion_state::spectrum_128_ram_w<1>)); map(0x8000, 0xbfff).bankrw(m_bank_ram[2]); map(0xc000, 0xffff).bankr(m_bank_ram[3]).w(FUNC(scorpion_state::spectrum_128_ram_w<3>)); } -void scorpion_state::scorpion_io(address_map &map) +void scorpion_state::scorpion_ioext(address_map &map) { map.unmap_value_high(); - map(0x001f, 0x001f).mirror(0xff00).rw(m_beta, FUNC(beta_disk_device::status_r), FUNC(beta_disk_device::command_w)); - map(0x003f, 0x003f).mirror(0xff00).rw(m_beta, FUNC(beta_disk_device::track_r), FUNC(beta_disk_device::track_w)); - map(0x005f, 0x005f).mirror(0xff00).rw(m_beta, FUNC(beta_disk_device::sector_r), FUNC(beta_disk_device::sector_w)); - map(0x007f, 0x007f).mirror(0xff00).rw(m_beta, FUNC(beta_disk_device::data_r), FUNC(beta_disk_device::data_w)); - map(0x00fe, 0x00fe).select(0xff00).rw(FUNC(scorpion_state::spectrum_ula_r), FUNC(scorpion_state::spectrum_ula_w)); - map(0x00ff, 0x00ff).mirror(0xff00).rw(m_beta, FUNC(beta_disk_device::state_r), FUNC(beta_disk_device::param_w)); - map(0x4021, 0x4021).mirror(0x3fdc).w(FUNC(scorpion_state::port_7ffd_w)); - map(0x8021, 0x8021).mirror(0x3fdc).w("ay8912", FUNC(ay8910_device::data_w)); - map(0xc021, 0xc021).mirror(0x3fdc).rw("ay8912", FUNC(ay8910_device::data_r), FUNC(ay8910_device::address_w)); - map(0x0021, 0x0021).mirror(0x3fdc).w(FUNC(scorpion_state::port_1ffd_w)); + map(0x0022, 0x0022).select(0xffdc) // FE | xxxxxxxxxx1xxx10 + .rw(FUNC(scorpion_state::spectrum_ula_r), FUNC(scorpion_state::spectrum_ula_w)); + map(0x0023, 0x0023).mirror(0xffdc) // FF | xxxxxxxxxx1xxx11 + .r(FUNC(scorpion_state::floating_bus_r)); + map(0x0021, 0x0021).mirror(0x13fdc) // 1FFD | 00xxxxxxxx1xxx01 + .w(FUNC(scorpion_state::port_1ffd_w)); + map(0x4021, 0x4021).mirror(0x13fdc) // 7FFD | 01xxxxxxxx1xxx01 + .w(FUNC(scorpion_state::port_7ffd_w)); + + map(0xa021, 0xa021).mirror(0x1fdc) // BFFD | 101xxxxxxx1xxx01 + .lw8(NAME([this](u8 data) { m_ay[m_ay_selected]->data_w(data); })); + map(0xe021, 0xe021).mirror(0x1fdc) // FFFD | 111xxxxxxx1xxx01 + .lr8(NAME([this]() { return m_ay[m_ay_selected]->data_r(); })).w(FUNC(scorpion_state::ay_address_w)); + + // Mouse + map(0xfadf, 0xfadf).lr8(NAME([this]() -> u8 { return 0x80 | (m_io_mouse[2]->read() & 0x07); })); + map(0xfbdf, 0xfbdf).lr8(NAME([this]() -> u8 { return m_io_mouse[0]->read(); })); + map(0xffdf, 0xffdf).lr8(NAME([this]() -> u8 { return ~m_io_mouse[1]->read(); })); + map(0x0003, 0x0003) // 1F | xxxxxxxx0x0xxx11 + .select(0xff5c).lr8(NAME([]() -> u8 { return 0xc0; })); // TODO Kepmston Joystick + + // Shadow + // DOS + xxxxxxxx0nnxxx11 + map(0x10003, 0x10003).mirror(0xff1c).rw(m_beta, FUNC(beta_disk_device::status_r), FUNC(beta_disk_device::command_w)); + map(0x10023, 0x10023).mirror(0xff1c).rw(m_beta, FUNC(beta_disk_device::track_r), FUNC(beta_disk_device::track_w)); + map(0x10043, 0x10043).mirror(0xff1c).rw(m_beta, FUNC(beta_disk_device::sector_r), FUNC(beta_disk_device::sector_w)); + map(0x10063, 0x10063).mirror(0xff1c).rw(m_beta, FUNC(beta_disk_device::data_r), FUNC(beta_disk_device::data_w)); + map(0x100e3, 0x100e3).mirror(0xff1c).rw(m_beta, FUNC(beta_disk_device::state_r), FUNC(beta_disk_device::param_w)); +} + +void scorpion_state::scorpion_io(address_map &map) +{ + map(0x0000, 0xffff).lrw8( + NAME([this](offs_t offset) { return m_ioext.read_byte((m_beta->is_active() || BIT(m_port_1ffd_data, 3)) << 16 | offset); }), + NAME([this](offs_t offset, u8 data) { m_ioext.write_byte((m_beta->is_active() || BIT(m_port_1ffd_data, 3)) << 16 | offset, data); })); } void scorpion_state::scorpion_switch(address_map &map) @@ -201,21 +301,28 @@ void scorpion_state::machine_start() spectrum_128_state::machine_start(); save_item(NAME(m_port_1ffd_data)); + save_item(NAME(m_nmi_pending)); + save_item(NAME(m_ay_selected)); + save_item(NAME(m_ram_banks)); + + m_maincpu->space(AS_PROGRAM).specific(m_program); + m_bankio->space(AS_PROGRAM).specific(m_ioext); // reconfigure ROMs memory_region *rom = memregion("maincpu"); - m_bank_rom[0]->configure_entries(0, 4*8, rom->base() + 0x10000, 0x4000); - m_bank_ram[0]->configure_entries(0, m_ram->size() / 0x4000, m_ram->pointer(), 0x4000); - - m_program = &m_maincpu->space(AS_PROGRAM); + m_bank_rom[0]->configure_entries(0, rom->bytes() / 0x4000, rom->base() + 0x10000, 0x4000); + m_ram_banks = m_ram->size() / 0x4000; + m_bank_ram[0]->configure_entries(0, m_ram_banks, m_ram->pointer(), 0x4000); } void scorpion_state::machine_reset() { - m_bank0_rom.select(0); + m_is_m1_even = 1; + m_nmi_pending = 0; + m_ay_selected = 0; m_beta->disable(); - m_port_fe_data = -1; + m_port_fe_data = 255; m_port_7ffd_data = 0; m_port_1ffd_data = 0; @@ -282,25 +389,73 @@ rectangle scorpion_state::get_screen_area() return spectrum_state::get_screen_area(); } +INPUT_PORTS_START( scorpion ) + PORT_INCLUDE( spec_plus ) + + PORT_MODIFY("NMI") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("NMI") PORT_CODE(KEYCODE_F12) PORT_CHANGED_MEMBER(DEVICE_SELF, scorpion_state, on_nmi, 0) + + //PORT_START("TURBO") + //PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Turbo") PORT_CODE(KEYCODE_F12) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, sprinter_state, turbo_changed, 0) + //PORT_BIT(0xfe, IP_ACTIVE_HIGH, IPT_UNUSED) + + + PORT_START("mouse_input1") + PORT_BIT(0xff, 0, IPT_MOUSE_X) PORT_SENSITIVITY(30) + + PORT_START("mouse_input2") + PORT_BIT(0xff, 0, IPT_MOUSE_Y) PORT_SENSITIVITY(30) + + PORT_START("mouse_input3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON4) PORT_NAME("Left mouse button") PORT_CODE(MOUSECODE_BUTTON1) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_BUTTON5) PORT_NAME("Right mouse button") PORT_CODE(MOUSECODE_BUTTON2) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_BUTTON6) PORT_NAME("Middle mouse button") PORT_CODE(MOUSECODE_BUTTON3) + + + PORT_START("MOD_AY") + PORT_CONFNAME(0x01, 0x00, "AY MOD") + PORT_CONFSETTING(0x00, "Single") + PORT_CONFSETTING(0x01, "TurboSound") +INPUT_PORTS_END + void scorpion_state::scorpion(machine_config &config) { // Yellow PCB spectrum(config); m_ram->set_default_size("256K"); - m_maincpu->set_addrmap(AS_PROGRAM, &scorpion_state::scorpion_mem); - m_maincpu->set_addrmap(AS_IO, &scorpion_state::scorpion_io); - m_maincpu->set_addrmap(AS_OPCODES, &scorpion_state::scorpion_switch); + m_maincpu->set_memory_map(&scorpion_state::scorpion_mem); + m_maincpu->set_m1_map(&scorpion_state::scorpion_switch); + m_maincpu->set_io_map(&scorpion_state::scorpion_io); + m_maincpu->set_vblank_int("screen", FUNC(scorpion_state::scorpion_interrupt)); m_maincpu->nomreq_cb().set_nop(); subdevice("gfxdecode")->set_info(gfx_scorpion); - AY8912(config, "ay8912", X1 / 8).add_route(ALL_OUTPUTS, "mono", 0.25); + SPEAKER(config, "lspeaker").front_left(); + SPEAKER(config, "rspeaker").front_right(); + + AY8912(config, m_ay[0], 14_MHz_XTAL / 8) // BAC + .add_route(1, "lspeaker", 0.50) + .add_route(0, "lspeaker", 0.25) + .add_route(0, "rspeaker", 0.25) + .add_route(2, "rspeaker", 0.50); + AY8912(config, m_ay[1], 14_MHz_XTAL / 8) + .add_route(1, "lspeaker", 0.50) + .add_route(0, "lspeaker", 0.25) + .add_route(0, "rspeaker", 0.25) + .add_route(2, "rspeaker", 0.50); BETA_DISK(config, m_beta, 0); - TIMER(config, "nmi_timer").configure_periodic(FUNC(scorpion_state::nmi_check_callback), attotime::from_hz(50)); config.device_remove("exp"); + + ADDRESS_MAP_BANK(config, m_bankio).set_map(&scorpion_state::scorpion_ioext).set_options(ENDIANNESS_LITTLE, 8, 17, 0); + + zxbus_device &zxbus(ZXBUS(config, "zxbus", 0)); + zxbus.set_iospace(m_bankio, AS_PROGRAM); + ZXBUS_SLOT(config, "zxbus:1", 0, "zxbus", zxbus_cards, nullptr); + ZXBUS_SLOT(config, "zxbus:2", 0, "zxbus", zxbus_cards, nullptr); } void scorpion_state::profi(machine_config &config) @@ -316,6 +471,102 @@ void scorpion_state::quorum(machine_config &config) } +/****************************************************************************** + * Scorpion ZS-256 Turbo+ + * ***************************************************************************/ +void scorpiontb_state::ay_address_w(u8 data) +{ + m_ay_reg = data; + scorpion_state::ay_address_w(data); +} + +u8 scorpiontb_state::ay_data_r() +{ + return (m_ay_reg == 0x0e) + ? (((m_port_7ffd_data & 0x10) << 1) | (m_port_1ffd_data & 0x10) | (m_port_7ffd_data & 0x0f)) + : m_ay[m_ay_selected]->data_r(); +} + +void scorpiontb_state::scorpiontb(machine_config &config) +{ + scorpion(config); + + rectangle visarea = { get_screen_area().left() - SPEC_LEFT_BORDER, get_screen_area().right() + SPEC_RIGHT_BORDER, + get_screen_area().top() - SPEC_TOP_BORDER, get_screen_area().bottom() + SPEC_BOTTOM_BORDER }; + m_screen->set_raw(X1 / 2, SPEC_CYCLES_PER_LINE * 2, SPEC_UNSEEN_LINES + SPEC_SCREEN_HEIGHT + 4, visarea); + + m_ram->set_default_size("256K").set_extra_options("1M"); +} + +void scorpiontb_state::scorpion_update_memory() +{ + LOGMEM("romplane %x, ", m_prof_plane); + scorpion_state::scorpion_update_memory(); + m_bank_rom[0]->set_entry((m_prof_plane << 2) | m_bank_rom[0]->entry()); +} + +void scorpiontb_state::machine_start() +{ + scorpion_state::machine_start(); + + save_item(NAME(m_prof_plane)); + save_item(NAME(m_ay_reg)); +} + +void scorpiontb_state::machine_reset() +{ + m_prof_plane = 0; + m_ay_reg = -1; + + scorpion_state::machine_reset(); + m_is_m1_even = 0; + m_maincpu->set_clock_scale(1); +} + +static const u8 prof_plane_map[] = +{ + 0, 1, 2, 3, + 3, 3, 3, 2, + 2, 2, 0, 1, + 1, 0, 1, 0, +}; + +void scorpiontb_state::video_start() +{ + scorpion_state::video_start(); + + address_space &prg = m_maincpu->space(AS_PROGRAM); + prg.install_read_tap(0x0100, 0x010c, "accel_read", [this](offs_t offset, u8 &data, u8 mem_mask) + { + if (!machine().side_effects_disabled() && (m_port_1ffd_data & 0x02)) + { + const u8 offs = offset & 0x000f; + if ((offs == 0) || (offs == 4) || (offs == 8) || (offs == 0x0c)) + { + u8 plane = prof_plane_map[(offset & 0x0c) | (m_prof_plane & 0x03)]; + if (m_prof_plane != plane) + { + m_prof_plane = plane; + scorpion_update_memory(); + } + } + } + }); +} + +void scorpiontb_state::scorpion_ioext(address_map &map) +{ + scorpion_state::scorpion_ioext(map); + map(0x0021, 0x0021).mirror(0x13fdc) // 1FFD | 00xxxxxxxx1xxx01 + .lr8(NAME([this](offs_t offset) { m_maincpu->set_clock_scale(1); return 0xff; })); + map(0x4021, 0x4021).mirror(0x13fdc) // 7FFD | 01xxxxxxxx1xxx01 + .lr8(NAME([this](offs_t offset) { m_maincpu->set_clock_scale(2); return 0xff; })); + map(0xe021, 0xe021).mirror(0x1fdc) // FFFD | 111xxxxxxx1xxx01 + .rw(FUNC(scorpiontb_state::ay_data_r), FUNC(scorpiontb_state::ay_address_w)); + + // Centronics + map(0x0001, 0x0001).mirror(0xffdc).nopw(); +} /*************************************************************************** @@ -325,6 +576,8 @@ void scorpion_state::quorum(machine_config &config) ROM_START(scorpio) ROM_REGION(0x90000, "maincpu", 0) + ROM_DEFAULT_BIOS("v3") + ROM_SYSTEM_BIOS(0, "v1", "V.2.92") ROMX_LOAD("scorp0.rom", 0x010000, 0x4000, CRC(0eb40a09) SHA1(477114ff0fe1388e0979df1423602b21248164e5), ROM_BIOS(0)) ROMX_LOAD("scorp1.rom", 0x014000, 0x4000, CRC(9d513013) SHA1(367b5a102fb663beee8e7930b8c4acc219c1f7b3), ROM_BIOS(0)) @@ -334,26 +587,67 @@ ROM_START(scorpio) ROMX_LOAD( "scorpion.rom", 0x010000, 0x10000, CRC(fef73c28) SHA1(66cecdadf992d8adb9c66deee929eb56600dc9bc), ROM_BIOS(1)) ROM_SYSTEM_BIOS(2, "v3", "V.2.94") ROMX_LOAD( "scorp294.rom", 0x010000, 0x10000, CRC(99f57ce1) SHA1(083bb57ad52cc871b92d3e1794fd9790872c3584), ROM_BIOS(2)) - ROM_SYSTEM_BIOS(3, "v4", "SMUC V.4.02") - ROMX_LOAD( "scorp402.rom", 0x010000, 0x20000, CRC(9fcf893d) SHA1(0cc7ba60f5cfc36e75bd3a5c90e26b2a1905a970), ROM_BIOS(3)) - ROM_SYSTEM_BIOS(4, "v5", "ProfROM V.3.9f") - ROMX_LOAD( "prof_39f.rom", 0x010000, 0x20000, CRC(c55e64da) SHA1(cec7770fe26350f57f6c325a29db78787dc4521e), ROM_BIOS(4)) - ROM_SYSTEM_BIOS(5, "v6", "ProfROM V.4.01") - ROMX_LOAD( "profrom.rom", 0x010000, 0x80000, CRC(b02d89de) SHA1(4cb85341e2a400e0e88869304d80af430266cdd1), ROM_BIOS(5)) - ROM_SYSTEM_BIOS(6, "v7", "NeOS 256") - ROMX_LOAD("neos_256.rom", 0x010000, 0x4000, CRC(364ae09a) SHA1(bb6db1947415503a6bc48f33c603fb3a0dbb3690), ROM_BIOS(6)) - ROMX_LOAD("scorp1.rom", 0x014000, 0x4000, CRC(9d513013) SHA1(367b5a102fb663beee8e7930b8c4acc219c1f7b3), ROM_BIOS(6)) - ROMX_LOAD("scorp2.rom", 0x018000, 0x4000, CRC(fd0d3ce1) SHA1(07783ee295274d8ff15d935bfd787c8ac1d54900), ROM_BIOS(6)) - ROMX_LOAD("scorp3.rom", 0x01c000, 0x4000, CRC(1fe1d003) SHA1(33703e97cc93b7edfcc0334b64233cf81b7930db), ROM_BIOS(6)) + ROM_SYSTEM_BIOS(3, "v4", "NeOS 256") + ROMX_LOAD( "neos_256.rom", 0x010000, 0x4000, CRC(364ae09a) SHA1(bb6db1947415503a6bc48f33c603fb3a0dbb3690), ROM_BIOS(3)) + ROMX_LOAD( "scorp1.rom", 0x014000, 0x4000, CRC(9d513013) SHA1(367b5a102fb663beee8e7930b8c4acc219c1f7b3), ROM_BIOS(3)) + ROMX_LOAD( "scorp2.rom", 0x018000, 0x4000, CRC(fd0d3ce1) SHA1(07783ee295274d8ff15d935bfd787c8ac1d54900), ROM_BIOS(3)) + ROMX_LOAD( "scorp3.rom", 0x01c000, 0x4000, CRC(1fe1d003) SHA1(33703e97cc93b7edfcc0334b64233cf81b7930db), ROM_BIOS(3)) + ROM_SYSTEM_BIOS(4, "scorp_test", "Scorpion Test") + ROMX_LOAD( "scorp_test.rom", 0x010000, 0x10000, CRC(e0230ca7) SHA1(f38e4d23cb29b4ae3fe8b00a52d7b0f9bb845407), ROM_BIOS(4)) + + // This is a ROM for Scorpion emulator which modified in order to hide real hardware details + //ROMX_LOAD( "scorp402.rom", 0x010000, 0x20000, CRC(9fcf893d) SHA1(0cc7ba60f5cfc36e75bd3a5c90e26b2a1905a970)) ROM_REGION(0x01000, "keyboard", 0) ROM_LOAD( "scrpkey.rom", 0x0000, 0x1000, CRC(e938a510) SHA1(2753993c97ff0fc6cff26ed792929abc1288dc6f)) - ROM_REGION(0x010000, "gsound", 0) + ROM_REGION(0x010000, "gsound", 0) // TODO GS connected to ZXBUS ROM_LOAD( "gs104.rom", 0x0000, 0x8000, CRC(7a365ba6) SHA1(c865121306eb3a7d811d82fbcc653b4dc1d6fa3d)) ROM_LOAD( "gs105a.rom", 0x8000, 0x8000, CRC(1cd490c6) SHA1(1ba78923dc7d803e7995c165992e14e4608c2153)) ROM_END +ROM_START(scorpiontb) + ROM_REGION(0x90000, "maincpu", 0) + ROM_DEFAULT_BIOS("v4.01.29lg") + + ROM_SYSTEM_BIOS(0, "v3.9f", "ProfROM V.3.9f") + ROMX_LOAD( "prof_39f.rom", 0x010000, 0x20000, CRC(c55e64da) SHA1(cec7770fe26350f57f6c325a29db78787dc4521e), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "v4.01_01", "ProfROM V.4.01 (No ROM disk)") + ROMX_LOAD( "scorp401_0358765b.rom", 0x010000, 0x40000, CRC(0358765b) SHA1(414c21a4d01fafb6ee1752a51b79bb2f82091625), ROM_BIOS(1)) + ROM_SYSTEM_BIOS(2, "v4.01_02", "ProfROM V.4.01 (ZxUnZip, ZxZip, TASM 4.0, SM 2.01, HD Copy 1.7, Test FDD)") + ROMX_LOAD( "scorp401_520f4c15.rom", 0x010000, 0x40000, CRC(520f4c15) SHA1(8a877b06e69e829b99e06be0ba48bc0fe6458672), ROM_BIOS(2)) + ROM_SYSTEM_BIOS(3, "v4.01_03", "ProfROM V.4.01 (Fatall 0.25, SCBoot 1.5, MagOS 6.3)") + ROMX_LOAD( "scorp401_749516c5.rom", 0x010000, 0x40000, CRC(749516c5) SHA1(712535c4eec26224f39650e4740db131b2d0ed14), ROM_BIOS(3)) + ROM_SYSTEM_BIOS(4, "v4.01_04", "ProfROM V.4.01 (Fatall 0.2)") + ROMX_LOAD( "scorp401_809c249d.rom", 0x010000, 0x40000, CRC(809c249d) SHA1(1e7ea10aeadb33a7d363809ccf31d43a0a8670ac), ROM_BIOS(4)) + ROM_SYSTEM_BIOS(5, "v4.01_05", "ProfROM V.4.01 (ZxUnZip, ZxZip, TASM 4.0, SM 2.01, HD Copy 1.7, TestFDD)") + ROMX_LOAD( "scorp401_847a66e4.rom", 0x010000, 0x40000, CRC(847a66e4) SHA1(a01522cadf18c087f32c1997c5c2e889290921fa), ROM_BIOS(5)) + ROM_SYSTEM_BIOS(6, "v4.01_06", "ProfROM V.4.01 (MagOS 6.3, Real Comm 2.6F, TRDNavig 0.75b, ZXunzip 1.2x, Cat HDD, Test ...)") + ROMX_LOAD( "scorp401_91f513ab.rom", 0x010000, 0x40000, CRC(91f513ab) SHA1(e2b8941591e77c1d35b811a6724b31ff3486d42d), ROM_BIOS(6)) + ROM_SYSTEM_BIOS(7, "v4.01_07", "ProfROM V.4.01 (Commander, ZWord, MAGOS 6.3, STS 5.1, ADS 2.01, FPM 3.05, Ztool)") + ROMX_LOAD( "scorp401_98275049.rom", 0x010000, 0x40000, CRC(98275049) SHA1(a7518915293a82b70b2fd5261ef886c4dd33fa9b), ROM_BIOS(7)) + ROM_SYSTEM_BIOS(8, "v4.01_08", "ProfROM V.4.01 (Fatall 0.25, Test Scorpion, TASM 4.0, SCBoot, Chess Psion, Tetris, Chuckie Egg, Bomber)") + ROMX_LOAD( "scorp401_a3b10c26.rom", 0x010000, 0x40000, CRC(a3b10c26) SHA1(945a671183402eee99f852eab93e28a93a81b575), ROM_BIOS(8)) + ROM_SYSTEM_BIOS(9, "v4.01_09", "ProfROM V.4.01 (Fatall 0.25, SCBoot 1.5, MagOS 6.3, Real Command 2.6)") + ROMX_LOAD( "scorp401_e5476776.rom", 0x010000, 0x40000, CRC(e5476776) SHA1(3dcff254f5bbc1e6c6a5319d21ebbd5c7d65077c), ROM_BIOS(9)) + ROM_SYSTEM_BIOS(10, "v4.01_10", "ProfROM V.4.01 (Fatall 0.25, SCBoot 1.5, Wild Player 3.3, Best View 2.19)") + ROMX_LOAD( "scorp401_e8900ba7.rom", 0x010000, 0x40000, CRC(e8900ba7) SHA1(5caa403036cc2268db2c35077902e3f432f3c779), ROM_BIOS(10)) + ROM_SYSTEM_BIOS(11, "v4.01.15", "ProfROM V.4.xx.015") + ROMX_LOAD( "prof4xx015.rom", 0x010000, 0x40000, CRC(5d4ba991) SHA1(2d1f0bd95909cdff32a96ab55b4bcae547e20bd1), ROM_BIOS(11)) + ROM_SYSTEM_BIOS(12, "v4.01.15lg", "ProfROM V.4.xx.015 (Basic Looking Glass)") + ROMX_LOAD( "prof4xx015lg.rom", 0x010000, 0x40000, CRC(3b450ceb) SHA1(e1af7110ad89764ac020c636ab835c39ada061c0), ROM_BIOS(12)) + ROM_SYSTEM_BIOS(13, "v4.01.27", "ProfROM V.4.xx.027") + ROMX_LOAD( "prof4xx027.rom", 0x010000, 0x40000, CRC(8da39bed) SHA1(39a601d8af62df95efd5a514b53a4a07571befab), ROM_BIOS(13)) + ROM_SYSTEM_BIOS(14, "v4.01.27lg", "ProfROM V.4.xx.027 (Basic Looking Glass)") + ROMX_LOAD( "prof4xx027lg.rom", 0x010000, 0x40000, CRC(50be8b57) SHA1(fa930ec7efe8eee641c889a0ce2ae16f03ebc1f4), ROM_BIOS(14)) + ROM_SYSTEM_BIOS(15, "v4.01.29", "ProfROM V.4.xx.029") + ROMX_LOAD( "prof4xx029.rom", 0x010000, 0x40000, CRC(aebe12a3) SHA1(31c5481587554a8173016ccda46e1490cbd9fa5c), ROM_BIOS(15)) + ROM_SYSTEM_BIOS(16, "v4.01.29lg", "ProfROM V.4.xx.029 (Basic Looking Glass)") + ROMX_LOAD( "prof4xx029lg.rom", 0x010000, 0x40000, CRC(1ae71a4c) SHA1(c7d8f20134f5623f2498feea5c9efbcb2fd686a3), ROM_BIOS(16)) + ROM_SYSTEM_BIOS(17, "scorp_test", "Scorpion Test") + ROMX_LOAD( "scorp_test.rom", 0x010000, 0x10000, CRC(e0230ca7) SHA1(f38e4d23cb29b4ae3fe8b00a52d7b0f9bb845407), ROM_BIOS(17)) +ROM_END + ROM_START(profi) ROM_REGION(0x020000, "maincpu", 0) ROM_SYSTEM_BIOS(0, "v1", "ver 1") @@ -396,9 +690,10 @@ ROM_END } // Anonymous namespace -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1994, scorpio, spec128, 0, scorpion, spec_plus, scorpion_state, empty_init, "Zonov and Co.", "Scorpion ZS-256", 0 ) -COMP( 1991, profi, spec128, 0, profi, spec_plus, scorpion_state, empty_init, "Kondor and Kramis", "Profi", MACHINE_NOT_WORKING ) -COMP( 1998, kay1024, spec128, 0, scorpion, spec_plus, scorpion_state, empty_init, "NEMO", "Kay 1024", MACHINE_NOT_WORKING ) -COMP( 19??, quorum, spec128, 0, quorum, spec_plus, scorpion_state, empty_init, "", "Quorum", MACHINE_NOT_WORKING ) -COMP( 19??, bestzx, spec128, 0, scorpion, spec_plus, scorpion_state, empty_init, "", "BestZX", MACHINE_NOT_WORKING ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1992, scorpio, spec128, 0, scorpion, scorpion, scorpion_state, empty_init, "Scorpion, Ltd.", "Scorpion ZS-256 (Yellow PCB)", 0 ) +COMP( 1996, scorpiontb, spec128, 0, scorpiontb, scorpion, scorpiontb_state, empty_init, "Scorpion, Ltd.", "Scorpion ZS-256 TURBO+", 0 ) +COMP( 1991, profi, spec128, 0, profi, scorpion, scorpion_state, empty_init, "Kondor and Kramis", "Profi", MACHINE_NOT_WORKING ) +COMP( 1998, kay1024, spec128, 0, scorpion, scorpion, scorpion_state, empty_init, "NEMO", "Kay 1024", MACHINE_NOT_WORKING ) +COMP( 19??, quorum, spec128, 0, quorum, scorpion, scorpion_state, empty_init, "", "Quorum", MACHINE_NOT_WORKING ) +COMP( 19??, bestzx, spec128, 0, scorpion, scorpion, scorpion_state, empty_init, "", "BestZX", MACHINE_NOT_WORKING ) diff --git a/src/mame/sinclair/tsconf.cpp b/src/mame/sinclair/tsconf.cpp index 21e9a2ccf99..82fd1937a49 100644 --- a/src/mame/sinclair/tsconf.cpp +++ b/src/mame/sinclair/tsconf.cpp @@ -91,9 +91,9 @@ void tsconf_state::tsconf_io(address_map &map) map(0x00fe, 0x00fe).select(0xff00).rw(FUNC(tsconf_state::spectrum_ula_r), FUNC(tsconf_state::tsconf_ula_w)); map(0x00ff, 0x00ff).mirror(0xff00).rw(m_beta, FUNC(beta_disk_device::state_r), FUNC(beta_disk_device::param_w)); map(0x00af, 0x00af).select(0xff00).rw(FUNC(tsconf_state::tsconf_port_xxaf_r), FUNC(tsconf_state::tsconf_port_xxaf_w)); - map(0xfadf, 0xfadf).lr8(NAME([this]() { return 0x80 | (m_io_mouse[2]->read() & 0x07); })); - map(0xfbdf, 0xfbdf).lr8(NAME([this]() { return m_io_mouse[0]->read(); })); - map(0xffdf, 0xffdf).lr8(NAME([this]() { return ~m_io_mouse[1]->read(); })); + map(0xfadf, 0xfadf).lr8(NAME([this]() -> u8 { return 0x80 | (m_io_mouse[2]->read() & 0x07); })); + map(0xfbdf, 0xfbdf).lr8(NAME([this]() -> u8 { return m_io_mouse[0]->read(); })); + map(0xffdf, 0xffdf).lr8(NAME([this]() -> u8 { return ~m_io_mouse[1]->read(); })); map(0x8ff7, 0x8ff7).select(0x7000).w(FUNC(tsconf_state::tsconf_port_f7_w)); // 3:bff7 5:dff7 6:eff7 map(0xbff7, 0xbff7).r(FUNC(tsconf_state::tsconf_port_f7_r)); map(0x00fb, 0x00fb).mirror(0xff00).w("cent_data_out", FUNC(output_latch_device::write)); -- cgit v1.2.3