Commit Graph

271 Commits

Author SHA1 Message Date
Vas Crabb
6ba369b3fc -docs update:
* Added note explaining that view options saved in machine CFG take
  precedence over INI/command line.
* Added prerequisites for building HTML documentation under MSYS2 and
  Fedora Linux.
* Explicitly mentioned that Ubuntu modifies GCC to enable "fortify
  source" by default in the relevant section.
* Removed obsolete reference to glibstdc++6.
* Re-formated compiling guide source (hard wrap at 80 columns,
  typographical quotes, code blocks for sample command lines).

-genie.lua: Show GCC ignored attribute warnings, but don't fail for
them.
2021-01-23 16:34:25 +11:00
Vas Crabb
a2055bb6ba MAME 0.227
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE0DYtsBhE4EM627+6wXSxAYxAcQ4FAl/soOgACgkQwXSxAYxA
 cQ7RcA/9FcRJh81890304qg7Xnj2ntTOTsM0fw677Imu6L28uqIS5Xd67yZTjZqb
 gWxVgHIzrV8ZI1sQl27Q4Sez3lJLJhOQKYO+bsUqxzsO0zrlzMzqH1peBLYaYxR2
 xtlR5Q9+KZkrIPih/gstVLtTfTJfb371Zl3oqd9Jz1yhcGTn6JgEaRtAnVkxL7MO
 0aEDS9V/jStnSa5UPsf/xdUDZnfOwZtbOQF+A8Jor6vuWPZwX0Gkmt9nA8MkEmi6
 Ub4yEVWtYOPmnTkZXM7nA7TxIMCI+0JnkX6FEdW/wj78YDajN07UcOE/q0ejzjes
 8Z4+krIug0hbZ/YTMYTPD2KbuuCnMI9D7SBx+2r/odXJGyloPkOr7ugYX0nX8qjM
 Y/lL0M40h944UZZdiB48aqrv7v+Ox+uBpA0MY14BS5ZvKCqbTiCKnkMU9itkecs2
 orRHp3BBGvPMP/5iCgdRyikwPlQdoxQ7caOUWjgxwASWD66si7+KXfZwvCfiCMew
 1NDjo5lmPrf5Vkke9BONef/5XHJmqIezRifLBt14kU/ZqHkvWVz0llgyl6yIrb++
 hpST4k0/SVk4VgRfbUYxIifl1i0VmxA5o594Q2rOTCO5r6KEdDKPECfvcHw9tCvd
 CazRhgkqNUkuELOWaNgl1qzVxsE2OdlBzAPwClC9iOPggM+6Uqs=
 =Av87
 -----END PGP SIGNATURE-----

Merge tag 'mame0227' into mainline-master

MAME 0.227
2020-12-31 14:47:08 +11:00
Vas Crabb
d85735634c version bump for 0.227, some documentation clean-up 2020-12-31 02:46:10 +11:00
AJR
36f6157bc4 luareference.rst: Move the luareference-input properties together 2020-12-26 13:59:37 -05:00
AJR
c04e2cbe0b natkeyboard: Remove from ioport_manager 2020-12-26 13:39:34 -05:00
Vas Crabb
a5e6f4ea8d Expose a couple more things to Lua so the plugins can show the actual key mapped to UI clear. 2020-12-27 04:27:42 +11:00
Vas Crabb
4623e2ecf2 docs: Fix up the instantiation sections in the Lua reference. 2020-12-27 01:46:17 +11:00
Vas Crabb
9e36b6a6d9 More Lua interface cleanup - it's simpler with cleaner underlyng APIs.
Made the sound manager mute controls readable, and got rid of system
enable since it just controls system mute anyway.  This was causing
confusion: phantom2 was trying to use both independentlyt casuing the
mute bit to be ignored.

THe Lua interface changes are mostly changing methods to properties,
some renames to make things clearer, and some additional properties for
better control over snapshots.
2020-12-27 01:32:37 +11:00
AJR
174630bc70 docs: Fix mistake on which key was SDL-specific and which was non-SDL 2020-12-24 13:41:38 -05:00
AJR
c4622a64ab docs: Update list of default keys due to recent removals 2020-12-24 13:35:55 -05:00
Vas Crabb
ed872d1bd2 Fix some oversights and emergent behaviour with view selection.
Exposed the "native snapview" option on the video manager.  Trying to
use presence of a single view is a poor proxy that breaks with
multi-screen systems.

Allow rotation to be changed for native snapshot views, and disable the
zoom to screen area control when it has no effect on the selected view.

Treat an empty string identically to "auto" for view selectction.
Previously this was being used for prefix matching so it would force the
first view.  (This caused the bad snapshot view selection.  It had been
relying on "internal" not being a common view name prefix so it fell
through to automatic selection, but when changed to an empty string it
forced the first view.)

