summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/neodrvr.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/neodrvr.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/neodrvr.c')
-rw-r--r--src/mame/drivers/neodrvr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/drivers/neodrvr.c b/src/mame/drivers/neodrvr.c
index 6f42315d13e..ec2048719cd 100644
--- a/src/mame/drivers/neodrvr.c
+++ b/src/mame/drivers/neodrvr.c
@@ -9560,7 +9560,7 @@ static DRIVER_INIT( mslug5 )
static TIMER_CALLBACK( ms5pcb_bios_timer_callback )
{
int harddip3 = input_port_read(machine, "HARDDIP") & 1;
- memory_set_bankptr(machine, NEOGEO_BANK_BIOS, machine.region("mainbios")->base() + 0x20000 + harddip3 * 0x20000);
+ machine.root_device().subbank(NEOGEO_BANK_BIOS)->set_base(machine.region("mainbios")->base() + 0x20000 + harddip3 * 0x20000);
}
static DRIVER_INIT( ms5pcb )
@@ -9597,7 +9597,7 @@ static DRIVER_INIT( ms5plus )
static TIMER_CALLBACK( svcpcb_bios_timer_callback )
{
int harddip3 = input_port_read(machine, "HARDDIP") & 1;
- memory_set_bankptr(machine, NEOGEO_BANK_BIOS, machine.region("mainbios")->base() + 0x20000 + harddip3 * 0x20000);
+ machine.root_device().subbank(NEOGEO_BANK_BIOS)->set_base(machine.region("mainbios")->base() + 0x20000 + harddip3 * 0x20000);
}
static DRIVER_INIT( svcpcb )