neogeo: reworked inputs to work through the slot device interface.

you can now configure the controllers available in the multicart
driver (neogeo) with the -crtl1 and -ctrl2 options. when you run single
game drivers (e.g. mslug, or kof94, etc.), instead, a unique controller
is available and cannot be modified. [Fabio Priuli]
This commit is contained in:
etabeta78 2016-04-14 18:36:34 +02:00
parent 99aa7eacd7
commit 8a9e872224
15 changed files with 630 additions and 362 deletions

View File

@ -1962,6 +1962,10 @@ if (BUSES["NEOGEO_CTRL"]~=null) then
MAME_DIR .. "src/devices/bus/neogeo_ctrl/joystick.h",
MAME_DIR .. "src/devices/bus/neogeo_ctrl/mahjong.cpp",
MAME_DIR .. "src/devices/bus/neogeo_ctrl/mahjong.h",
MAME_DIR .. "src/devices/bus/neogeo_ctrl/dial.cpp",
MAME_DIR .. "src/devices/bus/neogeo_ctrl/dial.h",
MAME_DIR .. "src/devices/bus/neogeo_ctrl/kizuna4p.cpp",
MAME_DIR .. "src/devices/bus/neogeo_ctrl/kizuna4p.h",
}
end

View File

@ -10,6 +10,8 @@
// slot devices
#include "joystick.h"
#include "mahjong.h"
#include "dial.h"
#include "kizuna4p.h"
//**************************************************************************
@ -106,7 +108,16 @@ void neogeo_control_port_device::write_ctrlsel(UINT8 data)
//-------------------------------------------------
SLOT_INTERFACE_START( neogeo_controls )
SLOT_INTERFACE("joy", NEOGEO_JOYSTICK)
SLOT_INTERFACE("joy", NEOGEO_JOY)
SLOT_INTERFACE("mahjong", NEOGEO_MJCTRL)
SLOT_INTERFACE_END
SLOT_INTERFACE_START( neogeo_arc_ctrls )
SLOT_INTERFACE("joy", NEOGEO_JOY_AC)
SLOT_INTERFACE("mahjong", NEOGEO_MJCTRL_AC)
SLOT_INTERFACE("dial", NEOGEO_DIAL)
SLOT_INTERFACE_END
SLOT_INTERFACE_START( neogeo_kiz4p )
SLOT_INTERFACE("kiz4p", NEOGEO_KIZ4P)
SLOT_INTERFACE_END

View File

@ -68,13 +68,15 @@ extern const device_type NEOGEO_CONTROL_PORT;
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_NEOGEO_CONTROL_PORT_ADD(_tag, _slot_intf, _def_slot) \
#define MCFG_NEOGEO_CONTROL_PORT_ADD(_tag, _slot_intf, _def_slot, _fixed) \
MCFG_DEVICE_ADD(_tag, NEOGEO_CONTROL_PORT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, _fixed)
SLOT_INTERFACE_EXTERN( neogeo_controls );
SLOT_INTERFACE_EXTERN( neogeo_arc_ctrls );
SLOT_INTERFACE_EXTERN( neogeo_kiz4p );
#endif

View File

