diff options
author | Aaron Giles <aaron@aarongiles.com> | 2012-04-20 05:54:39 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2012-04-20 05:54:39 +0000 |
commit | 18f33f4eff805592f984a31f55513bce4a219ee5 (patch) | |
tree | 9e8dfdf1452e3d97a95936db2e9c740efa258306 /src/mame/drivers/brkthru.c | |
parent | 776d29c90f2a6c3c234597eb950410b95c5addec (diff) |
Changed device->subregion to device->memregion. Moved
memory_region management into the memory manager instead
of directly in the machine. Hid the global region method;
now all regions must be looked up relative to a device.
If you're a member function, you can just use memregion("tag")
directly. If you're a global function or a device referencing
global regions, use machine().root_device().memregion("tag")
to look up regions relative to the root.
S&R to convert all references:
machine([()]*)\.region
machine\1\.root_device\(\).subregion
Then remove redundant machine().root_device() within src/mame:
([ \t])machine\(\)\.root_device\(\)\.
\1
And use state->memregion() if we have a state variable present:
(state *= *[^;]+driver_data[^}]+)([^ \t]*)machine[()]*\.root_device\(\)\.
\1state->
Finally some cleanup:
screen.state->
state->
device->state->
state->
space->state->
state->
And a few hand-tweaks.
Diffstat (limited to 'src/mame/drivers/brkthru.c')
-rw-r--r-- | src/mame/drivers/brkthru.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mame/drivers/brkthru.c b/src/mame/drivers/brkthru.c index f56897ca34e..423f50c1d3e 100644 --- a/src/mame/drivers/brkthru.c +++ b/src/mame/drivers/brkthru.c @@ -660,7 +660,7 @@ ROM_END static DRIVER_INIT( brkthru ) { - UINT8 *ROM = machine.region("maincpu")->base(); + UINT8 *ROM = machine.root_device().memregion("maincpu")->base(); machine.root_device().membank("bank1")->configure_entries(0, 8, &ROM[0x10000], 0x2000); } |