Comment: I need to check a few more things, see how bad performance gets if we force some elements to render each update rather than using cached bitmaps, the idea of ending up with up to 200,000 temporary bitmaps for each 16 segment LED with the existing code is quite frankly horrendous, but from what I understand it's entirely possible it could happen.
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.
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->
bank manipulation APIs from memory_manager, and instead added a
memory_manager::bank("tag") function which will return a pointer to
the representative memory_bank. Operations can then be performed as
expected directly on the memory_bank. Most code did not need an update
yet, as I haven't done the search/replace to move away from global
functions (which still exist for now).
Added device_t::subbank("tag") to return a bank that is owned by the
given device.
Switched YM2151 interfaces over to devcb callbacks.
Created proper sound devices for the Williams NARC, CVSD and ADPCM
sound boards. Updated midyunit, midtunit, williams(joust2), and
mcr68(archrivl/pigskin/trisport) to use the new devices.
Discovered similarities in gotcha.c to Data East Bootleg sprites, also happening to be the closest implementation to Silver Millennium in the sources. Refactored each based on this information. [David Haywood]
sound devices for each of the Midway 8-bit sound
boards. This will also aid in eventually hooking them
up to pinballs.
Enhanced the mixer interface support to allow for
more than one output line. To use this you need to
use the MCFG_MIXER_ROUTE macro instead of
MCFG_SOUND_ROUTE so that the mixer output index can
be specified. See midway_ssio_device for an example.