@ -0,0 +1,103 @@
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli
/**********************************************************************
SNK Neo Geo Dial Controller emulation
**********************************************************************/
#include "dial.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type NEOGEO_DIAL = &device_creator<neogeo_dial_device>;
static INPUT_PORTS_START( neogeo_dial )
PORT_START("JOY")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x90, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* note it needs it from 0x80 when using paddle */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_START("DIAL")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(20)
INPUT_PORTS_END
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor neogeo_dial_device::device_input_ports() const
{
return INPUT_PORTS_NAME( neogeo_dial );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// neogeo_dial_device - constructor
//-------------------------------------------------
neogeo_dial_device::neogeo_dial_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NEOGEO_DIAL, "SNK Neo Geo Dial Controller", tag, owner, clock, "neogeo_dial", __FILE__),
device_neogeo_control_port_interface(mconfig, *this),
m_joy(*this, "JOY"),
m_dial(*this, "DIAL")
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void neogeo_dial_device::device_start()
{
save_item(NAME(m_ctrl_sel));
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void neogeo_dial_device::device_reset()
{
m_ctrl_sel = 0;
}
//-------------------------------------------------
// read_ctrl
//-------------------------------------------------
UINT8 neogeo_dial_device::read_ctrl()
{
UINT8 res = 0;
if (m_ctrl_sel & 0x01)
res = m_joy->read();
else
res = m_dial->read();
return res;
}
//-------------------------------------------------
// write_ctrlsel
//-------------------------------------------------
void neogeo_dial_device::write_ctrlsel(UINT8 data)
{
m_ctrl_sel = data;
}

View File

@ -0,0 +1,55 @@
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli
/**********************************************************************
SNK Neo Geo Dial controller emulation
**********************************************************************/
#pragma once
#ifndef __NEOGEO_DIAL__
#define __NEOGEO_DIAL__
#include "emu.h"
#include "ctrl.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> neogeo_dial_device
class neogeo_dial_device : public device_t,
public device_neogeo_control_port_interface
{
public:
// construction/destruction
neogeo_dial_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
// device_neogeo_control_port_interface overrides
virtual UINT8 read_ctrl() override;
virtual void write_ctrlsel(UINT8 data) override;
private:
required_ioport m_joy;
required_ioport m_dial;
UINT8 m_ctrl_sel;
};
// device type definition
extern const device_type NEOGEO_DIAL;
#endif

View File

@ -12,10 +12,11 @@
// DEVICE DEFINITIONS
//**************************************************************************
const device_type NEOGEO_JOYSTICK = &device_creator<neogeo_joystick_device>;
const device_type NEOGEO_JOY_AC = &device_creator<neogeo_joy_ac_device>;
const device_type NEOGEO_JOY = &device_creator<neogeo_joystick_device>;
static INPUT_PORTS_START( neogeo_joy )
static INPUT_PORTS_START( neogeo_joy_ac )
PORT_START("JOY")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
@ -25,6 +26,11 @@ static INPUT_PORTS_START( neogeo_joy )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 )
INPUT_PORTS_END
static INPUT_PORTS_START( neogeo_joy )
PORT_INCLUDE( neogeo_joy_ac )
PORT_START("START_SELECT")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START )
@ -36,25 +42,41 @@ INPUT_PORTS_END
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor neogeo_joy_ac_device::device_input_ports() const
{
return INPUT_PORTS_NAME( neogeo_joy_ac );
}
ioport_constructor neogeo_joystick_device::device_input_ports() const
{
return INPUT_PORTS_NAME( neogeo_joy );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// neogeo_joystick_device - constructor
// neogeo_joy_ac_device / neogeo_joystick_device - constructor
//-------------------------------------------------
neogeo_joystick_device::neogeo_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NEOGEO_JOYSTICK, "SNK Neo Geo Joystick", tag, owner, clock, "neogeo_joy", __FILE__),
neogeo_joy_ac_device::neogeo_joy_ac_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source):
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_neogeo_control_port_interface(mconfig, *this),
m_joy(*this, "JOY"),
m_joy(*this, "JOY")
{
}
neogeo_joy_ac_device::neogeo_joy_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NEOGEO_JOY_AC, "SNK Neo Geo Arcade Joystick", tag, owner, clock, "neogeo_joyac", __FILE__),
device_neogeo_control_port_interface(mconfig, *this),
m_joy(*this, "JOY")
{
}
neogeo_joystick_device::neogeo_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
neogeo_joy_ac_device(mconfig, NEOGEO_JOY, "SNK Neo Geo Joystick", tag, owner, clock, "neogeo_joy", __FILE__),
m_ss(*this, "START_SELECT")
{
}
@ -64,7 +86,7 @@ neogeo_joystick_device::neogeo_joystick_device(const machine_config &mconfig, co
// device_start - device-specific startup
//-------------------------------------------------
void neogeo_joystick_device::device_start()
void neogeo_joy_ac_device::device_start()
{
}
@ -73,7 +95,7 @@ void neogeo_joystick_device::device_start()
// device_reset - device-specific reset
//-------------------------------------------------
void neogeo_joystick_device::device_reset()
void neogeo_joy_ac_device::device_reset()
{
}
@ -82,7 +104,7 @@ void neogeo_joystick_device::device_reset()
// read_ctrl
//-------------------------------------------------
UINT8 neogeo_joystick_device::read_ctrl()
UINT8 neogeo_joy_ac_device::read_ctrl()
{
return m_joy->read();
}

View File

@ -19,40 +19,14 @@
// TYPE DEFINITIONS
//**************************************************************************
// ======================> neogeo_joystick_device
class neogeo_joystick_device : public device_t,
public device_neogeo_control_port_interface
{
public:
// construction/destruction
neogeo_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
// device_intv_control_port_interface overrides
virtual UINT8 read_ctrl() override;
virtual UINT8 read_start_sel() override;
private:
required_ioport m_joy;
required_ioport m_ss;
};
// ======================> neogeo_joy_ac_device
class neogeo_joy_ac_device : public device_t,
public device_neogeo_control_port_interface
public device_neogeo_control_port_interface
{
public:
// construction/destruction
neogeo_joy_ac_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
neogeo_joy_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
@ -63,17 +37,37 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
// device_intv_control_port_interface overrides
// device_neogeo_control_port_interface overrides
virtual UINT8 read_ctrl() override;
private:
required_ioport m_joy;
};
// ======================> neogeo_joystick_device
class neogeo_joystick_device : public neogeo_joy_ac_device
{
public:
// construction/destruction
neogeo_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
protected:
// device_neogeo_control_port_interface overrides
virtual UINT8 read_start_sel() override;
private:
required_ioport m_ss;
};
// device type definition
extern const device_type NEOGEO_JOYSTICK;
extern const device_type NEOGEO_JOY_AC;
extern const device_type NEOGEO_JOY;
#endif

View File

@ -0,0 +1,129 @@
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli
/**********************************************************************
SNK Neo Geo Kizuna 4Players Controller emulation
**********************************************************************/
#include "kizuna4p.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type NEOGEO_KIZ4P = &device_creator<neogeo_kizuna4p_device>;
static INPUT_PORTS_START( neogeo_kiz4p )
PORT_START("JOY1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Joy A - Up") PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Joy A - Down") PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("Joy A - Left") PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("Joy A - Right") PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Joy A - Button A") PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Joy A - Button B") PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Joy A - Button C") PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Joy A - Button D") PORT_PLAYER(1)
PORT_START("JOY2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Joy B - Up") PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Joy B - Down") PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("Joy B - Left") PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("Joy B - Right") PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Joy B - Button A") PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Joy B - Button B") PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Joy B - Button C") PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Joy B - Button D") PORT_PLAYER(2)
PORT_START("START")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
INPUT_PORTS_END
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor neogeo_kizuna4p_device::device_input_ports() const
{
return INPUT_PORTS_NAME( neogeo_kiz4p );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// neogeo_kizuna4p_device - constructor
//-------------------------------------------------
neogeo_kizuna4p_device::neogeo_kizuna4p_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NEOGEO_KIZ4P, "SNK Neo Geo Kizuna 4P Controller", tag, owner, clock, "neogeo_kiz4p", __FILE__),
device_neogeo_control_port_interface(mconfig, *this),
m_joy1(*this, "JOY1"),
m_joy2(*this, "JOY2"),
m_ss(*this, "START")
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void neogeo_kizuna4p_device::device_start()
{
save_item(NAME(m_ctrl_sel));
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void neogeo_kizuna4p_device::device_reset()
{
m_ctrl_sel = 0;
}
//-------------------------------------------------
// read_ctrl
//-------------------------------------------------
UINT8 neogeo_kizuna4p_device::read_ctrl()
{
UINT8 res = 0;
if (m_ctrl_sel & 0x01)
res = m_joy2->read();
else
res = m_joy1->read();
if (m_ctrl_sel & 0x04) res &= ((m_ctrl_sel & 0x01) ? ~0x20 : ~0x10);
return res;
}
//-------------------------------------------------
// read_start_sel
//-------------------------------------------------
UINT8 neogeo_kizuna4p_device::read_start_sel()
{
return BIT(m_ss->read(), m_ctrl_sel & 0x01);
}
//-------------------------------------------------
// write_ctrlsel
//-------------------------------------------------
void neogeo_kizuna4p_device::write_ctrlsel(UINT8 data)
{
m_ctrl_sel = data;
}

View File

@ -0,0 +1,57 @@
// license:BSD-3-Clause
// copyright-holders:Fabio Priuli
/**********************************************************************
SNK Neo Geo Kizuna 4Players controller emulation
**********************************************************************/
#pragma once
#ifndef __NEOGEO_KIZ4P__
#define __NEOGEO_KIZ4P__
#include "emu.h"
#include "ctrl.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> neogeo_kizuna4p_device
class neogeo_kizuna4p_device : public device_t,
public device_neogeo_control_port_interface
{
public:
// construction/destruction
neogeo_kizuna4p_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
// device_neogeo_control_port_interface overrides
virtual UINT8 read_ctrl() override;
virtual UINT8 read_start_sel() override;
virtual void write_ctrlsel(UINT8 data) override;
private:
required_ioport m_joy1;
required_ioport m_joy2;
required_ioport m_ss;
UINT8 m_ctrl_sel;
};
// device type definition
extern const device_type NEOGEO_KIZ4P;
#endif

View File

@ -12,10 +12,11 @@
// DEVICE DEFINITIONS
//**************************************************************************
const device_type NEOGEO_MJCTRL = &device_creator<neogeo_mjctrl_device>;
const device_type NEOGEO_MJCTRL_AC = &device_creator<neogeo_mjctrl_ac_device>;
const device_type NEOGEO_MJCTRL = &device_creator<neogeo_mjctrl_device>;
static INPUT_PORTS_START( neogeo_joy )
static INPUT_PORTS_START( neogeo_mj_ac )
PORT_START("MJ.0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_B )
@ -56,6 +57,11 @@ static INPUT_PORTS_START( neogeo_joy )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
static INPUT_PORTS_START( neogeo_mj )
PORT_INCLUDE( neogeo_mj_ac )
PORT_START("START_SELECT")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START )
@ -67,9 +73,14 @@ INPUT_PORTS_END
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor neogeo_mjctrl_ac_device::device_input_ports() const
{
return INPUT_PORTS_NAME( neogeo_mj_ac );
}
ioport_constructor neogeo_mjctrl_device::device_input_ports() const
{
return INPUT_PORTS_NAME( neogeo_joy );
return INPUT_PORTS_NAME( neogeo_mj );
}
@ -82,10 +93,22 @@ ioport_constructor neogeo_mjctrl_device::device_input_ports() const
// neogeo_joystick_device - constructor
//-------------------------------------------------
neogeo_mjctrl_ac_device::neogeo_mjctrl_ac_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source):
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_neogeo_control_port_interface(mconfig, *this),
m_mjpanel(*this, "MJ")
{
}
neogeo_mjctrl_ac_device::neogeo_mjctrl_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NEOGEO_MJCTRL_AC, "SNK Neo Geo Arcade Mahjong panel", tag, owner, clock, "neogeo_mjac", __FILE__),
device_neogeo_control_port_interface(mconfig, *this),
m_mjpanel(*this, "MJ")
{
}
neogeo_mjctrl_device::neogeo_mjctrl_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NEOGEO_MJCTRL, "SNK Neo Geo Mahjong controller", tag, owner, clock, "neogeo_mjctrl", __FILE__),
device_neogeo_control_port_interface(mconfig, *this),
m_mjpanel(*this, "MJ"),
neogeo_mjctrl_ac_device(mconfig, NEOGEO_MJCTRL, "SNK Neo Geo Mahjong controller", tag, owner, clock, "neogeo_mjctrl", __FILE__),
m_ss(*this, "START_SELECT")
{
}
@ -95,7 +118,7 @@ neogeo_mjctrl_device::neogeo_mjctrl_device(const machine_config &mconfig, const
// device_start - device-specific startup
//-------------------------------------------------
void neogeo_mjctrl_device::device_start()
void neogeo_mjctrl_ac_device::device_start()
{
save_item(NAME(m_ctrl_sel));
}
@ -105,7 +128,7 @@ void neogeo_mjctrl_device::device_start()
// device_reset - device-specific reset
//-------------------------------------------------
void neogeo_mjctrl_device::device_reset()
void neogeo_mjctrl_ac_device::device_reset()
{
m_ctrl_sel = 0;
}
@ -115,7 +138,7 @@ void neogeo_mjctrl_device::device_reset()
// read_ctrl
//-------------------------------------------------
UINT8 neogeo_mjctrl_device::read_ctrl()
UINT8 neogeo_mjctrl_ac_device::read_ctrl()
{
UINT8 res = 0;
switch (m_ctrl_sel)
@ -131,6 +154,15 @@ UINT8 neogeo_mjctrl_device::read_ctrl()
return res;
}
//-------------------------------------------------
// write_ctrlsel
//-------------------------------------------------
void neogeo_mjctrl_ac_device::write_ctrlsel(UINT8 data)
{
m_ctrl_sel = data;
}
//-------------------------------------------------
// read_start_sel
//-------------------------------------------------
@ -140,12 +172,3 @@ UINT8 neogeo_mjctrl_device::read_start_sel()
return m_ss->read();
}
//-------------------------------------------------
// write_ctrlsel
//-------------------------------------------------
void neogeo_mjctrl_device::write_ctrlsel(UINT8 data)
{
m_ctrl_sel = data;
}

