mirror of
https://github.com/holub/mame
synced 2025-06-07 13:23:50 +03:00
and ioports, too (nw)
This commit is contained in:
parent
89524dd10e
commit
f7180a9504
@ -160,17 +160,6 @@ const tiny_rom_entry *driver_device::device_rom_region() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
|
||||||
// device_input_ports - return a pointer to the
|
|
||||||
// game's input ports
|
|
||||||
//-------------------------------------------------
|
|
||||||
|
|
||||||
ioport_constructor driver_device::device_input_ports() const
|
|
||||||
{
|
|
||||||
return m_system->ipt;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// device_start - device override which calls
|
// device_start - device override which calls
|
||||||
// the various helpers
|
// the various helpers
|
||||||
|
@ -197,7 +197,6 @@ protected:
|
|||||||
|
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||||
virtual ioport_constructor device_input_ports() const override;
|
|
||||||
virtual void device_start() override;
|
virtual void device_start() override;
|
||||||
virtual void device_reset_after_children() override;
|
virtual void device_reset_after_children() override;
|
||||||
|
|
||||||
|
@ -95,7 +95,6 @@ public:
|
|||||||
const char * parent; // if this is a clone, the name of the parent
|
const char * parent; // if this is a clone, the name of the parent
|
||||||
const char * year; // year the game was released
|
const char * year; // year the game was released
|
||||||
const char * manufacturer; // manufacturer of the game
|
const char * manufacturer; // manufacturer of the game
|
||||||
ioport_constructor ipt; // pointer to constructor for input ports
|
|
||||||
driver_init_helper const & driver_init; // DRIVER_INIT callback
|
driver_init_helper const & driver_init; // DRIVER_INIT callback
|
||||||
const tiny_rom_entry * rom; // pointer to list of ROMs for the game
|
const tiny_rom_entry * rom; // pointer to list of ROMs for the game
|
||||||
const char * compatible_with;
|
const char * compatible_with;
|
||||||
@ -121,7 +120,7 @@ public:
|
|||||||
#define GAME_EXTERN(name) extern game_driver const GAME_NAME(name)
|
#define GAME_EXTERN(name) extern game_driver const GAME_NAME(name)
|
||||||
|
|
||||||
// static game traits
|
// static game traits
|
||||||
#define GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, CLASS) \
|
#define GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, INPUT, CLASS) \
|
||||||
namespace { \
|
namespace { \
|
||||||
class GAME_TRAITS_NAME(NAME) : public CLASS \
|
class GAME_TRAITS_NAME(NAME) : public CLASS \
|
||||||
{ \
|
{ \
|
||||||
@ -130,6 +129,7 @@ namespace { \
|
|||||||
GAME_TRAITS_NAME(NAME)(const machine_config &mconfig, device_type type, const char *tag) : CLASS(mconfig, type, tag) { } \
|
GAME_TRAITS_NAME(NAME)(const machine_config &mconfig, device_type type, const char *tag) : CLASS(mconfig, type, tag) { } \
|
||||||
protected: \
|
protected: \
|
||||||
virtual void device_add_mconfig(machine_config &config) override { MACHINE_CONFIG_NAME(MACHINE)(config, this, nullptr); } \
|
virtual void device_add_mconfig(machine_config &config) override { MACHINE_CONFIG_NAME(MACHINE)(config, this, nullptr); } \
|
||||||
|
virtual ioport_constructor device_input_ports() const override { return INPUT_PORTS_NAME(INPUT); } \
|
||||||
}; \
|
}; \
|
||||||
constexpr char const GAME_TRAITS_NAME(NAME)::shortname[], GAME_TRAITS_NAME(NAME)::fullname[], GAME_TRAITS_NAME(NAME)::source[]; \
|
constexpr char const GAME_TRAITS_NAME(NAME)::shortname[], GAME_TRAITS_NAME(NAME)::fullname[], GAME_TRAITS_NAME(NAME)::source[]; \
|
||||||
}
|
}
|
||||||
@ -137,14 +137,13 @@ namespace { \
|
|||||||
|
|
||||||
// standard GAME() macro
|
// standard GAME() macro
|
||||||
#define GAME(YEAR,NAME,PARENT,MACHINE,INPUT,CLASS,INIT,MONITOR,COMPANY,FULLNAME,FLAGS) \
|
#define GAME(YEAR,NAME,PARENT,MACHINE,INPUT,CLASS,INIT,MONITOR,COMPANY,FULLNAME,FLAGS) \
|
||||||
GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, CLASS) \
|
GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, INPUT, CLASS) \
|
||||||
extern game_driver const GAME_NAME(NAME) \
|
extern game_driver const GAME_NAME(NAME) \
|
||||||
{ \
|
{ \
|
||||||
GAME_DRIVER_TYPE(NAME), \
|
GAME_DRIVER_TYPE(NAME), \
|
||||||
#PARENT, \
|
#PARENT, \
|
||||||
#YEAR, \
|
#YEAR, \
|
||||||
COMPANY, \
|
COMPANY, \
|
||||||
INPUT_PORTS_NAME(INPUT), \
|
|
||||||
game_driver::make_driver_init(&CLASS::init_##INIT), \
|
game_driver::make_driver_init(&CLASS::init_##INIT), \
|
||||||
ROM_NAME(NAME), \
|
ROM_NAME(NAME), \
|
||||||
nullptr, \
|
nullptr, \
|
||||||
@ -155,14 +154,13 @@ extern game_driver const GAME_NAME(NAME) \
|
|||||||
|
|
||||||
// standard macro with additional layout
|
// standard macro with additional layout
|
||||||
#define GAMEL(YEAR,NAME,PARENT,MACHINE,INPUT,CLASS,INIT,MONITOR,COMPANY,FULLNAME,FLAGS,LAYOUT) \
|
#define GAMEL(YEAR,NAME,PARENT,MACHINE,INPUT,CLASS,INIT,MONITOR,COMPANY,FULLNAME,FLAGS,LAYOUT) \
|
||||||
GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, CLASS) \
|
GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, INPUT, CLASS) \
|
||||||
extern game_driver const GAME_NAME(NAME) \
|
extern game_driver const GAME_NAME(NAME) \
|
||||||
{ \
|
{ \
|
||||||
GAME_DRIVER_TYPE(NAME), \
|
GAME_DRIVER_TYPE(NAME), \
|
||||||
#PARENT, \
|
#PARENT, \
|
||||||
#YEAR, \
|
#YEAR, \
|
||||||
COMPANY, \
|
COMPANY, \
|
||||||
INPUT_PORTS_NAME(INPUT), \
|
|
||||||
game_driver::make_driver_init(&CLASS::init_##INIT), \
|
game_driver::make_driver_init(&CLASS::init_##INIT), \
|
||||||
ROM_NAME(NAME), \
|
ROM_NAME(NAME), \
|
||||||
nullptr, \
|
nullptr, \
|
||||||
@ -174,14 +172,13 @@ extern game_driver const GAME_NAME(NAME) \
|
|||||||
|
|
||||||
// standard console definition macro
|
// standard console definition macro
|
||||||
#define CONS(YEAR,NAME,PARENT,COMPAT,MACHINE,INPUT,CLASS,INIT,COMPANY,FULLNAME,FLAGS) \
|
#define CONS(YEAR,NAME,PARENT,COMPAT,MACHINE,INPUT,CLASS,INIT,COMPANY,FULLNAME,FLAGS) \
|
||||||
GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, CLASS) \
|
GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, INPUT, CLASS) \
|
||||||
extern game_driver const GAME_NAME(NAME) \
|
extern game_driver const GAME_NAME(NAME) \
|
||||||
{ \
|
{ \
|
||||||
GAME_DRIVER_TYPE(NAME), \
|
GAME_DRIVER_TYPE(NAME), \
|
||||||
#PARENT, \
|
#PARENT, \
|
||||||
#YEAR, \
|
#YEAR, \
|
||||||
COMPANY, \
|
COMPANY, \
|
||||||
INPUT_PORTS_NAME(INPUT), \
|
|
||||||
game_driver::make_driver_init(&CLASS::init_##INIT), \
|
game_driver::make_driver_init(&CLASS::init_##INIT), \
|
||||||
ROM_NAME(NAME), \
|
ROM_NAME(NAME), \
|
||||||
#COMPAT, \
|
#COMPAT, \
|
||||||
@ -192,14 +189,13 @@ extern game_driver const GAME_NAME(NAME) \
|
|||||||
|
|
||||||
// standard computer definition macro
|
// standard computer definition macro
|
||||||
#define COMP(YEAR,NAME,PARENT,COMPAT,MACHINE,INPUT,CLASS,INIT,COMPANY,FULLNAME,FLAGS) \
|
#define COMP(YEAR,NAME,PARENT,COMPAT,MACHINE,INPUT,CLASS,INIT,COMPANY,FULLNAME,FLAGS) \
|
||||||
GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, CLASS) \
|
GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, INPUT, CLASS) \
|
||||||
extern game_driver const GAME_NAME(NAME) \
|
extern game_driver const GAME_NAME(NAME) \
|
||||||
{ \
|
{ \
|
||||||
GAME_DRIVER_TYPE(NAME), \
|
GAME_DRIVER_TYPE(NAME), \
|
||||||
#PARENT, \
|
#PARENT, \
|
||||||
#YEAR, \
|
#YEAR, \
|
||||||
COMPANY, \
|
COMPANY, \
|
||||||
INPUT_PORTS_NAME(INPUT), \
|
|
||||||
game_driver::make_driver_init(&CLASS::init_##INIT), \
|
game_driver::make_driver_init(&CLASS::init_##INIT), \
|
||||||
ROM_NAME(NAME), \
|
ROM_NAME(NAME), \
|
||||||
#COMPAT, \
|
#COMPAT, \
|
||||||
@ -210,14 +206,13 @@ extern game_driver const GAME_NAME(NAME) \
|
|||||||
|
|
||||||
// standard system definition macro
|
// standard system definition macro
|
||||||
#define SYST(YEAR,NAME,PARENT,COMPAT,MACHINE,INPUT,CLASS,INIT,COMPANY,FULLNAME,FLAGS) \
|
#define SYST(YEAR,NAME,PARENT,COMPAT,MACHINE,INPUT,CLASS,INIT,COMPANY,FULLNAME,FLAGS) \
|
||||||
GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, CLASS) \
|
GAME_DRIVER_TRAITS(NAME, FULLNAME, MACHINE, INPUT, CLASS) \
|
||||||
extern game_driver const GAME_NAME(NAME) \
|
extern game_driver const GAME_NAME(NAME) \
|
||||||
{ \
|
{ \
|
||||||
GAME_DRIVER_TYPE(NAME), \
|
GAME_DRIVER_TYPE(NAME), \
|
||||||
#PARENT, \
|
#PARENT, \
|
||||||
#YEAR, \
|
#YEAR, \
|
||||||
COMPANY, \
|
COMPANY, \
|
||||||
INPUT_PORTS_NAME(INPUT), \
|
|
||||||
game_driver::make_driver_init(&CLASS::init_##INIT), \
|
game_driver::make_driver_init(&CLASS::init_##INIT), \
|
||||||
ROM_NAME(NAME), \
|
ROM_NAME(NAME), \
|
||||||
#COMPAT, \
|
#COMPAT, \
|
||||||
|
Loading…
Reference in New Issue
Block a user