summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/ldverify.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-792/+0
|
* moved all to std::string (nw) Miodrag Milanovic2015-04-221-1/+1
|
* Replace dynamic_array with std::vector [O. Galibert] Olivier Galibert2015-04-141-4/+4
|
* There is no implicit conversion to char* in std::string (nw) Miodrag Milanovic2015-04-121-1/+1
|
* moved assert replacement inside emucore.h so it is actually used / removed ↵ Oliver Stöneberg2015-03-201-0/+1
| | | | assert.h include from some headers and added it to lots of source
* Bulk convert files that already had standard BSD license in my name Aaron Giles2013-10-161-31/+2
| | | | to new license tagged form.
* Cleanups and version bumpmame0148 Miodrag Milanovic2013-01-111-6/+6
|
* Clean-ups and version bumpmame0145u2 Angelo Salese2012-02-261-1/+1
|
* Fix ld tool compilation. Aaron Giles2012-02-201-396/+368
|
* Major bitmap-related changes throughout the system. There are Aaron Giles2012-01-121-103/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | almost certainly some regressions lurking. Let me know if something seems busted. Bitmaps are now strongly typed based on format. bitmap_t still exists as an abstract base class, but it is almost never used. Instead, format-specific bitmap classes are provided: bitmap_ind8 == 8bpp indexed bitmap_ind16 == 16bpp indexed bitmap_ind32 == 32bpp indexed bitmap_ind64 == 64bpp indexed bitmap_rgb32 == 32bpp RGB bitmap_argb32 == 32bpp ARGB bitmap_yuy16 == 16bpp YUY For each format, a generic pix() method is provided which references pixels of the correct type. The old pix8/pix16/pix32/ pix64 methods still exist in the short term, but the only one available is the one that matches the bitmap's pixel size. Note also that the old RGB15 format bitmaps are no longer supported at all. Converted model1, megadriv, and stv drivers away from the RGB15 format bitmaps. New auto_bitmap_<type>_alloc() macros are provided for allocating the appropriate type of bitmap. Screen update functions now must specify the correct bitmap type as their input parameters. For static update functions the SCREEN_UPDATE macro is now replaced with SCREEN_UPDATE_RGB32 and SCREEN_UPDATE_IND16 macros. All existing drivers have been updated to use the correct macros. Screen update functions are now required for all screens; there is no longer any default behavior of copying a "default" bitmap to the screen (in fact the default bitmap has been deprecated). Use one of the following to specify your screen_update callback: MCFG_SCREEN_UPDATE_STATIC(name) - static functions MCFG_SCREEN_UPDATE_DRIVER(class, func) - driver members MCFG_SCREEN_UPDATE_DEVICE(tag, class, func) - device members Because the target bitmap format can now be deduced from the screen update function itself, the MCFG_SCREEN_FORMAT macro is no longer necessary, and has been removed. If you specify a screen update callback that takes a bitmap_ind16, then the screen will be configured to use a 16bpp indexed bitmap, and if you specify a callback that takes a bitmap_rgb32, then a 32bpp RGB bitmap will be provided. Extended the bitmap classes to support wrapping a subregion of another bitmap, and cleaner allocation/resetting. The preferred use of bitmaps now is to define them directly in drivers/devices and use allocate() or wrap() to set them up, rather than allocating them via auto_bitmap_*_alloc(). Several common devices needed overhauls or changes as a result of the above changes: * Reorganized the laserdisc base driver and all the laserdisc drivers as modern C++ devices, cleaning the code up considerably. Merged ldsound device into the laserdsc device since modern devices are flexible enough to handle it. * Reorganized the v9938 device as a modern C++ device. Removed v9938mod.c in favor of template functions in v9938.c directly. * Added independent ind16 and rgb32 callbacks for TMS340x0 devices. * All video devices are now hard-coded to either ind16 or rgb32 bitmaps. The most notable is the mc6845 which is rgb32, and required changes to a number of consumers. * Added screen_update methods to most video devices so they can be directly called via MCFG_SCREEN_UPDATE_DEVICE instead of creating tons of stub functions.
* Fix for tools compile provided by qmc2 author (no whatsnew) Miodrag Milanovic2012-01-021-3/+3
|
* Bulk conversion of bitmap_t * to bitmap_t & . With this change the Aaron Giles2012-01-021-11/+11
| | | | | | | | parameters for the global SCREEN_UPDATE callback match the parameters for the driver_device version. Added allocate() and deallocate() methods to bitmap_t to permit cleaner handling of bitmaps in drivers and modern devices. [Aaron Giles]
* Fix tools to work with new bitmap_t semantics. Aaron Giles2011-12-311-11/+8
|
* Converted bitmap_t and rectangle into proper classes. Replaced BITMAP_ADDR* Aaron Giles2011-12-311-3/+3
| | | | | | | | macros with bitmap->pix* functions, and moved bitmap_fill() to bitmap->fill() among other similar changes. Bitmap fields now only available via accessors. Replaced sect_rect with &= and union_rect with |= operators for rectangle classes. Some general cleanup as a result of these changes. [Aaron Giles]
* Tools now include stdlib.h where needed Couriersud2010-01-171-0/+1
|
* NOTE: This change requires two new osd functions: osd_malloc() and Aaron Giles2010-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | osd_free(). They take the same parameters as malloc() and free(). Renamed mamecore.h -> emucore.h. New C++-aware memory manager, implemented in emualloc.*. This is a simple manager that allows you to add any type of object to a resource pool. Most commonly, allocated objects are added, and so a set of allocation macros is provided to allow you to manage objects in a particular pool: pool_alloc(p, t) = allocate object of type 't' and add to pool 'p' pool_alloc_clear(p, t) = same as above, but clear the memory first pool_alloc_array(p, t, c) = allocate an array of 'c' objects of type 't' and add to pool 'p' pool_alloc_array_clear(p, t, c) = same, but with clearing pool_free(p, v) = free object 'v' and remove it from the pool Note that pool_alloc[_clear] is roughly equivalent to "new t" and pool_alloc_array[_clear] is roughly equivalent to "new t[c]". Also note that pool_free works for single objects and arrays. There is a single global_resource_pool defined which should be used for any global allocations. It has equivalent macros to the pool_* macros above that automatically target the global pool. In addition, the memory module defines global new/delete overrides that access file and line number parameters so that allocations can be tracked. Currently this tracking is only done if MAME_DEBUG is enabled. In debug builds, any unfreed memory will be printed at the end of the session. emualloc.h also has #defines to disable malloc/free/realloc/calloc. Since emualloc.h is included by emucore.h, this means pretty much all code within the emulator is forced to use the new allocators. Although straight new/delete do work, their use is discouraged, as any allocations made with them will not be tracked. Changed the familar auto_alloc_* macros to map to the resource pool model described above. The running_machine is now a class and contains a resource pool which is automatically destructed upon deletion. If you are a driver writer, all your allocations should be done with auto_alloc_*. Changed all drivers and files in the core using malloc/realloc or the old alloc_*_or_die macros to use (preferably) the auto_alloc_* macros instead, or the global_alloc_* macros if necessary. Added simple C++ wrappers for astring and bitmap_t, as these need proper constructors/destructors to be used for auto_alloc_astring and auto_alloc_bitmap. Removed references to the winalloc prefix file. Most of its functionality has moved into the core, save for the guard page allocations, which are now implemented in osd_alloc and osd_free.
* Results of running the latest srcclean. Aaron Giles2009-12-281-3/+3
|
* Change tools I wrote to be straight BSD. Aaron Giles2009-10-311-4/+32
|
* > From: atari_ace@verizon.net Aaron Giles2009-10-211-260/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > To: submit@mamedev.org > CC: atariace@hotmail.com > Subject: [patch] Eliminate more .data > Date: Wed, 7 Oct 2009 08:51:56 -0700 > > Hi mamedev, > > Most variables in .data are likely to lead to multisession bugs, so it > is best to eliminate them and add explicit init/reset code for them > instead. This patch does that for almost all the cases, with a few > changes deserving some comments: > > z180: cc was global when it should be per-cpu. > nesapu: the noise table would be different run to run in multisession > which probably wasn't intended. > astring: i constified the dummy string to make it impossible to > modify. > mediagx: hits was separated from the constant data > tecmosys: i reduced the number of exports and renamed them to use > tecmosys_ as a prefix. > atari: i moved the renderer function into ANTIC. > naomibd: the array provided to x76f100 was too small and might have > caused memory corruption. > n64: i constified the one and zero colors, requiring many more const > qualifiers to be added. > ldverify: i encapsulated the audio and video variables to reduce the > amount of global state.
* Added casts to ensure proper values are passed to the ctype.h functions. Aaron Giles2009-06-251-2/+2
| | | | [Juergen Buchmueller]
* Added missing casts and made other tweaks. The entire project Aaron Giles2009-04-271-10/+10
| | | | | can now be optionally compiled with the C++ compiler (mingw g++ only for the moment; MSVC still has issues).
* Added flags to the metadata entries, encoded in the top bit. Right now Aaron Giles2009-03-051-1/+1
| | | | | it is a no-op, but eventually will be used to indicate which bits of metadata are included in the overall checksum.
* This patch just cleans up some memory and file handles in the error Aaron Giles2009-01-041-0/+7
| | | | | | cases of ldverify. The initial memory leak was rsound and exposed by cppcheck [Oliver Stoeneberg]
* Added new tool ldresample to assist in resynchronizing audio tracks in Aaron Giles2008-10-161-1/+1
| | | | | a CHD with frames. Currently still WIP but useful if you know what you're doing. [Aaron Giles]
* Cleanups and version bump.mame0127u6 Aaron Giles2008-10-021-5/+5
|
* ldverify improvements: Aaron Giles2008-09-291-73/+49
| | | | | | | | | - uses back-end decoding for CHDs directly to bitmaps - changed min/max detection to only check 0/255 - fixed off-by-one bug in min/max computation - separated white code detection from frame number detection - track cadence with frame numbers as well as white codes - use vbiparse.h constants where appropriate
* Increased blank reporting threshold. Fixed error in blank tracking. Aaron Giles2008-08-181-3/+4
|
* Added new generic laserdisc VIDEO_UPDATE handler to the laserdisc code. Aaron Giles2008-08-181-12/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This handler works for both disc-only games and those with overlays. For disc-only games, the base macro is sufficient. For games with overlays, an additional set of configuration macros are provided: MDRV_LASERDISC_OVERLAY - specifies update function, width, height, and bitmap format of the overlay MDRV_LASERDISC_OVERLAY_CLIP - specifies the visible area of the overlay bitmap MDRV_LASERDISC_OVERLAY_POSITION - specifies default x,y position MDRV_LASERDISC_OVERLAY_SCALE - specifies default x,y scale factors The update function provided to MDRV_LASERDISC_OVERLAY is identical to a normal VIDEO_UPDATE callback, so a standard one can be used. All existing laserdisc drivers have been updated to support this new rendering mechanism, removing much duplicated code. Added the ability to configure the overlay position and scale parameters at runtime. Added OSD menus to control them. Added logic to save/restore the data in the game's configuration file. Added new macros MDRV_LASERDISC_SCREEN_ADD_NTSC and _PAL, which defines a standard screen with the correct video timing characteristics and update function for laserdiscs. Updated all drivers to use these macros instead of defining their own screens. Added DISK_REGIONS to all laserdisc drivers. Added DISK_IMAGE_READONLY_OPTIONAL to support games (like Cube Quest) where the disk is non-essential to the game's operation. Fixed bug in identifying the custom sound driver for the laserdisc. Updated ldverify to identify blank regions of the disc for post- processing. Fixed rendering 16bpp with alpha using bilinear filters (fixes screenshots of laserdisc games with overlays). Included support for parsing .gdi files in chdman. [ElSemi] Added new driver for Cube Quest. This includes CPU cores for the three bitslice processors, as well as laserdisc support for the hacked laserdisc that was used to drive the games. [Philip Bennett, Joe Magiera, Warren Ondras] Note that the SHA1/MD5 for the laserdisc will likely undergo at least one more change before being finalized.
* Cleanups and version bump.mame0126u5 Aaron Giles2008-08-141-5/+5
|
* Improved video signal warning reporting. Aaron Giles2008-08-131-17/+41
|
* Added video level detection and reporting to ldverify. Aaron Giles2008-08-121-11/+54
| | | | | | | | | | | | | Removed channels parameter from avcomp decode configuration. Fixed incorrect test in winwork that led to spinning instead of using the nicely allocated events we had on hand. Forced a sound synchronization on each vsync in the laserdisc playback. This prevents overwriting the tail end of the buffer which was fouling up the MACH 3 audio decoding. Removed obsolete size check for uncompressable audio data.
* Rejiggered huffman.c to support multiple interleaving Aaron Giles2008-08-121-2/+2
| | | | | | | | | | | | | streams and a delta-RLE pre-encoding. Added optimized case for the Y/Cb/Y/Cr video encoding case. Cleaned up the code. Updated avcomp.c to use the new huffman.c functions. Reworked configuration options to allow for both input and output of naturally aligned data streams. Updated chdman and laserdsc to use the new interfaces. New compression gives an additional 3-7% over previous attempt and compresses the dummy CHDs down significantly.
* Cleanups and version bump.mame0126u4 Aaron Giles2008-08-071-43/+43
|
* ldverify now prints transient progress to stderr, allows for frame #0, Aaron Giles2008-08-071-5/+11
| | | | | | | | | | and reports if no white flags were seen. Fixed bug in aviio.c which could cause an infinite loop if attempting to read sound beyond the end of the file. Rewrote the white flag detection to use a histogram for outlier detection and peak identification.
* Fixed GCC compile error. R. Belmont2008-08-061-1/+1
|
* Removed obsolete makemeta tool. Replaced it with new ldverify Aaron Giles2008-08-051-0/+650
tool which walks through either an AVI or CHD capture from a laserdisc and ensures that there are no anomalies lurking in the VBI data. Added new option to chdman, where if you use -createav with a special filename (either 2:2 or 3:2) it will create a fake laserdisc files with the equivalent cadence. This can be used for testing until full captures are available. Most games used 2:2 apart from Dragon's Lair and Space Ace, which were 3:2. Note that even though these files are essentially blank, they are Huffman-compressed, meaning that the maximum compression ratio you will get is 8:1, so they still end up ~5GB. Moved error strings from chdman.c to chd.c, where they can be fetched from any caller via the new chd_error_string() function. Updated vbiparse to improve Manchester code decoding. It now assigns a confidence level per bit based on how solid the data is. Also added a new function vbi_parse_all which parses the white flag and all three lines of metadata from a laserdisc frame. It then compares line 17 and 18 against each other and selects the most likely candidate based on per-bit confidence and other factors. Added frame number display to laserdsc.c. It is off by default, though most players can be configured to turn it on (not sure if any actually do). It can be manually toggled via the backslash key during playback.