Take note that I eliminated make_readonly(); here is why I think the calls were unnecessary:
1. All image loads through softlists are done through common_process_file(), and thus going to be readonly anyways
2. The cassette.cpp call to make_readonly() seems to be a residual hack, if a failure occurs the image will be unloaded anyways
- Create class ui::machine_info for holding calculated machine info and generating descriptive strings for the UI. This absorbs a number of unimportant core functions that existed only for the UI's convenience.
- Alter a bunch of address maps so all validity checks pass. These includes global address masks in Hexaa and the Newbrain FDC (regression testing should be done here).
- Remove the Lisa wraparound read/write handlers.
- In machines that store their settings and/or bookkeeping logs in some form of non-volatile memory, "Memory Reset" will reset them to some system-provided default.
- This replaces all existing inputs named "Memory Reset" and a few simply named "Reset" which are known to do this rather than reboot the system (a confusion to be avoided, though many systems will only acknowledge this input at boot time); others should be checked.
- The default key binding (F1) for this new input type is chosen partly to avoid conflicts with those used by gambling/mahjong games which are currently the only systems to use this, though broader use is envisioned.
to unpack tiny_rom_entry structures at runtime.
WARNING - I've done preliminary testing on a tiny build (pacman works), but nothing more. I know for a fact that a full compile fails
- Eliminate read_safe as a global function and make it a method of optional_ioport (and required_ioport, for which it makes less sense).
- New constructor for optional_ioport_array and required_ioport_array using std::initializer_list to specify tag list
- Remove pointer/reference conversion operators for required_ioport and optional_ioport. Explicit getters like found() and target() are now required when dereferencing isn't wanted. Many drivers have been changed to use required_ioport_array and optional_ioport_array to make this cleaner.
- Update numerous drivers that were using read_safe to use I/O port finders generally. Port names have been kept the same as far as possible to avoid breaking saves.(Some of the optional finders should probably be required.)
- Give edfbl and monkelf their own memory maps so hacky input reading routines can be removed.
- Clean up some legacy static handlers in amiga.cpp and cubo.cpp.
I'm still not 100% satisfied with this patch. While I got rid of the weird path when hook_proc() was called for a software list item,
I still don't like the whole m_init_phase infrastructure in devices, which seems to be an arbitrary piece of state. Baby steps...
This is a redo of the split first submitted in #137, with the following differences:
* The newly refactored rom_entry data structure is used
* I've kept the refactored softlist code in src/emu, in order to defer the mechanical process of moving it
* I've kept includes of softlist[_dev].h out of diimage.h, so that changes to either do not trigger an emu.h recompilation
* Obviously, this goes against the latest master
The issue is that I expected any softlist items passed to devices to be fully qualified (e.g. - apple2e:flop1:agentusa) when in reality, they might not be. Therefore, I changed the regex that identifies softlist items passed to devices from:
\\w+\\:\\w+\\:\\w+
to:
\\w+(\\:\\w+\\:\\w+)?
In the interests of removing burdens from client code, I also changed the following:
- filetype() will always return the file extension in lower case
- device_image_interface::filetype() will return the correct extension for files loaded as a part of softlists
- The code for extracting a file extension is now encapsulated in core_filename_extract_extension()
Client code has been updated
- Removed some c_str() calls when using util::zippath_parent()
- Removed the error code return value from set_image_filename()
- Consolidated error code translation (osd_file::error ==> image_error_t) in image_error_from_file_error()
- Other cosmetic improvements
- Always print the name of each driver checked with -validate -verbose, and print before beginning the check to help detect crashes
- Fix already_checked test so that softlists get validated the first time, not every time but the first
- Remove #include "validity.h" where not required (nw)
- attotime::from_double cannot be constexpr because it uses floor (nw)
* Mark lots of things constexpr in attotime and turn macros into functions
* Add base classes for HLE matrix keyboard and buffered RS232 device
* Make generic keyboard/terminal more usable
* Keyboard has configurable typematic delay/rate
* Keyboard has selectable JIS/ANSI layout
* Keyboard handles simultaneous keypresses more intuitively
* Keyboard uses meta to set high bit
* Terminal has configurable auto LF on CR, auto CR on LF and local echo
* Terminal has audible bell
* Untangle Olivetti M20 keyboard from generic_keyboard
* Add notes to Olivetti M20 keyboard emulation
* Make Olivetti M20 keyboard match physical layout
* Untangle RM Nimbus keyboard from generic_keyboard
* Fix natural keyboard mode with RM Nimbus
* Untangle x68k keyboard from generic_keyboard
* Improve x68k key names and mapping
* Improve x68k typematic behaviour
* Untangle QX-10 keyboard from generic_keyboard
* Keep NGEN keyboard barely working
- Remove the loaded_through_softlist virtual method and add a boolean getter with the same name, replacing a few variables that provided similar but redundant flags.
- Remove call_softlist_load, which the previous change reduces to a simple, unnecessary wrapper.
- Fix stupid logic errors in software_list_device::internal_validity_check
- Allow info and feature list entries to provide an empty string as the value
- Change a couple of null publisher entries in vz_cass.xml to "<unknown>"
* Added several missing functions to rgbgen
* Fixed logical shift right in rgbgen
* Fixed sra that should be sra_imm in rdptpipe
* Added some simple SSE4.1 optimisations in rgbsse
* Re-organised rgbsse, rgbvmx and rgbgen to be in more logical order
* Fixed return on some modifying operators
* Made some more reference parameters const
* Removed inline qualifier from a number of methods as it's implied when body is present at declaration
* Mark some constructors explicit
- Individual crosshairs are now first-class objects, rather than bits of state scattered across half a dozen arrays. The class is named render_crosshair with a view towards incorporating crosshairs into layouts in the future, rather than managing them separately as crosshair_manager still does now.
- Removed the old crosshair_user_settings interface for adjusting crosshair settings, since the UI can access the new crosshair objects directly.
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]
Fix problem using layout_element::texture in vector - destructor frees resources but generated copy/assignment operators don't release them, leading to a problem any time vector expands or element is added/removed anywhere but end
It's actually a very old bug that was uncovered. Direct access update
mistaked the per-handler mask and the global mask. As it happened the
per-handler mask was often the global mask, but I made the frontend
*way* more agressive w.r.t masks now. So the bug became way more
visible.
- Added AM_SELECT/addrselect field. Replaces the old
AM_MIRROR/AM_MASK combo used to mirror a handler and get the mirrored
bits in the offset.
- Removed mask and/or mirror from where it didn't belong. Simplified
a lot of instances of mask that just weren't needed, especially in bus
handlers. Used the short forms of install handlers where possible.
- Replaced the 60s hippy, "It's cool man" range parameter handling in
map_range that tried to guess what was meant when the values passed
were not entirely sensible, by a cranky, diner waitress-turned IRS
auditor curmudgeon. Main control function has a series of 14 tests
just to find a reason to fatalerror out your requests. You have
been warned.
Some drivers, hopefully not many, will fail the gate-guarding
bureaucrat trials. Should be easy to fix actually, I worked on the
error messages. A full regression test would be welcome.
* Eliminate globals/file statics
* Remove lots of stuff from global scope
* Use std::function for custom command registration
* Eliminate some trampolines
* Build fixes from Vas Crabb and balr0g
* added simple procedural texture for vectors with rounded line ends and beam smoothness
* added optional -vector_beam_smooth option
* removed -antialias option, antialiasing is now always applied, except for plain D3D
- fixed offset of vector lines and clipping rectangle when vector primitives are prepared to be rendered into a texture (HLSL) instead of directly on the screen (GDI, D3D)
Psikyosh uses bitmap_rgb32, but should really use argb32, but that requires overloading lots of drawgfx for this one driver. Removed assert was wrong and unavoidable. Fixed boundary condition tripping daraku as per MT3753.
Inputs marked as optional should be controls that are not required for normal operation and may not be hooked up on actual hardware, but are still worth emulating because the hardware does respond to them in some way. Currently this flag is only exposed through the Lua interface and "reqbuttons" XML field; the intent is for frontends to map all optional buttons by default if this is possible and convenient. MT #6136 has inspired the addition of this flag to gijoe and clones.
Remove the generally useless PORT_UNUSED to make way for PORT_OPTIONAL; IPT_UNUSED, which most drivers were using already, is a better way of disabling unused fields. (nw)
- Completely move mouse hit testing down into the UI input module. This reduces some dependencies.
- Never return a null pointer from ioport_field::name() to prevent potential crashes. All anonymous inputs are classified as INPUT_CLASS_INTERNAL, so several frontend functions now check type_class instead.
- Correct a couple of typos.
This new softlist feature is now used by genesis_tmss to exclude several entries from megadriv.xml.
- Use popmessage instead of osd_printf_warning for incompatibility warnings
- Unify some common software loading code, which reduces indentation levels in clifront.cpp
- Separate watchdog implementation from running_machine (once again) and driver_device
- Old-style methods, now hidden behind #ifdefs, will probably be safe to remove soon
luaengine: callbacks for plugins (nw)
rendlay: layout tag external handler support (nw)
fidel_csc and mdndclab: example layout scripts (nw)
--
Neither layout script is complete. The chess doesn't handle castling or en passant and the Dungeons and Dragons only does the walls.
- Boolean parameter to running_machine::run is no longer firstrun (which is now a member variable of mame_machine_manager) but quiet, which disables logging and audio recording without explicitly checking the system name.
- Sound recording is now turned on and off by explicit calls. The potential uses of this have not been explored.
- Dependencies reduced on drivenum.h, where the declaration for GAME_NAME(___empty) has been moved to.
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.