Documented "auto" as well as "native" for the -snapview option and
changed the default to auto rather than an empty string for consistency
with the -viewN options.

Added [w]string_view handlers to the stuff that's instantiated in
strformat.cpp since we'll be increasingly using them.

Cleaned up and updated some documentation.
2020-12-20 15:28:27 +11:00
Vas Crabb
1df245cb99 More Lua engine clean-up and documentation, resulting in core cleanup.
More Lua interface cleanup, additional properties and methods, and
documentation migration/expansion.

Emulated switch inputs can have "not" codes applied to host input axis
directions.  It works the same way as host switch inputs - push twice
for a "not" prefix.

Input polling helpers no longer need to store state in the input device
items.  There’s less leakage, and less chance of things interfering with
each other.

Allow snapshot view options to be configured through the internal UI via
the video options menu.  Made video options menus place initial focus on
the currently selected view item.  Removed some crud from the menu base
class.

Fixed the description of the "snapview" option.  The value to get raw
screen pixels was changed to "native" a long time ago but the
description was never updated.

Re-arranged the Golden Poker button lamps so that the 6-button layouts
for Jolli Witch and Wild Witch make sense.  In 6-button mode, the hold
buttons double as bonus game and bet buttons, but the lamp outputs don't
change.  The simplest way to deal with this without requiring the user
to switch views or using layout scripting is to place the dedicated
buttons directly below the hold buttons that correspond to them.

Removed some software list data that was redundantly copied into
device_image_interface (m_supported was never even set, so it didn't
even work), and made crc() work better (previously it wasn't
recalculuated after unloading and loading another image).

Made strformat.h and devcb.h play nicer with C++17 and pre-standard
C++20.  Format precision now correctly limits the length of string
views.  Confirmed that strformat.{h,cpp} works with pre-standard C++20
support in GCC 9.

Removed an auto_alloc from cpu/arm7.
2020-12-18 15:54:52 +11:00
Vas Crabb
503332a986 -Lua cleanup and documentation migration checkpoint.
* Cleaned up some more of the Lua inteface.  Mostly replacing methods
  with properties, some consistency fixes, a few renames, some more
  exposed functionality, and a couple of properties that have no
  business being set from scripts made read-only.
* Moved a lot more Lua documentation out of source comments into the
  documentation, and expanded on it in the process.
* Got more UI code out of the input manager.
* Changed input sequence poller to a polymorphic class where you
  specify your intention upfront.
* Changed the cheat plugin to use UI Clear to clear hotkey assignments
  and leave them unchanged if the user starts assignment but doesn't
  press any switches.
* Ported AJR's fix for over-eager double-click recognition from SDL to
  Windows OSD.

-goldnpkr.cpp: Cleaned up inputs, using standard keyout and payout types
 and key assignments.
2020-12-16 02:18:52 +11:00
Vas Crabb
4d7ef27490 -luaengine.cpp: Clean up render classes and expose screen image adjustments.
* Started moving Lua class reference to docs.  Expecting people to find
  the class reference material in the source isn’t going to help make it
  approachable.  The docs allow longer explanations, better formatting,
  and cross reference links.

* Added another layout scripting example to the docs.

-goldnpkr.cpp: Minor clean-up.

* Improved the short names for Witch Card and Witch Game clone sets.

* Made Witch Up & Down artwork clickable.

* Added working Video Klein sets where the parent is a working Video
  Klein set to the tiny subtarget.

* Removed history from the header comment - we have version control for
  a readon.
2020-12-13 09:54:03 +11:00
Vas Crabb
6082c57817 docs: Fix a bunch of errors from not reading what I wrote (thanks Ryan). 2020-12-09 01:37:53 +11:00
Vas Crabb
e008c7b1b1 -Lua engine cleanup, input edition:
* Modernised and cleaned up Lua bindings for input classes.
* Exposed the input_sequence_poller class to Lua and updated the
  autofire and cheat plugins to use it, rather than continuing to
  pretend it's part of the input manager.
* Exposed more of the natural keyboard manager, including the ability
  to enable/disable individual keyboard and keypad devices like you
  can from the keyboard mode menu.
* Exposed a few more things on ioport_port and input_device.

-plugins/cheat: Fixed menu item not updating visually when disabling a
 cheat with UI Left.

-plugins/cheatfind: Fixed not finding the first screen after screen
 enumerator was exposed as an object rather than using a table.

-bwidow.cpp, pacman.cpp: Minor cleanup to recent changes.
2020-12-09 01:10:26 +11:00
Vas Crabb
e8998a9236 -luaengine_render.cpp: Work around MSVC ambiguous overload error.
-docs: Clean up a little.
 * Includes typo fixes from Alexander Miller.
