MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

KingTut
Reged: 08/26/11
Posts: 11
Send PM


CHDMan Bug in MAME 0.147u3 (Minor)
#300149 - 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)



B2K24
MAME @ 15 kHz Sony Trinitron CRT user
Reged: 10/25/10
Posts: 2663
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: KingTut]
#300150 - 12/07/12 03:47 AM


Bug reports should be submitted to http://www.mametesters.org



KingTut
Reged: 08/26/11
Posts: 11
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: B2K24]
#300151 - 12/07/12 03:54 AM


I was thinking about registering at MAME Testers. Then I saw this message there.

Quote:


You also may choose discuss possible bugs (if waiting is too much of a chore). In both cases, be sure to use the forum search for keywords to make sure your question isn't already answered before.

* For MAME Bugs, use MAMEWORLD's EmuChat Forum:
http://www.mameworld.info/ubbthreads/postlist.php?Cat=&Board=mamechat
* For MESS Bugs, use the Official MESS forum:
http://forums.bannister.org/ubbthreads.php?ubb=postlist&Board=1



Is filing a report here still acceptable?



B2K24
MAME @ 15 kHz Sony Trinitron CRT user
Reged: 10/25/10
Posts: 2663
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: KingTut]
#300153 - 12/07/12 04:48 AM


> Is filing a report here still acceptable?

Seems to be OK after reading that quote (I must have not noticed that :P) However, I recall different devs saying mametesters is the preferred way of getting answers to such inquires.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: KingTut]
#300155 - 12/07/12 05:58 AM


> I was thinking about registering at MAME Testers. Then I saw this message there.
> You also may choose discuss possible bugs (if waiting is too much of a chore). In
> both cases, be sure to use the forum search for keywords to make sure your question
> isn't already answered before.

You're the second person in two days to misunderstand that message. It says that while you're waiting for your account to be approved you may choose to discuss the bug here. It does not mean you shouldn't even register at MT. (Tafoid, please fix that message!)



KingTut
Reged: 08/26/11
Posts: 11
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: R. Belmont]
#300156 - 12/07/12 06:19 AM


> > I was thinking about registering at MAME Testers. Then I saw this message there.
> > You also may choose discuss possible bugs (if waiting is too much of a chore). In
> > both cases, be sure to use the forum search for keywords to make sure your question
> > isn't already answered before.
>
> You're the second person in two days to misunderstand that message. It says that
> while you're waiting for your account to be approved you may choose to discuss the
> bug here. It does not mean you shouldn't even register at MT. (Tafoid, please fix
> that message!)

My apologies. I've missed that keyword. Stupid me.

I've registered at MAME Tester. As soon as I'm approved, I will re-post my findings at MAME Testers.



TafoidAdministrator
I keep on testing.. testing.. testing... into the future!
Reged: 04/19/06
Posts: 3135
Loc: USA
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: R. Belmont]
#300157 - 12/07/12 06:29 AM


> > I was thinking about registering at MAME Testers. Then I saw this message there.
> > You also may choose discuss possible bugs (if waiting is too much of a chore). In
> > both cases, be sure to use the forum search for keywords to make sure your question
> > isn't already answered before.
>
> You're the second person in two days to misunderstand that message. It says that
> while you're waiting for your account to be approved you may choose to discuss the
> bug here. It does not mean you shouldn't even register at MT. (Tafoid, please fix
> that message!)

Kill it with fire!!! right? It's been worded that way for 18 months.. I will, however, look into it my liege!

I encourage people unfamiliar with MT (new sign ups) to talk over their bug first in whatever forum they wish. I chose the two listed as most of the Devs and active users can "assist" or "test" what is being asserted. Simply posting a response "Post that $#!^ to MT" doesn't send the right message and simply shows your unwillingness to help the project. Simply help.. then if it's valid, suggest they post it to MT for official recognition. It's not that difficult.



krick
Get Fuzzy
Reged: 02/09/04
Posts: 4235
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: Tafoid]
#300158 - 12/07/12 07:04 AM


> I encourage people unfamiliar with MT (new sign ups) to talk over their bug first in
> whatever forum they wish. I chose the two listed as most of the Devs and active users
> can "assist" or "test" what is being asserted. Simply posting a response "Post that
> $#!^ to MT" doesn't send the right message and simply shows your unwillingness to
> help the project. Simply help.. then if it's valid, suggest they post it to MT for
> official recognition. It's not that difficult.

I agree. I never understood the people who want things logged as bugs without discussing them first. Sometimes, it's nice to bounce it off a few people to make sure that it's not user error before filing a bug at MT. It doesn't make sense to me to pollute MT with a bunch of things that may not be actual unless you want them there for the benefit of other people who may later try to report the same "not bug".



