MAMETesters Bugs Fixed----------------------01815: [Save/Restore] All Sets: Saved machine states do not properly adjust to changes in -samplerate (Aaron Giles)01671: [Interface] every set with PORT_MODIFY used for DIPs (e.g. arknoidj): the modified dipswitches are always listed at the bottom of the list (Aaron Giles)01814: [Sound] YM2608 games (tail2nos, sformula, wc90, mechatt): Only basic music, no more samples (couriersud)01497: [Graphics] numanath, numanatj: Graphics corruption on title screen. (Phil Stroffolino)01804: [Core] carnevil, sfrush: Seattle games crash on startup (Aaron Giles)

* Input ports are now maintained hierarchically. At the top level are input ports, which contain a list of fields. Each field represents one or more bits of the port. Certain fields such as DIP switches and configuration switches contain a list of settings, which can be selected. DIP switch fields can also contain a list of DIP switch locations.

* Normalized behavior of port overrides (via PORT_INCLUDE or by defining multiple overlapping bits). All fields within a port are kept in strict increasing bit order, so altered DIP switches are now kept in the appropriate order. This addresses MAMETesters bug 01671.

* Live port state is now fully separate from configured state. This is manifested in a similar way to devices, where a const list of ports can be managed either offline or live. Each port has a pointer to an opaque set of live state which is NULL when offline or valid when live. Each port also has a running_machine * which is also NULL when offline.

* Because of this new arrangement, the conversion from tokens to a list of ports now requires reasonably complex memory allocation, so these port lists must be explicitly allocated and freed (they are not mantained by automatic resource allocation).

* Custom and changed callbacks now take a pointer to a field config instead of a running machine. This provides more information about what field triggered the change notification. The machine can be found by referenced field->port->machine.

* The inptport.c module has been cleaned up and many ambiguities resolved. Most of this is internal, though it did result in osd_customize_inputport_list() being changed to osd_customize_input_type_list(). The parameter to this function is now a linked list instead of an array, and the structures referenced have been reorganized somewhat.

* Updated config.c to pass machine parameters to its callbacks.

* Updated validity checks, XML output, and UI system to handle the new structures.

* Moved large table of default input settings to a separate include file inpttype.h.

* Removed gross hacks in trackfld and hyperspt NVRAM. These may be broken as a result.

Further Namco NA-1 changes: [Phil Stroffolino] * Adjusted alternate palette handling weights to more accurately match real hardware - text anti-aliasing is much more noticable. * Adjustment to roz layer priority - prevents roz layer from incorrectly being displayed over backgrounds in some games (i.e. numanathj) * Added a mask when processing the roz tilemap to avoid defects in emeraldj

UML: * Added back-end validation mechanism, and a handful of tests as examples. This will be expanded in the future. * Added several new opcodes: - SAVE dumps the entire virtual machine state to a struct - RESTORE applies the data in a struct to the live state - LZCNT counts leading zeros in an operand - XTRACT extracts a bitfield to another register (rlwinm) - INSERT inserts a bitfield into a register (rlwimi) * Added new back-end function get_info() which returns information from the back-end about how many actual registers will be mapped.

x64 back-end: * Implemented all new opcodes. * Implemented get_info() function. * Added defines for new Penryn opcodes to x86emit.h. * Added support for ROUNDSS and ROUNDSD on Penryn architectures. This hasn't been tested. If you have a Penryn-based system, give it a try. * Fixed several bugs relating to shifts/rotates and optimizing out cases incorrectly.

C back-end: * Implemented all new opcodes. * Implemented get_info() function. * Cleaned up operand sizing. * Fixed several errors that made it not work on bigendian systems

MIPS DRC: * Added some instrumentation for the MMU. To enable it, turn on PRINTF_MMU at the top of the file. * Fixed front-end so that virtual no-op instructions are still targeted as branch targets. * Fixed front-end to mark the beginning of each sequence as needing TLB validation, since any sequence can be jumped to from anywhere. * Redid the MIPS3 TLB implementation. Fixed the exception vector and type handling. Changed the bitfields to directly map from the MIPS TLB format. Added distinction between TLB fill and TLB valid/modified exceptions. * Added separate modes for user, supervisor, and kernel modes. Each mode does proper verification of addresses now and generates address errors for invalid accesses. * Fixed several bugs in the TLB implementation; not everything works yet but it's a lot closer. * Made COP0 access checking mandatory in non-kernel modes. * Fixed several crashes when recompiling virtual no-ops. * Fixed TLB bug where entries for virtual address 0 were present by default. * Fixed bug in the map variable implementation that would sometimes result in incorrectly recovered values. * Implemented IDT instructions. All invalid instruction asserts are now runtime-only. * Added support to map a few common registers to machine registers if the machine supports it. Currently only x64 on Windows has enough free registers to do so, though PowerPC will almost certainly be able to take advantage of this. Gives a minor speedup. * Updated to use INSERT and XTRACT where appropriate. * Cleaned up register usage to free up one machine register for x64 on Linux.

Corrected several bugs in the emulation of the saturn CPU. These corrections are needed to make new HP48 drivers (to be submitted to MESS imminently) work. [Antoine Mine]

Eliminated a large number of global Machine references. Added machineparameters to IRQ callbacks throughout the system to help removemore. Reduced the number of files needing deprecat.h by ~200.[Atari Ace]