From 98ee9e7d4bc58af9338c9011206260c1ecedbe1a Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 29 Aug 2023 21:41:53 +0200 Subject: [PATCH] fphantom,robotadv: small fix to internal layout, combine x/y into one output --- src/devices/machine/sensorboard.cpp | 2 +- src/mame/fidelity/phantom.cpp | 13 +++++-------- src/mame/layout/fidel_cphantom.lay | 9 +++++---- src/mame/layout/fidel_phantom.lay | 9 +++++---- src/mame/layout/novag_robotadv.lay | 11 ++++++----- src/mame/novag/robotadv.cpp | 13 +++++-------- src/mame/taito/40love.cpp | 2 +- 7 files changed, 28 insertions(+), 31 deletions(-) diff --git a/src/devices/machine/sensorboard.cpp b/src/devices/machine/sensorboard.cpp index 8860d5394a9..56164a2d0ab 100644 --- a/src/devices/machine/sensorboard.cpp +++ b/src/devices/machine/sensorboard.cpp @@ -69,7 +69,7 @@ DEFINE_DEVICE_TYPE(SENSORBOARD, sensorboard_device, "sensorboard", "Sensorboard" sensorboard_device::sensorboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, SENSORBOARD, tag, owner, clock), device_nvram_interface(mconfig, *this), - m_out_piece(*this, "piece_%c%u", 0U + 'a', 1U), + m_out_piece(*this, "piece_%c%u", unsigned('a'), 1U), m_out_pui(*this, "piece_ui%u", 0U), m_out_count(*this, "count_ui%u", 0U), m_inp_rank(*this, "RANK.%u", 1), diff --git a/src/mame/fidelity/phantom.cpp b/src/mame/fidelity/phantom.cpp index 6b9fddcc8b9..06f6823fdee 100644 --- a/src/mame/fidelity/phantom.cpp +++ b/src/mame/fidelity/phantom.cpp @@ -77,8 +77,7 @@ public: m_inputs(*this, "IN.%u", 0), m_piece_hand(*this, "cpu_hand"), m_out_motor(*this, "motor%u", 0U), - m_out_magnetx(*this, "magnetx"), - m_out_magnety(*this, "magnety") + m_out_pos(*this, "pos_%c", unsigned('x')) { } void phantom(machine_config &config); @@ -97,8 +96,7 @@ protected: optional_ioport_array<2> m_inputs; output_finder<> m_piece_hand; output_finder<5> m_out_motor; - output_finder<> m_out_magnetx; - output_finder<> m_out_magnety; + output_finder<2> m_out_pos; // address maps virtual void main_map(address_map &map); @@ -141,8 +139,7 @@ void phantom_state::machine_start() // resolve outputs m_piece_hand.resolve(); m_out_motor.resolve(); - m_out_magnetx.resolve(); - m_out_magnety.resolve(); + m_out_pos.resolve(); // register for savestates save_item(NAME(m_mux)); @@ -237,8 +234,8 @@ void phantom_state::output_magnet_pos() { // put active state on x bit 8 const int active = BIT(m_motors_ctrl, 4) ? 0x100 : 0; - m_out_magnetx = m_hmotor_pos | active; - m_out_magnety = m_vmotor_pos; + m_out_pos[0] = m_hmotor_pos | active; + m_out_pos[1] = m_vmotor_pos; } TIMER_DEVICE_CALLBACK_MEMBER(phantom_state::motors_timer) diff --git a/src/mame/layout/fidel_cphantom.lay b/src/mame/layout/fidel_cphantom.lay index 93e8ce73a03..bd41d321529 100644 --- a/src/mame/layout/fidel_cphantom.lay +++ b/src/mame/layout/fidel_cphantom.lay @@ -690,20 +690,21 @@ license:CC0-1.0 - - + + - - + + + diff --git a/src/mame/layout/fidel_phantom.lay b/src/mame/layout/fidel_phantom.lay index 7fad11fb737..8e868935dd9 100644 --- a/src/mame/layout/fidel_phantom.lay +++ b/src/mame/layout/fidel_phantom.lay @@ -687,20 +687,21 @@ license:CC0-1.0 - - + + - - + + + diff --git a/src/mame/layout/novag_robotadv.lay b/src/mame/layout/novag_robotadv.lay index 31eed08bf8e..19157828375 100644 --- a/src/mame/layout/novag_robotadv.lay +++ b/src/mame/layout/novag_robotadv.lay @@ -51,7 +51,7 @@ license:CC0-1.0 - + @@ -723,20 +723,21 @@ license:CC0-1.0 - - + + - - + + + diff --git a/src/mame/novag/robotadv.cpp b/src/mame/novag/robotadv.cpp index d86487a3250..f4d98983107 100644 --- a/src/mame/novag/robotadv.cpp +++ b/src/mame/novag/robotadv.cpp @@ -64,8 +64,7 @@ public: m_inputs(*this, "IN.%u", 0), m_piece_hand(*this, "cpu_hand"), m_out_motor(*this, "motor%u", 0U), - m_out_clawx(*this, "clawx"), - m_out_clawy(*this, "clawy") + m_out_pos(*this, "pos_%c", unsigned('x')) { } void robotadv(machine_config &config); @@ -82,8 +81,7 @@ private: required_ioport_array<3> m_inputs; output_finder<> m_piece_hand; output_finder<6> m_out_motor; - output_finder<> m_out_clawx; - output_finder<> m_out_clawy; + output_finder<2> m_out_pos; void main_map(address_map &map); void io_map(address_map &map); @@ -118,8 +116,7 @@ void robotadv_state::machine_start() // resolve outputs m_piece_hand.resolve(); m_out_motor.resolve(); - m_out_clawx.resolve(); - m_out_clawy.resolve(); + m_out_pos.resolve(); // register for savestates save_item(NAME(m_control1)); @@ -312,8 +309,8 @@ void robotadv_state::refresh() // output claw position const int open = (m_limits & 1) ? 0x800 : 0; // put open state on x bit 11 - m_out_clawx = int((x + 15.0) * 50.0) | open; - m_out_clawy = int((y + 15.0) * 50.0); + m_out_pos[0] = int((x + 15.0) * 50.0) | open; + m_out_pos[1] = int((y + 15.0) * 50.0); } diff --git a/src/mame/taito/40love.cpp b/src/mame/taito/40love.cpp index 2053c10a150..8be017646db 100644 --- a/src/mame/taito/40love.cpp +++ b/src/mame/taito/40love.cpp @@ -324,7 +324,7 @@ void fortyl_state::undoukai_map(address_map &map) map(0xa804, 0xa804).r(m_soundlatch2, FUNC(generic_latch_8_device::read)); map(0xa804, 0xa804).w("soundlatch", FUNC(generic_latch_8_device::write)); map(0xa805, 0xa805).r(FUNC(fortyl_state::snd_flag_r)).nopw(); /*sound_reset*/ //???? - map(0xa807, 0xa807).nopr().nopw(); /* unknown */ + map(0xa807, 0xa807).noprw(); /* unknown */ map(0xa808, 0xa808).portr("DSW3"); map(0xa809, 0xa809).portr("P1"); map(0xa80a, 0xa80a).portr("SYSTEM");