GroovyMAME support forum on BYOAC



KingTut
Reged: 08/26/11
Posts: 11
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: Tafoid]
#300159 - 12/07/12 07:04 AM


Submitted bug report.

http://www.mametesters.org/view.php?id=5079

Sorry for the misunderstanding.

Edit: Hope I filed the bug report right.

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



Dullaron
Diablo III - Dunard #1884
Reged: 07/22/05
Posts: 6125
Loc: Fort Worth, Tx
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: KingTut]
#300160 - 12/07/12 08:01 AM


> Submitted bug report.
>
> http://www.mametesters.org/view.php?id=5079
>
> Sorry for the misunderstanding.
>
> Edit: Hope I filed the bug report right.

Looking at the chdman.c in the svn source. writeable on there. So yes it not spelled right. I don't think it even matter to them as long it works.


Code:


static void parse_input_chd_parameters(const parameters_t ¶ms, chd_file &input_chd, chd_file &input_parent_chd, bool writeable = false)
{
// process input parent file
astring *input_chd_parent_str = params.find(OPTION_INPUT_PARENT);
if (input_chd_parent_str != NULL)
{
chd_error err = input_parent_chd.open(*input_chd_parent_str);
if (err != CHDERR_NONE)
report_error(1, "Error opening parent CHD file (%s): %s", input_chd_parent_str->cstr(), chd_file::error_string(err));
}

// process input file
astring *input_chd_str = params.find(OPTION_INPUT);
if (input_chd_str != NULL)
{
chd_error err = input_chd.open(*input_chd_str, writeable, input_parent_chd.opened() ? &input_parent_chd : NULL);
if (err != CHDERR_NONE)
report_error(1, "Error opening CHD file (%s): %s", input_chd_str->cstr(), chd_file::error_string(err));
}
}




W11 Home 64-bit + Nobara OS / AMD Radeon RX 5700 XT / AMD Ryzen 7 3700X 8-Core 3.59 GHz / RAM 64 GB



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: Dullaron]
#300166 - 12/07/12 01:07 PM


Actually "writable" is correct.

writeable
writable



mw
MAME Fan
Reged: 01/01/07
Posts: 76
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: Dullaron]
#300170 - 12/07/12 02:56 PM



Quote:


Looking at the chdman.c in the svn source. writeable on there. So yes it not spelled right.



You've located a parameter name, not the output string. Perhaps the file chd.c in the lib\util folder, (line 1395 in the 0.147u3 source) is what you are seeking.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: Tafoid]
#300173 - 12/07/12 03:38 PM


> I encourage people unfamiliar with MT (new sign ups) to talk over their bug first in
> whatever forum they wish. I chose the two listed as most of the Devs and active users
> can "assist" or "test" what is being asserted.

Obviously, but there are now multiple users (plus god knows how many who didn't post here about it) who have interpreted that message to mean that MT is not accepting new sign-ups, so I think the meta-bug here is worth exploring.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: KingTut]
#300183 - 12/07/12 06:44 PM


I'm curious what your use case is here, in case there's a better way to accomplish whatever you are attempting to do. Those commands are so low-level they aren't even useful to the devs and dumpers, so I'm quite surprised someone is playing around with them.



KingTut
Reged: 08/26/11
Posts: 11
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: R. Belmont]
#300195 - 12/07/12 08:32 PM


> I'm curious what your use case is here, in case there's a better way to accomplish
> whatever you are attempting to do. Those commands are so low-level they aren't even
> useful to the devs and dumpers, so I'm quite surprised someone is playing around with
> them.

I was experimenting with a few thing out in CHDMan back in Novembers just for the heck of it. Was trying to familiarize myself with most of the commands available to me. I ended up bumping into those two commands that didn't work as intended.

I beginning to wonder if filing a report was a big waste of time.

Yes, I misinterpreted what was said on the front page at MAME Testers. I apologize for that. I didn't mean to cause this much grief.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: CHDMan Bug in MAME 0.147u3 (Minor) new [Re: KingTut]
#300200 - 12/07/12 09:46 PM


> I beginning to wonder if filing a report was a big waste of time.

No, it's important to have the report. It's just that given nobody but Aaron even knows what those functions are supposed to do I'm not expecting a fast fix for them. So I wanted to try and expedite a workaround to your problem in case it was actually preventing you from doing something. Since you were just goofing around (something I heartily endorse - it's how I learned everything I know about computers), that's obviously not a problem.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

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