diff options
106 files changed, 3159 insertions, 903 deletions
diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index e1bf27c50b9..d77fe8c5d63 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -2142,6 +2142,29 @@ end --------------------------------------------------- -- +--@src/devices/bus/nscsi/cd.h,BUSES["NSCSI"] = true +--@src/devices/bus/nscsi/devices.h,BUSES["NSCSI"] = true +--@src/devices/bus/nscsi/hd.h,BUSES["NSCSI"] = true +--@src/devices/bus/nscsi/s1410.h,BUSES["NSCSI"] = true +--------------------------------------------------- + +if (BUSES["NSCSI"]~=null) then + files { + MAME_DIR .. "src/devices/bus/nscsi/cd.cpp", + MAME_DIR .. "src/devices/bus/nscsi/cd.h", + MAME_DIR .. "src/devices/bus/nscsi/cw7501.cpp", + MAME_DIR .. "src/devices/bus/nscsi/cw7501.h", + MAME_DIR .. "src/devices/bus/nscsi/devices.cpp", + MAME_DIR .. "src/devices/bus/nscsi/devices.h", + MAME_DIR .. "src/devices/bus/nscsi/hd.cpp", + MAME_DIR .. "src/devices/bus/nscsi/hd.h", + MAME_DIR .. "src/devices/bus/nscsi/s1410.cpp", + MAME_DIR .. "src/devices/bus/nscsi/s1410.h", + } +end + +--------------------------------------------------- +-- --@src/devices/bus/nubus/nubus.h,BUSES["NUBUS"] = true --------------------------------------------------- diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua index 169f3d95a84..e21c03279e8 100644 --- a/scripts/src/machine.lua +++ b/scripts/src/machine.lua @@ -2224,9 +2224,6 @@ end -- --@src/devices/machine/nscsi_bus.h,MACHINES["NSCSI"] = true --@src/devices/machine/nscsi_cb.h,MACHINES["NSCSI"] = true ---@src/devices/machine/nscsi_cd.h,MACHINES["NSCSI"] = true ---@src/devices/machine/nscsi_hd.h,MACHINES["NSCSI"] = true ---@src/devices/machine/nscsi_s1410.h,MACHINES["NSCSI"] = true --------------------------------------------------- if (MACHINES["NSCSI"]~=null) then @@ -2235,12 +2232,6 @@ if (MACHINES["NSCSI"]~=null) then MAME_DIR .. "src/devices/machine/nscsi_bus.h", MAME_DIR .. "src/devices/machine/nscsi_cb.cpp", MAME_DIR .. "src/devices/machine/nscsi_cb.h", - MAME_DIR .. "src/devices/machine/nscsi_cd.cpp", - MAME_DIR .. "src/devices/machine/nscsi_cd.h", - MAME_DIR .. "src/devices/machine/nscsi_hd.cpp", - MAME_DIR .. "src/devices/machine/nscsi_hd.h", - MAME_DIR .. "src/devices/machine/nscsi_s1410.cpp", - MAME_DIR .. "src/devices/machine/nscsi_s1410.h", } end diff --git a/scripts/target/mame/arcade.lua b/scripts/target/mame/arcade.lua index 70176340ecd..4430d442e01 100644 --- a/scripts/target/mame/arcade.lua +++ b/scripts/target/mame/arcade.lua @@ -732,6 +732,7 @@ BUSES["MIDI"] = true BUSES["NEOGEO"] = true BUSES["NEOGEO_CTRL"] = true --BUSES["NES"] = true +BUSES["NSCSI"] = true --BUSES["NUBUS"] = true --BUSES["O2"] = true --BUSES["ORICEXT"] = true diff --git a/scripts/target/mame/mess.lua b/scripts/target/mame/mess.lua index e4e610ac7d0..8d4203790e8 100644 --- a/scripts/target/mame/mess.lua +++ b/scripts/target/mame/mess.lua @@ -808,6 +808,7 @@ BUSES["NEOGEO_CTRL"] = true BUSES["NES"] = true BUSES["NES_CTRL"] = true BUSES["NEWBRAIN"] = true +BUSES["NSCSI"] = true BUSES["NUBUS"] = true BUSES["O2"] = true BUSES["ORICEXT"] = true diff --git a/src/devices/bus/a2bus/a2hsscsi.cpp b/src/devices/bus/a2bus/a2hsscsi.cpp index 83455dc913a..98c612dae78 100644 --- a/src/devices/bus/a2bus/a2hsscsi.cpp +++ b/src/devices/bus/a2bus/a2hsscsi.cpp @@ -40,8 +40,7 @@ #include "emu.h" #include "a2hsscsi.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/devices.h" /*************************************************************************** PARAMETERS @@ -57,13 +56,6 @@ DEFINE_DEVICE_TYPE(A2BUS_HSSCSI, a2bus_hsscsi_device, "a2hsscsi", "Apple II High #define SCSI_BUS_TAG "scsibus" #define SCSI_5380_TAG "scsibus:7:ncr5380" -static void hsscsi_devices(device_slot_interface &device) -{ - device.option_add("cdrom", NSCSI_CDROM); - device.option_add("harddisk", NSCSI_HARDDISK); - device.option_add_internal("ncr5380", NCR53C80); -} - ROM_START( hsscsi ) ROM_REGION(0x8000, SCSI_ROM_REGION, 0) ROM_LOAD( "341-0803.bin", 0x0000, 0x8000, CRC(2c15618b) SHA1(7d32227299933bfc1b7f8bc2062906fdfe530674) ) @@ -80,14 +72,14 @@ ROM_END void a2bus_hsscsi_device::device_add_mconfig(machine_config &config) { NSCSI_BUS(config, m_scsibus); - NSCSI_CONNECTOR(config, "scsibus:0", hsscsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsibus:1", hsscsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsibus:2", hsscsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsibus:3", hsscsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsibus:4", hsscsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsibus:5", hsscsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsibus:6", hsscsi_devices, "harddisk", false); - NSCSI_CONNECTOR(config, "scsibus:7", hsscsi_devices, "ncr5380", true).set_option_machine_config("ncr5380", [this](device_t *device) { + NSCSI_CONNECTOR(config, "scsibus:0", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsibus:1", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsibus:2", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsibus:3", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsibus:4", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsibus:5", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsibus:6", default_scsi_devices, "harddisk", false); + NSCSI_CONNECTOR(config, "scsibus:7").option_set("ncr5380", NCR53C80).machine_config([this](device_t *device) { downcast<ncr53c80_device &>(*device).drq_handler().set(*this, FUNC(a2bus_hsscsi_device::drq_w)); }); } diff --git a/src/devices/bus/a2bus/a2scsi.cpp b/src/devices/bus/a2bus/a2scsi.cpp index 87e7c86dddc..9c3e4bc6c85 100644 --- a/src/devices/bus/a2bus/a2scsi.cpp +++ b/src/devices/bus/a2bus/a2scsi.cpp @@ -33,8 +33,7 @@ #include "emu.h" #include "a2scsi.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/devices.h" /*************************************************************************** PARAMETERS @@ -50,13 +49,6 @@ DEFINE_DEVICE_TYPE(A2BUS_SCSI, a2bus_scsi_device, "a2scsi", "Apple II SCSI Card" #define SCSI_BUS_TAG "scsibus" #define SCSI_5380_TAG "scsibus:7:ncr5380" -static void scsi_devices(device_slot_interface &device) -{ - device.option_add("cdrom", NSCSI_CDROM_APPLE); - device.option_add("harddisk", NSCSI_HARDDISK); - device.option_add_internal("ncr5380", NCR5380N); -} - ROM_START( scsi ) ROM_REGION(0x4000, SCSI_ROM_REGION, 0) // this is the Rev. C ROM ROM_LOAD( "341-0437-a.bin", 0x0000, 0x4000, CRC(5aff85d3) SHA1(451c85c46b92e6ad2ad930f055ccf0fe3049936d) ) @@ -73,14 +65,14 @@ ROM_END void a2bus_scsi_device::device_add_mconfig(machine_config &config) { NSCSI_BUS(config, m_scsibus); - NSCSI_CONNECTOR(config, "scsibus:0", scsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsibus:1", scsi_devices, "cdrom", false); - NSCSI_CONNECTOR(config, "scsibus:2", scsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsibus:3", scsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsibus:4", scsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsibus:5", scsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsibus:6", scsi_devices, "harddisk", false); - NSCSI_CONNECTOR(config, "scsibus:7", scsi_devices, "ncr5380", true).set_option_machine_config("ncr5380", [this](device_t *device) { + NSCSI_CONNECTOR(config, "scsibus:0", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsibus:1", default_scsi_devices, "cdrom", false); + NSCSI_CONNECTOR(config, "scsibus:2", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsibus:3", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsibus:4", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsibus:5", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsibus:6", default_scsi_devices, "harddisk", false); + NSCSI_CONNECTOR(config, "scsibus:7").option_set("ncr5380", NCR5380N).machine_config([this](device_t *device) { downcast<ncr5380n_device &>(*device).drq_handler().set(*this, FUNC(a2bus_scsi_device::drq_w)); }); } diff --git a/src/devices/bus/amiga/zorro/a590.cpp b/src/devices/bus/amiga/zorro/a590.cpp index 045a0eab7c8..01975c4a6ad 100644 --- a/src/devices/bus/amiga/zorro/a590.cpp +++ b/src/devices/bus/amiga/zorro/a590.cpp @@ -11,8 +11,7 @@ #include "emu.h" #include "a590.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/devices.h" //************************************************************************** @@ -115,12 +114,6 @@ ioport_constructor a2091_device::device_input_ports() const // device_add_mconfig - add device configuration //------------------------------------------------- -void dmac_hdc_device::scsi_devices(device_slot_interface &device) -{ - device.option_add("cdrom", NSCSI_CDROM); - device.option_add("harddisk", NSCSI_HARDDISK); -} - void dmac_hdc_device::wd33c93(device_t *device) { device->set_clock(10000000); @@ -137,12 +130,12 @@ void dmac_hdc_device::device_add_mconfig(machine_config &config) dmac.cfgout_handler().set(FUNC(dmac_hdc_device::dmac_cfgout_w)); NSCSI_BUS(config, "scsi", 0); - NSCSI_CONNECTOR(config, "scsi:0", scsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsi:1", scsi_devices, "harddisk", false); - NSCSI_CONNECTOR(config, "scsi:3", scsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsi:4", scsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsi:5", scsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsi:6", scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, "harddisk", false); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr, false); NSCSI_CONNECTOR(config, "scsi:7").option_set("wd33c93", WD33C93A) .machine_config([this](device_t *device) { wd33c93(device); }); } diff --git a/src/devices/bus/gamegear/ggext.cpp b/src/devices/bus/gamegear/ggext.cpp index a886abe67f2..99d464e87b7 100644 --- a/src/devices/bus/gamegear/ggext.cpp +++ b/src/devices/bus/gamegear/ggext.cpp @@ -8,6 +8,7 @@ **********************************************************************/ #include "emu.h" +#include "screen.h" #include "ggext.h" // slot devices #include "smsctrladp.h" @@ -58,6 +59,7 @@ device_gg_ext_port_interface::~device_gg_ext_port_interface() gg_ext_port_device::gg_ext_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, GG_EXT_PORT, tag, owner, clock), device_slot_interface(mconfig, *this), + m_screen(*this, finder_base::DUMMY_TAG), m_device(nullptr), m_th_pin_handler(*this) { diff --git a/src/devices/bus/gamegear/ggext.h b/src/devices/bus/gamegear/ggext.h index 89dd235a9b0..f2145e694fd 100644 --- a/src/devices/bus/gamegear/ggext.h +++ b/src/devices/bus/gamegear/ggext.h @@ -65,6 +65,11 @@ public: void th_pin_w(int state); + template <typename T> void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward<T>(tag)); } + + // for peripherals that interact with the machine's screen + required_device<screen_device> m_screen; + //protected: // device-level overrides virtual void device_start() override; diff --git a/src/devices/bus/gamegear/smsctrladp.cpp b/src/devices/bus/gamegear/smsctrladp.cpp index 7260894e8f7..8308c55d81a 100644 --- a/src/devices/bus/gamegear/smsctrladp.cpp +++ b/src/devices/bus/gamegear/smsctrladp.cpp @@ -77,6 +77,7 @@ WRITE_LINE_MEMBER( sms_ctrl_adaptor_device::th_pin_w ) void sms_ctrl_adaptor_device::device_add_mconfig(machine_config &config) { SMS_CONTROL_PORT(config, m_subctrl_port, sms_control_port_devices, "joypad"); + m_subctrl_port->set_screen_tag(m_port->m_screen); m_subctrl_port->th_input_handler().set(FUNC(sms_ctrl_adaptor_device::th_pin_w)); } diff --git a/src/devices/bus/hp_dio/hp98265a.cpp b/src/devices/bus/hp_dio/hp98265a.cpp index c5c28eeda6b..623f2d00be1 100644 --- a/src/devices/bus/hp_dio/hp98265a.cpp +++ b/src/devices/bus/hp_dio/hp98265a.cpp @@ -10,8 +10,7 @@ #include "hp98265a.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/devices.h" #include "machine/mb87030.h" #define VERBOSE 0 @@ -22,12 +21,6 @@ DEFINE_DEVICE_TYPE_NS(HPDIO_98265A, bus::hp_dio, dio16_98265a_device, "hp98265a" namespace bus { namespace hp_dio { -static void scsi_devices(device_slot_interface &device) -{ - device.option_add("cdrom", NSCSI_CDROM); - device.option_add("harddisk", NSCSI_HARDDISK); -} - void dio16_98265a_device::mb87030_scsi_adapter(device_t *device) { mb87030_device &spc = downcast<mb87030_device &>(*device); @@ -41,19 +34,19 @@ void dio16_98265a_device::device_add_mconfig(machine_config &config) { NSCSI_BUS(config, m_scsibus, 0); nscsi_connector &scsicon0(NSCSI_CONNECTOR(config, "scsibus:0", 0)); - scsi_devices(scsicon0); + default_scsi_devices(scsicon0); scsicon0.set_default_option("harddisk"); - scsi_devices(NSCSI_CONNECTOR(config, "scsibus:1", 0)); - scsi_devices(NSCSI_CONNECTOR(config, "scsibus:2", 0)); - scsi_devices(NSCSI_CONNECTOR(config, "scsibus:3", 0)); - scsi_devices(NSCSI_CONNECTOR(config, "scsibus:4", 0)); + default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:1", 0)); + default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:2", 0)); + default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:3", 0)); + default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:4", 0)); nscsi_connector &scsicon6(NSCSI_CONNECTOR(config, "scsibus:5", 0)); - scsi_devices(scsicon6); + default_scsi_devices(scsicon6); scsicon6.set_default_option("cdrom"); - scsi_devices(NSCSI_CONNECTOR(config, "scsibus:6", 0)); + default_scsi_devices(NSCSI_CONNECTOR(config, "scsibus:6", 0)); nscsi_connector &scsicon7(NSCSI_CONNECTOR(config, "scsibus:7", 0)); scsicon7.option_add_internal("mb87030", MB87030); scsicon7.set_default_option("mb87030"); diff --git a/src/devices/bus/isa/aha1542b.cpp b/src/devices/bus/isa/aha1542b.cpp index dd4a011f82f..f1b26839fd1 100644 --- a/src/devices/bus/isa/aha1542b.cpp +++ b/src/devices/bus/isa/aha1542b.cpp @@ -12,10 +12,10 @@ #include "emu.h" #include "aha1542b.h" +#include "bus/nscsi/devices.h" #include "cpu/i8085/i8085.h" #include "machine/gen_latch.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_hd.h" DEFINE_DEVICE_TYPE(AHA1542A, aha1542a_device, "aha1542a", "AHA-1542A SCSI Controller") @@ -450,12 +450,6 @@ ioport_constructor aha1542b_device::device_input_ports() const return INPUT_PORTS_NAME(aha1542b); } -static void aha154x_scsi_devices(device_slot_interface &device) -{ - device.option_add("harddisk", NSCSI_HARDDISK); - device.option_add_internal("scsic", AIC6250); -} - void aha154x_device::scsic_config(device_t *device) { device->set_clock(20'000'000); @@ -468,15 +462,15 @@ void aha154x_device::scsic_config(device_t *device) void aha154x_device::scsi_add(machine_config &config) { NSCSI_BUS(config, "scsi"); - NSCSI_CONNECTOR(config, "scsi:0", aha154x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:1", aha154x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:2", aha154x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:3", aha154x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:4", aha154x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:5", aha154x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:6", aha154x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:7", aha154x_scsi_devices, "scsic", true) - .set_option_machine_config("scsic", [this] (device_t *device) { scsic_config(device); }); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:7").option_set("scsic", AIC6250) + .machine_config([this] (device_t *device) { scsic_config(device); }); } void aha1542a_device::device_add_mconfig(machine_config &config) diff --git a/src/devices/bus/isa/aha174x.cpp b/src/devices/bus/isa/aha174x.cpp index f650e9efdf8..1b212fe6ae2 100644 --- a/src/devices/bus/isa/aha174x.cpp +++ b/src/devices/bus/isa/aha174x.cpp @@ -33,10 +33,10 @@ #include "emu.h" #include "aha174x.h" +#include "bus/nscsi/devices.h" #include "machine/aic6250.h" #include "machine/i82355.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_hd.h" DEFINE_DEVICE_TYPE(AHA1740, aha1740_device, "aha1740", "AHA-1740 Fast SCSI Host Adapter") DEFINE_DEVICE_TYPE(AHA1742A, aha1742a_device, "aha1742a", "AHA-1742A Fast SCSI Host Adapter") @@ -80,12 +80,6 @@ void aha174x_device::hpc_map(address_map &map) map(0x8000, 0xffff).rom().region("mcode", 0); } -static void aha174x_scsi_devices(device_slot_interface &device) -{ - device.option_add("harddisk", NSCSI_HARDDISK); - device.option_add_internal("scsic", AIC6251A); -} - void aha174x_device::scsic_config(device_t *device) { device->set_clock(40_MHz_XTAL / 2); // divider not verified @@ -107,15 +101,15 @@ void aha1740_device::device_add_mconfig(machine_config &config) IDT7201(config, m_fifo[1]); NSCSI_BUS(config, "scsi"); - NSCSI_CONNECTOR(config, "scsi:0", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:1", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:2", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:3", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:4", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:5", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:6", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:7", aha174x_scsi_devices, "scsic", true) - .set_option_machine_config("scsic", [this] (device_t *device) { scsic_config(device); }); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:7").option_set("scsic", AIC6251A) + .machine_config([this] (device_t *device) { scsic_config(device); }); } void aha1742a_device::device_add_mconfig(machine_config &config) @@ -134,15 +128,15 @@ void aha1742a_device::device_add_mconfig(machine_config &config) IDT7201(config, m_fifo[1]); NSCSI_BUS(config, "scsi"); - NSCSI_CONNECTOR(config, "scsi:0", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:1", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:2", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:3", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:4", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:5", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:6", aha174x_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:7", aha174x_scsi_devices, "scsic", true) - .set_option_machine_config("scsic", [this] (device_t *device) { scsic_config(device); }); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:7").option_set("scsic", AIC6251A) + .machine_config([this] (device_t *device) { scsic_config(device); }); N82077AA(config, m_fdc, 24_MHz_XTAL); } diff --git a/src/devices/bus/isa/asc88.cpp b/src/devices/bus/isa/asc88.cpp index 00db6f498d5..c04570725f8 100644 --- a/src/devices/bus/isa/asc88.cpp +++ b/src/devices/bus/isa/asc88.cpp @@ -16,8 +16,8 @@ #include "emu.h" #include "asc88.h" +#include "bus/nscsi/devices.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_hd.h" DEFINE_DEVICE_TYPE(ASC88, asc88_device, "asc88", "ASC-88 SCSI Adapter") @@ -150,12 +150,6 @@ ioport_constructor asc88_device::device_input_ports() const return INPUT_PORTS_NAME(asc88); } -static void asc88_scsi_devices(device_slot_interface &device) -{ - device.option_add("harddisk", NSCSI_HARDDISK); - device.option_add_internal("scsic", NCR5380N); -} - void asc88_device::scsic_config(device_t *device) { downcast<ncr5380n_device &>(*device).irq_handler().set("^^", FUNC(asc88_device::irq_w)); @@ -165,15 +159,16 @@ void asc88_device::scsic_config(device_t *device) void asc88_device::device_add_mconfig(machine_config &config) { NSCSI_BUS(config, "scsi"); - NSCSI_CONNECTOR(config, "scsi:0", asc88_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:1", asc88_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:2", asc88_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:3", asc88_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:4", asc88_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:5", asc88_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:6", asc88_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:7", asc88_scsi_devices, "scsic", true) - .set_option_machine_config("scsic", [this] (device_t *device) { scsic_config(device); }); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:7", default_scsi_devices, "scsic", true) + .option_add_internal("scsic", NCR5380N) + .machine_config([this] (device_t *device) { scsic_config(device); }); EEPROM_93C06_16BIT(config, m_eeprom); // NMC9306N } diff --git a/src/devices/bus/isa/bt54x.cpp b/src/devices/bus/isa/bt54x.cpp index d8ef31a848f..1c3c4bdf3f1 100644 --- a/src/devices/bus/isa/bt54x.cpp +++ b/src/devices/bus/isa/bt54x.cpp @@ -17,10 +17,9 @@ #include "emu.h" #include "bt54x.h" +#include "bus/nscsi/devices.h" #include "machine/ncr5390.h" //#include "machine/ncr86c05.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" DEFINE_DEVICE_TYPE(BT542B, bt542b_device, "bt542b", "BusTek BT-542B SCSI Host Adapter") // Rev. G or earlier DEFINE_DEVICE_TYPE(BT542BH, bt542bh_device, "bt542bh", "BusLogic BT-542B SCSI Host Adapter (Rev. H)") @@ -68,20 +67,6 @@ void bt54x_device::local_map(address_map &map) map(0xf8000, 0xfffff).rom().region("mpu", 0); } -static void scsi_devices(device_slot_interface &device) -{ - device.option_add("cdrom", NSCSI_CDROM); - device.option_add("harddisk", NSCSI_HARDDISK); - device.option_add_internal("scsic", NCR53C94); -} - -static void fast_scsi_devices(device_slot_interface &device) -{ - device.option_add("cdrom", NSCSI_CDROM); - device.option_add("harddisk", NSCSI_HARDDISK); - device.option_add_internal("scsic", NCR53CF94); // FAS216 -} - void bt54x_device::asc_config(device_t *device) { ncr53c94_device &asc = downcast<ncr53c94_device &>(*device); @@ -109,14 +94,16 @@ void bt54x_device::fsc_base(machine_config &config) //busintf.dma_ack_callback().set("scsi:7:scsic", FUNC(ncr53cf94_device::dma_w)); NSCSI_BUS(config, "scsi"); - NSCSI_CONNECTOR(config, "scsi:0", fast_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:1", fast_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:2", fast_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:3", fast_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:4", fast_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:5", fast_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:6", fast_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:7", fast_scsi_devices, "scsic", true).set_option_machine_config("scsic", [this] (device_t *device) { fsc_config(device); }); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:7", default_scsi_devices, "scsic", true) + .option_add_internal("scsic", NCR53CF94) // FAS216 + .machine_config([this] (device_t *device) { fsc_config(device); }); } void bt542b_device::device_add_mconfig(machine_config &config) @@ -129,14 +116,16 @@ void bt542b_device::device_add_mconfig(machine_config &config) //busintf.dma_ack_callback().set("scsi:7:scsic", FUNC(ncr53c94_device::dma_w)); NSCSI_BUS(config, "scsi"); - NSCSI_CONNECTOR(config, "scsi:0", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:1", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:2", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:3", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:4", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:5", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:6", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:7", scsi_devices, "scsic", true).set_option_machine_config("scsic", [this] (device_t *device) { asc_config(device); }); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:7", default_scsi_devices, "scsic", true) + .option_add_internal("scsic", NCR53C94) + .machine_config([this] (device_t *device) { asc_config(device); }); DP8473(config, m_fdc, 24_MHz_XTAL); } diff --git a/src/devices/bus/isa/tekram_dc820.cpp b/src/devices/bus/isa/tekram_dc820.cpp index ab2375856ce..56ffd8e4ccb 100644 --- a/src/devices/bus/isa/tekram_dc820.cpp +++ b/src/devices/bus/isa/tekram_dc820.cpp @@ -23,11 +23,11 @@ #include "emu.h" #include "tekram_dc820.h" +#include "bus/nscsi/devices.h" #include "cpu/i86/i186.h" #include "machine/i82355.h" #include "machine/ncr5390.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_hd.h" DEFINE_DEVICE_TYPE(TEKRAM_DC320B, tekram_dc320b_device, "dc320b", "Tekram DC-320B SCSI Controller") DEFINE_DEVICE_TYPE(TEKRAM_DC320E, tekram_dc320e_device, "dc320e", "Tekram DC-320E SCSI Controller") @@ -192,12 +192,6 @@ void tekram_dc820_device::mpu_map(address_map &map) map(0xf0000, 0xfffff).rom().region("firmware", 0); } -static void tekram_scsi_devices(device_slot_interface &device) -{ - device.option_add("harddisk", NSCSI_HARDDISK); - device.option_add_internal("scsic", NCR53CF94); // or Emulex FAS216 -} - void tekram_eisa_scsi_device::scsic_config(device_t *device) { device->set_clock(40_MHz_XTAL); @@ -207,15 +201,15 @@ void tekram_eisa_scsi_device::scsic_config(device_t *device) void tekram_eisa_scsi_device::scsi_add(machine_config &config) { NSCSI_BUS(config, "scsi"); - NSCSI_CONNECTOR(config, "scsi:0", tekram_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:1", tekram_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:2", tekram_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:3", tekram_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:4", tekram_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:5", tekram_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:6", tekram_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:7", tekram_scsi_devices, "scsic", true) - .set_option_machine_config("scsic", [this] (device_t *device) { scsic_config(device); }); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:7").option_set("scsic", NCR53CF94) // or Emulex FAS216 + .machine_config([this] (device_t *device) { scsic_config(device); }); } void tekram_dc320b_device::device_add_mconfig(machine_config &config) diff --git a/src/devices/bus/isa/ultra14f.cpp b/src/devices/bus/isa/ultra14f.cpp index 3ae8cb79811..8b60f908139 100644 --- a/src/devices/bus/isa/ultra14f.cpp +++ b/src/devices/bus/isa/ultra14f.cpp @@ -9,10 +9,10 @@ #include "emu.h" #include "ultra14f.h" +#include "bus/nscsi/devices.h" #include "cpu/m68000/m68000.h" #include "machine/ncr5390.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_hd.h" DEFINE_DEVICE_TYPE(ULTRA14F, ultra14f_device, "ultra14f", "Ultra-14F SCSI Host Adapter") @@ -36,12 +36,6 @@ void ultra14f_device::uscpu_map(address_map &map) map(0x3f8000, 0x3fffff).ram(); } -static void u14f_scsi_devices(device_slot_interface &device) -{ - device.option_add("harddisk", NSCSI_HARDDISK); - device.option_add_internal("scsic", NCR53CF94); // Emulex FAS216 or similar custom-marked as USC060-6-40B -} - void ultra14f_device::scsic_config(device_t *device) { device->set_clock(40_MHz_XTAL); @@ -54,15 +48,15 @@ void ultra14f_device::device_add_mconfig(machine_config &config) m_uscpu->set_addrmap(AS_PROGRAM, &ultra14f_device::uscpu_map); NSCSI_BUS(config, "scsi"); - NSCSI_CONNECTOR(config, "scsi:0", u14f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:1", u14f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:2", u14f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:3", u14f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:4", u14f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:5", u14f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:6", u14f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:7", u14f_scsi_devices, "scsic", true) - .set_option_machine_config("scsic", [this] (device_t *device) { scsic_config(device); }); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:7").option_set("scsic", NCR53CF94) // Emulex FAS216 or similar custom-marked as USC060-6-40B + .machine_config([this] (device_t *device) { scsic_config(device); }); DP8473(config, m_fdc, 24_MHz_XTAL); // custom-marked as USC020-1-24 } diff --git a/src/devices/bus/isa/ultra24f.cpp b/src/devices/bus/isa/ultra24f.cpp index 46341bed4c2..211c1ab4b80 100644 --- a/src/devices/bus/isa/ultra24f.cpp +++ b/src/devices/bus/isa/ultra24f.cpp @@ -9,10 +9,10 @@ #include "emu.h" #include "ultra24f.h" +#include "bus/nscsi/devices.h" #include "cpu/m68000/m68000.h" #include "machine/ncr5390.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_hd.h" DEFINE_DEVICE_TYPE(ULTRA24F, ultra24f_device, "ultra24f", "Ultra-24F SCSI Host Adapter") @@ -58,12 +58,6 @@ void ultra24f_device::uscpu_map(address_map &map) map(0xffc000, 0xffffff).ram(); } -static void u24f_scsi_devices(device_slot_interface &device) -{ - device.option_add("harddisk", NSCSI_HARDDISK); - device.option_add_internal("scsic", NCR53CF94); // Emulex FAS216 -} - void ultra24f_device::scsic_config(device_t *device) { device->set_clock(40_MHz_XTAL); @@ -78,15 +72,15 @@ void ultra24f_device::device_add_mconfig(machine_config &config) I82355(config, m_bmic, 0); NSCSI_BUS(config, "scsi"); - NSCSI_CONNECTOR(config, "scsi:0", u24f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:1", u24f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:2", u24f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:3", u24f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:4", u24f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:5", u24f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:6", u24f_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:7", u24f_scsi_devices, "scsic", true) - .set_option_machine_config("scsic", [this] (device_t *device) { scsic_config(device); }); + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:7").option_set("scsic", NCR53CF94) // Emulex FAS216 + .machine_config([this] (device_t *device) { scsic_config(device); }); DP8473(config, m_fdc, 24_MHz_XTAL); // custom-marked as USC020-1-24 } diff --git a/src/devices/bus/nes_ctrl/ctrl.cpp b/src/devices/bus/nes_ctrl/ctrl.cpp index bacbd952c8a..a946eeb80fb 100644 --- a/src/devices/bus/nes_ctrl/ctrl.cpp +++ b/src/devices/bus/nes_ctrl/ctrl.cpp @@ -41,6 +41,7 @@ **********************************************************************/ #include "emu.h" +#include "screen.h" #include "ctrl.h" // slot devices #include "4score.h" @@ -104,6 +105,7 @@ device_nes_control_port_interface::~device_nes_control_port_interface() nes_control_port_device::nes_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NES_CONTROL_PORT, tag, owner, clock), device_slot_interface(mconfig, *this), + m_screen(*this, finder_base::DUMMY_TAG), m_device(nullptr) { } diff --git a/src/devices/bus/nes_ctrl/ctrl.h b/src/devices/bus/nes_ctrl/ctrl.h index 27579717878..0acefbf4654 100644 --- a/src/devices/bus/nes_ctrl/ctrl.h +++ b/src/devices/bus/nes_ctrl/ctrl.h @@ -67,10 +67,16 @@ public: uint8_t read_bit34(); uint8_t read_exp(offs_t offset); void write(uint8_t data); + template <typename T> void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward<T>(tag)); } + + // for peripherals that interact with the machine's screen + required_device<screen_device> m_screen; protected: // device-level overrides virtual void device_start() override; + + // devices device_nes_control_port_interface *m_device; }; diff --git a/src/devices/bus/nes_ctrl/hori.cpp b/src/devices/bus/nes_ctrl/hori.cpp index 1515277abb6..394ebcc9239 100644 --- a/src/devices/bus/nes_ctrl/hori.cpp +++ b/src/devices/bus/nes_ctrl/hori.cpp @@ -61,16 +61,22 @@ static void hori_adapter(device_slot_interface &device) void nes_horitwin_device::device_add_mconfig(machine_config &config) { - NES_CONTROL_PORT(config, "port1", hori_adapter, "joypad"); - NES_CONTROL_PORT(config, "port2", hori_adapter, "joypad"); + NES_CONTROL_PORT(config, m_port1, hori_adapter, "joypad"); + NES_CONTROL_PORT(config, m_port2, hori_adapter, "joypad"); + m_port1->set_screen_tag(m_port->m_screen); + m_port2->set_screen_tag(m_port->m_screen); } void nes_hori4p_device::device_add_mconfig(machine_config &config) { - NES_CONTROL_PORT(config, "port1", hori_adapter, "joypad"); - NES_CONTROL_PORT(config, "port2", hori_adapter, "joypad"); - NES_CONTROL_PORT(config, "port3", hori_adapter, "joypad"); - NES_CONTROL_PORT(config, "port4", hori_adapter, "joypad"); + NES_CONTROL_PORT(config, m_port1, hori_adapter, "joypad"); + NES_CONTROL_PORT(config, m_port2, hori_adapter, "joypad"); + NES_CONTROL_PORT(config, m_port3, hori_adapter, "joypad"); + NES_CONTROL_PORT(config, m_port4, hori_adapter, "joypad"); + m_port1->set_screen_tag(m_port->m_screen); + m_port2->set_screen_tag(m_port->m_screen); + m_port3->set_screen_tag(m_port->m_screen); + m_port4->set_screen_tag(m_port->m_screen); } diff --git a/src/devices/bus/nes_ctrl/hori.h b/src/devices/bus/nes_ctrl/hori.h index 287384c6ca5..c5ba00ffbeb 100644 --- a/src/devices/bus/nes_ctrl/hori.h +++ b/src/devices/bus/nes_ctrl/hori.h @@ -30,7 +30,6 @@ public: protected: // device-level overrides virtual void device_start() override { } - virtual void device_add_mconfig(machine_config &config) override; virtual uint8_t read_exp(offs_t offset) override; @@ -53,9 +52,8 @@ public: protected: // device-level overrides virtual void device_start() override { } - - virtual ioport_constructor device_input_ports() const override; virtual void device_add_mconfig(machine_config &config) override; + virtual ioport_constructor device_input_ports() const override; virtual uint8_t read_exp(offs_t offset) override; virtual void write(uint8_t data) override; diff --git a/src/devices/bus/nes_ctrl/joypad.cpp b/src/devices/bus/nes_ctrl/joypad.cpp index f8ae2c30e95..0605eea2d9a 100644 --- a/src/devices/bus/nes_ctrl/joypad.cpp +++ b/src/devices/bus/nes_ctrl/joypad.cpp @@ -174,7 +174,8 @@ static void arcstick_daisy(device_slot_interface &device) void nes_arcstick_device::device_add_mconfig(machine_config &config) { // expansion port to allow daisy chaining - NES_CONTROL_PORT(config, "subexp", arcstick_daisy, nullptr); + NES_CONTROL_PORT(config, m_daisychain, arcstick_daisy, nullptr); + m_daisychain->set_screen_tag(m_port->m_screen); } diff --git a/src/devices/bus/nes_ctrl/zapper.cpp b/src/devices/bus/nes_ctrl/zapper.cpp index 746246a8c76..da3df413a40 100644 --- a/src/devices/bus/nes_ctrl/zapper.cpp +++ b/src/devices/bus/nes_ctrl/zapper.cpp @@ -7,8 +7,8 @@ **********************************************************************/ #include "emu.h" -#include "zapper.h" #include "screen.h" +#include "zapper.h" //************************************************************************** // DEVICE DEFINITIONS @@ -48,7 +48,6 @@ ioport_constructor nes_zapper_device::device_input_ports() const nes_zapper_device::nes_zapper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, NES_ZAPPER, tag, owner, clock), - device_video_interface(mconfig, *this), device_nes_control_port_interface(mconfig, *this), m_lightx(*this, "ZAPPER_X"), m_lighty(*this, "ZAPPER_Y"), @@ -86,17 +85,17 @@ uint8_t nes_zapper_device::read_bit34() int y = m_lighty->read(); // update the screen if necessary - if (!screen().vblank()) + if (!m_port->m_screen->vblank()) { - int vpos = screen().vpos(); - int hpos = screen().hpos(); + int vpos = m_port->m_screen->vpos(); + int hpos = m_port->m_screen->hpos(); if (vpos > y || (vpos == y && hpos >= x)) - screen().update_now(); + m_port->m_screen->update_now(); } // get the pixel at the gun position - rgb_t pix = screen().pixel(x, y); + rgb_t pix = m_port->m_screen->pixel(x, y); // check if the cursor is over a bright pixel // FIXME: still a gross hack diff --git a/src/devices/bus/nes_ctrl/zapper.h b/src/devices/bus/nes_ctrl/zapper.h index 5c5c60c9386..5ae68fd0a6e 100644 --- a/src/devices/bus/nes_ctrl/zapper.h +++ b/src/devices/bus/nes_ctrl/zapper.h @@ -21,7 +21,6 @@ // ======================> nes_zapper_device class nes_zapper_device : public device_t, - public device_video_interface, public device_nes_control_port_interface { public: diff --git a/src/devices/machine/nscsi_cd.cpp b/src/devices/bus/nscsi/cd.cpp index ebfa49f1cae..19b32cc785a 100644 --- a/src/devices/machine/nscsi_cd.cpp +++ b/src/devices/bus/nscsi/cd.cpp @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:Olivier Galibert #include "emu.h" -#include "machine/nscsi_cd.h" +#include "bus/nscsi/cd.h" #define VERBOSE 0 #include "logmacro.h" diff --git a/src/devices/machine/nscsi_cd.h b/src/devices/bus/nscsi/cd.h index 9f10e52023a..1a87e150b13 100644 --- a/src/devices/machine/nscsi_cd.h +++ b/src/devices/bus/nscsi/cd.h @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:Olivier Galibert -#ifndef MAME_MACHINE_NSCSI_CD_H -#define MAME_MACHINE_NSCSI_CD_H +#ifndef MAME_BUS_NSCSI_CD_H +#define MAME_BUS_NSCSI_CD_H #pragma once @@ -123,4 +123,4 @@ DECLARE_DEVICE_TYPE(NSCSI_XM5701, nscsi_toshiba_xm5701_device) DECLARE_DEVICE_TYPE(NSCSI_XM5701SUN, nscsi_toshiba_xm5701_sun_device) DECLARE_DEVICE_TYPE(NSCSI_CDROM_APPLE, nscsi_cdrom_apple_device) -#endif // MAME_MACHINE_NSCSI_CD_H +#endif // MAME_BUS_NSCSI_CD_H diff --git a/src/devices/bus/nscsi/cw7501.cpp b/src/devices/bus/nscsi/cw7501.cpp new file mode 100644 index 00000000000..c3ff2286f57 --- /dev/null +++ b/src/devices/bus/nscsi/cw7501.cpp @@ -0,0 +1,96 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/******************************************************************************* + + Skeleton device for Panasonic CW-7501 CD-R drive and clones. + +*******************************************************************************/ + +#include "emu.h" +#include "bus/nscsi/cw7501.h" +#include "machine/ncr5390.h" + +DEFINE_DEVICE_TYPE(CW7501, cw7501_device, "cw7501", "Panasonic CW-7501 CD-R") +DEFINE_DEVICE_TYPE(CDR4210, cdr4210_device, "cdr4210", "Creative Technology Blaster CD-R 4210") + +cw7501_device::cw7501_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, type, tag, owner, clock) + , nscsi_slot_card_interface(mconfig, *this, "scsic") + , m_cdcpu(*this, "cdcpu") +{ +} + +cw7501_device::cw7501_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : cw7501_device(mconfig, CW7501, tag, owner, clock) +{ +} + +cdr4210_device::cdr4210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : cw7501_device(mconfig, CDR4210, tag, owner, clock) +{ +} + +void cw7501_device::device_start() +{ + m_mystery_address = 0; + + save_item(NAME(m_mystery_address)); +} + +u8 cw7501_device::mystery_data_r() +{ + if (!machine().side_effects_disabled()) + logerror("%s: Reading from mystery register #%02X\n", machine().describe_context(), m_mystery_address); + + return 0; +} + +void cw7501_device::mystery_data_w(u8 data) +{ + logerror("%s: Writing %02X to mystery register #%02X\n", machine().describe_context(), data, m_mystery_address); +} + +void cw7501_device::mystery_address_w(u8 data) +{ + m_mystery_address = data; +} + +void cw7501_device::mem_map(address_map &map) +{ + map(0x000880, 0x007fff).ram(); + map(0x008000, 0x03ffff).rom().region("flash", 0x08000); + map(0x050000, 0x050000).w(FUNC(cw7501_device::mystery_address_w)); + map(0x050001, 0x050001).rw(FUNC(cw7501_device::mystery_data_r), FUNC(cw7501_device::mystery_data_w)); + map(0x058000, 0x05800f).m("scsic", FUNC(ncr53cf94_device::map)); + map(0x060000, 0x060003).noprw(); // ? +} + +void cw7501_device::device_add_mconfig(machine_config &config) +{ + M37710S4(config, m_cdcpu, 12'500'000); // type and clock are total guesses + m_cdcpu->set_addrmap(AS_PROGRAM, &cw7501_device::mem_map); + + NCR53CF94(config, "scsic", 25'000'000); // type and clock guessed +} + +ROM_START(cw7501) + ROM_REGION16_LE(0x40000, "flash", 0) + ROM_LOAD("mk200.bin", 0x00000, 0x40000, CRC(12efd802) SHA1(2986ee5eedbe0cb662a9a7e7fa4e6ca7ccd8c539)) // v2.00 (1996) +ROM_END + +const tiny_rom_entry *cw7501_device::device_rom_region() const +{ + return ROM_NAME(cw7501); +} + +ROM_START(cdr4210) + ROM_REGION16_LE(0x40000, "flash", 0) + ROM_LOAD("cr113.bin", 0x00000, 0x40000, CRC(fd2faff9) SHA1(6aafdedf12240ad347427287c0db289f90bd064d)) // v1.13 (1996) +ROM_END + +const tiny_rom_entry *cdr4210_device::device_rom_region() const +{ + return ROM_NAME(cdr4210); +} + +// another clone: Plasmon CDR 4240 diff --git a/src/devices/bus/nscsi/cw7501.h b/src/devices/bus/nscsi/cw7501.h new file mode 100644 index 00000000000..0b785c4d3ba --- /dev/null +++ b/src/devices/bus/nscsi/cw7501.h @@ -0,0 +1,52 @@ +// license:BSD-3-Clause +// copyright-holders:AJR + +#ifndef MAME_BUS_NSCSI_CW7501 +#define MAME_BUS_NSCSI_CW7501 1 + +#pragma once + +#include "cpu/m37710/m37710.h" +#include "machine/nscsi_bus.h" + +class cw7501_device : public device_t, public nscsi_slot_card_interface +{ +public: + cw7501_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::DISK; } + +protected: + cw7501_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + + virtual void device_start() override; + virtual void device_add_mconfig(machine_config &config) override; + virtual const tiny_rom_entry *device_rom_region() const override; + +private: + u8 mystery_data_r(); + void mystery_data_w(u8 data); + void mystery_address_w(u8 data); + + void mem_map(address_map &map); + + required_device<m37710s4_device> m_cdcpu; + + u8 m_mystery_address; +}; + +class cdr4210_device : public cw7501_device +{ +public: + cdr4210_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::DISK; } + +protected: + virtual const tiny_rom_entry *device_rom_region() const override; +}; + +DECLARE_DEVICE_TYPE(CW7501, cw7501_device) +DECLARE_DEVICE_TYPE(CDR4210, cdr4210_device) + +#endif // MAME_BUS_NSCSI_CW7501 diff --git a/src/devices/bus/nscsi/devices.cpp b/src/devices/bus/nscsi/devices.cpp new file mode 100644 index 00000000000..5013bb12795 --- /dev/null +++ b/src/devices/bus/nscsi/devices.cpp @@ -0,0 +1,16 @@ +// license:BSD-3-Clause +// copyright-holders:AJR + +#include "bus/nscsi/cd.h" +#include "bus/nscsi/cw7501.h" +#include "bus/nscsi/hd.h" +#include "bus/nscsi/s1410.h" + +void default_scsi_devices(device_slot_interface &device) +{ + device.option_add("cdrom", NSCSI_CDROM); + device.option_add("harddisk", NSCSI_HARDDISK); + device.option_add("s1410", NSCSI_S1410); + device.option_add("cw7501", CW7501); + device.option_add("cdr4210", CDR4210); +}; diff --git a/src/devices/bus/nscsi/devices.h b/src/devices/bus/nscsi/devices.h new file mode 100644 index 00000000000..9958577517a --- /dev/null +++ b/src/devices/bus/nscsi/devices.h @@ -0,0 +1,11 @@ +// license:BSD-3-Clause +// copyright-holders:AJR + +#ifndef MAME_BUS_NSCSI_DEVICES_H +#define MAME_BUS_NSCSI_DEVICES_H + +#pragma once + +extern void default_scsi_devices(device_slot_interface &device); + +#endif // MAME_BUS_NSCSI_DEVICES_H diff --git a/src/devices/machine/nscsi_hd.cpp b/src/devices/bus/nscsi/hd.cpp index 5d320a75158..f2639673a92 100644 --- a/src/devices/machine/nscsi_hd.cpp +++ b/src/devices/bus/nscsi/hd.cpp @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:Olivier Galibert #include "emu.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/hd.h" #include "imagedev/harddriv.h" #define LOG_GENERAL (1U << 0) diff --git a/src/devices/machine/nscsi_hd.h b/src/devices/bus/nscsi/hd.h index 5ddbf3e8519..7ee1f851d26 100644 --- a/src/devices/machine/nscsi_hd.h +++ b/src/devices/bus/nscsi/hd.h @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:Olivier Galibert -#ifndef MAME_MACHINE_NSCSI_HD_H -#define MAME_MACHINE_NSCSI_HD_H +#ifndef MAME_BUS_NSCSI_HD_H +#define MAME_BUS_NSCSI_HD_H #pragma once @@ -35,4 +35,4 @@ protected: DECLARE_DEVICE_TYPE(NSCSI_HARDDISK, nscsi_harddisk_device) -#endif // MAME_MACHINE_NSCSI_HD_H +#endif // MAME_BUS_NSCSI_HD_H diff --git a/src/devices/machine/nscsi_s1410.cpp b/src/devices/bus/nscsi/s1410.cpp index 7b39b28a76c..5ecf65ef693 100644 --- a/src/devices/machine/nscsi_s1410.cpp +++ b/src/devices/bus/nscsi/s1410.cpp @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:Olivier Galibert #include "emu.h" -#include "machine/nscsi_s1410.h" +#include "bus/nscsi/s1410.h" DEFINE_DEVICE_TYPE(NSCSI_S1410, nscsi_s1410_device, "scsi_s1410", "S1410 Hard Disk") diff --git a/src/devices/machine/nscsi_s1410.h b/src/devices/bus/nscsi/s1410.h index a6234d4c027..bd44a53c830 100644 --- a/src/devices/machine/nscsi_s1410.h +++ b/src/devices/bus/nscsi/s1410.h @@ -6,7 +6,7 @@ #pragma once #include "machine/nscsi_bus.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/hd.h" class nscsi_s1410_device : public nscsi_harddisk_device { @@ -75,4 +75,4 @@ protected: DECLARE_DEVICE_TYPE(NSCSI_S1410, nscsi_s1410_device) -#endif // MAME_MACHINE_NSCSI_S1410_H +#endif // MAME_BUS_NSCSI_S1410_H diff --git a/src/devices/bus/sms_ctrl/lphaser.cpp b/src/devices/bus/sms_ctrl/lphaser.cpp index 261f6b13504..72d155c2225 100644 --- a/src/devices/bus/sms_ctrl/lphaser.cpp +++ b/src/devices/bus/sms_ctrl/lphaser.cpp @@ -19,9 +19,8 @@ Notes: **********************************************************************/ #include "emu.h" -#include "lphaser.h" - #include "screen.h" +#include "lphaser.h" @@ -85,15 +84,11 @@ ioport_constructor sms_light_phaser_device::device_input_ports() const sms_light_phaser_device::sms_light_phaser_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SMS_LIGHT_PHASER, tag, owner, clock), - device_video_interface(mconfig, *this), device_sms_control_port_interface(mconfig, *this), m_lphaser_pins(*this, "CTRL_PORT"), m_lphaser_x(*this, "LPHASER_X"), m_lphaser_y(*this, "LPHASER_Y"), m_sensor_last_state(0), m_lphaser_timer(nullptr) { - // Workaround for failed validation that occurs when running on a driver - // with Sega Scope emulation, which adds 2 screens (left/right lenses). - set_screen(*this, ":screen"); } @@ -150,10 +145,10 @@ uint8_t sms_light_phaser_device::peripheral_r() int sms_light_phaser_device::bright_aim_area( emu_timer *timer, int lgun_x, int lgun_y ) { const int r_x_r = LGUN_RADIUS * LGUN_RADIUS; - const rectangle &visarea = screen().visible_area(); + const rectangle &visarea = m_port->m_screen->visible_area(); rectangle aim_area; - int beam_x = screen().hpos(); - int beam_y = screen().vpos(); + int beam_x = m_port->m_screen->hpos(); + int beam_y = m_port->m_screen->vpos(); int beam_x_orig = beam_x; int beam_y_orig = beam_y; int dy, result = 1; @@ -231,8 +226,8 @@ int sms_light_phaser_device::bright_aim_area( emu_timer *timer, int lgun_x, int /* brightness of the lightgray color in the frame drawn by Light Phaser games */ const uint8_t sensor_min_brightness = 0x7f; - screen().update_now(); - color = screen().pixel(beam_x, beam_y); + m_port->m_screen->update_now(); + color = m_port->m_screen->pixel(beam_x, beam_y); /* reference: http://www.w3.org/TR/AERT#color-contrast */ brightness = (color.r() * 0.299) + (color.g() * 0.587) + (color.b() * 0.114); @@ -257,14 +252,14 @@ int sms_light_phaser_device::bright_aim_area( emu_timer *timer, int lgun_x, int } } - timer->adjust(screen().time_until_pos(beam_y, beam_x)); + timer->adjust(m_port->m_screen->time_until_pos(beam_y, beam_x)); return result; } uint16_t sms_light_phaser_device::screen_hpos_nonscaled(int scaled_hpos) { - const rectangle &visarea = screen().visible_area(); + const rectangle &visarea = m_port->m_screen->visible_area(); int offset_x = (scaled_hpos * (visarea.max_x - visarea.min_x)) / 255; return visarea.min_x + offset_x; } @@ -272,7 +267,7 @@ uint16_t sms_light_phaser_device::screen_hpos_nonscaled(int scaled_hpos) uint16_t sms_light_phaser_device::screen_vpos_nonscaled(int scaled_vpos) { - const rectangle &visarea = screen().visible_area(); + const rectangle &visarea = m_port->m_screen->visible_area(); int offset_y = (scaled_vpos * (visarea.max_y - visarea.min_y)) / 255; return visarea.min_y + offset_y; } diff --git a/src/devices/bus/sms_ctrl/lphaser.h b/src/devices/bus/sms_ctrl/lphaser.h index c9d145f861b..123241e2663 100644 --- a/src/devices/bus/sms_ctrl/lphaser.h +++ b/src/devices/bus/sms_ctrl/lphaser.h @@ -23,7 +23,6 @@ // ======================> sms_light_phaser_device class sms_light_phaser_device : public device_t, - public device_video_interface, public device_sms_control_port_interface { public: diff --git a/src/devices/bus/sms_ctrl/multitap.cpp b/src/devices/bus/sms_ctrl/multitap.cpp index c892f6022d0..2e5c0e0701a 100644 --- a/src/devices/bus/sms_ctrl/multitap.cpp +++ b/src/devices/bus/sms_ctrl/multitap.cpp @@ -131,4 +131,8 @@ void sms_multitap_device::device_add_mconfig(machine_config &config) SMS_CONTROL_PORT(config, m_subctrl2_port, sms_control_port_devices, "joypad"); SMS_CONTROL_PORT(config, m_subctrl3_port, sms_control_port_devices, "joypad"); SMS_CONTROL_PORT(config, m_subctrl4_port, sms_control_port_devices, "joypad"); + m_subctrl1_port->set_screen_tag(m_port->m_screen); + m_subctrl2_port->set_screen_tag(m_port->m_screen); + m_subctrl3_port->set_screen_tag(m_port->m_screen); + m_subctrl4_port->set_screen_tag(m_port->m_screen); } diff --git a/src/devices/bus/sms_ctrl/rfu.cpp b/src/devices/bus/sms_ctrl/rfu.cpp index 1b13fc3e921..b8e991e71d3 100644 --- a/src/devices/bus/sms_ctrl/rfu.cpp +++ b/src/devices/bus/sms_ctrl/rfu.cpp @@ -135,5 +135,6 @@ WRITE_LINE_MEMBER( sms_rapid_fire_device::th_pin_w ) void sms_rapid_fire_device::device_add_mconfig(machine_config &config) { SMS_CONTROL_PORT(config, m_subctrl_port, sms_control_port_devices, "joypad"); + m_subctrl_port->set_screen_tag(m_port->m_screen); m_subctrl_port->th_input_handler().set(FUNC(sms_rapid_fire_device::th_pin_w)); } diff --git a/src/devices/bus/sms_ctrl/smsctrl.cpp b/src/devices/bus/sms_ctrl/smsctrl.cpp index acb14593b47..a2c117dcb74 100644 --- a/src/devices/bus/sms_ctrl/smsctrl.cpp +++ b/src/devices/bus/sms_ctrl/smsctrl.cpp @@ -7,6 +7,7 @@ **********************************************************************/ #include "emu.h" +#include "screen.h" #include "smsctrl.h" // slot devices @@ -65,6 +66,7 @@ device_sms_control_port_interface::~device_sms_control_port_interface() sms_control_port_device::sms_control_port_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SMS_CONTROL_PORT, tag, owner, clock), device_slot_interface(mconfig, *this), + m_screen(*this, finder_base::DUMMY_TAG), m_device(nullptr), m_th_pin_handler(*this) { diff --git a/src/devices/bus/sms_ctrl/smsctrl.h b/src/devices/bus/sms_ctrl/smsctrl.h index af475a68a66..ced9176efb0 100644 --- a/src/devices/bus/sms_ctrl/smsctrl.h +++ b/src/devices/bus/sms_ctrl/smsctrl.h @@ -62,6 +62,11 @@ public: void th_pin_w(int state); + template <typename T> void set_screen_tag(T &&tag) { m_screen.set_tag(std::forward<T>(tag)); } + + // for peripherals that interact with the machine's screen + required_device<screen_device> m_screen; + protected: // device-level overrides virtual void device_start() override; diff --git a/src/devices/cpu/f2mc16/f2mc16.cpp b/src/devices/cpu/f2mc16/f2mc16.cpp index 9cda22ea9ea..7f2c737d9da 100644 --- a/src/devices/cpu/f2mc16/f2mc16.cpp +++ b/src/devices/cpu/f2mc16/f2mc16.cpp @@ -213,6 +213,7 @@ void f2mc16_device::execute_run() { case 0x00: // NOP m_icount--; + m_pc++; break; case 0x03: @@ -366,8 +367,12 @@ void f2mc16_device::execute_run() m_icount -= 3; break; + // ADDL A, #imm32 case 0x18: - // util::stream_format(stream, "ADDL A, #$%08x", opcodes.r16(pc+1) | (opcodes.r16(pc+3)<<16)); + m_tmp32 = read_32((m_pcb << 16) | (m_pc+1)); + m_acc = doADD_32(m_acc, m_tmp32); + m_pc += 5; + m_icount -= 4; break; // SUBL A, #imm32 @@ -802,27 +807,37 @@ void f2mc16_device::execute_run() break; case 0x75: // ea-type instructions - fatalerror("Unknown F2MC EA75 opcode %02x\n", opcode); + opcodes_ea75(read_8((m_pcb<<16) | (m_pc+1))); break; case 0x76: // ea-type instructions - fatalerror("Unknown F2MC EA76 opcode %02x\n", opcode); + opcodes_ea76(read_8((m_pcb<<16) | (m_pc+1))); break; case 0x77: // ea-type instructions - fatalerror("Unknown F2MC EA77 opcode %02x\n", opcode); + opcodes_ea77(read_8((m_pcb<<16) | (m_pc+1))); break; case 0x78: // ea-type instructions - fatalerror("Unknown F2MC EA78 opcode %02x\n", opcode); + opcodes_ea78(read_8((m_pcb<<16) | (m_pc+1))); break; // MOV A, Rx case 0x80: case 0x81: case 0x82: case 0x83: case 0x84: case 0x85: case 0x86: case 0x87: + m_acc <<= 16; + m_acc |= read_rX(opcode & 7); + setNZ_8(m_acc & 0xff); + m_pc++; + m_icount -= 2; break; // MOVW A, RWx case 0x88: case 0x89: case 0x8a: case 0x8b: case 0x8c: case 0x8d: case 0x8e: case 0x8f: + m_acc <<= 16; + m_acc |= read_rwX(opcode & 7); + setNZ_16(m_acc & 0xff); + m_pc++; + m_icount -= 2; break; // MOV Rx, A @@ -859,10 +874,12 @@ void f2mc16_device::execute_run() m_pc += 3; break; + // MOVX A, Rx case 0xb0: case 0xb1: case 0xb2: case 0xb3: case 0xb4: case 0xb5: case 0xb6: case 0xb7: // util::stream_format(stream, "MOVX A, R%d", (opcode & 0x7)); break; + // MOVW A, @RWx + disp8 case 0xb8: case 0xb9: case 0xba: case 0xbb: case 0xbc: case 0xbd: case 0xbe: case 0xbf: m_tmp8 = read_8((m_pcb<<16) | (m_pc+1)); m_tmp16 = read_rwX(opcode & 0x7) + (s8)m_tmp8; @@ -873,6 +890,7 @@ void f2mc16_device::execute_run() m_icount -= 10; break; + // MOVX A, @Rx + disp8 case 0xc0: case 0xc1: case 0xc2: case 0xc3: case 0xc4: case 0xc5: case 0xc6: case 0xc7: // util::stream_format(stream, "MOVX A, @R%d+%02x", (opcode & 0x7), operand); break; @@ -903,7 +921,7 @@ void f2mc16_device::execute_run() case 0xe0: case 0xe1: case 0xe2: case 0xe3: case 0xe4: case 0xe5: case 0xe6: case 0xe7: case 0xe8: case 0xe9: case 0xea: case 0xeb: case 0xec: case 0xed: case 0xee: case 0xef: - // util::stream_format(stream, "CALL #$%01x", (opcode & 0xf)); + // util::stream_format(stream, "CALLV #$%01x", (opcode & 0xf)); break; // BEQ @@ -1307,6 +1325,19 @@ void f2mc16_device::opcodes_ea71(u8 operand) { switch (operand) { + // CALLP @RWx + disp8 + case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: + push_16(m_pcb); + push_16(m_pc+4); + m_tmp8 = read_8((m_pcb << 16) | (m_pc + 2)); + m_tmp16 = read_rwX(operand & 7) + (s8)m_tmp8; + printf("CALLP EAR = %04x\n", m_tmp16); + m_tmp32 = read_32(getRWbank(operand & 7, m_tmp16)); + m_pc = m_tmp32 & 0xffff; + m_pcb = (m_tmp32 >> 16) & 0xff; + m_icount -= 11; + break; + // INCL @RWx + disp8 case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: m_tmp8 = read_8((m_pcb<<16) | (m_pc+2)); @@ -1441,7 +1472,7 @@ void f2mc16_device::opcodes_ea74(u8 operand) switch (operand) { // CMP A, @RWx + disp8 - case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x57: + case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: m_tmp8 = read_8((m_pcb<<16) | (m_pc+2)); m_tmp16 = read_rwX(operand & 7) + (s8)m_tmp8; m_tmp8 = read_8(getRWbank(operand & 7, m_tmp16)); @@ -1456,6 +1487,56 @@ void f2mc16_device::opcodes_ea74(u8 operand) } } +void f2mc16_device::opcodes_ea75(u8 operand) +{ + switch (operand) + { + default: + fatalerror("Unknown F2MC EA75 opcode %02x (PC=%x)\n", operand, (m_pcb<<16) | m_pc); + break; + } +} + +void f2mc16_device::opcodes_ea76(u8 operand) +{ + switch (operand) + { + // CMPW A, @RWx + disp8 + case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: + m_tmp8 = read_8((m_pcb<<16) | (m_pc+2)); + m_tmp16 = read_rwX(operand & 7) + (s8)m_tmp8; + m_tmp16 = read_16(getRWbank(operand & 7, m_tmp16)); + doCMP_16(m_acc & 0xffff, m_tmp16); + m_pc += 3; + m_icount -= 10; + break; + + default: + fatalerror("Unknown F2MC EA76 opcode %02x (PC=%x)\n", operand, (m_pcb<<16) | m_pc); + break; + } +} + +void f2mc16_device::opcodes_ea77(u8 operand) +{ + switch (operand) + { + default: + fatalerror("Unknown F2MC EA77 opcode %02x (PC=%x)\n", operand, (m_pcb<<16) | m_pc); + break; + } +} + +void f2mc16_device::opcodes_ea78(u8 operand) +{ + switch (operand) + { + default: + fatalerror("Unknown F2MC EA78 opcode %02x (PC=%x)\n", operand, (m_pcb<<16) | m_pc); + break; + } +} + void f2mc16_device::execute_set_input(int inputnum, int state) { } diff --git a/src/devices/cpu/f2mc16/f2mc16.h b/src/devices/cpu/f2mc16/f2mc16.h index 0fdfb3a5c33..1467aa1462c 100644 --- a/src/devices/cpu/f2mc16/f2mc16.h +++ b/src/devices/cpu/f2mc16/f2mc16.h @@ -365,7 +365,7 @@ private: inline u16 doADD_16(u16 lhs, u16 rhs) { m_tmp32 = lhs + rhs; - m_ps &= ~F_V|F_C; + m_ps &= ~(F_C|F_V); if ((m_tmp32 ^ lhs) & (m_tmp32 ^ rhs) & 0x8000) { m_ps |= F_V; @@ -378,6 +378,22 @@ private: return m_tmp32 & 0xffff; } + inline u32 doADD_32(u32 lhs, u32 rhs) + { + m_tmp64 = lhs + rhs; + m_ps &= ~(F_C|F_V); + if ((m_tmp64 ^ lhs) & (m_tmp64 ^ rhs) & 0x80000000) + { + m_ps |= F_V; + } + if (m_tmp64 > 0xffffffff) + { + m_ps |= F_C; + } + setNZ_32(m_tmp64 & 0xffffffff); + + return m_tmp64 & 0xffffffff; + } inline void take_branch() { @@ -393,6 +409,10 @@ private: void opcodes_ea72(u8 operand); void opcodes_ea73(u8 operand); void opcodes_ea74(u8 operand); + void opcodes_ea75(u8 operand); + void opcodes_ea76(u8 operand); + void opcodes_ea77(u8 operand); + void opcodes_ea78(u8 operand); }; DECLARE_DEVICE_TYPE(F2MC16, f2mc16_device) diff --git a/src/devices/cpu/f2mc16/f2mc16dasm.cpp b/src/devices/cpu/f2mc16/f2mc16dasm.cpp index 674b62ea3cd..c00972bcc29 100644 --- a/src/devices/cpu/f2mc16/f2mc16dasm.cpp +++ b/src/devices/cpu/f2mc16/f2mc16dasm.cpp @@ -409,7 +409,7 @@ offs_t f2mc16_disassembler::disassemble(std::ostream &stream, offs_t pc, const d break; case 0x4b: - util::stream_format(stream, "MOVL A, #$%04x", opcodes.r32(pc+1)); + util::stream_format(stream, "MOVL A, #$%08x", opcodes.r32(pc+1)); bytes = 5; break; diff --git a/src/devices/cpu/m37710/m37710.cpp b/src/devices/cpu/m37710/m37710.cpp index 7d6d79a9403..6efe3c8e056 100644 --- a/src/devices/cpu/m37710/m37710.cpp +++ b/src/devices/cpu/m37710/m37710.cpp @@ -615,30 +615,30 @@ uint8_t m37710_cpu_device::uart0_ctrl_reg0_r() { LOGMASKED(LOG_UART, "uart0_ctrl_reg0_r: UART0 transmit/recv ctrl 0 = %x (PC=%x)\n", m_uart_ctrl_reg0[0], REG_PB<<16 | REG_PC); - //return m_uart_ctrl_reg0[0]; - return 0x08; // not hooked up yet + return m_uart_ctrl_reg0[0]; } void m37710_cpu_device::uart0_ctrl_reg0_w(uint8_t data) { LOGMASKED(LOG_UART, "uart0_ctrl_reg0_w %x: UART0 transmit/recv ctrl 0 = %x\n", data, m_uart_ctrl_reg0[0]); - m_uart_ctrl_reg0[0] = data; + // Tx empty flag is read-only + m_uart_ctrl_reg0[0] = (data & ~8) | (m_uart_ctrl_reg0[0] & 8); } uint8_t m37710_cpu_device::uart1_ctrl_reg0_r() { LOGMASKED(LOG_UART, "uart1_ctrl_reg0_r: UART1 transmit/recv ctrl 0 = %x (PC=%x)\n", m_uart_ctrl_reg0[1], REG_PB<<16 | REG_PC); - //return m_uart_ctrl_reg0[1]; - return 0xff; // not hooked up yet + return m_uart_ctrl_reg0[1]; } void m37710_cpu_device::uart1_ctrl_reg0_w(uint8_t data) { LOGMASKED(LOG_UART, "uart1_ctrl_reg0_w %x: UART1 transmit/recv ctrl 0 = %x\n", data, m_uart_ctrl_reg0[1]); - m_uart_ctrl_reg0[1] = data; + // Tx empty flag is read-only + m_uart_ctrl_reg0[1] = (data & ~8) | (m_uart_ctrl_reg0[1] & 8); } uint8_t m37710_cpu_device::uart0_ctrl_reg1_r() @@ -650,9 +650,9 @@ uint8_t m37710_cpu_device::uart0_ctrl_reg1_r() void m37710_cpu_device::uart0_ctrl_reg1_w(uint8_t data) { - LOGMASKED(LOG_UART, "uart0_ctrl_reg0_w %x: UART0 transmit/recv ctrl 1 = %x\n", data, m_uart_ctrl_reg1[0]); + LOGMASKED(LOG_UART, "uart0_ctrl_reg1_w %x: UART0 transmit/recv ctrl 1 = %x\n", data, m_uart_ctrl_reg1[0]); - m_uart_ctrl_reg1[0] = data; + m_uart_ctrl_reg1[0] = (m_uart_ctrl_reg1[0] & (BIT(data, 2) ? 0xfa : 0x0a)) | (data & 0x05); } uint8_t m37710_cpu_device::uart1_ctrl_reg1_r() @@ -666,7 +666,7 @@ void m37710_cpu_device::uart1_ctrl_reg1_w(uint8_t data) { LOGMASKED(LOG_UART, "uart1_ctrl_reg1_w %x: UART1 transmit/recv ctrl 1 = %x\n", data, m_uart_ctrl_reg1[1]); - m_uart_ctrl_reg1[1] = data; + m_uart_ctrl_reg1[1] = (m_uart_ctrl_reg1[1] & (BIT(data, 2) ? 0xfa : 0x0a)) | (data & 0x05); } uint16_t m37710_cpu_device::uart0_rbuf_r() diff --git a/src/devices/machine/53c7xx.cpp b/src/devices/machine/53c7xx.cpp index a3466da81f1..14f339c30f7 100644 --- a/src/devices/machine/53c7xx.cpp +++ b/src/devices/machine/53c7xx.cpp @@ -89,6 +89,7 @@ DEFINE_DEVICE_TYPE(NCR53C7XX, ncr53c7xx_device, "ncr537xx", "NCR 53C7xx SCSI") ncr53c7xx_device::ncr53c7xx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : nscsi_device(mconfig, NCR53C7XX, tag, owner, clock), + nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF), device_execute_interface(mconfig, *this), m_icount(0), m_irq_handler(*this), diff --git a/src/devices/machine/53c7xx.h b/src/devices/machine/53c7xx.h index 50d59c1d1b4..e6b846f0945 100644 --- a/src/devices/machine/53c7xx.h +++ b/src/devices/machine/53c7xx.h @@ -16,7 +16,7 @@ #include "machine/nscsi_bus.h" -class ncr53c7xx_device : public nscsi_device, public device_execute_interface +class ncr53c7xx_device : public nscsi_device, public nscsi_slot_card_interface, public device_execute_interface { public: // construction/destruction diff --git a/src/devices/machine/aic6250.cpp b/src/devices/machine/aic6250.cpp index 512d1625d8d..9c149f51627 100644 --- a/src/devices/machine/aic6250.cpp +++ b/src/devices/machine/aic6250.cpp @@ -49,6 +49,7 @@ static char const *const aic6250_phase[] = { "DATA OUT", "*", "DATA IN", "*", "C aic6250_device::aic6250_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : nscsi_device(mconfig, type, tag, owner, clock) + , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_int_cb(*this) , m_breq_cb(*this) , m_port_a_r_cb(*this) diff --git a/src/devices/machine/aic6250.h b/src/devices/machine/aic6250.h index 2a4ba02d118..9f6febfd8a7 100644 --- a/src/devices/machine/aic6250.h +++ b/src/devices/machine/aic6250.h @@ -8,7 +8,7 @@ #include "machine/nscsi_bus.h" -class aic6250_device : public nscsi_device +class aic6250_device : public nscsi_device, public nscsi_slot_card_interface { public: aic6250_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/machine/mb87030.cpp b/src/devices/machine/mb87030.cpp index cd0b4f2beae..25420dfad54 100644 --- a/src/devices/machine/mb87030.cpp +++ b/src/devices/machine/mb87030.cpp @@ -18,6 +18,7 @@ mb87030_device::mb87030_device(const machine_config &mconfig, const char *tag, d mb87030_device::mb87030_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : nscsi_device(mconfig, type, tag, owner, clock), + nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF), m_irq_handler(*this), m_dreq_handler(*this) { diff --git a/src/devices/machine/mb87030.h b/src/devices/machine/mb87030.h index 560e53c90c0..dc07f0edb9b 100644 --- a/src/devices/machine/mb87030.h +++ b/src/devices/machine/mb87030.h @@ -8,7 +8,7 @@ #include "machine/nscsi_bus.h" #include <queue> -class mb87030_device : public nscsi_device +class mb87030_device : public nscsi_device, public nscsi_slot_card_interface { public: mb87030_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/machine/ncr5380n.cpp b/src/devices/machine/ncr5380n.cpp index 9681fbf4a7f..7adb63800d9 100644 --- a/src/devices/machine/ncr5380n.cpp +++ b/src/devices/machine/ncr5380n.cpp @@ -36,6 +36,7 @@ void ncr5380n_device::map(address_map &map) ncr5380n_device::ncr5380n_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : nscsi_device(mconfig, type, tag, owner, clock) + , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_fake_clock(10000000) , tm(nullptr), status(0), istatus(0), m_mode(0) , m_outdata(0), m_busstatus(0), m_dmalatch(0), m_icommand(0), m_tcommand(0), clock_conv(0), sync_offset(0), sync_period(0), bus_id(0), select_timeout(0) diff --git a/src/devices/machine/ncr5380n.h b/src/devices/machine/ncr5380n.h index 28cd0ec5fee..5bf01b10bb8 100644 --- a/src/devices/machine/ncr5380n.h +++ b/src/devices/machine/ncr5380n.h @@ -16,7 +16,7 @@ #include "machine/nscsi_bus.h" -class ncr5380n_device : public nscsi_device +class ncr5380n_device : public nscsi_device, public nscsi_slot_card_interface { public: ncr5380n_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/machine/ncr5390.cpp b/src/devices/machine/ncr5390.cpp index 10b7510d707..b513566bb3a 100644 --- a/src/devices/machine/ncr5390.cpp +++ b/src/devices/machine/ncr5390.cpp @@ -124,6 +124,7 @@ void ncr53c94_device::write(offs_t offset, uint8_t data) ncr5390_device::ncr5390_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : nscsi_device(mconfig, type, tag, owner, clock) + , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , tm(nullptr), config(0), status(0), istatus(0), clock_conv(0), sync_offset(0), sync_period(0), bus_id(0) , select_timeout(0), seq(0), tcount(0), tcounter(0), mode(0), fifo_pos(0), command_pos(0), state(0), xfr_phase(0), command_length(0), dma_dir(0), irq(false), drq(false), test_mode(false) , m_irq_handler(*this) diff --git a/src/devices/machine/ncr5390.h b/src/devices/machine/ncr5390.h index 7cc2469bde5..76952fe0f7b 100644 --- a/src/devices/machine/ncr5390.h +++ b/src/devices/machine/ncr5390.h @@ -7,7 +7,7 @@ #include "machine/nscsi_bus.h" -class ncr5390_device : public nscsi_device +class ncr5390_device : public nscsi_device, public nscsi_slot_card_interface { public: ncr5390_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/machine/nscsi_bus.cpp b/src/devices/machine/nscsi_bus.cpp index c8ac3428735..c2274f49c95 100644 --- a/src/devices/machine/nscsi_bus.cpp +++ b/src/devices/machine/nscsi_bus.cpp @@ -125,19 +125,15 @@ void nscsi_bus_device::ctrl_wait(int refid, uint32_t lines, uint32_t mask) dev[refid].wait_ctrl = (w & ~mask) | (lines & mask); } -void nscsi_bus_device::device_config_complete() +void nscsi_bus_device::device_resolve_objects() { - char id[3]; for(int i=0; i<16; i++) { - sprintf(id, "%d", i); - nscsi_connector *conn = downcast<nscsi_connector *>(subdevice(id)); - if(conn) { - nscsi_device *sdev = conn->get_device(); - if(sdev) { - int rid = devcnt++; - dev[rid].dev = sdev; - sdev->connect_to_bus(this, rid, i); - } + device_t *subdev = subdevice(string_format("%d", i).c_str()); + nscsi_device *sdev = subdev ? downcast<nscsi_connector &>(*subdev).get_device() : nullptr; + if(sdev) { + int rid = devcnt++; + dev[rid].dev = sdev; + sdev->connect_to_bus(this, rid, i); } } } @@ -153,18 +149,34 @@ nscsi_connector::~nscsi_connector() { } +void nscsi_connector::device_validity_check(validity_checker &valid) const +{ + device_t *const carddev = get_card_device(); + if (carddev && !dynamic_cast<nscsi_slot_card_interface *>(carddev)) + osd_printf_error("Card device %s (%s) does not implement nscsi_slot_card_interface\n", carddev->tag(), carddev->name()); +} + void nscsi_connector::device_start() { } nscsi_device *nscsi_connector::get_device() { - return dynamic_cast<nscsi_device *>(get_card_device()); + nscsi_slot_card_interface *connected = dynamic_cast<nscsi_slot_card_interface *>(get_card_device()); + if (connected) + return connected->device().subdevice<nscsi_device>(connected->m_nscsi.finder_tag()); + else + return nullptr; +} + +nscsi_slot_card_interface::nscsi_slot_card_interface(const machine_config &mconfig, device_t &device, const char *nscsi_tag) : + device_slot_card_interface(mconfig, device), + m_nscsi(device, nscsi_tag) +{ } nscsi_device::nscsi_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, type, tag, owner, clock), - device_slot_card_interface(mconfig, *this) + device_t(mconfig, type, tag, owner, clock) { scsi_id = scsi_refid = -1; scsi_bus = nullptr; @@ -187,6 +199,12 @@ void nscsi_device::device_start() } +nscsi_full_device::nscsi_full_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : + nscsi_device(mconfig, type, tag, owner, clock), + nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) +{ +} + const char *const nscsi_full_device::command_names[256] = { /* 00 */ "TEST_UNIT_READY", "REZERO", "?", "REQUEST_SENSE", "FORMAT_UNIT", "?", "?", "REASSIGN_BLOCKS", /* 08 */ "READ_6/RECIEVE", "?", "WRITE_6/SEND", "SEEK", "?", "?", "?", "?", diff --git a/src/devices/machine/nscsi_bus.h b/src/devices/machine/nscsi_bus.h index 244eda94fe8..6ee65f470c7 100644 --- a/src/devices/machine/nscsi_bus.h +++ b/src/devices/machine/nscsi_bus.h @@ -23,7 +23,7 @@ public: protected: virtual void device_start() override; virtual void device_reset() override; - virtual void device_config_complete() override; + virtual void device_resolve_objects() override; private: struct dev_t { @@ -60,10 +60,22 @@ public: nscsi_device *get_device(); protected: + virtual void device_validity_check(validity_checker &valid) const override; virtual void device_start() override; }; -class nscsi_device : public device_t, public device_slot_card_interface +class nscsi_slot_card_interface : public device_slot_card_interface +{ + friend class nscsi_connector; + +public: + nscsi_slot_card_interface(const machine_config &mconfig, device_t &device, const char *nscsi_tag); + +private: + required_device<nscsi_device> m_nscsi; +}; + +class nscsi_device : public device_t { public: // Here because the biggest users are the devices, not the bus @@ -128,7 +140,7 @@ protected: nscsi_bus_device *scsi_bus; }; -class nscsi_full_device : public nscsi_device +class nscsi_full_device : public nscsi_device, public nscsi_slot_card_interface { public: virtual void scsi_ctrl_changed() override; @@ -300,7 +312,7 @@ protected: SBUF_SENSE }; - using nscsi_device::nscsi_device; + nscsi_full_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/machine/nscsi_cb.cpp b/src/devices/machine/nscsi_cb.cpp index 0bd3f76af21..5d42caf8265 100644 --- a/src/devices/machine/nscsi_cb.cpp +++ b/src/devices/machine/nscsi_cb.cpp @@ -7,6 +7,7 @@ DEFINE_DEVICE_TYPE(NSCSI_CB, nscsi_callback_device, "nscsi_cb", "SCSI callback ( nscsi_callback_device::nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : nscsi_device(mconfig, NSCSI_CB, tag, owner, clock), + nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF), m_write_rst(*this), m_write_atn(*this), m_write_ack(*this), diff --git a/src/devices/machine/nscsi_cb.h b/src/devices/machine/nscsi_cb.h index 575e8f19298..8a97b76c29f 100644 --- a/src/devices/machine/nscsi_cb.h +++ b/src/devices/machine/nscsi_cb.h @@ -8,7 +8,7 @@ #include "machine/nscsi_bus.h" -class nscsi_callback_device : public nscsi_device +class nscsi_callback_device : public nscsi_device, public nscsi_slot_card_interface { public: nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/machine/wd33c9x.cpp b/src/devices/machine/wd33c9x.cpp index ab82c36ec0a..476c6cc913c 100644 --- a/src/devices/machine/wd33c9x.cpp +++ b/src/devices/machine/wd33c9x.cpp @@ -359,6 +359,7 @@ DEFINE_DEVICE_TYPE(WD33C93B, wd33c93b_device, "wd33c93b", "Western Digital WD33C wd33c9x_base_device::wd33c9x_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : nscsi_device{ mconfig, type, tag, owner, clock } + , nscsi_slot_card_interface(mconfig, *this, DEVICE_SELF) , m_addr{ 0 } , m_regs{ 0 } , m_command_length{ 0 } diff --git a/src/devices/machine/wd33c9x.h b/src/devices/machine/wd33c9x.h index 65e97852e00..bdfb84fe8d9 100644 --- a/src/devices/machine/wd33c9x.h +++ b/src/devices/machine/wd33c9x.h @@ -11,7 +11,7 @@ #include "machine/nscsi_bus.h" -class wd33c9x_base_device : public nscsi_device +class wd33c9x_base_device : public nscsi_device, public nscsi_slot_card_interface { public: auto irq_cb() { return m_irq_cb.bind(); } diff --git a/src/emu/rendersw.hxx b/src/emu/rendersw.hxx index 8dbf28b35b3..b1a032258d1 100644 --- a/src/emu/rendersw.hxx +++ b/src/emu/rendersw.hxx @@ -1296,23 +1296,22 @@ private: } - - //************************************************************************** - // 32-BIT ARGB QUAD RASTERIZERS - //************************************************************************** - //------------------------------------------------- - // draw_quad_argb32_alpha - perform - // rasterization using standard alpha blending + // draw_quad_rgb32_multiply - perform + // rasterization using RGB multiply //------------------------------------------------- - static void draw_quad_argb32_alpha(const render_primitive &prim, _PixelType *dstdata, u32 pitch, quad_setup_data &setup) + static void draw_quad_rgb32_multiply(const render_primitive &prim, _PixelType *dstdata, u32 pitch, quad_setup_data &setup) { const rgb_t *palbase = prim.texture.palette; s32 dudx = setup.dudx; s32 dvdx = setup.dvdx; s32 endx = setup.endx; + // simply can't do this without reading from the dest + if (_NoDestRead) + return; + // fast case: no coloring, no alpha if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a)) { @@ -1330,42 +1329,28 @@ private: for (s32 x = setup.startx; x < endx; x++) { u32 pix = get_texel_argb32(prim.texture, curu, curv); - u32 ta = pix >> 24; - if (ta != 0) - { - u32 dpix = _NoDestRead ? 0 : *dest; - u32 invta = 0x100 - ta; - u32 r = (source32_r(pix) * ta + dest_r(dpix) * invta) >> 8; - u32 g = (source32_g(pix) * ta + dest_g(dpix) * invta) >> 8; - u32 b = (source32_b(pix) * ta + dest_b(dpix) * invta) >> 8; + u32 dpix = _NoDestRead ? 0 : *dest; + u32 r = (source32_r(pix) * dest_r(dpix)) >> (8 - _SrcShiftR); + u32 g = (source32_g(pix) * dest_g(dpix)) >> (8 - _SrcShiftG); + u32 b = (source32_b(pix) * dest_b(dpix)) >> (8 - _SrcShiftB); - *dest = dest_assemble_rgb(r, g, b); - } - dest++; + *dest++ = dest_assemble_rgb(r, g, b); curu += dudx; curv += dvdx; } } - - // lookup case else { // loop over cols for (s32 x = setup.startx; x < endx; x++) { u32 pix = get_texel_argb32(prim.texture, curu, curv); - u32 ta = pix >> 24; - if (ta != 0) - { - u32 dpix = _NoDestRead ? 0 : *dest; - u32 invta = 0x100 - ta; - u32 r = ((palbase[(pix >> 16) & 0xff] >> _SrcShiftR) * ta + dest_r(dpix) * invta) >> 8; - u32 g = ((palbase[(pix >> 8) & 0xff] >> _SrcShiftG) * ta + dest_g(dpix) * invta) >> 8; - u32 b = ((palbase[(pix >> 0) & 0xff] >> _SrcShiftB) * ta + dest_b(dpix) * invta) >> 8; + u32 dpix = _NoDestRead ? 0 : *dest; + u32 r = (palbase[(pix >> 16) & 0xff] * dest_r(dpix)) >> 8; + u32 g = (palbase[(pix >> 8) & 0xff] * dest_g(dpix)) >> 8; + u32 b = (palbase[(pix >> 0) & 0xff] * dest_b(dpix)) >> 8; - *dest = dest_assemble_rgb(r, g, b); - } - dest++; + *dest++ = dest_assemble_rgb(r, g, b); curu += dudx; curv += dvdx; } @@ -1376,16 +1361,14 @@ private: // alpha and/or coloring case else { - u32 sr = u32(256.0f * prim.color.r); - u32 sg = u32(256.0f * prim.color.g); - u32 sb = u32(256.0f * prim.color.b); - u32 sa = u32(256.0f * prim.color.a); + u32 sr = u32(256.0f * prim.color.r * prim.color.a); + u32 sg = u32(256.0f * prim.color.g * prim.color.a); + u32 sb = u32(256.0f * prim.color.b * prim.color.a); - // clamp R,G,B and inverse A to 0-256 range + // clamp R,G,B to 0-256 range if (sr > 0x100) { if (s32(sr) < 0) sr = 0; else sr = 0x100; } if (sg > 0x100) { if (s32(sg) < 0) sg = 0; else sg = 0x100; } if (sb > 0x100) { if (s32(sb) < 0) sb = 0; else sb = 0x100; } - if (sa > 0x100) { if (s32(sa) < 0) sa = 0; else sa = 0x100; } // loop over rows for (s32 y = setup.starty; y < setup.endy; y++) @@ -1401,43 +1384,28 @@ private: for (s32 x = setup.startx; x < endx; x++) { u32 pix = get_texel_argb32(prim.texture, curu, curv); - u32 ta = (pix >> 24) * sa; - if (ta != 0) - { - u32 dpix = _NoDestRead ? 0 : *dest; - u32 invsta = (0x10000 - ta) << 8; - u32 r = (source32_r(pix) * sr * ta + dest_r(dpix) * invsta) >> 24; - u32 g = (source32_g(pix) * sg * ta + dest_g(dpix) * invsta) >> 24; - u32 b = (source32_b(pix) * sb * ta + dest_b(dpix) * invsta) >> 24; + u32 dpix = _NoDestRead ? 0 : *dest; + u32 r = (source32_r(pix) * sr * dest_r(dpix)) >> (16 - _SrcShiftR); + u32 g = (source32_g(pix) * sg * dest_g(dpix)) >> (16 - _SrcShiftG); + u32 b = (source32_b(pix) * sb * dest_b(dpix)) >> (16 - _SrcShiftB); - *dest = dest_assemble_rgb(r, g, b); - } - dest++; + *dest++ = dest_assemble_rgb(r, g, b); curu += dudx; curv += dvdx; } } - - - // lookup case else { // loop over cols for (s32 x = setup.startx; x < endx; x++) { u32 pix = get_texel_argb32(prim.texture, curu, curv); - u32 ta = (pix >> 24) * sa; - if (ta != 0) - { - u32 dpix = _NoDestRead ? 0 : *dest; - u32 invsta = (0x10000 - ta) << 8; - u32 r = ((palbase[(pix >> 16) & 0xff] >> _SrcShiftR) * sr * ta + dest_r(dpix) * invsta) >> 24; - u32 g = ((palbase[(pix >> 8) & 0xff] >> _SrcShiftG) * sg * ta + dest_g(dpix) * invsta) >> 24; - u32 b = ((palbase[(pix >> 0) & 0xff] >> _SrcShiftB) * sb * ta + dest_b(dpix) * invsta) >> 24; + u32 dpix = _NoDestRead ? 0 : *dest; + u32 r = (palbase[(pix >> 16) & 0xff] * sr * dest_r(dpix)) >> 16; + u32 g = (palbase[(pix >> 8) & 0xff] * sg * dest_g(dpix)) >> 16; + u32 b = (palbase[(pix >> 0) & 0xff] * sb * dest_b(dpix)) >> 16; - *dest = dest_assemble_rgb(r, g, b); - } - dest++; + *dest++ = dest_assemble_rgb(r, g, b); curu += dudx; curv += dvdx; } @@ -1447,22 +1415,22 @@ private: } + //************************************************************************** + // 32-BIT ARGB QUAD RASTERIZERS + //************************************************************************** + //------------------------------------------------- - // draw_quad_argb32_multiply - perform - // rasterization using RGB multiply + // draw_quad_argb32_alpha - perform + // rasterization using standard alpha blending //------------------------------------------------- - static void draw_quad_argb32_multiply(const render_primitive &prim, _PixelType *dstdata, u32 pitch, quad_setup_data &setup) + static void draw_quad_argb32_alpha(const render_primitive &prim, _PixelType *dstdata, u32 pitch, quad_setup_data &setup) { const rgb_t *palbase = prim.texture.palette; s32 dudx = setup.dudx; s32 dvdx = setup.dvdx; s32 endx = setup.endx; - // simply can't do this without reading from the dest - if (_NoDestRead) - return; - // fast case: no coloring, no alpha if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a)) { @@ -1480,28 +1448,42 @@ private: for (s32 x = setup.startx; x < endx; x++) { u32 pix = get_texel_argb32(prim.texture, curu, curv); - u32 dpix = _NoDestRead ? 0 : *dest; - u32 r = (source32_r(pix) * dest_r(dpix)) >> (8 - _SrcShiftR); - u32 g = (source32_g(pix) * dest_g(dpix)) >> (8 - _SrcShiftG); - u32 b = (source32_b(pix) * dest_b(dpix)) >> (8 - _SrcShiftB); + u32 ta = pix >> 24; + if (ta != 0) + { + u32 dpix = _NoDestRead ? 0 : *dest; + u32 invta = 0x100 - ta; + u32 r = (source32_r(pix) * ta + dest_r(dpix) * invta) >> 8; + u32 g = (source32_g(pix) * ta + dest_g(dpix) * invta) >> 8; + u32 b = (source32_b(pix) * ta + dest_b(dpix) * invta) >> 8; - *dest++ = dest_assemble_rgb(r, g, b); + *dest = dest_assemble_rgb(r, g, b); + } + dest++; curu += dudx; curv += dvdx; } } + + // lookup case else { // loop over cols for (s32 x = setup.startx; x < endx; x++) { u32 pix = get_texel_argb32(prim.texture, curu, curv); - u32 dpix = _NoDestRead ? 0 : *dest; - u32 r = (palbase[(pix >> 16) & 0xff] * dest_r(dpix)) >> 8; - u32 g = (palbase[(pix >> 8) & 0xff] * dest_g(dpix)) >> 8; - u32 b = (palbase[(pix >> 0) & 0xff] * dest_b(dpix)) >> 8; + u32 ta = pix >> 24; + if (ta != 0) + { + u32 dpix = _NoDestRead ? 0 : *dest; + u32 invta = 0x100 - ta; + u32 r = ((palbase[(pix >> 16) & 0xff] >> _SrcShiftR) * ta + dest_r(dpix) * invta) >> 8; + u32 g = ((palbase[(pix >> 8) & 0xff] >> _SrcShiftG) * ta + dest_g(dpix) * invta) >> 8; + u32 b = ((palbase[(pix >> 0) & 0xff] >> _SrcShiftB) * ta + dest_b(dpix) * invta) >> 8; - *dest++ = dest_assemble_rgb(r, g, b); + *dest = dest_assemble_rgb(r, g, b); + } + dest++; curu += dudx; curv += dvdx; } @@ -1512,14 +1494,16 @@ private: // alpha and/or coloring case else { - u32 sr = u32(256.0f * prim.color.r * prim.color.a); - u32 sg = u32(256.0f * prim.color.g * prim.color.a); - u32 sb = u32(256.0f * prim.color.b * prim.color.a); + u32 sr = u32(256.0f * prim.color.r); + u32 sg = u32(256.0f * prim.color.g); + u32 sb = u32(256.0f * prim.color.b); + u32 sa = u32(256.0f * prim.color.a); // clamp R,G,B and inverse A to 0-256 range if (sr > 0x100) { if (s32(sr) < 0) sr = 0; else sr = 0x100; } if (sg > 0x100) { if (s32(sg) < 0) sg = 0; else sg = 0x100; } if (sb > 0x100) { if (s32(sb) < 0) sb = 0; else sb = 0x100; } + if (sa > 0x100) { if (s32(sa) < 0) sa = 0; else sa = 0x100; } // loop over rows for (s32 y = setup.starty; y < setup.endy; y++) @@ -1535,28 +1519,43 @@ private: for (s32 x = setup.startx; x < endx; x++) { u32 pix = get_texel_argb32(prim.texture, curu, curv); - u32 dpix = _NoDestRead ? 0 : *dest; - u32 r = (source32_r(pix) * sr * dest_r(dpix)) >> (16 - _SrcShiftR); - u32 g = (source32_g(pix) * sg * dest_g(dpix)) >> (16 - _SrcShiftG); - u32 b = (source32_b(pix) * sb * dest_b(dpix)) >> (16 - _SrcShiftB); + u32 ta = (pix >> 24) * sa; + if (ta != 0) + { + u32 dpix = _NoDestRead ? 0 : *dest; + u32 invsta = (0x10000 - ta) << 8; + u32 r = (source32_r(pix) * sr * ta + dest_r(dpix) * invsta) >> 24; + u32 g = (source32_g(pix) * sg * ta + dest_g(dpix) * invsta) >> 24; + u32 b = (source32_b(pix) * sb * ta + dest_b(dpix) * invsta) >> 24; - *dest++ = dest_assemble_rgb(r, g, b); + *dest = dest_assemble_rgb(r, g, b); + } + dest++; curu += dudx; curv += dvdx; } } + + + // lookup case else { // loop over cols for (s32 x = setup.startx; x < endx; x++) { u32 pix = get_texel_argb32(prim.texture, curu, curv); - u32 dpix = _NoDestRead ? 0 : *dest; - u32 r = (palbase[(pix >> 16) & 0xff] * sr * dest_r(dpix)) >> 16; - u32 g = (palbase[(pix >> 8) & 0xff] * sg * dest_g(dpix)) >> 16; - u32 b = (palbase[(pix >> 0) & 0xff] * sb * dest_b(dpix)) >> 16; + u32 ta = (pix >> 24) * sa; + if (ta != 0) + { + u32 dpix = _NoDestRead ? 0 : *dest; + u32 invsta = (0x10000 - ta) << 8; + u32 r = ((palbase[(pix >> 16) & 0xff] >> _SrcShiftR) * sr * ta + dest_r(dpix) * invsta) >> 24; + u32 g = ((palbase[(pix >> 8) & 0xff] >> _SrcShiftG) * sg * ta + dest_g(dpix) * invsta) >> 24; + u32 b = ((palbase[(pix >> 0) & 0xff] >> _SrcShiftB) * sb * ta + dest_b(dpix) * invsta) >> 24; - *dest++ = dest_assemble_rgb(r, g, b); + *dest = dest_assemble_rgb(r, g, b); + } + dest++; curu += dudx; curv += dvdx; } @@ -1803,6 +1802,11 @@ private: draw_quad_rgb32(prim, dstdata, pitch, setup); break; + case PRIMFLAG_TEXFORMAT(TEXFORMAT_RGB32) | PRIMFLAG_BLENDMODE(BLENDMODE_RGB_MULTIPLY): + case PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32) | PRIMFLAG_BLENDMODE(BLENDMODE_RGB_MULTIPLY): + draw_quad_rgb32_multiply(prim, dstdata, pitch, setup); + break; + case PRIMFLAG_TEXFORMAT(TEXFORMAT_RGB32) | PRIMFLAG_BLENDMODE(BLENDMODE_ADD): draw_quad_rgb32_add(prim, dstdata, pitch, setup); break; @@ -1811,10 +1815,6 @@ private: draw_quad_argb32_alpha(prim, dstdata, pitch, setup); break; - case PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32) | PRIMFLAG_BLENDMODE(BLENDMODE_RGB_MULTIPLY): - draw_quad_argb32_multiply(prim, dstdata, pitch, setup); - break; - case PRIMFLAG_TEXFORMAT(TEXFORMAT_ARGB32) | PRIMFLAG_BLENDMODE(BLENDMODE_ADD): draw_quad_argb32_add(prim, dstdata, pitch, setup); break; diff --git a/src/mame/drivers/4dpi.cpp b/src/mame/drivers/4dpi.cpp index 4fb914dcf21..95643af993b 100644 --- a/src/mame/drivers/4dpi.cpp +++ b/src/mame/drivers/4dpi.cpp @@ -55,8 +55,8 @@ // buses and connectors #include "machine/nscsi_bus.h" -#include "machine/nscsi_hd.h" -#include "machine/nscsi_cd.h" +#include "bus/nscsi/hd.h" +#include "bus/nscsi/cd.h" #include "bus/rs232/rs232.h" #include "bus/sgikbd/sgikbd.h" #include "bus/rs232/hlemouse.h" diff --git a/src/mame/drivers/ampro.cpp b/src/mame/drivers/ampro.cpp index 2d11883ec3c..013192e6699 100644 --- a/src/mame/drivers/ampro.cpp +++ b/src/mame/drivers/ampro.cpp @@ -23,8 +23,7 @@ of a hard drive of up to 88MB. #include "cpu/z80/z80.h" #include "imagedev/floppy.h" #include "machine/ncr5380n.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/devices.h" #include "machine/output_latch.h" #include "machine/z80daisy.h" #include "machine/z80ctc.h" @@ -160,12 +159,6 @@ static void ampro_floppies(device_slot_interface &device) device.option_add("525dd", FLOPPY_525_DD); } -static void scsi_devices(device_slot_interface &device) -{ - device.option_add("harddisk", NSCSI_HARDDISK); - device.option_add_internal("ncr", NCR5380N); -} - /* Input ports */ static INPUT_PORTS_START( ampro ) PORT_START("ID") @@ -247,14 +240,14 @@ void ampro_state::ampro(machine_config &config) SOFTWARE_LIST(config, "flop_list").set_original("ampro"); NSCSI_BUS(config, "scsi"); - NSCSI_CONNECTOR(config, "scsi:0", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:1", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:2", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:3", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:4", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:5", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:6", scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:7", scsi_devices, "ncr", true).set_option_machine_config("ncr", [] (device_t *device) { + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr", NCR5380N).machine_config([] (device_t *device) { //downcast<ncr5380n_device &>(*device).irq_handler().set(m_ctc, FUNC(z80ctc_device::trg2)); // only if JMP3 shorted //downcast<ncr5380n_device &>(*device).drq_handler().set(m_dart, FUNC(z80dart_device::dcda_w)); // only if JMP8 shorted }); diff --git a/src/mame/drivers/cps3.cpp b/src/mame/drivers/cps3.cpp index ad6db84fde7..5986ad19a8a 100644 --- a/src/mame/drivers/cps3.cpp +++ b/src/mame/drivers/cps3.cpp @@ -464,7 +464,7 @@ hardware modification to the security cart..... #include "machine/intelfsh.h" #include "machine/nvram.h" #include "includes/cps3.h" -#include "machine/nscsi_cd.h" +#include "bus/nscsi/cd.h" #include "machine/wd33c9x.h" #include "screen.h" #include "speaker.h" diff --git a/src/mame/drivers/decstation.cpp b/src/mame/drivers/decstation.cpp index 04623dfa6a4..17ffb7eac0d 100644 --- a/src/mame/drivers/decstation.cpp +++ b/src/mame/drivers/decstation.cpp @@ -65,8 +65,8 @@ #include "machine/z80scc.h" #include "machine/ncr5390.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "machine/dec_lk201.h" #include "machine/am79c90.h" #include "machine/dc7085.h" diff --git a/src/mame/drivers/glasgow.cpp b/src/mame/drivers/glasgow.cpp index 7432d460bc4..aeae4ab3463 100644 --- a/src/mame/drivers/glasgow.cpp +++ b/src/mame/drivers/glasgow.cpp @@ -43,7 +43,9 @@ How to play (quick guide) #include "sound/beep.h" #include "speaker.h" -#include "glasgow.lh" +// internal artwork +#include "mephisto_amsterdam.lh" +#include "mephisto_glasgow.lh" class glasgow_state : public driver_device @@ -263,45 +265,45 @@ void amsterd_state::dallas32_mem(address_map &map) static INPUT_PORTS_START( new_keyboard ) //Amsterdam, Dallas 32, Roma, Roma 32 PORT_START("LINE0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B 2") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C 3") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("D 4") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E 5") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F 6") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("9") PORT_CODE(KEYCODE_9) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("0") PORT_CODE(KEYCODE_0) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B 2") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C 3") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("D 4") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E 5") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F 6") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_START("LINE1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INF") PORT_CODE(KEYCODE_I) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CLR") PORT_CODE(KEYCODE_BACKSPACE) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("G 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CLR") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("G 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) INPUT_PORTS_END static INPUT_PORTS_START( old_keyboard ) //Glasgow,Dallas PORT_START("LINE0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("9") PORT_CODE(KEYCODE_9) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSPACE) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("C 3") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("D 4") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("A 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("F 6") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("B 2") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("C 3") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("D 4") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("A 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("F 6") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("B 2") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_START("LINE1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("E 5") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("E 5") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("INF") PORT_CODE(KEYCODE_I) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("0") PORT_CODE(KEYCODE_0) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("H 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("H 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("G 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("G 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) INPUT_PORTS_END @@ -316,7 +318,7 @@ void glasgow_state::glasgow(machine_config &config) m_board->set_delay(attotime::from_msec(200)); /* video hardware */ - config.set_default_layout(layout_glasgow); + config.set_default_layout(layout_mephisto_glasgow); SPEAKER(config, "mono").front_center(); BEEP(config, m_beep, 44).add_route(ALL_OUTPUTS, "mono", 0.50); @@ -330,11 +332,13 @@ void amsterd_state::amsterd(machine_config &config) /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &amsterd_state::amsterd_mem); + + config.set_default_layout(layout_mephisto_amsterdam); } void amsterd_state::dallas32(machine_config &config) { - glasgow(config); + amsterd(config); /* basic machine hardware */ M68020(config.replace(), m_maincpu, 14_MHz_XTAL); diff --git a/src/mame/drivers/indy_indigo2.cpp b/src/mame/drivers/indy_indigo2.cpp index ca6b520801f..3faea787328 100644 --- a/src/mame/drivers/indy_indigo2.cpp +++ b/src/mame/drivers/indy_indigo2.cpp @@ -64,8 +64,8 @@ #include "machine/hpc3.h" #include "machine/ioc2.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "machine/sgi.h" #include "machine/vino.h" #include "machine/wd33c9x.h" diff --git a/src/mame/drivers/kinst.cpp b/src/mame/drivers/kinst.cpp index aaa86789fed..69b198b2b00 100644 --- a/src/mame/drivers/kinst.cpp +++ b/src/mame/drivers/kinst.cpp @@ -199,7 +199,8 @@ public: m_rombase(*this, "rombase"), m_maincpu(*this, "maincpu"), m_ata(*this, "ata"), - m_dcs(*this, "dcs") + m_dcs(*this, "dcs"), + m_palette(*this, "palette") { } @@ -221,6 +222,7 @@ private: required_device<mips3_device> m_maincpu; required_device<ata_interface_device> m_ata; required_device<dcs_audio_2k_device> m_dcs; + required_device<palette_device> m_palette; uint32_t *m_video_base; const uint8_t *m_control_map; @@ -231,7 +233,7 @@ private: TIMER_IRQ0_STOP }; - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(irq0_start); DECLARE_READ32_MEMBER(control_r); DECLARE_WRITE32_MEMBER(control_w); @@ -313,13 +315,15 @@ void kinst_state::machine_reset() * *************************************/ -uint32_t kinst_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t kinst_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { + const pen_t *pen = m_palette->pens(); + /* loop over rows and copy to the destination */ for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { uint32_t *src = &m_video_base[640/4 * y]; - uint16_t *dest = &bitmap.pix16(y, cliprect.min_x); + uint32_t *dest = &bitmap.pix32(y, cliprect.min_x); /* loop over columns */ for (int x = cliprect.min_x; x < cliprect.max_x; x += 2) @@ -327,8 +331,8 @@ uint32_t kinst_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, uint32_t data = *src++; /* store two pixels */ - *dest++ = (data >> 0) & 0x7fff; - *dest++ = (data >> 16) & 0x7fff; + *dest++ = pen[(data >> 0) & 0x7fff]; + *dest++ = pen[(data >> 16) & 0x7fff]; } } return 0; @@ -738,9 +742,8 @@ void kinst_state::kinst(machine_config &config) screen.set_size(320, 240); screen.set_visarea(0, 319, 0, 239); screen.set_screen_update(FUNC(kinst_state::screen_update)); - screen.set_palette("palette"); - PALETTE(config, "palette", palette_device::BGR_555); + PALETTE(config, m_palette, palette_device::BGR_555); /* sound hardware */ DCS_AUDIO_2K(config, m_dcs, 0); diff --git a/src/mame/drivers/krz2000.cpp b/src/mame/drivers/krz2000.cpp index 6e622905596..213f93c0369 100644 --- a/src/mame/drivers/krz2000.cpp +++ b/src/mame/drivers/krz2000.cpp @@ -24,8 +24,8 @@ #include "machine/bankdev.h" #include "machine/upd765.h" #include "machine/ncr5380n.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "video/t6963c.h" #include "screen.h" #include "emupal.h" diff --git a/src/mame/drivers/lb186.cpp b/src/mame/drivers/lb186.cpp index 92ddb98e54e..b2488e4b979 100644 --- a/src/mame/drivers/lb186.cpp +++ b/src/mame/drivers/lb186.cpp @@ -5,8 +5,8 @@ #include "cpu/i86/i186.h" #include "machine/wd_fdc.h" #include "machine/mc68681.h" +#include "bus/nscsi/hd.h" #include "bus/rs232/rs232.h" -#include "machine/nscsi_hd.h" #include "machine/ncr5380n.h" #include "imagedev/floppy.h" #include "formats/pc_dsk.h" diff --git a/src/mame/drivers/mephisto.cpp b/src/mame/drivers/mephisto.cpp index a525b7571d0..e86eef1fae2 100644 --- a/src/mame/drivers/mephisto.cpp +++ b/src/mame/drivers/mephisto.cpp @@ -70,7 +70,9 @@ Mephisto 4 Turbo Kit 18mhz - (mm4tk) #include "sound/beep.h" #include "speaker.h" -#include "mephisto.lh" +// internal artwork +#include "mephisto_mm2.lh" + class mephisto_state : public driver_device { @@ -90,8 +92,6 @@ public: void mm2(machine_config &config); void mephisto(machine_config &config); - void init_mephisto(); - private: required_device<m65c02_device> m_maincpu; required_device<hc259_device> m_outlatch; @@ -197,42 +197,41 @@ void mephisto_state::mm2_mem(address_map &map) map(0x8000, 0xffff).rom(); } -INPUT_PORTS_EXTERN( chessboard ); static INPUT_PORTS_START( mephisto ) PORT_START("KEY1_0") //Port $2c00 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_F1) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) PORT_START("KEY1_1") //Port $2c01 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("POS") PORT_CODE(KEYCODE_F2) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) PORT_START("KEY1_2") //Port $2c02 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("MEM") PORT_CODE(KEYCODE_F3) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) PORT_START("KEY1_3") //Port $2c03 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("INFO") PORT_CODE(KEYCODE_F4) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) PORT_START("KEY1_4") //Port $2c04 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("LEV") PORT_CODE(KEYCODE_F5) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) PORT_START("KEY1_5") //Port $2c05 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_START("KEY1_6") //Port $2c06 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_START("KEY1_7") //Port $2c07 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_START("KEY2_0") //Port $2c08 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("E 5") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("E 5") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_START("KEY2_1") //Port $2c09 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F 6") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("F 6") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_START("KEY2_2") //Port $2c0a - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("G 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("G 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_START("KEY2_3") //Port $2c0b - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("A 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("A 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_START("KEY2_4") //Port $2c0c - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("H 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("H 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_START("KEY2_5") //Port $2c0d - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("B 2") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("B 2") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_START("KEY2_6") //Port $2c0e - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("C 3") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("C 3") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_START("KEY2_7") //Port $2c0f - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("D 4") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) + PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("D 4") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) INPUT_PORTS_END @@ -258,18 +257,23 @@ TIMER_DEVICE_CALLBACK_MEMBER(mephisto_state::update_irq)//only mm2 void mephisto_state::machine_start() { m_digits.resolve(); + + save_item(NAME(m_lcd_shift_counter)); + save_item(NAME(m_led7)); + save_item(NAME(m_allowNMI)); + m_lcd_shift_counter = 3; m_allowNMI = 1; } MACHINE_START_MEMBER(mephisto_state,mm2) { - m_digits.resolve(); - m_lcd_shift_counter = 3; + mephisto_state::machine_start(); + m_led7=0xff; + m_allowNMI = 0; } - void mephisto_state::machine_reset() { m_lcd_shift_counter = 3; @@ -300,7 +304,7 @@ void mephisto_state::mephisto(machine_config &config) TIMER(config, "nmi_timer").configure_periodic(FUNC(mephisto_state::update_nmi), attotime::from_hz(600)); MEPHISTO_SENSORS_BOARD(config, "board"); - config.set_default_layout(layout_mephisto); + config.set_default_layout(layout_mephisto_mm2); } void mephisto_state::rebel5(machine_config &config) @@ -387,22 +391,17 @@ ROM_START(mm50) ROM_END -void mephisto_state::init_mephisto() -{ - m_lcd_shift_counter = 3; -} - /*************************************************************************** Game driver(s) ***************************************************************************/ -/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME, FLAGS */ -CONS( 1984, mm2, mm4, 0, mm2, mephisto, mephisto_state, init_mephisto, "Hegener & Glaser", "Mephisto MM II", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1986, rebel5, mm4, 0, rebel5, mephisto, mephisto_state, init_mephisto, "Hegener & Glaser", "Mephisto Rebell 5.0", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1987, mm4, 0, 0, mephisto, mephisto, mephisto_state, init_mephisto, "Hegener & Glaser", "Mephisto MM IV", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto_state, init_mephisto, "Hegener & Glaser", "Mephisto MM IV (TurboKit + HG440)", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1990, mm5, mm4, 0, mephisto, mephisto, mephisto_state, init_mephisto, "Hegener & Glaser", "Mephisto MM V (V5.1)", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1990, mm50, mm4, 0, mephisto, mephisto, mephisto_state, init_mephisto, "Hegener & Glaser", "Mephisto MM V (V5.0)", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1990, mm5tk, mm4, 0, mm4tk, mephisto, mephisto_state, init_mephisto, "Hegener & Glaser", "Mephisto MM V (V5.1) (TurboKit + HG550)", MACHINE_NOT_WORKING|MACHINE_REQUIRES_ARTWORK | MACHINE_CLICKABLE_ARTWORK ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */ +CONS( 1984, mm2, mm4, 0, mm2, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto MM II", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1986, rebel5, mm4, 0, rebel5, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto Rebell 5.0", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, mm4, 0, 0, mephisto, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto MM IV", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto MM IV (TurboKit + HG440)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, mm5, mm4, 0, mephisto, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto MM V (V5.1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, mm50, mm4, 0, mephisto, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto MM V (V5.0)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, mm5tk, mm4, 0, mm4tk, mephisto, mephisto_state, empty_init, "Hegener & Glaser", "Mephisto MM V (V5.1) (TurboKit + HG550)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff --git a/src/mame/drivers/mindset.cpp b/src/mame/drivers/mindset.cpp index bddb8c12a99..ff0feb4772a 100644 --- a/src/mame/drivers/mindset.cpp +++ b/src/mame/drivers/mindset.cpp @@ -11,6 +11,8 @@ #include "screen.h" #include "speaker.h" +#include "mindset.lh" + class mindset_state: public driver_device { public: @@ -28,6 +30,10 @@ protected: required_device<floppy_connector> m_fdco[2]; required_shared_ptr<u16> m_vram; required_ioport_array<11> m_kbd_row; + output_finder<2> m_floppy_leds; + output_finder<> m_red_led; + output_finder<> m_yellow_led; + output_finder<> m_green_led; memory_access_cache<1, 0, ENDIANNESS_LITTLE> *m_gcos; @@ -94,6 +100,8 @@ protected: void trap_w(offs_t offset, u16 data); u16 trap_clear_interrupt(); + template<int floppy> void floppy_led_cb(floppy_image_device *, int state); + u16 keyscan(); u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -119,16 +127,35 @@ mindset_state::mindset_state(const machine_config &mconfig, device_type type, co m_fdc(*this, "fdc"), m_fdco{{*this, "fdc:0"}, {*this, "fdc:1"}}, m_vram(*this, "vram"), - m_kbd_row(*this, "K%02u", 0U) + m_kbd_row(*this, "K%02u", 0U), + m_floppy_leds(*this, "drive%u_led", 0U), + m_red_led(*this, "red_led"), + m_yellow_led(*this, "yellow_led"), + m_green_led(*this, "green_led") +{ +} + +template<int floppy> void mindset_state::floppy_led_cb(floppy_image_device *, int state) { + m_floppy_leds[floppy] = state; } void mindset_state::machine_start() { + m_floppy_leds.resolve(); + m_red_led.resolve(); + m_yellow_led.resolve(); + m_green_led.resolve(); + m_gcos = m_maincpu->space(AS_PROGRAM).cache<1, 0, ENDIANNESS_LITTLE>(); for(int i=0; i<2; i++) m_floppy[i] = m_fdco[i]->get_device(); + if(m_floppy[0]) + m_floppy[0]->setup_led_cb(floppy_image_device::led_cb(&mindset_state::floppy_led_cb<0>, this)); + if(m_floppy[1]) + m_floppy[1]->setup_led_cb(floppy_image_device::led_cb(&mindset_state::floppy_led_cb<1>, this)); + save_item(NAME(m_fdc_intext)); save_item(NAME(m_fdc_int)); save_item(NAME(m_fdc_drq)); @@ -193,6 +220,10 @@ void mindset_state::sys_p1_w(u8 data) void mindset_state::sys_p2_w(u8 data) { m_maincpu->int3_w(!(data & 0x80)); + m_red_led = !BIT(data, 2); + m_yellow_led = !BIT(data, 1); + m_green_led = !BIT(data, 0); + // logerror("power %s\n", data & 0x40 ? // logerror("SYS: write p2 %02x\n", data); } @@ -235,6 +266,40 @@ u16 mindset_state::keyscan() for(unsigned int i=0; i<11; i++) if(!(src & (1 << i))) res &= m_kbd_row[i]->read(); + if(!(src & 0x2000)) { + switch((src >> 1) & 3) { + case 0: + res &= 0xc0; + break; + case 1: + res &= 0xc0; + break; + case 2: + res &= 0xc0; + break; + case 3: + res &= 0xc0; + break; + } + } + if(!(src & 0x8000)) { + switch((src >> 1) & 3) { + case 0: + res &= 0xc0; + break; + case 1: + res &= 0xc0; + break; + case 2: + res &= 0xc0; + break; + case 3: + res &= 0xc0; + break; + } + } + + // logerror("scan src=%04x %04x %d%d/%d(%03x)\n", src, 0xffff ^ src, (src >> 15) & 1, (src >> 13) & 1, (src >> 11) & 3, m_kbdcpu->pc()); return res; } @@ -281,7 +346,7 @@ void mindset_state::dispreg_w(u16 data) logerror("screen position (%d, %d)\n", (data >> 8) & 15, (data >> 12) & 15); break; case 1: - m_borderidx = data & 0xf; + m_borderidx = (data >> 8) & 0xf; logerror("border color %x\n", m_borderidx); break; case 2: { @@ -337,7 +402,7 @@ void mindset_state::dispreg_w(u16 data) u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { // Temporary gross hack - if(cliprect.max_y != 399) + if(cliprect.max_y != 479) return 0; const u16 *bank = m_dispctrl & 0x4000 ? m_vram + 8000 : m_vram; bool ibm_mode = m_dispctrl & 0x2000; @@ -345,6 +410,12 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co int pixels_per_byte_order = (m_dispctrl & 0x0600) >> 9; bool large_pixels = m_dispctrl & 0x0100; + bitmap.fill(m_palette[m_borderidx]); + + int dx = ((m_screenpos >> 8) & 15) * (751 - 640) / 15; + int dy = ((m_screenpos >> 12) & 15) * (480 - 400) / 15; + + if(ibm_mode) { if(large_pixels) { if(!interleave) { @@ -355,7 +426,7 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co for(u32 yy=0; yy<2; yy++) { const u16 *src = bank + 4096*yy; for(u32 y=yy; y<200; y+=2) { - u32 *dest = &bitmap.pix32(2*y+1); + u32 *dest = &bitmap.pix32(2*y+field+dy, dx); for(u32 x=0; x<320; x+=8) { u16 sv = *src++; *dest++ = m_palette[palind[(sv >> 6) & 3]]; @@ -393,7 +464,7 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co for(int field=0; field<2; field++) { const u16 *src = bank; for(u32 y=0; y<200; y++) { - u32 *dest = &bitmap.pix32(2*y+field); + u32 *dest = &bitmap.pix32(2*y+field+dy, dx); for(u32 x=0; x<320; x+=4) { u16 sv = *src++; *dest++ = m_palette[(sv >> 4) & 15]; @@ -414,7 +485,7 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co for(int field=0; field<2; field++) { const u16 *src = bank; for(u32 y=0; y<200; y++) { - u32 *dest = &bitmap.pix32(2*y+field); + u32 *dest = &bitmap.pix32(2*y+field+dy, dx); for(u32 x=0; x<320; x+=8) { u16 sv = *src++; *dest++ = m_palette[palind[(sv >> 6) & 3]]; @@ -443,7 +514,7 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co for(int field=0; field<2; field++) { const u16 *src = bank; for(u32 y=0; y<200; y++) { - u32 *dest = &bitmap.pix32(2*y+field); + u32 *dest = &bitmap.pix32(2*y+field+dy, dx); for(u32 x=0; x<320; x+=16) { u16 sv = *src++; *dest++ = m_palette[palind[(sv >> 7) & 1]]; @@ -494,7 +565,7 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co m_palette[1] = 0xffffff; const u16 *src = bank; for(u32 y=0; y<200; y++) { - u32 *dest = &bitmap.pix32(2*y+field); + u32 *dest = &bitmap.pix32(2*y+field+dy, dx); for(u32 x=0; x<640; x+=8) { u16 sv = *src++; *dest++ = m_palette[palind[(sv >> 6) & 3]]; @@ -515,7 +586,7 @@ u32 mindset_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co for(int field=0; field<2; field++) { const u16 *src = bank; for(u32 y=0; y<200; y++) { - u32 *dest = &bitmap.pix32(2*y+field); + u32 *dest = &bitmap.pix32(2*y+field+dy, dx); for(u32 x=0; x<640; x+=16) { u16 sv = *src++; *dest++ = m_palette[palind[(sv >> 7) & 1]]; @@ -890,6 +961,7 @@ static void pc_dd_floppies(device_slot_interface &device) void mindset_state::mindset(machine_config &config) { config.m_perfect_cpu_quantum = ":syscpu"; + config.set_default_layout(layout_mindset); I80186(config, m_maincpu, 12_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &mindset_state::maincpu_mem); @@ -914,14 +986,16 @@ void mindset_state::mindset(machine_config &config) m_kbdcpu->t1_in_cb().set(FUNC(mindset_state::kbd_t1_r)); // Should be NTSC actually... we'll see + // Pretty sure the pixel clock is the 14.x one, the 12MHz one would only allow 630 pixels + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(60); m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(100)); - m_screen->set_size(640, 400); - m_screen->set_visarea(0, 639, 0, 399); + m_screen->set_size(751, 480); + m_screen->set_visarea(0, 750, 0, 479); m_screen->set_screen_update(FUNC(mindset_state::screen_update)); // Should be at the position indicated by display reg 2 - m_screen->scanline().set([this](int scanline) { m_maincpu->int2_w(scanline == 198); }); + m_screen->scanline().set([this](int scanline) { m_maincpu->int2_w(scanline == 398); }); m_screen->screen_vblank().set(m_maincpu, FUNC(i80186_cpu_device::int1_w)); I8272A(config, m_fdc, 16_MHz_XTAL/2, true); diff --git a/src/mame/drivers/mmodular.cpp b/src/mame/drivers/mmodular.cpp index 39cbb14cb4a..8a06d813482 100644 --- a/src/mame/drivers/mmodular.cpp +++ b/src/mame/drivers/mmodular.cpp @@ -41,8 +41,11 @@ #include "screen.h" #include "speaker.h" +// internal artwork +#include "mephisto_alm16.lh" +#include "mephisto_alm32.lh" #include "mephisto_berlin.lh" -#include "mmodular.lh" +#include "mephisto_gen32.lh" class mmodular_state : public driver_device @@ -278,7 +281,7 @@ void mmodular_state::alm16(machine_config &config) MEPHISTO_SENSORS_BOARD(config, "board"); MEPHISTO_DISPLAY_MODUL(config, "display"); - config.set_default_layout(layout_mmodular); + config.set_default_layout(layout_mephisto_alm16); } @@ -299,7 +302,7 @@ void mmodular_state::alm32(machine_config &config) MEPHISTO_SENSORS_BOARD(config, "board"); MEPHISTO_DISPLAY_MODUL(config, "display"); - config.set_default_layout(layout_mmodular); + config.set_default_layout(layout_mephisto_alm32); } @@ -320,7 +323,7 @@ void mmodular_state::gen32(machine_config &config) MEPHISTO_SENSORS_BOARD(config, "board"); MEPHISTO_DISPLAY_MODUL(config, "display"); - config.set_default_layout(layout_mmodular); + config.set_default_layout(layout_mephisto_gen32); } diff --git a/src/mame/drivers/nes.cpp b/src/mame/drivers/nes.cpp index 5631a9a21fc..b2aacb90e2a 100644 --- a/src/mame/drivers/nes.cpp +++ b/src/mame/drivers/nes.cpp @@ -77,6 +77,8 @@ void nes_state::nes(machine_config &config) NES_CONTROL_PORT(config, m_ctrl1, nes_control_port1_devices, "joypad"); NES_CONTROL_PORT(config, m_ctrl2, nes_control_port2_devices, "joypad"); + m_ctrl1->set_screen_tag(m_screen); + m_ctrl2->set_screen_tag(m_screen); NES_CART_SLOT(config, m_cartslot, NTSC_APU_CLOCK, nes_cart, nullptr); SOFTWARE_LIST(config, "cart_list").set_original("nes"); @@ -112,6 +114,9 @@ void nes_state::famicom(machine_config &config) NES_CONTROL_PORT(config.replace(), m_ctrl1, fc_control_port1_devices, "joypad"); NES_CONTROL_PORT(config.replace(), m_ctrl2, fc_control_port2_devices, "joypad"); NES_CONTROL_PORT(config, m_exp, fc_expansion_devices, nullptr); + m_ctrl1->set_screen_tag(m_screen); + m_ctrl2->set_screen_tag(m_screen); + m_exp->set_screen_tag(m_screen); SOFTWARE_LIST(config, "flop_list").set_original("famicom_flop"); SOFTWARE_LIST(config, "cass_list").set_original("famicom_cass"); @@ -142,6 +147,9 @@ void nes_state::famipalc(machine_config &config) NES_CONTROL_PORT(config.replace(), m_ctrl1, fc_control_port1_devices, "joypad"); NES_CONTROL_PORT(config.replace(), m_ctrl2, fc_control_port2_devices, "joypad"); NES_CONTROL_PORT(config, m_exp, fc_expansion_devices, nullptr); + m_ctrl1->set_screen_tag(m_screen); + m_ctrl2->set_screen_tag(m_screen); + m_exp->set_screen_tag(m_screen); SOFTWARE_LIST(config, "cass_list").set_original("famicom_cass"); } diff --git a/src/mame/drivers/nes_vt.cpp b/src/mame/drivers/nes_vt.cpp index 8c9e241d5e3..7f18938c98e 100644 --- a/src/mame/drivers/nes_vt.cpp +++ b/src/mame/drivers/nes_vt.cpp @@ -1395,6 +1395,8 @@ void nes_vt_state::nes_vt(machine_config &config) NES_CONTROL_PORT(config, m_ctrl1, nes_control_port1_devices, "joypad"); NES_CONTROL_PORT(config, m_ctrl2, nes_control_port2_devices, "joypad"); + m_ctrl1->set_screen_tag(m_screen); + m_ctrl2->set_screen_tag(m_screen); } void nes_vt_state::nes_vt_ddr(machine_config &config) @@ -1403,6 +1405,8 @@ void nes_vt_state::nes_vt_ddr(machine_config &config) NES_CONTROL_PORT(config, m_ctrl1, majesco_control_port1_devices, "ddr"); NES_CONTROL_PORT(config, m_ctrl2, majesco_control_port2_devices, nullptr); + m_ctrl1->set_screen_tag(m_screen); + m_ctrl2->set_screen_tag(m_screen); } void nes_vt_state::nes_vt_hum(machine_config &config) diff --git a/src/mame/drivers/next.cpp b/src/mame/drivers/next.cpp index ace185152d0..013cdd6c270 100644 --- a/src/mame/drivers/next.cpp +++ b/src/mame/drivers/next.cpp @@ -28,8 +28,8 @@ #include "emu.h" #include "includes/next.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "screen.h" #include "softlist.h" diff --git a/src/mame/drivers/playch10.cpp b/src/mame/drivers/playch10.cpp index 51786fb2abc..f0d17da7fda 100644 --- a/src/mame/drivers/playch10.cpp +++ b/src/mame/drivers/playch10.cpp @@ -673,6 +673,12 @@ void playch10_state::playch10(machine_config &config) PALETTE(config, "palette", FUNC(playch10_state::playch10_palette), 256); config.set_default_layout(layout_playch10); + screen_device &bottom(SCREEN(config, "bottom", SCREEN_TYPE_RASTER)); + bottom.set_refresh_hz(60); + bottom.set_size(32*8, 262); + bottom.set_visarea(0*8, 32*8-1, 0*8, 30*8-1); + bottom.set_screen_update(FUNC(playch10_state::screen_update_playch10_bottom)); + screen_device &top(SCREEN(config, "top", SCREEN_TYPE_RASTER)); top.set_refresh_hz(60); top.set_size(32*8, 262); @@ -680,12 +686,6 @@ void playch10_state::playch10(machine_config &config) top.set_screen_update(FUNC(playch10_state::screen_update_playch10_top)); top.screen_vblank().set(FUNC(playch10_state::vblank_irq)); - screen_device &bottom(SCREEN(config, "bottom", SCREEN_TYPE_RASTER)); - bottom.set_refresh_hz(60); - bottom.set_size(32*8, 262); - bottom.set_visarea(0*8, 32*8-1, 0*8, 30*8-1); - bottom.set_screen_update(FUNC(playch10_state::screen_update_playch10_bottom)); - PPU_2C03B(config, m_ppu, 0); m_ppu->set_screen("bottom"); m_ppu->set_cpu_tag("cart"); diff --git a/src/mame/drivers/poly88.cpp b/src/mame/drivers/poly88.cpp index 530a4d8b446..b588693a5a1 100644 --- a/src/mame/drivers/poly88.cpp +++ b/src/mame/drivers/poly88.cpp @@ -8,8 +8,7 @@ Poly-88 driver by Miodrag Milanovic 2019-05-25 Poly8813 new roms ToDo: -- POLY88 - MT 06231: Cassette saving hangs. Also, the system has different - formats depending on a switch. Only one format is currently emulated. +- POLY88 - Polyphase format not working because 8251 device doesn't support sync. - POLY8813 - Schematic shows a 8251 on the main board. - POLY8813 - Schematic of FDC shows a mc6852 and i8255, no dedicated fdc chip. @@ -100,7 +99,9 @@ static INPUT_PORTS_START( poly88 ) PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_CONFNAME( 0x80, 0x00, "Tape Mode") + PORT_CONFSETTING( 0x00, "Byte (300 baud)") + PORT_CONFSETTING( 0x80, "Polyphase (2400 baud)") PORT_START("LINE0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) @@ -173,12 +174,6 @@ static INPUT_PORTS_START( poly88 ) PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("LF") PORT_CODE(KEYCODE_RALT) INPUT_PORTS_END -static const struct CassetteOptions poly88_cassette_options = -{ - 1, /* channels */ - 16, /* bits per sample */ - 7200 /* sample frequency */ -}; /* F4 Character Displayer */ static const gfx_layout poly88_charlayout = @@ -219,23 +214,25 @@ void poly88_state::poly88(machine_config &config) GFXDECODE(config, "gfxdecode", "palette", gfx_poly88); PALETTE(config, "palette", palette_device::MONOCHROME); - /* audio hardware */ SPEAKER(config, "mono").front_center(); /* cassette */ CASSETTE(config, m_cassette); - m_cassette->set_create_opts(&poly88_cassette_options); m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED); m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); + TIMER(config, "kansas_r").configure_periodic(FUNC(poly88_state::kansas_r), attotime::from_hz(40000)); /* uart */ I8251(config, m_usart, 16.5888_MHz_XTAL / 9); - m_usart->txd_handler().set(FUNC(poly88_state::write_cas_tx)); - m_usart->rxrdy_handler().set(FUNC(poly88_state::poly88_usart_rxready)); + m_usart->rxrdy_handler().set(FUNC(poly88_state::usart_ready_w)); + m_usart->txrdy_handler().set(FUNC(poly88_state::usart_ready_w)); + m_usart->txd_handler().set([this] (bool state) { m_txd = state; }); + m_usart->dtr_handler().set([this] (bool state) { m_dtr = state; }); + m_usart->rts_handler().set([this] (bool state) { m_rts = state; }); MM5307AA(config, m_brg, 16.5888_MHz_XTAL / 18); - m_brg->output_cb().set(FUNC(poly88_state::cassette_txc_rxc_w)); + m_brg->output_cb().set(FUNC(poly88_state::cassette_clock_w)); /* snapshot */ SNAPSHOT(config, "snapshot", "img", attotime::from_seconds(2)).set_load_callback(FUNC(poly88_state::snapshot_cb), this); diff --git a/src/mame/drivers/r9751.cpp b/src/mame/drivers/r9751.cpp index c7b6d851c9a..0eb7b3a64ba 100644 --- a/src/mame/drivers/r9751.cpp +++ b/src/mame/drivers/r9751.cpp @@ -53,8 +53,8 @@ #include "machine/terminal.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "machine/wd33c9x.h" diff --git a/src/mame/drivers/rastersp.cpp b/src/mame/drivers/rastersp.cpp index 411c4cdff64..6e4fd1fd0ab 100644 --- a/src/mame/drivers/rastersp.cpp +++ b/src/mame/drivers/rastersp.cpp @@ -16,11 +16,11 @@ ****************************************************************************/ #include "emu.h" +#include "bus/nscsi/hd.h" #include "cpu/i386/i386.h" #include "cpu/tms32031/tms32031.h" #include "machine/53c7xx.h" #include "machine/mc146818.h" -#include "machine/nscsi_hd.h" #include "machine/nvram.h" #include "machine/timer.h" #include "sound/dac.h" diff --git a/src/mame/drivers/sbrkout.cpp b/src/mame/drivers/sbrkout.cpp index 77bc57eea4e..80e44e4804c 100644 --- a/src/mame/drivers/sbrkout.cpp +++ b/src/mame/drivers/sbrkout.cpp @@ -79,7 +79,7 @@ private: virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; - uint32_t screen_update_sbrkout(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_sbrkout(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(scanline_callback); TIMER_CALLBACK_MEMBER(pot_trigger_callback); void update_nmi_state(); @@ -369,14 +369,13 @@ WRITE8_MEMBER(sbrkout_state::sbrkout_videoram_w) * *************************************/ -uint32_t sbrkout_state::screen_update_sbrkout(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t sbrkout_state::screen_update_sbrkout(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { uint8_t *videoram = m_videoram; - int ball; m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); - for (ball = 2; ball >= 0; ball--) + for (int ball = 2; ball >= 0; ball--) { int code = ((videoram[0x380 + 0x18 + ball * 2 + 1] & 0x80) >> 7); int sx = 31 * 8 - videoram[0x380 + 0x10 + ball * 2]; @@ -581,7 +580,6 @@ void sbrkout_state::sbrkout(machine_config &config) SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(MAIN_CLOCK/2, 384, 0, 256, 262, 0, 224); m_screen->set_screen_update(FUNC(sbrkout_state::screen_update_sbrkout)); - m_screen->set_palette(m_palette); PALETTE(config, m_palette, palette_device::MONOCHROME); diff --git a/src/mame/drivers/sms.cpp b/src/mame/drivers/sms.cpp index 849fb122164..9bee323b0ab 100644 --- a/src/mame/drivers/sms.cpp +++ b/src/mame/drivers/sms.cpp @@ -502,9 +502,11 @@ void sms_state::sms_base(machine_config &config) SOFTWARE_LIST(config, "cart_list").set_original("sms"); SMS_CONTROL_PORT(config, m_port_ctrl1, sms_control_port_devices, "joypad"); + m_port_ctrl1->set_screen_tag(m_main_scr); m_port_ctrl1->th_input_handler().set(FUNC(sms_state::sms_ctrl1_th_input)); SMS_CONTROL_PORT(config, m_port_ctrl2, sms_control_port_devices, "joypad"); + m_port_ctrl2->set_screen_tag(m_main_scr); m_port_ctrl2->th_input_handler().set(FUNC(sms_state::sms_ctrl2_th_input)); } @@ -991,6 +993,7 @@ void sms_state::gamegear(machine_config &config) SOFTWARE_LIST(config, "cart_list").set_original("gamegear"); GG_EXT_PORT(config, m_port_gg_ext, gg_ext_port_devices, nullptr); + m_port_gg_ext->set_screen_tag(m_main_scr); m_port_gg_ext->th_input_handler().set(FUNC(sms_state::gg_ext_th_input)); m_is_gamegear = true; diff --git a/src/mame/drivers/sun3.cpp b/src/mame/drivers/sun3.cpp index 78e65bf33da..520df9cbe3d 100644 --- a/src/mame/drivers/sun3.cpp +++ b/src/mame/drivers/sun3.cpp @@ -189,8 +189,8 @@ fefc34a - start of mem_size, which queries ECC registers for each memory board #include "machine/z80scc.h" #include "machine/am79c90.h" #include "machine/ncr5380n.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "bus/rs232/rs232.h" #include "bus/sunkbd/sunkbd.h" diff --git a/src/mame/drivers/sun4.cpp b/src/mame/drivers/sun4.cpp index 7f13ed74617..5f3e6d9f8cd 100644 --- a/src/mame/drivers/sun4.cpp +++ b/src/mame/drivers/sun4.cpp @@ -411,6 +411,8 @@ #include "emu.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "bus/rs232/rs232.h" #include "bus/sunkbd/sunkbd.h" #include "bus/sunmouse/sunmouse.h" @@ -422,8 +424,6 @@ #include "machine/bankdev.h" #include "machine/ncr5390.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" #include "machine/nvram.h" #include "machine/ram.h" #include "machine/sun4c_mmu.h" diff --git a/src/mame/drivers/tti.cpp b/src/mame/drivers/tti.cpp index 16e3f606c26..16b1f5b8815 100644 --- a/src/mame/drivers/tti.cpp +++ b/src/mame/drivers/tti.cpp @@ -16,14 +16,14 @@ Other: LED, 20MHz crystal. Next to the MC68901P is another chip just as large (4 ************************************************************************************************************************************/ #include "emu.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "bus/rs232/rs232.h" #include "cpu/m68000/m68000.h" #include "machine/74259.h" #include "machine/eepromser.h" #include "machine/mc68901.h" #include "machine/ncr5390.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" class tti_state : public driver_device { diff --git a/src/mame/drivers/tvg01.cpp b/src/mame/drivers/tvg01.cpp index 6c50360e8cd..c69ea517ce8 100644 --- a/src/mame/drivers/tvg01.cpp +++ b/src/mame/drivers/tvg01.cpp @@ -3,9 +3,9 @@ /******************************************************************************* The Boat - 1997(c) Hit Gun Co, LTD. + 1987(c) Hit Gun Co, LTD. - Gambling/Amusing game + Gambling/Amusement game Selectable through DIP switches. Driver by AJR. diff --git a/src/mame/drivers/uknc.cpp b/src/mame/drivers/uknc.cpp index 3a5bfaed28d..21319efbf4c 100644 --- a/src/mame/drivers/uknc.cpp +++ b/src/mame/drivers/uknc.cpp @@ -27,7 +27,7 @@ public: private: virtual void machine_reset() override; virtual void video_start() override; - uint32_t screen_update_uknc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); required_device<k1801vm2_device> m_maincpu; void uknc_mem(address_map &map); @@ -62,7 +62,7 @@ void uknc_state::video_start() { } -uint32_t uknc_state::screen_update_uknc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t uknc_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { return 0; } @@ -84,8 +84,7 @@ void uknc_state::uknc(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ screen.set_size(640, 480); screen.set_visarea(0, 640-1, 0, 480-1); - screen.set_screen_update(FUNC(uknc_state::screen_update_uknc)); - screen.set_palette("palette"); + screen.set_screen_update(FUNC(uknc_state::screen_update)); PALETTE(config, "palette", palette_device::MONOCHROME); } diff --git a/src/mame/drivers/univac.cpp b/src/mame/drivers/univac.cpp index a0b33aabd68..80bd1e3e586 100644 --- a/src/mame/drivers/univac.cpp +++ b/src/mame/drivers/univac.cpp @@ -132,6 +132,7 @@ public: , m_sio(*this, "sio") , m_alarm(*this, "alarm") , m_screen(*this, "screen") + , m_palette(*this, "palette") , m_keyboard(*this, "keyboard") , m_printer(*this, "printer") , m_p_chargen(*this, "chargen") @@ -180,7 +181,7 @@ private: DECLARE_WRITE_LINE_MEMBER(loopback_rxcb_w); DECLARE_WRITE_LINE_MEMBER(porte6_w); - u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void io_map(address_map &map); void mem_map(address_map &map); @@ -195,6 +196,7 @@ private: required_device<z80sio_device> m_sio; required_device<speaker_sound_device> m_alarm; required_device<screen_device> m_screen; + required_device<palette_device> m_palette; required_device<uts_keyboard_port_device> m_keyboard; required_device<rs232_port_device> m_printer; @@ -481,7 +483,7 @@ void univac_state::machine_start() save_item(NAME(m_sio_wrdyb)); } -uint32_t univac_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t univac_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { if (!m_display_enable) { @@ -489,29 +491,29 @@ uint32_t univac_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap return 0; } - u8 y,ra,chr; - uint16_t sy=0,x,ma=0,gfx; + const pen_t *pen = m_palette->pens(); + + uint16_t sy=0,ma=0; m_framecnt++; - for (y = 0; y < 25; y++) + for (u8 y = 0; y < 25; y++) { - for (ra = 0; ra < 14; ra++) + for (u8 ra = 0; ra < 14; ra++) { - uint16_t *p = &bitmap.pix16(sy++); + uint32_t *p = &bitmap.pix32(sy++); - for (x = ma; x < ma + 80; x++) + for (uint16_t x = ma; x < ma + 80; x++) { - chr = ram_r(x ^ m_disp_mask); // bit 7 = rv attribute (or dim, depending on control-page setting) + u8 chr = ram_r(x ^ m_disp_mask); // bit 7 = rv attribute (or dim, depending on control-page setting) - gfx = m_p_chargen[((chr & 0x7f)<<4) | ra]; + uint16_t gfx = m_p_chargen[((chr & 0x7f)<<4) | ra]; // chars 1C, 1D, 1F need special handling if ((chr >= 0x1c) && (chr <= 0x1f) && BIT(gfx, 7)) { gfx &= 0x7f; - // They also blink - if (m_framecnt & 16) + if (m_framecnt & 16) // They also blink gfx = 0; } @@ -520,18 +522,13 @@ uint32_t univac_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap gfx = ~gfx; /* Display a scanline of a character */ - *p++ = BIT(gfx, 8); - *p++ = BIT(gfx, 7); - *p++ = BIT(gfx, 6); - *p++ = BIT(gfx, 5); - *p++ = BIT(gfx, 4); - *p++ = BIT(gfx, 3); - *p++ = BIT(gfx, 2); - *p++ = BIT(gfx, 1); - *p++ = BIT(gfx, 0); + for (int bit = 8; bit >= 0; bit--) + { + *p++ = pen[BIT(gfx, bit)]; + } } } - ma+=80; + ma += 80; } return 0; } @@ -588,9 +585,8 @@ void univac_state::uts20(machine_config &config) /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER, rgb_t::green()); m_screen->set_screen_update(FUNC(univac_state::screen_update)); - m_screen->set_palette("palette"); - PALETTE(config, "palette", palette_device::MONOCHROME); - GFXDECODE(config, "gfxdecode", "palette", gfx_uts); + PALETTE(config, m_palette, palette_device::MONOCHROME); + GFXDECODE(config, "gfxdecode", m_palette, gfx_uts); dp835x_device &crtc(DP835X_A(config, "crtc", 19'980'000)); crtc.set_screen("screen"); diff --git a/src/mame/includes/interpro.h b/src/mame/includes/interpro.h index ad28c68a546..32db12daba8 100644 --- a/src/mame/includes/interpro.h +++ b/src/mame/includes/interpro.h @@ -24,8 +24,8 @@ #include "machine/ncr5390.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "bus/rs232/rs232.h" diff --git a/src/mame/includes/jazz.h b/src/mame/includes/jazz.h index 8bcf2e7cbbb..e4f1d75f847 100644 --- a/src/mame/includes/jazz.h +++ b/src/mame/includes/jazz.h @@ -34,8 +34,8 @@ // busses and connectors #include "machine/nscsi_bus.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "bus/rs232/rs232.h" #include "bus/pc_kbd/pc_kbdc.h" #include "bus/pc_kbd/keyboards.h" diff --git a/src/mame/includes/mips.h b/src/mame/includes/mips.h index aff93ac1e94..a4c0c9e0462 100644 --- a/src/mame/includes/mips.h +++ b/src/mame/includes/mips.h @@ -29,8 +29,8 @@ // busses and connectors #include "machine/nscsi_bus.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "bus/pc_kbd/pc_kbdc.h" #include "bus/pc_kbd/keyboards.h" diff --git a/src/mame/includes/poly88.h b/src/mame/includes/poly88.h index 6619b3b9ca7..1cc3dbbacc0 100644 --- a/src/mame/includes/poly88.h +++ b/src/mame/includes/poly88.h @@ -14,6 +14,7 @@ #include "machine/mm5307.h" #include "imagedev/cassette.h" #include "imagedev/snapquik.h" +#include "machine/timer.h" class poly88_state : public driver_device { @@ -24,21 +25,21 @@ public: TIMER_KEYBOARD }; - poly88_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_video_ram(*this, "video_ram"), - m_maincpu(*this, "maincpu"), - m_usart(*this, "usart"), - m_brg(*this, "brg"), - m_cassette(*this, "cassette"), - m_linec(*this, "LINEC"), - m_line0(*this, "LINE0"), - m_line1(*this, "LINE1"), - m_line2(*this, "LINE2"), - m_line3(*this, "LINE3"), - m_line4(*this, "LINE4"), - m_line5(*this, "LINE5"), - m_line6(*this, "LINE6") + poly88_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_video_ram(*this, "video_ram") + , m_maincpu(*this, "maincpu") + , m_usart(*this, "usart") + , m_brg(*this, "brg") + , m_cassette(*this, "cassette") + , m_linec(*this, "LINEC") + , m_line0(*this, "LINE0") + , m_line1(*this, "LINE1") + , m_line2(*this, "LINE2") + , m_line3(*this, "LINE3") + , m_line4(*this, "LINE4") + , m_line5(*this, "LINE5") + , m_line6(*this, "LINE6") { } void poly88(machine_config &config); @@ -49,25 +50,23 @@ public: private: required_shared_ptr<uint8_t> m_video_ram; uint8_t *m_FNT; - uint8_t m_intr; uint8_t m_last_code; uint8_t m_int_vector; emu_timer * m_usart_timer; emu_timer * m_keyboard_timer; - int m_previous_level; - int m_clk_level_tape; void baud_rate_w(uint8_t data); uint8_t keyboard_r(); void intr_w(uint8_t data); + bool m_dtr, m_rts, m_txd, m_rxd, m_cassold; + u8 m_cass_data[4]; virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_poly88(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(poly88_interrupt); - TIMER_CALLBACK_MEMBER(poly88_usart_timer_callback); TIMER_CALLBACK_MEMBER(keyboard_callback); - DECLARE_WRITE_LINE_MEMBER(cassette_txc_rxc_w); - DECLARE_WRITE_LINE_MEMBER(write_cas_tx); - DECLARE_WRITE_LINE_MEMBER(poly88_usart_rxready); + TIMER_DEVICE_CALLBACK_MEMBER(kansas_r); + DECLARE_WRITE_LINE_MEMBER(cassette_clock_w); + DECLARE_WRITE_LINE_MEMBER(usart_ready_w); IRQ_CALLBACK_MEMBER(poly88_irq_callback); DECLARE_SNAPSHOT_LOAD_MEMBER(snapshot_cb); @@ -90,8 +89,6 @@ private: required_ioport m_line6; uint8_t row_number(uint8_t code); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - - int m_cas_tx; }; #endif // MAME_INCLUDES_POLY88_H diff --git a/src/mame/layout/coco3.lay b/src/mame/layout/coco3.lay index 24634e4ab52..0a4205d8cdd 100644 --- a/src/mame/layout/coco3.lay +++ b/src/mame/layout/coco3.lay @@ -6,7 +6,7 @@ </screen> <!-- workaround for MAME selecting a 2-screen view by default --> - <screen index="1"><bounds left="0" top="0" right="1" bottom="1" /><color alpha="0" /></screen> + <screen index="1"><bounds left="0" top="0" right="4" bottom="3" /><color alpha="0" /></screen> </view> <view name="RGB"> diff --git a/src/mame/layout/glasgow.lay b/src/mame/layout/mephisto_alm16.lay index dd44f7f2bf9..e8fc020edf5 100644 --- a/src/mame/layout/glasgow.lay +++ b/src/mame/layout/mephisto_alm16.lay @@ -1,13 +1,6 @@ <?xml version="1.0"?> <mamelayout version="2"> - - <!-- our digit element is bright-on-dark, this means the lcd panel is the wrong colour here --> - <element name="digit" defstate="0"> - <led7seg> - <color red="1" green="1" blue="1" /> - </led7seg> - </element> - +<!-- define elements --> <element name="led" defstate="0"> <disk state="0"> <color red="0.20" green="0.0" blue="0.0" /> @@ -16,33 +9,24 @@ <color red="0.95" green="0.0" blue="0.0" /> </disk> </element> - <element name="hlb" defstate="0"> - <rect state="0"> - <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> - <color red="0.4" green="0.4" blue="0.4" /> - </rect> - <rect state="1"> - <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> - <color red="0.4" green="0.4" blue="0.4" /> - </rect> - </element> - <element name="text_1"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_2"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_3"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_4"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_5"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_6"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_7"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_8"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_a"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_b"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_c"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_d"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_e"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_f"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_g"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_h"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_1"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="1"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_2"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="2"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_3"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="3"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_4"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="4"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_5"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="5"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_6"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="6"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_7"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="7"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_8"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="8"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_a"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="A"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_b"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="B"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_c"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="C"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_d"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="D"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_e"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="E"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_f"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="F"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_g"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="G"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_h"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="H"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="piece" defstate="0"> <image file="chess/wp.png" state="1"/> @@ -346,31 +330,96 @@ </group> +<!-- LCD panel --> + + <element name="text_lcd"><text string="GRAPHIC DISPLAY MODUL"><color red="0.64" green="0.59" blue="0.30" /></text></element> + <element name="static_lcd"><rect><color red="0.5412" green="0.57255" blue="0.5804" /></rect></element> + <group name="panel"> - <bounds left="0" right="26" top="0" bottom="9" /> - <bezel name="digit0" element="digit"><bounds x="2" y="2" width="4" height="5" /></bezel> - <bezel name="digit1" element="digit"><bounds x="8" y="2" width="4" height="5" /></bezel> - <bezel name="digit2" element="digit"><bounds x="14" y="2" width="4" height="5" /></bezel> - <bezel name="digit3" element="digit"><bounds x="20" y="2" width="4" height="5" /></bezel> + <element ref="static_lcd"><bounds x="0" y="0" width="24.5" height="6.5" /></element> + <screen index="0" blend="alpha"><bounds x="0.25" y="1" width="24" height="4.5" /></screen> + </group> + + +<!-- Buttons --> + + <element name="gray"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect></element> + <element name="green"><rect><color red="0" green="0.5" blue="0.25" /></rect></element> + <element name="red"> <rect><color red="0.75" green="0.15" blue="0.15" /></rect></element> + + <element name="text_ent"><rect><color red="0" green="0.5" blue="0.25" /></rect> <text string="ENT"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_cl"> <rect><color red="0.75" green="0.15" blue="0.15" /></rect><text string="CL"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_left"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="←"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_up"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="↑"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_right"><rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="→"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_down"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="↓"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="keys" defstate="0"> + <rect state="1"><color red="0.0" green="0.0" blue="0.0" /></rect> + </element> + + <group name="buttons"> + <bounds x="76" y="89.5" width="17" height="17" /> + + <bezel element="green"><bounds x="76" y="89.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="82" y="89.5" width="5" height="5" /></bezel> + <bezel element="red"> <bounds x="88" y="89.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="76" y="95.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="88" y="95.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="82" y="101.5" width="5" height="5" /></bezel> + + <bezel element="text_ent"> <bounds x="76" y="90.7" width="5" height="2.6" /></bezel> + <bezel element="text_up"> <bounds x="82.5" y="90" width="4" height="4" /></bezel> + <bezel element="text_cl"> <bounds x="88" y="90.7" width="5" height="2.6" /></bezel> + <bezel element="text_left"> <bounds x="76.5" y="96" width="4" height="4" /></bezel> + <bezel element="text_right"><bounds x="88.5" y="96" width="4" height="4" /></bezel> + <bezel element="text_down"> <bounds x="82.5" y="102" width="4" height="4" /></bezel> + + <bezel element="keys" inputtag="KEY1" inputmask="0x0200"> <!-- ENT --> + <bounds x="76" y="89.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2" inputmask="0x0200"> <!-- Up --> + <bounds x="82" y="89.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY3" inputmask="0x0200"> <!-- CL --> + <bounds x="88" y="89.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY1" inputmask="0x0100"> <!-- Left --> + <bounds x="76" y="95.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2" inputmask="0x0100"> <!-- Right --> + <bounds x="88" y="95.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY3" inputmask="0x0100"> <!-- Down --> + <bounds x="82" y="101.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> </group> <!-- build screen --> + <view name="Internal Layout"> - <bounds left="0" right="101" top="0" bottom="98" /> + <bounds left="0" right="101" top="0" bottom="103" /> <bezel element="cblack"><bounds x="14" y="0" width="87" height="87" /></bezel> <bezel element="cwhite"><bounds x="17" y="2" width="81" height="81" /></bezel> + <bezel element="text_lcd"><bounds x="47.5" y="89" width="24.5" height="2" /></bezel> + <group ref="panel"><bounds x="47.5" y="91.8" width="24.5" height="6.5" /></group> + <group ref="buttons"><bounds x="77.5" y="88.5" width="13" height="13" /></group> + + <group ref="sb_board"><bounds x="17.5" y="2.5" width="80" height="80" /></group> + <group ref="sb_ui"><bounds x="1.5" y="3" width="10" height="80" /></group> + <!-- chessboard coords --> - <bezel element="text_8"><bounds x="14.2" y="7" width="2" height="2" /></bezel> - <bezel element="text_7"><bounds x="14.2" y="17" width="2" height="2" /></bezel> - <bezel element="text_6"><bounds x="14.2" y="27" width="2" height="2" /></bezel> - <bezel element="text_5"><bounds x="14.2" y="37" width="2" height="2" /></bezel> - <bezel element="text_4"><bounds x="14.2" y="47" width="2" height="2" /></bezel> - <bezel element="text_3"><bounds x="14.2" y="57" width="2" height="2" /></bezel> - <bezel element="text_2"><bounds x="14.2" y="67" width="2" height="2" /></bezel> - <bezel element="text_1"><bounds x="14.2" y="77" width="2" height="2" /></bezel> + <bezel element="text_8"><bounds x="14.7" y="7" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="14.7" y="17" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="14.7" y="27" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="14.7" y="37" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="14.7" y="47" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="14.7" y="57" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="14.7" y="67" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="14.7" y="77" width="2" height="2" /></bezel> <bezel element="text_a"><bounds x="21.5" y="84" width="2" height="2" /></bezel> <bezel element="text_b"><bounds x="31.5" y="84" width="2" height="2" /></bezel> @@ -380,16 +429,6 @@ <bezel element="text_f"><bounds x="71.5" y="84" width="2" height="2" /></bezel> <bezel element="text_g"><bounds x="81.5" y="84" width="2" height="2" /></bezel> <bezel element="text_h"><bounds x="91.5" y="84" width="2" height="2" /></bezel> - - <!-- Display panel --> - <group ref="panel"><bounds x="40" y="88" width="26" height="9" /></group> - - <group ref="sb_board"><bounds x="17.5" y="2.5" width="80" height="80" /></group> - <group ref="sb_ui"><bounds x="1.5" y="3" width="10" height="80" /></group> </view> - <view name="Display"> - <bounds left="0" right="26" top="0" bottom="9" /> - <group ref="panel"><bounds x="0" y="0" width="26" height="9" /></group> - </view> </mamelayout> diff --git a/src/mame/layout/mmodular.lay b/src/mame/layout/mephisto_alm32.lay index 809bb56933a..4d83a64bcb1 100644 --- a/src/mame/layout/mmodular.lay +++ b/src/mame/layout/mephisto_alm32.lay @@ -10,22 +10,22 @@ </disk> </element> - <element name="text_1"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_2"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_3"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_4"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_5"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_6"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_7"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_8"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_a"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_b"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_c"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_d"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_e"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_f"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_g"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_h"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_1"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="1"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_2"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="2"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_3"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="3"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_4"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="4"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_5"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="5"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_6"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="6"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_7"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="7"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_8"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="8"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_a"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="A"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_b"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="B"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_c"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="C"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_d"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="D"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_e"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="E"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_f"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="F"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_g"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="G"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_h"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="H"><color red="0.87" green="0.87" blue="0.84" /></text> </element> <element name="piece" defstate="0"> @@ -329,26 +329,97 @@ <bezel element="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></bezel> </group> + +<!-- LCD panel --> + + <element name="text_lcd"><text string="GRAPHIC DISPLAY MODUL"><color red="0.64" green="0.59" blue="0.30" /></text></element> + <element name="static_lcd"><rect><color red="0.5412" green="0.57255" blue="0.5804" /></rect></element> + <group name="panel"> - <bounds left="0" right="28" top="0" bottom="8.5" /> - <screen index="0"><bounds x="2" y="2" width="24" height="4.5" /></screen> + <element ref="static_lcd"><bounds x="0" y="0" width="24.5" height="6.5" /></element> + <screen index="0" blend="alpha"><bounds x="0.25" y="1" width="24" height="4.5" /></screen> + </group> + + +<!-- Buttons --> + + <element name="gray"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect></element> + <element name="green"><rect><color red="0" green="0.5" blue="0.25" /></rect></element> + <element name="red"> <rect><color red="0.75" green="0.15" blue="0.15" /></rect></element> + + <element name="text_ent"><rect><color red="0" green="0.5" blue="0.25" /></rect> <text string="ENT"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_cl"> <rect><color red="0.75" green="0.15" blue="0.15" /></rect><text string="CL"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_left"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="←"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_up"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="↑"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_right"><rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="→"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_down"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="↓"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="keys" defstate="0"> + <rect state="1"><color red="0.0" green="0.0" blue="0.0" /></rect> + </element> + + <group name="buttons"> + <bounds x="76" y="89.5" width="17" height="17" /> + + <bezel element="green"><bounds x="76" y="89.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="82" y="89.5" width="5" height="5" /></bezel> + <bezel element="red"> <bounds x="88" y="89.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="76" y="95.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="88" y="95.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="82" y="101.5" width="5" height="5" /></bezel> + + <bezel element="text_ent"> <bounds x="76" y="90.7" width="5" height="2.6" /></bezel> + <bezel element="text_up"> <bounds x="82.5" y="90" width="4" height="4" /></bezel> + <bezel element="text_cl"> <bounds x="88" y="90.7" width="5" height="2.6" /></bezel> + <bezel element="text_left"> <bounds x="76.5" y="96" width="4" height="4" /></bezel> + <bezel element="text_right"><bounds x="88.5" y="96" width="4" height="4" /></bezel> + <bezel element="text_down"> <bounds x="82.5" y="102" width="4" height="4" /></bezel> + + <bezel element="keys" inputtag="KEY3" inputmask="0x8000"> <!-- ENT --> + <bounds x="76" y="89.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2" inputmask="0x8000"> <!-- Up --> + <bounds x="82" y="89.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY1" inputmask="0x8000"> <!-- CL --> + <bounds x="88" y="89.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY3" inputmask="0x4000"> <!-- Left --> + <bounds x="76" y="95.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY1" inputmask="0x4000"> <!-- Right --> + <bounds x="88" y="95.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2" inputmask="0x4000"> <!-- Down --> + <bounds x="82" y="101.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> </group> + +<!-- build screen --> + <view name="Internal Layout"> - <bounds left="0" right="101" top="0" bottom="98" /> + <bounds left="0" right="101" top="0" bottom="103" /> <bezel element="cblack"><bounds x="14" y="0" width="87" height="87" /></bezel> <bezel element="cwhite"><bounds x="17" y="2" width="81" height="81" /></bezel> + <bezel element="text_lcd"><bounds x="47.5" y="89" width="24.5" height="2" /></bezel> + <group ref="panel"><bounds x="47.5" y="91.8" width="24.5" height="6.5" /></group> + <group ref="buttons"><bounds x="77.5" y="88.5" width="13" height="13" /></group> + + <group ref="sb_board"><bounds x="17.5" y="2.5" width="80" height="80" /></group> + <group ref="sb_ui"><bounds x="1.5" y="3" width="10" height="80" /></group> + <!-- chessboard coords --> - <bezel element="text_8"><bounds x="14.2" y="7" width="2" height="2" /></bezel> - <bezel element="text_7"><bounds x="14.2" y="17" width="2" height="2" /></bezel> - <bezel element="text_6"><bounds x="14.2" y="27" width="2" height="2" /></bezel> - <bezel element="text_5"><bounds x="14.2" y="37" width="2" height="2" /></bezel> - <bezel element="text_4"><bounds x="14.2" y="47" width="2" height="2" /></bezel> - <bezel element="text_3"><bounds x="14.2" y="57" width="2" height="2" /></bezel> - <bezel element="text_2"><bounds x="14.2" y="67" width="2" height="2" /></bezel> - <bezel element="text_1"><bounds x="14.2" y="77" width="2" height="2" /></bezel> + <bezel element="text_8"><bounds x="14.7" y="7" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="14.7" y="17" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="14.7" y="27" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="14.7" y="37" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="14.7" y="47" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="14.7" y="57" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="14.7" y="67" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="14.7" y="77" width="2" height="2" /></bezel> <bezel element="text_a"><bounds x="21.5" y="84" width="2" height="2" /></bezel> <bezel element="text_b"><bounds x="31.5" y="84" width="2" height="2" /></bezel> @@ -358,12 +429,6 @@ <bezel element="text_f"><bounds x="71.5" y="84" width="2" height="2" /></bezel> <bezel element="text_g"><bounds x="81.5" y="84" width="2" height="2" /></bezel> <bezel element="text_h"><bounds x="91.5" y="84" width="2" height="2" /></bezel> - - <!-- LCD panel --> - <group ref="panel"><bounds x="43" y="88" width="28" height="8.5" /></group> - - <group ref="sb_board"><bounds x="17.5" y="2.5" width="80" height="80" /></group> - <group ref="sb_ui"><bounds x="1.5" y="3" width="10" height="80" /></group> - </view> + </mamelayout> diff --git a/src/mame/layout/mephisto_amsterdam.lay b/src/mame/layout/mephisto_amsterdam.lay new file mode 100644 index 00000000000..67e68a93fa1 --- /dev/null +++ b/src/mame/layout/mephisto_amsterdam.lay @@ -0,0 +1,559 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + + <!-- our digit element is bright-on-dark, this means the lcd panel is the wrong colour here --> + <element name="digit" defstate="0"> + <led7seg> + <color red="1" green="1" blue="1" /> + </led7seg> + </element> + + <element name="led" defstate="0"> + <disk state="0"> + <color red="0.20" green="0.0" blue="0.0" /> + </disk> + <disk state="1"> + <color red="0.95" green="0.0" blue="0.0" /> + </disk> + </element> + <element name="hlb" defstate="0"> + <rect state="0"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.4" green="0.4" blue="0.4" /> + </rect> + <rect state="1"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.4" green="0.4" blue="0.4" /> + </rect> + </element> + + <element name="text_1"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="1"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_2"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="2"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_3"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="3"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_4"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="4"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_5"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="5"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_6"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="6"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_7"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="7"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_8"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="8"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_a"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="A"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_b"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="B"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_c"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="C"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_d"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="D"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_e"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="E"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_f"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="F"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_g"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="G"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_h"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="H"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + + <element name="piece" defstate="0"> + <image file="chess/wp.png" state="1"/> + <image file="chess/wn.png" state="2"/> + <image file="chess/wb.png" state="3"/> + <image file="chess/wr.png" state="4"/> + <image file="chess/wq.png" state="5"/> + <image file="chess/wk.png" state="6"/> + + <image file="chess/bp.png" state="7"/> + <image file="chess/bn.png" state="8"/> + <image file="chess/bb.png" state="9"/> + <image file="chess/br.png" state="10"/> + <image file="chess/bq.png" state="11"/> + <image file="chess/bk.png" state="12"/> + + <!-- selected pieces --> + <image file="chess/wp.png" state="13"><color alpha="0.5" /></image> + <image file="chess/wn.png" state="14"><color alpha="0.5" /></image> + <image file="chess/wb.png" state="15"><color alpha="0.5" /></image> + <image file="chess/wr.png" state="16"><color alpha="0.5" /></image> + <image file="chess/wq.png" state="17"><color alpha="0.5" /></image> + <image file="chess/wk.png" state="18"><color alpha="0.5" /></image> + + <image file="chess/bp.png" state="19"><color alpha="0.5" /></image> + <image file="chess/bn.png" state="20"><color alpha="0.5" /></image> + <image file="chess/bb.png" state="21"><color alpha="0.5" /></image> + <image file="chess/br.png" state="22"><color alpha="0.5" /></image> + <image file="chess/bq.png" state="23"><color alpha="0.5" /></image> + <image file="chess/bk.png" state="24"><color alpha="0.5" /></image> + </element> + + +<!-- sb board --> + + <element name="cblack"><rect><color red="0.56" green="0.33" blue="0.12" /></rect></element> + <element name="cwhite"><rect><color red="0.84" green="0.75" blue="0.50" /></rect></element> + + <element name="hlbb" defstate="0"> + <text string=" "><bounds x="0" y="0" width="1" height="1" /></text> + <disk state="1"> + <bounds x="0.12" y="0.12" width="0.76" height="0.76" /> + <color red="0" green="0" blue="0" /> + </disk> + </element> + + <group name="sb_board"> + <bounds x="0" y="0" width="80" height="80" /> + + <!-- squares (avoid seams) --> + <bezel element="cwhite"><bounds x="0" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="0" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="0" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="0" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="0" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="10" y="10" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="20" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="30" y="10" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="40" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="50" y="10" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="60" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="70" y="10" width="10" height="11" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="20" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="20" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="20" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="20" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="10" y="30" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="20" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="30" y="30" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="40" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="50" y="30" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="60" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="70" y="30" width="10" height="11" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="40" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="40" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="40" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="40" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="10" y="50" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="20" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="30" y="50" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="40" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="50" y="50" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="60" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="70" y="50" width="10" height="11" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="60" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="60" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="60" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="60" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="70" width="11" height="10" /></bezel> + <bezel element="cwhite"><bounds x="10" y="70" width="11" height="10" /></bezel> + <bezel element="cblack"><bounds x="20" y="70" width="11" height="10" /></bezel> + <bezel element="cwhite"><bounds x="30" y="70" width="11" height="10" /></bezel> + <bezel element="cblack"><bounds x="40" y="70" width="11" height="10" /></bezel> + <bezel element="cwhite"><bounds x="50" y="70" width="11" height="10" /></bezel> + <bezel element="cblack"><bounds x="60" y="70" width="11" height="10" /></bezel> + <bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel> + + <!-- chessboard leds --> + <repeat count="8"> + <param name="x" start="8.2" increment="10" /> + <param name="la" start="0" increment="1" /> + <param name="lb" start="8" increment="1" /> + <param name="lc" start="16" increment="1" /> + <param name="ld" start="24" increment="1" /> + <param name="le" start="32" increment="1" /> + <param name="lf" start="40" increment="1" /> + <param name="lg" start="48" increment="1" /> + <param name="lh" start="56" increment="1" /> + + <bezel name="led~la~" element="led"><bounds x="~x~" y="78.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lb~" element="led"><bounds x="~x~" y="68.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lc~" element="led"><bounds x="~x~" y="58.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~ld~" element="led"><bounds x="~x~" y="48.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~le~" element="led"><bounds x="~x~" y="38.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lf~" element="led"><bounds x="~x~" y="28.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lg~" element="led"><bounds x="~x~" y="18.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lh~" element="led"><bounds x="~x~" y="8.3" width="1.5" height="1.5" /></bezel> + </repeat> + + <!-- sensors, pieces --> + <repeat count="8"> + <param name="y" start="0" increment="10" /> + <param name="i" start="8" increment="-1" /> + + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + + <bezel name="piece_a~i~" element="piece"><bounds x="0" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_b~i~" element="piece"><bounds x="10" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_c~i~" element="piece"><bounds x="20" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_d~i~" element="piece"><bounds x="30" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_e~i~" element="piece"><bounds x="40" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_f~i~" element="piece"><bounds x="50" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_g~i~" element="piece"><bounds x="60" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_h~i~" element="piece"><bounds x="70" y="~y~" width="10" height="10" /></bezel> + </repeat> + </group> + + +<!-- sb ui --> + + <element name="hlub" defstate="0"> + <rect state="1"><color red="0" green="0" blue="0" /></rect> + </element> + + <element name="text_uit1"><text string="S.BOARD"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uib2"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uib3"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uih2"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uiu2a"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" <<"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu2b"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" < "><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu2c"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" >"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu2d"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" >>"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu3a" defstate="0"> + <simplecounter maxstate="999" digits="1" align="2"> + <color red="0.81" green="0.8" blue="0.79" /> + </simplecounter> + </element> + <element name="text_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uiu3c" defstate="0"> + <simplecounter maxstate="999" digits="1" align="1"> + <color red="0.81" green="0.8" blue="0.79" /> + </simplecounter> + </element> + + <group name="sb_ui"> + <bounds x="0" y="0" width="10" height="80" /> + <bezel element="cblack"><bounds x="0" y="0" width="10" height="1" /></bezel> + <bezel element="cblack"><bounds x="0" y="7" width="10" height="1" /></bezel> + <bezel element="cblack"><bounds x="0" y="79" width="10" height="1" /></bezel> + <bezel element="text_uit1"><bounds x="0" y="2" width="10" height="2" /></bezel> + <bezel element="text_uit2"><bounds x="0" y="4" width="10" height="2" /></bezel> + + <!-- board --> + <bezel element="text_uib1"><bounds x="0" y="9" width="10" height="2" /></bezel> + <bezel element="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel> + <bezel element="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></bezel> + + <bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel> + <bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel> + + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel> + + <!-- spawn --> + <bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel> + <bezel element="cwhite"><bounds x="1" y="23" width="8" height="12" /></bezel> + <bezel element="cwhite"><bounds x="1" y="36" width="8" height="12" /></bezel> + + <bezel name="piece_ui1" element="piece"><bounds x="1" y="23" width="4" height="4" /></bezel> + <bezel name="piece_ui2" element="piece"><bounds x="1" y="27" width="4" height="4" /></bezel> + <bezel name="piece_ui3" element="piece"><bounds x="1" y="31" width="4" height="4" /></bezel> + <bezel name="piece_ui4" element="piece"><bounds x="5" y="23" width="4" height="4" /></bezel> + <bezel name="piece_ui5" element="piece"><bounds x="5" y="27" width="4" height="4" /></bezel> + <bezel name="piece_ui6" element="piece"><bounds x="5" y="31" width="4" height="4" /></bezel> + <bezel name="piece_ui7" element="piece"><bounds x="1" y="36" width="4" height="4" /></bezel> + <bezel name="piece_ui8" element="piece"><bounds x="1" y="40" width="4" height="4" /></bezel> + <bezel name="piece_ui9" element="piece"><bounds x="1" y="44" width="4" height="4" /></bezel> + <bezel name="piece_ui10" element="piece"><bounds x="5" y="36" width="4" height="4" /></bezel> + <bezel name="piece_ui11" element="piece"><bounds x="5" y="40" width="4" height="4" /></bezel> + <bezel name="piece_ui12" element="piece"><bounds x="5" y="44" width="4" height="4" /></bezel> + + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0001"><bounds x="1" y="23" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0002"><bounds x="1" y="27" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0004"><bounds x="1" y="31" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0008"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0010"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0020"><bounds x="5" y="31" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0040"><bounds x="1" y="36" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0080"><bounds x="1" y="40" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0100"><bounds x="1" y="44" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0200"><bounds x="5" y="36" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0400"><bounds x="5" y="40" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0800"><bounds x="5" y="44" width="4" height="4" /><color alpha="0.25" /></bezel> + + <!-- hand --> + <bezel element="text_uih1"><bounds x="0" y="51" width="10" height="2" /></bezel> + <bezel element="cblack"><bounds x="1" y="53.5" width="8" height="6" /></bezel> + <bezel name="piece_ui0" element="piece"><bounds x="2" y="53.5" width="6" height="6" /></bezel> + + <bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel> + <bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel> + + <!-- undo --> + <bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel> + <bezel element="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></bezel> + <bezel element="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></bezel> + <bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel> + <bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel> + + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + + <bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel> + <bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel> + <bezel element="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></bezel> + </group> + + +<!-- 7seg panel --> + + <group name="panel"> + <bezel name="digit0" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel> + <bezel name="digit1" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel> + <bezel name="digit2" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel> + <bezel name="digit3" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel> + </group> + + +<!-- buttons --> + + <element name="gray"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect></element> + <element name="black"><rect><color red="0" green="0" blue="0" /></rect></element> + <element name="white"><rect><color red="1" green="1" blue="1" /></rect></element> + + <element name="keys" defstate="0"> + <rect state="1"><color red="0.0" green="0.0" blue="0.0" /></rect> + </element> + + <element name="text_info"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="INFO"><color red="1" green="1" blue="1" /></text> </element> + <element name="text_pos"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="POS"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_lev"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="LEV"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_mem"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="MEM"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_cl"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="CL"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_ent"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="ENT"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_res"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="RES"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="text_a1"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="A"><color red="1" green="1" blue="1" /></text> </element> + <element name="text_b2"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="B"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_c3"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="C"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_d4"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="D"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_e5"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="E"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_f6"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="F"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_g7"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="G"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_h8"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="H"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_l9"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="←"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_r0"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="→"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="text_1a"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="1"><color red="1" green="1" blue="1" /></text> </element> + <element name="text_2b"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="2"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_3c"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="3"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_4d"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="4"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_5e"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="5"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_6f"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="6"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_7g"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="7"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_8h"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="8"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_9l"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="9"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_0r"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="0"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="text_p1"><image file="chess/wk.png"/></element> + <element name="text_p2"><image file="chess/wq.png"/></element> + <element name="text_p3"><image file="chess/wr.png"/></element> + <element name="text_p4"><image file="chess/wb.png"/></element> + <element name="text_p5"><image file="chess/wn.png"/></element> + <element name="text_p6"><image file="chess/wp.png"/></element> + + <group name="buttons"> + <bounds x="69" y="93" width="29" height="14" /> + + <bezel element="gray"><bounds x="69" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="74" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="79" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="84" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="89" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="94" y="93" width="4" height="4" /></bezel> + + <bezel element="gray"><bounds x="69" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="74" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="79" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="84" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="89" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="94" y="98" width="4" height="4" /></bezel> + + <bezel element="gray"><bounds x="69" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="74" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="79" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="84" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="89" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="94" y="103" width="4" height="4" /></bezel> + + <bezel element="text_info"><bounds x="69.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_pos"> <bounds x="74.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_lev"> <bounds x="79.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_mem"> <bounds x="84.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_cl"> <bounds x="89.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_ent"> <bounds x="94.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_res"> <bounds x="69.3" y="104" width="3.67" height="2.2" /></bezel> + <bezel element="text_res"> <bounds x="74.3" y="104" width="3.67" height="2.2" /></bezel> + + <bezel element="text_a1"><bounds x="69" y="98" width="2" height="2.2" /></bezel> + <bezel element="text_b2"><bounds x="74" y="98" width="2" height="2.2" /></bezel> + <bezel element="text_c3"><bounds x="79" y="98" width="2" height="2.2" /></bezel> + <bezel element="text_d4"><bounds x="84" y="98" width="2" height="2.2" /></bezel> + <bezel element="text_e5"><bounds x="89" y="98" width="2" height="2.2" /></bezel> + <bezel element="text_f6"><bounds x="94" y="98" width="2" height="2.2" /></bezel> + <bezel element="text_g7"><bounds x="79" y="103" width="2" height="2.2" /></bezel> + <bezel element="text_h8"><bounds x="84" y="103" width="2" height="2.2" /></bezel> + <bezel element="text_l9"><bounds x="90" y="103" width="2" height="1.8" /></bezel> + <bezel element="text_r0"><bounds x="95.2" y="103" width="2" height="1.8" /></bezel> + + <bezel element="text_1a"><bounds x="71" y="99.5" width="1.97" height="2.2" /></bezel> + <bezel element="text_2b"><bounds x="76" y="99.5" width="1.97" height="2.2" /></bezel> + <bezel element="text_3c"><bounds x="81" y="99.5" width="1.97" height="2.2" /></bezel> + <bezel element="text_4d"><bounds x="86" y="99.5" width="1.97" height="2.2" /></bezel> + <bezel element="text_5e"><bounds x="91" y="99.5" width="1.97" height="2.2" /></bezel> + <bezel element="text_6f"><bounds x="96" y="99.5" width="1.97" height="2.2" /></bezel> + <bezel element="text_7g"><bounds x="81" y="104.5" width="1.97" height="2.2" /></bezel> + <bezel element="text_8h"><bounds x="86" y="104.5" width="1.97" height="2.2" /></bezel> + <bezel element="text_9l"><bounds x="91" y="104.5" width="1.97" height="2.2" /></bezel> + <bezel element="text_0r"><bounds x="96" y="104.5" width="1.97" height="2.2" /></bezel> + + <bezel element="text_p6" ><bounds x="76" y="98" width="1.8" height="1.7" /></bezel> + <bezel element="text_p5" ><bounds x="81" y="98" width="1.8" height="1.7" /></bezel> + <bezel element="text_p4" ><bounds x="86" y="98" width="1.8" height="1.7" /></bezel> + <bezel element="text_p3" ><bounds x="91" y="98" width="1.8" height="1.7" /></bezel> + <bezel element="text_p2" ><bounds x="96" y="98" width="1.8" height="1.7" /></bezel> + <bezel element="text_p1" ><bounds x="81" y="103" width="1.8" height="1.7" /></bezel> + <bezel element="black"><bounds x="89.5" y="105.1" width="1.3" height="1.3" /></bezel> + <bezel element="white"><bounds x="94.5" y="105.1" width="1.3" height="1.3" /></bezel> + + <!-- Buttons (new_keyboard)--> + <bezel element="keys" inputtag="LINE1" inputmask="0x01"> <!-- INFO --> + <bounds x="69" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x02"> <!-- POS --> + <bounds x="74" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x04"> <!-- LEV --> + <bounds x="79" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x08"> <!-- MEM --> + <bounds x="84" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x10"> <!-- CL --> + <bounds x="89" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x20"> <!-- ENT --> + <bounds x="94" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + + <bezel element="keys" inputtag="LINE0" inputmask="0x01"> <!-- A1 --> + <bounds x="69" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x02"> <!-- B2 --> + <bounds x="74" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x04"> <!-- C3 --> + <bounds x="79" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x08"> <!-- D4 --> + <bounds x="84" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x10"> <!-- E5 --> + <bounds x="89" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x20"> <!-- F6 --> + <bounds x="94" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + + <bezel element="keys" inputtag="LINE1" inputmask="0x40"> <!-- G7 --> + <bounds x="79" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x80"> <!-- H8 --> + <bounds x="84" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x40"> <!-- 9 --> + <bounds x="89" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x80"> <!-- 0 --> + <bounds x="94" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + </group> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="0" right="101" top="0" bottom="104" /> + <bezel element="cblack"><bounds x="14" y="0" width="87" height="87" /></bezel> + <bezel element="cwhite"><bounds x="17" y="2" width="81" height="81" /></bezel> + + <group ref="panel"><bounds x="37.5" y="91" width="23" height="8" /></group> + + <group ref="buttons"><bounds x="67.5" y="88.5" width="29" height="14" /></group> + + <group ref="sb_board"><bounds x="17.5" y="2.5" width="80" height="80" /></group> + <group ref="sb_ui"><bounds x="1.5" y="3" width="10" height="80" /></group> + + <!-- chessboard coords --> + + <bezel element="text_8"><bounds x="14.7" y="7" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="14.7" y="17" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="14.7" y="27" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="14.7" y="37" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="14.7" y="47" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="14.7" y="57" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="14.7" y="67" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="14.7" y="77" width="2" height="2" /></bezel> + + <bezel element="text_a"><bounds x="21.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_b"><bounds x="31.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_c"><bounds x="41.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_d"><bounds x="51.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_e"><bounds x="61.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_f"><bounds x="71.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_g"><bounds x="81.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_h"><bounds x="91.5" y="84" width="2" height="2" /></bezel> + </view> + +</mamelayout> diff --git a/src/mame/layout/mephisto.lay b/src/mame/layout/mephisto_gen32.lay index ac57dafdf84..babacbb12b8 100644 --- a/src/mame/layout/mephisto.lay +++ b/src/mame/layout/mephisto_gen32.lay @@ -1,14 +1,6 @@ <?xml version="1.0"?> <mamelayout version="2"> <!-- define elements --> - - <!-- our digit element is bright-on-dark, this means the lcd panel is the wrong colour here --> - <element name="digit" defstate="0"> - <led7seg> - <color red="1" green="1" blue="1" /> - </led7seg> - </element> - <element name="led" defstate="0"> <disk state="0"> <color red="0.20" green="0.0" blue="0.0" /> @@ -17,33 +9,24 @@ <color red="0.95" green="0.0" blue="0.0" /> </disk> </element> - <element name="hlb" defstate="0"> - <rect state="0"> - <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> - <color red="0.4" green="0.4" blue="0.4" /> - </rect> - <rect state="1"> - <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> - <color red="0.4" green="0.4" blue="0.4" /> - </rect> - </element> - <element name="text_1"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="1"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_2"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="2"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_3"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="3"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_4"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="4"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_5"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="5"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_6"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="6"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_7"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="7"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_8"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="8"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_a"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="A"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_b"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="B"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_c"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="C"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_d"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="D"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_e"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="E"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_f"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="F"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_g"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="G"><color red="0.01" green="0.01" blue="0.01" /></text> </element> - <element name="text_h"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="H"><color red="0.01" green="0.01" blue="0.01" /></text> </element> + <element name="text_1"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="1"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_2"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="2"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_3"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="3"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_4"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="4"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_5"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="5"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_6"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="6"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_7"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="7"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_8"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="8"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_a"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="A"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_b"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="B"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_c"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="C"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_d"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="D"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_e"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="E"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_f"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="F"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_g"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="G"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_h"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="H"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="piece" defstate="0"> <image file="chess/wp.png" state="1"/> @@ -94,76 +77,76 @@ <bounds x="0" y="0" width="80" height="80" /> <!-- squares (avoid seams) --> - <bezel element="cwhite"><bounds x="0" y="0" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="10" y="0" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="20" y="0" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="30" y="0" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="40" y="0" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="50" y="0" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="60" y="0" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="70" y="0" width="10" height="10" /></bezel> - - <bezel element="cblack"><bounds x="0" y="10" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="10" y="10" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="20" y="10" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="30" y="10" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="40" y="10" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="50" y="10" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="60" y="10" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="70" y="10" width="10" height="10" /></bezel> - - <bezel element="cwhite"><bounds x="0" y="20" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="10" y="20" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="20" y="20" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="30" y="20" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="40" y="20" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="50" y="20" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="60" y="20" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="70" y="20" width="10" height="10" /></bezel> - - <bezel element="cblack"><bounds x="0" y="30" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="10" y="30" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="20" y="30" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="30" y="30" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="40" y="30" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="50" y="30" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="60" y="30" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="70" y="30" width="10" height="10" /></bezel> - - <bezel element="cwhite"><bounds x="0" y="40" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="10" y="40" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="20" y="40" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="30" y="40" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="40" y="40" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="50" y="40" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="60" y="40" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="70" y="40" width="10" height="10" /></bezel> - - <bezel element="cblack"><bounds x="0" y="50" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="10" y="50" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="20" y="50" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="30" y="50" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="40" y="50" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="50" y="50" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="60" y="50" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="70" y="50" width="10" height="10" /></bezel> - - <bezel element="cwhite"><bounds x="0" y="60" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="10" y="60" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="20" y="60" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="30" y="60" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="40" y="60" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="50" y="60" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="60" y="60" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="70" y="60" width="10" height="10" /></bezel> - - <bezel element="cblack"><bounds x="0" y="70" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="10" y="70" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="20" y="70" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="30" y="70" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="40" y="70" width="10" height="10" /></bezel> - <bezel element="cwhite"><bounds x="50" y="70" width="10" height="10" /></bezel> - <bezel element="cblack"><bounds x="60" y="70" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="0" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="0" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="0" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="0" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="0" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="10" y="10" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="20" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="30" y="10" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="40" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="50" y="10" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="60" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="70" y="10" width="10" height="11" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="20" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="20" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="20" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="20" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="10" y="30" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="20" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="30" y="30" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="40" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="50" y="30" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="60" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="70" y="30" width="10" height="11" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="40" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="40" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="40" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="40" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="10" y="50" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="20" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="30" y="50" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="40" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="50" y="50" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="60" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="70" y="50" width="10" height="11" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="60" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="60" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="60" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="60" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="70" width="11" height="10" /></bezel> + <bezel element="cwhite"><bounds x="10" y="70" width="11" height="10" /></bezel> + <bezel element="cblack"><bounds x="20" y="70" width="11" height="10" /></bezel> + <bezel element="cwhite"><bounds x="30" y="70" width="11" height="10" /></bezel> + <bezel element="cblack"><bounds x="40" y="70" width="11" height="10" /></bezel> + <bezel element="cwhite"><bounds x="50" y="70" width="11" height="10" /></bezel> + <bezel element="cblack"><bounds x="60" y="70" width="11" height="10" /></bezel> <bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel> <!-- chessboard leds --> @@ -347,38 +330,96 @@ </group> +<!-- LCD panel --> + + <element name="text_lcd"><text string="GRAPHIC DISPLAY MODUL"><color red="0.64" green="0.59" blue="0.30" /></text></element> + <element name="static_lcd"><rect><color red="0.5412" green="0.57255" blue="0.5804" /></rect></element> + <group name="panel"> - <bounds left="0" right="60" top="0" bottom="9" /> - <bezel name="digit0" element="digit"><bounds x="2" y="2" width="4" height="5" /></bezel> - <bezel name="digit1" element="digit"><bounds x="8" y="2" width="4" height="5" /></bezel> - <bezel name="digit2" element="digit"><bounds x="14" y="2" width="4" height="5" /></bezel> - <bezel name="digit3" element="digit"><bounds x="20" y="2" width="4" height="5" /></bezel> - - <bezel name="led100" element="led"> <bounds x="29.1" y="1.1" width="1.3" height="1.3" /> </bezel> - <bezel name="led101" element="led"> <bounds x="34.1" y="1.1" width="1.3" height="1.3" /> </bezel> - <bezel name="led102" element="led"> <bounds x="39.1" y="1.1" width="1.3" height="1.3" /> </bezel> - <bezel name="led103" element="led"> <bounds x="44.1" y="1.1" width="1.3" height="1.3" /> </bezel> - <bezel name="led104" element="led"> <bounds x="49.1" y="1.1" width="1.3" height="1.3" /> </bezel> - <bezel name="led105" element="led"> <bounds x="54.1" y="1.1" width="1.3" height="1.3" /> </bezel> + <element ref="static_lcd"><bounds x="0" y="0" width="24.5" height="6.5" /></element> + <screen index="0" blend="alpha"><bounds x="0.25" y="1" width="24" height="4.5" /></screen> + </group> + + +<!-- Buttons --> + + <element name="gray"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect></element> + <element name="green"><rect><color red="0" green="0.5" blue="0.25" /></rect></element> + <element name="red"> <rect><color red="0.75" green="0.15" blue="0.15" /></rect></element> + + <element name="text_ent"><rect><color red="0" green="0.5" blue="0.25" /></rect> <text string="ENT"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_cl"> <rect><color red="0.75" green="0.15" blue="0.15" /></rect><text string="CL"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_left"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="←"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_up"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="↑"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_right"><rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="→"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_down"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect><text string="↓"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="keys" defstate="0"> + <rect state="1"><color red="0.0" green="0.0" blue="0.0" /></rect> + </element> + + <group name="buttons"> + <bounds x="76" y="89.5" width="17" height="17" /> + + <bezel element="green"><bounds x="76" y="89.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="82" y="89.5" width="5" height="5" /></bezel> + <bezel element="red"> <bounds x="88" y="89.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="76" y="95.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="88" y="95.5" width="5" height="5" /></bezel> + <bezel element="gray"> <bounds x="82" y="101.5" width="5" height="5" /></bezel> + + <bezel element="text_ent"> <bounds x="76" y="90.7" width="5" height="2.6" /></bezel> + <bezel element="text_up"> <bounds x="82.5" y="90" width="4" height="4" /></bezel> + <bezel element="text_cl"> <bounds x="88" y="90.7" width="5" height="2.6" /></bezel> + <bezel element="text_left"> <bounds x="76.5" y="96" width="4" height="4" /></bezel> + <bezel element="text_right"><bounds x="88.5" y="96" width="4" height="4" /></bezel> + <bezel element="text_down"> <bounds x="82.5" y="102" width="4" height="4" /></bezel> + + <bezel element="keys" inputtag="KEY1" inputmask="0x01000000"> <!-- ENT --> + <bounds x="76" y="89.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2" inputmask="0x01000000"> <!-- Up --> + <bounds x="82" y="89.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY3" inputmask="0x01000000"> <!-- CL --> + <bounds x="88" y="89.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY1" inputmask="0x02000000"> <!-- Left --> + <bounds x="76" y="95.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY3" inputmask="0x02000000"> <!-- Right --> + <bounds x="88" y="95.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2" inputmask="0x02000000"> <!-- Down --> + <bounds x="82" y="101.5" width="5" height="5" /><color alpha="0.25" /> + </bezel> </group> <!-- build screen --> + <view name="Internal Layout"> - <bounds left="0" right="101" top="0" bottom="98" /> + <bounds left="0" right="101" top="0" bottom="103" /> <bezel element="cblack"><bounds x="14" y="0" width="87" height="87" /></bezel> <bezel element="cwhite"><bounds x="17" y="2" width="81" height="81" /></bezel> + <bezel element="text_lcd"><bounds x="47.5" y="89" width="24.5" height="2" /></bezel> + <group ref="panel"><bounds x="47.5" y="91.8" width="24.5" height="6.5" /></group> + <group ref="buttons"><bounds x="77.5" y="88.5" width="13" height="13" /></group> + + <group ref="sb_board"><bounds x="17.5" y="2.5" width="80" height="80" /></group> + <group ref="sb_ui"><bounds x="1.5" y="3" width="10" height="80" /></group> + <!-- chessboard coords --> - <bezel element="text_8"><bounds x="14.2" y="7" width="2" height="2" /></bezel> - <bezel element="text_7"><bounds x="14.2" y="17" width="2" height="2" /></bezel> - <bezel element="text_6"><bounds x="14.2" y="27" width="2" height="2" /></bezel> - <bezel element="text_5"><bounds x="14.2" y="37" width="2" height="2" /></bezel> - <bezel element="text_4"><bounds x="14.2" y="47" width="2" height="2" /></bezel> - <bezel element="text_3"><bounds x="14.2" y="57" width="2" height="2" /></bezel> - <bezel element="text_2"><bounds x="14.2" y="67" width="2" height="2" /></bezel> - <bezel element="text_1"><bounds x="14.2" y="77" width="2" height="2" /></bezel> + <bezel element="text_8"><bounds x="14.7" y="7" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="14.7" y="17" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="14.7" y="27" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="14.7" y="37" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="14.7" y="47" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="14.7" y="57" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="14.7" y="67" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="14.7" y="77" width="2" height="2" /></bezel> <bezel element="text_a"><bounds x="21.5" y="84" width="2" height="2" /></bezel> <bezel element="text_b"><bounds x="31.5" y="84" width="2" height="2" /></bezel> @@ -388,16 +429,6 @@ <bezel element="text_f"><bounds x="71.5" y="84" width="2" height="2" /></bezel> <bezel element="text_g"><bounds x="81.5" y="84" width="2" height="2" /></bezel> <bezel element="text_h"><bounds x="91.5" y="84" width="2" height="2" /></bezel> - - <!-- LCD panel --> - <group ref="panel"><bounds x="40" y="88" width="60" height="9" /></group> - - <group ref="sb_board"><bounds x="17.5" y="2.5" width="80" height="80" /></group> - <group ref="sb_ui"><bounds x="1.5" y="3" width="10" height="80" /></group> </view> - <view name="Display"> - <bounds left="0" right="60" top="1" bottom="10" /> - <group ref="panel"><bounds x="0" y="1" width="60" height="9" /></group> - </view> </mamelayout> diff --git a/src/mame/layout/mephisto_glasgow.lay b/src/mame/layout/mephisto_glasgow.lay new file mode 100644 index 00000000000..945226549ee --- /dev/null +++ b/src/mame/layout/mephisto_glasgow.lay @@ -0,0 +1,556 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + + <!-- our digit element is bright-on-dark, this means the lcd panel is the wrong colour here --> + <element name="digit" defstate="0"> + <led7seg> + <color red="1" green="1" blue="1" /> + </led7seg> + </element> + + <element name="led" defstate="0"> + <disk state="0"> + <color red="0.20" green="0.0" blue="0.0" /> + </disk> + <disk state="1"> + <color red="0.95" green="0.0" blue="0.0" /> + </disk> + </element> + <element name="hlb" defstate="0"> + <rect state="0"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.4" green="0.4" blue="0.4" /> + </rect> + <rect state="1"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.4" green="0.4" blue="0.4" /> + </rect> + </element> + + <element name="text_1"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="1"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_2"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="2"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_3"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="3"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_4"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="4"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_5"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="5"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_6"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="6"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_7"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="7"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_8"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="8"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_a"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="A"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_b"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="B"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_c"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="C"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_d"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="D"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_e"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="E"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_f"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="F"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_g"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="G"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_h"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="H"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + + <element name="piece" defstate="0"> + <image file="chess/wp.png" state="1"/> + <image file="chess/wn.png" state="2"/> + <image file="chess/wb.png" state="3"/> + <image file="chess/wr.png" state="4"/> + <image file="chess/wq.png" state="5"/> + <image file="chess/wk.png" state="6"/> + + <image file="chess/bp.png" state="7"/> + <image file="chess/bn.png" state="8"/> + <image file="chess/bb.png" state="9"/> + <image file="chess/br.png" state="10"/> + <image file="chess/bq.png" state="11"/> + <image file="chess/bk.png" state="12"/> + + <!-- selected pieces --> + <image file="chess/wp.png" state="13"><color alpha="0.5" /></image> + <image file="chess/wn.png" state="14"><color alpha="0.5" /></image> + <image file="chess/wb.png" state="15"><color alpha="0.5" /></image> + <image file="chess/wr.png" state="16"><color alpha="0.5" /></image> + <image file="chess/wq.png" state="17"><color alpha="0.5" /></image> + <image file="chess/wk.png" state="18"><color alpha="0.5" /></image> + + <image file="chess/bp.png" state="19"><color alpha="0.5" /></image> + <image file="chess/bn.png" state="20"><color alpha="0.5" /></image> + <image file="chess/bb.png" state="21"><color alpha="0.5" /></image> + <image file="chess/br.png" state="22"><color alpha="0.5" /></image> + <image file="chess/bq.png" state="23"><color alpha="0.5" /></image> + <image file="chess/bk.png" state="24"><color alpha="0.5" /></image> + </element> + + +<!-- sb board --> + + <element name="cblack"><rect><color red="0.56" green="0.33" blue="0.12" /></rect></element> + <element name="cwhite"><rect><color red="0.84" green="0.75" blue="0.50" /></rect></element> + + <element name="hlbb" defstate="0"> + <text string=" "><bounds x="0" y="0" width="1" height="1" /></text> + <disk state="1"> + <bounds x="0.12" y="0.12" width="0.76" height="0.76" /> + <color red="0" green="0" blue="0" /> + </disk> + </element> + + <group name="sb_board"> + <bounds x="0" y="0" width="80" height="80" /> + + <!-- squares (avoid seams) --> + <bezel element="cwhite"><bounds x="0" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="0" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="0" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="0" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="0" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="0" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="10" y="10" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="20" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="30" y="10" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="40" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="50" y="10" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="60" y="10" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="70" y="10" width="10" height="11" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="20" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="20" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="20" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="20" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="20" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="10" y="30" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="20" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="30" y="30" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="40" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="50" y="30" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="60" y="30" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="70" y="30" width="10" height="11" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="40" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="40" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="40" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="40" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="40" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="10" y="50" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="20" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="30" y="50" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="40" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="50" y="50" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="60" y="50" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="70" y="50" width="10" height="11" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="10" y="60" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="20" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="30" y="60" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="40" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="50" y="60" width="11" height="11" /></bezel> + <bezel element="cwhite"><bounds x="60" y="60" width="11" height="11" /></bezel> + <bezel element="cblack"><bounds x="70" y="60" width="10" height="11" /></bezel> + + <bezel element="cblack"><bounds x="0" y="70" width="11" height="10" /></bezel> + <bezel element="cwhite"><bounds x="10" y="70" width="11" height="10" /></bezel> + <bezel element="cblack"><bounds x="20" y="70" width="11" height="10" /></bezel> + <bezel element="cwhite"><bounds x="30" y="70" width="11" height="10" /></bezel> + <bezel element="cblack"><bounds x="40" y="70" width="11" height="10" /></bezel> + <bezel element="cwhite"><bounds x="50" y="70" width="11" height="10" /></bezel> + <bezel element="cblack"><bounds x="60" y="70" width="11" height="10" /></bezel> + <bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel> + + <!-- chessboard leds --> + <repeat count="8"> + <param name="x" start="8.2" increment="10" /> + <param name="la" start="0" increment="1" /> + <param name="lb" start="8" increment="1" /> + <param name="lc" start="16" increment="1" /> + <param name="ld" start="24" increment="1" /> + <param name="le" start="32" increment="1" /> + <param name="lf" start="40" increment="1" /> + <param name="lg" start="48" increment="1" /> + <param name="lh" start="56" increment="1" /> + + <bezel name="led~la~" element="led"><bounds x="~x~" y="78.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lb~" element="led"><bounds x="~x~" y="68.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lc~" element="led"><bounds x="~x~" y="58.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~ld~" element="led"><bounds x="~x~" y="48.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~le~" element="led"><bounds x="~x~" y="38.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lf~" element="led"><bounds x="~x~" y="28.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lg~" element="led"><bounds x="~x~" y="18.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lh~" element="led"><bounds x="~x~" y="8.3" width="1.5" height="1.5" /></bezel> + </repeat> + + <!-- sensors, pieces --> + <repeat count="8"> + <param name="y" start="0" increment="10" /> + <param name="i" start="8" increment="-1" /> + + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + + <bezel name="piece_a~i~" element="piece"><bounds x="0" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_b~i~" element="piece"><bounds x="10" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_c~i~" element="piece"><bounds x="20" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_d~i~" element="piece"><bounds x="30" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_e~i~" element="piece"><bounds x="40" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_f~i~" element="piece"><bounds x="50" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_g~i~" element="piece"><bounds x="60" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_h~i~" element="piece"><bounds x="70" y="~y~" width="10" height="10" /></bezel> + </repeat> + </group> + + +<!-- sb ui --> + + <element name="hlub" defstate="0"> + <rect state="1"><color red="0" green="0" blue="0" /></rect> + </element> + + <element name="text_uit1"><text string="S.BOARD"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uib2"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uib3"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uih2"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uiu2a"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" <<"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu2b"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" < "><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu2c"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" >"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu2d"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" >>"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu3a" defstate="0"> + <simplecounter maxstate="999" digits="1" align="2"> + <color red="0.81" green="0.8" blue="0.79" /> + </simplecounter> + </element> + <element name="text_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uiu3c" defstate="0"> + <simplecounter maxstate="999" digits="1" align="1"> + <color red="0.81" green="0.8" blue="0.79" /> + </simplecounter> + </element> + + <group name="sb_ui"> + <bounds x="0" y="0" width="10" height="80" /> + <bezel element="cblack"><bounds x="0" y="0" width="10" height="1" /></bezel> + <bezel element="cblack"><bounds x="0" y="7" width="10" height="1" /></bezel> + <bezel element="cblack"><bounds x="0" y="79" width="10" height="1" /></bezel> + <bezel element="text_uit1"><bounds x="0" y="2" width="10" height="2" /></bezel> + <bezel element="text_uit2"><bounds x="0" y="4" width="10" height="2" /></bezel> + + <!-- board --> + <bezel element="text_uib1"><bounds x="0" y="9" width="10" height="2" /></bezel> + <bezel element="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel> + <bezel element="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></bezel> + + <bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel> + <bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel> + + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel> + + <!-- spawn --> + <bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel> + <bezel element="cwhite"><bounds x="1" y="23" width="8" height="12" /></bezel> + <bezel element="cwhite"><bounds x="1" y="36" width="8" height="12" /></bezel> + + <bezel name="piece_ui1" element="piece"><bounds x="1" y="23" width="4" height="4" /></bezel> + <bezel name="piece_ui2" element="piece"><bounds x="1" y="27" width="4" height="4" /></bezel> + <bezel name="piece_ui3" element="piece"><bounds x="1" y="31" width="4" height="4" /></bezel> + <bezel name="piece_ui4" element="piece"><bounds x="5" y="23" width="4" height="4" /></bezel> + <bezel name="piece_ui5" element="piece"><bounds x="5" y="27" width="4" height="4" /></bezel> + <bezel name="piece_ui6" element="piece"><bounds x="5" y="31" width="4" height="4" /></bezel> + <bezel name="piece_ui7" element="piece"><bounds x="1" y="36" width="4" height="4" /></bezel> + <bezel name="piece_ui8" element="piece"><bounds x="1" y="40" width="4" height="4" /></bezel> + <bezel name="piece_ui9" element="piece"><bounds x="1" y="44" width="4" height="4" /></bezel> + <bezel name="piece_ui10" element="piece"><bounds x="5" y="36" width="4" height="4" /></bezel> + <bezel name="piece_ui11" element="piece"><bounds x="5" y="40" width="4" height="4" /></bezel> + <bezel name="piece_ui12" element="piece"><bounds x="5" y="44" width="4" height="4" /></bezel> + + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0001"><bounds x="1" y="23" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0002"><bounds x="1" y="27" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0004"><bounds x="1" y="31" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0008"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0010"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0020"><bounds x="5" y="31" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0040"><bounds x="1" y="36" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0080"><bounds x="1" y="40" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0100"><bounds x="1" y="44" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0200"><bounds x="5" y="36" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0400"><bounds x="5" y="40" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0800"><bounds x="5" y="44" width="4" height="4" /><color alpha="0.25" /></bezel> + + <!-- hand --> + <bezel element="text_uih1"><bounds x="0" y="51" width="10" height="2" /></bezel> + <bezel element="cblack"><bounds x="1" y="53.5" width="8" height="6" /></bezel> + <bezel name="piece_ui0" element="piece"><bounds x="2" y="53.5" width="6" height="6" /></bezel> + + <bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel> + <bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel> + + <!-- undo --> + <bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel> + <bezel element="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></bezel> + <bezel element="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></bezel> + <bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel> + <bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel> + + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + + <bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel> + <bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel> + <bezel element="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></bezel> + </group> + + +<!-- Display panel --> + + <group name="panel"> + <bezel name="digit0" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel> + <bezel name="digit1" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel> + <bezel name="digit2" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel> + <bezel name="digit3" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel> + </group> + + +<!-- buttons --> + + <element name="gray"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect></element> + <element name="black"><rect><color red="0" green="0" blue="0" /></rect></element> + <element name="white"><rect><color red="1" green="1" blue="1" /></rect></element> + + <element name="keys" defstate="0"> + <rect state="1"><color red="0.0" green="0.0" blue="0.0" /></rect> + </element> + + <element name="text_info"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="INFO"><color red="1" green="1" blue="1" /></text> </element> + <element name="text_pos"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="POS"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_lev"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="LEV"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_mem"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="MEM"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_cl"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="CL"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_ent"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="ENT"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_res"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="RES"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="text_a1"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="A"><color red="1" green="1" blue="1" /></text> </element> + <element name="text_b2"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="B"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_c3"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="C"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_d4"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="D"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_e5"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="E"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_f6"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="F"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_g7"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="G"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_h8"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="H"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_l9"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="←"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_r0"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="→"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="text_1a"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="1"><color red="1" green="1" blue="1" /></text> </element> + <element name="text_2b"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="2"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_3c"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="3"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_4d"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="4"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_5e"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="5"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_6f"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="6"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_7g"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="7"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_8h"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="8"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_9l"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="9"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_0r"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="0"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="text_p1"><image file="chess/wk.png"/></element> + <element name="text_p2"><image file="chess/wq.png"/></element> + <element name="text_p3"><image file="chess/wr.png"/></element> + <element name="text_p4"><image file="chess/wb.png"/></element> + <element name="text_p5"><image file="chess/wn.png"/></element> + <element name="text_p6"><image file="chess/wp.png"/></element> + + <group name="buttons"> + <bounds x="69" y="93" width="29" height="14" /> + + <bezel element="gray"><bounds x="69" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="74" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="79" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="84" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="89" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="94" y="93" width="4" height="4" /></bezel> + + <bezel element="gray"><bounds x="69" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="74" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="79" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="84" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="89" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="94" y="98" width="4" height="4" /></bezel> + + <bezel element="gray"><bounds x="69" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="74" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="79" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="84" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="89" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="94" y="103" width="4" height="4" /></bezel> + + <bezel element="text_info"><bounds x="69.3" y="94" width="3.68" height="2.2" /></bezel> + <bezel element="text_pos"> <bounds x="74.3" y="94" width="3.68" height="2.2" /></bezel> + <bezel element="text_lev"> <bounds x="79.3" y="94" width="3.68" height="2.2" /></bezel> + <bezel element="text_mem"> <bounds x="84.3" y="94" width="3.68" height="2.2" /></bezel> + <bezel element="text_cl"> <bounds x="89.3" y="94" width="3.68" height="2.2" /></bezel> + <bezel element="text_ent"> <bounds x="94.3" y="94" width="3.68" height="2.2" /></bezel> + + <bezel element="text_a1"><bounds x="69" y="98" width="2" height="2.2" /></bezel> + <bezel element="text_b2"><bounds x="74" y="98" width="2" height="2.2" /></bezel> + <bezel element="text_c3"><bounds x="79" y="98" width="2" height="2.2" /></bezel> + <bezel element="text_d4"><bounds x="84" y="98" width="2" height="2.2" /></bezel> + <bezel element="text_e5"><bounds x="69" y="103" width="2" height="2.2" /></bezel> + <bezel element="text_f6"><bounds x="74" y="103" width="2" height="2.2" /></bezel> + <bezel element="text_g7"><bounds x="79" y="103" width="2" height="2.2" /></bezel> + <bezel element="text_h8"><bounds x="84" y="103" width="2" height="2.2" /></bezel> + <bezel element="text_l9"><bounds x="90" y="103" width="2" height="1.8" /></bezel> + <bezel element="text_r0"><bounds x="95.2" y="103" width="2" height="1.8" /></bezel> + + <bezel element="text_1a"><bounds x="71" y="99.5" width="1.98" height="2.2" /></bezel> + <bezel element="text_2b"><bounds x="76" y="99.5" width="1.98" height="2.2" /></bezel> + <bezel element="text_3c"><bounds x="81" y="99.5" width="1.98" height="2.2" /></bezel> + <bezel element="text_4d"><bounds x="86" y="99.5" width="1.98" height="2.2" /></bezel> + <bezel element="text_5e"><bounds x="71" y="104.5" width="1.98" height="2.2" /></bezel> + <bezel element="text_6f"><bounds x="76" y="104.5" width="1.98" height="2.2" /></bezel> + <bezel element="text_7g"><bounds x="81" y="104.5" width="1.98" height="2.2" /></bezel> + <bezel element="text_8h"><bounds x="86" y="104.5" width="1.98" height="2.2" /></bezel> + <bezel element="text_9l"><bounds x="91" y="104.5" width="1.98" height="2.2" /></bezel> + <bezel element="text_0r"><bounds x="96" y="104.5" width="1.98" height="2.2" /></bezel> + + <bezel element="text_p6" ><bounds x="76" y="98" width="1.8" height="1.7" /></bezel> + <bezel element="text_p5" ><bounds x="81" y="98" width="1.8" height="1.7" /></bezel> + <bezel element="text_p4" ><bounds x="86" y="98" width="1.8" height="1.7" /></bezel> + <bezel element="text_p3" ><bounds x="71" y="103" width="1.8" height="1.7" /></bezel> + <bezel element="text_p2" ><bounds x="76" y="103" width="1.8" height="1.7" /></bezel> + <bezel element="text_p1" ><bounds x="81" y="103" width="1.8" height="1.7" /></bezel> + <bezel element="black"><bounds x="89.5" y="105.1" width="1.3" height="1.3" /></bezel> + <bezel element="white"><bounds x="94.5" y="105.1" width="1.3" height="1.3" /></bezel> + + <!-- Buttons (old_keyboard)--> + <bezel element="keys" inputtag="LINE1" inputmask="0x02"> <!-- INFO --> + <bounds x="69" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x08"> <!-- POS --> + <bounds x="74" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x20"> <!-- LEV --> + <bounds x="79" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x80"> <!-- MEM --> + <bounds x="84" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x02"> <!-- CL --> + <bounds x="89" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x08"> <!-- ENT --> + <bounds x="94" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + + <bezel element="keys" inputtag="LINE0" inputmask="0x20"> <!-- A1 --> + <bounds x="69" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x80"> <!-- B2 --> + <bounds x="74" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x04"> <!-- C3 --> + <bounds x="79" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x10"> <!-- D4 --> + <bounds x="84" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + + <bezel element="keys" inputtag="LINE1" inputmask="0x01"> <!-- E5 --> + <bounds x="69" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x40"> <!-- F6 --> + <bounds x="74" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x40"> <!-- G7 --> + <bounds x="79" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x10"> <!-- H8 --> + <bounds x="84" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE0" inputmask="0x01"> <!-- 9 --> + <bounds x="89" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="LINE1" inputmask="0x04"> <!-- 0 --> + <bounds x="94" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + </group> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="0" right="101" top="0" bottom="104" /> + <bezel element="cblack"><bounds x="14" y="0" width="87" height="87" /></bezel> + <bezel element="cwhite"><bounds x="17" y="2" width="81" height="81" /></bezel> + + <!-- chessboard coords --> + + <bezel element="text_8"><bounds x="14.7" y="7" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="14.7" y="17" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="14.7" y="27" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="14.7" y="37" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="14.7" y="47" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="14.7" y="57" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="14.7" y="67" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="14.7" y="77" width="2" height="2" /></bezel> + + <bezel element="text_a"><bounds x="21.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_b"><bounds x="31.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_c"><bounds x="41.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_d"><bounds x="51.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_e"><bounds x="61.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_f"><bounds x="71.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_g"><bounds x="81.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_h"><bounds x="91.5" y="84" width="2" height="2" /></bezel> + + <group ref="panel"><bounds x="37.5" y="91.5" width="23" height="8" /></group> + + <group ref="buttons"><bounds x="67.5" y="88.5" width="29" height="14" /></group> + + <group ref="sb_board"><bounds x="17.5" y="2.5" width="80" height="80" /></group> + <group ref="sb_ui"><bounds x="1.5" y="3" width="10" height="80" /></group> + </view> +</mamelayout> diff --git a/src/mame/layout/mephisto_mm2.lay b/src/mame/layout/mephisto_mm2.lay new file mode 100644 index 00000000000..5da8cc19b44 --- /dev/null +++ b/src/mame/layout/mephisto_mm2.lay @@ -0,0 +1,575 @@ +<?xml version="1.0"?> +<mamelayout version="2"> +<!-- define elements --> + + <!-- our digit element is bright-on-dark, this means the lcd panel is the wrong colour here --> + <element name="digit" defstate="0"> + <led7seg> + <color red="1" green="1" blue="1" /> + </led7seg> + </element> + + <element name="led" defstate="0"> + <disk state="0"> + <color red="0.20" green="0.0" blue="0.0" /> + </disk> + <disk state="1"> + <color red="0.95" green="0.0" blue="0.0" /> + </disk> + </element> + <element name="hlb" defstate="0"> + <rect state="0"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.4" green="0.4" blue="0.4" /> + </rect> + <rect state="1"> + <bounds x="0.0" y="0.0" width="1.0" height="1.0" /> + <color red="0.4" green="0.4" blue="0.4" /> + </rect> + </element> + + <element name="text_1"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="1"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_2"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="2"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_3"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="3"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_4"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="4"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_5"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="5"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_6"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="6"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_7"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="7"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_8"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="8"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_a"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="A"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_b"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="B"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_c"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="C"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_d"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="D"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_e"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="E"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_f"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="F"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_g"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="G"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + <element name="text_h"> <rect><color red="0.56" green="0.33" blue="0.12" /></rect> <text string="H"><color red="0.87" green="0.87" blue="0.84" /></text> </element> + + <element name="piece" defstate="0"> + <image file="chess/wp.png" state="1"/> + <image file="chess/wn.png" state="2"/> + <image file="chess/wb.png" state="3"/> + <image file="chess/wr.png" state="4"/> + <image file="chess/wq.png" state="5"/> + <image file="chess/wk.png" state="6"/> + + <image file="chess/bp.png" state="7"/> + <image file="chess/bn.png" state="8"/> + <image file="chess/bb.png" state="9"/> + <image file="chess/br.png" state="10"/> + <image file="chess/bq.png" state="11"/> + <image file="chess/bk.png" state="12"/> + + <!-- selected pieces --> + <image file="chess/wp.png" state="13"><color alpha="0.5" /></image> + <image file="chess/wn.png" state="14"><color alpha="0.5" /></image> + <image file="chess/wb.png" state="15"><color alpha="0.5" /></image> + <image file="chess/wr.png" state="16"><color alpha="0.5" /></image> + <image file="chess/wq.png" state="17"><color alpha="0.5" /></image> + <image file="chess/wk.png" state="18"><color alpha="0.5" /></image> + + <image file="chess/bp.png" state="19"><color alpha="0.5" /></image> + <image file="chess/bn.png" state="20"><color alpha="0.5" /></image> + <image file="chess/bb.png" state="21"><color alpha="0.5" /></image> + <image file="chess/br.png" state="22"><color alpha="0.5" /></image> + <image file="chess/bq.png" state="23"><color alpha="0.5" /></image> + <image file="chess/bk.png" state="24"><color alpha="0.5" /></image> + </element> + + +<!-- sb board --> + + <element name="cblack"><rect><color red="0.56" green="0.33" blue="0.12" /></rect></element> + <element name="cwhite"><rect><color red="0.84" green="0.75" blue="0.50" /></rect></element> + + <element name="hlbb" defstate="0"> + <text string=" "><bounds x="0" y="0" width="1" height="1" /></text> + <disk state="1"> + <bounds x="0.12" y="0.12" width="0.76" height="0.76" /> + <color red="0" green="0" blue="0" /> + </disk> + </element> + + <group name="sb_board"> + <bounds x="0" y="0" width="80" height="80" /> + + <!-- squares (avoid seams) --> + <bezel element="cwhite"><bounds x="0" y="0" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="10" y="0" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="20" y="0" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="30" y="0" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="40" y="0" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="50" y="0" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="60" y="0" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="70" y="0" width="10" height="10" /></bezel> + + <bezel element="cblack"><bounds x="0" y="10" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="10" y="10" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="20" y="10" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="30" y="10" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="40" y="10" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="50" y="10" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="60" y="10" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="70" y="10" width="10" height="10" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="20" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="10" y="20" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="20" y="20" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="30" y="20" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="40" y="20" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="50" y="20" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="60" y="20" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="70" y="20" width="10" height="10" /></bezel> + + <bezel element="cblack"><bounds x="0" y="30" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="10" y="30" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="20" y="30" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="30" y="30" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="40" y="30" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="50" y="30" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="60" y="30" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="70" y="30" width="10" height="10" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="40" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="10" y="40" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="20" y="40" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="30" y="40" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="40" y="40" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="50" y="40" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="60" y="40" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="70" y="40" width="10" height="10" /></bezel> + + <bezel element="cblack"><bounds x="0" y="50" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="10" y="50" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="20" y="50" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="30" y="50" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="40" y="50" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="50" y="50" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="60" y="50" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="70" y="50" width="10" height="10" /></bezel> + + <bezel element="cwhite"><bounds x="0" y="60" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="10" y="60" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="20" y="60" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="30" y="60" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="40" y="60" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="50" y="60" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="60" y="60" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="70" y="60" width="10" height="10" /></bezel> + + <bezel element="cblack"><bounds x="0" y="70" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="10" y="70" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="20" y="70" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="30" y="70" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="40" y="70" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="50" y="70" width="10" height="10" /></bezel> + <bezel element="cblack"><bounds x="60" y="70" width="10" height="10" /></bezel> + <bezel element="cwhite"><bounds x="70" y="70" width="10" height="10" /></bezel> + + <!-- chessboard leds --> + <repeat count="8"> + <param name="x" start="8.2" increment="10" /> + <param name="la" start="0" increment="1" /> + <param name="lb" start="8" increment="1" /> + <param name="lc" start="16" increment="1" /> + <param name="ld" start="24" increment="1" /> + <param name="le" start="32" increment="1" /> + <param name="lf" start="40" increment="1" /> + <param name="lg" start="48" increment="1" /> + <param name="lh" start="56" increment="1" /> + + <bezel name="led~la~" element="led"><bounds x="~x~" y="78.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lb~" element="led"><bounds x="~x~" y="68.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lc~" element="led"><bounds x="~x~" y="58.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~ld~" element="led"><bounds x="~x~" y="48.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~le~" element="led"><bounds x="~x~" y="38.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lf~" element="led"><bounds x="~x~" y="28.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lg~" element="led"><bounds x="~x~" y="18.3" width="1.5" height="1.5" /></bezel> + <bezel name="led~lh~" element="led"><bounds x="~x~" y="8.3" width="1.5" height="1.5" /></bezel> + </repeat> + + <!-- sensors, pieces --> + <repeat count="8"> + <param name="y" start="0" increment="10" /> + <param name="i" start="8" increment="-1" /> + + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x01"><bounds x="0" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x02"><bounds x="10" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x04"><bounds x="20" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x08"><bounds x="30" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x10"><bounds x="40" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x20"><bounds x="50" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x40"><bounds x="60" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + <bezel element="hlbb" inputtag="board:board:RANK.~i~" inputmask="0x80"><bounds x="70" y="~y~" width="10" height="10" /><color alpha="0.04" /></bezel> + + <bezel name="piece_a~i~" element="piece"><bounds x="0" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_b~i~" element="piece"><bounds x="10" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_c~i~" element="piece"><bounds x="20" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_d~i~" element="piece"><bounds x="30" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_e~i~" element="piece"><bounds x="40" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_f~i~" element="piece"><bounds x="50" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_g~i~" element="piece"><bounds x="60" y="~y~" width="10" height="10" /></bezel> + <bezel name="piece_h~i~" element="piece"><bounds x="70" y="~y~" width="10" height="10" /></bezel> + </repeat> + </group> + + +<!-- sb ui --> + + <element name="hlub" defstate="0"> + <rect state="1"><color red="0" green="0" blue="0" /></rect> + </element> + + <element name="text_uit1"><text string="S.BOARD"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uit2"><text string="INTERFACE"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uib1"><text string="BOARD:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uib2"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string="RESET"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uib3"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string="CLEAR"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uis1"><text string="SPAWN:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uih1"><text string="HAND:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uih2"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string="REMOVE"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu1"><text string="UNDO:"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uiu2a"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" <<"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu2b"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" < "><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu2c"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" >"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu2d"> + <rect><color red="0.84" green="0.75" blue="0.50" /></rect> + <text string=" >>"><color red="0.01" green="0.01" blue="0.01" /></text> + </element> + <element name="text_uiu3a" defstate="0"> + <simplecounter maxstate="999" digits="1" align="2"> + <color red="0.81" green="0.8" blue="0.79" /> + </simplecounter> + </element> + <element name="text_uiu3b"><text string="/"><color red="0.81" green="0.8" blue="0.79" /></text></element> + <element name="text_uiu3c" defstate="0"> + <simplecounter maxstate="999" digits="1" align="1"> + <color red="0.81" green="0.8" blue="0.79" /> + </simplecounter> + </element> + + <group name="sb_ui"> + <bounds x="0" y="0" width="10" height="80" /> + <bezel element="cblack"><bounds x="0" y="0" width="10" height="1" /></bezel> + <bezel element="cblack"><bounds x="0" y="7" width="10" height="1" /></bezel> + <bezel element="cblack"><bounds x="0" y="79" width="10" height="1" /></bezel> + <bezel element="text_uit1"><bounds x="0" y="2" width="10" height="2" /></bezel> + <bezel element="text_uit2"><bounds x="0" y="4" width="10" height="2" /></bezel> + + <!-- board --> + <bezel element="text_uib1"><bounds x="0" y="9" width="10" height="2" /></bezel> + <bezel element="cwhite"><bounds x="1" y="11.5" width="8" height="2.5" /></bezel> + <bezel element="cwhite"><bounds x="1" y="15" width="8" height="2.5" /></bezel> + + <bezel element="text_uib2"><bounds x="1.5" y="11.75" width="7" height="2" /></bezel> + <bezel element="text_uib3"><bounds x="1.5" y="15.25" width="7" height="2" /></bezel> + + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x200"><bounds x="1" y="11.5" width="8" height="2.5" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x100"><bounds x="1" y="15" width="8" height="2.5" /><color alpha="0.25" /></bezel> + + <!-- spawn --> + <bezel element="text_uis1"><bounds x="0" y="20.5" width="10" height="2" /></bezel> + <bezel element="cwhite"><bounds x="1" y="23" width="8" height="12" /></bezel> + <bezel element="cwhite"><bounds x="1" y="36" width="8" height="12" /></bezel> + + <bezel name="piece_ui1" element="piece"><bounds x="1" y="23" width="4" height="4" /></bezel> + <bezel name="piece_ui2" element="piece"><bounds x="1" y="27" width="4" height="4" /></bezel> + <bezel name="piece_ui3" element="piece"><bounds x="1" y="31" width="4" height="4" /></bezel> + <bezel name="piece_ui4" element="piece"><bounds x="5" y="23" width="4" height="4" /></bezel> + <bezel name="piece_ui5" element="piece"><bounds x="5" y="27" width="4" height="4" /></bezel> + <bezel name="piece_ui6" element="piece"><bounds x="5" y="31" width="4" height="4" /></bezel> + <bezel name="piece_ui7" element="piece"><bounds x="1" y="36" width="4" height="4" /></bezel> + <bezel name="piece_ui8" element="piece"><bounds x="1" y="40" width="4" height="4" /></bezel> + <bezel name="piece_ui9" element="piece"><bounds x="1" y="44" width="4" height="4" /></bezel> + <bezel name="piece_ui10" element="piece"><bounds x="5" y="36" width="4" height="4" /></bezel> + <bezel name="piece_ui11" element="piece"><bounds x="5" y="40" width="4" height="4" /></bezel> + <bezel name="piece_ui12" element="piece"><bounds x="5" y="44" width="4" height="4" /></bezel> + + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0001"><bounds x="1" y="23" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0002"><bounds x="1" y="27" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0004"><bounds x="1" y="31" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0008"><bounds x="5" y="23" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0010"><bounds x="5" y="27" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0020"><bounds x="5" y="31" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0040"><bounds x="1" y="36" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0080"><bounds x="1" y="40" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0100"><bounds x="1" y="44" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0200"><bounds x="5" y="36" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0400"><bounds x="5" y="40" width="4" height="4" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:SPAWN" inputmask="0x0800"><bounds x="5" y="44" width="4" height="4" /><color alpha="0.25" /></bezel> + + <!-- hand --> + <bezel element="text_uih1"><bounds x="0" y="51" width="10" height="2" /></bezel> + <bezel element="cblack"><bounds x="1" y="53.5" width="8" height="6" /></bezel> + <bezel name="piece_ui0" element="piece"><bounds x="2" y="53.5" width="6" height="6" /></bezel> + + <bezel element="cwhite"><bounds x="1" y="60.5" width="8" height="2.5" /></bezel> + <bezel element="text_uih2"><bounds x="1.5" y="60.75" width="7" height="2" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x08"><bounds x="1" y="60.5" width="8" height="2.5" /><color alpha="0.25" /></bezel> + + <!-- undo --> + <bezel element="text_uiu1"><bounds x="0" y="66" width="10" height="2" /></bezel> + <bezel element="cwhite"><bounds x="1" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="3.1" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="5.2" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="cwhite"><bounds x="7.3" y="68.5" width="1.7" height="6" /></bezel> + <bezel element="text_uiu2a"><bounds x="1" y="69.5" width="1.7" height="4" /></bezel> + <bezel element="text_uiu2b"><bounds x="3.1" y="69.5" width="1.7" height="4" /></bezel> + <bezel element="text_uiu2c"><bounds x="5.2" y="69.5" width="1.7" height="4" /></bezel> + <bezel element="text_uiu2d"><bounds x="7.3" y="69.5" width="1.7" height="4" /></bezel> + + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x10"><bounds x="1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x20"><bounds x="3.1" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x40"><bounds x="5.2" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + <bezel element="hlub" inputtag="board:board:UI" inputmask="0x80"><bounds x="7.3" y="68.5" width="1.7" height="6" /><color alpha="0.25" /></bezel> + + <bezel name="count_ui0" element="text_uiu3a"><bounds x="0" y="75" width="4" height="2" /></bezel> + <bezel name="count_ui1" element="text_uiu3c"><bounds x="6" y="75" width="4" height="2" /></bezel> + <bezel element="text_uiu3b"><bounds x="4" y="75" width="2" height="2" /></bezel> + </group> + + +<!-- 7seg panel --> + + <group name="panel1"> + <bezel name="digit0" element="digit"><bounds x="0" y="0" width="10" height="15" /></bezel> + <bezel name="digit1" element="digit"><bounds x="10" y="0" width="10" height="15" /></bezel> + <bezel name="digit2" element="digit"><bounds x="20" y="0" width="10" height="15" /></bezel> + <bezel name="digit3" element="digit"><bounds x="30" y="0" width="10" height="15" /></bezel> + </group> + + +<!-- led panel --> + + <element name="black"><rect><color red="0" green="0" blue="0" /></rect></element> + <element name="white2"><rect><color red="0.8" green="0.8" blue="0.8" /></rect></element> + <element name="dblack"><disk><color red="0" green="0" blue="0" /></disk></element> + <element name="dwhite"><disk><color red="0.8" green="0.8" blue="0.8" /></disk></element> + + <element name="led_play"><text string="PLAY" align="1"><color red="0.8" green="0.8" blue="0.8" /></text> </element> + <element name="led_pos"> <text string="POS" align="1"> <color red="0.8" green="0.8" blue="0.8" /></text> </element> + <element name="led_mem"> <text string="MEM" align="1"> <color red="0.8" green="0.8" blue="0.8" /></text> </element> + + <group name="panel2"> + <bounds x="69.1" y="89.9" width="29" height="1.5" /> + + <bezel element="led_play"><bounds x="70.7" y="89.9" width="3.2" height="1.5" /></bezel> + <bezel element="led_pos"> <bounds x="75.7" y="89.9" width="3.2" height="1.5" /></bezel> + <bezel element="led_mem"> <bounds x="80.7" y="89.9" width="3.2" height="1.5" /></bezel> + <bezel element="dwhite"><bounds x="85.9" y="89.9" width="1.4" height="1.4" /></bezel> + <bezel element="dblack"><bounds x="86.0" y="90.0" width="1.2" height="1.2" /></bezel> + <bezel element="dwhite"><bounds x="86.45" y="90.45" width="0.4" height="0.4" /></bezel> + <bezel element="white2"><bounds x="90.9" y="90.0" width="1.2" height="1.2" /></bezel> + <bezel element="black"><bounds x="91.05" y="90.15" width="0.9" height="0.9" /></bezel> + <bezel element="white2"><bounds x="95.7" y="90.0" width="1.2" height="1.2" /></bezel> + + <bezel name="led100" element="led"> <bounds x="69.1" y="90" width="1.3" height="1.3" /> </bezel> + <bezel name="led101" element="led"> <bounds x="74.1" y="90" width="1.3" height="1.3" /> </bezel> + <bezel name="led102" element="led"> <bounds x="79.1" y="90" width="1.3" height="1.3" /> </bezel> + <bezel name="led103" element="led"> <bounds x="84.1" y="90" width="1.3" height="1.3" /> </bezel> + <bezel name="led104" element="led"> <bounds x="89.1" y="90" width="1.3" height="1.3" /> </bezel> + <bezel name="led105" element="led"> <bounds x="94.1" y="90" width="1.3" height="1.3" /> </bezel> + </group> + + +<!-- buttons --> + + <element name="gray"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect></element> + <element name="white"><rect><color red="1" green="1" blue="1" /></rect></element> + + <element name="keys" defstate="0"> + <rect state="1"><color red="0.0" green="0.0" blue="0.0" /></rect> + </element> + + <element name="text_cl"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="CL"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_pos"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="POS"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_mem"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="MEM"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_info"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="INFO"><color red="1" green="1" blue="1" /></text> </element> + <element name="text_lev"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="LEV"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_ent"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="ENT"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_res"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="RES"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="text_a1"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="A1"><color red="1" green="1" blue="1" /></text> </element> + <element name="text_b2"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="B2"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_c3"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="C3"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_d4"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="D4"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_e5"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="E5"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_f6"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="F6"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_g7"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="G7"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_h8"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="H8"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_9l"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="9"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_0r"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="0"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="text_l9"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="←"> <color red="1" green="1" blue="1" /></text> </element> + <element name="text_r0"> <rect><color red="0.25" green="0.25" blue="0.25" /></rect> <text string="→"> <color red="1" green="1" blue="1" /></text> </element> + + <element name="text_p1"><image file="chess/wk.png"/></element> + <element name="text_p2"><image file="chess/wq.png"/></element> + <element name="text_p3"><image file="chess/wr.png"/></element> + <element name="text_p4"><image file="chess/wb.png"/></element> + <element name="text_p5"><image file="chess/wn.png"/></element> + <element name="text_p6"><image file="chess/wp.png"/></element> + + <group name="buttons"> + <bounds x="69" y="93" width="29" height="14" /> + + <bezel element="gray"><bounds x="69" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="74" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="79" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="84" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="89" y="93" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="94" y="93" width="4" height="4" /></bezel> + + <bezel element="gray"><bounds x="69" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="74" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="79" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="84" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="89" y="98" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="94" y="98" width="4" height="4" /></bezel> + + <bezel element="gray"><bounds x="69" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="74" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="79" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="84" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="89" y="103" width="4" height="4" /></bezel> + <bezel element="gray"><bounds x="94" y="103" width="4" height="4" /></bezel> + + <bezel element="text_cl"> <bounds x="69.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_pos"> <bounds x="74.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_mem"> <bounds x="79.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_info"><bounds x="84.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_lev"> <bounds x="89.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_ent"> <bounds x="94.3" y="94" width="3.67" height="2.2" /></bezel> + <bezel element="text_res"> <bounds x="69.3" y="104" width="3.67" height="2.2" /></bezel> + <bezel element="text_res"> <bounds x="74.3" y="104" width="3.67" height="2.2" /></bezel> + + <bezel element="text_l9"><bounds x="90.0" y="103" width="2" height="1.8" /></bezel> + <bezel element="text_r0"><bounds x="95.2" y="103" width="2" height="1.8" /></bezel> + + <bezel element="text_a1"><bounds x="70.7" y="99.5" width="2.27" height="2.2" /></bezel> + <bezel element="text_b2"><bounds x="75.7" y="99.5" width="2.27" height="2.2" /></bezel> + <bezel element="text_c3"><bounds x="80.7" y="99.5" width="2.27" height="2.2" /></bezel> + <bezel element="text_d4"><bounds x="85.7" y="99.5" width="2.27" height="2.2" /></bezel> + <bezel element="text_e5"><bounds x="90.7" y="99.5" width="2.27" height="2.2" /></bezel> + <bezel element="text_f6"><bounds x="95.7" y="99.5" width="2.27" height="2.2" /></bezel> + <bezel element="text_g7"><bounds x="80" y="104.2" width="2.27" height="2.2" /></bezel> + <bezel element="text_h8"><bounds x="85" y="104.2" width="2.27" height="2.2" /></bezel> + <bezel element="text_9l"><bounds x="91" y="104.5" width="1.97" height="2.2" /></bezel> + <bezel element="text_0r"><bounds x="96" y="104.5" width="1.97" height="2.2" /></bezel> + + <bezel element="text_p6" ><bounds x="69" y="98" width="2" height="1.9" /></bezel> + <bezel element="text_p5" ><bounds x="74" y="98" width="2" height="1.9" /></bezel> + <bezel element="text_p4" ><bounds x="79" y="98" width="2" height="1.9" /></bezel> + <bezel element="text_p3" ><bounds x="84" y="98" width="2" height="1.9" /></bezel> + <bezel element="text_p2" ><bounds x="89" y="98" width="2" height="1.9" /></bezel> + <bezel element="text_p1" ><bounds x="94" y="98" width="2" height="1.9" /></bezel> + <bezel element="black"><bounds x="89.5" y="105.1" width="1.3" height="1.3" /></bezel> + <bezel element="white"><bounds x="94.5" y="105.1" width="1.3" height="1.3" /></bezel> + + <bezel element="keys" inputtag="KEY1_0" inputmask="0x80"> <!-- CL --> + <bounds x="69" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY1_1" inputmask="0x80"> <!-- POS --> + <bounds x="74" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY1_2" inputmask="0x80"> <!-- MEM --> + <bounds x="79" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY1_3" inputmask="0x80"> <!-- INFO --> + <bounds x="84" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY1_4" inputmask="0x80"> <!-- LEV --> + <bounds x="89" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY1_5" inputmask="0x80"> <!-- ENT --> + <bounds x="94" y="93" width="4" height="4" /><color alpha="0.25" /> + </bezel> + + <bezel element="keys" inputtag="KEY2_3" inputmask="0x80"> <!-- A1 --> + <bounds x="69" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2_5" inputmask="0x80"> <!-- B2 --> + <bounds x="74" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2_6" inputmask="0x80"> <!-- C3 --> + <bounds x="79" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2_7" inputmask="0x80"> <!-- D4 --> + <bounds x="84" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2_0" inputmask="0x80"> <!-- E5 --> + <bounds x="89" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2_1" inputmask="0x80"> <!-- F6 --> + <bounds x="94" y="98" width="4" height="4" /><color alpha="0.25" /> + </bezel> + + <bezel element="keys" inputtag="KEY2_2" inputmask="0x80"> <!-- G7 --> + <bounds x="79" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY2_4" inputmask="0x80"> <!-- H8 --> + <bounds x="84" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY1_7" inputmask="0x80"> <!-- 9 --> + <bounds x="89" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + <bezel element="keys" inputtag="KEY1_6" inputmask="0x80"> <!-- 0 --> + <bounds x="94" y="103" width="4" height="4" /><color alpha="0.25" /> + </bezel> + </group> + + +<!-- build screen --> + + <view name="Internal Layout"> + <bounds left="0" right="101" top="0" bottom="106.5" /> + <bezel element="cblack"><bounds x="14" y="0" width="87" height="87" /></bezel> + <bezel element="cwhite"><bounds x="17" y="2" width="81" height="81" /></bezel> + + <group ref="panel1"><bounds x="37.5" y="91" width="23" height="8" /></group> + <group ref="panel2"><bounds x="67.5" y="88.25" width="29" height="1.5" /></group> + <group ref="buttons"><bounds x="67.5" y="91" width="29" height="14" /></group> + + <group ref="sb_board"><bounds x="17.5" y="2.5" width="80" height="80" /></group> + <group ref="sb_ui"><bounds x="1.5" y="3" width="10" height="80" /></group> + + <!-- chessboard coords --> + + <bezel element="text_8"><bounds x="14.7" y="7" width="2" height="2" /></bezel> + <bezel element="text_7"><bounds x="14.7" y="17" width="2" height="2" /></bezel> + <bezel element="text_6"><bounds x="14.7" y="27" width="2" height="2" /></bezel> + <bezel element="text_5"><bounds x="14.7" y="37" width="2" height="2" /></bezel> + <bezel element="text_4"><bounds x="14.7" y="47" width="2" height="2" /></bezel> + <bezel element="text_3"><bounds x="14.7" y="57" width="2" height="2" /></bezel> + <bezel element="text_2"><bounds x="14.7" y="67" width="2" height="2" /></bezel> + <bezel element="text_1"><bounds x="14.7" y="77" width="2" height="2" /></bezel> + + <bezel element="text_a"><bounds x="21.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_b"><bounds x="31.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_c"><bounds x="41.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_d"><bounds x="51.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_e"><bounds x="61.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_f"><bounds x="71.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_g"><bounds x="81.5" y="84" width="2" height="2" /></bezel> + <bezel element="text_h"><bounds x="91.5" y="84" width="2" height="2" /></bezel> + </view> + +</mamelayout> diff --git a/src/mame/layout/mindset.lay b/src/mame/layout/mindset.lay new file mode 100644 index 00000000000..dd178c5308b --- /dev/null +++ b/src/mame/layout/mindset.lay @@ -0,0 +1,64 @@ +<?xml version="1.0"?> +<mamelayout version="2"> + <element name="rled" defstate="0"> + <rect state="1"> + <color red="0.75" green="0.0" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.20" green="0.0" blue="0.0" /> + </rect> + </element> + <element name="yled" defstate="0"> + <rect state="1"> + <color red="0.75" green="0.75" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.20" green="0.20" blue="0.0" /> + </rect> + </element> + <element name="gled" defstate="0"> + <rect state="1"> + <color red="0.0" green="0.75" blue="0.0" /> + </rect> + <rect state="0"> + <color red="0.0" green="0.20" blue="0.0" /> + </rect> + </element> + <element name="DRIVE0"> + <text string="A"> + <color red="1.0" green="1.0" blue="1.0" /> + </text> + </element> + <element name="DRIVE1"> + <text string="B"> + <color red="1.0" green="1.0" blue="1.0" /> + </text> + </element> + + <view name="Default Layout"> + <screen index="0"> + <bounds x="61" y="0" width="751" height="480" /> + </screen> + <bezel name="red_led" element="rled"> + <bounds x="15" y="3" width="10" height="10" /> + </bezel> + <bezel name="yellow_led" element="yled"> + <bounds x="15" y="18" width="10" height="10" /> + </bezel> + <bezel name="green_led" element="gled"> + <bounds x="15" y="33" width="10" height="10" /> + </bezel> + <bezel name="label0" element="DRIVE0"> + <bounds x="0" y="60" width="15" height="16" /> + </bezel> + <bezel name="drive0_led" element="gled"> + <bounds x="15" y="63" width="10" height="10" /> + </bezel> + <bezel name="label1" element="DRIVE1"> + <bounds x="0" y="74" width="15" height="16" /> + </bezel> + <bezel name="drive1_led" element="gled"> + <bounds x="15" y="79" width="10" height="10" /> + </bezel> + </view> +</mamelayout> diff --git a/src/mame/layout/model1io2.lay b/src/mame/layout/model1io2.lay index 60b1d49cc97..f029cd09bf1 100644 --- a/src/mame/layout/model1io2.lay +++ b/src/mame/layout/model1io2.lay @@ -23,7 +23,7 @@ </screen> <!-- workaround for MAME selecting a 2-screen view by default --> - <screen tag="ioboard:screen"><bounds left="0" top="0" right="1" bottom="1" /><color alpha="0" /></screen> + <screen tag="ioboard:screen"><bounds left="0" top="0" right="4" bottom="3" /><color alpha="0" /></screen> </view> <view name="Diagnostic"> diff --git a/src/mame/layout/sms1.lay b/src/mame/layout/sms1.lay index 93a8c03a3cf..b390da57e59 100644 --- a/src/mame/layout/sms1.lay +++ b/src/mame/layout/sms1.lay @@ -6,8 +6,8 @@ </screen> <!-- workaround for MAME selecting a 3-screen view by default --> - <screen index="1"><bounds left="0" top="0" right="1" bottom="1" /><color alpha="0" /></screen> - <screen index="2"><bounds left="0" top="0" right="1" bottom="1" /><color alpha="0" /></screen> + <screen index="1"><bounds left="0" top="0" right="4" bottom="3" /><color alpha="0" /></screen> + <screen index="2"><bounds left="0" top="0" right="4" bottom="3" /><color alpha="0" /></screen> </view> <view name="SegaScope Left LCD Standard (4:3)"> diff --git a/src/mame/machine/hpc1.cpp b/src/mame/machine/hpc1.cpp index a4c32d5d5c1..8ffb6e25a14 100644 --- a/src/mame/machine/hpc1.cpp +++ b/src/mame/machine/hpc1.cpp @@ -11,8 +11,8 @@ #include "bus/rs232/rs232.h" #include "bus/rs232/hlemouse.h" #include "machine/nscsi_bus.h" -#include "machine/nscsi_cd.h" -#include "machine/nscsi_hd.h" +#include "bus/nscsi/cd.h" +#include "bus/nscsi/hd.h" #include "bus/sgikbd/sgikbd.h" #include "machine/hpc1.h" #include "speaker.h" diff --git a/src/mame/machine/poly88.cpp b/src/mame/machine/poly88.cpp index 2eb167a8796..dec62c27b59 100644 --- a/src/mame/machine/poly88.cpp +++ b/src/mame/machine/poly88.cpp @@ -18,9 +18,6 @@ void poly88_state::device_timer(emu_timer &timer, device_timer_id id, int param, { switch (id) { - case TIMER_USART: - poly88_usart_timer_callback(ptr, param); - break; case TIMER_KEYBOARD: keyboard_callback(ptr, param); break; @@ -30,19 +27,11 @@ void poly88_state::device_timer(emu_timer &timer, device_timer_id id, int param, } -TIMER_CALLBACK_MEMBER(poly88_state::poly88_usart_timer_callback) -{ - m_int_vector = 0xe7; - m_maincpu->set_input_line(0, HOLD_LINE); -} - +// bits 0-3 baud rate; bit 4 (0=cassette, 1=rs232); bit 5 (1=disable rom and ram) void poly88_state::baud_rate_w(uint8_t data) { logerror("poly88_baud_rate_w %02x\n",data); m_brg->control_w(data & 15); - - // FIXME - m_usart_timer->adjust(attotime::zero, 0, attotime::from_hz(300)); } uint8_t poly88_state::row_number(uint8_t code) { @@ -154,79 +143,98 @@ IRQ_CALLBACK_MEMBER(poly88_state::poly88_irq_callback) return m_int_vector; } -WRITE_LINE_MEMBER(poly88_state::write_cas_tx) +TIMER_DEVICE_CALLBACK_MEMBER( poly88_state::kansas_r ) { - m_cas_tx = state; -} - -WRITE_LINE_MEMBER(poly88_state::cassette_txc_rxc_w) -{ - int data; - int current_level; + if (BIT(m_linec->read(), 7)) + return; -// if (!(ioport("DSW0")->read() & 0x02)) /* V.24 / Tape Switch */ - //{ - /* tape reading */ - if (m_cassette->get_state()&CASSETTE_PLAY) - { - if (m_clk_level_tape) - { - m_previous_level = (m_cassette->input() > 0.038) ? 1 : 0; - m_clk_level_tape = 0; - } - else - { - current_level = (m_cassette->input() > 0.038) ? 1 : 0; + // no tape - set uart to idle + m_cass_data[1]++; + if (m_dtr || (m_cass_data[1] > 32)) + { + m_cass_data[1] = 32; + m_rxd = 1; + } - if (m_previous_level!=current_level) - { - data = (!m_previous_level && current_level) ? 1 : 0; -//data = current_level; - m_usart->write_rxd(data); + // turn 1200/2400Hz to a bit + uint8_t cass_ws = (m_cassette->input() > +0.04) ? 1 : 0; - m_clk_level_tape = 1; - } - } + if (cass_ws != m_cass_data[0]) + { + m_cass_data[0] = cass_ws; + m_rxd = (m_cass_data[1] < 12) ? 1 : 0; + m_cass_data[1] = 0; + } +} - m_usart->write_rxc(m_clk_level_tape); +WRITE_LINE_MEMBER(poly88_state::cassette_clock_w) +{ + // incoming @4800Hz (bit), 2400Hz (polyphase) + if (BIT(m_linec->read(), 7)) + { + // polyphase + // SAVE + if (!m_rts) + m_cassette->output((m_txd ^ state) ? 1.0 : -1.0); + // LOAD + if (!m_dtr) + { + u8 cass_ws = (m_cassette->input() > +0.04) ? 1 : 0; + if (state) + m_usart->write_rxd(cass_ws); } + } + else + { + // byte mode 300 baud Kansas City format + u8 twobit = m_cass_data[3] & 3; - /* tape writing */ - if (m_cassette->get_state()&CASSETTE_RECORD) + // SAVE + if (m_rts && (twobit == 0)) + { + m_cassette->output(0); + m_cass_data[3] = 0; // reset waveforms + } + else + if (state) { - data = m_cas_tx; - data ^= m_clk_level_tape; - m_cassette->output(data&0x01 ? 1 : -1); + if (twobit == 0) + m_cassold = m_txd; - m_clk_level_tape = m_clk_level_tape ? 0 : 1; - m_usart->write_txc(m_clk_level_tape); + if (m_cassold) + m_cassette->output(BIT(m_cass_data[3], 0) ? -1.0 : +1.0); // 2400Hz + else + m_cassette->output(BIT(m_cass_data[3], 1) ? -1.0 : +1.0); // 1200Hz - return; + m_cass_data[3]++; } - m_clk_level_tape = 1; + // LOAD + if (state && !m_dtr && (twobit == 0)) + m_usart->write_rxd(m_rxd); + } + if (!m_rts) m_usart->write_txc(state); -// } + + if (!m_dtr) + m_usart->write_rxc(state); } void poly88_state::init_poly88() { - m_previous_level = 0; - m_clk_level_tape = 1; - - m_usart_timer = timer_alloc(TIMER_USART); m_keyboard_timer = timer_alloc(TIMER_KEYBOARD); m_keyboard_timer->adjust(attotime::from_hz(24000), 0, attotime::from_hz(24000)); } void poly88_state::machine_reset() { - m_intr = 0; m_last_code = 0; + m_usart->write_rxd(1); m_usart->write_cts(0); m_brg->control_w(0); + m_dtr = m_rts = m_txd = m_rxd = m_cassold = 1; } INTERRUPT_GEN_MEMBER(poly88_state::poly88_interrupt) @@ -235,10 +243,13 @@ INTERRUPT_GEN_MEMBER(poly88_state::poly88_interrupt) device.execute().set_input_line(0, HOLD_LINE); } -WRITE_LINE_MEMBER(poly88_state::poly88_usart_rxready) +WRITE_LINE_MEMBER(poly88_state::usart_ready_w) { - //drvm_int_vector = 0xe7; - //execute().set_input_line(0, HOLD_LINE); + if (state) + { + m_int_vector = 0xe7; + m_maincpu->set_input_line(0, HOLD_LINE); + } } uint8_t poly88_state::keyboard_r() diff --git a/src/mame/video/playch10.cpp b/src/mame/video/playch10.cpp index c2e212b45a1..935af106c14 100644 --- a/src/mame/video/playch10.cpp +++ b/src/mame/video/playch10.cpp @@ -127,9 +127,9 @@ uint32_t playch10_state::screen_update_playch10_top(screen_device &screen, bitma if (m_pc10_bios != 1) return screen_update_playch10_single(screen, bitmap, cliprect); - if (!m_pc10_dispmask) - /* render the ppu */ - m_ppu->render(bitmap, 0, 0, 0, 0, cliprect); + /* When the bios is accessing vram, the video circuitry can't access it */ + if (!m_pc10_sdcs) + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); else bitmap.fill(0, cliprect); @@ -142,9 +142,9 @@ uint32_t playch10_state::screen_update_playch10_bottom(screen_device &screen, bi if (m_pc10_bios != 1) return screen_update_playch10_single(screen, bitmap, cliprect); - /* When the bios is accessing vram, the video circuitry can't access it */ - if (!m_pc10_sdcs) - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + if (!m_pc10_dispmask) + /* render the ppu */ + m_ppu->render(bitmap, 0, 0, 0, 0, cliprect); else bitmap.fill(0, cliprect); |