Commit graph

389 commits

Author SHA1 Message Date
Vas Crabb
bdfdbd8796 plugins/cheat: Overwrite existing hotkeys if all hotkeys are cleared (fixes GitHub #10387). 2022-10-04 14:19:38 +11:00
cracyc
867167bb97 hiscore.dat: resort and set changes 2022-09-20 08:48:59 -05:00
mdeslaur
f3b42285fc
pacman.cpp: Added Miss Packman Plus. (#10201)
New working clones
---------------------
Miss Packman Plus [Marc Deslauriers]
2022-08-13 01:09:13 +10:00
hap
c860119abb hegenerglaser/*: add clickable element to internal artwork that presses 2 buttons at the same time where applicable 2022-07-26 15:55:17 +02:00
Vas Crabb
df65b00ed4 plugins/data: Fixed story.dat errors; virtual.flt: Use glob pattern. 2022-07-02 03:11:23 +10:00
Vas Crabb
923ef2c25d -plugins.data: Reworked the code substantialy.
* Use the plugin data folder for storing the cache.  The history folder
  may be read-only or shared with different configurations.
* Don't create the cache database or surrounding folder if there's
  nothing to store in it.
* Actually use prepared queries multiple times rather than always
  destroying them after a single use.
* Added proper error checking for most database operations.
* Improved query performance by avoiding outer joins and table scans.

-bus/nubus: Made the Macintosh Display Cards map the blue channel to
 white with monochrome monitors.  Also added logging for PLL
 configuration to help debug how CRTC and RAMDAC clocks work in the
 future.
2022-06-25 04:57:24 +10:00
Vas Crabb
742de90a65 Mac-related emulation fixes:
* bus/nubus: Started emulating SuperMac Spectrum/8 CRTC.
* bus/nubus: Respect Apple 4•8 screen base register.
* cpu/m68000: Fixed disassembly of bit field extract instructions.
* Also cleaned up data plugin a little.
2022-06-20 07:52:24 +10:00
Vas Crabb
f47f9c3db3
ui, docs: Added menus to fill a couple of gaps, improved consistency. (#9915)
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).
2022-06-11 21:47:19 +10:00
cracyc
af1ee7db53 hiscore.dat: updates [Leezer] 2022-03-23 21:25:06 -05:00
Vas Crabb
e6588480c4
Lua engine improvements (#9453)
Made auto-boot script errors and plugin bootstrap errors fatal.

Run auto-boot scripts in a sandbox.  Globals can be accessed, but not
set.  The sandbox is cleared on hard reset, but not on soft reset.

Added (hopefully) useful to string metafunctions to device_t and
address space that show short names and tags.

Fixed issues in plugins that surface when strict type checking is
enabled, as this means numbers and nil are not automatically converted
to strings.  Plugins should be tested with debug builds to check for
this.

Made save item read_block raise an error on invalid arguments rather
than returning an empty string, and made it use luaL_buffer directly
rather than using the helper wrapper.

Changed some more function bindings to use set_function to avoid issues
related to ThePhD/sol2#608, and got rid of some unnecessary lambda
captures.
2022-03-23 20:27:30 +11:00
cracyc
ea0cdde148 plugins/cheatfind: don't try to call a handler for the previous menu option 2022-03-05 09:35:54 -06:00
cracyc
be4008cbb2 hiscore.dat: fix renamed sets
hiscore.dat: Add "Mega Man 2: The Power Fighters (Hispanic 960712)" (megaman2h), fix "1000 Miglia: Great 1000 Miles Rally" (gtmr/gtmra/gtmro/gtmrusa) and add clones (gtmrb/gtmro) (#9285)
2022-02-13 13:53:28 -06:00
Vas Crabb
7d8c657fad Moved localised I/O port name lookup into I/O port manager.
Added pseudo format specifiers to controller port names: %p for player
and %% for literal percent symbol.  This lets you get the localised
player identifier in overridden input names (see NES and Neo-Geo for
examples), and reduces the number of messages to translate.

For translators, the new messages are mostly previously existing
messages with wording adjusted for clarity (e.g. referring to "media"
rather than "ROMs" in several places, as things like disk and tape
images are included).  It's also possible to localise the "???"
dipslayed for an input without a valid name, but that should never
actually appear in practice.
2021-12-09 07:42:12 +11:00
Vas Crabb
637eaca7a4 srcclean in preparation for release of MAME 0.238.
Patched up positron.cpp input ports - you shouldn’t use PORT_NAME when
the key cap label is just the characters it produces anyway, and you’re
supposed to use the actual character a key produces for PORT_CHAR or
"natural" keyboard mode/paste will be unnatural.
2021-11-21 14:14:44 +11:00
Vas Crabb
7cc9836017 plugins: Work around menu not remembering selection when ref is nullptr. 2021-11-08 11:51:29 +11:00
Vas Crabb
07e55935cf plugins: Rewrote timer plugin fixing multiple issues.
Added emulated time recording as well as wall clock time.

Fixed recording time for multiple software items per system.  An
incorrect constraint on the database table meant that time was only
being recorded for a single software item per system.

Detect the "empty" driver so the time spent at the selection menu isn't
recorded (you'd get multiple entries for this due to the way options
leak when returning to the system selection menu).

Included schema migration code to update existing timer plugin
databases.  Also replaced some unnecessary floating point code with
integer maths, added log messages, and made the plugin unload unload its
database access code during emulation.

Changed other plugins' use of paths with trailing slashes as this causes
stat to fail on Windows.
2021-11-06 05:20:59 +11:00
Vas Crabb
de9ed12186 plugins: Reduced amnesia for autofire and inputmacro plugins.
Made autofire and inputmacro plugins capable of remembering settings if
the host input device for the binding is missing or if an input for a
slot device that isn't present is referenced.
2021-11-05 02:46:04 +11:00
cracyc
0a27fdf359 plugins/cheat: one more flag 2021-11-03 20:09:37 -05:00
cracyc
fe0fbb87c2 plugins: fix cheatfind menu flags and write xml cheat text to ui container so it's not sideways on rotated screens 2021-11-03 20:01:07 -05:00
Vas Crabb
18a6113655 Two small fixes (bad menu flags in cheat plugin, copy/paste in docs). 2021-11-04 11:41:46 +11:00
Vas Crabb
6e355f86c8 frontend: Don't let the non-menus get as far as trying to draw. 2021-11-04 10:32:24 +11:00
Vas Crabb
dc33e01896 plugins: Ensure state is destroyed on stop. 2021-11-04 10:12:19 +11:00
Vas Crabb
8c6cb643e3 plugins: Simplify logic in autofire and inputmacro plugins to try and avoid leaking state across sessions. 2021-11-04 09:55:26 +11:00
Vas Crabb
dd43f801a1 -emu/ioport.cpp: Fixed "MAME lost my joystick settings!!!1!11!
-plugins: Gave the timecode plugin an option to count emulated frames.
2021-11-03 05:18:06 +11:00
Vas Crabb
2d220c7ba8 Fixed Windows build as well - default input overrides in OSD modules are annoying. 2021-11-02 16:08:24 +11:00
Vas Crabb
6cbfe66e52 plugins: Fixed obligatory copy/paste error in new timecode plugin. 2021-11-02 15:33:53 +11:00
Vas Crabb
d775a2731d plugins: Moved the timecode recording functionality to a plugin. 2021-11-02 15:31:03 +11:00
Vas Crabb
8ab63e2072 Fix various usability issues:
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.
2021-11-02 07:53:18 +11:00
Vas Crabb
d64ea5331b
-frontend: Refactored menu event handling and fixed a number of issues. (#8777)
* 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.
2021-10-31 12:31:16 +11:00
cracyc
cee44b0414 plugins/console: fix crash 2021-10-30 12:05:58 -05:00
Vas Crabb
9753632492 -nes.xml: Added Latin title from box art for Yeongjaekeom Cocoma games.
-pluins/hiscore: Bumped version since storage location has changed.
2021-10-25 23:56:45 +11:00
Vas Crabb
27599c115e plugins/data: srcclean 2021-10-25 17:02:37 +11:00
cracyc
f16565a556 plugin/data: handle multiple blocks in dat 2021-10-25 16:55:40 +11:00
Vas Crabb
4601e60391 plugins: Use SPDX short identifiers for licenses in exports (more precise and easier to localise), use CC0 for hiscore plugin rather than CC0. 2021-10-25 01:57:07 +11:00
Vas Crabb
5ab93130eb Plugin updates:
Changed the hiscore plugin to save inside the "hiscore" folder in the
plugin data directory.  The old hiscore path setting has already been
removed from MAME for some time.  This means the plugin was always
saving in the "hi" folder in the working directory with no way to change
it, which is problematic on Linux and macOS, particularly for distro
packagers.  There are lots of plugin and UI changes in this release, so
we may as well get this out of the way now.  Also made it possible to
change the "timed save" option from the Plugin Options menu, and save
that in the data folder, too.

Documented the input macro plugin.  The only undocumented plugins now
are the cheat plugin, the cheat finder plugin, and the port name plugin.
2021-10-24 09:38:03 +11:00
Vas Crabb
669b1f6ade -docs: Started documenting plugins.
* 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.
2021-10-24 05:48:05 +11:00
Vas Crabb
aa3643d5b7 plugins/timer: Fixed ticking when menu is left on the screen. 2021-10-22 03:46:00 +11:00
Vas Crabb
33f5ab983d -Cleaned up CI targets:
* Restricted Linux CI build to only run on changes to code,
  translations, software lists, and build scripts.
* Restricted Windows/macOS CO to only run on changes to code and build
  scripts.  They provide nothing over Linux for the other stuff.
* Added plugin properties and controller file validation to the "hash"
  workflow.
* Added a workflow for building documentation, so pull requests that
  affect documentation will at least get a basic check in advance.

-plugins/autofire: Bumped version as configuration format has changed.
2021-10-22 02:46:52 +11:00
Vas Crabb
f459eb6e13 Plugin usability improvements:
* autofire, inputmacro: Made left/right repeat when held (makes setting
  long delays/durations easier).
* autofire, inputmacro: Added headings for devices in input selection
  menus (helps when controller buttons have identical names, e.g. AES)
* autofire: Made intial selection when moving between menus intuitive,
  log some errors on saving/loading configuration.
* autofire: Fixed two errors in Chinese localisations.
2021-10-22 01:14:05 +11:00
Vas Crabb
3891d42471 frontend: Beter provision for plugins with multiple menu levels.
Make it possible for a plugin to specify which item should be selected
on repopulate.  Also allowed plugins to specify the UI heading flag for
menu items.

Updated input macro plugin to select sane items when changing menus.
Other plugins not updated yet, but may be at some point in the future.
2021-10-21 07:44:34 +11:00
Vas Crabb
b1c7644159 -plugins: Added an input macro plugin.
-plugins: Sort input selection menus for autofire plugin.

-frontend: Fixed another case where the menus may not automatically
scroll the first item into view.
2021-10-21 04:11:43 +11:00
Vas Crabb
4e74debb69 frontend: Don't show plugin options menu in main menu before start - it doesn't work anyway. 2021-10-20 05:27:31 +11:00
Vas Crabb
0a9ea09a9a Tie up a few loose ends:
debugger: Octal cheats for octal address spaces.

frontend: Pass events for automatically generated menu items to the
plugin - they will have index zero.

frontend: Don't try calling the data plugin from the main menu if the
system isn't starting yet - doing so will prevent the data plugin from
loading at all.
2021-10-20 02:03:43 +11:00
Vas Crabb
22bc3486c3 More user experience improvements:
frontend: Made it possible to cancel a media audit while it's in
progress.  Also made the media audit multi-threaded so it's faster.

frontend: Made the DIP switches in the DIP switch preview clickable.

frontend: Made the system and software selection menus leave focus on
the same system when clearing the search rather than jumping to the
first item.  Also fixed a couple of bugs in the logic for keeping the
selected item visible.

frontend: Fixed a few places that weren't showing localised system
names.

frontend: Made UI Cancel clear a search in the file manager the same way
it does on the system and sofware selection menus.

frontend: Made it possible for plugin menus to handle UI Cancel more
naturally, backing up to the previous plugin menu rather than dropping
straight back to the list of plugins.  Updated the autofire, cheat and
cheatfind plugins, and fixed a few other issues in the cheatfind plugin.

debugger: Made the mount and unmount commands accept instance names as
well as brief instance names.  Also updated another page of debugger
documentation.
2021-10-15 10:12:56 +11:00
Vas Crabb
751c2806bf Re-generated translations for I/O port names.
Trying to collect messages from everything at once hits some limit in
xgettext and causes messages to be lost no, so I've split it up by the
second-level source directories.

For some reason xgettext thinks overloaded Lua functions are blasphemy,
so that has to be worked around, too.
2021-10-11 15:02:55 +11:00
Vas Crabb
fd6309ee91 frontend: Keep cleaning up.
Got rid of one of the UI audit inputs.  There only needs to be one, and
the options can be presented in the confirmation menu.  Two secret
keystrokes is too confusing.  Also got rid of the long-obsolete UI
Toggle Debugger input.

Added audit media button to the toolbar so it's a bit less opaque, and
it can be accessed with a mouse/trackball (not just by knowing the key
mapping).

Made default I/O port names localisable.

Made autofire plugin save port fields using the { port, mask, type }
tuple, the same way MAME does.  Unfortunately this will break existing
autofire configuration, but it should be more stable going forward.

Added some more UI keys to the default key mappings documentation.
2021-10-11 13:14:31 +11:00
Vas Crabb
38082ccbee
Overdue internal UI enhancements (#8674)
* frontend: Added support for message context to localisations.
* frontend: Added string_view versions of the message lookup functions.
* frontend: Added a few more folder options to the internal UI.
* emu/softlist.cpp: Use more appropriate containers.
* Switched to Python 3 by default - this will become a requirement.
* Updated msgfmt.py for message context support.
* frontend: Show all software item info in the internal UI.
* frontend: Search alternate titles in software selection menu.
* 3rdparty/utf8proc: Updated to v2.6.1 (has several fixes).
* frontend: Added software filters for common info fields.
* frontend: Allow UI manager to hold onto persistent session data.
* frontend: Cache software lists for eight machines.
* frontend: Added support for loading localised system names.
* frontend: Add UI for selecting localised system names.
2021-10-09 12:16:17 +11:00
cracyc
5bb6a786a8 hiscore.dat: Updates [Leezer] 2021-07-20 09:16:41 -05:00
Julian Sikorski
97bd2d20df
Strip CRs from history.xml (#8115) 2021-05-30 13:25:37 -05:00
Vas Crabb
5fe20586ee srcclean for release 2021-05-23 17:33:52 +10:00