From d79ba952ac5ef649752e77ee6a97728780c7f4ab Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 19 Apr 2021 14:53:28 +0200 Subject: [PATCH] smartboard: add internal artwork for the pc version --- scripts/src/bus.lua | 2 + src/devices/bus/centronics/smartboard.cpp | 7 +- src/devices/bus/centronics/smartboard.h | 8 +- src/emu/layout/smartboard.lay | 453 ++++++++++++++++++++++ 4 files changed, 464 insertions(+), 6 deletions(-) create mode 100644 src/emu/layout/smartboard.lay diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index 54a43cc5e12..27853edd7e9 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -2611,11 +2611,13 @@ if (BUSES["CENTRONICS"]~=null) then { MAME_DIR .. "src/devices/bus/centronics/epson_ex800.cpp", GEN_DIR .. "emu/layout/ex800.lh" }, { MAME_DIR .. "src/devices/bus/centronics/epson_lx800.cpp", GEN_DIR .. "emu/layout/lx800.lh" }, { MAME_DIR .. "src/devices/bus/centronics/epson_lx810l.cpp", GEN_DIR .. "emu/layout/lx800.lh" }, + { MAME_DIR .. "src/devices/bus/centronics/smartboard.cpp", GEN_DIR .. "emu/layout/smartboard.lh" }, } custombuildtask { layoutbuildtask("emu/layout", "ex800"), layoutbuildtask("emu/layout", "lx800"), + layoutbuildtask("emu/layout", "smartboard"), } end diff --git a/src/devices/bus/centronics/smartboard.cpp b/src/devices/bus/centronics/smartboard.cpp index 6bef56724ab..8afcfbf68f7 100644 --- a/src/devices/bus/centronics/smartboard.cpp +++ b/src/devices/bus/centronics/smartboard.cpp @@ -10,6 +10,8 @@ The actual chessboard controller device is in devices/machine/smartboard.* #include "emu.h" #include "smartboard.h" +#include "smartboard.lh" + DEFINE_DEVICE_TYPE(CENTRONICS_SMARTBOARD, centronics_smartboard_device, "centronics_smartboard", "Tasc SmartBoard SB30 Interface") @@ -20,7 +22,7 @@ DEFINE_DEVICE_TYPE(CENTRONICS_SMARTBOARD, centronics_smartboard_device, "centron centronics_smartboard_device::centronics_smartboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, CENTRONICS_SMARTBOARD, tag, owner, clock), device_centronics_peripheral_interface(mconfig, *this), - m_sb30(*this, "sb30") + m_smartboard(*this, "smartboard") { } @@ -30,5 +32,6 @@ centronics_smartboard_device::centronics_smartboard_device(const machine_config void centronics_smartboard_device::device_add_mconfig(machine_config &config) { - TASC_SB30(config, m_sb30).data_out().set(FUNC(centronics_smartboard_device::output_busy)); + TASC_SB30(config, m_smartboard).data_out().set(FUNC(centronics_smartboard_device::output_busy)); + config.set_default_layout(layout_smartboard); } diff --git a/src/devices/bus/centronics/smartboard.h b/src/devices/bus/centronics/smartboard.h index 6ad21851495..a5ab09b48b1 100644 --- a/src/devices/bus/centronics/smartboard.h +++ b/src/devices/bus/centronics/smartboard.h @@ -27,12 +27,12 @@ protected: virtual void device_start() override { } virtual void device_add_mconfig(machine_config &config) override; - virtual DECLARE_WRITE_LINE_MEMBER(input_data2) override { if (started()) m_sb30->reset_w(state); } - virtual DECLARE_WRITE_LINE_MEMBER(input_data0) override { if (started()) m_sb30->data0_w(state); } - virtual DECLARE_WRITE_LINE_MEMBER(input_data7) override { if (started()) m_sb30->data1_w(state); } + virtual DECLARE_WRITE_LINE_MEMBER(input_data2) override { if (started()) m_smartboard->reset_w(state); } + virtual DECLARE_WRITE_LINE_MEMBER(input_data0) override { if (started()) m_smartboard->data0_w(state); } + virtual DECLARE_WRITE_LINE_MEMBER(input_data7) override { if (started()) m_smartboard->data1_w(state); } private: - required_device m_sb30; + required_device m_smartboard; }; diff --git a/src/emu/layout/smartboard.lay b/src/emu/layout/smartboard.lay new file mode 100644 index 00000000000..885f914ec67 --- /dev/null +++ b/src/emu/layout/smartboard.lay @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +