summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/timer
diff options
context:
space:
mode:
author npwoods <npwoods@mess.org>2022-12-16 14:03:59 -0500
committer GitHub <noreply@github.com>2022-12-17 06:03:59 +1100
commit13910382a5e846677f30d1645bfb44e4983de557 (patch)
treebc75e208d5dc4305a6721dff63efaec2864db178 /plugins/timer
parent14c3d33e86ceeeeb57c44cb7d6aa85685f79813a (diff)
osd/modules/file: Don't magically substitute environment variables when opening files. (#9859)
* util/options.cpp: Added option types for single and multiple paths. * util/options.cpp: Substitute environment variables in values from defaults and INI files. * ui/dirmenu.cpp: Removed hard-coded list of multi-path options. * plugins: Don't substitute environment variables in path options.
Diffstat (limited to 'plugins/timer')
-rw-r--r--plugins/timer/timer_persist.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/timer/timer_persist.lua b/plugins/timer/timer_persist.lua
index 4781c263ba8..cb24b485dcb 100644
--- a/plugins/timer/timer_persist.lua
+++ b/plugins/timer/timer_persist.lua
@@ -130,7 +130,7 @@ end
local function open_database()
-- make sure settings directory exists
- local dir = emu.subst_env(manager.machine.options.entries.homepath:value():match('([^;]+)')) .. '/timer'
+ local dir = manager.machine.options.entries.homepath:value():match('([^;]+)') .. '/timer'
local attr = lfs.attributes(dir)
if not attr then
lfs.mkdir(dir)
| | | | existing modern devices and the legacy wrappers to work in this environment. This in general greatly simplifies writing a modern device. [Aaron Giles] General notes: * some more cleanup probably needs to happen behind this change, but I needed to get it in before the next device modernization or import from MESS :) * new template function device_creator which automatically defines the static function that creates the device; use this instead of creating a static_alloc_device_config function * added device_stop() method which is called at around the time the previous device_t's destructor was called; if you auto_free anything, do it here because the machine is gone when the destructor is called * changed the static_set_* calls to pass a device_t & instead of a device_config * * for many devices, the static config structure member names over- lapped the device's names for devcb_* functions; in these cases the members in the interface were renamed to have a _cb suffix * changed the driver_enumerator to only cache 100 machine_configs because caching them all took a ton of memory; fortunately this implementation detail is completely hidden behind the driver_enumerator interface * got rid of the macros for creating derived classes; doing it manually is now clean enough that it isn't worth hiding the details in a macro * Final bulk rename for 0.142: ensure that all members of Aaron Giles2011-04-011-66/+66 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver_device classes have an m_ prefix on them. When we eventually move functions using these into member functions, we will be able to remove the state-> pointers, and having the member variables prefixed will allow them to be distinguished from local variables. Some regex'es used (plus manually fixing the remaining stuff): In src/mame/... state->([a-zA-Z_][^_][a-zA-Z0-9_]*) state->m_\1 state->([^m]_[a-zA-Z0-9_]*) state->m_\1 state->m_save_item state->save_item state->m_save_pointer state->save_pointer (AM_BASE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_]) \1m_\2 (AM_BASE_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_][a-zA-Z0-9_]* *, *)([a-zA-Z_][^_]) \1m_\2m_\3 (AM_SIZE_MEMBER *\( *[a-zA-Z0-9_]+ *, *)([a-zA-Z_][^_]) \1m_\2 m__ m_ In src/mame/includes/... (\t[a-zA-Z0-9_<>]+[ \t]+[&*]*[ \t]*)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$ \1m_\2 (\t[a-zA-Z0-9_<>]+[ \t]*[&*]*[ \t]+)([a-zA-Z_][^_][][a-zA-Z0-9_]*;)$ \1m_\2 * Remove redundant item cpu from address_space, in favor of Aaron Giles2011-03-291-2/+2 | | | | | | | | | | | space->device(). S: space->cpu-> R: space->device\(\)\. S: space->cpu R: \&space->device\(\) * BIG update. Aaron Giles2011-03-291-37/+37 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant machine items from address_space and device_t. Neither machine nor m_machine are directly accessible anymore. Instead a new getter machine() is available which returns a machine reference. So: space->machine->xxx ==> space->machine().xxx device->machine->yyy ==> device->machine().yyy Globally changed all running_machine pointers to running_machine references. Any function/method that takes a running_machine takes it as a required parameter (1 or 2 exceptions). Being consistent here gets rid of a lot of odd &machine or *machine, but it does mean a very large bulk change across the project. Structs which have a running_machine * now have that variable renamed to m_machine, and now have a shiny new machine() method that works like the space and device methods above. Since most of these are things that should eventually be devices anyway, consider this a step in that direction. 98% of the update was done with regex searches. The changes are architected such that the compiler will catch the remaining errors: // find things that use an embedded machine directly and replace // with a machine() getter call S: ->machine-> R: ->machine\(\)\. // do the same if via a reference S: \.machine-> R: \.machine\(\)\. // convert function parameters to running_machine & S: running_machine \*machine([^;]) R: running_machine \&machine\1 // replace machine-> with machine. S: machine-> R: machine\. // replace &machine() with machine() S: \&([()->a-z0-9_]+machine\(\)) R: \1 // sanity check: look for this used as a cast (running_machine &) // and change to this: *(running_machine *) * Deprecate the old memory_install_* macros. Dynamic installation is now handled Aaron Giles2011-03-271-1/+1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directly by calling methods on the address_space, which have been expanded with aliases to cover all previous situations. In addition, variants with no mirror or mask value are provided to cover the common cases: memory_install_read*_handler(space, begin, end, mirror, mask, handler) ==> space->install_legacy_read_handler(begin, end [, mirror, mask], FUNC(handler)) memory_install_write*_handler(space, begin, end, mirror, mask, handler) ==> space->install_legacy_write_handler(begin, end [, mirror, mask], FUNC(handler)) memory_install_readwrite*_handler(space, begin, end, mirror, mask, rhandler, whandler) ==> space->install_legacy_readwrite_handler(begin, end [, mirror, mask], FUNC(rhandler), FUNC(whandler)) memory_install_read*_device_handler(space, device, begin, end, mirror, mask, handler) ==> space->install_legacy_read_handler(*device, begin, end [, mirror, mask], FUNC(handler)) memory_install_write*_device_handler(space, device, begin, end, mirror, mask, handler) ==> space->install_legacy_write_handler(*device, begin, end [, mirror, mask], FUNC(handler)) memory_install_readwrite*_device_handler(space, device, begin, end, mirror, mask, rhandler, whandler) ==> space->install_legacy_readwrite_handler(*device, begin, end [, mirror, mask], FUNC(rhandler), FUNC(whandler)) memory_install_read_port(space, begin, end, mirror, mask, port) ==> space->install_read_port(begin, end [, mirror, mask], port) memory_install_read_bank(space, begin, end, mirror, mask, bank) ==> space->install_read_bank(begin, end [, mirror, mask], bank) memory_install_rom(space, begin, end, mirror, mask, ptr) ==> space->install_rom(begin, end [, mirror, mask], ptr) memory_install_ram(space, begin, end, mirror, mask, ptr) ==> space->install_ram(begin, end [, mirror, mask], ptr) memory_unmap_read(space, begin, end, mirror, mask) ==> space->unmap_read(begin, end [, mirror, mask]) memory_nop_read(space, begin, end, mirror, mask) ==> space->nop_read(begin, end [, mirror, mask]) Below are the bulk search & replace regex'es used for this memory_install_read([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\) \4->install_legacy_read_handler\2\(\3\5FUNC\(\6\)\7\) memory_install_read([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\) \4->install_legacy_read_handler\2\(\3\5FUNC\(\6\)\7\) memory_install_write([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\) \4->install_legacy_write_handler\2\(\3\5FUNC\(\6\)\7\) memory_install_write([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\) \4->install_legacy_write_handler\2\(\3\5FUNC\(\6\)\7\) memory_install_readwrite([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\) \4->install_legacy_readwrite_handler\2\(\3\5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite([0-9]+)_handler( *)\(( *)([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\) \4->install_legacy_readwrite_handler\2\(\3\5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_read([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\) \4->install_legacy_read_handler\2\(\3\*\5, \6FUNC\(\7\)\8\) memory_install_read([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\) \4->install_legacy_read_handler\2\(\3\*\5, \6FUNC\(\7\)\8\) memory_install_write([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ )]+)( *)\) \4->install_legacy_write_handler\2\(\3\*\5, \6FUNC\(\7\)\8\) memory_install_write([0-9]+)_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ )]+)( *)\) \4->install_legacy_write_handler\2\(\3\*\5, \6FUNC\(\7\)\8\) memory_install_readwrite8_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite8_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite16_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite16_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite32_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite32_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite64_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+, *)0 *, *0 *, *([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_readwrite64_device_handler( *)\(( *)([^,]+), *([^,]+), *([^,]+,[^,]+,[^,]+,[^,]+, *)([^ ,]+)( *, *)([^ )]+)( *)\) \3->install_legacy_readwrite_handler\1\(\2\*\4, \5FUNC\(\6\)\7FUNC\(\8\)\9\) memory_install_read_port( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_read_port\1\(\2\4, memory_install_read_port( *)\(( *)([^,]+), * \3->install_read_port\1\(\2 memory_install_write_port( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_write_port\1\(\2\4, memory_install_write_port( *)\(( *)([^,]+), * \3->install_write_port\1\(\2 memory_install_readwrite_port( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_readwrite_port\1\(\2\4, memory_install_readwrite_port( *)\(( *)([^,]+), * \3->install_readwrite_port\1\(\2 memory_install_read_bank( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_read_bank\1\(\2\4, memory_install_read_bank( *)\(( *)([^,]+), * \3->install_read_bank\1\(\2 memory_install_write_bank( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_write_bank\1\(\2\4, memory_install_write_bank( *)\(( *)([^,]+), * \3->install_write_bank\1\(\2 memory_install_readwrite_bank( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_readwrite_bank\1\(\2\4, memory_install_readwrite_bank( *)\(( *)([^,]+), * \3->install_readwrite_bank\1\(\2 memory_install_rom( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_rom\1\(\2\4, memory_install_rom( *)\(( *)([^,]+), * \3->install_rom\1\(\2 memory_install_ram( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_ram\1\(\2\4, memory_install_ram( *)\(( *)([^,]+), * \3->install_ram\1\(\2 memory_install_writeonly( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *, \3->install_writeonly\1\(\2\4, memory_install_writeonly( *)\(( *)([^,]+), * \3->install_writeonly\1\(\2 memory_unmap_read( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->unmap_read\1\(\2\4\) memory_unmap_read( *)\(( *)([^,]+), * \3->unmap_read\1\(\2 memory_unmap_write( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->unmap_write\1\(\2\4\) memory_unmap_write( *)\(( *)([^,]+), * \3->unmap_write\1\(\2 memory_unmap_readwrite( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->unmap_readwrite\1\(\2\4\) memory_unmap_readwrite( *)\(( *)([^,]+), * \3->unmap_readwrite\1\(\2 memory_nop_read( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->nop_read\1\(\2\4\) memory_nop_read( *)\(( *)([^,]+), * \3->nop_read\1\(\2 memory_nop_write( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->nop_write\1\(\2\4\) memory_nop_write( *)\(( *)([^,]+), * \3->nop_write\1\(\2 memory_nop_readwrite( *)\(( *)([^,]+), *([^,]+,[^,]+), *0 *, *0 *\) \3->nop_readwrite\1\(\2\4\) memory_nop_readwrite( *)\(( *)([^,]+), * \3->nop_readwrite\1\(\2 * Created new enum type address_spacenum for specifying an address Aaron Giles2011-03-271-3/+3 | | | | | | | | | | | | space by index. Update functions and methods that accepted an address space index to take an address_spacenum instead. Note that this means you can't use a raw integer in ADDRESS_SPACE macros, so instead of 0 use the enumerated AS_0. Standardized the project on the shortened constants AS_* over the older ADDRESS_SPACE_*. Removed the latter to prevent confusion. Also centralized the location of these definitions to memory.h. * Added device_t::memory() to fetch a reference to the memory interface, Aaron Giles2011-03-271-4/+4 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or assert if not present. Split address_space::install_[legacy_]handler into install_[legacy_]read_handler, install_[legacy_]write_handler, and install_[legacy_]readwrite_handler. Added variants of address_space handler installers which don't take mirror or mask parameters, since this is by far the most common case. Deprecated API cleanup. Simple search & replace: cpu_suspend ==> device_suspend cpu_resume ==> device_resume cpu_yield ==> device_yield cpu_spin ==> device_spin cpu_spinuntil_trigger ==> device_spin_until_trigger cpu_spinuntil_time ==> device_spin_until_time cpu_spinuntil_int ==> device_spin_until_interrupt cpu_eat_cycles ==> device_eat_cycles cpu_adjust_icount ==> device_adjust_icount cpu_triggerint ==> device_triggerint cpu_set_input_line ==> device_set_input_line cpu_set_input_line_vector ==> device_set_input_line_vector cpu_set_input_line_and_vector ==> device_set_input_line_and_vector cpu_set_irq_callback ==> device_set_irq_callback More complex changes: device_memory(device) ==> device->memory() device_get_space(device, spacenum) ==> device->memory().space(spacenum) cpu_get_address_space(cpu, spacenum) ==> cpu->memory().space(spacenum) cputag_get_address_space(mach, tag, spacenum) ==> mach->device("tag")->memory().space(spacenum) cputag_get_clock(mach, tag) ==> mach->device("tag")->unscaled_clock() cputag_set_clock(mach, tag, hz) ==> mach->device("tag")->set_unscaled_clock(hz) Some regex'es for the more prevalent cases above: S: cpu_get_address_space( *)\(( *)([^,]+)( *), * R: \3->memory().space\1\(\2 S: cputag_get_address_space( *)\(( *)([^,]+)( *),( *)([^,]+)( *), * R: \3->device\1\(\2\6\7\)->memory().space\1\(\2 S: cputag_get_clock( *)\(( *)([^,]+)( *),( *)([^ )]+) *\) R: \3->device\1\(\2\6\7\)->unscaled_clock\(\) * Converted namco/thepit/toaplan/unico/upl/valadon/veltmjr/venture/vsystem/ Aaron Giles2011-03-101-70/+95 | | | | | | zaccaria to driver_device. Also simplified unico and disentangled gridlee from balsente. [Atari Ace] * Modified video update system. [Miodrag Milanovic] Miodrag Milanovic2011-02-241-2/+2 | | | | | | | | | | | | | | | | | | | | Screen update function is now per screen device (it was before but was attached to machine driver) MCFG_VIDEO_UPDATE -> MCFG_SCREEN_UPDATE MCFG_VIDEO_EOF -> MCFG_SCREEN_EOF EOF is now executed for all screens, so for all existing it is defined just for one screen. This part will be updated in future. Note that there are now screen_update and screen_eof virtual functions for "modern" drivers which are called same as they did before. All drivers are updated and in places where update function was separated per screen I did name separate function. This change will enable us to put screen definition fully into device. * Ok, last major rename for this round: Aaron Giles2011-01-011-3/+3 | | | | | | | | | | | | | | | | memory_region() == machine->region()->base() memory_region_length() == machine->region()->bytes() region_info -> memory_region Regex searches: S: memory_region( *)\(( *)([^,&]+), *([^)]+)\) R: \3->region\1\(\2\4\)->base\(\) S: memory_region_length( *)\(( *)([^,&]+), *([^)]+)\) R: \3->region\1\(\2\4\)->bytes\(\) * MDRV_* -> MCFG_* Aaron Giles2010-12-311-26/+26 | | | | | There hasn't been a machine driver for many years. * Added templates required_shared_ptr<> and optional_shared_ptr<> which Aaron Giles2010-09-041-2/+3 | | | | | | | | | | | | | | | | | | | | | | work just like required_device<> and optional_device<> for retrieving a pointer by tag from an address space that specifies AM_SHARE("tag"). Also added templates required_shared_size<> and optional_shared_size<> for retrieving the size of the AM_SHARE region. Created a new generic NVRAM device. It can be configured to default to 0-fill, 1-fill, random-fill, or custom fill. In all cases, a same-named memory region overrides the default fill. The address range where the NVRAM can be found is now identified by an AM_SHARE() region of the same tag as the NVRAM device. Drivers can also explicitly configure a separately-allocated NVRAM region via nvram_device::set_base(). Replaced all instances of MDRV_NVRAM_HANDLER(generic_*) with MDRV_NVRAM_ADD_*("nvram"). Replaced all AM_BASE_GENERIC/AM_SIZE_GENERIC(nvram) with AM_SHARE("nvram"). For all remaining drivers that referenced the generic.nvram directly, changed them to hold a required_shared_ptr<UINTx> to the NVRAM in their driver state, and use that instead. Removed nvram and nvram_size from the generic_ptrs. * Changed driver_data objects to be devices. Replaced the driver_data_t Aaron Giles2010-09-021-1/+1 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | class with a new driver_device class, which is the base class for all driver_data objects now. The new driver devices are added as the first device in the device list, with a tag of "root"; all other devices are now owned by the driver device. Moved core callbacks (machine_start/_reset, sound_start/_reset, video_start/_reset/_eof/_update, and palette_init) into device configuration parameters on these new devices. The driver_device base class overrides device_start(), ensures all other devices have been started, and then calls, in order, the following overridable methods: find_devices() - new, used to locate devices prior to DRIVER_INIT DRIVER_INIT function from the game driver palette_init() - by default calls the MDRV_PALETTE_INIT function driver_start() - new machine_start() - by default calls the MDRV_MACHINE_START function sound_start() - by default calls the MDRV_SOUND_START function video_start() - by default calls the MDRV_VIDEO_START function Similarly, the driver_device class overrides device_reset() and then calls these methods in order: driver_reset() - new machine_reset() - by default calls the MDRV_MACHINE_RESET function sound_reset() - by default calls the MDRV_SOUND_RESET function video_reset() - by default calls the MDRV_VIDEO_RESET function To accommodate these changes, initialization order is slightly altered from before. The tilemap, video, sound, and debug systems are now initialized prior to the devices' start. And the user callbacks for DRIVER_INIT, PALETTE_INIT, MACHINE_START, SOUND_START, and VIDEO_START are all called back-to-back. The net effect should be similar, however. Added methods (optional_device and required_device) to the new driver_device class to find devices, intended to be used from the find_devices() callback. See harddriv.h and beathead.h for examples of usage. Changed device_t::subtag to only prepend a prefix if the device is not the 'root' device, in order to keep compatibility with existing tag searching. Changed device startup to actively reorder devices when they report missing dependencies. This ensures that the reset functions get called in the same order that the start functions did. Bulk updated drivers as follows: First removed the old static alloc function from the driver_data_t: S: [ \t]*static driver_device \*alloc *\( *running_machine *\&machine *\) *\{ *return auto_alloc_clear *\( *\&machine *, *[a-zA-Z0-9_]+_state *\( *machine *\) *\); *\}[\r\n]* R: Then switched from driver_data_t to driver_device: S: driver_data_t R: driver_device Then changed the constructors to pass the correct parameters: S: ([a-zA-Z0-9_]+)_state *\( *running_machine *\&machine *\)([\r\n\t ]+): *driver_device *\( *machine *\) R: \1_state\(running_machine \&machine, const driver_device_config_base \&config\)\2: driver_device\(machine, config\) * Changed the MACHINE_DRIVER_* macros, as follows: Aaron Giles2010-09-011-2/+2 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Renamed MACHINE_DRIVER_* to MACHINE_CONFIG_* to match the name of the object it actually describes. The MDRV_* prefix may eventually be bulk updated at some point, but not now. 2. MACHINE_CONFIG_START() now takes a driver_data_t-derived class as a required second parameter. This means that MDRV_DRIVER_DATA() is no longer required, and every "root" machine config *must* specify a driver data class (or driver_data_t itself if the driver has not yet been updated to use driver data). 3. New MACHINE_CONFIG_DERIVED() macro defines a machine_config that is derived from another machine_config. This takes the place of the very typical MACHINE_DRIVER_START()/MDRV_IMPORT_FROM() combination. 4. New MACHINE_CONFIG_FRAGMENT() macro defines a partial machine_config that can only be included in another "root" machine_config. This is also used for machine_configs that are specified as part of a device. 5. Changed MDRV_IMPORT_FROM() to MDRV_FRAGMENT_ADD() to more accurately describe what is happening. 6. Added asserts to the above three macros to ensure they are properly used. Updated all machine drivers to use the new macros. Search & replace lists below cover 99% of the changes, with just a few manual fixups. S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*MDRV_DRIVER_DATA\( *([a-zA-Z0-9_]+) *\) R: MACHINE_CONFIG_START\( \1, \2 \) S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*/\* driver data \*/[\r\n\t ]*MDRV_DRIVER_DATA\( *([a-zA-Z0-9_]+) *\) R: MACHINE_CONFIG_START\( \1, \2 \) S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*MDRV_IMPORT_FROM\( *([a-zA-Z0-9_]+) *\) R: MACHINE_CONFIG_DERIVED\( \1, \2 \) S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\)[\r\n\t ]*/\* basic machine hardware \*/[\r\n\t ]*MDRV_IMPORT_FROM\( *([a-zA-Z0-9_]+) *\) R: MACHINE_CONFIG_DERIVED\( \1, \2 \)\r\n\r\n\t/\* basic machine hardware \*/ For all files outside of mame/drivers.... S: MACHINE_DRIVER_START R: MACHINE_CONFIG_FRAGMENT in all non-drivers For all files within mame/drivers.... S: MACHINE_DRIVER_START\( *([a-zA-Z0-9_]+) *\) R: MACHINE_CONFIG_START\( \1, driver_data_t \) S: MDRV_IMPORT_FROM R: MDRV_FRAGMENT_ADD S: MACHINE_DRIVER_END R: MACHINE_CONFIG_END S: MACHINE_DRIVER_NAME R: MACHINE_CONFIG_NAME S: MACHINE_DRIVER_EXTERN R: MACHINE_CONFIG_EXTERN Final step: run mame -valid and fix the incorrect macros at the lines where the asserts show up. * documentation: Cleaned up company names [hap] Michaƫl Banaan Ananas2010-05-251-1/+1 | * Bulk driver.h -> emu.h switch. Aaron Giles2010-01-101-1/+1 | * Cleaned up braces in the code so that they are properly balanced. [Atari Ace] Aaron Giles2009-12-281-1/+1 | * Results of running the latest srcclean.