View File

@ -19,10 +19,36 @@
// TYPE DEFINITIONS
//**************************************************************************
// ======================> neogeo_mjctrl_ac_device
class neogeo_mjctrl_ac_device : public device_t,
public device_neogeo_control_port_interface
{
public:
// construction/destruction
neogeo_mjctrl_ac_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
neogeo_mjctrl_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual ioport_constructor device_input_ports() const override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
// device_neogeo_control_port_interface overrides
virtual UINT8 read_ctrl() override;
virtual void write_ctrlsel(UINT8 data) override;
private:
required_ioport_array<4> m_mjpanel;
UINT8 m_ctrl_sel;
};
// ======================> neogeo_mjctrl_device
class neogeo_mjctrl_device : public device_t,
public device_neogeo_control_port_interface
class neogeo_mjctrl_device : public neogeo_mjctrl_ac_device
{
public:
// construction/destruction
@ -32,24 +58,18 @@ public:
virtual ioport_constructor device_input_ports() const override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
// device_intv_control_port_interface overrides
virtual UINT8 read_ctrl() override;
// device_neogeo_control_port_interface overrides
virtual UINT8 read_start_sel() override;
virtual void write_ctrlsel(UINT8 data) override;
private:
required_ioport_array<4> m_mjpanel;
required_ioport m_ss;
UINT8 m_ctrl_sel;
};
// device type definition
extern const device_type NEOGEO_MJCTRL;
extern const device_type NEOGEO_MJCTRL_AC;
#endif

View File

