summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/devfind.cpp
Commit message (Collapse)AuthorAgeFilesLines
* emu: correct some file headers (nw) hap2020-06-191-1/+1
|
* Make osd_printf_* use util/strformat semantics. Vas Crabb2019-09-261-2/+2
| | | | | | | | | | | | | | | | | (nw) This has been a long time coming but it's here at last. It should be easier now that logerror, popmessage and osd_printf_* behave like string_format and stream_format. Remember the differences from printf: * Any object with a stream out operator works with %s * %d, %i, %o, %x, %X, etc. work out the size by magic * No sign extending promotion to int for short/char * No widening/narrowing conversions for characters/strings * Same rules on all platforms, insulated from C runtime library * No format warnings from compiler * Assert in debug builds if number of arguments doesn't match format (nw) Also removed a pile of redundant c_str and string_format, and some workarounds for not being able to portably format 64-bit integers or long long.
* (nw) Clean up the mess on master Vas Crabb2019-03-261-12/+93
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-93/+12
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* (nw) clean up trivial stuff - the device delegate boilerplate is ugly, I ↵ Vas Crabb2019-02-191-12/+15
| | | | will address it ASAP
* srcclean and cleanup (nw) Vas Crabb2019-01-271-1/+1
|
* Add object finder for address spaces AJR2019-01-221-1/+79
| | | | (nw) The constructor and set_tag methods for required_address_space and optional_address_space work slightly differently from other finders in that they take the address space number as an extra argument. There is also an option to request a space having a specific data width, and validation checks this as well as the space number. There is also no (required|optional)_address_space_array, but that shouldn't really be necessary since devices shouldn't need large numbers of these finders.
* Move ROM loading macros to romentry.h and remove romload.h from emu.h (nw) AJR2018-06-241-0/+1
|
* devfind: add asserts to detect tag being set after object resolution (nw) Vas Crabb2018-05-311-1/+3
|
* Set finder tag relative to current device being configured rather than Vas Crabb2018-04-301-7/+18
| | | | | | | | | | | | | | the finder's owner. This meand you no longer need to care about the your relationship to the object being configured and a lot of ^ and : can disappear. There's a bit reduction in string pasting in macros from this. Yes, I have to make this apply to devcb etc. as well, but that's a job for another day. There's probably at least one thing broken by this where optional objects are involved. Most things can be solved by just getting rid of the now-problematic ^ and : prefixes.
* Start adding stuff for iterating ROM entries in a more C++ way without ↵ Vas Crabb2017-09-221-4/+4
| | | | needing to allocate everywhere, improve performance of -listxml by another 10% or so
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-54/+54
| | | | | | | | | | | | * New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h" * Get rid of import of cstdint types to global namespace (C99 does this anyway) * Remove the cstdint types from everything in emu * Get rid of U64/S64 macros * Fix a bug in dps16 caused by incorrect use of macro * Fix debugcon not checking for "do " prefix case-insensitively * Fix a lot of messed up tabulation * More constexpr * Fix up many __names
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-54/+54
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* Prepare to make object finders behave like a pointer, not a half-pointer ↵ Vas Crabb2016-08-261-5/+60
| | | | half reference part 1 (nw)
* * Doxyfy a significant chunk of devfind.h Vas Crabb2016-08-251-16/+38
| | | | | | * Eliminate a lot of boilerplate code from devfind.h * Keep instantiation of templates in one place to improve build time * Remove some dangerous accessors
* Fix missing region report when DEVICE_SELF is used [O. Galibert] Olivier Galibert2016-08-151-2/+3
|
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-2/+2
|
* Iterate over devices C++11 style AJR2016-04-181-4/+7
| | | | | | Replace the old device_iterator and its specialized versions with functionally equivalent classes that use standard operators to yield references to devices/interfaces rather than pointers. With range-based for loops, they no longer have to be stored in named variables, though they can also be reused concurrently since the iteration state is now maintained by a subclass. Add a few more typical getters to device_t::subdevice_list.
* Devfind revision phase 1, cleaning out some legacy stuff AJR2016-04-071-3/+52
| | | | | | | | - Eliminate the cached device_t::m_region pointer and its region() getter method. Devices that need to bind to a region with the same tag should use optional/required_memory_region or optional/required_region_ptr with DEVICE_SELF as the subtag; this improves error checking. (DEVICE_SELF has been moved to device.h for greater visibility in the source.) - Allow required/optional_region_ptr to specify a specific length which must match that of the region found. - Implement finder_base::finder_tag() getter for diagnostic purposes. - Perform some (not very efficient) validity checks on memory region finders instead of allowing them to automatically pass. - Privatize device_memory_interface::m_addrspace.
* reverting: Miodrag Milanovic2016-01-201-7/+7
| | | | | | | SHA-1: 1f90ceab075c4869298e963bf0a14a0aac2f1caa * tags are now strings (nw) fix start project for custom builds in Visual Studio (nw)
* tags are now strings (nw) Miodrag Milanovic2016-01-161-7/+7
| | | | fix start project for custom builds in Visual Studio (nw)
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-6/+6
|
* Some cleanups and init fixes with help of ReSharper C++ (nw) Miodrag Milanovic2015-11-111-1/+1
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+125