* Feed mouse/pen/touch pointer events through UI input manager with Win32 and SDL.
* Started migrating UI code to use new API and reworking mouse/touch interaction.
* emu/render.cpp: Support pressing multiple clickable layout items simultaneously.
* emu/render.cpp: Allow UI elements to be drawn in any window.
* emu/rendlay.cpp, luaengine_render.cpp: Added layout view events for pointer input.
* ui/ui.cpp: Allow the UI handler to control pointer display.
* ui/analogipt.cpp: Added mouse/touch and more keys for navigating field state list.
* ui/menu.cpp: Use vertical swipe to scroll and horizontal swipe to adjust.
* ui/menu.cpp: Draw after processing input - greatly improves responsiveness.
* ui/menu.cpp: Ignore keyboard/gamepad input during pointer actions.
* ui/selmenu.cpp: Made left/right info pane arrows repeat when held.
* ui/selmenu.cpp: Use middle click to move keyboard focus.
* ui/selmenu.cpp: Let filter list scroll if it's too tall, and use a bit of horizontal padding.
* ui/selmenu.cpp: Improved divider sizing.
* ui/state.cpp: Don't allow clicks to pass through the confirm deletion prompt to the menu.
* ui/simpleselgame.cpp: Fixed error message display and graphics/sound status not showing.
* ui/simpleselgame.cpp: Allow tap/click to dismiss error message.
* ui/utils.cpp: Show UI for choice filters when there are no choices - it's less confusing.
* modules/input/input_sdl.cpp: Made scaling for mouse scroll better match RawInput and DirectInput.
* modules/input/input_rawinput.cpp: Added support for horizontal scroll axis.
* modules/input/input_win32.cpp: Added support for scroll axes and more buttons to mouse/lightgun.
* modules/debugger/debugimgui.cpp: Don't fight over events with the UI manager - it breaks menus.
* osd/windows/window.cpp: Translate mouse position to window cooridinates for scroll wheel events.
* osd/sdl/window.cpp: Supply last mouse position for scroll wheel events if possible.
* scripts/build/complay.py: Made zero input mask an error - it was only being used to block clicks.
Systems promoted to working
---------------------------
Sega TV Ocha-Ken [QUFB]
Software list items promoted to working (tvochken.xml)
------------------------------------------------------
TV to Ocha-Card: Ocha-Ken 'Ho' to Seikatsu [Vas Crabb]
sega_beena_cart.xml: Put page scans in individual data areas.
frontend/mame/luaengine_mem.cpp: Added a raw read function for memory
regions.
plugins/layout: Added bitmap classes to layout sandbox.
Use VirtualAlloc rather than VirtualProtect on Windows to change page
protection, as the latter can cause severe performance issues with some
antivirus software.
Added noexcept to lots of hash- and bitmap-related things, and added a
little more error checking. Yes, I realise it will abort if an
allocation fails while printing a log message, but if you get to that
point, you're probably screwed already.
* Moved several machine lifecycle callbacks to the notifier/subscriber
model. The old callback registration model is still available for
them for now, but prints a deprecation warning.
* Added pre-save/post-load notifications.
* Use a single allocated timer rather than one anonymous timer per
waiter. Waiters no longer prevent saved states from being loaded.
* Clean up outstanding waiters on stop or state load rather than just
leaking them.
* Started documenting parts of the emulator interface object that should
be relatively stable.
-imagedev/avivideo.cpp: Fixed an object leak on unload. Also changed
some other media image devices to use smart pointers.
- Remove the seterror method for recording error messages and conditions. Condition codes have been made return values for call_load, call_create and various related callbacks. Error messages (which many devices weren't generating) are now displayed through osd_printf_error.
- Eliminate the image_init_result and image_verify_result pass/fail enumeration types. Update many functions that were returning these enumerations or simply bools to return std::error_condition instead. In some cases, this type is now passed down from internal parsing/loading functions which were already returning it. In various other cases, the former default UNSPECIFIED has been used as a catchall for I/O errors; anticipated future refactorings should make these error returns more specific.
- Expand the image_error categories to include INVALIDLENGTH, NOSOFTWARE and BADSOFTWARE. The first is largely self-explanatory. The second is generated by the core to indicate failure to find software items in lists. The third is provided for devices to indicate semantic errors in software list entries.
- Change the return type of floppy_image_device::identify to a pair so the potential error condition can be passed along to the UI without storing it in a member variable.
- Move device_image_interface::message down into snapshot_image_device and change its implementation to use string_format instead of printf.
- Correct a typo in the shortname of the generic snapshot device.
Functionally, the only difference between the system definitions is that
GAMEL lets you specify an additional internal layout and SYST lets you
specify a compatible system. COMP and CONS are just aliases for SYST -
the aliases can be phased out.
Removed arcade.flt and mess.flt altogether - opinion seems to be split
between misinterpreting them as fully supported and considering them
unnecessary. They were marginally useful as a performance test for
makedep.py, but that isn't important. We still have nl.flt as an
example .flt file (although it doesn't use "-" exclude directives).
Moved the UI active flag from the machine to the UI manager. Nothing
else uses it anyway (it's still accessible to scripts).
This avoids creating a table every time the state property of a device
is accessed, adds proper support for getting/setting floating/point
state entries from Lua, calls the state entry's formatting method to
convert to a string (for flags fields, etc.) and exposes more
properties.
This is a breaking change as the exposed properties on state entries
have changed, and the value property has different semantics for
floating-point state entries.
Compile Lua as C++. When Lua is compiled as C, it uses setjmp/longjmp
for error handling, resulting in failure to unwind intermediate stack
frames. Trying to ensure no objects with non-trivial destructors are in
scope when raising a Lua error is error-prone. In particular,
converting an exception to a Lua error becomes convoluted, and raising a
Lua error from a constructor is effectively impossible.
Updated Lua to 5.4.4 - this includes a brand-new garbage collector
implementation with better performance. The main thing removed is the
deprecated bitlib.
Updated sol2 to version 3.3.0 - this adds support for Lua 5.4 and fixes
a number of issues, including not correctly handling errors when Lua is
built as C++.
Updated LuaFileSystem to version 1.8.0 - this adds support for symbolic
links on Windows, as well as Lua 5.4 compatibility.
Updated LuaSQLite3 to version 0.9.5 - this fixes issues in
multi-threaded environments, as well as Lua 5.4 compatibility.
Fixed double-free after attempting to construct a debugger expression
from Lua with an invalid string, and exposed expression error to Lua in
a better way.
Added warning level print function to Lua.
Fixed saving cheats with shift operators in expressions, although this
code isn't actually used as there's no cheat editor.
osd/modules/input, emu/inpttype.cpp: Made most default joystick
assignments supplied by input modules. Input modules take available
controls into consideration when generating default assignments.
emu/inpttype.ipp: Added a separate "Back" UI input separate from Cancel.
You may want an easier to hit combination for moving to the previous
menu than for exiting or cancelling input. They both default to Escape.
emu/inpttype.ipp: Added a UI Help control. Currently only used by
analog inputs menu
emu/inpttype.h: Moved I/O port field type enum to its own header and
sorted UI controls so they appear in a more logical order.
ui: Don't use UI Select to restore defaults - people should be getting
used to the UI Clear input by now. UI Select cycles multi-value items
instead.
ui/inputmap.cpp: Don't use immediate cancel to cycle between clearing
and restoring default assignment (use UI Clear instead).
osd: Reduced the number of files needing to include the dreaded emu.h.
Got some implementation out of headers.
emu/input.cpp: Fixed regression in display of some joystick inputs.
osd/interface: Split up interface classes into a few more files to
reduce where the input device interface class needs to be included.
Made OSD independent of concrete input_device class.
osd/modules/input, emu/inputdev.cpp, emu/ioport.cpp: Allow input devices
to provide tokens for controls without standard item types and
additional default input assignments. Fixes issues assigning Yen and
Backslash on Japanese keyboards.
ui/textbox.cpp: Added a fixed-content text box menu class for future
use.
Got main.h out of emu.h as it’s only used in a very small number of
places, mostly for getting the application name. Added eminline.h to
attotime.h as it's used without emu.h. Cleaned up forward declarations
in emufwd.h a little.
docs: Expanded C++ guidelines following suggestions by P. Mackinlay.
ui/inifile.cpp: Got rid of the check for "arcade" systems - it broke
managing favourites for the slotted Neo Geo.
luaengine.cpp: Removed the "type" property from system driver metadata.
It's effectively deprecated.
bus/vme/vme_fcisio.cpp, commodore/mps1230.cpp: Fixed inappropriate use
of machine type flag constants.
megadriv.xml: Made notes about the two Galaxy Force 2 sets more explcit.
ui: Added some missing functionality:
* Added an option to copy input device IDs to the relevant menus.
* Added an item for setting the software lists files path (-hashpath) to
the folder setup menu.
* Allow pasting text from clipboard in most places that allow typing
(searching, entering filenames, entering barcodes).
* Changed the software selection menu heading to be a bit less
misleading.
* Made barcode menu less eager to rebuild itself unnecessarily, and
removed some confusing and apparently pointless code.
Exposed more Lua bindings:
* Added low-level palette objects.
* Added indexed bitmap types.
* Added a bitmap method for extracting pixels from a rectangular area as a
packed binary string.
* Changed screen device pixels method to return width and height in
addition to the pixels.
osd: Added some functionality and cleaned up a little:
* Added a function for copying text to the clipboard.
* Moved function for converting Windows error codes to standard error
conditions to winutil.cpp so it can be used from more places.
* Removed duplicate declaration of osd_get_clipboard_text and made the
function noexcept (including fixing implementations).
* Made macOS implementation of osd_get_clipboard_text skip the encoding
conversion if it finds UTF-8 text first.
* Changed the default -uimodekey setting so it doesn't lose the "not
shift" that stops the default from interfering with UI paste.
Various bug fixes:
* util/unicode.cpp: Fixed the version of utf8_from_uchar that returns
std::string blowing up on invalid codepoints.
* util/bitmap.h: Fixed wrapping constructors for indexed bitmaps taking
the wrong parameter type (nothing was using them before).
* util/bitmap.cpp: Fixed potential use-after-free issues with bitmap
palettes.
* emu/input.cpp, emu/inputdev.cpp: Log 1-based device numbers, matching
what's shown in the internal UI and used in tokens in CFG files.
* emu/emumem.cpp: Added the bank tag to a fatal error message where it
was missing.
docs: Reworked and expanded documentation on configuring stable
controller IDs.
For translators, the changes are quite minor:
* There's a menu item for copying a device ID to the clipboard, and
associated success/failure messages.
* There's the menu item for setting the software list file search path.
* One of the lines in the software selection menu heading has changes as
it could be interpreted as implying it showed a software list name.
-Moved some stuff out of misc and skeleton:
* Moved Innovative Concepts machines to their own project.
* Moved various things out of skeleton to existing company projects.
Added minimal support for manipulating bitmaps and drawing them in
render containers. Y'CbCr 4:2:2, RGB and ARGB are supported. Argument
order doesn't always match the underlying classes to make the Lua
interface more consistent with render bounds and render containers.
Added bindings for device_palette_interface.
Fixed some errors in the documentation as well as documenting new
functionality.
Added menus for controlling toggle inputs, and showing recognised input
devices and control state. Moved input menu options off main menu to a
submenu, as there are a lot of them now.
Moved menu heading drawing into base class, added headings to more
menus, and made headings more consistent with the menu items used to
reach them. Also made terminology more consistent.
Changed the default names for buttons and hat switches/D-pads to use
1-based numbering. DirectInput still returns 0-based button numbers for
some devices.
Removed local copy of MinGW xaudio2.h as it’s now included in the MSYS2
package. Also fixed building the DirectSound sound output module with
the SDL OSD on Windows - the Windows headers are sensitive to include
order.
Started adding documentation for menus, to hopefully help people find
menus they remember seeing but can't recall how to access.
For translators, this makes terminology more consistent. In particular:
* "Settings" is preferred over "configuration" in a number of places, as
the latter can be construed as referring specifically to settings
stored in .cfg files in the cfg_directory folder. Also, references to
saving machine configuration could be interpreted as relating to the
settings on the "Machine Configuration" menu.
* The controls on host input devices (e.g. keys, buttons, joystick axes)
are referred to as "controls", while emulated inputs are referred to
as "inputs".
* The menus for assigning host controls to emulated inputs are called
"input assignments" menus to distinguish them from other input
settings menus.
* Combinations of controls that can be assigned to emulated inputs are
referred to as "combinations" rather than "sequences".
* The potentially confusing term "ROM set" has been removed altogether.
Use "short name" to refer to a device or system's identifier.
* "System" is used in almost places to refer to a complete, runnable
system rather than "Machine".
* "Driver" is now only used to refer to source files where systems or
devices are defined - it is no longer used to refer to individual
systems.
* A few more menus have message context for the messages. This makes it
a bit easier to guess where the messages are used. It also means you
can use different translations in different places if necessary (e.g.
if the same English text should be translated differently as an item
in one menu and as a heading in another).
Made the debugger memory view not depend on isprint which is affected by
the global locale. Assume the OSD will display as ISO-8869-1 and
replace problematic printable characters.
Started changing Lua function bindings to use set_function to avoid
potential issues related to ThePhD/sol2#608, and worked out what was
causing problems with symbol table read_memory/write_memory. (They
aren't really essential - you can do the same thing with the address
space object itself, but they're easier to parameterise.)
Exposed minimum/maximum values for analog fields. together with defvalue, they can be used to check range of values and neutral position.
Previously you had to send a normalised value between -65535 and 65535 which would be scaled depending on machine specifics. You could read the scaled value from the port, but you couldn't send scaled values in. This allows scripts to set scaled values as seen by the machine.
Addressed pure virtual function call crash on end of emulation session
if you haven't explicitly removed all address space taps, memory
corruption on end of emulation session if you haven't explicitly removed
all address space change notifiers, and symbol being garbage-collected
out from under you while you have parsed expressions or other symbol
tables that depend on them.
Removed the copy constructor for parsed expressions as the underlying
C++ copy constructor appears to be broken, and simplified symbol table
constructors. Also made symbol table add methods return the new entry
to avoid the need for an extra lookup.
Fixed breakpoint/watchpoint objects being inappropriately copied into
the tables returned by bplist() and wplist(), allowing the enabled
property to be modifiable for breakpoint and watchpoint objects in Lua.
Fixed drivers and devices causing a new memory pass-through handler to
be allocated on each soft reset, and fixed multiple instances of taps
being installed in the event the machine is reset before the tap is
removed.
Added classes for managing broadcast subscriptions, and adapted address
spaces to use this for change notifications.
frontend: Exposed debug symbol tables and parsed expressions to Lua
(these can be used when the debugger is not active). Also made it
simpler to walk input types.
imagedev/bitbngr.cpp: Added software list loader support (used by
sitcom).
sitcom.cpp: Replaced bankdev with a memory view. Also added a bar graph
for the timer DAC output, and made the DL1414 displays squarer in the
layout like they are in real life. They still don't look right because
the internal segment drawing code doen't draw the segments the right
width.
docs: Fixed broken links and added missing links in command line options
index. Also removed documentation for an option that no longer exists
and fixed some inconsistent terminology.
Separated includes by module in various drivers.
them, which can them be picked up on access with the
{read,write}_*_flags variants of the accessors. Example use with the
i960 and its burstable rom/ram.
* Issues were unlikely to actually manifest unless you use controller
configuration files to change specific system input defaults.
-src/emu/output.h: Added size accessor to multi-element output finder.
* std::size will work on the top rank of an outut finder now. Sorry for
hitting emu.h again so soon.
-lua: Exposed a couple more input related things.
* Exposed constructor and a few methods on input_seq required for
scripts to properly clear assignments or restore default settings.
* Exposed ioport_manager::set_type_seq which is required to configure
general input assignments properly.
* Removed unnecessary use of sol::overload in favour of optional
parameters.
* Updated documentation and also fixed a few errors.
-docs: Added description for axis setting assignments.
frontend: Made it so you can press UI On Screen Display to hide the
Analog Controls menu and see the response to your inputs without the
risk of changing settings, and see more axes at once and scroll them for
systems with very large number of axes. Also ensure the axis being
configured is visible when the menu is visible, and made the menu behave
a bit more like the system input assignments menu (including
previous/next group navigation).
frontend: Allow Lua to draw to the UI container - this addresses the
main complaint in #7475. Note that drawing to the UI container will
draw over any UI elements, including menus. Plugins can check
menu_active to avoid drawing over menus. Also removed some unnecessary
use of sol::overload.
frontend: Improved info/image box navigation on the system/softwre
selection menus, and cleaned up some leftover code that came from the
copy/pasted event handling functions.
frontend: Fixed sliders menu not handling Alt+Shift as intended (thanks
Coverity). Fixed a couple of harmless Coverity errors, too.
emu/inpttype.ipp: Made the default assignment for Save State recognise
right shift.
plugins: Added next/previous group navigation to input macro edit menu.
docs: Added basic description of the system and software selection
menus, and corrected a couple of errors in the Lua reference.
* Moved common code for drawing about box, info viewer, and other text box menus to a base class; removed the last of the info viewer logic and the multi-line item hack from the base menu class.
* Added previous/next group navigation for general inputs and plugin input selection menus.
* Moved message catalog logic to lib/util, allowing osd and emu to use localised messages.
* Made the base menu class use the UI manager’s feature for holding session state rather than a static map and mutex.
* Improved menu event handling model, and fixed many issues, particularly with menus behaving badly when hidden/shown.
* Added better support for menus that don’t participate in the usual menu stack, like the menuless sliders and the save/load state menus.
* Made a number of menus refresh state when being shown after being hidden (fixes MT08121 among other issues).
* Fixed indication of mounted slot option in the slot option details menu.
* Improved appearance of background menus when emulation isn't running - draw all menus in the stack, and darken the background menus to make the edges of the active menu clearer.
* Fixed locale issues in -listxml.
-debugger: Made GUI debuggers more uniform.
* Added new memory view features to Win32 debugger.
* Fixed spelling of hexadecimal in Cocoa debugger and added decimal address option.
* Fixed duplicate keyboard shortcut in Cocoa debugger (Shift-Cmd-D was both new device window and 64-bit float format).
* Made keyboard shortcuts slightly more consistent across debuggers.
-plugins: Moved input selection menu and sequence polling code to a common library. Fixed the issue that prevented keyboard inputs being mapped with -steadykey on.
-docs: Started adding some documentation for MAME's internal UI, and updated the list of example front-ends.
-Regenerated message catalog sources. For translators, the new strings are mostly:
* The names of the inputs provided by the OS-dependent layer for things like fullscreen and video features. These show up in the user interface inputs menu.
* The names for automatically generated views. These show up in the video options menu - test with a system with a lot of screens to see more variants.
* The input macro plugin UI.
* A few format strings for analog input assignments.
* A few strings for the about box header.
* Also added a couple of missing command-line options, and added a local
table of contents to the (rather long) command line options page.
-Added a separate CI target for localisation updates that produces an
artefact, and removed the message catalogs from the trigger paths for
the Linux CI build.
* Automatically use delegate_mfp_compatible to generate an adaptor for
member functions that return non-scalar, non-reference types
(partially addresses #8597).
* Enabled the MSVC delegate implemenation for MSVC on AArch64.
* Switched back to neater delegate types for layout item bounds and
colour.
-docs: Updated the example layout links to point to 0.235 - this means
there's now an example of embedded SVG.