Commit Graph

563 Commits

Author SHA1 Message Date
Patrick Mackinlay
875f3c9d12 initial pull request 2017-01-24 21:53:51 +07:00
Nathan Woods
7744309f64 [Imgtool] Fixed recently introduced bug in the code that emits usage text 2017-01-23 07:41:21 +11:00
Vas Crabb
edf64df1db srcclean (nw) 2017-01-22 15:37:37 +11:00
Curt Coder
9d371eb5ba cop400: Properly separated COP444L from COP444C. [Curt Coder] 2017-01-16 22:06:11 +02:00
R. Belmont
063ea0512c Merge pull request #1979 from npwoods/imgtool_fix_attr_listing
[Imgtool] Fixed recently introduce bug on attribute listings
2017-01-15 15:02:47 -05:00
Nathan Woods
6a85ec0985 [Imgtool] Fixed recently introduce bug on attribute listings 2017-01-15 11:46:25 -05:00
Nathan Woods
1540cd5e7a [CoCo] Fixed a recently introduced bug in DMK image creation
Also some minor cleanups
2017-01-15 11:29:17 -05:00
Nathan Woods
acdefe2ecc [Imgtool Mac] Adding support for MacRoman encoding 2017-01-14 11:45:10 -05:00
Vas Crabb
19529fe768 Merge pull request #1868 from npwoods/imgtool_charconv_rewrite
[Imgtool] Rewrote charconv; now an interface rather than an enumeration
2017-01-15 03:10:59 +11:00
Nathan Woods
b2c87ba47d Restyled some imgtoolerr_t typecasts 2017-01-14 10:57:05 -05:00
Nathan Woods
36033a2f98 Spacing fix 2017-01-14 10:56:57 -05:00
Vas Crabb
74af888a30 Clean up scripts from #1861 (nw):
* use spaces for indentation
* better error reporting
* some optimisation
* slightly more intelligent preservation of tabulation
2017-01-10 15:12:21 +11:00
Dirk Best
c6043bac17 chdman: Add support for hard disk templates and add some initial ones 2017-01-07 23:52:55 +01:00
R. Belmont
9ccfcffb1a Merge pull request #1861 from ZoeB/master
Clone ROM filename discrepancies
2017-01-06 10:57:29 -05:00
Nathan Woods
e38b9b63ba [Imgtool] Changing imgtool::simple_charconverter::from_utf8() to not perform an O(n) lookup whenever locating a character 2017-01-05 21:02:45 -05:00
Nathan Woods
a1cf492ff4 Missed these, which needed wstring_from_utf8() 2017-01-04 18:59:06 -05:00
Nathan Woods
89b2f05c0d Fixed incorrect util::string_format() ==> util::stream_format() 2017-01-04 18:48:38 -05:00
Nathan Woods
b1eed07ad9 Vas Crabb feedback:
1.  Changed the Win32 code to use _O_U8TEXT()
2.  Reordered system #includes
3.  Changed a number of 'std::wcout << ...' to use util::stream_format()

