summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/lib
Commit message (Collapse)AuthorAgeFilesLines
* osd: Preliminary revised macOS CoreAudio backend. [R. Belmont] arbee2025-05-311-10/+0
| | | | | | | - Supports multiple input and output streams to multple devices simultaneously. - audio_latency now is a floating-point number of 50 Hz audio frames. 0 is valid now. - Channel layouts are determined when available (many devices don't support them). - External effects support removed; it may return later.
* sound: change audio_latency meaning similar to what it was before (20ms ↵ hap2025-05-311-1/+1
| | | | steps for portaudio, xaudio2, wasapi), old mame.ini default setting of 2 should work fine
* attotime: fix lockup with as_string and negative attotime, hap2025-05-301-1/+1
| | | | | | video: fix issue with throttling when mame runs at slow motion (-speed lower than 0.2) options: change mimimum speed setting from 0.01 to 0.1 (mame would crash with very low value, and besides, video throttle still fails below 0.1), ui: add speed slider when cheats are enabled
* sound: tell the osd about the update Olivier Galibert2025-05-292-0/+11
|
* -sound: Removed DirectSound sound module. Vas Crabb2025-05-291-1/+0
| | | | | -sound/xaudio2_sound.cpp: Use more fine-grained locking in voice callbacks, simplified further simplified buffer queueing.
* -sound/wasapi_sound.cpp: Improved error handling and buffer management. Vas Crabb2025-05-261-1/+2
| | | | | | | | | | | | | | | | | | | | | -lib/osdobj_common.cpp: Made WASAPI sound the default on Windows and made DirectSound lower priority than XAudio2. -osd/eminline.h: Made multiply/divide helper names a bit more consistent with other functions. -osd/eigcc.h: Moved helpers that use the __int128 type here, and fixed availability detection for them. -osd/eigccx86.h: Added fast multiply/divide helpers for x86-64. -docs: Updated the list of supported sound modules. -exidy/exidy.cpp: Use the 1 Coin/1 Credit setting listed in the manual for Venture by default. -emu/sound.cpp: Fixed GCC uninitialised local variable warnings in sound_manager::run_effects().
* sound: change audio_latency to seconds (float), so people with existing ↵ hap2025-05-202-3/+3
| | | | mame.ini won't get broken sound
* sound: remove references to portaudio options that were removed hap2025-05-182-16/+0
|
* sound: change audio_latency duration option to milliseconds hap2025-05-181-1/+1
|
* osd: small cleanup to copy pasted header comment hap2025-05-161-1/+1
|
* New sound infrastructure. Olivier Galibert2025-04-272-26/+56
| | | | | | | | | | | | | | | | | Should be added soon: - mute - speaker/microphone resampling To be added a little later: - compression - reverb Needs to be added by someone else: - coreaudio - direct - portaudio - xaudio2 - js
* osd: Got rid of the gross globals and functions for manipulating them in the ↵ Vas Crabb2025-04-232-13/+31
| | | | network modules.
* lib/osdlib_unix.cpp: Added code to detect attached debugger on Linux. Vas Crabb2025-04-181-5/+46
|
* osd: Added helper for getting CPU cache line size. Vas Crabb2025-01-133-0/+79
|
* file selector: Add midi connection selection to midi ports Olivier Galibert2024-10-292-0/+7
|
* Cleaned up the mess from #12610: Vas Crabb2024-08-271-1/+1
| | | | | | | * Command line options need to be documented. * Don't assume C strings returned as option values remain valid indefinitely. * Fixed wording for option description.
* gdbstub: add -debugger_host option (#12610) Ramiro Polla2024-08-082-0/+3
| | | | * This allows setting the host to 0.0.0.0 to accept connections from outside of localhost.
* -osd: Update slider list on demand rather than on frame updated (fixes MT08857). Vas Crabb2024-04-272-6/+25
| | | | -konami/konamigq.cpp: No need to cancel a newly allocated timer.
* input/input_sdl.cpp: Added an SDL lightgun provider. Vas Crabb2024-04-261-0/+1
| | | | | | | | | | This does essentially the same thing as the Win32 lightgun provider, mapping the absolute pointer position over the window to gun axes. Also added a bunch of const in the windows input handling code. docs: Bumped version, as features that are not in a releaesd version of MAME are now documented.
* osd: Cleaned up MIDI and network interfaces a little more. Vas Crabb2024-03-012-5/+43
|
* Skeleton driver for 600 Cellular Activation Tester (#11225) MooglyGuy2023-05-131-1/+1
| | | | | | | | | | | | | | | | | * New systems marked not working ------------------------------ 600 Cellular Activation Tester [Ryan Holtz, Leo Romo] -m6801.cpp: Fixed HD6303R to use an internal map, removed internal-only handlers from associated drivers. [Ryan Holtz] -video.cpp: Raised maximum prescale value to 20 to account for very small LCDs. [Ryan Holtz] -screen.cpp: Replaced old MCFG_ references in a warning message with member function names. [Ryan Holtz] * -timekpr: Added Dallas DS1643, a clone of the STMicro M48T58. [Ryan Holtz]
* osdlib.h: Add missing #include AJR2023-05-061-0/+1
|
* Miscellaneous improvements: Vas Crabb2023-04-144-29/+29
| | | | | | | | | | | | | | infoxml.cpp: Thread device processing. Gives about a 10% speed improvement overall, and avoids the need to mess with the locale of the ultimate output stream. debugger/win/consolewininfo.cpp: Show image mount/create error messages on the console. emu/devdelegate.h, util/delegate.h: Added deduction guides for common delegate creation patterns (only used in sega/segas16a.cpp so far). More noexcept on things that have no business throwing exceptions.
* Allow loading PNG/JPEG/MS DIB bitmaps from Lua, and cleanup. Vas Crabb2023-04-131-2/+2
| | | | | | | | | | | 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.
* Various optimisations to code generaton. Vas Crabb2023-03-262-2/+2
| | | | | | | | | | | | | | | util/bitmap.cpp, util/palette.cpp: Marked lots of things constexpr. Bitmaps don't throw exceptions on allocation failure, they just become invalid. Almost nothing in MAME actually checks for this. emu/profiler.cpp: Abort if the profile stack overflows rather than throwing an exception. This is a developer feature and if it overflows, the code is broken. Calling a noreturn noexcept function generates less code than throwing an exception, which adds up. util/strformat.cpp: Traded away some unnecessary flexibility for more compact code. The stream objects must derive from std::basic_ostream now - they can't just be any old objects with the expected operators.
* Various cleanups: Vas Crabb2023-02-271-1/+1
| | | | | | | * cpu/dsp56156: Removed vestigial (and excessively slow) "new" execution code. * apple/bandit.cpp: Got rid of unnecessary friend declaration. * nintendo/n64_v.cpp: More const. * Fixed a few "const qualifier has no effect" warnings.
* Update accumulating relative inputs exactly once per frame. Vas Crabb2023-02-242-6/+6
| | | | | | | | | | | | | This fixes "amplification" effects that would happen if the frame rate rose above 100 Hz (whether by unthrottling or otherwise). Synchronise with wall clock any time inputs are read. Not doing this has weird effects on relative inputs with frame skipping and contributes to unresponsiveness of menus. Reduce visual latency for mouse movement on menus when paused or skipping frames. The rest of the code changes to menus won't provide benefits until draw can happen after event handling.
* osd: Don't pump events when reading inputs. Vas Crabb2023-02-232-0/+10
| | | | | | This was a drain on performance. If anything is trying to poll inputs in a loop, it needs to call input_update() to ensure it gets up-to-date state.
* bgfx: Refined configuration handling: Vas Crabb2023-02-021-8/+8
| | | | | | | | | | | | | * Sort screen chains by none, default, then collation order (rather than whatever order the filesystem yields). * Correctly persist settings across fullscreen toggle when explicit screen chains are configured. * If chains are specified for a single window only, apply them to all windows. * Treat empty string for screen chain as "default" rather than crashing. * Changed default setting for bgfx_screen_chains to an empty string so chain selection will be saved/restored per system with mame.ini file created by -cc with no other settings.
* osd: Fixed BGFX crash on toggling fullscreen on Linux. Vas Crabb2023-02-021-2/+2
| | | | Also fixed draw13.cpp upsetting older versions of clang.
* osd: Turned video modules into actual modules, fixed various issues. Vas Crabb2023-02-012-74/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't ignore the return status of OSD module initialisation. Attempt to fall back to an alternate module if the selected module fails to initialise. Log more useful diagnostic information at verbose level. Fixed BGFX crash on exit after toggling fullscreen. Also persist more settings than just the selected chains across toggling fullscreen. Turned video modules into OSD modules in the same sense as all the other OSD modules. They now use the same selection/fallback mechanism as all the other modules without special extra code in the OSD implementations. Untangled some object ownership mess. Windows own renderers, OSD objects own windows. Fixed a refrence loop that caused the first window object to always leak. Don't create renderer object until after underlying window has been created. Fixed issues with order of creation/destruction when toggling fullscreen or changing prescale in fullscreen with -switchres in SDL builds. Use more smart pointers in BGFX and Direct3D render modules. Most of the code now reutrns a smart pointer when handing over ownership or a naked pointer when retaining ownership. Fixed a few leaks and simplified cleanup code. Encapsulated various OSD modules better.
* Various input and OSD refactoring: Vas Crabb2023-01-292-27/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Miscellaneous fixes and refactoring: Vas Crabb2023-01-282-76/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* osd: Added option to accept SDL game controller/joystick input when losing ↵ Vas Crabb2023-01-142-1/+4
| | | | UI focus.
* osd: Added support for mapping files to sdlgame joystick provider and made ↵ Vas Crabb2023-01-142-126/+139
| | | | | | | | | | | | | | | | | 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.
* -osd: Improved SDL Game Controller joystick provider: Vas Crabb2023-01-131-1/+1
| | | | | | | | | * Allow fallback to joystick API for devices without game controller mappings. * Detect controller reconnection. * Force Switch Pro Controller ZL/ZR to act like buttons. * Added button names for Google Stadia controller. * Also fixed dumb copy/paste error on my part in Windows clipboard code.
* -osd: Better XInput and SDL game controller input enhancements: Vas Crabb2023-01-121-1/+2
| | | | | | | | | | | | | | | * 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.
* util/options.cpp: Fixed overriden default option values from OSD. Vas Crabb2022-12-191-2/+2
|
* osd/modules/file: Don't magically substitute environment variables when ↵ npwoods2022-12-171-2/+2
| | | | | | | | opening files. (#9859) * util/options.cpp: Added option types for single and multiple paths. * util/options.cpp: Substitute environment variables in values from defaults and INI files. * ui/dirmenu.cpp: Removed hard-coded list of multi-path options. * plugins: Don't substitute environment variables in path options.
* Patched up some gaps in functionality and fixed some bugs. Vas Crabb2022-09-025-33/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui: Added some missing functionality: * Added an option to copy input device IDs to the relevant menus. * Added an item for setting the software lists files path (-hashpath) to the folder setup menu. * Allow pasting text from clipboard in most places that allow typing (searching, entering filenames, entering barcodes). * Changed the software selection menu heading to be a bit less misleading. * Made barcode menu less eager to rebuild itself unnecessarily, and removed some confusing and apparently pointless code. Exposed more Lua bindings: * Added low-level palette objects. * Added indexed bitmap types. * Added a bitmap method for extracting pixels from a rectangular area as a packed binary string. * Changed screen device pixels method to return width and height in addition to the pixels. osd: Added some functionality and cleaned up a little: * Added a function for copying text to the clipboard. * Moved function for converting Windows error codes to standard error conditions to winutil.cpp so it can be used from more places. * Removed duplicate declaration of osd_get_clipboard_text and made the function noexcept (including fixing implementations). * Made macOS implementation of osd_get_clipboard_text skip the encoding conversion if it finds UTF-8 text first. * Changed the default -uimodekey setting so it doesn't lose the "not shift" that stops the default from interfering with UI paste. Various bug fixes: * util/unicode.cpp: Fixed the version of utf8_from_uchar that returns std::string blowing up on invalid codepoints. * util/bitmap.h: Fixed wrapping constructors for indexed bitmaps taking the wrong parameter type (nothing was using them before). * util/bitmap.cpp: Fixed potential use-after-free issues with bitmap palettes. * emu/input.cpp, emu/inputdev.cpp: Log 1-based device numbers, matching what's shown in the internal UI and used in tokens in CFG files. * emu/emumem.cpp: Added the bank tag to a fatal error message where it was missing. docs: Reworked and expanded documentation on configuring stable controller IDs. For translators, the changes are quite minor: * There's a menu item for copying a device ID to the clipboard, and associated success/failure messages. * There's the menu item for setting the software list file search path. * One of the lines in the software selection menu heading has changes as it could be interpreted as implying it showed a software list name.
* OSD/network interface cleanup AJR2022-08-281-0/+1
| | | | | | | - Move osd_midi_device from osdcore.h to osdepend.h - Move osd_list_network_adapters from osdcore.h to osdnet.h (was already defineduniquely in osdnet.cpp) - Move #include <cstdarg> from osdcore.h to emu.h - Remove dinetwork.h from emu.h
* remove not used template function Miodrag Milanovic2022-07-071-8/+0
|
* Clean up #includes in src/osd (#10029) ajrhacker2022-07-042-21/+47
| | | | | * Clean up #includes in src/osd * render/bgfx/view.cpp: Add license header
* util/options.h: Removed legacy OPTION_* option type constants. (#9851) npwoods2022-05-301-116/+116
| | | These constants were polluting the global namespace.
* -bgfx: Added default LUT PNG, fixes LUT-effect crash. Fixed external texture ↵ MooglyGuy2022-03-121-1/+1
| | | | loading, restoring HQx filters. [Ryan Holtz] (#9401)
* Removed extra semicolons after function bodies in remaining headers. (#9277) 0kmg2022-02-071-1/+1
|
* Remove OSD_UWP from rest of code Miodrag Milanovic2021-10-262-16/+0
|
* Remove uwp specific sources Miodrag Milanovic2021-10-262-209/+0
|
* Updated help text for bgfx_backend Robbbert2021-08-131-1/+1
|
* sound: Pulseaudio support Olivier Galibert2021-04-161-0/+3
|