mirror of
https://github.com/holub/mame
synced 2025-10-06 17:08:28 +03:00
Merge branch 'master' of https://github.com/mamedev/mame
This commit is contained in:
commit
9214a78d70
@ -8,6 +8,7 @@
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
|
#include "screen.h"
|
||||||
#include "ggext.h"
|
#include "ggext.h"
|
||||||
// slot devices
|
// slot devices
|
||||||
#include "smsctrladp.h"
|
#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) :
|
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_t(mconfig, GG_EXT_PORT, tag, owner, clock),
|
||||||
device_slot_interface(mconfig, *this),
|
device_slot_interface(mconfig, *this),
|
||||||
|
m_screen(*this, finder_base::DUMMY_TAG),
|
||||||
m_device(nullptr),
|
m_device(nullptr),
|
||||||
m_th_pin_handler(*this)
|
m_th_pin_handler(*this)
|
||||||
{
|
{
|
||||||
|
@ -65,6 +65,11 @@ public:
|
|||||||
|
|
||||||
void th_pin_w(int state);
|
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:
|
//protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
|
@ -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)
|
void sms_ctrl_adaptor_device::device_add_mconfig(machine_config &config)
|
||||||
{
|
{
|
||||||
SMS_CONTROL_PORT(config, m_subctrl_port, sms_control_port_devices, "joypad");
|
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));
|
m_subctrl_port->th_input_handler().set(FUNC(sms_ctrl_adaptor_device::th_pin_w));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
|
#include "screen.h"
|
||||||
#include "ctrl.h"
|
#include "ctrl.h"
|
||||||
// slot devices
|
// slot devices
|
||||||
#include "4score.h"
|
#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) :
|
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_t(mconfig, NES_CONTROL_PORT, tag, owner, clock),
|
||||||
device_slot_interface(mconfig, *this),
|
device_slot_interface(mconfig, *this),
|
||||||
|
m_screen(*this, finder_base::DUMMY_TAG),
|
||||||
m_device(nullptr)
|
m_device(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -67,10 +67,16 @@ public:
|
|||||||
uint8_t read_bit34();
|
uint8_t read_bit34();
|
||||||
uint8_t read_exp(offs_t offset);
|
uint8_t read_exp(offs_t offset);
|
||||||
void write(uint8_t data);
|
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:
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
|
|
||||||
|
// devices
|
||||||
device_nes_control_port_interface *m_device;
|
device_nes_control_port_interface *m_device;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -61,16 +61,22 @@ static void hori_adapter(device_slot_interface &device)
|
|||||||
|
|
||||||
void nes_horitwin_device::device_add_mconfig(machine_config &config)
|
void nes_horitwin_device::device_add_mconfig(machine_config &config)
|
||||||
{
|
{
|
||||||
NES_CONTROL_PORT(config, "port1", hori_adapter, "joypad");
|
NES_CONTROL_PORT(config, m_port1, hori_adapter, "joypad");
|
||||||
NES_CONTROL_PORT(config, "port2", 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)
|
void nes_hori4p_device::device_add_mconfig(machine_config &config)
|
||||||
{
|
{
|
||||||
NES_CONTROL_PORT(config, "port1", hori_adapter, "joypad");
|
NES_CONTROL_PORT(config, m_port1, hori_adapter, "joypad");
|
||||||
NES_CONTROL_PORT(config, "port2", hori_adapter, "joypad");
|
NES_CONTROL_PORT(config, m_port2, hori_adapter, "joypad");
|
||||||
NES_CONTROL_PORT(config, "port3", hori_adapter, "joypad");
|
NES_CONTROL_PORT(config, m_port3, hori_adapter, "joypad");
|
||||||
NES_CONTROL_PORT(config, "port4", 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual void device_start() override { }
|
virtual void device_start() override { }
|
||||||
|
|
||||||
virtual void device_add_mconfig(machine_config &config) override;
|
virtual void device_add_mconfig(machine_config &config) override;
|
||||||
|
|
||||||
virtual uint8_t read_exp(offs_t offset) override;
|
virtual uint8_t read_exp(offs_t offset) override;
|
||||||
@ -53,9 +52,8 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual void device_start() override { }
|
virtual void device_start() override { }
|
||||||
|
|
||||||
virtual ioport_constructor device_input_ports() const override;
|
|
||||||
virtual void device_add_mconfig(machine_config &config) 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 uint8_t read_exp(offs_t offset) override;
|
||||||
virtual void write(uint8_t data) override;
|
virtual void write(uint8_t data) override;
|
||||||
|
@ -174,7 +174,8 @@ static void arcstick_daisy(device_slot_interface &device)
|
|||||||
void nes_arcstick_device::device_add_mconfig(machine_config &config)
|
void nes_arcstick_device::device_add_mconfig(machine_config &config)
|
||||||
{
|
{
|
||||||
// expansion port to allow daisy chaining
|
// 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "zapper.h"
|
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
|
#include "zapper.h"
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
// DEVICE DEFINITIONS
|
// 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) :
|
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_t(mconfig, NES_ZAPPER, tag, owner, clock),
|
||||||
device_video_interface(mconfig, *this),
|
|
||||||
device_nes_control_port_interface(mconfig, *this),
|
device_nes_control_port_interface(mconfig, *this),
|
||||||
m_lightx(*this, "ZAPPER_X"),
|
m_lightx(*this, "ZAPPER_X"),
|
||||||
m_lighty(*this, "ZAPPER_Y"),
|
m_lighty(*this, "ZAPPER_Y"),
|
||||||
@ -86,17 +85,17 @@ uint8_t nes_zapper_device::read_bit34()
|
|||||||
int y = m_lighty->read();
|
int y = m_lighty->read();
|
||||||
|
|
||||||
// update the screen if necessary
|
// update the screen if necessary
|
||||||
if (!screen().vblank())
|
if (!m_port->m_screen->vblank())
|
||||||
{
|
{
|
||||||
int vpos = screen().vpos();
|
int vpos = m_port->m_screen->vpos();
|
||||||
int hpos = screen().hpos();
|
int hpos = m_port->m_screen->hpos();
|
||||||
|
|
||||||
if (vpos > y || (vpos == y && hpos >= x))
|
if (vpos > y || (vpos == y && hpos >= x))
|
||||||
screen().update_now();
|
m_port->m_screen->update_now();
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the pixel at the gun position
|
// 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
|
// check if the cursor is over a bright pixel
|
||||||
// FIXME: still a gross hack
|
// FIXME: still a gross hack
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
// ======================> nes_zapper_device
|
// ======================> nes_zapper_device
|
||||||
|
|
||||||
class nes_zapper_device : public device_t,
|
class nes_zapper_device : public device_t,
|
||||||
public device_video_interface,
|
|
||||||
public device_nes_control_port_interface
|
public device_nes_control_port_interface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -19,9 +19,8 @@ Notes:
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "lphaser.h"
|
|
||||||
|
|
||||||
#include "screen.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) :
|
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_t(mconfig, SMS_LIGHT_PHASER, tag, owner, clock),
|
||||||
device_video_interface(mconfig, *this),
|
|
||||||
device_sms_control_port_interface(mconfig, *this),
|
device_sms_control_port_interface(mconfig, *this),
|
||||||
m_lphaser_pins(*this, "CTRL_PORT"),
|
m_lphaser_pins(*this, "CTRL_PORT"),
|
||||||
m_lphaser_x(*this, "LPHASER_X"),
|
m_lphaser_x(*this, "LPHASER_X"),
|
||||||
m_lphaser_y(*this, "LPHASER_Y"), m_sensor_last_state(0), m_lphaser_timer(nullptr)
|
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 )
|
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 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;
|
rectangle aim_area;
|
||||||
int beam_x = screen().hpos();
|
int beam_x = m_port->m_screen->hpos();
|
||||||
int beam_y = screen().vpos();
|
int beam_y = m_port->m_screen->vpos();
|
||||||
int beam_x_orig = beam_x;
|
int beam_x_orig = beam_x;
|
||||||
int beam_y_orig = beam_y;
|
int beam_y_orig = beam_y;
|
||||||
int dy, result = 1;
|
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 */
|
/* brightness of the lightgray color in the frame drawn by Light Phaser games */
|
||||||
const uint8_t sensor_min_brightness = 0x7f;
|
const uint8_t sensor_min_brightness = 0x7f;
|
||||||
|
|
||||||
screen().update_now();
|
m_port->m_screen->update_now();
|
||||||
color = screen().pixel(beam_x, beam_y);
|
color = m_port->m_screen->pixel(beam_x, beam_y);
|
||||||
|
|
||||||
/* reference: http://www.w3.org/TR/AERT#color-contrast */
|
/* reference: http://www.w3.org/TR/AERT#color-contrast */
|
||||||
brightness = (color.r() * 0.299) + (color.g() * 0.587) + (color.b() * 0.114);
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint16_t sms_light_phaser_device::screen_hpos_nonscaled(int scaled_hpos)
|
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;
|
int offset_x = (scaled_hpos * (visarea.max_x - visarea.min_x)) / 255;
|
||||||
return visarea.min_x + offset_x;
|
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)
|
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;
|
int offset_y = (scaled_vpos * (visarea.max_y - visarea.min_y)) / 255;
|
||||||
return visarea.min_y + offset_y;
|
return visarea.min_y + offset_y;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
// ======================> sms_light_phaser_device
|
// ======================> sms_light_phaser_device
|
||||||
|
|
||||||
class sms_light_phaser_device : public device_t,
|
class sms_light_phaser_device : public device_t,
|
||||||
public device_video_interface,
|
|
||||||
public device_sms_control_port_interface
|
public device_sms_control_port_interface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -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_subctrl2_port, sms_control_port_devices, "joypad");
|
||||||
SMS_CONTROL_PORT(config, m_subctrl3_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");
|
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);
|
||||||
}
|
}
|
||||||
|
@ -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)
|
void sms_rapid_fire_device::device_add_mconfig(machine_config &config)
|
||||||
{
|
{
|
||||||
SMS_CONTROL_PORT(config, m_subctrl_port, sms_control_port_devices, "joypad");
|
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));
|
m_subctrl_port->th_input_handler().set(FUNC(sms_rapid_fire_device::th_pin_w));
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
|
#include "screen.h"
|
||||||
#include "smsctrl.h"
|
#include "smsctrl.h"
|
||||||
|
|
||||||
// slot devices
|
// 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) :
|
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_t(mconfig, SMS_CONTROL_PORT, tag, owner, clock),
|
||||||
device_slot_interface(mconfig, *this),
|
device_slot_interface(mconfig, *this),
|
||||||
|
m_screen(*this, finder_base::DUMMY_TAG),
|
||||||
m_device(nullptr),
|
m_device(nullptr),
|
||||||
m_th_pin_handler(*this)
|
m_th_pin_handler(*this)
|
||||||
{
|
{
|
||||||
|
@ -62,6 +62,11 @@ public:
|
|||||||
|
|
||||||
void th_pin_w(int state);
|
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:
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
|
@ -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_ctrl1, nes_control_port1_devices, "joypad");
|
||||||
NES_CONTROL_PORT(config, m_ctrl2, nes_control_port2_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);
|
NES_CART_SLOT(config, m_cartslot, NTSC_APU_CLOCK, nes_cart, nullptr);
|
||||||
SOFTWARE_LIST(config, "cart_list").set_original("nes");
|
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_ctrl1, fc_control_port1_devices, "joypad");
|
||||||
NES_CONTROL_PORT(config.replace(), m_ctrl2, fc_control_port2_devices, "joypad");
|
NES_CONTROL_PORT(config.replace(), m_ctrl2, fc_control_port2_devices, "joypad");
|
||||||
NES_CONTROL_PORT(config, m_exp, fc_expansion_devices, nullptr);
|
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, "flop_list").set_original("famicom_flop");
|
||||||
SOFTWARE_LIST(config, "cass_list").set_original("famicom_cass");
|
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_ctrl1, fc_control_port1_devices, "joypad");
|
||||||
NES_CONTROL_PORT(config.replace(), m_ctrl2, fc_control_port2_devices, "joypad");
|
NES_CONTROL_PORT(config.replace(), m_ctrl2, fc_control_port2_devices, "joypad");
|
||||||
NES_CONTROL_PORT(config, m_exp, fc_expansion_devices, nullptr);
|
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");
|
SOFTWARE_LIST(config, "cass_list").set_original("famicom_cass");
|
||||||
}
|
}
|
||||||
|
@ -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_ctrl1, nes_control_port1_devices, "joypad");
|
||||||
NES_CONTROL_PORT(config, m_ctrl2, nes_control_port2_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)
|
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_ctrl1, majesco_control_port1_devices, "ddr");
|
||||||
NES_CONTROL_PORT(config, m_ctrl2, majesco_control_port2_devices, nullptr);
|
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)
|
void nes_vt_state::nes_vt_hum(machine_config &config)
|
||||||
|
@ -673,6 +673,12 @@ void playch10_state::playch10(machine_config &config)
|
|||||||
PALETTE(config, "palette", FUNC(playch10_state::playch10_palette), 256);
|
PALETTE(config, "palette", FUNC(playch10_state::playch10_palette), 256);
|
||||||
config.set_default_layout(layout_playch10);
|
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));
|
screen_device &top(SCREEN(config, "top", SCREEN_TYPE_RASTER));
|
||||||
top.set_refresh_hz(60);
|
top.set_refresh_hz(60);
|
||||||
top.set_size(32*8, 262);
|
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.set_screen_update(FUNC(playch10_state::screen_update_playch10_top));
|
||||||
top.screen_vblank().set(FUNC(playch10_state::vblank_irq));
|
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);
|
PPU_2C03B(config, m_ppu, 0);
|
||||||
m_ppu->set_screen("bottom");
|
m_ppu->set_screen("bottom");
|
||||||
m_ppu->set_cpu_tag("cart");
|
m_ppu->set_cpu_tag("cart");
|
||||||
|
@ -502,9 +502,11 @@ void sms_state::sms_base(machine_config &config)
|
|||||||
SOFTWARE_LIST(config, "cart_list").set_original("sms");
|
SOFTWARE_LIST(config, "cart_list").set_original("sms");
|
||||||
|
|
||||||
SMS_CONTROL_PORT(config, m_port_ctrl1, sms_control_port_devices, "joypad");
|
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));
|
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");
|
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));
|
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");
|
SOFTWARE_LIST(config, "cart_list").set_original("gamegear");
|
||||||
|
|
||||||
GG_EXT_PORT(config, m_port_gg_ext, gg_ext_port_devices, nullptr);
|
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_port_gg_ext->th_input_handler().set(FUNC(sms_state::gg_ext_th_input));
|
||||||
|
|
||||||
m_is_gamegear = true;
|
m_is_gamegear = true;
|
||||||
|
@ -127,9 +127,9 @@ uint32_t playch10_state::screen_update_playch10_top(screen_device &screen, bitma
|
|||||||
if (m_pc10_bios != 1)
|
if (m_pc10_bios != 1)
|
||||||
return screen_update_playch10_single(screen, bitmap, cliprect);
|
return screen_update_playch10_single(screen, bitmap, cliprect);
|
||||||
|
|
||||||
if (!m_pc10_dispmask)
|
/* When the bios is accessing vram, the video circuitry can't access it */
|
||||||
/* render the ppu */
|
if (!m_pc10_sdcs)
|
||||||
m_ppu->render(bitmap, 0, 0, 0, 0, cliprect);
|
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
||||||
else
|
else
|
||||||
bitmap.fill(0, cliprect);
|
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)
|
if (m_pc10_bios != 1)
|
||||||
return screen_update_playch10_single(screen, bitmap, cliprect);
|
return screen_update_playch10_single(screen, bitmap, cliprect);
|
||||||
|
|
||||||
/* When the bios is accessing vram, the video circuitry can't access it */
|
if (!m_pc10_dispmask)
|
||||||
if (!m_pc10_sdcs)
|
/* render the ppu */
|
||||||
m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0);
|
m_ppu->render(bitmap, 0, 0, 0, 0, cliprect);
|
||||||
else
|
else
|
||||||
bitmap.fill(0, cliprect);
|
bitmap.fill(0, cliprect);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user