6805 cleanup:
* Reduce massive amounts of redundancy by templating opcode handlers
* Replace the epic switch statement with a dispatch table
* Fix timings for a few instructions
* should be #included after other headers and after optionally #defining VERBOSE
* usage samples in z80scc.cpp and m68705.cpp
68705: add lots of logging to help trace issues
I'm doing this in response to a compilation error on MSVC 2015. As far as I can tell, this is a bug in the compiler. My basis for asserting this is that placing the following declaration within the 'endpoint.on_open = <<lambda>>' gives the same compilation error:
const std::function<void(void)> mycallback = [](void) {};
Whereas moving that logic outside of the 'endpoint.on_open = <<lambda>>' does not give an error.
Normally I don't like working around buggy compilers, but in this case the callback is supposed to be optional anyways.
(nw) MAME's architecture for software loading remains gruesomely overcomplicated, and this makes it even less efficient than it already was. However, I think more invasive cleanups would best be left until later.
- Changed how input sequences are assigned to service mode DIP switches. The frontend now assigns them the default sequence for the non-toggle service mode/test switch (not necessarily the F2 key, the previously hardcoded default) unless the machine happens to have one of those as well (as is somewhat common with gambling games).
- All DIP and configuration switches are automatically defined as toggle fields to make assigning input codes to them easier.
- tms32025: Correct space of internal data maps
- mc1000: Separate out opcodes map
- addrmap.cpp: Replace a few debug asserts with friendlier error messages (makes validation less dangerous in debug builds)
- Allow stringing multiple callbacks together recursively. Chained callbacks will be read or written in sequence, and each can be configured with its own type and mask/shift/XOR parameters.
- Chained input callbacks cannot have overlapping masks (there's no such thing as a free multiplex). Chained output callbacks have no such restriction.
- Remove the constant parameter for the LOGGER callback type: it makes no sense for output, was always zero in existing usage, and is now unnecessary with callback chaining.
- Change LOGGER behavior for writes to log the user-defined message only if the output as masked is nonzero. With callback chaining, this can be used to monitor when individual bits become active.
- Constant read callbacks can no longer have MCFG_DEVCB_XOR or MCFG_DEVCB_INVERT specified (makes no sense in this context).
- Add a MEMBANK callback type to allow output bits to be used for bank-switching.
- Add ASSERTLINE and CLEARLINE callback types that raise or lower an interrupt line if the selected bit of the written value is active. These are intended for where periodic or ready-pulse signals from devices are used to trigger IRQs that the CPU program will independently acknowledge.
- Add MCFG_DEVCB_BIT as shorthand for masking and shifting out an individual bit for a callback.
- Removed DEVCB_LINE_DISPATCH_<n>. Where we're going, we don't need line dispatcher devices.
The incompatibility of compilers with regard to post-C90 printf string formats is shockingly bad. There seems to be no easy way to format a 64-bit value and please both gcc and clang, let alone MSVC.
selmenu: use LRU cache so icons don't all need to be reloaded on scroll
uismall.bdf: set default character for missing glyphs
rendfont.cpp:
* encapsulate many BDF and BDC handling details
* make file I/O 64-bit clean, check for allocation errors
* more solid BDF parser with error messages and trace logging
* fix heap smash when building bitmaps for BDF fonts
* extend BDC format to support high planes and default character
* render default character if glyph not found for BDF/BDC
* move stuff to namespace util::xml
* scope down some enums
* split config load/save delegate types
* make config load take const so it can't mangle data
* 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