summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/imgtool/modules
Commit message (Collapse)AuthorAgeFilesLines
* tools/imgtool: Use UTF-8 console I/O on Windows, don't use wide char streams. Vas Crabb2026-04-151-1/+1
|
* 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
|
* 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-287-161/+161
| | | | In particular, this fixes a delegate getting nuked in cpu/powerpc.
* imgtool/modules/vzdos.cpp: Use util::sum16_creator AJR2024-01-111-14/+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-1710-288/+285
| | | | | | 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: properly remove all Apple modules. (GitHub #10594) [R. Belmont] arbee2022-12-065-9273/+0
|
* srcclean in preparation for release branch Vas Crabb2022-10-232-3/+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-153-10/+16
| | | | | (#10287) Note that the implementation is still not UTF-8 aware.
* fixed a couple of reportedly uninitiated variables in the tools. Robbbert2022-04-031-2/+2
|
* hard_disk_file: classify Olivier Galibert2022-04-012-29/+19
|
* 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.
* Formats-related refactoring AJR2021-09-1124-53/+131
| | | | | | - 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-222-91/+22
| | | | | | | | | 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.
* tools/imgtool: Removed legacy object pool usage. (#8215) Aaron Giles2021-06-241-5/+2
|
* Better fix for vt_dsk.h header name clash AJR2021-05-261-1/+1
|
* Restore legacy pc_dsk floppy support for imgtool only AJR2021-03-291-2/+2
|
* 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-1413-71/+70
| | | | | | | | | | * 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
* 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.
* 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.
* -Switch to building MAME as C++17. Vas Crabb2020-11-151-0/+1
| | | | | | | * Updated sol2 to 3.2.2 * Updated pugixml to 1.10 * Increased minimum clang version to 6 * Cleaned up some stuff that can use new features
* Got rid of global_alloc/global_free. Vas Crabb2020-10-032-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The global_alloc/global_free functions have outlived their usefulness. They don't allow consistently overriding the default memory allocation behaviour because they aren't used consistently, and we don't have standard library allocator wrappers for them that we'd need to use them consistently with all the standard library containers we're using. If you need to change the default allocator behaviour, you can override the new/delete operators, and there are ways to get more fine-grained control that way. We're already doing that to pre-fill memory in debug builds. Code was already starting to depend on global_alloc/global_free wrapping new/delete. For example some parts of the code (including the UI and Windows debugger) was putting the result of global_alloc in a std::unique_ptr wrappers without custom deleters, and the SPU sound device was assuming it could use global_free to release memory allocated with operator new. There was also code misunderstanding the behaviour of global_alloc, for example the GROM port cartridge code was checking for nullptr when a failure will actually throw std::bad_alloc. As well as substituting new/delete, I've made several things use smart pointers to reduce the chance of leaks, and fixed a couple of leaks, too.
* srcclean and cleanup (nw) Vas Crabb2020-06-211-8/+8
|
* Fix compile. (nw) couriersud2020-05-171-1/+1
|
* IMGTOOL: Added Dragon DOS module [tlindner] tim lindner2020-05-172-1/+1252
|
* Fix GCC 10 uninitialized struct warning (nw) arbee2020-05-021-0/+8
|
* fixes for clang 10.0.0 misleading indentation and xor used as a pow warnings ↵ smf-2020-04-231-1/+1
| | | | (nw)
* With permission from Dirk Best, apply 3-clause BSD license to common devices ↵ Vas Crabb2020-04-132-2/+2
| | | | | | and image handling (nw) Note that this does not apply to machine drivers or device implementations for a single machine family (e.g. Amiga chips or VTech expansion bus)
* use C++ library includes (nw) firewave2020-01-2213-39/+39
|
* srcclean (nw) Vas Crabb2019-10-261-1/+1
|
* Spelling (#5796) Zoë Blade2019-10-241-3/+3
| | | | | | | | | | | | * Tidy up comments * Fix typos * Fix spelling * Tidy * Tidy
* Fix spelling, tidy whitespace Zoë Blade2019-10-212-35/+34
|
* HP9845: TACO driver re-written (#5601) fulivi2019-09-092-23/+29
| | | | | | | | | * hp9825: fixed a bug in 9825t * hp9845: TACO driver re-written from scratch, DC100 tape separated into a new device, various adaptations * hp9845: "new TACO" renamed to just "TACO"
* [Imgtool] Add special characters support to Thomson BASIC (#5505) hadess2019-08-181-0/+245
| | | | | | * [Imgtool] Add reading accents support for Thomson BASIC * [Imgtool] Add writing accents support for Thomson BASIC
* Add BASIC Thomson tokenizer (#5479) hadess2019-08-131-7/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [Imgtool] Add write support for Thomson BASIC * [Imgtool] Fix passing --filter= to imgtool get command This command should work: imgtool get thom_fd inondation-d-additions.fd INONDATI.BAS TEST.BAS --filter=thombas7 as it matches the expected syntax: Usage: imgtool get <format> <imagename> <filename> [newname] [--filter=filter] [--fork=fork] but does not because imgtool fewer "maxargs". Increase the maximum number of arguments by 2 to cater for --filter and --fork being passed. * [Imgtool] Fix handling multiple tokens in BASIC tokenizer The line: 10 LIMIT$=STR$(LIMIT(N)) was not getting tokenised properly because the loop looking for tokens wasn't exited and consumed consecutive tokens. So $ was getting detected, token_shift and token_value were set, the cursor position got incremented, then = got detected on the next iteration of the loop. We should instead exit the loop, and write what we already have. Closes: #5478
* Use canonical spelling of "canonical" (nw) AJR2019-08-021-10/+10
|
* imgtool: MT 6693 wip, solves mess_hd issue (nw) Sergey Svishchev2019-06-021-1/+1
|
* fix build with clang, clean up some random stuff (nw) Vas Crabb2019-04-071-14/+9
|
* (nw) Clean up the mess on master Vas Crabb2019-03-261-0/+695
| | | | | | | | | | | | | 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-695/+0
| | | | | This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.