summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/audit.c
Commit message (Collapse)AuthorAgeFilesLines
* audit considers a NO DUMP rom to be shared if it has the same name as a ↵ smf-2012-08-171-8/+7
| | | | parent/device rom.
* merged changes from mess smf-2012-02-241-10/+5
|
* verifyroms looks in parent sets again. The bug caused clone sets to be ↵ smf-2012-02-221-1/+1
| | | | listed as bad when you didn't have them as it thought every rom was shared with the parent.
* Removed rom_source abstraction, which was just mapping to devices Aaron Giles2012-02-201-59/+58
| | | | | anyways. Updated everyone involved to just iterate over devices directly.
* Rewrote SAMPLES as a modern device. Updated all callers. FLAC Aaron Giles2012-02-191-42/+28
| | | | | | | | | | | | | reading is now done using the FLAC wrapper. There is now a samples_iterator class to centralize the logic for handling the sample list walking. Also redid the cheesy half-baked votrax device since it relied on some old samples-based handling. Until we have a real implementation, it would be good to route the various clients through the current one to at least wire it up properly, even if it just plays samples in the end. Will look into that shortly.
* Remove redundant hashing code, use hashing.h instead. Aaron Giles2012-02-161-1/+1
| | | | | | Remove overabstraction in hash.h; it's ok to hard code the two types of hashes we have. Even adding another one would not be very difficult. ;)
* Major CHD/chdman update. The CHD version number has been increased Aaron Giles2012-02-161-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from 4 to 5. This means any diff CHDs will no longer work. If you absolutely need to keep the data for any existing ones you have, find both the diff CHD and the original CHD for the game in question and upgrade using these commands: rename diff\game.dif diff\game-old.dif chdman copy -i diff\game-old.dif -ip roms\game.chd -o diff\game.dif -op roms\game.chd -c none Specifics regarding this change: Defined a new CHD version 5. New features/behaviors of this version: - support for up to 4 codecs; each block can use 1 of the 4 - new LZMA codec, which tends to do better than zlib overall - new FLAC codec, primarily used for CDs (but can be applied anywhere) - upgraded AVHuff codec now uses FLAC for encoding audio - new Huffman codec, used to catch more nearly-uncompressable blocks - compressed CHDs now use a compressed map for significant savings - CHDs now are aware of a "unit" size; each hunk holds 1 or more units (in general units map to sectors for hard disks/CDs) - diff'ing against a parent now diffs at the unit level, greatly improving compression Rewrote and modernized chd.c. CHD versions prior to 3 are unsupported, and version 3/4 CHDs are only supported for reading. Creating a new CHD now leaves the file open. Added methods to read and write at the unit and byte level, removing the need to handle this manually. Added metadata access methods that pass astrings and dynamic_buffers to simplify the interfaces. A companion class chd_compressor now implements full multithreaded compression, analyzing and compressing multiple hunks independently in parallel. Split the codec implementations out into a separate file chdcodec.* Updated harddisk.c and cdrom.c to rely on the caching/byte-level read/ write capabilities of the chd_file class. cdrom.c (and chdman) now also pad CDs to 4-frame boundaries instead of hunk boundaries, ensuring that the same SHA1 hashes are produced regardless of the hunk size. Rewrote chdman.exe entirely, switching from positional parameters to proper options. Use "chdman help" to get a list of commands, and "chdman help <command>" to get help for any particular command. Many redundant commands were removed now that additional flexibility is available. Some basic mappings: Old: chdman -createblankhd <out.chd> <cyls> <heads> <secs> New: chdman createhd -o <out.chd> -chs <cyls>,<heads>,<secs> Old: chdman -createuncomphd <in.raw> <out.chd> .... New: chdman createhd -i <in.raw> -o <out.chd> -c none .... Old: chdman -verifyfix <in.chd> New: chdman verify -i <in.chd> -f Old: chdman -merge <parent.chd> <diff.chd> <out.chd> New: chdman copy -i <diff.chd> -ip <parent.chd> -o <out.chd> Old: chdman -diff <parent.chd> <compare.chd> <diff.chd> New: chdman copy -i <compare.chd> -o <diff.chd> -op <parent.chd> Old: chdman -update <in.chd> <out.chd> New: chdman copy -i <in.chd> -o <out.chd> Added new core file coretmpl.h to hold core template classes. For now just one class, dynamic_array<> is defined, which acts like an array of a given object but which can be appended to and/or resized. Also defines dynamic_buffer as dynamic_array<UINT8> for holding an arbitrary buffer of bytes. Expect to see these used a lot. Added new core helper hashing.c/.h which defines classes for each of the common hashing methods and creator classes to wrap the computation of these hashes. A future work item is to reimplement the core emulator hashing code using these. Split bit buffer helpers out into C++ classes and into their own public header in bitstream.h. Updated huffman.c/.h to C++, and changed the interface to make it more flexible to use in nonstandard ways. Also added huffman compression of the static tree for slightly better compression rates. Created flac.c/.h as simplified C++ wrappers around the FLAC interface. A future work item is to convert the samples sound device to a modern device and leverage this for reading FLAC files. Renamed avcomp.* to avhuff.*, updated to C++, and added support for FLAC as the audio encoding mechanism. The old huffman audio is still supported for decode only. Added a variant of core_fload that loads to a dynamic_buffer. Tweaked winwork.c a bit to not limit the maximum number of processors unless the work queue was created with the WORK_QUEUE_FLAG_HIGH_FREQ option. Further adjustments here are likely going to be necessary. Fixed bug in aviio.c which caused errors when reading some AVI files.
* Some cleanup of some observed #include redundancy from source files which ↵ Scott Stone2012-02-061-1/+0
| | | | use emu.h (nw)
* fix -verifysamples from haze Michaël Banaan Ananas2012-02-041-2/+13
|
* Clean-ups and version bumpmame0144u7 Angelo Salese2012-01-291-1/+1
|
* Move devices into a proper hierarchy and handle naming Aaron Giles2012-01-241-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and paths consistently for devices, I/O ports, memory regions, memory banks, and memory shares. [Aaron Giles] NOTE: there are likely regressions lurking here, mostly due to devices not being properly found. I have temporarily added more logging to -verbose to help understand what's going on. Please let me know ASAP if anything that is being actively worked on got broken. As before, the driver device is the root device and all other devices are owned by it. Previously all devices were kept in a single master list, and the hierarchy was purely logical. With this change, each device owns its own list of subdevices, and the hierarchy is explicitly manifest. This means when a device is removed, all of its subdevices are automatically removed as well. A side effect of this is that walking the device list is no longer simple. To address this, a new set of iterator classes is provided, which walks the device tree in a depth first manner. There is a general device_iterator class for walking all devices, plus templates for a device_type_iterator and a device_interface_iterator which are used to build iterators for identifying only devices of a given type or with a given interface. Typedefs for commonly-used cases (e.g., screen_device_iterator, memory_interface_iterator) are provided. Iterators can also provide counts, and can perform indexed lookups. All device name lookups are now done relative to another device. The maching_config and running_machine classes now have a root_device() method to get the root of the hierarchy. The existing machine->device("name") is now equivalent to machine->root_device().subdevice("name"). A proper and normalized device path structure is now supported. Device names that start with a colon are treated as absolute paths from the root device. Device names can also use a caret (^) to refer to the owning device. Querying the device's tag() returns the device's full path from the root. A new method basetag() returns just the final tag. The new pathing system is built on top of the device_t::subtag() method, so anyone using that will automatically support the new pathing rules. Each device has its own internal map to cache successful lookups so that subsequent lookups should be very fast. Updated every place I could find that referenced devices, memory regions, I/O ports, memory banks and memory shares to leverage subtag/subdevice (or siblingtag/siblingdevice which are built on top). Removed the device_list class, as it doesn't apply any more. Moved some of its methods into running_machine instead. Simplified the device callback system since the new pathing can describe all of the special-case devices that were previously handled manually. Changed the core output function callbacks to be delegates. Completely rewrote the validity checking mechanism. The validity checker is now a proper C++ class, and temporarily takes over the error and warning outputs. All errors and warnings are collected during a session, and then output in a consistent manner, with an explicit driver and source file listed for each one, as well as additional device and/or I/O port contexts where appropriate. Validity checkers should no longer explicitly output this information, just the error, assuming that the context is provided. Rewrote the software_list_device as a modern device, getting rid of the software_list_config abstraction and simplifying things. Changed the way FLAC compiles so that it works like other external libraries, and also compiles successfully for MSVC builds.
* simplify NONE_NEEDED check, if is only triggered now if it finds no roms and ↵ smf-2011-09-011-3/+3
| | | | there are no errors. whether any roms are required or not is irrelevant.
* only report that no files are needed if there are no optional roms as well ↵ smf-2011-09-011-6/+3
| | | | as no required roms.
* stopped parent roms with a different crc but the same name from being found ↵ smf-2011-08-311-1/+1
| | | | as bad.
* doesn't report samples as bad when they aren't found, which makes them ↵ smf-2011-08-301-7/+12
| | | | consistent with verifyroms.
* made handling of NONE_NEEDED audits a bit more coherent. no whatsnew. Fabio Priuli2011-08-301-0/+10
|
* fixed segfault when using -verifysamples [Fabio Priuli] Fabio Priuli2011-08-301-1/+2
| | | | the offending bit was the call of record->shared_source() without having explicitly set m_shared_source to NULL. it might be worth to initialize m_shared_source to NULL, but I was not 100% sure about effects on other rom verification routines, so for the moment I simply set it to NULL when verifying samples
* only report samples audit result for sets with required samples [Fabio Priuli] Fabio Priuli2011-08-301-1/+12
| | | out of whatsnew: this does not fix the the segfault when -verifysamples is used, but I hope to fix it soon (unless anyone beats me to it... be my guest if you want to fix it)
* Cleanups and version bump Angelo Salese2011-08-251-1/+1
|
* lists the rom source short name for shared roms & individual devices are ↵ smf-2011-08-201-50/+51
| | | | only verified if they match the "game name". also doesn't display the "approximately matches" just because roms aren't found.
* made device rom verify consistent with game rom verify & verifies devices ↵ smf-2011-08-201-5/+14
| | | | when verifying the games as well. this fixes some of the problems with the original patch, others remain & I'm still not sure that it shouldn't just be reverted.
* audit - Make check have more sense when not found (no whatsnew) Miodrag Milanovic2011-08-181-0/+14
|
* small cleanup (no whatsnew) Miodrag Milanovic2011-08-181-20/+1
|
* Fixed verifyroms so it display romsets for devices too as separate. (no ↵ Miodrag Milanovic2011-08-181-5/+59
| | | | whatsnew)
* - Updated romload so devices are loaded from separate files [Miodrag Milanovic] Miodrag Milanovic2011-08-021-2/+2
| | | | | | | | - Removed LOADBYNAME, since it is deprecated by using per device rom load_software_part_region - Created makedev tool to generate array of devices, and created lst file according to current devices usage. - Changed listxml command to output device roms too
* - Removing MD5 support in ROMLOAD_* [Oliver Stoneberg] Miodrag Milanovic2011-07-311-3/+1
| | | | - Various core and tools memory leaks fixes [Oliver Stoneberg]
* optimized by only comparing the hashes if the length matches. smf-2011-07-251-5/+6
|
* If a rom is bad for a clone but is good for the parent then it doesn't count ↵ smf-2011-07-241-16/+17
| | | | towards the clone being found. optimized also_used_by_parent & uses the length as well as hashes. [smf]
* optional roms aren't treated as required when auditing & simplified the set ↵ smf-2011-07-131-10/+9
| | | | detection.
* treat device roms the same as parent roms when auditing. smf-2011-07-121-10/+6
|
* if a driver has no required roms then you have it. smf-2011-07-121-1/+5
|
* fixed access violation when running -verifyroms * in the visual studio debugger. smf-2011-05-281-1/+1
|
* Collapsed device_config and device_t into one class. Updated all Aaron Giles2011-04-271-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | existing modern devices and the legacy wrappers to work in this environment. This in general greatly simplifies writing a modern device. [Aaron Giles] General notes: * some more cleanup probably needs to happen behind this change, but I needed to get it in before the next device modernization or import from MESS :) * new template function device_creator which automatically defines the static function that creates the device; use this instead of creating a static_alloc_device_config function * added device_stop() method which is called at around the time the previous device_t's destructor was called; if you auto_free anything, do it here because the machine is gone when the destructor is called * changed the static_set_* calls to pass a device_t & instead of a device_config * * for many devices, the static config structure member names over- lapped the device's names for devcb_* functions; in these cases the members in the interface were renamed to have a _cb suffix * changed the driver_enumerator to only cache 100 machine_configs because caching them all took a ton of memory; fortunately this implementation detail is completely hidden behind the driver_enumerator interface * got rid of the macros for creating derived classes; doing it manually is now clean enough that it isn't worth hiding the details in a macro
* Clean up code, adapt to existing coding style. Aaron Giles2011-04-191-16/+9
|
* Expanded hack to make auditing work the same as rom loading. If the laser ↵ smf-2011-04-181-3/+10
| | | | disc devices returned the correct searchpath then this wouldn't be required, but they all return "unkldplay". the rom loading doesn't use the searchpath yet, but when it does the laserdisc devices will need fixing.
* if a clone shares all it's roms with a parent then it assumes the clone is ↵ smf-2011-04-181-7/+22
| | | | there if the parent is.
* Cleanups again Angelo Salese2011-04-181-18/+18
|
* Add temporary hack to put driver search path back for device roms. Aaron Giles2011-04-171-1/+9
|
* fixed chd auditing smf-2011-04-171-1/+1
|
* (Big tangle of changes that all happened as I was looking into the ROM Aaron Giles2011-04-131-378/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loader rewrite, which is still in progress....) Replaced mamedriv.c with a new driver list mechanism that is generated by the build tools. The emulator core now expects the presence of a file called src/$(TARGET)/$(SUBTARGET).lst which is just a raw list of driver names, one per line. C and C++ comments are still permitted. This file is parsed by a new build tool makelist which extracts the driver names, sorts them, and generates a file called drivlist.c, which is consumed by the core. [Aaron Giles] Added new osdcore function osd_malloc_array() which is identical to osd_malloc() but obviously hints that the underlying allocation is for an array. Updated all callers to use the appropriate form. Modified the Windows allocator to only use guard pages for array-style allocations, allowing us to enable them once again in debug builds. [Aaron Giles] Created new static class driver_list to wrap accesses to the list of available drivers. Improved speed of driver lookups by relying on the presorting done by makelist. [Aaron Giles] Created helper class driver_enumerator as a helper for iterating through the list of drivers. This class supports basic filtering and iteration, and also serves as a temporary cache of machine_configs. [Aaron Giles] Created cli_frontend object to wrap all the CLI handling code in clifront.c. Updated/simplified all the code to take advantage of the driver_enumerator. [Aaron Giles] Created media_auditor object to wrap all the auditing functions in audit.c. Updated all users to the new interface. Note that the new auditing mechanism is slightly out of sync with the romload code in terms of finding ROMs owned by devices, so it may mis-report some issues until the new ROM loading code is in. [Aaron Giles] Added concept of a per-device searchpath. For most devices, their searchpath is just the short name of the device. For driver_devices, the searchpath is driver[;parent[;bios]]. This searchpath will eventually be used by the rom loader to find ROMs. For now it is used by the media auditor only. [Aaron Giles] Created info_xml_creator object to wrap all the info generation functions in info.c. Converted the file to C++ and cleaned up the input processing code. [Aaron Giles] (not for whatsnew ... Known issues: auditing of CHDs appears busted, and debug builds report unfreed memory if you use the built-in game picker)
* Attached emu_options to the machine_config, and the running_machine Aaron Giles2011-03-101-8/+8
| | | | inherits it now.
* MT04267: Fix -verifyroms to not consider NO_DUMP ROMs as matches to the parent. Aaron Giles2011-03-031-2/+4
|
* Converted core_options to a class. Removed a bunch of marginal Aaron Giles2011-03-031-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functionality in favor of alternate mechanisms. Errors are now reported via an astring rather than via callbacks. Every option must now specify a type (command, integer, float, string, boolean, etc). Command behavior has changed so that only one command is permitted. [Aaron Giles] Changed fileio system to accept just a raw searchpath instead of an options/option name combination. [Aaron Giles] Created emu_options class dervied from core_options which wraps core emulator options. Added mechanisms to cleanly change the system name and add/remove system-specific options, versus the old way using callbacks. Also added read accessors for all the options, to ensure consistency in how parameters are handled. Changed most core systems to access emu_options instead of core_options. Also changed machine->options() to return emu_options. [Aaron Giles] Created cli_options class derived from emu_options which adds the command-line specific options. Updated clifront code to leverage the new class and the new core behaviors. cli_execute() now accepts a cli_options object when called. [Aaron Giles] Updated both SDL and Windows to have their own options classes, derived from cli_options, which add the OSD-specific options on top of everything else. Added accessors for all the options so that queries are strongly typed and simplified. [Aaron Giles] Out of whatsnew: I've surely screwed up some stuff, though I have smoke tested a bunch of things. Let me know if you hit anything odd. Also I know this change will impact the WINUI stuff, please let me know if there are issues. All the functionality necessary should still be present. If it's not obvious, please talk to me before adding stuff to the core_options class.
* Hash generation and general cleanup. New class hash_collection holds Aaron Giles2011-02-141-42/+38
| | | | | | | | | | | and manages a collection of hashes, and can be built from an internal format string which is stored with each ROM. All core instances are cleaned up to use the new interfaces, but it's likely that hashfile code in MESS will need an update. Also compacted the form of the hash strings used for ROMs, and fixed verification/hashing of non-ZIPped files.
* mame_file is now emu_file and is a class. It is required Aaron Giles2011-02-121-37/+20
| | | | | | | | | | | | | | | | | | | | | | | | to pass a core_options object to the constructor, along with a search path. This required pushing either a running_machine or a core_options through some code that wasn't previously ready to handle it. emu_files can be reused over multiple open/close sessions, and a lot of core code cleaned up nicely as things were converted to them. Also created a file_enumerator class for iterating over files in a searchpath. This replaces the old mame_openpath functions. Changed machine->options() to return a reference. Removed public nvram_open() and fixed jchan/kaneko16 to stop directly saving NVRAM. Removed most of the mame_options() calls; this will soon go away entirely, so don't add any more. Added core_options to device_validity_check() so they can be used to validate things.
* Added CHD support in softlists [Miodrag Milanovic] Miodrag Milanovic2011-01-101-1/+1
|
* Changed driver_device to expose the game_driver's ROMs through the Aaron Giles2010-09-031-20/+23
| | | | | | | | | | | | | | | | | device interface. This means all ROMs are now exposed via devices, and thus the process of enumerating ROMs gets simpler. Changed all instances of temporarily allocating machine_config objects to just put them on the stack for simplicity, letting the destructor handle the cleanup work automatically. Changed machine_config constructor to take a game_driver, from which the machine_config constructor is obtained. This also means the resulting machine_config holds a reference to the game_driver. Changed running_machine constructor to no longer take a game_driver, since the game_driver is now obtainable via the machine_config.
* Remove artificial SOUND_ prefix from sound device names. Aaron Giles2010-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Atari Ace] ---------- Forwarded message ---------- From: Atari Ace <atari_ace@frontier.com> Date: Tue, Aug 31, 2010 at 5:50 AM Subject: [patch] Despecialize legacy sound devices To: submit@mamedev.org Cc: atariace@hotmail.com Hi mamedev, While poking around in the MAME source code, I came across the odd type snes_sound_sound_device, which led me to the fact that legacy sound devices are named a bit differently than other legacy devices, probably a kludge intended to be changed later but forgotten. Anyhow, this patch fixes it. The first patch goes part way, changing all but the tag (which fixes the weird type issue). It also changes type names in the scsp and msm5232 cores to avoid a name collision if/when the second patch is applied. The second patch then touches a lot of files, mostly removing the SOUND_ prefix from type asserts, but it also needed to change the tags for the LASERDISC, S2636 and SPEAKER sound cores to avoid collisions with other devices with the same name. ~aa
* Made the machine_config a proper object. Added detokenize method to Aaron Giles2010-06-281-6/+6
| | | | | | | | | | | | this object which can be called multiple times to append new devices after the initial machine configuration is set up. Updated member variables to match new naming convention. Changed the running_machine to take a constructed machine_config object in the constructor, instead of creating one itself, for consistency. Also added machine->total_colors() as a shortcut to machine->config->m_total_colors.
* Fixes for OS X PowerPC compile [R. Belmont] R. Belmont2010-06-171-1/+1
|