summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/imgtool
Commit message (Collapse)AuthorAgeFilesLines
* tools/imgtool: Use UTF-8 console I/O on Windows, don't use wide char streams. Vas Crabb2026-04-154-91/+89
|
* Move build system adjusttment and fixes: Vas Crabb2026-04-051-1/+1
| | | | | | | | | * Bumped minimum clang version to 13 - clang 12 is just too buggy. * Assume Qt 6 will be used, dropped Qt 5 support. * Fixed finding Qt headers on Fedora and hopefully other distros. * Always use static SDL2 on Windows. * debugger/qt/debuggerview.cpp: Fixed build with Qt < 6.6. * imgtool/modules/vzdos.cpp: Fixed build with Linux GCC 11.
* misc: toodle-oo TOOD typo hap2026-03-241-1/+1
|
* Initial support for SDL3. [R. Belmont, Vas Crabb] arbee2026-02-071-3/+4
| | | | | | | | | * SDL3 is the default for macOS targets. Linux/Windows can build with OSD=sdl3 while we wait for better distro support for SDL3. Both X11 and Wayland sessions are fully supported on Linux. * SDL3 -sound=sdl supports both input and output. All other video, sound, and input functionality should otherwise be the same for now. SDL 3.4+ multiple keyboard/mouse support is planned.
* imgtool: Retired the get_chain method. This is no longer implemented by any ↵ AJR2025-12-293-105/+0
| | | | supported filesystem, and no command made any use of the information it provided. (floptool's flopblocks command is functionally comparable.)
* imgtool.cpp: Fix error of assigning nullptr to variable of type std::string AJR2025-12-131-1/+1
|
* imgtool/modules/fat.cpp: Fix build AJR2025-09-081-1/+1
|
* Basic fix for pc_chd support in imgtool (#14148) Michael Karcher2025-09-082-1/+2
| | | | | | | | | | | * imgtool: Take ownership of stream in pc_chd_image_open `imgtool::image::internal_open` passes an rvalue reference to the stream to the `open` function of the image format module. It expects the `open` function to take ownership if it keeps a reference to the stream. If `open` does not do so, the `stream` is going to be destroyed at the end of `internal_open`. `pc_chd_image_open` fails to take ownership, yet it persists a reference to the stream as part of `info->hard_disk`. This causes an use-after-free condition * imgtool: Correct determination of total sectors of a FAT volume The number of total sectors of a FAT volume is stored either in the 16-bit word at offset 19 or, if that word is zero, in the 32-bit word at offset 32 instead. The 32-bit word is not a high word to build a 48-bit value in conjunction with the 16-bit word at offset 19, but it supersedes it.
* -tools/imgtool/modules: Fixed remaining calss memory access warnings. Vas Crabb2024-11-262-71/+73
| | | | | | | | -tools/imgtool/modules/vzdos.cpp: Fixed function returning floperr_t value as imgtoolerr_t. -devices: Fixed a bunch more #include guards that don't match file paths.
* Fixed several things using memset on non-trivial objects. Vas Crabb2024-10-2815-513/+502
| | | | In particular, this fixes a delegate getting nuked in cpu/powerpc.
* util/ioprocs.cpp: Added wrappers for common patterns. (#11608) Vas Crabb2024-02-251-6/+9
| | | | | emu/diimage.h: Removed fread overloads that allocate memory for output. util/core_file.cpp: Changed output size of load to size_t.
* imgtool/modules/vzdos.cpp: Use util::sum16_creator AJR2024-01-111-14/+3
|
* imgtool: check for unrecognized options (#11671) Lubomir Rintel2023-10-291-0/+3
|
* imgtool/bml3: fix a crash when format doesn't implement ↵ Lubomir Rintel2023-10-291-1/+4
| | | | get_sectors_per_track() (#11673)
* Miscellaneous change roll-up: Vas Crabb2023-09-293-32/+28
| | | | | | | | | | | | | | | | | | | | | | | | render/drawbgfx.cpp: Return an error if Wayland EGL surface can't be created for additional windows. emu/emucore.h: Added explicitly defaulted copy and move constructors for emu_fatalerror. Fixed apparent misunderstanding of const. Returning const value types and casting to const value types is pointless outside very narrow use cases. Putting const value type parameters in interfaces just makes trouble. cpu/adsp2100: Use count_leading_ones_32 where it's simple rather than inverting and counting leading zeroes. util/multibyte.h: Don't pollute global namespace, constexpr implies inline, make narrowing casts explicit. imagedev/simh_tape_image.h: inline is implied for member functions with bodies supplied at declaration. Tidied up some ugly casts in various places.
* chdman.cpp, imgtool/modules: Use multibyte.h functions AJR2023-09-244-80/+35
|
* imageutl.h: Retire pick_integer_[bl]e and place_integer_[bl]e in favor of ↵ AJR2023-09-1711-302/+298
| | | | | | the simpler functions in multibyte.h * multibyte.h: Add constexpr for getters and noexcept for all functions
* Reduced usage of sprintf. (#10892) Erik2023-02-202-12/+12
|
* imgtool/stream: Remove some unused functions AJR2022-12-142-80/+0
|
* imgtool: properly remove all Apple modules. (GitHub #10594) [R. Belmont] arbee2022-12-067-9278/+0
|
* harddisk.h: #include shuffling AJR2022-11-261-0/+1
|
* imgtool.cpp: Future-proofing AJR2022-11-131-0/+1
|
* srcclean in preparation for release branch Vas Crabb2022-10-232-3/+3
|
* corefile.h: Move filename utilities to path.h AJR2022-09-253-2/+3
|
* imgtool: make the Apple formats build, but they will not function (did they ↵ arbee2022-09-242-3/+44
| | | | before?) [R. Belmont]
* Fixes and cleanup: Vas Crabb2022-09-151-1/+2
| | | | | | | | * gbcolor.xml, bus/gameboy: Renamed slot option for Rocket Games cartridges from "rom_atvrac" to "rom_rocket". * emu/config.cpp: Made error messages more detailed when opening a configuration file fails, and bumped error messages to warning level. * tools/imgtool: Fixed build.
* util/corestr.cpp: Changed core_stricmp to take std::string_view parameters. ↵ npwoods2022-09-154-11/+17
| | | | | (#10287) Note that the implementation is still not UTF-8 aware.
* Fix tools build after f52b402f2416ddfd646afe2d132c16d78c6fe9c3 AJR2022-08-282-0/+2
|
* fixed a couple of reportedly uninitiated variables in the tools. Robbbert2022-04-031-2/+2
|
* hard_disk_file: classify Olivier Galibert2022-04-014-38/+26
|
* Fixed a few coverity errors, several of which are real bugs. Vas Crabb2021-12-021-1/+1
|
* Soul-crushingly frustrating clean-up: Vas Crabb2021-12-016-120/+57
| | | | | | * Patched up a pile of code that was rotting behind UNUSED_FUNCTION, and switched to [[maybe_unused]] attribute so it can't rot so easily. * Reduced a bit more redundancy in fruit machine layouts.
* Minor changes to various drivers (#8880) shattered2021-11-251-1/+1
| | | | | | * Minor changes to various drivers (todo, comments, text strings). * ec1847: Moved to pc.cpp, it's a generic OEM clone. * Use proper name for serial/parallel ports card in ec1840 and ec1841. * superga2: Moved to arcade section, updated emulation status.
* util: Further API cleanups: (#8661) Vas Crabb2021-10-051-21/+21
| | | | | * Turned `core_file` into an implementation of `random_read_write`. * Turned PNG errors into a standard error category. * Added a helper for generating what look like derived classes on-the-fly.
* imgtool/library.h: Supply some missing #includes AJR2021-09-111-0/+4
|
* Formats-related refactoring AJR2021-09-1147-102/+199
| | | | | | - Remove opresolv.h from emu.h and some other base headers - Split legacy floppy image class into a separate file - Clean up a lot of #includes in src/lib and src/tools/imgtool
* formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-2211-331/+374
| | | | | | | | | 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: Retire legacy object pool, removing vestigial references. Vas Crabb2021-06-241-1/+1
| | | | | | | Thanks to AJR, Ivan Vangelista and Aaron Giles for helping make this possible. Also fixed debug build of imgtool.
* tools/imgtool: Removed legacy object pool usage. (#8215) Aaron Giles2021-06-247-159/+73
|
* Better fix for vt_dsk.h header name clash AJR2021-05-263-10/+10
|
* formats/vt_dsk.cpp: Fix clang error: unused variable 'floppyoptions_vz' ↵ AJR2021-05-261-1/+1
| | | | [-Werror,-Wunused-const-variable]
* Restore legacy pc_dsk floppy support for imgtool only AJR2021-03-293-2/+161
|
* imgtool: Neutralize the link error Olivier Galibert2021-03-021-1/+1
|
* Eliminate ARRAY_LENGTH template in favor of C++17's std::size AJR2021-02-1418-100/+95
| | | | | | | | | | * 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
* Much more core std::string_view modernization AJR2021-01-203-5/+4
| | | | | | | | | | | | | | | - 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
* hp2640.cpp: Added tape emulation. (#7625) fulivi2021-01-122-2/+2
| | | | | * formats/hti_tape.cpp: Added support for Manchester encoded DC100 cassettes. * machine/hp2640_tape.cpp: added emulation of DC100 tape drives. * machine/hp_dc100_tape.cpp: Added unit name display.
* fix dragondos Disk BASIC tokens tim lindner2021-01-041-23/+32
|
* Low-level #include overhaul AJR2021-01-026-4/+9
| | | | | | | - 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.
* imgtool: Fix build by updating charconv.cpp to use string_view internally AJR2020-12-152-42/+19
|
* Enable GCC implicit fallthrough warning. Vas Crabb2020-11-151-0/+1
| | | | | | I've guessed whether break or [[fallthrough]] is appropriate. In cases where it looked particularly suspicious, I added a FIXME comment. All of these changes should be reviewed by someone familiar with the code.