MAMEWorld >> EmuChat
View all threads Index   Flat Mode Flat  

KingTut
Reged: 08/26/11
Posts: 11
Send PM
CHDMan Bug in MAME 0.147u3 (Minor)
12/07/12 03:17 AM


Using addmeta and delmeta does not work as intended. The following message is displayed when using these two commands.

Code:

"file not writeable"

Here are the steps needed to recreate this message. I will be using a29a02.chd as an example.

CHDMan info [v0.147u3]

Code:

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]

Code:

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]

Code:

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]

Code:

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]

Code:

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]

Code:

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]

Code:

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]

Code:

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

P.S. Writeable is spelled wrong.

Code:

writeable = writable

Edit: After comparing the original CHD with the CHD I used delmeta on through a hex editor, there is only one byte difference. 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 an increase in the CHD file size. Is this suppose to happen?

Edited by KingTut (12/07/12 03:39 AM)







Entire thread
Subject Posted by Posted on
* CHDMan Bug in MAME 0.147u3 (Minor) KingTut 12/07/12 03:17 AM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) R. Belmont  12/07/12 06:44 PM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) KingTut  12/07/12 08:32 PM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) R. Belmont  12/07/12 09:46 PM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) B2K24  12/07/12 03:47 AM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) KingTut  12/07/12 03:54 AM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) R. Belmont  12/07/12 05:58 AM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) TafoidAdministrator  12/07/12 06:29 AM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) R. Belmont  12/07/12 03:38 PM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) KingTut  12/07/12 07:04 AM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) Dullaron  12/07/12 08:01 AM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) mw  12/07/12 02:56 PM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) redk9258  12/07/12 01:07 PM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) krick  12/07/12 07:04 AM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) KingTut  12/07/12 06:19 AM
. * Re: CHDMan Bug in MAME 0.147u3 (Minor) B2K24  12/07/12 04:48 AM

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 343 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 3539