Commit Graph

427 Commits

Author SHA1 Message Date
Vas Crabb
6e60af32c1 sega/sega_beena.cpp: Added basic book page display.
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.
2023-11-04 00:37:48 +11:00
Vas Crabb
fccbed7657 Miscellaneous fixes:
* docs: Added option for Wayland support to compiling guide.
* docs: Clarified behaviour of memory region read/write methods.
* Fixed some editing errors in Turkish UI translation.
* Added some parentheses on ternary conditional operators for clarity.
2023-11-02 02:08:05 +11:00
Vas Crabb
e4ceeee567 Added some additional layout functionality and script bindings.
Also corrected some copy/paste errors in documentation, and bumped
documentation version as it now describes features that will appear in
an upcoming release.
2023-10-30 03:11:15 +11:00
Vas Crabb
ceb582b8a0 docs: Updated for changes to media loading behaviour.
Bumped docs version since this now describes behaviour of the
upcoming release.
2023-10-20 17:57:18 +11:00
invertego
963561c7cb
3rdparty/portaudio: Updated to latest upstream version. (#11604)
Up-to-date with revision 24c8d575e588d557d28f4011becb753421346860.  Resolves issues building with Visual Studio.

Enabled PortAudio when building with Visual Studio and clang-cl.

docs: Removed note about duplicate GUID symbols in PortAudio when built with MSVC.
2023-10-09 01:50:30 +11:00
Tom Cariello
4ab590e2a9
docs: Fixed a number of grammatical errors and editing errors. (#11578) 2023-10-01 13:39:06 +11:00
Firehawke
09be4295de
docs: Fixed documentation compilation warning. (#11586)
Fixes a title underline too short warning.
2023-10-01 13:10:30 +11:00
Vas Crabb
727e600b94 MAME 0.259
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE0DYtsBhE4EM627+6wXSxAYxAcQ4FAmUVpEIACgkQwXSxAYxA
 cQ7EBg/+PO4UlnOG5nvQg8TxHGkavpgzr/z5BXHer1mpwDB7091BrKqi+6fgDsHU
 pNGKdjSR9EdmCjPs5aqW29Fgd+xk29NEJtUVU5U2Ab2NfV16hzfF3zTXGsvojlBn
 n28Ja5MmWiAYTPTEHa1MlJnOQuxD6nhdLD1xEJV5TiFjl9ceVd5il+BLQ/7nn1T1
 zNSvUa/mF6EpvmpcIIbBSF+MpIq8rTH57QdOY0pD3RmAltnwmIOkKLnirmPtmRaq
 X3ncHQBWcu8iggz3ty+K9cF4n6GpFa8Unjsi44m5CgTRhDEwRA0eAJUm8ud3UlU+
 uKWOnDCwsjKnZCWPmfeo54osJV7tSCzcNzCzsxThR6ogfZxcULj3G/+tatyXkvoe
 gpyIzqBDQPWxJgtFZKRRRsixwgivnlY/axQWiXG6wFWIpHthT3ypbSciBJKfZX+N
 B3E37UtmU4ObzLsNvuhdSCXQHMv8teQxREP2DxsIDAFDjyS1URDXbkL2qA62pQ08
 0e0VqxoULxS65jVWquDsotShMWrcgooxDmB6PUORP8YEsbCIF7c4cEYcjc5j+zVD
 v1v3za3rfEFoT+IcHjT7w3vz/cfWMu3HQJEiZ90A7v9h78EZ9ujo2kNHHAxaKD6u
 y71MvjpFrrmkKuvKsJFP1cYuf+tbqBWRRQ/vVG4+w0uz3RJvk4U=
 =ZKbi
 -----END PGP SIGNATURE-----

Merge tag 'mame0259' into HEAD

MAME 0.259
2023-09-29 21:56:21 +10:00
Vas Crabb
d71c72ba74 Miscellaneous change roll-up:
render/drawbgfx.cpp: Return an error if Wayland EGL surface can't be
created for additional windows.

emu/emucore.h: Added explicitly defaulted copy and move constructors for
emu_fatalerror.

Fixed apparent misunderstanding of const.  Returning const value types
and casting to const value types is pointless outside very narrow use
cases.  Putting const value type parameters in interfaces just makes
trouble.

cpu/adsp2100: Use count_leading_ones_32 where it's simple rather than
inverting and counting leading zeroes.

util/multibyte.h: Don't pollute global namespace, constexpr implies
inline, make narrowing casts explicit.

imagedev/simh_tape_image.h: inline is implied for member functions with
bodies supplied at declaration.

Tidied up some ugly casts in various places.
2023-09-29 01:56:51 +10:00
Vas Crabb
4ff20056c3 Bumped version to 0.259 2023-09-29 01:23:40 +10:00
Tom Cariello
30d92e397d
docs: Fixed many editing errors and spelling errors. (#11575)
Also fixed outdated link to contributing guidelines.
2023-09-29 00:41:31 +10:00
Tom Cariello
eaa84a2679 Removed extra tick after gtime example in documentation (#11574) 2023-09-28 00:33:45 +10:00
Tom Cariello
1d1ff1b5f8
Removed extra tick after gtime example in documentation (#11574) 2023-09-27 15:51:32 +02:00
Vas Crabb
2e0aa82350 Bumped version to 0.258 2023-08-29 04:29:19 +10:00
Vas Crabb
f811a66c53 Bump version to 0.257 2023-07-28 02:00:24 +10:00
Vas Crabb
12623c3fd3 docs: Moved Lua API reference to its own section - the page was far too long. 2023-07-06 09:52:10 +10:00
Vas Crabb
5442ec7960 docs: Remove link to Gaming-History/Arcade-History since the front page is covered in dodgy gambling links. 2023-06-29 06:05:31 +10:00
Vas Crabb
b41370db02 Bump version to 0.256 2023-06-28 01:49:47 +10:00
Vas Crabb
c6650dc072 Bump version to 0.255 2023-05-31 03:50:57 +10:00
Vas Crabb
82394e8569 Adjustments to option priority interactions:
emu/sound.cpp: Made -volume in source file INI or higher priority
context take precedence over volume read from CFG file.  This matches
behaviour of -bgfx_screen_chains.

emu/input.cpp: Made explicit -no{mouse|joystick|lightgun} take
precedence over -{mouse|trackball|adstick|paddle}_device etc. from lower
priority levels.

Alos got rid of a bunch of unnecessary simple_list.
2023-05-09 01:49:41 +10:00
Vas Crabb
a93d6c9fc7 emu/emumem.h: Allow emu::rw_delegate to work with device finders. 2023-04-15 19:44:30 +10:00
Vas Crabb
b6b6c9b15c Allow loading PNG/JPEG/MS DIB bitmaps from Lua, and cleanup.
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.
2023-04-13 05:49:05 +10:00
Vas Crabb
b06dae9201 clifront.cpp: Changed -listbios to work more like -listslots, showing all BIOS options in a system. 2023-04-10 06:34:35 +10:00
Vas Crabb
b67b969bf0 -Improved some Lua APIs:
* 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.
2023-04-07 06:20:40 +10:00
AJR
6f7e4141ea API change for device_image_interface
- 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.
2023-03-30 20:40:34 -04:00
Vas Crabb
f0924e31d4 Drop support for libc++ 6 altogether - it's missing std::unordered_map::extract. 2023-03-27 03:01:04 +11:00
Vas Crabb
0562745629 Retired the over-stretched "system type" flags.
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).
2023-03-23 14:39:56 +11:00
Vas Crabb
dda5f71a40 -luaengine.cpp: Expose UI controls toggle state.
-ui/ui.cpp: Honour UI enable for machines without keyboards.
2023-03-23 04:02:46 +11:00
Olivier Galibert
e2d60b0acb dimemory: Add the target address space to translate, wrap the constants
divtlb: Wrap the constants
2023-03-18 21:27:43 +01:00
Vas Crabb
2c226a3b9f Lua engine: Better bindings for device_state_interface.
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.
2023-03-12 04:37:30 +11:00
Vas Crabb
b5475eb38b Various updates, mostly around Lua:
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.
2023-03-07 01:39:42 +11:00
Vas Crabb
d4589e0b29 Input refactoring:
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.
2023-02-18 06:18:45 +11:00
Vas Crabb
b98fb7c98e Small batch of input refactoring:
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.
2023-02-05 05:01:40 +11:00
Vas Crabb
f3850d1e3c Cleaned up some recent changes. 2023-02-04 03:25:01 +11:00
Vas Crabb
dd355e4d68 docs: Added an introduction to the input system for developers.
emu/ioport.cpp: Removed a long-outdated comment that is now rather
misleading.
2023-02-03 18:02:45 +11:00
Vas Crabb
43e30203bd docs: Clarified documentation of input options.
Made explanation of interaction between device class enable options
(-[no]mouse, -[no]joystick, -[no]lightgun) and automatic device class
enable options (-*_device) more explicit.  Also documented that
-mouse_device mouse is set by default in both relevant places.

Provided a better explanation of the purpose of -dual_lightgun.
2023-02-03 04:27:40 +11:00
Vas Crabb
68472d3d72 Various input and OSD refactoring:
osd: Supply OSD object to modules on initialisation.  Encapsulated some
event handling in the OSD objects rather than leaving it in free
functions.  Put various stuff in namespaces.

osd/modules/input: Enabled dinput, xinput and winhybrid modules for
Windows SDL builds, and enabled background input for dinput and xinput
(and by extension winhybrid) modules.  Also fixed some COM and X11
resource leaks.

osd/modules/input/input_sdl.cpp: Flipped SDL mouse button order to match
Windows, and exposed vertical and horizontal scroll as Z and rZ axes.
Moved SDL UI event handling out of input devices into OSD object.

osd/modules/input_rawinput.cpp: Changed lightgun Z axis token so it's
correctly identified as a relative axis (it maps to the scroll wheel
equivalent).

osd: Added an option to choose the network provider module.  Mostly
useful if you build with both TUN/TAP and pcap support included, or if
you want to disable emulated networking completely.

emu/input.cpp: Use a better strategy for assembling input code names
that uses fewer temporary strings and doesn't require use of the
non-Unicode-aware space trimming function (fixes MT08552).

osd/modules/input_dinput.cpp: Improved polling logic.

osd: Made various parts of the input code less dependent on concrete emu
objects, and reduced inappropriately passing around the machine object.
Made input modules less dependent on OSD implementation.  Encapsulated
some stuff and got rid of some vestigial newui and SDL1 support code.
Cleaned up some interfaces.  Moved OSD options classes to their own
files.

Prepare to remove main.h from emu.h - it's mostly used to get the
application name, which the vast majority of emulated devices don't need
to do.
2023-01-29 03:16:14 +11:00
Vas Crabb
2498f2b7cf Miscellaneous fixes and refactoring:
ui/analogipt.cpp: Fixed bar graph display for fields with ranges
that wrap through zero.

emu/inputdev.cpp: Separateed analog axis deadzone and switch threshold
settings, reduced default deadzone, and fixed a potential division by
zero if the deadzone and saturation settings are equal.

emu/ioport.cpp: Fixed behaviour of absolute analog fields where range
passes through zero - it previously only worked for specific
combinations of mask, minimum and default.  Removed a workaround from
universal/getaway.cpp that is no longer necessary.

emu/input.cpp: Fixed unintuitive behaviour when an absolute field is
assigned an OR combination of a relative control folled by an absolute
control (e.g. Mouse X or Joy 1 LSX).  Also fixed reading axis input
sequences where an axis code is followed by a switch code (these can
only be produced by manually editing configuration files, not through
MAME's UI), and fixed the returned type when multiple relative axes sum
to zero.

osd/modules/input_dinput.cpp: Fixed hat switches being stuck in up
position when input is suspended in the background

taito/taitoio_yoke.cpp: Give throttle control a distinct type, and don't
auto-centre.

osd: Added option to select MIDI provider module (currently only
PortMidi and the dummy module are available).  Also put various things
in namespaces, and fixed builds including SDL sound module with native
Windows OSD.

emu/validity.cpp: Added check to catch I/O port fields using UI input
types.

emu/inpttype.ipp: Renamed inputs that were causing confusion.  "Bill"
and "Track" were causing confusion for translators and hence likely
causing confusion for many users, especially those who are not native
English speakers.  "Track" as an abbreviation for "Trackball" was
frequently being mistranslated, e.g. in the sense of a CD track
selection button or even in the sense of a railway track.  There's no
reason to abbreviate it.  "Bill" in the US English sense as a banknote
is too ambiguous and was causing confusion for translators.  It's better
to use the less ambiguous "Banknote".  Corrected Greek translations of
"Trackball".

Don't run GitHub Actions on issue template changes.
2023-01-28 08:16:53 +11:00
AJR
5087e6c2f9 Add -listbios command to list alternate BIOSes for drivers and devices 2023-01-24 21:00:08 -05:00
Vas Crabb
2592ac32c1 osd: Added option to accept SDL game controller/joystick input when losing UI focus. 2023-01-14 15:57:22 +11:00
Vas Crabb
5c4dcb3016 docs: Updated default joystick providers. 2023-01-14 07:10:21 +11:00
Vas Crabb
bf2707f4c7 osd: Added support for mapping files to sdlgame joystick provider and made it default with SDL.
This changes behaviour, however I think it's a net positive:
* Most games using Steam Input or SDL2 to read game controllers have
  this behaviour, so users have come to expect it.
* This module is better at giving meaningful names to buttons on
  common controller, and assigning axes consistently.
* Button/axis mapping files using a widely-used format are supported.
* The old behaviour is still available with `-joystickprovider sdljoy`
  if anyone wants it.

The new option for controller mapping files is in the general OSD
options rather than SDL options as it can be extended to DirectInput in
the future.
2023-01-14 03:13:59 +11:00
Vas Crabb
fee7047c16 -osd: Better XInput and SDL game controller input enhancements:
* Added initial support for XInput controller subtypes, starting with
  driving, arcade and flight controllers.
* Check XInput capabilities to ignore buttons and hats that aren't
  present.
* Added preliminary SDL Game Controller joystick provider.  Reconnection
  and mixed Game Controller/Joystick devices are unsupported.
* Show the input token for the highlighted control on input device
  menus.

-ui: Allow menus to set required space above and below menu when metrics
change.  Fixes the initial bad layout on the system selecton menu, or
bad layout after resizing windows.
2023-01-12 18:14:13 +11:00
Vas Crabb
9f99b27d05 Bump dates to 2023 where appropriate 2023-01-02 11:58:17 +11:00
Vas Crabb
34e6ec1ef8 Bump version to 0.251 2022-12-30 01:20:09 +11:00
Vas Crabb
8edb88dbaa C++ guidelins update and cleanup:
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.
2022-12-22 20:04:52 +11:00
Vas Crabb
d50dd67612 docs: Fixed editing errors in C++ coding guidelines. 2022-12-22 08:05:34 +11:00
Vas Crabb
e85a2899c5
docs: Added preliminary guide for would-be contributors. (#10717) [Ryan Holtz, Vas Crabb, O. Galibert] 2022-12-22 07:17:55 +11:00
Vas Crabb
b7cbe74c4b Bump version to 0.250 2022-11-29 16:41:19 +11:00
Vas Crabb
4b4c03bb17 docs: Fixed a markup error. 2022-11-26 03:53:48 +11:00