@ -631,76 +631,30 @@ WRITE8_MEMBER(neogeo_state::audio_cpu_enable_nmi_w)
*
*************************************/
void neogeo_state::select_controller( UINT8 data )
READ16_MEMBER(neogeo_state::in0_r)
{
m_controller_select = data;
return (m_ctrl1->ctrl_r(space, offset) << 8) | m_dsw->read();
}
CUSTOM_INPUT_MEMBER(neogeo_state::multiplexed_controller_r)
READ16_MEMBER(neogeo_state::irrmaze_in0_r)
{
int port = (FPTR)param;
static const char *const cntrl[2][2] =
{
{ "IN0-0", "IN0-1" }, { "IN1-0", "IN1-1" }
};
return read_safe(ioport(cntrl[port][m_controller_select & 0x01]), 0x00);
}
CUSTOM_INPUT_MEMBER(neogeo_state::kizuna4p_controller_r)
{
int port = (FPTR)param;
static const char *const cntrl[2][2] =
{
{ "IN0-0", "IN0-1" }, { "IN1-0", "IN1-1" }
};
int ret = read_safe(ioport(cntrl[port][m_controller_select & 0x01]), 0x00);
if (m_controller_select & 0x04) ret &= ((m_controller_select & 0x01) ? ~0x20 : ~0x10);
return ret;
UINT8 track_ipt = (m_controller_select & 0x01) ? m_tracky->read() : m_trackx->read();
return (track_ipt << 8) | m_dsw->read();
}
CUSTOM_INPUT_MEMBER(neogeo_state::kizuna4p_start_r)
{
return (ioport("START")->read() >> (m_controller_select & 0x01)) | ~0x05;
return (m_ctrl1->read_start_sel()) | (m_ctrl2->read_start_sel() << 2) | ~0x05;
}
#if 1 // this needs to be added dynamically somehow
CUSTOM_INPUT_MEMBER(neogeo_state::mahjong_controller_r)
{
UINT32 ret;
/*
cpu #0 (PC=00C18B9A): unmapped memory word write to 00380000 = 0012 & 00FF
cpu #0 (PC=00C18BB6): unmapped memory word write to 00380000 = 001B & 00FF
cpu #0 (PC=00C18D54): unmapped memory word write to 00380000 = 0024 & 00FF
cpu #0 (PC=00C18D6C): unmapped memory word write to 00380000 = 0009 & 00FF
cpu #0 (PC=00C18C40): unmapped memory word write to 00380000 = 0000 & 00FF
*/
switch (m_controller_select)
{
default:
case 0x00: ret = 0x0000; break; /* nothing? */
case 0x09: ret = ioport("MAHJONG1")->read(); break;
case 0x12: ret = ioport("MAHJONG2")->read(); break;
case 0x1b: ret = ioport("MAHJONG3")->read(); break; /* player 1 normal inputs? */
case 0x24: ret = ioport("MAHJONG4")->read(); break;
}
return ret;
}
#endif
WRITE8_MEMBER(neogeo_state::io_control_w)
{
switch (offset)
{
case 0x00:
select_controller(data);
m_controller_select = data;
if (m_ctrl1) m_ctrl1->write_ctrlsel(data);
if (m_ctrl2) m_ctrl2->write_ctrlsel(data);
break;
case 0x10:
@ -1068,6 +1022,10 @@ DRIVER_INIT_MEMBER(neogeo_state,neogeo)
if (!m_cartslots[0]) m_banked_cart->install_banks(machine(), m_maincpu, m_region_maincpu->base(), m_region_maincpu->bytes());
m_sprgen->m_fixed_layer_bank_type = 0;
// install controllers
m_maincpu->space(AS_PROGRAM).install_read_handler(0x300000, 0x300001, 0, 0x01ff7e, read16_delegate(FUNC(neogeo_state::in0_r), this));
m_maincpu->space(AS_PROGRAM).install_read_handler(0x340000, 0x340001, 0, 0x01fffe, read8_delegate(FUNC(neogeo_control_port_device::ctrl_r),(neogeo_control_port_device*)m_ctrl2), 0xff00);
}
@ -1274,11 +1232,9 @@ ADDRESS_MAP_START( neogeo_main_map, AS_PROGRAM, 16, neogeo_state )
AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x0f0000) AM_RAM
/* some games have protection devices in the 0x200000 region, it appears to map to cart space, not surprising, the ROM is read here too */
AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01ff7e) AM_READ_PORT("P1/DSW")
AM_RANGE(0x300080, 0x300081) AM_MIRROR(0x01ff7e) AM_READ_PORT("TEST")
AM_RANGE(0x300000, 0x300001) AM_MIRROR(0x01fffe) AM_WRITE8(watchdog_reset_w, 0x00ff)
AM_RANGE(0x320000, 0x320001) AM_MIRROR(0x01fffe) AM_READ_PORT("AUDIO/COIN") AM_WRITE8(audio_command_w, 0xff00)
AM_RANGE(0x340000, 0x340001) AM_MIRROR(0x01fffe) AM_READ_PORT("P2")
AM_RANGE(0x360000, 0x37ffff) AM_READ(neogeo_unmapped_r)
AM_RANGE(0x380000, 0x380001) AM_MIRROR(0x01fffe) AM_READ_PORT("SYSTEM")
AM_RANGE(0x380000, 0x38007f) AM_MIRROR(0x01ff80) AM_WRITE8(io_control_w, 0x00ff)
@ -1294,8 +1250,6 @@ ADDRESS_MAP_START( neogeo_main_map, AS_PROGRAM, 16, neogeo_state )
ADDRESS_MAP_END
static ADDRESS_MAP_START( main_map_slot, AS_PROGRAM, 16, neogeo_state )
AM_RANGE(0x000000, 0x00007f) AM_READ(neogeo_slot_rom_low_bectors_r)
AM_RANGE(0x000080, 0x0fffff) AM_READ(neogeo_slot_rom_low_r)
@ -1345,49 +1299,30 @@ ADDRESS_MAP_END
*************************************/
INPUT_PORTS_START( neogeo )
PORT_START("P1/DSW")
PORT_DIPNAME( 0x0001, 0x0001, "Setting Mode" ) PORT_DIPLOCATION("SW:1")
PORT_DIPSETTING( 0x0001, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x0002, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x0000, "VS Mode" )
PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Controller ) ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x0004, DEF_STR( Joystick ) )
PORT_DIPSETTING( 0x0000, "Mahjong Panel" )
PORT_DIPNAME( 0x0018, 0x0018, "COMM Setting (Cabinet No.)" ) PORT_DIPLOCATION("SW:4,5")
PORT_DIPSETTING( 0x0018, "1" )
PORT_DIPSETTING( 0x0010, "2" )
PORT_DIPSETTING( 0x0008, "3" )
PORT_DIPSETTING( 0x0000, "4" )
PORT_DIPNAME( 0x0020, 0x0020, "COMM Setting (Link Enable)" ) PORT_DIPLOCATION("SW:6")
PORT_DIPSETTING( 0x0020, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW:7")
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_DIPNAME( 0x0080, 0x0080, "Freeze" ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x0080, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 )
PORT_START("P2")
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x01, "Setting Mode" ) PORT_DIPLOCATION("SW:1")
PORT_DIPSETTING( 0x01, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x02, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x00, "VS Mode" )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Controller ) ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, DEF_STR( Joystick ) )
PORT_DIPSETTING( 0x00, "Mahjong Panel" )
PORT_DIPNAME( 0x18, 0x18, "COMM Setting (Cabinet No.)" ) PORT_DIPLOCATION("SW:4,5")
PORT_DIPSETTING( 0x18, "1" )
PORT_DIPSETTING( 0x10, "2" )
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x00, "4" )
PORT_DIPNAME( 0x20, 0x20, "COMM Setting (Link Enable)" ) PORT_DIPLOCATION("SW:6")
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) ) PORT_DIPLOCATION("SW:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_DIPNAME( 0x80, 0x80, "Freeze" ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("SYSTEM")
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
@ -1488,6 +1423,9 @@ static MACHINE_CONFIG_DERIVED( mvs, neogeo_arcade )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(main_map_slot)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl1", neogeo_arc_ctrls, "joy", false)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl2", neogeo_arc_ctrls, "joy", false)
MCFG_NEOGEO_CARTRIDGE_ADD("cartslot1", neogeo_cart, nullptr)
MCFG_NEOGEO_CARTRIDGE_ADD("cartslot2", neogeo_cart, nullptr)
MCFG_NEOGEO_CARTRIDGE_ADD("cartslot3", neogeo_cart, nullptr)
@ -1500,10 +1438,6 @@ MACHINE_CONFIG_END
/* dummy entry for the dummy bios driver */
ROM_START( neogeo )
NEOGEO_BIOS