I'm getting massive code compilation issues, and it isn't clear to me what the problem is.  I'm committing my WIP right now, with the intention of reviewing the specifics soon.
2017-01-04 08:06:20 -05:00
Nathan Woods
46ddd46f25 Vas Crabb feedback: Fixed Latin-1 C1 space, changed charconverter prototype to not dictate std::string and fixed invalid encoding issue 2017-01-04 06:48:57 -05:00
Nathan Woods
3231c3f648 [Imgtool] Changed to use wcout/wcerr in order to support Unicode console output
I really don't like the prevalence of '#ifdef WIN32' in this change, both the _setmode() and bypassing codecvt.  I strongly suspect that the latter is the consequence of some mistake that in practice doesn't cause problems in MSVC.  I welcome all eyes.
2017-01-02 11:59:25 -05:00
Nathan Woods
34048b54f6 Updated to support Unicode normalization and simple charconverters that alter the low page 2017-01-01 12:09:38 -05:00
Nathan Woods
2679c0f553 Merge branch 'master' into imgtool_charconv_rewrite 2017-01-01 10:09:31 -05:00
Nathan Woods
1cd5935dde [Imgtool CoCo/RS-DOS] Miscellaneous cleanups and C++ modernization 2016-12-24 13:45:03 -05:00
Nathan Woods
594d959f09 [Imgtool] Rewrote charconv; now an interface rather than an enumeration 2016-12-23 09:44:09 -05:00
Zoe Blade
aeffa61e35 Create handy ROM filename discrepancy spotter 2016-12-22 20:14:25 +00:00
R. Belmont
2461b39eb7 Merge pull request #1830 from npwoods/imgtool_dir_formatting_fix
[Imgtool] Cleaned up the output of the 'dir' command
2016-12-13 10:38:12 -05:00
Nathan Woods
1b462f7434 [Imgtool] Cleaned up the output of the 'dir' command 2016-12-12 20:29:22 -05:00
Nathan Woods
a68a72a7f7 [Imgtool] Fixed a recently introduced error in the 'dir' command line command 2016-12-12 20:16:36 -05:00
Vas Crabb
1ab17ad21e Merge pull request #1827 from npwoods/remove_strncatz
[Imgtool] Removed dead strncatz() function
2016-12-12 16:36:36 +11:00
Nathan Woods
02056c04b1 [Imgtool] Removed dead strncatz() function 2016-12-11 15:39:25 -05:00
Nathan Woods
b995c53b91 Changed a number of declarations in Imgtool to use std::string instead of 'const char *' 2016-12-11 11:55:25 -05:00
Vas Crabb
7238415d1f srcclean (nw) 2016-11-27 09:56:49 +11:00
Scott Stone
30cda1d3e5 A round of spelling/typographical fixes to source comments (nw) 2016-11-24 09:24:01 -05:00
Nathan Woods
a29891d2e5 Changed disassembler infrastructure to not use char buffers internally 2016-11-20 08:49:30 -05:00
Vas Crabb
56b9b33f63 Merge pull request #1739 from npwoods/dasmstream_upd7725
Changed the upd7725 disassembler to use 'std::ostream &' internally
2016-11-19 08:14:47 +11:00
Vas Crabb
8179a84458 Introduce u8/u16/u32/u64/s8/s16/s32/s64
* 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
2016-11-19 05:38:48 +11:00
Nathan Woods
75ff4bbd70 Fixed the unidasm registration for upd7725 2016-11-18 08:51:13 -05:00
Nathan Woods
41cf1e52e0 Added PDP8 to unidasm 2016-11-16 18:26:56 -05:00
Vas Crabb
e61b392edf Merge pull request #1657 from npwoods/dasmstream_arcompact
Changed the arcompact disassembler to use 'std::ostream &' internally
2016-11-17 02:27:29 +11:00
R. Belmont
c18affdad8 Merge pull request #1660 from npwoods/imgtool_fix_implicit_partition
[Imgtool] Fixed a recently introduced bug which caused image types that do not support partitions to function incorrectly
2016-11-11 16:00:55 -05:00
Nathan Woods
696b24e24f [Imgtool] Fixed a recently introduced bug which caused image types that do not support partitions to function incorrectly 2016-11-11 12:00:01 -05:00
Nathan Woods
4920af3c21 Changed the arcompact disassembler to use 'std::ostream &' internally
Also added arcompact to unidasm
2016-11-11 10:43:30 -05:00
Miodrag Milanovic
7c765ea147 No need for osd_malloc, osd_malloc_array and osd_free (nw)
MALLOC_DEBUG not applicable anymore since we use new to allocate in 99.9% of cases
2016-11-11 16:12:01 +01:00
fulivi
5f54097e53 nanoprocessor: initial support. Disassembler only is known to work at this point. 2016-11-03 14:52:41 +01:00
Jordi Mallach
94220aa08b Misc typo fixes. 2016-10-27 13:45:15 +02:00
Vas Crabb
b90e8cf3c0 Merge pull request #1542 from npwoods/imgtool_list_partitions
[Imgtool] Consolidated logic for default implementation of imgtool::image::list_partitions()
2016-10-24 22:49:58 +11:00
Vas Crabb
27b58ac334 Merge pull request #1543 from npwoods/imgtool_stream_open_smartpointer
[Imgtool] Changed imgtool::stream::open*() to return imgtool::stream::ptr
2016-10-24 22:46:21 +11:00
Nathan Woods
0cc7d0b4d8 Merge branch 'master' into imgtool_list_partitions 2016-10-23 21:58:48 -04:00
Vas Crabb
129c0feeed srcclean (nw) 2016-10-23 22:36:24 +11:00
Nathan Woods
d167f6a5e1 [Imgtool] Changed imgtool::stream::open*() to return imgtool::stream::ptr
Updated quite a bit of client code that manually owned these pointers
2016-10-22 13:13:04 -04:00
Miodrag Milanovic
864360160b TRUE/FALSE in tools section (nw) 2016-10-22 18:14:41 +02:00
Nathan Woods
12fa7aecd9 [Imgtool] Consolidated logic for default implementation of imgtool::image::list_partitions() 2016-10-22 09:14:26 -04:00
Miodrag Milanovic
ddb290d5f6 NOTICE (TYPE NAME CONSOLIDATION)
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
2016-10-22 13:13:17 +02:00
Miodrag Milanovic
23ad94073f use standard types uintptr_t, char16_t and char32_t instead of FPTR, utf16_char, unicode_char (nw) 2016-10-22 11:31:49 +02:00
Miodrag Milanovic
a1a6f28e2b trying to fix issue noticed by qmc2 (nw) 2016-10-21 12:39:40 +02:00
Miodrag Milanovic
d2e8f61149 dynamic_buffer is just std::vector<UINT8> (nw) 2016-10-21 12:35:05 +02:00
Nathan Woods
cb11268ed8 [Imgtool] Changed imgtool::image::info() to use std::stream and std::stringstream 2016-10-17 18:33:26 -04:00
Vas Crabb
b67646cee8 Merge pull request #1526 from npwoods/imgtool_directory_refs
[Imgtool] Bulk change: 'imgtool::directory *' ==> 'imgtool::directory &'
2016-10-18 09:09:19 +11:00
Nathan Woods
bbd820eb18 [Imgtool] Fixed a few spacing issues 2016-10-17 18:04:27 -04:00
Nathan Woods
9546118988 [Imgtool] Bulk change: 'imgtool::directory *' ==> 'imgtool::directory &' 2016-10-17 07:36:51 -04:00
Nathan Woods
dbab7b01f1 [Imgtool] Modernized imgtool::image::list_partitions() 2016-10-17 06:40:11 -04:00
Nathan Woods
08fbc684a9 [Imgtool] Bulk change: 'imgtool::partition *' ==> 'imgtool::partition &' 2016-10-16 18:35:44 -04:00
Nathan Woods
e9b551bac9 [Imgtool] Bulk change: 'imgtool::image *' ==> 'imgtool::image &' 2016-10-16 10:07:32 -04:00
Vas Crabb
72c8586e01 Merge pull request #1516 from npwoods/imgtool_use_rvalue_refs_for_streams
[Imgtool] Changed the create/open callbacks to take 'imgtool::stream &&'
2016-10-16 12:02:27 +11:00
Nathan Woods
039cd619d5 [Imgtool] Fixed a stupid mistake 2016-10-15 18:09:51 -04:00
Nathan Woods
c58b56e0c6 [Imgtool] Changed the create/open callbacks to take 'imgtool::stream &&'
They always took ownership of the stream; this just makes it official.  Because the ownership would only traditionally happen if the open() or create() succeeded, I had to do a clumsy pattern where I call get() at the beginning of the callback to get the stream, but later on release() immediately prior to succeeding.
2016-10-15 17:52:34 -04:00
Nathan Woods
93ddddcae4 [Imgtool] Changed a number of callbacks to be std::function instead of old fashioned function pointers 2016-10-14 21:27:12 -04:00
Vas Crabb
f62e2a136a Merge pull request #1500 from npwoods/imgtool_cplusplus_stream
[Imgtool] More C++-ification (imgtool_stream ==> imgtool::stream)
2016-10-15 11:22:38 +11:00
Nathan Woods
4f280436c7 [Imgtool] Fixed some gnarley formatting in thomson.cpp 2016-10-14 20:14:57 -04:00
Nathan Woods
e77c24ce76 [Imgtool] Changed many 'imgtool::stream *' to 'imgtool::stream &' 2016-10-14 19:55:53 -04:00
Nathan Woods
66c451c664 [Imgtool] More formatting fixes 2016-10-13 06:19:59 -04:00
Nathan Woods
604885dfb8 Changes requested by Vas 2016-10-12 21:23:26 -04:00
Nathan Woods
d3567b0f71 [Imgtool] More C++-ification (imgtool_stream ==> imgtool::stream)
Still a bit of work to do, most notably around adoption of std::unique_ptr<>, which may be a challenge here on account of some assumptions regarding lifetime of streams by modules.
2016-10-12 07:20:39 -04:00
smf-
cc5f3c83c6 fixed tools build (nw) 2016-10-12 10:44:03 +01:00
Nathan Woods
c5f7de716f [Imgtool] C++-ified a few more classes
imgtool_partition ==> imgtool::partition
imgtool_directory ==> imgtool::directory
2016-10-09 18:37:32 -04:00
smf-
6623638c3b Fix chdman addmeta --valuefile by calling the correct write_metadata. [smf] 2016-10-09 22:40:42 +01:00
Nathan Woods
158b44326c [Imgtool] Fixed a recently introduced bug that could cause module's close() callback to be invoked if an image fails to be opened or created.
This is really a temporary workaround while Imgtool gets C++-ified; the real issue is the ad hoc nature of the existing semantics of image construction.
2016-10-08 18:21:39 -04:00
R. Belmont
6595eae179 Merge pull request #1456 from npwoods/imgtool_image_cplusplus
Made imgtool_image (now imgtool::image) a "real" C++ class
2016-10-08 14:45:10 -04:00
Nathan Woods
4ea9bdd6c5 [Imgtool Mac Module] Fixed an unsigned overflow error that would causes crashes on 64 bit systems 2016-09-30 07:55:17 -04:00
Vas Crabb
e41e16cf5b fix srcclean when doing multiple files in a single run (nw) 2016-09-28 11:57:17 +10:00
Nathan Woods
baae7b926d Made imgtool_image (now imgtool::image) a "real" C++ class 2016-09-27 05:13:32 -04:00
Vas Crabb
33b2c73395 srcclean (nw) 2016-09-26 04:51:59 +10:00
Vas Crabb
7867c0ed7d Merge pull request #1444 from npwoods/imgtool_readsector_uses_stdvector
Imgtool:  Changed the read_sector apparatus to use std::vector
2016-09-26 03:34:26 +10:00
Nathan Woods
c87e7953fa Changing bad_alloc catch declarations 2016-09-25 13:31:46 -04:00
Nathan Woods
f83fce0c28 Putting try { ... } catch(std::bad_alloc &) { ... } around recently introduced resize() calls
At the very least, I suppose this doesn't hurt; I'd just like to discuss how this should work in the long run.

