summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/cdrom.h
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup: Vas Crabb2024-05-221-3/+10
| | | | | * 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-121-18/+47
| | | | | | | | | | | 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
* util/cdrom.cpp: Refactored parse_cue and parse_gdicue (should fix GitHub ↵ 9871238791132024-03-071-2/+1
| | | | | | | | | | #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.
* util/cdrom.h: Fixed size of track info array. Vas Crabb2024-01-261-1/+1
| | | | | 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
* machine/t10mmc.cpp: Implemented most features of T10 MMC read CD (0xbe) ↵ 9871238791132023-08-231-1/+1
| | | | command. (#11499)
* cdrom: Bunch of fixes Olivier Galibert2023-05-051-0/+1
|
* cdrom: Pass phys flag to read_partial_sector in read_subcode (#10231) 9871238791132022-08-151-1/+1
|
* srcclean in preparation for 0.243 Vas Crabb2022-04-241-5/+5
|
* cdrom_file: Removed unused and abstraction-breaking get_chd method Olivier Galibert2022-04-041-1/+0
|
* cdrom.cpp: Clean up code somewhat AJR2022-04-011-12/+12
| | | | | | - Use std::string_view for filename parameters - Use ioprocs rather than core_file - Reduce commenting out of miscellaneous logging
* cdrom_file: classify. Could use more internal work, but it's a step Olivier Galibert2022-04-011-167/+245
|
* formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-221-7/+7
| | | | | | | | | Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
* util/cdrom.cpp: Return index 1/start of track data instead of index 0/start ↵ 9871238791132021-03-311-0/+1
| | | | | | | | of pregap data in generated TOC. (#7878) * Add a pre-calculated field for data from current logofs to end of track. * Removed pregap adjustment from FM Towns code. * Added pregap adjustment so track ends when audio data ends in PSX CD player. * Fixed pce_cd load error.
* support Redump extended bin/cue format for Dreamcast discs (#7422) nhand422020-12-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * initial check-in of Redump bin/cue support for Dreamcast GDI * correctly identifies multi-cue format and sets GDROM flags * creates a working Crazy Taxi chd from a Redump bin/cue * disabled debugging code and started tidying up * simple tool to compare chdman bin/cue and bin/gdi conversions, should be identical * final tidy up, the testing is going well * testing failed for Aero Dancing i (Japan), didnt zero last track * added some comments about .gdi compatibility * addressing review feedback on pull request #7422 * match TOSEC layout for Pattern I discs (3 tracks) * initial support for Pattern III discs * Pattern III discs now work and match TOSEC layout * reading datasize from wrong track, same result though * identify the GDI pattern, makes the code clearer * support for Pattern II and consecutive AUDIO tracks * use C99 type not POSIX type to build on Windows * support Redump tracks split across two .bin files
* Better support for screen orientation/geometry: Vas Crabb2018-07-261-7/+4
| | | | | | | | | | | | | | | | | | | | | * Eliminates the need for the horizontal/vertical/LCD/SVG layout files * Screens can now have orientation and physical aspect ratio specified * RASTER/VECTOR defaults to 4:3, LCD/SVG defaults to square pixels at config time * System orientation is applied on top of screen orientation Automatically generated single-screen views and orientation flags in XML output now work correctly for systems with multiple screens in different geometries/orientations, e.g. housemnq, rocnms, stepstag, or netmerc. The "core rotation options" only interact with system orientation. Allowing multi-screen systems to work well with one monitor per emulated screen is a complex topic. System orientation also affects the GFX viewer while screen orientation doesn't. The orientation displayed in the system selection menu is from the system orientation. Let me know if I've broken any systems or use cases. Also, add save state support for std::array/C array nested to any depth.
* needed for external work (nw) MetalliC2017-08-261-0/+1
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-34/+34
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* macro removal INLINE -> static inline (nw) Miodrag Milanovic2015-12-121-3/+3
|
* More cleanups, there is issue with srcclean that needs to be taken care as ↵ Miodrag Milanovic2014-07-221-1/+1
| | | | well, just doing now what we can
* chd updates: [MetalliC] R. Belmont2014-04-181-0/+1
| | | | | | | | | - Bugfixed byte order for GD-ROM audio tracks so FLAC compression is effective - Fixed uninitialized struct on MSVC (and possibly other) builds nw: this will change the SHA1s of every GD-ROM CHD in MAME; a patch to reflect that is pending (the old images still work, they just take a little more space than is necessary). "chdman copy" suffices to upgrade; no downloading is necessary.
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* Various CD-ROM / CHDMAN improvements: [R. Belmont] R. Belmont2013-05-181-3/+3
| | | | | | | | | | | | | - Correct import/export of bin/cue images in which the pregap sectors are present. - Normalized TOC handling; the start of a track is always the first pregap sector. - Finally allows reading and CDDA playing pregap sectors. Works even if the pregap sectors are not present in the file. nw part: Existing CHDs should work (or not) as before - previously non-working ones that were broken due to disc geometry should work if regenerated from source. I tested this on several known-touchy cases (including Saturn Black/Matrix Reprint cinemas and PCE-CD Prince of Persia) but there are likely others. Drivers that tried to fake around the previous lack of pregap reading on CDDA may need some adjustment.
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-40/+40
|
* cdrom: Introduces concept of logical sector addresses so games see the disc ↵ R. Belmont2013-01-051-3/+5
| | | | with pregap/postgap sectors actually taking up sector numbers as in reality. Fixes PC-Engine CDs with hardcoded sector numbers. [R. Belmont, Angelo Salese]
* Final round of struct/union/enum normalization. Aaron Giles2012-09-161-1/+1
|
* First pass at modernizing struct definitions. Aaron Giles2012-09-151-1/+0
|
* Added code to cdrom.c to compute and verify ECC codes for mode 1/2 Aaron Giles2012-04-061-0/+5
| | | | | | | | | | | | | sectors. [David Haywood] Added CD compressor template which separates subcode data from sector data, removes redundant ECC data prior to compression, and uses separate compressors for each part. Defined LZMA and ZLib CD compressors based on this and made them the default for CDs. [Aaron Giles] (Sadly couldn't wrap the FLAC compressor here because it would have produced incompatible output with previous versions.)
* chdman: Correct processing of GDI files, add ability to extractcd to .gdi, ↵ R. Belmont2012-03-041-1/+5
| | | | verified perfect checksum round-tripping on .GDI files. [R. Belmont]
* Better management of FLAC block sizes, aiming to keep them around 2k Aaron Giles2012-02-261-1/+1
| | | | | | | | | | | samples. Increased CD sectors per hunk to 8 for better compression. [David Haywood] Re-did the non-CD FLAC codec to be "smart" in that it can choose either big-endian or little-endian on the fly and uses the best one. Added FLAC as a default codec for hard disks, which helps a lot for certain disks. [Aaron Giles]
* Major CHD/chdman update. The CHD version number has been increased Aaron Giles2012-02-161-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from 4 to 5. This means any diff CHDs will no longer work. If you absolutely need to keep the data for any existing ones you have, find both the diff CHD and the original CHD for the game in question and upgrade using these commands: rename diff\game.dif diff\game-old.dif chdman copy -i diff\game-old.dif -ip roms\game.chd -o diff\game.dif -op roms\game.chd -c none Specifics regarding this change: Defined a new CHD version 5. New features/behaviors of this version: - support for up to 4 codecs; each block can use 1 of the 4 - new LZMA codec, which tends to do better than zlib overall - new FLAC codec, primarily used for CDs (but can be applied anywhere) - upgraded AVHuff codec now uses FLAC for encoding audio - new Huffman codec, used to catch more nearly-uncompressable blocks - compressed CHDs now use a compressed map for significant savings - CHDs now are aware of a "unit" size; each hunk holds 1 or more units (in general units map to sectors for hard disks/CDs) - diff'ing against a parent now diffs at the unit level, greatly improving compression Rewrote and modernized chd.c. CHD versions prior to 3 are unsupported, and version 3/4 CHDs are only supported for reading. Creating a new CHD now leaves the file open. Added methods to read and write at the unit and byte level, removing the need to handle this manually. Added metadata access methods that pass astrings and dynamic_buffers to simplify the interfaces. A companion class chd_compressor now implements full multithreaded compression, analyzing and compressing multiple hunks independently in parallel. Split the codec implementations out into a separate file chdcodec.* Updated harddisk.c and cdrom.c to rely on the caching/byte-level read/ write capabilities of the chd_file class. cdrom.c (and chdman) now also pad CDs to 4-frame boundaries instead of hunk boundaries, ensuring that the same SHA1 hashes are produced regardless of the hunk size. Rewrote chdman.exe entirely, switching from positional parameters to proper options. Use "chdman help" to get a list of commands, and "chdman help <command>" to get help for any particular command. Many redundant commands were removed now that additional flexibility is available. Some basic mappings: Old: chdman -createblankhd <out.chd> <cyls> <heads> <secs> New: chdman createhd -o <out.chd> -chs <cyls>,<heads>,<secs> Old: chdman -createuncomphd <in.raw> <out.chd> .... New: chdman createhd -i <in.raw> -o <out.chd> -c none .... Old: chdman -verifyfix <in.chd> New: chdman verify -i <in.chd> -f Old: chdman -merge <parent.chd> <diff.chd> <out.chd> New: chdman copy -i <diff.chd> -ip <parent.chd> -o <out.chd> Old: chdman -diff <parent.chd> <compare.chd> <diff.chd> New: chdman copy -i <compare.chd> -o <diff.chd> -op <parent.chd> Old: chdman -update <in.chd> <out.chd> New: chdman copy -i <in.chd> -o <out.chd> Added new core file coretmpl.h to hold core template classes. For now just one class, dynamic_array<> is defined, which acts like an array of a given object but which can be appended to and/or resized. Also defines dynamic_buffer as dynamic_array<UINT8> for holding an arbitrary buffer of bytes. Expect to see these used a lot. Added new core helper hashing.c/.h which defines classes for each of the common hashing methods and creator classes to wrap the computation of these hashes. A future work item is to reimplement the core emulator hashing code using these. Split bit buffer helpers out into C++ classes and into their own public header in bitstream.h. Updated huffman.c/.h to C++, and changed the interface to make it more flexible to use in nonstandard ways. Also added huffman compression of the static tree for slightly better compression rates. Created flac.c/.h as simplified C++ wrappers around the FLAC interface. A future work item is to convert the samples sound device to a modern device and leverage this for reading FLAC files. Renamed avcomp.* to avhuff.*, updated to C++, and added support for FLAC as the audio encoding mechanism. The old huffman audio is still supported for decode only. Added a variant of core_fload that loads to a dynamic_buffer. Tweaked winwork.c a bit to not limit the maximum number of processors unless the work queue was created with the WORK_QUEUE_FLAG_HIGH_FREQ option. Further adjustments here are likely going to be necessary. Fixed bug in aviio.c which caused errors when reading some AVI files.
* Keep u7 compatible while we wait for Aaron (nw) R. Belmont2012-01-291-1/+1
|
* Missing files from the last checkin (nw) R. Belmont2012-01-221-1/+1
|
* Added support for loading other image types to cdrom device, with use of ↵ Miodrag Milanovic2011-08-201-0/+2
| | | | chdman part of code [Miodrag Milanovic]
* Cleanups and version bump.mame0141u3 Aaron Giles2011-02-281-2/+2
|
* megadriv.c: Rewritten SegaCD/MegaCD emulation [David Haywood] Fabio Priuli2011-02-121-0/+22
| | | cdrom.h: Added alt lba_to_msf conversion needed by SegaCD/MegaCD [David Haywood]
* Cleanups and version bump. Aaron Giles2010-06-171-2/+2
|
* chdman/cdrom updates: [R. Belmont] R. Belmont2010-05-301-2/+11
| | | | | | | | | | | - CDRWIN .bin/.cue images now supported for both input and output - Pregap and postgap information is now preserved in the format - Output of CDRDAO images is significantly improved Existing CHD-CDs will continue to work fine and for data-only discs no action needs to be taken. For mixed data/audio discs (e.g. analog 573/Bemani games) they should be re-converted for better preservation.
* Results of running the latest srcclean. Aaron Giles2009-12-281-1/+1
|
* Cleanups and version bump.mame0134u3 Aaron Giles2009-10-121-13/+13
|
* Moved all files in src/lib/util over to straight BSD and common Aaron Giles2009-10-101-2/+30
| | | | copyright, with permission of all significant contributors.
* Moved chd_clone_metadata code into chdman.c so that it can intelligently Aaron Giles2009-03-101-1/+2
| | | | | | | | | | | | | | | update old tags. Modified cdrom.c to expose metadata read/write functions, and changed chdman to use them. Also changed chdman to parse old-style metadata and convert it to new-style metadata since we're going to need to re-do this anyway and the two won't hash to the same value. Added completely untested support for the ident metadata to the hard disk creation path. If a filename is provided immediately after the source filename, it is taken as an ident file and processed for CHS data and added. Other metadata types can be added afterwards via -addmeta.
* Copyright cleanup: Aaron Giles2008-01-061-1/+1
| | | | | | - removed years from copyright notices - removed redundant (c) from copyright notices - updated "the MAME Team" to be "Nicola Salmoria and the MAME Team"
* Initial checkin of MAME 0.121.mame0121 Aaron Giles2007-12-171-0/+139