View File

@ -23,6 +23,9 @@ static MACHINE_CONFIG_DERIVED_CLASS( neogeo_noslot, neogeo_arcade, neogeo_noslot
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(main_map_noslot)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl1", neogeo_arc_ctrls, "joy", true)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl2", neogeo_arc_ctrls, "joy", true)
MCFG_MSLUGX_PROT_ADD("mslugx_prot")
MCFG_SMA_PROT_ADD("sma_prot")
MCFG_CMC_PROT_ADD("cmc_prot")
@ -35,14 +38,46 @@ static MACHINE_CONFIG_DERIVED_CLASS( neogeo_noslot, neogeo_arcade, neogeo_noslot
MCFG_SBP_PROT_ADD("sbp_prot")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( neogeo_noslot_kog, neogeo_arcade, neogeo_noslot_kog_state )
static MACHINE_CONFIG_DERIVED_CLASS( neogeo_kog, neogeo_arcade, neogeo_noslot_kog_state )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(main_map_noslot)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl1", neogeo_arc_ctrls, "joy", true)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl2", neogeo_arc_ctrls, "joy", true)
MCFG_NGBOOTLEG_PROT_ADD("bootleg_prot")
MCFG_KOG_PROT_ADD("kog_prot")
MACHINE_CONFIG_END
// these basically correspond to the cabinets which were available in arcades:
// with mahjong panel, with dial for Pop'n Bounce and with 4 controls for Kizuna...
static MACHINE_CONFIG_DERIVED( neogeo_mj, neogeo_noslot )
MCFG_DEVICE_REMOVE("ctrl1")
MCFG_DEVICE_REMOVE("ctrl2")
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl1", neogeo_arc_ctrls, "mahjong", true)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl2", neogeo_arc_ctrls, "", true)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( neogeo_dial, neogeo_noslot )
MCFG_DEVICE_REMOVE("ctrl1")
MCFG_DEVICE_REMOVE("ctrl2")
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl1", neogeo_arc_ctrls, "dial", true)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl2", neogeo_arc_ctrls, "dial", true)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( neogeo_kiz4p, neogeo_noslot )
MCFG_DEVICE_REMOVE("ctrl1")
MCFG_DEVICE_REMOVE("ctrl2")
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl1", neogeo_kiz4p, "kiz4p", true)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl2", neogeo_kiz4p, "kiz4p", true)
MACHINE_CONFIG_END
// this is used by V-Liner and Irritating Maze, which handle differently inputs...
static MACHINE_CONFIG_DERIVED( neogeo_noctrl, neogeo_noslot )
MCFG_DEVICE_REMOVE("ctrl1")
MCFG_DEVICE_REMOVE("ctrl2")
MACHINE_CONFIG_END
/*************************************
*
@ -155,203 +190,65 @@ static INPUT_PORTS_START( dualbios )
PORT_INCLUDE( neogeo )
/* the rom banking seems to be tied directly to the dipswitch */
PORT_MODIFY("P1/DSW")
PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Region ) ) PORT_DIPLOCATION("SW:3") PORT_CHANGED_MEMBER(DEVICE_SELF, neogeo_state, select_bios, 0)
PORT_DIPSETTING( 0x0000, DEF_STR( Asia ) )
PORT_DIPSETTING( 0x0004, DEF_STR( Japan ) )
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Region ) ) PORT_DIPLOCATION("SW:3") PORT_CHANGED_MEMBER(DEVICE_SELF, neogeo_state, select_bios, 0)
PORT_DIPSETTING( 0x00, DEF_STR( Asia ) )
PORT_DIPSETTING( 0x04, DEF_STR( Japan ) )
INPUT_PORTS_END
static INPUT_PORTS_START( mjneogeo )
PORT_INCLUDE( neogeo )
PORT_MODIFY("P1/DSW")
PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Controller ) ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x0004, DEF_STR( Joystick ) )
PORT_DIPSETTING( 0x0000, "Mahjong Panel" )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,mahjong_controller_r, NULL)
PORT_START("MAHJONG1")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_A )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_B )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_C )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_D )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_E )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_F )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_MAHJONG_G )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("MAHJONG2")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_H )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_I )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_J )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_K )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_L )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_M )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_MAHJONG_N )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("MAHJONG3")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON4 )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("MAHJONG4")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MAHJONG_PON )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MAHJONG_CHI )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_KAN )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_RON )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_REACH )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Controller ) ) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, DEF_STR( Joystick ) )
PORT_DIPSETTING( 0x00, "Mahjong Panel" )
INPUT_PORTS_END
static INPUT_PORTS_START( kizuna4p )
PORT_INCLUDE( neogeo )
PORT_MODIFY("P1/DSW")
PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Players ) ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x0002, "2" )
PORT_DIPSETTING( 0x0000, "4" )
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, kizuna4p_controller_r, (void *)0)
PORT_MODIFY("P2")
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, kizuna4p_controller_r, (void *)1)
PORT_MODIFY("DSW")
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Players ) ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x02, "2" )
PORT_DIPSETTING( 0x00, "4" )
PORT_MODIFY("SYSTEM")
PORT_BIT( 0x0f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, kizuna4p_start_r, NULL)
/* Fake inputs read by CUSTOM_INPUT handlers */
PORT_START("IN0-0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(1)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(1)
PORT_START("IN0-1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(3)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(3)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(3)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(3)
PORT_START("IN1-0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2)
PORT_START("IN1-1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(4)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(4)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(4)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(4)
PORT_START("START")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START3 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START4 )
INPUT_PORTS_END
static INPUT_PORTS_START( irrmaze )
PORT_INCLUDE( neogeo )
PORT_MODIFY("P1/DSW")
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,multiplexed_controller_r, (void *)0)
PORT_MODIFY("SYSTEM")
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_MODIFY("P2")
PORT_START("BUTTONS")
PORT_BIT( 0x0fff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_MODIFY("SYSTEM")
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN0-0")
PORT_START("TRACK_X")
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(10) PORT_KEYDELTA(20) PORT_REVERSE
PORT_START("IN0-1")
PORT_START("TRACK_Y")
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(10) PORT_KEYDELTA(20) PORT_REVERSE
INPUT_PORTS_END
static INPUT_PORTS_START( popbounc )
PORT_INCLUDE( neogeo )
PORT_MODIFY("P1/DSW")
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,multiplexed_controller_r, (void *)0)
PORT_MODIFY("P2")
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,multiplexed_controller_r, (void *)1)
/* Fake inputs read by CUSTOM_INPUT handlers */
PORT_START("IN0-0")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(20)
PORT_START("IN0-1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
PORT_BIT( 0x90, IP_ACTIVE_LOW, IPT_BUTTON1 ) /* note it needs it from 0x80 when using paddle */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_START("IN1-0")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(20) PORT_PLAYER(2)
PORT_START("IN1-1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_BIT( 0x90, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* note it needs it from 0x80 when using paddle */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
INPUT_PORTS_END
static INPUT_PORTS_START( vliner )
PORT_INCLUDE( neogeo )
PORT_MODIFY("P1/DSW")
PORT_MODIFY("DSW")
PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("View Payout Table/Big")
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Bet/Small")
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Stop/Double Up")
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Start/Collect")
PORT_MODIFY("P2")
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_MODIFY("SYSTEM")
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* this bit is used.. */
@ -8960,12 +8857,26 @@ DRIVER_INIT_MEMBER(neogeo_noslot_state,jockeygp)
// m_maincpu->space(AS_PROGRAM).install_read_port(0x2c0000, 0x2c0001, "IN6");
}
DRIVER_INIT_MEMBER(neogeo_noslot_state,irrmaze)
{
if (!m_cartslots[0]) m_banked_cart->install_banks(machine(), m_maincpu, m_region_maincpu->base(), m_region_maincpu->bytes());
m_sprgen->m_fixed_layer_bank_type = 0;
m_maincpu->space(AS_PROGRAM).install_read_handler(0x300000, 0x300001, 0, 0x01ff7e, read16_delegate(FUNC(neogeo_state::irrmaze_in0_r), this));
m_maincpu->space(AS_PROGRAM).install_read_port(0x340000, 0x340001, 0, 0x01fffe, "BUTTONS");
}
DRIVER_INIT_MEMBER(neogeo_noslot_state,vliner)
{
DRIVER_INIT_CALL(neogeo);
if (!m_cartslots[0]) m_banked_cart->install_banks(machine(), m_maincpu, m_region_maincpu->base(), m_region_maincpu->bytes());
m_sprgen->m_fixed_layer_bank_type = 0;
m_maincpu->space(AS_PROGRAM).install_ram(0x200000, 0x201fff);
m_maincpu->space(AS_PROGRAM).install_read_port(0x300000, 0x300001, 0, 0x01ff7e, "DSW");
m_maincpu->space(AS_PROGRAM).install_read_port(0x280000, 0x280001, "IN5");
m_maincpu->space(AS_PROGRAM).install_read_port(0x2c0000, 0x2c0001, "IN6");
@ -9747,7 +9658,7 @@ GAME( 1996, kof96, neogeo, neogeo_noslot, neogeo, neogeo_state, neoge
GAME( 1996, kof96h, kof96, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "The King of Fighters '96 (NGH-214)", MACHINE_SUPPORTS_SAVE )
GAME( 1996, ssideki4, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "The Ultimate 11 - The SNK Football Championship / Tokuten Ou - Honoo no Libero", MACHINE_SUPPORTS_SAVE )
GAME( 1996, kizuna, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Kizuna Encounter - Super Tag Battle / Fu'un Super Tag Battle", MACHINE_SUPPORTS_SAVE )
GAME( 1996, kizuna4p, kizuna, neogeo_noslot, kizuna4p, neogeo_state, neogeo, ROT0, "SNK", "Kizuna Encounter - Super Tag Battle 4 Way Battle Version / Fu'un Super Tag Battle Special Version", MACHINE_SUPPORTS_SAVE )
GAME( 1996, kizuna4p, kizuna, neogeo_kiz4p, kizuna4p, neogeo_state, neogeo, ROT0, "SNK", "Kizuna Encounter - Super Tag Battle 4 Way Battle Version / Fu'un Super Tag Battle Special Version", MACHINE_SUPPORTS_SAVE )
GAME( 1996, samsho4, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Samurai Shodown IV - Amakusa's Revenge / Samurai Spirits - Amakusa Kourin (NGM-222)(NGH-222)", MACHINE_SUPPORTS_SAVE )
GAME( 1996, samsho4k, samsho4, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Pae Wang Jeon Seol / Legend of a Warrior (Korean censored Samurai Shodown IV)", MACHINE_SUPPORTS_SAVE )
GAME( 1996, rbffspec, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Real Bout Fatal Fury Special / Real Bout Garou Densetsu Special", MACHINE_SUPPORTS_SAVE )
@ -9757,11 +9668,11 @@ GAME( 1997, kof97h, kof97, neogeo_noslot, neogeo, neogeo_state, neoge
GAME( 1997, kof97k, kof97, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "The King of Fighters '97 (Korean release)", MACHINE_SUPPORTS_SAVE )
GAME( 1997, kof97pls, kof97, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "bootleg", "The King of Fighters '97 Plus (bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1997, kof97oro, kof97, neogeo_noslot, neogeo, neogeo_noslot_state, kof97oro, ROT0, "bootleg", "The King of Fighters '97 Oroshi Plus 2003 (bootleg)", MACHINE_SUPPORTS_SAVE )
GAME( 1997, kog, kof97, neogeo_noslot_kog, neogeo, neogeo_noslot_kog_state, kog, ROT0, "bootleg", "King of Gladiator (The King of Fighters '97 bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // protected bootleg
GAME( 1997, kog, kof97, neogeo_kog, neogeo, neogeo_noslot_kog_state, kog, ROT0, "bootleg", "King of Gladiator (The King of Fighters '97 bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // protected bootleg
GAME( 1997, lastblad, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "The Last Blade / Bakumatsu Roman - Gekka no Kenshi (NGM-2340)", MACHINE_SUPPORTS_SAVE )
GAME( 1997, lastbladh, lastblad, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "The Last Blade / Bakumatsu Roman - Gekka no Kenshi (NGH-2340)", MACHINE_SUPPORTS_SAVE )
GAME( 1997, lastsold, lastblad, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "The Last Soldier (Korean release of The Last Blade)", MACHINE_SUPPORTS_SAVE )
GAME( 1997, irrmaze, neogeo, neogeo_noslot, irrmaze, neogeo_state, neogeo, ROT0, "SNK / Saurus", "The Irritating Maze / Ultra Denryu Iraira Bou", MACHINE_SUPPORTS_SAVE )
GAME( 1997, irrmaze, neogeo, neogeo_noctrl, irrmaze, neogeo_noslot_state, irrmaze, ROT0, "SNK / Saurus", "The Irritating Maze / Ultra Denryu Iraira Bou", MACHINE_SUPPORTS_SAVE )
GAME( 1998, rbff2, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Real Bout Fatal Fury 2 - The Newcomers / Real Bout Garou Densetsu 2 - the newcomers (NGM-2400)", MACHINE_SUPPORTS_SAVE )
GAME( 1998, rbff2h, rbff2, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Real Bout Fatal Fury 2 - The Newcomers / Real Bout Garou Densetsu 2 - the newcomers (NGH-2400)", MACHINE_SUPPORTS_SAVE )
GAME( 1998, rbff2k, rbff2, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "SNK", "Real Bout Fatal Fury 2 - The Newcomers (Korean release)", MACHINE_SUPPORTS_SAVE ) // no Japanese title / mode
@ -9854,7 +9765,7 @@ GAME( 1996, zintrckb, neogeo, neogeo_noslot, neogeo, neogeo_state, neoge
/* Aicom (was a part of Sammy) / Yumekobo (changed name in 1996) */
GAME( 1992, viewpoin, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Sammy / Aicom", "Viewpoint", MACHINE_SUPPORTS_SAVE )
GAME( 1994, janshin, neogeo, neogeo_noslot, mjneogeo, neogeo_state, neogeo, ROT0, "Aicom", "Jyanshin Densetsu - Quest of Jongmaster", MACHINE_SUPPORTS_SAVE )
GAME( 1994, janshin, neogeo, neogeo_mj, mjneogeo, neogeo_state, neogeo, ROT0, "Aicom", "Jyanshin Densetsu - Quest of Jongmaster", MACHINE_SUPPORTS_SAVE )
GAME( 1995, pulstar, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Aicom", "Pulstar", MACHINE_SUPPORTS_SAVE )
GAME( 1998, blazstar, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Yumekobo", "Blazing Star", MACHINE_SUPPORTS_SAVE )
GAME( 1999, preisle2, neogeo, neogeo_noslot, neogeo, neogeo_noslot_state, preisle2, ROT0, "Yumekobo", "Prehistoric Isle 2" , MACHINE_SUPPORTS_SAVE ) /* Encrypted GFX */
@ -9882,8 +9793,8 @@ GAME( 1995, kabukikl, neogeo, neogeo_noslot, neogeo, neogeo_state, neoge
GAME( 1997, neobombe, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Hudson", "Neo Bomberman", MACHINE_SUPPORTS_SAVE )
/* Monolith Corp. */
GAME( 1990, minasan, neogeo, neogeo_noslot, mjneogeo, neogeo_state, neogeo, ROT0, "Monolith Corp.", "Minasanno Okagesamadesu! Daisugorokutaikai (MOM-001)(MOH-001)", MACHINE_SUPPORTS_SAVE )
GAME( 1991, bakatono, neogeo, neogeo_noslot, mjneogeo, neogeo_state, neogeo, ROT0, "Monolith Corp.", "Bakatonosama Mahjong Manyuuki (MOM-002)(MOH-002)", MACHINE_SUPPORTS_SAVE )
GAME( 1990, minasan, neogeo, neogeo_mj, mjneogeo, neogeo_state, neogeo, ROT0, "Monolith Corp.", "Minasanno Okagesamadesu! Daisugorokutaikai (MOM-001)(MOH-001)", MACHINE_SUPPORTS_SAVE )
GAME( 1991, bakatono, neogeo, neogeo_mj, mjneogeo, neogeo_state, neogeo, ROT0, "Monolith Corp.", "Bakatonosama Mahjong Manyuuki (MOM-002)(MOH-002)", MACHINE_SUPPORTS_SAVE )
/* Nazca (later acquired by SNK) */
GAME( 1996, turfmast, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Nazca", "Neo Turf Masters / Big Tournament Golf", MACHINE_SUPPORTS_SAVE )
@ -9940,7 +9851,7 @@ GAME( 1994, fightfeva, fightfev, neogeo_noslot, neogeo, neogeo_state, neoge
GAME( 1994, pspikes2, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Video System Co.", "Power Spikes II (NGM-068)", MACHINE_SUPPORTS_SAVE )
GAME( 1994, sonicwi2, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Video System Co.", "Aero Fighters 2 / Sonic Wings 2", MACHINE_SUPPORTS_SAVE )
GAME( 1995, sonicwi3, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Video System Co.", "Aero Fighters 3 / Sonic Wings 3", MACHINE_SUPPORTS_SAVE )
GAME( 1997, popbounc, neogeo, neogeo_noslot, popbounc, neogeo_state, neogeo, ROT0, "Video System Co.", "Pop 'n Bounce / Gapporin", MACHINE_SUPPORTS_SAVE )
GAME( 1997, popbounc, neogeo, neogeo_dial, neogeo, neogeo_state, neogeo, ROT0, "Video System Co.", "Pop 'n Bounce / Gapporin", MACHINE_SUPPORTS_SAVE )
/* Visco */
GAME( 1992, androdun, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Visco", "Andro Dunos (NGM-049)(NGH-049)", MACHINE_SUPPORTS_SAVE )
@ -9974,8 +9885,8 @@ GAME( 2002, matrimbl, matrim, neogeo_noslot, neogeo, neogeo_noslot_state,
/* BrezzaSoft */
GAME( 2001, jockeygp, neogeo, neogeo_noslot, jockeygp, neogeo_noslot_state, jockeygp, ROT0, "Sun Amusement / BrezzaSoft", "Jockey Grand Prix (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 2001, jockeygpa, jockeygp, neogeo_noslot, jockeygp, neogeo_noslot_state, jockeygp, ROT0, "Sun Amusement / BrezzaSoft", "Jockey Grand Prix (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 2001, vliner, neogeo, neogeo_noslot, vliner, neogeo_noslot_state, vliner, ROT0, "Dyna / BrezzaSoft", "V-Liner (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 2001, vlinero, vliner, neogeo_noslot, vliner, neogeo_noslot_state, vliner, ROT0, "Dyna / BrezzaSoft", "V-Liner (set 2)", MACHINE_SUPPORTS_SAVE )
GAME( 2001, vliner, neogeo, neogeo_noctrl, vliner, neogeo_noslot_state, vliner, ROT0, "Dyna / BrezzaSoft", "V-Liner (set 1)", MACHINE_SUPPORTS_SAVE )
GAME( 2001, vlinero, vliner, neogeo_noctrl, vliner, neogeo_noslot_state, vliner, ROT0, "Dyna / BrezzaSoft", "V-Liner (set 2)", MACHINE_SUPPORTS_SAVE )
/* Kyle Hodgetts */
GAME( 2000, diggerma, neogeo, neogeo_noslot, neogeo, neogeo_state, neogeo, ROT0, "Kyle Hodgetts", "Digger Man (prototype)", MACHINE_SUPPORTS_SAVE )

View File

@ -76,8 +76,6 @@ public:
ng_aes_state(const machine_config &mconfig, device_type type, const char *tag)
: neogeo_state(mconfig, type, tag)
, m_io_in2(*this, "IN2")
, m_ctrl1(*this, "ctrl1")
, m_ctrl2(*this, "ctrl2")
{ }
DECLARE_READ16_MEMBER(aes_in2_r);
@ -92,8 +90,6 @@ public:
protected:
required_ioport m_io_in2;
required_device<neogeo_control_port_device> m_ctrl1;
required_device<neogeo_control_port_device> m_ctrl2;
void common_machine_start();
};
@ -312,8 +308,8 @@ static MACHINE_CONFIG_DERIVED_CLASS( aes, neogeo_base, ng_aes_state )
MCFG_NEOGEO_CARTRIDGE_ADD("cartslot1", neogeo_cart, nullptr)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl1", neogeo_controls, "joy")
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl2", neogeo_controls, "joy")
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl1", neogeo_controls, "joy", false)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl2", neogeo_controls, "joy", false)
MCFG_SOFTWARE_LIST_ADD("cart_list","neogeo")
MCFG_SOFTWARE_LIST_FILTER("cart_list","AES")
@ -1402,8 +1398,8 @@ static MACHINE_CONFIG_DERIVED_CLASS( neocd, neogeo_base, ngcd_state )
MCFG_MACHINE_START_OVERRIDE(ngcd_state,neocd)
MCFG_MACHINE_RESET_OVERRIDE(ngcd_state,neocd)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl1", neogeo_controls, "joy")
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl2", neogeo_controls, "joy")
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl1", neogeo_controls, "joy", false)
MCFG_NEOGEO_CONTROL_PORT_ADD("ctrl2", neogeo_controls, "joy", false)
MCFG_CDROM_ADD( "cdrom" )
MCFG_CDROM_INTERFACE("neocd_cdrom")

View File

@ -49,6 +49,11 @@ public:
m_screen(*this, "screen"),
m_palette(*this, "palette"),
m_memcard(*this, "memcard"),
m_dsw(*this, "DSW"),
m_trackx(*this, "TRACK_X"),
m_tracky(*this, "TRACK_Y"),
m_ctrl1(*this, "ctrl1"),
m_ctrl2(*this, "ctrl2"),
m_sprgen(*this, "spritegen"),
m_use_cart_vectors(0),
m_use_cart_audio(0),
@ -75,6 +80,9 @@ public:
DECLARE_READ16_MEMBER(neogeo_video_register_r);
DECLARE_WRITE16_MEMBER(neogeo_video_register_w);
READ16_MEMBER(banked_vectors_r);
DECLARE_READ16_MEMBER(in0_r);
DECLARE_READ16_MEMBER(irrmaze_in0_r);
void set_slot_number(int slot);
DECLARE_CUSTOM_INPUT_MEMBER(get_memcard_status);
@ -122,19 +130,12 @@ protected:
void neogeo_set_palette_bank( int data );
void audio_cpu_check_nmi();
void select_controller( UINT8 data );
void set_save_ram_unlock( UINT8 data );
void set_outputs( );
void set_output_latch( UINT8 data );
void set_output_data( UINT8 data );
// device overrides
virtual void machine_start() override;
virtual void machine_reset() override;
@ -177,6 +178,12 @@ protected:
UINT8 m_el_value;
UINT8 m_led1_value;
UINT8 m_led2_value;
optional_ioport m_dsw;
optional_ioport m_trackx;
optional_ioport m_tracky;
optional_device<neogeo_control_port_device> m_ctrl1;
optional_device<neogeo_control_port_device> m_ctrl2;
// video hardware, including maincpu interrupts
// TODO: make into a device
@ -205,7 +212,6 @@ protected:
int m_palette_bank;
int m_use_cart_vectors;
int m_use_cart_audio;
@ -307,6 +313,7 @@ class neogeo_noslot_state : public neogeo_state
DECLARE_DRIVER_INIT(kof97oro);
DECLARE_DRIVER_INIT(lans2004);
DECLARE_DRIVER_INIT(sbp);
DECLARE_DRIVER_INIT(irrmaze);
void install_banked_bios();
// non-carts