tests:
* case differences (game name / archive / rom / file in archive)
* extra cleanup done when all games checked
* is superfluous file that needs detector cleaned up correctly?
* dumpgame
* mkmamedb tests
  * two different roms with same name (error)
  * /prog from command line
  * /prog from file
  * broken input
* detector
  * header field
  * write to db
  * use on matching file
  * use on non-matching file
  * rule operations
  * [test] is superfluous file that needs detector cleaned up correctly?

! [feature] chd: implement a/v decompression
! [bug] diagnostics: -c for correct game outputs game correct + disk correct
! [bug] cleanup reports file that were used this time as "not used"
! [bug] cleanup after using disks reports errors because disks were moved
  Example:
  ckmame: new/file.chd: cannot remove: No such file or directory
  In image new/file.chd:
  image new/file.chd: not used
! [test] detective
! [bug] fix BROKEN_TESTS
! [bug] tries to remove disk image in extra twice (or tries to remove used?)
! [bug] diagnostics (fix?): don't process disks if checking samples
! [bug] mkmamedb: nogoodclone: s/romof 1-8/romof cloneof-8/ gives strange result
! [bug] ckmame -i fails for LD-CHD disks
+ [feature] create fix dats for missing files
+ [bug] speed up cleanup of extra dir: no checksums need to be computed
  if the crc (or size) doesn't match any known rom
+ [bug] mkmamedb: warn if rom from parent has different crc
+ [bug] mkmamedb: merge does not match name in parent: warning and fixup
+ [bug] check/fix database error reporting (pass on sqlite3 errors)
+ [bug] recognize second copy of [bad dump] in extra dir and remove it
+ [feature] get needed files directly from parent (see inparent.test)
+ [feature] inconsistent zip in ROM set: copy files to new zip
+ [cleanup] merge disk_t into file_t
+ [feature] config file (provides defaults overridable on command line)
+ [feature] mkmamedb: support for cmpro's www-profiler
+ [feature] when moving file to needed, recheck games that might need it
+ [feature] needed cleanup (automatically?)
- [feature] better support for chds in separate chds/gamename/chdname.chd
- [cleanup] reduce code duplication
- [cleanup] access db directly in find_*
- [cleanup] specify globally which parts of memdb/lists to fill/maintain
- [cleanup] rom: use flag to specify whether we know the size
- [bug] dumpgame: report real database version for /ckmame key
- [bug] check if needed/extra are different
- [bug] DB export: pass all dat entries to output backend
- [bug] DB export: export detector
- [feature] add hash-types option to dumpgame
- [feature] mkmamedb: split to original CM dat files + detector XML on export
- [feature] when file for nogooddump rom exists, check if needed elsewhere
- [feature] dumpgame: dump samples
- [feature] mkmamedb: add XML output format
- [feature] database consistency checks during mkmamedb
  - are all roms of one set included in one other set
  - are two sets the same, just different name
- [feature] --cleanup-extra: remove (unnecessary?) directories
- [compatibility] Accept CRCs of length<8 by zero-padding them (in front)
- [cleanup] review types used for length/offset (use 64bit?)
- [cleanup] use int2str/str2int
- [cleanup] replace (u)long with (u)int32_t
- [cleanup] rename {r,w}__u{short,long} to {r,w}__uint{16,32}
- [cleanup] refactor fixing code (one function per operation)
- [cleanup] handle archive refreshing in archive.c
- [cleanup] rename: file is part of zip archive, rom is part of game
- [cleanup] generic string <-> int mappings
- [cleanup] no macros that evaluate arguments twice
	parray_get_last
	result_num_*
	rom_compare_m
	rom_compare_msc
	rom_compare_nsc
	rom_copmare_sc
	rom_num_altnames

cmcheck features:
- db (dat file?) with roms we have elsewhere:
  - if correct on dvd, write "correct (on dvd)"
  - on dvd, only nameerrors: output optional
  - garbage, unused on dvd: output optional
  - use file from dvd: "is on dvd..." (-> game not "correct")
  * option to fix minor errors (name error, garbage, unused) from dvd to hd
  * option to delete files on disk that are not more correct than on dvd
  * option to provide mapping from db to path (for dvd dbs)
  + check dvd status first, if ok "correct" (garbage, unused)
  + use any files from roms/game.zip
    if unsplit ok: "correct"
    if split ok
      get files from dvd if possible
      else keep looking
  + use any files from superfluous/extra dirs

other features:
- parse_xml: set line numbers
- parse: add state checking to parse-cm.c
- parse: check for duplicate attributes
- tool for generating update sets from ckmame output and existing romset
- tool for generating update sets from two databases and existing romset
- find out why runtest is slow
- add support for native db3/db4
- add option to check integrity for roms only (not for disks, they take forever)
- mkmamedb: handle disk without md5
- mkmamedb: handle rom without crc
- mkmamedb: handle "size 0 crc -"
- mkmamedb: no error message for missing newline in last line
- mkmamedb: warn about sets without parent that use "merge"
- complete raine support (multiple archive names: archive ( name
  "64th_street" name "64street" ))
- handle two roms in one game with same size/hashes but different name
- handle (incorrect db) with two roms of the same name in one game
- option to check if no good dumps are needed elsewhere

code cleanups:
- refactor hashes_set and hashes_verify
- remove unneeded includes
- make parse_cm table driven
- split util*, funcs.h
- use return value of w_game
- fix all XXXs

tools:

[db, rom] fully merge game to dir/zip
[archive, detector] view/extract/copy files with detector applied

[db] import dat file / db
	db import [FILE]
[db] consistency checks
[db] find possible cloneofs
	db find-clones [GAME]
[db, archive, cloneof-info] add game to db
	db add ZIP
[db, name] remove game from db
	db remove GAME
[db, name, cloneof-info] merge games
	db clone-of CHILD PARENT
[db, name] make parent
	db make-parent CHILD
[db] export to dat files
	db export
