summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/progolf.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/progolf.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/progolf.c')
-rw-r--r--src/mame/drivers/progolf.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mame/drivers/progolf.c b/src/mame/drivers/progolf.c
index 5d7e1bec782..37c5b07c5a4 100644
--- a/src/mame/drivers/progolf.c
+++ b/src/mame/drivers/progolf.c
@@ -82,6 +82,8 @@ public:
DECLARE_READ8_MEMBER(progolf_videoram_r);
DECLARE_WRITE8_MEMBER(progolf_videoram_w);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
+ DECLARE_DRIVER_INIT(progolfa);
+ DECLARE_DRIVER_INIT(progolf);
};
@@ -498,12 +500,12 @@ ROM_START( progolfa )
ROM_END
-static DRIVER_INIT( progolf )
+DRIVER_INIT_MEMBER(progolf_state,progolf)
{
int A;
- address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
- UINT8 *rom = machine.root_device().memregion("maincpu")->base();
- UINT8* decrypted = auto_alloc_array(machine, UINT8, 0x10000);
+ address_space *space = machine().device("maincpu")->memory().space(AS_PROGRAM);
+ UINT8 *rom = machine().root_device().memregion("maincpu")->base();
+ UINT8* decrypted = auto_alloc_array(machine(), UINT8, 0x10000);
space->set_decrypted_region(0x0000,0xffff, decrypted);
@@ -512,12 +514,12 @@ static DRIVER_INIT( progolf )
decrypted[A] = BITSWAP8(rom[A],7,5,6,4,3,2,1,0);
}
-static DRIVER_INIT( progolfa )
+DRIVER_INIT_MEMBER(progolf_state,progolfa)
{
int A;
- address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM);
- UINT8 *rom = machine.root_device().memregion("maincpu")->base();
- UINT8* decrypted = auto_alloc_array(machine, UINT8, 0x10000);
+ address_space *space = machine().device("maincpu")->memory().space(AS_PROGRAM);
+ UINT8 *rom = machine().root_device().memregion("maincpu")->base();
+ UINT8* decrypted = auto_alloc_array(machine(), UINT8, 0x10000);
space->set_decrypted_region(0x0000,0xffff, decrypted);