diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2012-08-10 08:33:51 +0000 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2012-08-10 08:33:51 +0000 |
commit | c75c14d4d3541f93dd3ad10054c9cc09407493e9 (patch) | |
tree | ee5693b028ef22d3ee70ce5f78a5a0ffbb7e75a7 /src/mame/drivers/mazerbla.c | |
parent | 24991f6661251f71458f3d3fbe3c5315f32d07a9 (diff) |
All driver inits are now member of state classes.
Added DECLARE_DRIVER_INIT macro to define it H file, and
DRIVER_INIT_MEMBER for member declaration in C files
Updated all drivers accordingly (no whatsnew)
Diffstat (limited to 'src/mame/drivers/mazerbla.c')
-rw-r--r-- | src/mame/drivers/mazerbla.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mame/drivers/mazerbla.c b/src/mame/drivers/mazerbla.c index 5345cf886da..dff849096e1 100644 --- a/src/mame/drivers/mazerbla.c +++ b/src/mame/drivers/mazerbla.c @@ -137,6 +137,8 @@ public: DECLARE_WRITE8_MEMBER(sound_nmi_clear_w); DECLARE_WRITE8_MEMBER(gg_led_ctrl_w); DECLARE_READ8_MEMBER(soundcommand_r); + DECLARE_DRIVER_INIT(mazerbla); + DECLARE_DRIVER_INIT(greatgun); }; @@ -1705,18 +1707,16 @@ ROM_START( greatgun ) ROM_LOAD( "psb19",0x36000,0x2000, CRC(68752e0d) SHA1(58a4921e4f774af5e1ef7af67f06e9b43643ffab) ) ROM_END -static DRIVER_INIT( mazerbla ) +DRIVER_INIT_MEMBER(mazerbla_state,mazerbla) { - mazerbla_state *state = machine.driver_data<mazerbla_state>(); - state->m_game_id = MAZERBLA; + m_game_id = MAZERBLA; } -static DRIVER_INIT( greatgun ) +DRIVER_INIT_MEMBER(mazerbla_state,greatgun) { - mazerbla_state *state = machine.driver_data<mazerbla_state>(); - UINT8 *rom = state->memregion("sub2")->base(); + UINT8 *rom = memregion("sub2")->base(); - state->m_game_id = GREATGUN; + m_game_id = GREATGUN; // patch VCU test // VCU test starts at PC=0x56f |