summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fixed a few class memory access warnings. Vas Crabb3 days1-3/+5
|
* util/cdrom.cpp: Zero entire output TOC structure in ↵ MetalSlug8 days1-1/+2
| | | | | cdrom_file::parse_metadata. (#12219) Fixes issues with fields that are not explicitly assigned in all situation.
* util/unzip.cpp: Work around spurious maybe uninitialised warning with ↵ Vas Crabb2024-03-251-1/+1
| | | | certain GCC versions.
* imagedev/cassette.cpp, formats/flacfile.cpp: Added support for saving ↵ wilbertpol2024-03-222-0/+38
| | | | | cassette images in FLAC format. (#12115) util/flac.cpp: Implemented seek/tell callbacks for FLAC library.
* util/cdrom.cpp: Refactored parse_cue and parse_gdicue (should fix GitHub ↵ 9871238791132024-03-072-468/+158
| | | | | | | | | | #12081). (#12087) This should greatly improve data integrity when creating and extracting GD-ROM images. * util/cdrom.cpp: Refactored parse_cue to handle GD-ROMs. * util/cdrom.cpp: Don't discard any data from GD-ROM cue/bin input including pre-gap data. * tools/chdman.cpp: Fixed splitframes handling. * tools/chdman.cpp: Added warning when extracting GD-ROM CHDs to cue/bin format.
* coreutil.h: Eliminate core_crc32 wrapper function in favor of ↵ AJR2024-02-262-19/+0
| | | | util::crc32_creator
* Merge branch 'release0263' into HEAD Vas Crabb2024-02-261-1/+9
|\
| * util/bitstream.h: Adjust m_doffset based on m_dbitoffs when flushing. (#12060) 9871238791132024-02-251-1/+9
| | | | | | Fixes issues exposed when reading LaserDisc CHDs.
* | util/ioprocs.cpp: Added wrappers for common patterns. (#11608) Vas Crabb2024-02-2521-312/+516
|/ | | | | emu/diimage.h: Removed fread overloads that allocate memory for output. util/core_file.cpp: Changed output size of load to size_t.
* util/bitstream.cpp: Fixed cases where bits would be dropped when reading and ↵ 9871238791132024-02-241-13/+45
| | | | | | writing. (#12057) * In some cases, bits would be dropped when writing if there wasn't enough space in the buffer. * Fixes bad hunk maps being written to CHD files and incorrect hunk map data being read.
* Revert "util/bitstream.cpp: Fixed cases where bits would be dropped when ↵ Vas Crabb2024-02-241-45/+13
| | | | | | | | | reading and writing. (#12057)" This reverts commit 69c3cd7daba9e8dd130af167c27ecd8b4131074f. This causes CHD SHA1 digests to change. Either it's buggy, or CHD SHA1 digests depend on the representation rather than the data itself.
* util/bitstream.cpp: Fixed cases where bits would be dropped when reading and ↵ 9871238791132024-02-241-13/+45
| | | | | | writing. (#12057) * In some cases, bits would be dropped when writing if there wasn't enough space in the buffer. * Fixes bad hunk maps being written to CHD files and incorrect hunk map data being read.
* util/chd.cpp: Calculate size of buffer needed to store hunk map (fixes ↵ balr0g2024-02-171-8/+19
| | | | #12023). (#12040)
* imagedev/floppy.cpp: Delete unused getter that leaked details AJR2024-02-111-1/+1
| | | | * util/options.h: Use forwarding header
* tools/chdman.cpp: Fixed numerous issues, including: Vas Crabb2024-02-102-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | Support input start/size options for createdvd. Fixed not reporting an error on unrecognised command line options. Fixed --fix/-f option for verify command not working. Report an error when conflicting options are supplied (e.g. hard disk template and C/H/S geometry, or input start offset in both bytes and hunks). Previously the results would be unpredictable. Detect more invalid combinations of options, and detect when output unit size or hunk size doesn't match parent. Changed order of processing options for createhd so using a template cannot not inadvertently result in an invalid combination of sector size and hunk size. Don't require an explicit unit size for createraw if an output parent CHD file is supplied. Fixed an object leak in createcd.
* util/cdrom.cpp: Removed unreachable additional handler for MODE2/2336 ↵ stonedDiscord2024-02-061-5/+0
| | | | tracks. (#12012)
* Miscellaneous cleanups: Vas Crabb2024-02-032-6/+6
| | | | | | | | | | | | | | | | konami/hexion.cpp: Fixed a potential heap smash, and don't mark tiles dirty unnecessarily. konami/spy.cpp: Fixed video enable never being set to false, added an object finder for ROM bank (reduce tag lookups). tvgames/xavix.cpp: It's stylised "Hi-kara" (no capital K), software list already uses this capitalisation. rm/rm380z*: Added object finder for character generator ROM, slightly cleaned up some code. homelab/homelab.cpp: Avoid some literal sizes.
* util/cdrom.h: Fixed size of track info array. Vas Crabb2024-01-262-27/+2
| | | | | Also made it possible to enable VERBOSE in cdrom.cpp without link errors.
* imagedev/cdromimg.cpp: Fixed object lifecycles when loading from softlist or ↵ Vas Crabb2024-01-261-1/+1
| | | | | | | ROM region. * Reverted workaround 4c0957d7f0ba6a72e7267270db07ee06fe717109. * Cleaned up a few things.
* lib/util/cdrom.h: fix out-of-bounds MAME init crash when disc is 99 tracks angelosa2024-01-251-1/+1
| | | | * cfr. pcecd:cosmfnt and pcecd:solbianc
* util/cdrom.cpp: Don't strip pregaps from Redump GD-ROM files (#11913) Maxime Gauduin2024-01-061-44/+1
|
* lib/util/flac.cpp: Add support for flac data where bits_per_sample != 16. ↵ wilbertpol2023-12-302-9/+62
| | | | (#11848)
* ui: remove use of utf8.h hap2023-12-221-5/+0
|
* misc: remove some use of utf8.h in input defs hap2023-12-221-29/+0
|
* formats/flacfile.cpp: Added support for compact cassette images in FLAC ↵ wilbertpol2023-12-171-0/+6
| | | | format. (#11841)
* Added Zstandard support for zip archives and CHDs. (#11827) Vas Crabb2023-12-114-10/+269
| | | | | | * 3rdparty/zstd: Added Zstandard compression library version 1.5.5. * util/unzip.cpp: Added support for Zstandard compression (method 93). * util/chdcodec.cpp: Added support for Zstandard compression. * 3rdparty/flac: Always define NDEBUG to avoid log spam.
* 3rdparty/lzma: Updated to version 23.01. Vas Crabb2023-12-061-3/+3
|
* Revert "chd.cpp, chdcodec.cpp: Minor refactoring" Vas Crabb2023-10-274-133/+66
| | | | This reverts commit 901a68e2e0bb0d9178ffdb59e128718c1495250f.
* Revert "chd.cpp: Refactoring, part 2" Vas Crabb2023-10-273-124/+137
| | | | This reverts commit cc772072fa635146b1df39a5694d2a8f8aa5a34f.
* chd.cpp: Refactoring, part 2 AJR2023-10-233-137/+124
| | | | | | | - Change is_XXX to return std::error_condition instead of bool so that errors can be passed down the line; rename these to check_is_XXX to indicate that they are no longer basic predicates - Change return type of internal function metadata_find to std::error_condition so that errors can be returned rather than thrown * imagedev/cdromimg.cpp: Fix bug where cdrom_file object could be constructed twice in a row for CD-ROMs and once for DVDs
* chd.cpp, chdcodec.cpp: Minor refactoring AJR2023-10-224-66/+133
| | | | | | | | | - Return std::error_condition from set_raw_sha1 and set_parent_sha1 instead of throwing exceptions - Fix a few cases where error codes could be swallowed - Catch exceptions in is_XXX predicates - Add const qualifier to SHA-1 extraction methods - Add noexcept qualifier to a few internal functions - Clean up various comments
* Allow clone CHDs to use parent CHDs as parents. Vas Crabb2023-10-202-35/+78
| | | | | | | | | | | * util/chd.cpp: Allow caller to provide a helper for finding parent CHDs and expose (recursive) missing parent status. * emu/romload.cpp: Search parent systems/devices/software for parent CHDs on encountering a delta CHD. * emu/romload.cpp: Report error on delta CHDs when parent can't be found. * emu/romload.cpp: Check parents for matching CHDs with different names for devices as well as systems and software.
* Miscellaneous change roll-up: Vas Crabb2023-09-294-283/+273
| | | | | | | | | | | | | | | | | | | | | | | | render/drawbgfx.cpp: Return an error if Wayland EGL surface can't be created for additional windows. emu/emucore.h: Added explicitly defaulted copy and move constructors for emu_fatalerror. Fixed apparent misunderstanding of const. Returning const value types and casting to const value types is pointless outside very narrow use cases. Putting const value type parameters in interfaces just makes trouble. cpu/adsp2100: Use count_leading_ones_32 where it's simple rather than inverting and counting leading zeroes. util/multibyte.h: Don't pollute global namespace, constexpr implies inline, make narrowing casts explicit. imagedev/simh_tape_image.h: inline is implied for member functions with bodies supplied at declaration. Tidied up some ugly casts in various places.
* multibyte.h: Fix shift count bug in 48-bit and 64-bit big-endian functions AJR2023-09-231-4/+4
|
* srcclean in preparation for MAME 0.259 release branch Vas Crabb2023-09-242-40/+40
|
* simh_tape_file: remove unnecessary posix-only header Patrick Mackinlay2023-09-201-1/+0
|
* chd.cpp, chdcodec.cpp, flac.cpp: Use multibyte.h functions AJR2023-09-175-133/+160
| | | | * multibyte.h: Add functions for reading and writing 48-bit values
* aviio.cpp: Use std::clamp AJR2023-09-171-3/+4
|
* avhuff.cpp, cdrom.cpp, msdib.cpp, unzip.cpp, vbiparse.cpp: Use multibyte.h ↵ AJR2023-09-175-124/+71
| | | | functions
* aviio.cpp: Massive code cleanup AJR2023-09-172-767/+532
| | | | | | - Use multibyte.h functions and std::swap - Turn most macro constants into enums and move them down into classes - Change comments to C++ style
* imageutl.h: Retire pick_integer_[bl]e and place_integer_[bl]e in favor of ↵ AJR2023-09-171-32/+32
| | | | | | the simpler functions in multibyte.h * multibyte.h: Add constexpr for getters and noexcept for all functions
* nscsi: Add SCSI tape device based on SIMH tape image format (#11430) Miëtek Bak2023-09-144-0/+999
|
* machine/t10mmc.cpp: Implemented most features of T10 MMC read CD (0xbe) ↵ 9871238791132023-08-231-1/+1
| | | | command. (#11499)
* -emu/devcb.h: Removed set_log and append_log. Vas Crabb2023-08-021-4/+7
| | | | | | | | | * These helpers were unintuitive and inflexible. In particular, set_log on a write handler would only log when the value is non-zero, which doesn't appear to be the desired behaviour for several uses. -util/options.cpp: Always leave a space between option and description in usage messages (fixes GitHub #11438).
* emu/devfind.h: Added a lookup() member function to device finders. Vas Crabb2023-06-121-40/+40
| | | | | | | | | | | | | This simplifies looking up the target device during configuration. It is useful when configuring child devices in things like CPUs with integrated peripherals. emu/device.h: Allow templated subdevice() and siblingdevice() to work with classes that don't derive from device_t (e.g. classes that derive from device_interface). util/delegate.h: Added more noexcept. Won't make much difference as most of the affected member functions are inline anyway.
* Some more sprintf() deprecation warning fixes. [R. Belmont] arbee2023-06-031-7/+7
|
* cdrom: Bunch of fixes Olivier Galibert2023-05-051-0/+1
|
* chd: Add dvd support. better abstraction in general, multi-image support in ↵ Olivier Galibert2023-05-044-8/+198
| | | | arcade-type drivers
* util/unzip.cpp: Update for latest LZMA SDK. Vas Crabb2023-05-041-2/+2
|
* 3rdparty/lzma: Updated to LZMA SDK version 22.01 Vas Crabb2023-05-042-16/+29
|