Commit Graph

95 Commits

Author SHA1 Message Date
Vas Crabb
282fb57c70 Updated copyright years to 2025 2025-01-01 16:36:28 +11:00
Vas Crabb
958d52f28b -dynax/dynax.cpp: More I/O improvements:
* Replaced hjingi hopper hack with a hopper device.
* Improved DIP switch labels for mjembase and hooked up hopper.
* Improved a few DIP switch labels for mjelctrn.

-Fixed some more #include guards and added a CI task to check them in
 src/devices and src/mame.
2024-11-28 06:55:14 +11:00
Vas Crabb
8e7af961c6 emu/rendlay.cpp, ui/ui.cpp: Allow layout views to control pointer display. 2024-04-14 07:36:45 +10:00
Vas Crabb
4ddd26fe21 Initial touch input support:
* 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.
2024-04-12 02:49:15 +10:00
ksherlock
068704c298
scripts/build/verinfo.py: Use a raw string literal for regular expression. (#12069)
Fixes Pylint invalid escape sequence warning.
2024-02-27 23:03:37 +11:00
Vas Crabb
2dd558b2c0 Update copyright years. 2024-02-26 03:32:36 +11:00
Vas Crabb
09e4b34dd8 Updated png.py to 0.0.20 (last version before Python 3.4 support dropped) 2023-01-03 16:05:24 +11:00
Vas Crabb
9f99b27d05 Bump dates to 2023 where appropriate 2023-01-02 11:58:17 +11:00
Vas Crabb
b55671d63a bgfx: Re-built shaders for crt-geom update. 2022-07-07 20:04:22 +10:00
Vas Crabb
5a984699b3 Fail earlier in the build process if SOURCES= specifies no files containing system definitions 2022-07-07 11:54:01 +10:00
Vas Crabb
6176c84768 Added CI job to check for likely mame.lst errors. 2022-07-02 04:57:25 +10:00
Vas Crabb
c51c443be1 -Added support for directory names in SOURCES=
-Retired the messshared project (combined with shared).

-bus/nubus: Added table of video modes for Mac monitor sense values.
2022-06-30 00:37:49 +10:00
Vas Crabb
871837b123 More quality of life features for new source layout:
Added support for wildcards in .flt filter files.  You'll need to quote
them to avoid /* being parsed as a comment initiator, like "seta/*.cpp"
on a line including the quotes.

Added an XSLT filter for listing system driver sources, like
mame -lx | xsltproc scripts/xslt/list-system-sources.xslt

Converted the ci subtarget (which isn't really used much) into a .flt
rather than .lua and .lst files.
2022-06-29 01:29:04 +10:00
Vas Crabb
ab6237da82 Eliminated cross dependencies between driver projects.
Driver projects now use globs to search for files.  There's less effort
editing the Lua files when things are moved around.  Remember it won't
automatically pick up a change, so if you add/remove/change files, you
should touch makefile to get it to find the change.

Driver projects no longer get the top-level MAME directory as an include
path.  This means you need to think about how you structure things and
not introduce nasty circular dependencies.

Subtarget projects can now be generated entirely from .flt files without
the need for separate Lua scripts and .lst files.  This has been done
for the arcade, mess and virtual targets.  It effectively works like a
SOURCES= build on a large scale.  This means you need to organise things
so the dependency genrators can find them.

There's an issue with the mess subtarget right now.  For some reason,
decmate2.cpp isn't picking up the dependency on the PDP8 CPU core for
the HD6120 device.  I'll debug it later
2022-06-27 18:06:20 +10:00
Vas Crabb
d8854e4e55 Updated scripts to support SOURCES= builds after the reorganisation happens. 2022-06-15 05:07:09 +10:00
Vas Crabb
74fe6e9d5c -Got rid of some legacy MESS support glue.
* Got rid of the special-casing for the "mess" subtarget name.
* Got rid of the MESS-specific Windows resources, emuator info source
  and man page.
* Added subtarget name to the internal name and original name in Windows
  resources.

-ui: Put the system-specific items on the input settings menu together,
 and fixed the crosshair visibility settings.
2022-06-13 16:53:23 +10:00
Vas Crabb
fe8e132efa
cps2.cpp: Added TOURNAMENT board communication simulation. (#9699) [Vas Crabb, Darksoft, Gregory Lewandowski] 2022-05-06 14:03:57 +10:00
hap
8b530b872d rendlay: remove led8seg_gts1 2022-02-26 18:40:59 +01:00
Vas Crabb
e539b09943 Re-enabled some compiler warnings and cleaned up some Python scripts a little. 2022-02-24 16:35:13 +11:00
Vas Crabb
5afce6cfab emu/render.cpp, emu/rendlay.cpp: Added scroll support for all elements. 2021-11-18 10:34:38 +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
Vas Crabb
ec80428647 Fairly significant overhaul of Lua engine and some cleanup.
The things that were previously called device iterators are not
iterators in the C++ sense of the word.  This is confusing for
newcomers.  These have been renamed to be device enumerators.

Several Lua methods and properties that previously returned tables now
return lightweight wrappers for the underlying objects.  This means
creating them is a lot faster, but you can't modify them, and the
performance characteristics of different operations varies.

The render manager's target list uses 1-based indexing to be more like
idiomatic Lua.

It's now possible to create a device enumerator on any device, and then
get subdevices (or sibling devices) using a relative tag.

Much more render/layout functionality has been exposed to Lua.  Layout
scripts now have access to the layout file and can directly set the
state of an item with no bindings, or register callbacks to obtain
state.  Some things that were previously methods are now read-only
properties.

Layout files are no longer required to supply a "name".  This was
problematic because the same layout file could be loaded for multiple
instances of the same device, and each instance of the layout file
should use the correct inputs (and in the future outputs) for the device
instance it's associated with.

This should also fix video output with MSVC builds by avoiding delegates
that return things that don't fit in a register.
2020-11-25 19:18:26 +11:00
Vas Crabb
740011e4d1 Allow layout files to embed image data.
Also improved symmetry of disk components, fixed positioning of
components when fitting to the pixel grid, and fixed inherited color
when item has no color specified.

Removed the dotmatrix components from complay.py - there are more
flexible ways to achieve the same thing.
2020-10-09 02:52:49 +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
0c8938f584 -emu/rendlay.cpp: Allow item animation.
-cgang.cpp: Make internal artwork more fun.
2020-10-05 00:18:33 +11: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
b68c48f5f8 Remove last remaining uses of <background> elements in layouts, and print warning messages on encountering deprecated elements. 2020-09-10 05:23:47 +10:00
Vas Crabb
b2158bd6ed -Eliminate remaining <bezel> elements from internal layouts.
These layouts have changes to element stacking order that can't be
avoided without changing the group structure in the layout files.  I
think it's harmless, but it's possible it could have had a detrimental
effect on risc2500 (I tested it and didn't see any changes, but I might
not have known what to look for).

-complay.py: Added basic checks for dupicate collection names.

As with other checks of this kind, it doesn't actually instantiate the
layout so it doesn't check things when variable substitution is
involved.
2020-09-09 21:29: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
fa8337f62f makedep.py: Deal with loops when there are parent directory references in #include directives.
As an aside, it would be nice if the loops weren't there in the first place.
2020-08-29 18:10:28 +10:00
Vas Crabb
19aec7e9c3 (nw) hopefully work around deprecation warning - removing something in 3.9 when the replacement was only added in 3.2 is typical of Python's disregard for stability 2020-04-06 04:21:28 +10:00
Vas Crabb
bdd2a33776 compile in the contents of the COPYING file for the about box - safer than assuming it will be in the working directory. no attempt at compressing it for now (nw) 2020-03-22 00:03:07 +11:00
Vas Crabb
19c4325bd8 Get rid of deprecated universal newlines open flag in Python scripts (io module is present as of Python 2.6) (nw) 2019-12-09 13:26:55 +11:00
Vas Crabb
6f4c1f6e5b Spring cleaning:
* Changed emu_fatalerror to use util::string_format semantics
* Fixed some incorrectly marked up stuff in build scripts
* Make internal layout compression type a scoped enum (only zlib is supported still, but at least the values aren't magic numbers now)
* Fixed memory leaks in Xbox USB
* There can only be one "perfect quantum" device - enforce that only the root machine can set it, as allowing subdevices to will cause weird issues with slot cards overiding it
* Allow multiple devices to set maximum quantum and use the most restrictive one (it's maximum quantum, it would be minimum interleave)
* Got rid of device_slot_card_interface as it wasn't providing value
* Added a helper template to reduce certain kinds of boilerplate in slots/buses
* Cleaned up some particularly bad slot code (plenty more of that to do), and made some slots more idiomatic
2019-11-01 00:47:41 +11:00
Vas Crabb
56b000344e nmk16spr, superfx, makedep: misc cleanup (nw) 2019-10-05 21:56:49 +10:00
Vas Crabb
bcfa6047c3 Build system maintenance:
* Re-write makedep.py for better performance and better parsing front-end
* Make srcclean deal with kinds of preprocessor abuse I never want to see in real life

(nw) The new parser front-end is better at recognising C++ syntax and
also substantially faster - bootstrapping a single-driver build should
be noticeably quicker.  Having a single parser for C++, .lst and .flt
files also gets us a bit closer to making it simpler to create custom
subtargets.
2019-10-04 22:55:01 +10:00
Vas Crabb
9a6e04b01f (nw) misc cleanup:
* subhuntr.cpp: S2636 PVI was seemingly uncommented by mistake in 93308b483e - offsets and sound routing seem to be copy/pasted from somewhere
* phi: prettier config
* scramble.cpp, wallc.cpp: avoid some calls to subdevice<...>(...)
* makedep.py: open source files as UTF-8 (GitHub #5482)
* minimaws: be less trusting
2019-10-02 02:11:58 +10:00
arbee
2292cf332c Preliminary Mac native OSD. Not working yet. [R. Belmont]
This will compile, link, and run a driver all the way to the first info screen, provided you use -video bgfx.

However, although there's a valid NSWindow created, it never actually appears on screen for unknown (but likely silly) reasons.

Inputs are not implemented and fullscreen exists but is untried.
2019-09-15 20:00:59 -04:00
hap
6a857daed7 complay: allow inputmask=0 when inputraw=1 for canceling input listener section (nw) 2019-08-24 12:19:57 +02:00
Vas Crabb
c38a3395e9 Make layout format more flexible:
* 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.
2019-07-06 00:23:20 +10:00
Vas Crabb
97b6717027 (nw) Clean up the mess on master
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.
2019-03-26 11:13:37 +11:00
andreasnaive
b380514764 Revert "conflict resolution (nw)"
This reverts commit c24473ddff, reversing
changes made to 009cba4fb8.
2019-03-25 23:13:40 +01:00
hap
465f5d42aa complay: spaces instead of tabs for indentation? (nw) 2019-03-24 22:48:13 +01:00
hap
5ec1befa63 complay: add inputraw (nw) 2019-03-24 22:43:46 +01:00
Vas Crabb
6ea9ff9042 (nw) Further layout work:
* 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
2018-08-02 23:11:17 +10:00
Vas Crabb
0ce07a8a1e (nw) more render work:
* 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
2018-07-31 04:18:28 +10:00
Vas Crabb
6669489679 allow repeating elements and groups - useful if you need e.g. a lot of numbered labels, but it limits complay.py's ability to check for invalid references as it can't evaluate expressions (nw) 2018-07-22 09:52:50 +10:00
Vas Crabb
dce955c68d rendlay: allow user variables and repetition in layouts, also add a few more predefined variables 2018-07-22 03:22:31 +10:00
Vas Crabb
f18c7cd65f Allow per-device internal layouts and remove some more MCFG_ macros.
Input and screen tags are now resolved relative to a layout's owner
device.

Easy way to demonstrate is with: mame64 intlc440 -tty ie15

Previously you'd only get the IE15 terminal's layout and you'd be unable
to use the INTELLEC 4/40 front panel.  Now you'll get the choice of
layouts from both the system and the terminal device in video options.
2018-07-16 16:26:01 +10:00
Vas Crabb
82c6d7dbc5 Allow layouts to specify screen tags rather than indices - makes order of instantiation irrelevant in Model 1 etc. 2018-07-10 04:26:57 +10:00