Also, this blog entry sums up my opinion perfectly:  http://christiangarbin.blogspot.com/2013/05/the-futility-of-catching-stdbadalloc.html
2016-09-25 07:30:03 -04:00
Nathan Woods
89512850bc Retired imgtool_basename(), in favor of core_filename_extract_base() 2016-09-24 18:50:43 -04:00
Nathan Woods
5f3bb35b12 Imgtool: Changed the read_sector apparatus to use std::vector
This also eliminated the need for get_sector_size

The asute reviewer will note that a side effect of this change is that in scenarios where we once returned IMGTOOLERR_OUTOFMEMORY, we now throw std::bad_alloc.  This is deliberate.  Having an error code for out of memory conditions no longer makes sense with MAME's embrace of the C++ way of doing things.  It is highly likely that I will follow up this change with one that eliminates IMGTOOLERR_OUTOFMEMORY in favor of throwing std::bad_alloc.

This commit also fixes a recent regression in which we passed nullptr to an std::string ctor
2016-09-24 09:56:47 -04:00
fulivi
dedc07dc75 imgtool, hp9845_tape format: implemented read & write ops in 9845data filter 2016-09-23 15:57:56 +02:00
fulivi
d7ca7f0cf5 imgtool, hp9845_tape format: implemented read filter for text-only DATA
files (write op. still missing)
2016-09-22 15:27:50 +02:00
R. Belmont
0ecea843d0 Merge pull request #1398 from fulivi/hp9845_tools
Imgtool now supports HP9845B tape image
2016-09-16 14:05:35 -04:00
Nathan Woods
ab20ce4228 Vas Crabb feedback 2016-09-14 23:42:52 -04:00
fulivi
e25e1b84b0 imgtool, hp9845_tape format: write&del done, brief info added at the
start of file.
2016-09-13 16:44:37 +02:00
Nathan Woods
9a3ac8f6b8 Imgtool: Changed the Imgtool module list to be std::list 2016-09-10 12:17:36 -04:00
Nathan Woods
3534b0090a Imgtool: C++-ized the imgtool_library object (now class imgtool::library) 2016-09-10 12:14:12 -04:00
fulivi
e39c05c165 imgtool: WIP on hp9845 tape: read done, write & del to be done 2016-09-10 15:52:06 +02:00
fulivi
0474948833 imgtool: WIP for hp9845 tape support 2016-09-10 15:52:06 +02:00
fulivi
68509a3191 hp_hybrid: added hp_hybrid & hp_5061_3001 to unidasm 2016-09-10 15:52:05 +02:00
Vas Crabb
6a2b41aa0b Merge pull request #1332 from npwoods/option_guide_and_imgtool
option_guide C++-ification, touched up imgtool
2016-09-10 10:15:30 +10:00
Nathan Woods
4251194fe5 Worked around the OPTION_GUIDE_EXTERN issue by using a crazy trick involving namespaces
Caveats:
  1.  Because of how this trick works, it is no longer possible to declare an option guide as static, so I had to make a bunch of changes
  2.  I'm going to want the hardcore C++ guys (i.e. - Vas) to review this with a fine toothed comb
2016-09-03 16:11:58 -04:00
Nathan Woods
9c06ec0b6a Incorporating Vas Crabb feedback 2016-09-01 06:49:54 -04:00