Commit Graph

23 Commits

Author SHA1 Message Date
AJR
3cfd31d798 Miscellaneous #include cleanup 2021-11-20 18:10:46 -05:00
AJR
91921618c2 Much more core std::string_view modernization
- Remove corestr.h from emu.h; update a few source files to not use it at all
- Change strtrimspace, strtrimrightspace and core_filename_extract_* to be pure functions taking a std::string_view by value and returning the same type
- Change strmakeupper and strmakelower to be pure functions taking a std::string_view and constructing a std::string
- Remove the string-modifying version of zippath_parent
- Change tag-based lookup functions in device_t to take std::string_view instead of const std::string & or const char *
- Remove the subdevice tag cache from device_t (since device finders are now recommended) and replace it with a map covering directly owned subdevices only
- Move the working directory setup method out of device_image_interface (only the UI seems to actually use the full version of this)
- Change output_manager to use std::string_view for output name arguments
- Change core_options to accept std::string_view for most name and value arguments (return values are still C strings for now)
- Change miscellaneous other functions to accept std::string_view arguments
- Remove a few string accessor macros from romload.h
- Remove many unnecessary c_str() calls from logging/error messages
2021-01-20 18:06:15 -05:00
hap
128640144a emu: correct some file headers (nw) 2020-06-19 12:38:41 +02:00
Vas Crabb
6f5d2ad326 Save states should not be break when changing output. Also get rid of a few dozen output().set_value(...) calls in favour of output finders. (nw)
This has the detrimental effect that outputs used in layouts will get the default value from the last element in the last view that uses them _after_ devices are started.  If drivers/devices set initial output values on start rather than reset this could cause a problem.
2019-12-13 20:08:31 +11:00
Vas Crabb
ed2992101c save/restore otuput values in save states 2019-12-13 14:41:35 +11:00
AJR
1185fb25f3 devcb updates (nw)
- Write callbacks can now be configured as `OUTPUT("item_name")`. This behaves equivalently to a zero-dimensional `output_finder`, while eliminating the need to instantiate and resolve this in driver classes separately from the callback itself.
- The width of a callback's default mask now properly depends on its type (as was half-implemented before), instead of always being reset to 0xffffffffffffffff when actually configured. This allows MCFG_DEVCB_INVERT to work with line write callbacks as one might logically expect.
2018-04-29 19:48:38 -04:00
Vas Crabb
e068541f5e start getting brutal on output.h (nw) 2018-03-02 00:14:28 +11:00
Vas Crabb
e6e9ef439c Add N-dimensional output finder to avoid runtime string hashes - intlc440 in RUN mode goes from 800% to 2000% unthrottled on 2010 i7 notebook 2017-07-29 21:32:49 +10:00
Vas Crabb
8179a84458 Introduce u8/u16/u32/u64/s8/s16/s32/s64
* 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
2016-11-19 05:38:48 +11:00
Miodrag Milanovic
6b18f90438 Revert "Added IS_ENABLED, so we have compiler check for non used part, it is checked but not compiled in (nw)"
This reverts commit c0407f073b.
2016-11-12 09:12:36 +01:00
Miodrag Milanovic
c0407f073b Added IS_ENABLED, so we have compiler check for non used part, it is checked but not compiled in (nw)
false and true now used instead of integer where used as bool
2016-11-11 18:50:14 +01:00
Miodrag Milanovic
2027d59e7f Do not use FUNC in delegate where applicable (nw) 2016-11-06 14:11:55 +01:00
Miodrag Milanovic
ddb290d5f6 NOTICE (TYPE NAME CONSOLIDATION)
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
2016-10-22 13:13:17 +02:00
AJR
010bd4265d Make output_manager::find_item much more efficient (nw) 2016-08-24 09:12:10 -04:00
ajrhacker
71053ad9dd feversoc: Hook up EEPROM; remap buttons (#1028)
feversoc.cpp: Hook up EEPROM; remap buttons, hook up lamps and serial RTC [AJR];

rtc4543.cpp: More complete implementation with better logging features. Added JRC6355E variant used by feversoc. [AJR]
2016-07-05 17:52:30 +02:00
Miodrag Milanovic
dba7c1ac94 Placed back old output system as module "-output windows" need more things cleaned (nw) 2016-06-05 21:11:56 +02:00
Miodrag Milanovic
89c5e1f681 Various cleanups suggested by static analyzer (nw) 2016-04-24 12:58:31 +02:00
Miodrag Milanovic
b1d6f6d63f Cleanups and version bump 2016-01-27 08:12:00 +01:00
Miodrag Milanovic
f9f908d48b modernize output_manager (nw) 2016-01-10 18:41:17 +01:00
Miodrag Milanovic
726f7958ca move things around (nw) 2016-01-10 11:15:10 +01:00
Miodrag Milanovic
379581fb36 macro removal INLINE -> static inline (nw) 2015-12-12 08:58:57 +01:00
Miodrag Milanovic
91605d3f4d clang-modernize part 1 (nw) 2015-12-03 18:17:25 +01:00
Miodrag Milanovic
7c19aac60e Rename *.c -> *.cpp in our source (nw) 2015-11-08 12:56:12 +01:00