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/backfire.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/backfire.c')
-rw-r--r-- | src/mame/drivers/backfire.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c index 59df4900a77..5c5995753c2 100644 --- a/src/mame/drivers/backfire.c +++ b/src/mame/drivers/backfire.c @@ -667,7 +667,7 @@ ROM_END static void descramble_sound( running_machine &machine ) { - UINT8 *rom = machine.region("ymz")->base(); + UINT8 *rom = machine.root_device().memregion("ymz")->base(); int length = 0x200000; // only the first rom is swapped on backfire! UINT8 *buf1 = auto_alloc_array(machine, UINT8, length); UINT32 x; |