summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util
Commit message (Collapse)AuthorAgeFilesLines
* util/zippath.cpp: Adjusted error handling. Vas Crabb3 days1-3/+3
| | | | Fixes some cases of failing to open files in archives.
* frontend/mameopts.cpp: Fall back to settings from INI files later in the ↵ Vas Crabb13 days1-2/+33
| | | | | | search path. (#15310) util/options.cpp: Make earlier INI files take precedence over later INI files at the same priority level.
* ui: Improved media control experience, cleaned up a lot of bad code. Vas Crabb13 days1-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui/imgcntrl, ui/floppycntrl.cpp: Completely reworked logic - backtracking through menus is more intuitive, and more context is retained when encountering an error (it should be a bit easier to follow the code as well). ui/floppycntrl.cpp: Don't show the initial content selection menu when opening an image to read from while writing to a separate file. ui/filecreate.cpp: Moved the logic to enumerate floppy formats into the menu, use headings and separators, use callbacks to notify when an item is selected, don't pop menus when an item is selected, avoid actual work in destructors. ui/midiinout.cpp: Fixed infinite growth when repopulating the menu, don't pop the menu when a port is chosen, use a callback to notify that a port is chosen, use headings and separators, and in informative placeholder if no ports are available. ui/filesel.cpp: Don't show the option to write to a floppy diff (it still isn't implemented, it can be re-added if it's ever implemented), don't pop the menus when selecting an item, avoid actual work in destructors. ui/filemngr.cpp: Show more detail in the info box below the menu for software items and presets, substantially simplified the code for walking media devices. ui/info.cpp: Got rid of the media information menu, added media information to the system information menu. ui/menu.cpp: Allow immediately adjusting the hovered item with pen/mouse, saving a click. emu/ioport: Fixed incorrect strings displayed for 4C_5C, 3C_4C, 2C_3C and 3C_5C. The array absolutely must stay in order. Also added an assertion to catch these errors early. emu/ioport.cpp: Use a much less gross method of handling default strings (apparently someone forgot about function overloading). emu/ioport.cpp: Retired the crosshair mapper member macros - they don't serve much purpose. util/zippath.cpp: Actually report a failure to open a plain file rather than looking for files inside non-existent archives, making every error turn into "file not found". formats/flopimg.cpp: Allow matching extensions on string object names, rather than requiring a NUL-terminated string.
* frontend/mame/clifront.cpp: Honour -noreadconfig for command line verbs. Vas Crabb2026-05-052-4/+6
|
* cinematronics/leland.cpp: Better default trackball sensitivity. Vas Crabb2026-05-051-6/+3
| | | | | | | New working clones ------------------ Ketsui: Kizuna Jigoku Tachi (IKD 2007 Special - 2007 Cave Matsuri Version) [anonymous]
* util/delegate.h: Got rid of MAME_DELEGATE_DIFFERENT_MEMBER_ABI hack. Vas Crabb2026-04-031-15/+3
| | | | | | | This was supposed to allow calling i686 "thiscall" member functions via a free function pointer. It had been disabled for years as it stopped working in GCC. Simply having the code present breaks compiling with clang 22.1 even when it isn't enabled.
* Eliminated many temporary std::string objects. Vas Crabb2026-04-033-69/+96
| | | | | | | Also updated compiling documentation. Mentioned the possibility to use the x86-64 clang/libc++/ucrt environment with MSYS2 on Windows. Removed link to tools at mamedev.org - it's trivially easy to get an up-to-date MSYS2 environment by following the instructions.
* Switched language standard to C++20, bumped compiler requirement to GCC 11. ↵ Vas Crabb2026-04-022-54/+101
| | | | | | | | | | | (#15182) * Hackery to allow UTF-8 strings as well as plain strings: - emu/ioport.h: Allow char8_t for names in field configuration helper. - emu/device.h, emu/gamedrv.h: Allow char8_t for descriptions and manufacturers. - util/language.h: Allow char8_t message input. * util/strformat.h: Allow char8_t format and string arguments with char output. * ui/videoopt.cpp: Deal with UTF-8 strings as a distinct type. * osd/windows: Assume Windows 8 or later.
* Fixed things C++20 doesn't allow: Vas Crabb2026-03-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui/info.cpp, imagedev/cassette.cpp: Deal with UTF-8 strings as a distint type. ui/inputmap.cpp, debugger/qt/dasmwindow.cpp, debugger/qt/mainwindow.cpp, sound/coreaudio_sound.cpp, cpu/drcbec.cpp, mit/tx0_v.cpp, konami/3dom2.cpp: machine/mc68328.cpp, cpu/mips/mips1.cpp, cpu/mips/r4000.cpp, cpu/romp, machine/cammu.cpp, machine/ns32081.cpp: Avoid arithmetic between different enum types. dec/pdp1.cpp, konami/firebeat.cpp, mit/tx0.cpp, sound/lc7535.cpp, sound/spkrdev.cpp: Avoid arithmetic between enum and floating point. gaelco/gaelco3d_m.cpp: Fixed deprecated uses of volatile variables. sound/discrete.h: Avoid comparing enum to floatint point. ui/toolbar.ipp: Don't use UTF-8 qualifier on pure ASCII strings, just assume char is ASCII-like. cpu/unsp: Use default constructor for compiler_state. sgi/pm2_mmu.cpp: Avoid conflict between file static access and identically named function in unistd.h. osd/interface/audio.h: Provide an explicit constructor. util/server_http_impl.hpp: Fixed uninitialised class member warning.
* -cpu/e132xs: Log analysed instructions in UML log when using recompiler. Vas Crabb2026-03-052-15/+13
| | | | | | | | | | | | -cpu/powerpc: Modernised recompiler front-end code, improved instruction analysis logging. -cpu/sh: Cleaned up instruction analysis logging a little -util/client_ws.hpp, util/server_ws_impl.hpp, capcom/cps2comm.cpp: Updated some use of deprecation ASIO APIs. -nakajima/nakajies.cpp: Use range-based loops.
* emu/romentry.h: constexpr at namespace scope implies static for variables ↵ Vas Crabb2026-02-041-12/+12
| | | | and inline for functions; util/palette.h: Don't use reserved _Names.
* bus/nscsi/tape.cpp, util/ioprocs.cpp: Fixed last remaining tautological ↵ Vas Crabb2026-01-261-1/+10
| | | | compare warnings for clang/arm64.
* LUA: Ensuring that `entry:default_value()` returns the correct type (#14825) npwoods2026-01-192-0/+35
| | | | | | | | | | `entry:default_value()` was always returning string. A consequence of this problem is that the following LUA commands would error ``` manager.options.entries['beam_dot_size']:value(manager.options.entries['beam_dot_size']:default_value()) manager.options.entries['frameskip']:value(manager.options.entries['frameskip']:default_value()) ``` With this change, `default_value()` will return objects of the correct type
* -util/options.cpp: Shuffled numeric option conversions: Vas Crabb2026-01-132-23/+64
| | | | | | | | | * Moved float/integer conversions into the option entries themselves. * Fixed another bug where float values would be converted to strings with the global local, but converted from strings using the "classic" locale. * frontend/mame/luaengine.cpp: Got rid of duplicated numeric options conversion code.
* frontend/mame/luaengine.cpp: Better handling of options: Vas Crabb2026-01-131-2/+2
| | | | | | * Use "classic" locale for numeric conversions. * Don't use capturing lambdas. * Put integer overload of value() before float overload.
* emu/save.cpp, util/png.cpp, various disk and cassette formats: Use ↵ AJR2025-12-131-52/+43
| | | | multibyte.h helpers instead of playing fast and loose with alignments
* util/zippath.cpp: Handle "." directory and going up to or up from it. This ↵ AJR2025-11-131-8/+22
| | | | improves directory navigation in the MAME UI file manager.
* pgm3.cpp - bootstrap first decrypted block from internal Flash [Peter ↵ mamehaze2025-10-032-0/+36
| | | | Wilhelmsen, David Haywood] (#14259)
* palette: do assert() check before accessing array hap2025-08-041-38/+38
|
* (emu.h) resampler: don't repeat default settings at several places, remove ↵ hap2025-07-041-1/+1
| | | | | | unneeded float<->double conversions, filter/eq: round default q down instead of up (probably has no audible effect)
* tilemap: add callback for custom scrolling, and add one to k052109 for its ↵ hap2025-07-031-2/+2
| | | | combined col/rowscroll [hap, Jim Westfall]
* Various fixes: Vas Crabb2025-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ui: The new menus were unusable with a touchscreen, and not conducive to localisation. It's still not possible to add sound routes with a touchscreen, but at least it's possible to configure routes that exist. emu/sound.cpp: Fixed localisation issues, less temporary objects. emu/audio_effects: Fixed some localisation issues. plugins/autofire, plugins/inputmacro: Allow deleting autofire buttons or input macros without needing to use the UI Clear input. ui/selmenu.cpp, ui/imgcntrl.cpp: Use terse messages for bad media. Making these messages longer hasn't reduced support burden. Adding the version will just perpetuate the myth that you need to redownload all your ROMs for every release. ui/ui.cpp: Allow info screens to be dismissed by mouse clicks or touches. ui/sliders.cpp: Hiding the menu should preserve state. This is a design choice. sound: Avoid anything that could possibly depend on static initialisation order across transaltion units. Allow speaker position names to be localised. sound/none.cpp: Don't pretend it can create output streams.
* dipalette: add shadow config to savestates, and might as well rename hilight ↵ hap2025-06-241-1/+1
| | | | to highlight
* options: fix range checker with negative values hap2025-05-191-1/+1
|
* Make avi able to do more than stereo Olivier Galibert2025-04-281-1/+1
|
* Miscellaneous minor stuff: Vas Crabb2025-03-171-2/+6
| | | | | | | | * scripts/minimaws: Set option strict for JavaScript code. * util/mfpresolve.h: Be explicit about turning nullptr into a pointer to data. * cpu/drcbearm64.cpp: Reduced number of temporary registers used for AND with some operand combinations.
* Cleaned up some stuff: Vas Crabb2025-03-011-19/+13
| | | | | | | | * oberheim/xpander.cpp: Use multi-dimensional output finders algorithms and range-based for loops. * util/chd.cpp: Use a C++17ism to reduce if nesting a bit. * sound/tms5220.cpp: Five an example VERBOSE value that will actually do something rather than LOG_GENERAL which isn't used in the file at all.
* util/chd.cpp: Hacked around GitHub #13029 (issues creating delta CHDs). Vas Crabb2025-02-271-35/+41
| | | | | | | | | | | | The code depends on getting away with trying to read at least one hunk past the end of the parent CHD. Previously it just ignored any errors from reading the parent CHD, but adding error checking broke it. This hack just ignores that specific error. Also cleaned up some gross flow control and made more things const. The code should obviously be fixed properly, but that's non-trivial. This gets it to a state no worse than it was in 0.270.
* cdrom: fixed wrong track number in error messages [Robbbert] hap2025-02-211-14/+24
|
* -cpu/drcbex64.cpp: Fixed handling of address map global mask. Vas Crabb2025-02-062-20/+253
| | | | | | | | * Fixed Final Furlong failing to boot. -util/mfpresolve.cpp, emu/emumem_aspace.cpp: Moved some member function pointer manipulation stuff into the library. Gives another slight reduction in the size of libemu.
* util/corestr.cpp, sound/sdl_sound.cpp: Added missing standard library ↵ Julian Sikorski2025-01-211-0/+1
| | | | headers. (#13249)
* -cpu/drcbex64.cpp: Be nicer to the return address predictor. Vas Crabb2025-01-152-8/+8
| | | | | | -cpu/drcbex86.cpp: Give hints to use short displacements for jumps to local unbound labels. -util/mfpresolve.h: Use references for some things that must not be null pointers.
* util/mfpresolve.h: Fix build with MSVC ABI. Vas Crabb2025-01-141-3/+3
| | | All ABI paths must be valid C++ - can't use a static assertion.
* util/mfpresolve.h: Linux wants <cstddef> for ptrdiff_t. Vas Crabb2025-01-141-1/+2
|
* -util/mfpresolve.cpp: Moved member function resolution code to a common ↵ Vas Crabb2025-01-143-200/+352
| | | | | | | | | | location. * util/delegate.cpp, cpu/drcbex64.cpp, cpu/drcbearm64.cpp: Use common member function resolution code. -cpu/drcbearm64.cpp, cpu/drcbex64.cpp, cpu/drcbex86.cpp: Moved some stuff to anonymous namespaces. -cpu/drcbex64.cpp, cpu/drcbex86.cpp: Defer allocating labels if they aren't always needed.
* util/coretmpl.h: Added constexpr to the bitswap with explicit count. Vas Crabb2025-01-081-1/+1
| | | | This was a hangover from poor implementation of constexpr in older compilers.
* util/cdrom.cpp: Change fprintf(stderr, ...) calls to osd_printf_error AJR2024-11-081-3/+3
|
* -util/cdrom.cpp: Fixed issues with CUE, TOC and GDI parsers. (#12948) 9871238791132024-11-091-429/+506
| | | | | | | * Rewrote GDI parser to be more robust and identify more kinds of invalid input. * Don't ignore the last line in CUE and TOC files if there is no terminating newline. * Use osd_printf_ family functions for output. -tools/chdman.cpp: Added a sink for osd_printf_ family function output.
* machine/t10mmc.cpp: Added stub CD-TEXT TOC read; util/cdrom.cpp: Handle ↵ 9871238791132024-11-091-1/+37
| | | | | | | control flags in TOC files. (#12954) * machine/t10mmc.cpp: Return dummy data for CD-TEXT format TOC read. * machine/t10mmc.cpp: Fixed bug in track transition. * util/cdrom.cpp: Handle track type and serial copy management flags in TOC file input.
* util/chd.cpp, util/chdcodec.cpp: Added a safer way to let codecs do special ↵ Vas Crabb2024-10-144-51/+135
| | | | stuff with hunks.
* util/chd.cpp: Made a few more member functions return error conditions. Vas Crabb2024-10-132-482/+493
| | | | Also mark error paths as unexpected to optimise against them.
* chd.cpp: More API changes AJR2024-10-113-99/+121
| | | | | | | | | - Have metadata_find return std::error_condition instead of throwing an exception - Replace the is_XXX predicates with check_is_XXX methods that return a std::error_condition, enabling improved error reporting for cdrom_image_device - Retain read error information in chd_file_compressor - Make a bunch of methods noexcept This mostly restores the changes from cc772072fa635146b1df39a5694d2a8f8aa5a34f.
* util/chd.cpp, util/chdcodec.cpp: Made some APIs return errors rather than ↵ Vas Crabb2024-10-114-41/+64
| | | | | | throwing exceptions. [AJR] Mostly salvaged from 901a68e2e0bb0d9178ffdb59e128718c1495250f.
* -machine/atastorage.cpp: Log disk geometry at verbose level (rather than ↵ Vas Crabb2024-06-221-2/+3
| | | | | | | | | | debug) so it can be shown in release builds. * Also use logmacro.h for compile-time configurable logging. -util/ioprocs.cpp: Added assertion to write_at equivalent to the one in write. * Checks for invalid results from underlying write call. * Also more const.
* -util/corefile.cpp: Fixed core_file failing to propagate write errors. Vas Crabb2024-06-212-2/+3
| | | | | | | | -util/ioprocs.cpp: Reverted gross hack. -osd/windows: Ensure WM_MOUSE* to WM_POINTER* event translation is always disabled. -tecmo/gaiden.cpp: Call base device_post_load(), use logmacro.h.
* util/ioprocs.cpp: Count zero actual bytes written on a write call as an ↵ arbee2024-06-041-1/+1
| | | | error. Fixes lock-up writing to a write-protected image. [R. Belmont, Peter Ferrie]
* Cleanup: Vas Crabb2024-05-222-74/+86
| | | | | * olympia/dday.cpp: Correctly size the inappropriately named "color RAM". * util/cdrom.cpp, formats/fs_fat.cpp: More const, less copying.
* util/cdrom, machine/t10mmc: Add preliminary support for multisession ↵ 9871238791132024-05-122-146/+347
| | | | | | | | | | | CD-ROMs, indexes, and track flags (#12201) * util/cdrom: Refactoring * util/cdrom: Read all indexes from cue files * util/cdrom: Read in track flags from cues * util/cdrom: Multisession support for cues * machine/t10mmc: Playback from current head, other misc cleanup * machine/t10mmc: Implement T10MMC_CMD_MECHANISM_STATUS * machine/t10mmc: Implement TOC_FORMAT_FULL_TOC, TOC_FORMAT_SESSIONS, and return proper indexes for T10MMC_CMD_READ_SUB_CHANNEL
* emu/http.cpp, util/server_http_impl.hpp: Added override qualifiers for ↵ Vas Crabb2024-04-231-4/+4
| | | | overridden virtual member functions.
* Fixed a few class memory access warnings. Vas Crabb2024-04-141-3/+5
|