summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/formats/cassimg.cpp
Commit message (Collapse)AuthorAgeFilesLines
* formats/cassimg.cpp: Pass byte count to wave fill function for legacy ↵ holub2025-04-261-16/+7
| | | | | cassette formats. (#13294) formats/tzx_cass.cpp: Check length of data read for TAP format blocks (fixes MT08952).
* srcclean and cleanup. Vas Crabb2025-02-231-2/+2
|
* Fix up some stuff: Vas Crabb2025-01-311-11/+28
| | | | | | * formats/cassimg.cpp: Put allocation outside loop again, check more allocations for failure. * pc8801_flop.xml: Actually mark clones as clones, transliterate title for S.F.3.D. * apple/macadb.cpp: Tidy a little.
* formats/cassimg.cpp: prevent regression in cass images (#13292) holub2025-01-281-2/+11
|
* formats/tzx_cas.cpp: Cut data size in case header requesting more than ↵ holub2025-01-271-7/+6
| | | | available (MT8952) (#13289)
* util/ioprocs.cpp: Added wrappers for common patterns. (#11608) Vas Crabb2024-02-251-4/+2
| | | | | emu/diimage.h: Removed fread overloads that allocate memory for output. util/core_file.cpp: Changed output size of load to size_t.
* -util/corealloc.h: Reduced make_unique_clear to a single variant for POD arrays. Vas Crabb2022-04-031-2/+2
| | | | | | | | | | | | | | | | | | * Enabled GCC lifetime dead store elimination optimisation. * emu/device.h: Don't pre-clear memory for drivers. Ivan Vangelista fixed at least the majority of things that crashed outright, and Robbbert initialised variables that coverity complained about. It's unlikely anything will break due to this. * sound/discrete.h: Explicitly initialise members of discrete "devices" to zero. I don't see a way around doing this in headers due to the macro soup used to build the constructors. * sound/mos6581.cpp: Moved creation of the SID core to device_start and explictly initialised members of the SID core structures. These structures are in internal headers, so they won't cause downstream recompiles. -Lua engine: Made I/O port manager type_seq a bit more tolerant of omitted arguments.
* formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-221-31/+48
| | | | | | | | | 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.
* cassimg: don't construct string from nullptr (#8265). Robbbert2021-07-211-1/+1
| | | | Note that std::string() was tried but somehow caused another bug (tape preset as play was instead stopped).
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-141-2/+2
| | | | | | | | | | * osdcomm.h: Move definition of EQUIVALENT_ARRAY to coretmpl.h * sharc.cpp, gt64xxx.cpp, ym2413.cpp, gb_lcd.cpp, snes_ppu.cpp: Use STRUCT_MEMBER for save state registration * gio/newport.cpp, megadrive/svp.cpp, nes_ctrl/bcbattle.cpp, arm7.cpp, tms9995.cpp, pckeybrd.cpp, sa1110.cpp, sa1111.cpp, jangou_blitter.cpp, vic4567.cpp: Use std::fill(_n) instead of memset * emucore.h: Remove obsolete typedef
* Low-level #include overhaul AJR2021-01-021-0/+2
| | | | | | | - vecstream.h: Revert changes made in aa29519528cb3dbdbfac56819bea670ed8c56c5d. The std::string_view conversion has been made a non-member function (util::buf_to_string_view) and moved to coretmpl.h. - strformat.h: Remove the using declaration importing util::string_format into the global namespace. It has been moved to emucore.h and a few tool sources; other references have been qualified. - osdcore.h: Split out file, directory and path classes and methods to a new header (osdfile.h), Doxygenizing the documentation comments. - Disaggregate many #includes that were including other standard or custom headers. emu.h now includes basically the same things that it did, but other headers have been streamlined; for instance, emucore.h no longer stealth-includes osdcore.h several ways.
* Cassette image processing cleanup AJR2021-01-011-0/+9
| | | | | | | - Add cassette_image::image_read_byte method for reading one byte at a time - coco_cas.cpp: Eliminate dependency on emucore.h - thom_cas.cpp: Declare some temporary variables much closer to where they are used - tvc_cas.cpp: Read and write entire sectors at a time
* formats/cassimg.cpp: Finish encapsulation of cassette_image class. Vas Crabb2020-10-021-134/+134
|
* -imagedev/cassimg.cpp: Make the interface look something like C++. Vas Crabb2020-10-021-468/+350
| | | | -sound/tiasound.cpp: Use some vaguely C++-like code internally.
* use C++ library includes (nw) firewave2020-01-221-2/+2
|
* Use canonical spelling of "canonical" (nw) AJR2019-08-021-2/+2
|
* Renamed flipendian -> swapendian, as I spent minutes trying to find the ↵ mooglyguy2018-11-051-4/+4
| | | | functions to tell to another person who spent minutes trying to find the functions, and we refer to such functions as swapping just about everywhere else in the codebase, nw
* Bug fix for multi-channel reads in cassette_get_samples(). (#3725) Frank Palazzolo2018-07-091-17/+22
| | | | | | | | | * Bug fix for multi-channel reads in cassette_get_samples(). Use the unused "sample_bytes" arg the same way as cassette_put_samples() Can be used with multi-channel files now! * Rename sample_bytes to more descriptive sample_spacing Add some comments about sample functions and sample_spacing variable
* Revert "using of IS_ENABLED in files used in tiny build (nw)" Miodrag Milanovic2016-11-121-1/+1
| | | | This reverts commit 1efccdd38d4bac6ec44e13f0a6cdf877e3a1c7cb.
* using of IS_ENABLED in files used in tiny build (nw) Miodrag Milanovic2016-11-111-1/+1
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-61/+61
| | | | | 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
* dynamic_buffer is just std::vector<UINT8> (nw) Miodrag Milanovic2016-10-211-2/+2
|
* srcclean and translation regeneration Vas Crabb2016-08-291-1/+1
|
* some C++14 features are not supported by VS2013. VS2015 is free for home use ↵ Miodrag Milanovic2016-08-271-5/+0
| | | | so no need for legacy support (nw)
* Performs argument checking on the return value of ↵ Nathan Woods2016-08-231-1/+8
| | | | | | | | | | | | CassetteLegacyWaveFiller.chunk_sample_calc() This is just better error checking. You can see this if you create a garbage file named 'foo.csw' and invoke the following command: mame bbcb -cass1 foo.csw With this change you get an invalid image error. Without it, you get this: Caught unhandled St12length_error exception: vector::_M_default_append
* Fixed regression with cassette code that caused hangs to happen when loading ↵ Nathan Woods2016-08-201-17/+26
| | | | | | cassette image formats that lacked read/write support This entailed reintroducing device_image_interface::make_readonly(); I also reimplemented the feature in the cassette code in a less hacky way.
* casserr_t ==> enum class cassette_image::error Nathan Woods2016-08-201-79/+79
|
* Stop forcing cassette image create when loading zero-length images. Also ↵ Nathan Woods2016-08-201-6/+6
| | | | minor C++-ifications to cassette code (usage of bool and std::string, C++ comments)
* fix after pass through the diff Vas Crabb2016-08-011-1/+1
|
* cleanup of some conversions (nw) Miodrag Milanovic2016-07-311-1/+1
|
* fix linux compile (nw) Miodrag Milanovic2016-07-311-1/+1
|
* std::min and std:max instead of MIN and MAX, also some more macros converted ↵ Miodrag Milanovic2016-07-311-9/+10
| | | | to inline functions (nw)
* removed memory tracking (nw) Miodrag Milanovic2016-01-081-1/+1
|
* fix build for VS 2013 and earlier. dankan18902015-12-071-0/+2
| | | | reference http://stackoverflow.com/questions/22212737/strange-syntax-error-reported-in-a-range-based-for-loop
* clang-modernize part 6 Miodrag Milanovic2015-12-041-2/+2
|
* clang-modernize part 5 Miodrag Milanovic2015-12-041-10/+10
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+1007