diff options
author | 2014-04-28 01:57:31 +0000 | |
---|---|---|
committer | 2014-04-28 01:57:31 +0000 | |
commit | bd320e789d9488ec337c04ad7c4824254c44517c (patch) | |
tree | 31dc4c2b5818c9f53882cd764f9e95004404dd26 | |
parent | 8db4bddf33af3d4c22e57a7d00fd36dcbf6e2446 (diff) |
CHD cleanups: [MetalliC]
- Double quote filenames with spaces when writing .gdi files
- Give audio files .raw extension when writing .gdi files
- cdrom_read_subcode() now returns false if the image doesn't contain subcodes
-rw-r--r-- | src/lib/util/cdrom.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/naomi.c | 3 | ||||
-rw-r--r-- | src/tools/chdman.c | 8 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/util/cdrom.c b/src/lib/util/cdrom.c index c4f19c36a71..15c10a44452 100644 --- a/src/lib/util/cdrom.c +++ b/src/lib/util/cdrom.c @@ -477,7 +477,7 @@ UINT32 cdrom_read_subcode(cdrom_file *file, UINT32 lbasector, void *buffer, bool } if (file->cdtoc.tracks[tracknum].subsize == 0) - return 1; + return 0; // read the data chd_error err = read_partial_sector(file, buffer, lbasector, chdsector, tracknum, file->cdtoc.tracks[tracknum].datasize, file->cdtoc.tracks[tracknum].subsize); diff --git a/src/mame/drivers/naomi.c b/src/mame/drivers/naomi.c index 9d1b4778c6c..a5797991520 100644 --- a/src/mame/drivers/naomi.c +++ b/src/mame/drivers/naomi.c @@ -8206,7 +8206,8 @@ ROM_START( initdv3e ) ROM_LOAD( "317-0384-com.pic", 0x000000, 0x004300, CRC(081ccd51) SHA1(598b3bd9e8b16f5954d15738c1ca55703609b690) ) ROM_END -ROM_START( vf4tuned ) // this GD-ROM contain two copies of the same game file +// gds-0036x GD-ROMs have two copies of identical game file, and two boot files BHX1.BIN and BHX1.1GB, so can be two PICs too +ROM_START( vf4tuned ) NAOMI2_BIOS NAOMI_DEFAULT_EEPROM diff --git a/src/tools/chdman.c b/src/tools/chdman.c index 1fe97a68f3c..d85b40a85cb 100644 --- a/src/tools/chdman.c +++ b/src/tools/chdman.c @@ -1226,7 +1226,8 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_ size = 2352; break; } - core_fprintf(file, "%d %d %d %d %s %" I64FMT "d\n", tracknum+1, frameoffs, mode, size, filename, discoffs); + bool needquote = strchr(filename, ' ') != NULL; + core_fprintf(file, "%d %d %d %d %s%s%s %" I64FMT "d\n", tracknum+1, frameoffs, mode, size, needquote?"\"":"", filename, needquote?"\"":"", discoffs); } else if (mode == MODE_CUEBIN) { @@ -2353,7 +2354,10 @@ static void do_extract_cd(parameters_t ¶ms) char temp[8]; sprintf(temp, "%02d", tracknum+1); trackbin_name.cat(temp); - trackbin_name.cat(".bin"); + if (toc->tracks[tracknum].trktype == CD_TRACK_AUDIO) + trackbin_name.cat(".raw"); + else + trackbin_name.cat(".bin"); if (output_bin_file) { |