2020-11-26 13:47:02 +11:00
Vas Crabb
58c8cba9b3 Work around GNU libstdc++ wanting to stack large temporaries when vector elements can be trivially constructed. 2020-11-23 10:29:23 +11:00
Olivier Galibert
574daf4e49 Implement views, which are essentially bankdevs integrated into the
memory map system. [O. Galibert]
2020-11-22 19:43:52 +01:00
Vas Crabb
55b8ca317a -Switch to building MAME as C++17.
* Updated sol2 to 3.2.2
* Updated pugixml to 1.10
* Increased minimum clang version to 6
* Cleaned up some stuff that can use new features
2020-11-15 03:53:47 +11:00
Vas Crabb
fe9ac15ca9 -emu/devfind: More cleanup/consistency changes.
* Removed .mask(), as it’s not reliable in the general case.
 * Added asserts to things that assume power-of-two sizes.
 * Got rid of virtual qualifier on pointer-to-member operator.
 * Made helpers a bit more assertive about logging warnings.

-emu/rendlay.cpp: Use delegates to avoid hot conditional branches.

-docs: Finished off description of object finders and output finders.
2020-11-13 15:26:31 +11:00
Vas Crabb
39a42d517d Got rid of a couple of easy auto_alloc_array 2020-11-09 05:09:18 +11:00
Vas Crabb
538221861b -emu/dirom.{h,ipp}: Cleaned up and made it stricter.
* Made it an error to specify address map and explicit ROM region.
 * Made it an error if explicitly specified ROM region is not found.
 * Made the ROM region tag apply relative to the current device.

-Cleaned up formatting for a couple more documentation pages.
2020-11-09 03:55:50 +11:00
Vas Crabb
8dc10e7e10 docs: Wrote another section of object finder documentation.
Also improved formatting of code snippets in a few pages.
2020-11-09 00:57:21 +11:00
Vas Crabb
7dcf0c013f emu/devfind.h: Added missing memory_share_array_creator.
Also some miscellaneous tidying up.
2020-11-08 05:43:57 +11:00
Vas Crabb
ae8c70b7e6 -emu/devfind.h: Made read_safe avaiable for optional I/O ports only.
-docs: Added the next couple of sections explaining object finders.
2020-11-06 03:00:57 +11:00
Vas Crabb
6b3b77a50f -docs: Started writing page on object finders with worked examples.
-hp3478a.cpp: Removed outdated TODO comment from layout.

-Hopefully fixed all remaining MSVC operator resolution failure errors.
2020-11-05 00:53:04 +11:00
Vas Crabb
8597660681 -hp3478a.cpp: Made LCD segments dark in internal artwork.
-Fixed another batch of MSVC errors resolving overloaded operators.
2020-11-04 19:51:16 +11:00
Vas Crabb
9e71712b3b -General maintenance on emu/devfind:
* Harmonised memory region/share finder/creator APIs.
 * Moved .found() to optional object finders.
 * Added truth test operator to optional object finders.
 * Fixed things that were testing .found() on required object finders.
 * Improved Doxygen API documentation.

-dec8.cpp: Moved csilver to its own state class.

-docs: Added some notes about setting up and using MSYS2.
2020-11-04 03:12:38 +11:00
Vas Crabb
349265533d Clean-up and consistency fixes after memory system changes. 2020-11-03 02:59:49 +11:00
Olivier Galibert
b8c338858a emumem: Simplify memory management. [O. Galibert]
API impact:
- install_ram/rom/writeonly now requires a non-null pointer.  If you want
  automatically managed ram, add it to a memory map, not in machine_start

- install_*_bank now requires a memory_bank *, not a string

- one can create memory banks outside of memory maps with memory_bank_creator

- one can create memory shares outside of memory maps with memory_share_creator

Memory maps impact:
- ram ranges with overlapping addresses are not shared anymore.  Use .share()
- ram ranges touching each other are not merged anymore.  Stay in your range

Extra note:
- there is no need to create a bank just to dynamically map some memory/rom.
  Just use install_rom/ram/writeonly
2020-11-02 12:12:11 +01:00
Vas Crabb
9ea6512671 docs: Add links to some internal layouts that demonstrate various features, and udpate required MSYS64 packages for using lld. 2020-10-28 14:58:52 +11:00
Vas Crabb
e90403a499 emu/rendlay.cpp: Fixed one more place where disk drawing had error accumulation issues. 2020-10-19 18:13:26 +11:00
Vas Crabb
17c1ef8661 docs: Cleaned up some geometry on MAME logo. 2020-10-09 20:41:57 +11:00
Vas Crabb
ac04c377a9 Optimise some SVG images 2020-10-09 15:52:07 +11:00
Vas Crabb
b90fd35515 Various improvements to image file handling:
Moved MS DIB parser out of ICO file reader and made it available for
artwork and layout images.

Added more efficient I/O and better error checking for JPEG file loading
(MAME will no longer exit immediately on a bad JPEG file).

