diff options
-rw-r--r-- | src/devices/bus/gamegear/ggext.cpp | 9 | ||||
-rw-r--r-- | src/devices/bus/gamegear/ggext.h | 4 | ||||
-rw-r--r-- | src/devices/bus/gamegear/smsctrladp.cpp | 7 | ||||
-rw-r--r-- | src/devices/bus/gamegear/smsctrladp.h | 1 | ||||
-rw-r--r-- | src/devices/bus/sms_ctrl/lphaser.cpp | 2 | ||||
-rw-r--r-- | src/devices/bus/sms_ctrl/multitap.cpp | 10 | ||||
-rw-r--r-- | src/devices/bus/sms_ctrl/rfu.cpp | 7 | ||||
-rw-r--r-- | src/devices/bus/sms_ctrl/rfu.h | 1 | ||||
-rw-r--r-- | src/devices/bus/sms_ctrl/smsctrl.cpp | 9 | ||||
-rw-r--r-- | src/devices/bus/sms_ctrl/smsctrl.h | 4 | ||||
-rw-r--r-- | src/mame/drivers/sms.cpp | 4 | ||||
-rw-r--r-- | src/mame/includes/sms.h | 1 | ||||
-rw-r--r-- | src/mame/machine/sms.cpp | 10 |
13 files changed, 3 insertions, 66 deletions
diff --git a/src/devices/bus/gamegear/ggext.cpp b/src/devices/bus/gamegear/ggext.cpp index 86a8d1911a0..a886abe67f2 100644 --- a/src/devices/bus/gamegear/ggext.cpp +++ b/src/devices/bus/gamegear/ggext.cpp @@ -59,8 +59,7 @@ gg_ext_port_device::gg_ext_port_device(const machine_config &mconfig, const char device_t(mconfig, GG_EXT_PORT, tag, owner, clock), device_slot_interface(mconfig, *this), m_device(nullptr), - m_th_pin_handler(*this), - m_pixel_handler(*this) + m_th_pin_handler(*this) { } @@ -83,7 +82,6 @@ void gg_ext_port_device::device_start() m_device = dynamic_cast<device_gg_ext_port_interface *>(get_card_device()); m_th_pin_handler.resolve_safe(); - m_pixel_handler.resolve_safe(0); } @@ -107,11 +105,6 @@ void gg_ext_port_device::th_pin_w(int state) m_th_pin_handler(state); } -uint32_t gg_ext_port_device::pixel_r() -{ - return m_pixel_handler(); -} - //------------------------------------------------- // SLOT_INTERFACE( gg_ext_port_devices ) diff --git a/src/devices/bus/gamegear/ggext.h b/src/devices/bus/gamegear/ggext.h index 1eed1545bed..89dd235a9b0 100644 --- a/src/devices/bus/gamegear/ggext.h +++ b/src/devices/bus/gamegear/ggext.h @@ -44,8 +44,6 @@ public: // static configuration helpers auto th_input_handler() { return m_th_pin_handler.bind(); } - auto pixel_handler() { return m_pixel_handler.bind(); } - // Currently, only the support for SMS Controller Adaptor is emulated, // for when SMS Compatibility mode is enabled. In that mode, the 10 pins // of the EXT port follows the same numbering of a SMS Control port. @@ -66,7 +64,6 @@ public: void port_w( uint8_t data ); void th_pin_w(int state); - uint32_t pixel_r(); //protected: // device-level overrides @@ -76,7 +73,6 @@ public: private: devcb_write_line m_th_pin_handler; - devcb_read32 m_pixel_handler; }; diff --git a/src/devices/bus/gamegear/smsctrladp.cpp b/src/devices/bus/gamegear/smsctrladp.cpp index 0b380cba8a0..7260894e8f7 100644 --- a/src/devices/bus/gamegear/smsctrladp.cpp +++ b/src/devices/bus/gamegear/smsctrladp.cpp @@ -70,12 +70,6 @@ WRITE_LINE_MEMBER( sms_ctrl_adaptor_device::th_pin_w ) } -READ32_MEMBER( sms_ctrl_adaptor_device::pixel_r ) -{ - return m_port->pixel_r(); -} - - //------------------------------------------------- // device_add_mconfig - add device configuration //------------------------------------------------- @@ -84,6 +78,5 @@ 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->th_input_handler().set(FUNC(sms_ctrl_adaptor_device::th_pin_w)); - m_subctrl_port->pixel_handler().set(FUNC(sms_ctrl_adaptor_device::pixel_r)); } diff --git a/src/devices/bus/gamegear/smsctrladp.h b/src/devices/bus/gamegear/smsctrladp.h index a1c4294abde..46646bde0f0 100644 --- a/src/devices/bus/gamegear/smsctrladp.h +++ b/src/devices/bus/gamegear/smsctrladp.h @@ -42,7 +42,6 @@ protected: private: DECLARE_WRITE_LINE_MEMBER(th_pin_w); - DECLARE_READ32_MEMBER(pixel_r); required_device<sms_control_port_device> m_subctrl_port; }; diff --git a/src/devices/bus/sms_ctrl/lphaser.cpp b/src/devices/bus/sms_ctrl/lphaser.cpp index fb20fc8f70c..a728930f50e 100644 --- a/src/devices/bus/sms_ctrl/lphaser.cpp +++ b/src/devices/bus/sms_ctrl/lphaser.cpp @@ -231,7 +231,7 @@ 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; - color = m_port->pixel_r(); + color = 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); diff --git a/src/devices/bus/sms_ctrl/multitap.cpp b/src/devices/bus/sms_ctrl/multitap.cpp index 88dbe01acf4..c892f6022d0 100644 --- a/src/devices/bus/sms_ctrl/multitap.cpp +++ b/src/devices/bus/sms_ctrl/multitap.cpp @@ -123,22 +123,12 @@ void sms_multitap_device::peripheral_w(uint8_t data) // device_add_mconfig - add device configuration //------------------------------------------------- -READ32_MEMBER( sms_multitap_device::pixel_r ) -{ - return m_port->pixel_r(); -} - - void sms_multitap_device::device_add_mconfig(machine_config &config) { // Controller subports setup, without the TH callback declaration, // because the circuit scheme shows TH of subports without connection. SMS_CONTROL_PORT(config, m_subctrl1_port, sms_control_port_devices, "joypad"); - m_subctrl1_port->pixel_handler().set(FUNC(sms_multitap_device::pixel_r)); SMS_CONTROL_PORT(config, m_subctrl2_port, sms_control_port_devices, "joypad"); - m_subctrl2_port->pixel_handler().set(FUNC(sms_multitap_device::pixel_r)); SMS_CONTROL_PORT(config, m_subctrl3_port, sms_control_port_devices, "joypad"); - m_subctrl3_port->pixel_handler().set(FUNC(sms_multitap_device::pixel_r)); SMS_CONTROL_PORT(config, m_subctrl4_port, sms_control_port_devices, "joypad"); - m_subctrl4_port->pixel_handler().set(FUNC(sms_multitap_device::pixel_r)); } diff --git a/src/devices/bus/sms_ctrl/rfu.cpp b/src/devices/bus/sms_ctrl/rfu.cpp index 36a081abcd1..1b13fc3e921 100644 --- a/src/devices/bus/sms_ctrl/rfu.cpp +++ b/src/devices/bus/sms_ctrl/rfu.cpp @@ -132,15 +132,8 @@ WRITE_LINE_MEMBER( sms_rapid_fire_device::th_pin_w ) } -READ32_MEMBER( sms_rapid_fire_device::pixel_r ) -{ - return m_port->pixel_r(); -} - - 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->th_input_handler().set(FUNC(sms_rapid_fire_device::th_pin_w)); - m_subctrl_port->pixel_handler().set(FUNC(sms_rapid_fire_device::pixel_r)); } diff --git a/src/devices/bus/sms_ctrl/rfu.h b/src/devices/bus/sms_ctrl/rfu.h index e37203cdcc8..f37b70b1c92 100644 --- a/src/devices/bus/sms_ctrl/rfu.h +++ b/src/devices/bus/sms_ctrl/rfu.h @@ -43,7 +43,6 @@ protected: private: DECLARE_WRITE_LINE_MEMBER(th_pin_w); - DECLARE_READ32_MEMBER(pixel_r); required_ioport m_rfire_sw; required_device<sms_control_port_device> m_subctrl_port; diff --git a/src/devices/bus/sms_ctrl/smsctrl.cpp b/src/devices/bus/sms_ctrl/smsctrl.cpp index 30b706ad390..acb14593b47 100644 --- a/src/devices/bus/sms_ctrl/smsctrl.cpp +++ b/src/devices/bus/sms_ctrl/smsctrl.cpp @@ -66,8 +66,7 @@ sms_control_port_device::sms_control_port_device(const machine_config &mconfig, device_t(mconfig, SMS_CONTROL_PORT, tag, owner, clock), device_slot_interface(mconfig, *this), m_device(nullptr), - m_th_pin_handler(*this), - m_pixel_handler(*this) + m_th_pin_handler(*this) { } @@ -90,7 +89,6 @@ void sms_control_port_device::device_start() m_device = dynamic_cast<device_sms_control_port_interface *>(get_card_device()); m_th_pin_handler.resolve_safe(); - m_pixel_handler.resolve_safe(0); } @@ -114,11 +112,6 @@ void sms_control_port_device::th_pin_w(int state) m_th_pin_handler(state); } -uint32_t sms_control_port_device::pixel_r() -{ - return m_pixel_handler(); -} - //------------------------------------------------- // SLOT_INTERFACE( sms_control_port_devices ) diff --git a/src/devices/bus/sms_ctrl/smsctrl.h b/src/devices/bus/sms_ctrl/smsctrl.h index 3d11b4e60bd..af475a68a66 100644 --- a/src/devices/bus/sms_ctrl/smsctrl.h +++ b/src/devices/bus/sms_ctrl/smsctrl.h @@ -44,8 +44,6 @@ public: // static configuration helpers auto th_input_handler() { return m_th_pin_handler.bind(); } - auto pixel_handler() { return m_pixel_handler.bind(); } - // Physical DE-9 connector interface // Data returned by the port_r methods: @@ -63,7 +61,6 @@ public: void port_w( uint8_t data ); void th_pin_w(int state); - uint32_t pixel_r(); protected: // device-level overrides @@ -73,7 +70,6 @@ protected: private: devcb_write_line m_th_pin_handler; - devcb_read32 m_pixel_handler; }; diff --git a/src/mame/drivers/sms.cpp b/src/mame/drivers/sms.cpp index 9b9852492c3..b3bb2a6e1b8 100644 --- a/src/mame/drivers/sms.cpp +++ b/src/mame/drivers/sms.cpp @@ -504,11 +504,9 @@ void sms_state::sms_base(machine_config &config) SMS_CONTROL_PORT(config, m_port_ctrl1, sms_control_port_devices, "joypad"); m_port_ctrl1->th_input_handler().set(FUNC(sms_state::sms_ctrl1_th_input)); - m_port_ctrl1->pixel_handler().set(FUNC(sms_state::sms_pixel_color)); SMS_CONTROL_PORT(config, m_port_ctrl2, sms_control_port_devices, "joypad"); m_port_ctrl2->th_input_handler().set(FUNC(sms_state::sms_ctrl2_th_input)); - m_port_ctrl2->pixel_handler().set(FUNC(sms_state::sms_pixel_color)); } void sms_state::sms_ntsc_base(machine_config &config) @@ -977,8 +975,6 @@ MACHINE_CONFIG_START(sms_state::gamegear) GG_EXT_PORT(config, m_port_gg_ext, gg_ext_port_devices, nullptr); m_port_gg_ext->th_input_handler().set(FUNC(sms_state::gg_ext_th_input)); - // only for GG-TV mod (may be simulated with a driver modified with SMS screen settings) - //m_port_gg_ext->pixel_handler().set(FUNC(sms_state::sms_pixel_color)); m_is_gamegear = true; m_has_bios_0400 = true; diff --git a/src/mame/includes/sms.h b/src/mame/includes/sms.h index 65ddc9d3c9f..0a6dfd4c009 100644 --- a/src/mame/includes/sms.h +++ b/src/mame/includes/sms.h @@ -128,7 +128,6 @@ protected: DECLARE_WRITE_LINE_MEMBER(sms_ctrl1_th_input); DECLARE_WRITE_LINE_MEMBER(sms_ctrl2_th_input); DECLARE_WRITE_LINE_MEMBER(gg_ext_th_input); - DECLARE_READ32_MEMBER(sms_pixel_color); DECLARE_VIDEO_START(gamegear); DECLARE_VIDEO_RESET(gamegear); diff --git a/src/mame/machine/sms.cpp b/src/mame/machine/sms.cpp index 4d506becd49..6f433f7145e 100644 --- a/src/mame/machine/sms.cpp +++ b/src/mame/machine/sms.cpp @@ -1260,16 +1260,6 @@ VIDEO_RESET_MEMBER(sms_state,sms1) } -READ32_MEMBER(sms_state::sms_pixel_color) -{ - bitmap_rgb32 &vdp_bitmap = m_vdp->get_bitmap(); - int beam_x = m_main_scr->hpos(); - int beam_y = m_main_scr->vpos(); - - return vdp_bitmap.pix32(beam_y, beam_x); -} - - WRITE_LINE_MEMBER(sms_state::screen_vblank_sms1) { // on falling edge |