Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
05079 Misc. Trivial Always Dec 7, 2012, 04:55 Dec 13, 2012, 23:20
Tester KingTut View Status Public Platform MAME (Official Binary)
Assigned To Resolution Open OS Windows Vista/7 (32-bit)
Status [?] Acknowledged Driver
Version 0.147u3 Fixed in Version Build Normal
Fixed in Git Commit Github Pull Request #
Summary 05079: CHDMan: addmeta and delmeta commands does not work as intended. "file not writeable"
Description The following message is displayed when using these two commands.

"file not writeable"
Steps To Reproduce Used a29a02.chd as an example.

CHDMan info [v0.147u3]

D:\>chdman-0.147u3 info -i "a29a02.chd"
chdman - MAME Compressed Hunks of Data (CHD) manager 0.147u3 (Nov 19 2012)
Input file: a29a02.chd
File Version: 5
Logical size: 32,112,640 bytes
Hunk Size: 4,096 bytes
Total Hunks: 7,840
Unit Size: 512 bytes
Total Units: 62,720
Compression: lzma (LZMA), zlib (Deflate), huff (Huffman), flac (FLAC)
CHD size: 16,153,397 bytes
Ratio: 50.3%
SHA1: 00afad399737652b3e17257c70a19f62e37f3c97
Data SHA1: b5d3531acaa6a7215899662bb6c1d1d549d834d2
Metadata: Tag='GDDD' Index=0 Length=33 bytes
              CYLS:490,HEADS:4,SECS:32,BPS:512.
Metadata: Tag='IDNT' Index=0 Length=512 bytes
              ..........@. ....... 1145710G06D42314......AH D.231aSDnsi


CHDMan dumpmeta [v0.147u3]

D:\>chdman-0.147u3 dumpmeta -i "a29a02.chd" -o "a29a02 [-t IDNT -ix 0]" -t IDNT -ix 0
chdman - MAME Compressed Hunks of Data (CHD) manager 0.147u3 (Nov 19 2012)
File (a29a02 [-t IDNT -ix 0]) written, 512 bytes

CHDMan delmeta [v0.147u3]

D:\>chdman-0.147u3 delmeta -i "a29a02.chd" -t IDNT -ix 0
chdman - MAME Compressed Hunks of Data (CHD) manager 0.147u3 (Nov 19 2012)
Error opening CHD file (a29a02.chd): file not writeable

CHDMan addmeta [v0.147u3]

D:\>chdman-0.147u3 addmeta -i "a29a02.chd" -t IDNT -ix 0 -vf "a29a02 [-t IDNT -ix 0]"
chdman - MAME Compressed Hunks of Data (CHD) manager 0.147u3 (Nov 19 2012)
Error opening CHD file (a29a02.chd): file not writeable

In order to complete this, I have to use CHDMan from MAME 0.146 release for these two commands to work successfully.

CHDMan delmeta [v0.146]

D:\>chdman-0.146 delmeta -i "a29a02.chd" -t IDNT -ix 0
chdman - MAME Compressed Hunks of Data (CHD) manager 0.146 (May 21 2012)
Input file: a29a02.chd
Tag: IDNT
Index: 0
Metadata removed

CHDMan info [v0.146]

D:\>chdman-0.146 info -i "a29a02.chd"
chdman - MAME Compressed Hunks of Data (CHD) manager 0.146 (May 21 2012)
Input file: a29a02.chd
File Version: 5
Logical size: 32,112,640 bytes
Hunk Size: 4,096 bytes
Total Hunks: 7,840
Unit Size: 512 bytes
Total Units: 62,720
Compression: lzma (LZMA), zlib (Deflate), huff (Huffman), flac (FLAC)
CHD size: 16,153,397 bytes
Ratio: 50.3%
SHA1: 00afad399737652b3e17257c70a19f62e37f3c97
Data SHA1: b5d3531acaa6a7215899662bb6c1d1d549d834d2
Metadata: Tag='GDDD' Index=0 Length=33 bytes
              CYLS:490,HEADS:4,SECS:32,BPS:512.

CHDMan addmeta [v0.146]

D:\>chdman-0.146 addmeta -i "a29a02.chd" -t IDNT -ix 0 -vf "a29a02 [-t IDNT -ix 0]"
chdman - MAME Compressed Hunks of Data (CHD) manager 0.146 (May 21 2012)
Input file: a29a02.chd
Tag: IDNT
Index: 0
Data: a29a02 [-t IDNT -ix 0] (512 bytes)
Metadata added

CHDMan info [v0.146]

D:\>chdman-0.146 info -i "a29a02.chd"
chdman - MAME Compressed Hunks of Data (CHD) manager 0.146 (May 21 2012)
Input file: a29a02.chd
File Version: 5
Logical size: 32,112,640 bytes
Hunk Size: 4,096 bytes
Total Hunks: 7,840
Unit Size: 512 bytes
Total Units: 62,720
Compression: lzma (LZMA), zlib (Deflate), huff (Huffman), flac (FLAC)
CHD size: 16,153,925 bytes
Ratio: 50.3%
SHA1: 00afad399737652b3e17257c70a19f62e37f3c97
Data SHA1: b5d3531acaa6a7215899662bb6c1d1d549d834d2
Metadata: Tag='GDDD' Index=0 Length=33 bytes
              CYLS:490,HEADS:4,SECS:32,BPS:512.
Metadata: Tag='IDNT' Index=0 Length=512 bytes
              ..........@. ....... 1145710G06D42314......AH D.231aSDnsi
Additional Information 1.) Comparing the original CHD with the CHD I used delmeta on through a hex editor, there is only one byte difference.

2.) Comparing the original CHD with the CHD I used addmeta on through a hex editor, a few bytes has changed in the header. The new meta data is now appended at the end of the file. This causes the CHD file to increase in size. Is this suppose to happen?

3.) This bug may be related to the "copy" command bug that appeared in one of the "U" releases awhile back.
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
0
There are no notes attached to this issue.