summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/chd.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-3279/+0
|
* Cleanups and version bumpmame0163 Miodrag Milanovic2015-06-241-483/+483
|
* Licenses for Raphael Nabet (nw) Miodrag Milanovic2015-06-071-277/+796
|
* moved all to std::string (nw) Miodrag Milanovic2015-04-221-3/+3
|
* Replace dynamic_array with std::vector [O. Galibert] Olivier Galibert2015-04-141-46/+47
|
* There is no implicit conversion to char* in std::string (nw) Miodrag Milanovic2015-04-121-1/+1
|
* Fix various typos and spelling mistakes Zoë Blade2015-04-111-2/+2
| | | | | | | | | | | | | | I'm purposefully leaving /src/emu/bus/cbmiec/c1541.c's kernal.bin as it is, as this particular spelling mistake was originally made by Robert Russell, therefore is canon. See http://en.wikipedia.org/wiki/KERNAL for details. I'm also leaving /src/emu/machine/nscsi_bus.c's RECIEVE as I don't want to break anything, but it's worth someone looking into. I renamed some variables in /src/mame/drivers/sfbonus.c, /src/mame/video/tia.c and /src/mame/video/tia.h, so if anyone wants to verify I didn't break anything, that would be nice.
* moved assert replacement inside emucore.h so it is actually used / removed ↵ Oliver Stöneberg2015-03-201-0/+2
| | | | assert.h include from some headers and added it to lots of source
* added missing catch in chd_file_compressor::async_read() and chdman main() (nw) Oliver Stöneberg2015-01-161-0/+5
| | | | happens when e.g. disk is full
* chdman: bail out in chd_file::hunk_info() on unknown compression type (nw) Oliver Stöneberg2014-12-311-0/+3
|
* more ThreadSanitizer data race warning "fixes" (nw) Oliver Stöneberg2014-12-311-6/+8
|
* 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.
* some dynamic_buffer/dynamic_array usage cleanups (nw) Oliver Stöneberg2014-03-291-2/+1
|
* fixed ubsan invalid vptr error with dynamic_array<hash_pair> in struct ↵ Oliver Stöneberg2014-02-261-1/+0
| | | | work_item (nw)
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* chdman: fixed hang when chd_file_compressor::async_read() failed (e.g. ↵ Oliver Stöneberg2013-06-211-5/+6
| | | | trying to read an .avi with unsupported color depth) / improved error reporting a bit (nw)
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-87/+87
|
* fixed uninitialized memory in the last hunk on CHD creation (fixes ↵ Oliver Stöneberg2013-01-091-0/+1
| | | | potentially different filesize with each compiler not defaulting memory to 0x00 including Visual Studio) / added another chdman test (nw)
* fix for "file note writeable" when creating, plus consolidated some ↵ smf-2012-09-181-21/+16
| | | | duplicate/redundant code. [smf]
* (MESS) support for writing to compressed hard drives using diff files. [smf] smf-2012-09-081-0/+3
|
* removed astring::stringbuffer() / use cached value in astring::len() instead ↵ Oliver Stöneberg2012-09-081-1/+6
| | | | of strlen() (no whatsnew)
* fixed memory leak in chd_file_compressor::hashmap (no whatsnew) Oliver Stöneberg2012-07-271-0/+1
|
* CHD fixes: [jmak] R. Belmont2012-06-171-0/+1
| | | | | | - Fixed uninitialized variables that were creeping into output - Changed qsort() callback to never return "equal", working around unstable system libc implementations
* Corrected error message to include other possibility (nw) Scott Stone2012-05-181-1/+1
|
* Change error message to be more descriptive to actual error that occurs when ↵ Scott Stone2012-05-181-1/+1
| | | | a .dif file version doesn't match the CHD version. Hopefully, this will all but stop the seemingly never ending questions about the error. (nw)
* chdman: Correct processing of GDI files, add ability to extractcd to .gdi, ↵ R. Belmont2012-03-041-1/+3
| | | | verified perfect checksum round-tripping on .GDI files. [R. Belmont]
* chd.c: fix trivial uninitialized variable (nw) R. Belmont2012-02-201-1/+2
|
* Clean-ups and version bumpmame0145u1 Angelo Salese2012-02-191-153/+153
|
* Compile fix for PPC OSX (nw) R. Belmont2012-02-191-1/+1
|
* fixed MacOSX compile. no whatsnew. Fabio Priuli2012-02-191-1/+1
| | | | | src/lib/util/chd.c: In member function 'chd_error chd_file::compress_v5_map()': src/lib/util/chd.c:1660: warning: comparison is always true due to limited range of data type
* Fix compile under 4.6.2 (no whatsnew) Miodrag Milanovic2012-02-191-0/+1
|
* Update CHD error list in chd.c Aaron Giles2012-02-191-1/+5
| | | | | Remove 100% redundant and silly list of error strings in harddriv.c and chd_cd.c
* Move all-0 detection to the write path. Use hunk_info on the Aaron Giles2012-02-171-18/+23
| | | | compression path to detect whether the write went through.
* fix from mess, visible by 32bit mingw 4.4.7 (no whatsnew) Miodrag Milanovic2012-02-171-0/+4
|
* Fix blocksize for FLAC encoder. Aaron Giles2012-02-161-1/+1
| | | | Fix writing uncompressed CHDs via createhd.
* Major CHD/chdman update. The CHD version number has been increased Aaron Giles2012-02-161-3007/+2191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* chd: Fix error where FLAC was encoding 4 times too much data (samples vs. ↵ R. Belmont2012-02-011-1/+1
| | | | bytes) [David Haywood]
* Clean-ups and version bumpmame0144u7 Angelo Salese2012-01-291-20/+20
|
* fix compile on PPC OS X (nw) R. Belmont2012-01-221-0/+3
|
* Missing files from the last checkin (nw) R. Belmont2012-01-221-22/+487
|
* Major bitmap-related changes throughout the system. There are Aaron Giles2012-01-121-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | almost certainly some regressions lurking. Let me know if something seems busted. Bitmaps are now strongly typed based on format. bitmap_t still exists as an abstract base class, but it is almost never used. Instead, format-specific bitmap classes are provided: bitmap_ind8 == 8bpp indexed bitmap_ind16 == 16bpp indexed bitmap_ind32 == 32bpp indexed bitmap_ind64 == 64bpp indexed bitmap_rgb32 == 32bpp RGB bitmap_argb32 == 32bpp ARGB bitmap_yuy16 == 16bpp YUY For each format, a generic pix() method is provided which references pixels of the correct type. The old pix8/pix16/pix32/ pix64 methods still exist in the short term, but the only one available is the one that matches the bitmap's pixel size. Note also that the old RGB15 format bitmaps are no longer supported at all. Converted model1, megadriv, and stv drivers away from the RGB15 format bitmaps. New auto_bitmap_<type>_alloc() macros are provided for allocating the appropriate type of bitmap. Screen update functions now must specify the correct bitmap type as their input parameters. For static update functions the SCREEN_UPDATE macro is now replaced with SCREEN_UPDATE_RGB32 and SCREEN_UPDATE_IND16 macros. All existing drivers have been updated to use the correct macros. Screen update functions are now required for all screens; there is no longer any default behavior of copying a "default" bitmap to the screen (in fact the default bitmap has been deprecated). Use one of the following to specify your screen_update callback: MCFG_SCREEN_UPDATE_STATIC(name) - static functions MCFG_SCREEN_UPDATE_DRIVER(class, func) - driver members MCFG_SCREEN_UPDATE_DEVICE(tag, class, func) - device members Because the target bitmap format can now be deduced from the screen update function itself, the MCFG_SCREEN_FORMAT macro is no longer necessary, and has been removed. If you specify a screen update callback that takes a bitmap_ind16, then the screen will be configured to use a 16bpp indexed bitmap, and if you specify a callback that takes a bitmap_rgb32, then a 32bpp RGB bitmap will be provided. Extended the bitmap classes to support wrapping a subregion of another bitmap, and cleaner allocation/resetting. The preferred use of bitmaps now is to define them directly in drivers/devices and use allocate() or wrap() to set them up, rather than allocating them via auto_bitmap_*_alloc(). Several common devices needed overhauls or changes as a result of the above changes: * Reorganized the laserdisc base driver and all the laserdisc drivers as modern C++ devices, cleaning the code up considerably. Merged ldsound device into the laserdsc device since modern devices are flexible enough to handle it. * Reorganized the v9938 device as a modern C++ device. Removed v9938mod.c in favor of template functions in v9938.c directly. * Added independent ind16 and rgb32 callbacks for TMS340x0 devices. * All video devices are now hard-coded to either ind16 or rgb32 bitmaps. The most notable is the mc6845 which is rgb32, and required changes to a number of consumers. * Added screen_update methods to most video devices so they can be directly called via MCFG_SCREEN_UPDATE_DEVICE instead of creating tons of stub functions.
* lib/util now includes stdlib.h where needed Couriersud2010-01-171-0/+2
|
* Fix some errors the 4.4.3 compiler complains about in C++ mode. Aaron Giles2009-12-301-1/+1
|
* Results of running the latest srcclean. Aaron Giles2009-12-281-5/+5
|
* Cleanups and version bump.mame0134u3 Aaron Giles2009-10-121-13/+13
|
* Assert copyright ownership of core library files, and relicense Aaron Giles2009-10-091-2/+30
| | | | under standard BSD license.
* Fix chdman -update to leave the write protect state alone when updating Aaron Giles2009-08-021-2/+3
| | | | uncompressed CHDs. [Michael Zapf]
* Cleanups and version bump. Aaron Giles2009-03-191-11/+11
|
* Many casts added to the core files, and various other tweaks Aaron Giles2009-03-121-3/+3
| | | | to make them compile as either C or C++.
* Moved chd_clone_metadata code into chdman.c so that it can intelligently Aaron Giles2009-03-101-9/+0
| | | | | | | | | | | | | | | 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.