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.
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.
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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
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
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.
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.
* 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.
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.
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.
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.
* First completed pass of commandline parameters. (nw)
* Further refinements on commandline (nw)
* Get the audio latency numbers right and add PortAudio info.
* FreeSync/GSync information cleanup.
* Minor additions to G-Sync/FreeSync.
* Add tip for keyboardprovider, remove biospath, correct anchor positioning (nw)
* A few corrections per Vas (nw)
The last(?) two changes are:
- Add a template parameter to everything (theoretically the address
space width, in practice a level derived from it to keep as much
compatibility between widths as possible) so that the shift size
becomes a constant.
- Change the syntax of declaring and initializing the caches and
specifics so that they're embedded in the owner device. Solves
lifetime issues and also removes one indirection (looking up the base
dispatch pointer through the cache/specific pointer).
* Update MAME docs revision to 0.216
* Add FAQ question about autofire with walkthrough of setup process.
* Add VSCode .gitignore for RST compilation temporary folder (/docs/source/_build)
* Add a caveat about autofire+normal fire mapping
* Add -lowlatency to the docs.
fundamental change to show device delegates are configured.
Device delegates are now aware of the current device during
configuration and will resolve string tags relative to it. This means
that device delegates need a device to be supplied on construction so
they can find the machine configuration object. There's a
one-dimensional array helper to make it easier to construct arrays of
device delegates with the same owner. (I didn't make an n-dimensional
one because I didn't hit a use case, but it would be a simple addition.)
There's no more bind_relative_to member - just call resolve() like you
would for a devcb. There's also no need to cast nullptr when creating a
late bind device delegate. The flip side is that for an overloaded or
non-capturing lambda you'll need to cast to the desired type.
There is one less conditional branch in the hot path for calls for
delegates bound to a function pointer of member function pointer. This
comes at the cost of one additional unconditional branch in the hot
path for calls to delegates bound to functoids (lambdas, functions that
don't take an object reference, other callable objects). This applies
to all delegates, not just device delegates.
Address spaces will now print an error message if a late bind error is
encountered while installing a handler. This will give the range and
address range, hopefully making it easier to guess which memory map is
faulty.
For the simple case of allowing a device_delegate member to be
configured, use a member like this:
template <typename... T> void set_foo(T &&...args) { m_foo_cb.set(std::forward<T>(args)...); }
For a case where different delegates need to be used depending on the
function signature, see src/emu/screen.h (the screen update function
setters).
Device delegates now take a target specification and function pointer.
The target may be:
* Target omitted, implying the current device being configured. This
can only be used during configuration. It will work as long as the
current device is not removed/replaced.
* A tag string relative to the current device being configured. This
can only be used during configuration. It will not be callable until
.resolve() is called. It will work as long as the current device is
not removed/replaced.
* A device finder (required_device/optional_device). The delegate will
late bind to the current target of the device finder. It will not
be callable until .resolve() is called. It will work properly if the
target device is replaced, as long as the device finder's base object
isn't removed/replaced.
* A reference to an object. It will be callable immediately. It will
work as long as the target object is not removed/replaced.
The target types and restrictions are pretty similar to what you already
have on object finders and devcb, so it shouldn't cause any surprises.
Note that dereferencing a device finder will changes the effect. To
illustrate this:
...
required_device<some_device> m_dev;
...
m_dev(*this, "dev")
...
// will late bind to "dev" relative to *this
// will work if "dev" hasn't been created yet or is replaced later
// won't work if *this is removed/replaced
// won't be callable until resolve() is called
cb1.set(m_dev, FUNC(some_device::w));
...
// will bind to current target of m_dev
// will not work if m_dev is not resolved
// will not work if "dev" is replaced later
// will be callable immediately
cb2.set(*m_dev, FUNC(some_device::w));
...
The order of the target and name has been reversed for functoids
(lambdas and other callable objects). This allows the NAME macro to
be used on lambdas and functoids. For example:
foo.set_something(NAME([this] (u8 data) { m_something = data; }));
I realise the diagnostic messages get ugly if you use NAME on a large
lambda. You can still give a literal name, you just have to place it
after the lambda rather than before. This is uglier, but it's
intentional. I'm trying to drive developers away from a certain style.
While it's nice that you can put half the driver code in the memory map,
it detracts from readability. It's hard to visualise the memory range
mappings if the memory map functions are punctuated by large lambdas.
There's also slightly higher overhead for calling a delegate bound to a
functoid.
If the code is prettier for trivial lambdas but uglier for non-trivial
lambdas in address maps, it will hopefully steer people away from
putting non-trivial lambdas in memory maps.
There were some devices that were converted from using plain delegates
without adding bind_relative_to calls. I fixed some of them (e.g.
LaserDisc) but I probably missed some. These will likely crash on
unresolved delegate calls.
There are some devices that reset delegates at configuration complete or
start time, preventing them from being set up during configuration (e.g.
src/devices/video/ppu2c0x.cpp and src/devices/machine/68307.cpp). This
goes against the design principles of how device delegates should be
used, but I didn't change them because I don't trust myself to find all
the places they're used.
I've definitely broken some stuff with this (I know about asterix), so
report issues and bear with me until I get it all fixed.
* New working software list additions
-----------------------------------
apple2_flop_orig: Gauntlet, Go (Hayden), Ghostbusters, Galactic Wars, Guderian [4am, Firehawke]
* Add details on compiling MAME documentation. (nw)
for Laserdisc overlays.
This is a change in behaviour, and it means that games like Golly!
Ghost! will need an explicit blend mode specified in the XML. I'm not
entirely happy with the situation, but a better, more general solution
than this would require some serious refactoring to MAME's renderer.
* There is no longer a concept of "layers" - there are only screens and elements.
* Elements are now instantiated with <element ref="...">
* Screens and elements can have explicit blending mode specified with blend="..."
* Default blending mode for screens is "add" and default for other elements is "alpha"
* Other supported modes are "none" and "multiply"
* This removes the options to enable/disable layers individually - use views instead
* Legacy layouts can still be loaded, and support won't be removed for at least a year
The current artwork model is over-stretched. It's based on a Space
Invaders cabinet model, and isn't applicable to a lot of the systems
MAME emulates now. The fact that MAME has to switch to an "alternate"
mode to deal with games like Golly! Ghost! without requiring pre-matted
bitmaps shows that the Space Invaders model wasn't even adequate for
general arcade use. It shows in that for a lot of the systems that
heavily depend on artwork, people just seem to randomly choose layers
for elements until they get something that works. Also, the fact that
MAME will switch to an alternate (Golly! Ghost!) mode depending on the
combination of elements is a trap for people learning to make artwork.
There are cases that the current approach of implying the blending mode
from the layer doesn't work with. Examples include LEDs behind
diffusers (requires additive blending for layout elements), and mutliple
stacked LCD panels (requires RGB multiplication for screens).
For configurability, it's now a lot easier to make multiple views using
groups. For example, if you want to make it possible to hide the
control panel section of your layout, you can put the control panel
elements in a group and create views with and without it.
I will gradually migrate the internal artwork to use the new approach.
I have an XSLT stylesheet that helps with this, but I'm not comfortable
adding it because it isn't a complete solution and it still requires
manul steps.
I wanted to get the re-worked pointer handling done sooner so I could
push them both at the same time, but unfortunately various things have
prevented me from progressing as quickly as I wanted to. Sorry guys,
that stuff's going to have to wait.
This cleans up spelling and other issues in the original text.
This work is still prototype and will probably require fine-tuning between Vas and myself.
This effectively reverts b380514764 and
c24473ddff, restoring the state at
598cd52272.
Before pushing, please check that what you're about to push is sane.
Check your local commit log and ensure there isn't anything out-of-place
before pushing to mainline. When things like this happen, it wastes
everyone's time. I really don't need this in a week when real work™ is
busting my balls and I'm behind where I want to be with preparing for
MAME release.
* Document cross-compilation options
* Use lowercase for some libraries that are lowercase in system32 on Windows anyway
* Make USE_BUNDLED_LIB_SDL2=0 not use the bundled SDL
* Update copyrights and docs revision (nw)
Updates copyright on existing 2018 entries to 2019 (and one 2016)
Updates the docs compilation script to MAME 0.205 and 2019 copyright.
* Further formatting overhauling (nw)
Clamp to 80 column where possible; it makes it easier to track errant
line breaks, etc.
Also begin standardizing tab formatting and two spaces after period.
* Further corrections to command line materials (nw)
* More adjustments for Cuavas (nw)
Getting closer to acceptable.
* Case sensitivity training for INI (nw)
The world is not 100% Windows, so case sensitvity is needed.
* Further standardization of the formatting (nw)
More to go...
* Pass 2 of new formatting wave (nw)
More to go, though.
* wave 3 of formatting cleanup (nw)
Further adjustments and cleanups, including unwanted tabs.
* Correct filtering instructions (nw)
* Those chapter numbers are auto generated by sphinx
* Fix the chapters not been bold like the rest of the documentation
* Fix chapter numbers not in sync with the rest of the documentation
* Change the last two chapters to keep up with the document consistency
* Fix bold for nscsi_full_device
* Allow <orientation> and <color> to work on group references
* Fix some corner cases where group bounds could be miscalculated
* Fix a corner case where MAME could incorrectly refuse to instantiate groups
* Add more checks to complay.py
* Document more of the layout format
* Clean up some corner cases in layouts with repeating blocks
* Make complay.py validate many more elements and attributes
* Make complay.py easier to use for just validating a layout
* Remove redundant view from Sega VMU layout
* Make buttons visually respond to input in whousetc.lay
* Add view with LED displays as well as terminal for aim65_40 and use repeats
* Clean up some outdated "game" terminology in clifront.cpp
* Initiaise a couple of members in tap/tun network module
* Start documenting layout format
* Missed a couple escape sequences. (nw)
* A little more escaping, acronym fixes, fix oddity in symlist (nw)
* Update debugger internal help to match docs (nw)
* Lowercasing for CPU in command parameters, fix casing on ASCII. (nw)
* The first set of commandline overhauls. (NW)
* Correct case on headings, further improvements to index, spelling fix
* More updates to the index and cleanup to the commandline stuff. [NW]
* More core options in the index. [NW]
* Finished multiplatform commandline index [NW]
* Completion of first revision commandline index [NW]
- reset scheduler savestate to what it was for years before rewind
-- changing saved variables should be done after thorough testing. right now, adding some vars breaks some machines, adding other vars breaks others
- switch to megabyte-wise capacity
-- savestate size greatly differs between machines, relying on state count is unstable
- switch to internal indexing
-- no longer depends on inaccurate machine time
- rewind accelerator key in debugger (Ctrl+F11)
- report capacity hit (once), with some useful info
- make error reports saner
- mention rewind and rewind_capacity in the docs
Disassemblers are now independant classes. Not only the code is
cleaner, but unidasm has access to all the cpu cores again. The
interface to the disassembly method has changed from byte buffers to
objects that give a result to read methods. This also adds support
for lfsr and/or paged PCs.
- memory_translate now returns an address space number rather a boolean flag, permitting addresses in part of one space to map to an entirely different space. This is primarily intended to help MCUs which have blocks of internal memory that can be dynamically remapped, but may also allow for more accurate emulation of MMUs that drive multiple external address spaces, since the old limit of four address spaces per MAME device has been lifted.
- memory_translate has also been made a const method, in spite of a couple of badly behaved CPU cores that can't honestly treat it as one.
- The (read|write)_(byte|word|dword|qword|memory|opcode) accessors have been transferred from debugger_cpu to device_memory_interface, with somewhat modified arguments corresponding to the translate function it calls through to if requested.
- removed -antialias option (does not exist anymore)
- added missing -vector_beam_smooth option
- fixed suggested default values for -bloom_lvl_weights options (were messed up in the last update)
This change adds id() property to input_device, which represents the
unique device id. This allows the osd layer when creating a device to
pass a friendly display name along with a unique identifier.
Currently the device id is only used to map a physical controller device
to controller id, but can be used more generally in the future. For raw
input devices, we use the full raw input name as the device id. For all
other devices, we fall back to device name as the device id. The
"uniqueness" of the device id is not currently enforced in code.
This change adds support for configuring device to conrtoller id. This
allows for stable controller ids even if USB devices are plugged /
unplugged, system is rebooted, etc.
See documentation for additional context.