summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/fileio.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "fileio.cpp: This doesn't technically require emu.h" AJR2021-02-281-1/+1
| | | | This reverts commit 6d6073054b9155592a6022d66751422ff3b3a372.
* fileio.cpp: This doesn't technically require emu.h AJR2021-02-261-1/+1
|
* 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
* render/bgfx: Fix failure to load texture .png files when -artpath contains ↵ AJR2021-02-031-2/+2
| | | | multiple directories
* Much more core std::string_view modernization AJR2021-01-201-9/+9
| | | | | | | | | | | | | | | - Remove corestr.h from emu.h; update a few source files to not use it at all - Change strtrimspace, strtrimrightspace and core_filename_extract_* to be pure functions taking a std::string_view by value and returning the same type - Change strmakeupper and strmakelower to be pure functions taking a std::string_view and constructing a std::string - Remove the string-modifying version of zippath_parent - Change tag-based lookup functions in device_t to take std::string_view instead of const std::string & or const char * - Remove the subdevice tag cache from device_t (since device finders are now recommended) and replace it with a map covering directly owned subdevices only - Move the working directory setup method out of device_image_interface (only the UI seems to actually use the full version of this) - Change output_manager to use std::string_view for output name arguments - Change core_options to accept std::string_view for most name and value arguments (return values are still C strings for now) - Change miscellaneous other functions to accept std::string_view arguments - Remove a few string accessor macros from romload.h - Remove many unnecessary c_str() calls from logging/error messages
* Further additions of std::string_view AJR2021-01-011-1/+1
| | | | | | | - corefile.cpp, fileio.cpp: Change puts to take a std::string_view parameter - rendlay.cpp: Use std::string_view instead of bare pointers in various functions - vecstream.h: Add std::string_view conversion operator to obtain output buffer without needing to make it a C string with explicit null termination - xmlfile.cpp: Add get_attribute_string_ptr method that distinguishes between empty strings and absent attributes without falling back to C strings
* emu/fileio.cpp: Fix an issue reporting the full path of files found in ↵ Vas Crabb2020-10-141-5/+11
| | | | archives that was breaking artwork.
* emu: correct some file headers (nw) hap2020-06-191-1/+1
|
* ROM loading cleanup: Vas Crabb2020-04-151-59/+150
| | | | | | | | | | | | | | * More flexible constructors for path_iterator and emu_file * More straightforward system/device ROM loading and software loading when using ROM loader * Proper parent walk when searching for identical CHDs with different names from software list * Fixed hangs if software item parents form a loop * Fixed layouts being loaded from bogus empty paths Note that there are changes in behaviour: * For software list ROMs/disks, MAME will now search the software path before searching the machine path * The search path for the owner of the software list device is used, which may not be the driver itself * MAME will no longer load loose CHDs from the media path - it's just too unwieldy with the number of supported systems * MAME will no longer search archives above the top level of the media path
* (nw) Cleanup on the way: Vas Crabb2020-03-101-18/+0
| | | | | | | | | | * Add doxygen comments for bit manipulation functions * Add an overload of BIT that works like the AArch64 UBFX instruction * Kill off some of the silly concatenating overloads for emu_file::open * Make searchpath acually useful for devices This is a checkpoint - I'm planning to improve ROM loading behaviour at least a little.
* (nw) Clean up the mess on master Vas Crabb2019-03-261-1/+1
| | | | | | | | | | | | | This effectively reverts b380514764cf857469bae61c11143a19f79a74c5 and c24473ddff715ecec2e258a6eb38960cf8c8e98e, restoring the state at 598cd5227223c3b04ca31f0dbc1981256d9ea3ff. Before pushing, please check that what you're about to push is sane. Check your local commit log and ensure there isn't anything out-of-place before pushing to mainline. When things like this happen, it wastes everyone's time. I really don't need this in a week when real work™ is busting my balls and I'm behind where I want to be with preparing for MAME release.
* Revert "conflict resolution (nw)" andreasnaive2019-03-251-1/+1
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
* More UI stuff: Vas Crabb2019-01-191-1/+1
| | | | | | | | | * Split up the different parts of ICO loading in the menus (locating files, scaling, drawing, etc.) * Added icon support to software selection menu * Added support for more ICO file variants, including PNG-in-ICO (new DIB parser is overkill for ICO but I can factor it out for BMP loading at some point) * Added favourites filter for software menus - includes software that's favourited on any system, so GBC includes DMG favourties and vice versa * Eliminated unnecessary member variables and O(n) walks in software selection menu * Made the menus' cached texture structures a bit more efficient
* Introduce u8/u16/u32/u64/s8/s16/s32/s64 Vas Crabb2016-11-191-14/+14
| | | | | | | | | | | | * New abbreviated types are in osd and util namespaces, and also in global namespace for things that #include "emu.h" * Get rid of import of cstdint types to global namespace (C99 does this anyway) * Remove the cstdint types from everything in emu * Get rid of U64/S64 macros * Fix a bug in dps16 caused by incorrect use of macro * Fix debugcon not checking for "do " prefix case-insensitively * Fix a lot of messed up tabulation * More constexpr * Fix up many __names
* Revert "Added IS_ENABLED, so we have compiler check for non used part, it is ↵ Miodrag Milanovic2016-11-121-3/+3
| | | | | | checked but not compiled in (nw)" This reverts commit c0407f073bf7afe26407c4add5cfeaf7104913c9.
* Added IS_ENABLED, so we have compiler check for non used part, it is checked ↵ Miodrag Milanovic2016-11-111-3/+3
| | | | | | but not compiled in (nw) false and true now used instead of integer where used as bool
* more TRUE/FALSE cleanup (nw) Miodrag Milanovic2016-10-221-2/+2
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-14/+14
| | | | | 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
* make path_iterator hold onto its search path Vas Crabb2016-08-191-56/+87
|
* Let's give the new srcclean a spin... Vas Crabb2016-08-021-1/+1
|
* Changed various string arguments for emu_file::open() from 'const char *' to ↵ Nathan Woods2016-07-291-21/+15
| | | | std::string
* Moved src/emu/hash.[cpp|h] into src/lib/util, and namespaced that code (and ↵ Nathan Woods2016-07-231-1/+1
| | | | hashing.[cpp|h]) into util::
* POSIX implementation for new directory read features, cleanup of Windows ↵ Vas Crabb2016-06-251-6/+2
| | | | implementation, return directory handle as smart pointer, fix full build [Vas Crabb]
* C++-ified osd_directory (now osd::directory), and added last_modified to ↵ Nathan Woods2016-06-241-5/+5
| | | | osd::directory::entry
* Try next archive type if file not found, not just on open error Vas Crabb2016-03-251-53/+53
|
* Make emu_file archive searh order CRC+path, CRC+partial path, CRC, path, ↵ Vas Crabb2016-03-251-85/+19
| | | | partial path and fold some redundant code
* Fold some redundant code Vas Crabb2016-03-181-70/+17
|
* * Remove confusing method from vectorstreams that hide base_ios method ↵ Vas Crabb2016-03-181-53/+22
| | | | | | | | | | | | | (fixes disassembly view) * Allow std::string to pass through core_file unmolested (reduces temporary allocations) * Make zip/7z instances of same class with uniform interface * zippath browsing is broken at the moment This is another step towards transparent archive support. It's now possible to access zip and 7z archives with the same code. Nothing is taking advantage of it yet. There's now some very similar code in fileio.cpp and clifront.cpp that could be folded at some point.
* Fix use-after-move Vas Crabb2016-03-151-2/+2
|
* Make osd_file a polymorphic class that's held with smart pointers Vas Crabb2016-03-141-80/+70
| | | | | | | | | | | | | | | Make avi_file a class that's held with smart pointers, encapsulate various AVI I/O structures Make zip_file and _7z_file classes rather than having free functions everywhere Hide zip/7z class implementation behind an interface, no longer need to call close() to send back to the cache Don't dump as much crap in global namespace Add solaris PTY implementation Improve variable expansion for SDL OSD - supports ~/$FOO/${BAR} syntax Rearrange stuff so the same things are in file module for all OSDs Move file stuff into its own module 7z/zip open and destruct are still not thread-safe due to lack of interlocks around cache access Directory functions still need to be moved to file module SDL OSD may not initialise WinSock on Windows
* Use type-safe printf for core_file and emu_file, surprisingly few knock-on ↵ Vas Crabb2016-03-091-17/+2
| | | | | | effects Properly fix up a couple of places I64FMT was being used, still more to deal with
* Turn core_file into a proper class that gets cleaned up safely using unique_ptr Vas Crabb2016-03-061-46/+34
| | | | Subverted somewhat by chd_file class
* Add function for flushing file buffers Vas Crabb2016-03-011-4/+16
|
* Return std::string objects by value rather than pass by reference AJR2016-01-101-2/+1
| | | | | | - strprintf is unaltered, but strformat now takes one fewer argument - state_string_export still fills a buffer, but has been made const - get_default_card_software now takes no arguments but returns a string
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-54/+54
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+910