Commit graph

25 commits

Author SHA1 Message Date
Clownacy
a0656611c9 Update libchdr.
Now uses libchdr's own CMake script instead of a custom one, which
allows for assembly-optimised LZMA decoding on some platforms.

This update also introduces support for Zstandard compression.
2026-03-12 21:17:40 +00:00
libretroadmin
4f94af016f libchdr - Backport Fix huff_codec_decompress returned error code
It was returning a huffman_error code but the return type is chd_error,
a completely different enum.
2024-05-27 04:11:17 +02:00
libretroadmin
b2ec48c5b6 libchdr - Backport Avoid huffman tree buffer overrun in huffman_import_tree_rle 2024-05-27 04:04:21 +02:00
libretroadmin
e7db8e1ce3 Backport Add support for 'huff' codec. 2024-05-27 04:01:48 +02:00
libretroadmin
5317ba612c (libchdr) Backport fix double file close if opening failed 2024-05-27 03:57:23 +02:00
libretroadmin
d6f6049281 libchdr - Backport Fix potential NULL dereference 2024-05-27 03:56:39 +02:00
libretroadmin
744027819a Backport Fix fseek offset type. 2024-05-27 03:54:39 +02:00
libretroadmin
d499f6179e (libchdr) Backport
use virtual file i/o API which defaults to a stdio wrapper
this is preferable over using stdio directly because it gives users of libchdr
greater control over how the file is loaded.  For example, users can create
core_file implementations that load files over a network connection, or from
RAM, from an archive, etc.

* owns_file is now gone because teh user's fclose implementation will know how
  to clean things up itself.
* chd_open_file now accepts a FILE* instead of a core_file* to preserve backwards
  compatibility.
* new chd_open_core_file accepts a core_file* for users who want to be able to
  provide their own file i/o methods
* core_ftell is gone in favor of core_fsize because the only time it was ever
  called in the past was by core_fsize and by redundant code that was doing the
  same thing as core_fsize.
* resolve broken error-checking in chd_precache which would fail to detect errors
  returned by ftell when _MSC_VER is defined
2024-05-27 03:51:07 +02:00
libretroadmin
fedff98bdf Backport
Remove erroneous free() call in zlib_codec_init()
Remove a free() call inherited from the original MAME code which
allocated memory within zlib_codec_init(). It is no longer appropriate
to call here, as the data variable now points to the middle of a
caller-owned allocation.
2024-05-26 23:01:25 +02:00
libretroadmin
579591c917 (libhcdr) Add support for reading LZMA and FLAC hunks in non-CD CHDs. 2024-05-26 22:59:11 +02:00
libretroadmin
bc053b7c88 (libhcdr) Backports 2024-05-26 21:11:57 +02:00
libretroadmin
2167c71c46 (libchdr) Backport Avoid division by zero 2024-05-26 21:00:17 +02:00
libretroadmin
b4e78fdf68 libchdr updates 2024-05-26 20:45:15 +02:00
libretroadmin
6c7cb8619e Update CHD code to use libretro VFS 2024-05-20 04:36:34 +02:00
DarthMew
08efe9fdf7 Update libchdr to a03e693, remove libFLAC 2023-01-29 23:34:48 +01:00
Connor McLaughlin
0ff1402fcd dep/libchdr: Disable verification/subcode decompression
Small speed boost on low end devices.
2021-07-11 20:58:46 +10:00
Connor McLaughlin
5da9edceb9 Build: Unify MSBuild options in props files 2021-07-10 21:45:10 +10:00
Connor McLaughlin
06b009f361 Warning fixes 2021-06-27 13:51:22 +10:00
Connor McLaughlin
2a61620dae dep/libchdr: Sync to upstream (82670d5) 2020-12-01 23:34:21 +10:00
Connor McLaughlin
49cea927f0 Build: Add ARM64 platform for Windows 2020-10-14 00:48:48 +10:00
Connor McLaughlin
c8d7b0fc08 dep: Update libchdr 2020-09-15 00:31:35 +10:00
Connor McLaughlin
c5db7db182 Build: Compile source as UTF-8 with MSVC 2020-08-15 00:04:38 +10:00
Connor McLaughlin
058bea9faf libchdr: Expose chd_open_file 2020-08-01 14:01:10 +10:00
Connor McLaughlin
3daa6b469a Build: Explicitly disable spectre mitigations
Mitigations-off gave a roughly 20-25% boost in performance on my laptop
(i7-7700HQ), even with the recompiler.

It seems AppVeyor was building with them enabled. You shouldn't treat an
emulator like a sandbox and run untrusted code in it amyway.
2020-04-01 22:30:19 +10:00
Connor McLaughlin
b5901fa190 dep: Add libchdr 2020-01-30 20:06:14 +10:00