summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/luckgrln.c
diff options
context:
space:
mode:
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
commitc75c14d4d3541f93dd3ad10054c9cc09407493e9 (patch)
treeee5693b028ef22d3ee70ce5f78a5a0ffbb7e75a7 /src/mame/drivers/luckgrln.c
parent24991f6661251f71458f3d3fbe3c5315f32d07a9 (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/luckgrln.c')
-rw-r--r--src/mame/drivers/luckgrln.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mame/drivers/luckgrln.c b/src/mame/drivers/luckgrln.c
index de67a4073b9..8b0e09b75af 100644
--- a/src/mame/drivers/luckgrln.c
+++ b/src/mame/drivers/luckgrln.c
@@ -144,6 +144,7 @@ public:
DECLARE_WRITE8_MEMBER(lamps_b_w);
DECLARE_WRITE8_MEMBER(counters_w);
DECLARE_READ8_MEMBER(test_r);
+ DECLARE_DRIVER_INIT(luckgrln);
};
@@ -1022,11 +1023,11 @@ static MACHINE_CONFIG_DERIVED( _7smash, luckgrln )
MCFG_CPU_IO_MAP(_7smash_io)
MACHINE_CONFIG_END
-static DRIVER_INIT( luckgrln )
+DRIVER_INIT_MEMBER(luckgrln_state,luckgrln)
{
int i;
UINT8 x,v;
- UINT8* rom = machine.root_device().memregion("rom_data")->base();
+ UINT8* rom = machine().root_device().memregion("rom_data")->base();
for (i=0;i<0x20000;i++)
{
@@ -1042,7 +1043,7 @@ static DRIVER_INIT( luckgrln )
{
FILE *fp;
char filename[256];
- sprintf(filename,"decrypted_%s", machine.system().name);
+ sprintf(filename,"decrypted_%s", machine().system().name);
fp=fopen(filename, "w+b");
if (fp)
{
@@ -1053,7 +1054,7 @@ static DRIVER_INIT( luckgrln )
#endif
// ??
-// machine.root_device().membank("bank1")->set_base(&rom[0x010000]);
+// machine().root_device().membank("bank1")->set_base(&rom[0x010000]);
}
@@ -1101,5 +1102,5 @@ ROM_END
YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */
GAMEL( 1991, luckgrln, 0, luckgrln, luckgrln, luckgrln_state, luckgrln, ROT0, "Wing Co., Ltd.", "Lucky Girl (newer Z180 based hardware)", GAME_NO_SOUND, layout_luckgrln )
-GAMEL( 1993, 7smash, 0, _7smash, _7smash, luckgrln_state, 0, ROT0, "Sovic", "7 Smash", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_NO_SOUND, layout_luckgrln )
+GAMEL( 1993, 7smash, 0, _7smash, _7smash, driver_device, 0, ROT0, "Sovic", "7 Smash", GAME_IMPERFECT_GRAPHICS | GAME_NOT_WORKING | GAME_NO_SOUND, layout_luckgrln )