Made caller responsible for opening files for loading images, to avoid
decompressing images used in ZIP/7z artwork multiple times.

Added support for JPEG and Windows DIB to picture_image_device.

Added support for SVG image files in external artwork.

Added support for using I/O port value for animation state and masking
animation state values.

Made bounds elements more flexible in layouts.

Reworked headers to reduce dependencies.

Updated layout file format documentation.
2020-10-08 02:04:31 +11:00
Vas Crabb
688db69e4c -emu/rendlay.cpp: Small optimisation for opaque pixels in image component.
-machine/pc1512kb.cpp: Put \| and #~ on the right keys by default.

-docs: Re-organised default keys, added P2-4 defaults, added mahjong panel diagram.
2020-09-19 21:07:14 +10:00
Firehawke
02ff9859ed
Merge pull request #7251 from Firehawke/master
Docs adjustments.
2020-09-17 19:09:31 -07:00
Firehawke
d6a71a9db9
Remove VRR statement until it can be retested. 2020-09-17 19:06:43 -07:00
Vas Crabb
0c05da59fd Fix artwork labeld for tisub buttons 2020-09-16 16:47:29 +10:00
Vas Crabb
b1f32927f3 Cleaned up inputs a little.
Removed the IPT_POKER_BET, replacing it with IPT_GAMBLE_BET.

Re-organised the order of input types in the source and the
documentation to better reflect how they're logically grouped or
organised on a mahjong or gambling control panel.

Made the blackjack, poker and slots documentation headings subheadings
under the gambling heading.

Cleaned up inputs for a number of gambling games.
2020-09-16 16:37:22 +10:00
Firehawke
25397ebfda
Docs: Overhaul the default keys list (#7222)
* Docs: Overhaul the default keys list

* Second phase of documenting default inputs better, also change Score to Take Score in Mahjong inputs

* Phase two of default keys docs adjustment.
2020-09-16 11:12:02 +10:00
Vas Crabb
6adc508015 emu/rendlay.cpp: Added parameter animation and state masks.
Components may have multiple bounds and/or color child elements with
state attributes, allowing for piecewise linear position/size/colour
animation.

Components may have a statemask attribute, allowing for things like
using external images to draw a multi-segment LED/VFD display without
requiring dozens of outputs for the individual lines or thousands of
images for all possible states.  (Texture caching still never releases
anything, so MAME can still exceed the maximum number of textures, but
that’s a separate issue.)

Image components with alpha now blend over previously drawn components.

Layouts have been changed to use yes/no for inputraw to match what's
used for flipx/flipy.  External layouts with 1/0 will still work, but
complay.py will complain.
2020-09-16 02:55:04 +10:00
Vas Crabb
7f0a34d52d Updated most of the layouts using <bezel> elements 2020-09-09 20:17:45 +10:00
Vas Crabb
67ec5e5b43 Finished adding new mechanism for allowing parts of views to be hidden.
Changed name of element to "collection" and initial visibility attribute
to "visible", and added them to documentation.  Also added them to
complay.py.

Fixed issue with collection inside group, and improved initial view
selection behaviour.

Updated some internal layouts to demonstrate new features, including
et3400, irrmaze, ltcasino, mekd3/mekd4, seawolf and vgmplay.

Removed all uses of cpanel, marquee and overlay from internal layouts
and removed them from complay.py to actively discourage use.  Also
cleaned up view names in layouts that were using them in place of
spaces, and removed some superfluous name attributes on elements that
won't do anything useful with an output value anyway.

Made vgmplay cycle visualiser modes when visualiser screen is clicked.

Fixed a copy/paste error in bus/rs232/hlemouse.cpp while I'm at it.
2020-09-07 01:40:41 +10:00
Vas Crabb
ec88949651 formats: Get rid of more inappropriate use of emu_fatalerror (and fix some spelling issues, etc. while I'm at it) 2020-08-30 17:08:25 +10:00
Vas Crabb
3b5f754717 docs: Add naming conventions for certain things.
This isn’t supposed to be too prescriptive.  The C++ stuff just codifies
some things we’ve managed to mostly agree on for public interfaces.  The
stuff for titles/descriptions is also just codifying existing rules so
there’s something to point people towards.  This will need to be refined
as we go forward.
2020-08-24 13:01:37 +10:00
Vas Crabb
ecab55f700 emu/video: check macros are defined before doing comparisons, also fix a typo in docs 2020-08-21 23:21:05 +10:00
Vas Crabb
6a1e1bff1a docs: update for changes in MSYS2 packages, fix a typo, add note about using LLVM linker with GCC 2020-08-21 22:43:47 +10:00
Firehawke
41f49b9afe
Fixed compilation of docs for HTML and manfiles. 2020-08-10 19:23:46 -07:00