summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/champbwl.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2012-04-19 20:35:01 +0000
committer Aaron Giles <aaron@aarongiles.com>2012-04-19 20:35:01 +0000
commitb5b7808cb787ea3191c1f13352d954a77320618c (patch)
tree24cc6ac067f38680ab6de586fc795298dca45f99 /src/mame/drivers/champbwl.c
parent70eab27301c7a778d4a9acf2060c0bbc7a6c6c2b (diff)
Remove global memory banking functions in favor of referencing
subbanks of a device and directly acting on them. First round S&R: memory_configure_bank( *)\(( *)([^,]+), *([^,]+), * \3.root_device().subbank\1\(\2\4\2\)->configure_entries\1\(\2 memory_configure_bank_decrypted( *)\(( *)([^,]+), *([^,]+), * \3.root_device().subbank\1\(\2\4\2\)->configure_decrypted_entries\1\(\2 memory_set_bank( *)\(( *)([^,]+), *([^,]+), * \3.root_device().subbank\1\(\2\4\2\)->set_entry\1\(\2 memory_set_bankptr( *)\(( *)([^,]+), *([^,]+), * \3.root_device().subbank\1\(\2\4\2\)->set_base\1\(\2 Then convert single entries to simpler form: configure_entries( *\( *[^,]+, *)1 *, *([^,]+),[^)]+\) configure_entry\1\2\) configure_decrypted_entries( *\( *[^,]+, *)1 *, *([^,]+),[^)]+\) configure_decrypted_entry\1\2\) Remove renundant root_device lookup for methods: ([ \t])machine\(\)\.root_device\(\)\. \1 Use state-> instead of root_device lookup where available (this one must be done by hand unfortunately): ([^ \t]*)machine[()]*\.root_device\(\)\. state->
Diffstat (limited to 'src/mame/drivers/champbwl.c')
-rw-r--r--src/mame/drivers/champbwl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mame/drivers/champbwl.c b/src/mame/drivers/champbwl.c
index 9c8215e4f8d..66d648aae6e 100644
--- a/src/mame/drivers/champbwl.c
+++ b/src/mame/drivers/champbwl.c
@@ -194,7 +194,7 @@ WRITE8_MEMBER(champbwl_state::champbwl_misc_w)
coin_lockout_w(machine(), 0, ~data & 8);
coin_lockout_w(machine(), 1, ~data & 4);
- memory_set_bank(machine(), "bank1", (data & 0x30) >> 4);
+ subbank("bank1")->set_entry((data & 0x30) >> 4);
}
static ADDRESS_MAP_START( champbwl_map, AS_PROGRAM, 8, champbwl_state )
@@ -231,7 +231,7 @@ WRITE8_MEMBER(champbwl_state::doraemon_outputs_w)
coin_lockout_w(machine(), 0, ~data & 8); // coin lockout
machine().device<ticket_dispenser_device>("hopper")->write(*&space, 0, (data & 0x04) ? 0x00 : 0x80); // gift out motor
- memory_set_bank(machine(), "bank1", (data & 0x30) >> 4);
+ subbank("bank1")->set_entry((data & 0x30) >> 4);
// popmessage("%02x", data);
}
@@ -434,7 +434,7 @@ static MACHINE_START( champbwl )
state->m_mcu = NULL;
- memory_configure_bank(machine, "bank1", 0, 4, &ROM[0x10000], 0x4000);
+ state->subbank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x4000);
state->save_item(NAME(state->m_screenflip));
state->save_item(NAME(state->m_last_trackball_val));
@@ -531,7 +531,7 @@ static SCREEN_VBLANK( doraemon )
static MACHINE_START( doraemon )
{
UINT8 *ROM = machine.region("maincpu")->base();
- memory_configure_bank(machine, "bank1", 0, 4, &ROM[0x10000], 0x4000);
+ machine.root_device().subbank("bank1")->configure_entries(0, 4, &ROM[0x10000], 0x4000);
}
static MACHINE_CONFIG_START( doraemon, tnzs_state )