Skip to content

Commit

Permalink
chihiro.cpp: converted bad CHD v4 to good v5
Browse files Browse the repository at this point in the history
  • Loading branch information
p1pkin committed Apr 9, 2017
1 parent 5f29d0b commit cfa43e6
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/mame/drivers/chihiro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1831,7 +1831,7 @@ ROM_START( hotd3 )
CHIHIRO_BIOS

DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gdx-0001", 0, BAD_DUMP SHA1(174c72f851d0c97e8993227467f16b0781ed2f5c) )
DISK_IMAGE_READONLY( "gdx-0001", 0, SHA1(e41a2b236ec26db2d8b07643b8222e64440d1f31) )

ROM_REGION( 0x50, "pic", ROMREGION_ERASE)
ROM_LOAD("317-0348-com.data", 0x00, 0x50, CRC(d28219ef) SHA1(40dbbc092bc9f99b8d2ae67fbefacd62184f90ec) )
Expand Down Expand Up @@ -1921,7 +1921,7 @@ ROM_START( mj2c )
CHIHIRO_BIOS

DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gdx-0006c", 0, BAD_DUMP SHA1(505653117a73ed8b256ccf19450e7573a4dc57e9) )
DISK_IMAGE_READONLY( "gdx-0006c", 0, SHA1(545ef902833d53822a8544dfc3f7538ee6025c9e) )

ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF)
ROM_LOAD( "317-0374-jpn.pic", 0x000000, 0x004000, CRC(004f77a1) SHA1(bc5c6950293f3bff60bf7913d20a2046aa19ea69) )
Expand Down Expand Up @@ -2043,7 +2043,7 @@ ROM_START( ghostsqu )
CHIHIRO_BIOS

DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gdx-0012a", 0, BAD_DUMP SHA1(d7d78ce4992cb16ee5b4ac6ca7a37c46b07e8c14) )
DISK_IMAGE_READONLY( "gdx-0012a", 0, SHA1(d14adac9cdfd8095362fa9600c50bf038d4e5a99) )

ROM_REGION( 0x50, "pic", ROMREGION_ERASE)
ROM_LOAD("317-0398-com.data", 0x00, 0x50, CRC(8c5391a2) SHA1(e64cadeb30c94c3cd4002630cd79cc76c7bde2ed) )
Expand All @@ -2053,7 +2053,7 @@ ROM_START( gundamos )
CHIHIRO_BIOS

DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gdx-0013", 0, BAD_DUMP SHA1(96b3dafcc2d2d6803fe3bf43a245d43ee5e0e5a6) )
DISK_IMAGE_READONLY( "gdx-0013", 0, SHA1(f97dceb9b4c4adff51d222ab2e6b9b0fe36394a8) )

ROM_REGION( 0x50, "pic", ROMREGION_ERASE)
ROM_LOAD("317-0400-jpn.data", 0x00, 0x50, CRC(0479c383) SHA1(7e86a037d2f9d09cec61a38cb19de510bf9482b3) )
Expand All @@ -2073,7 +2073,7 @@ ROM_START( outr2st )
CHIHIRO_BIOS

DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gdx-0014a", 0, BAD_DUMP SHA1(4f9656634c47631f63eab554a13d19b15558217e) )
DISK_IMAGE_READONLY( "gdx-0014a", 0, SHA1(ed60aa1a402bcb01229b18987af199566b930b0b) )

ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF)
ROM_LOAD( "317-0396-com.pic", 0x000000, 0x004000, CRC(f94cf26f) SHA1(dd4af2b52935c7b2d8cd196ec1a30c0ef0993322) )
Expand All @@ -2083,7 +2083,7 @@ ROM_START( wangmid2j )
CHIHIRO_BIOS

DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gdx-0015", 0, BAD_DUMP SHA1(259483fd211a70c23205ffd852316d616c5a2740) )
DISK_IMAGE_READONLY( "gdx-0015", 0, SHA1(489bdb96cecaa8c45908a630f64b3cf10e433619) )

ROM_REGION( 0x50, "pic", ROMREGION_ERASE)
ROM_LOAD("317-5106-jpn.data", 0x00, 0x50, CRC(75c716aa) SHA1(5c2bcf3d28a80b336c6882d5aeb010d04327f8c1) )
Expand Down Expand Up @@ -2113,7 +2113,7 @@ ROM_START( wangmid2 )
CHIHIRO_BIOS

DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gdx-0016a", 0, BAD_DUMP SHA1(cb306df60550bbd8df312634cb97014bb39f1631) )
DISK_IMAGE_READONLY( "gdx-0016a", 0, SHA1(1cbc5e3e9ef1ab26468b9f4ee0fc32a0a320afe7) )

ROM_REGION( 0x50, "pic", ROMREGION_ERASE)
ROM_LOAD("317-5106-com.data", 0x00, 0x50, CRC(75c716aa) SHA1(5c2bcf3d28a80b336c6882d5aeb010d04327f8c1) )
Expand All @@ -2123,7 +2123,7 @@ ROM_START( mj3d )
CHIHIRO_BIOS

DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gdx-0017d", 0, BAD_DUMP SHA1(cfbbd452c8f4efe0e99f398f5521fc3574b913bb) )
DISK_IMAGE_READONLY( "gdx-0017d", 0, SHA1(d90e06bd1e4c637cb9949d411da11537e72ac3d2) )

ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF)
ROM_LOAD( "317-0414-jpn.pic", 0x000000, 0x004000, CRC(27d1c541) SHA1(c85a8229dd769af02ab43c97f09f995743cdb315) )
Expand All @@ -2143,7 +2143,7 @@ ROM_START( scg06nt )
CHIHIRO_BIOS

DISK_REGION( "gdrom" )
DISK_IMAGE_READONLY( "gdx-0018a", 0, BAD_DUMP SHA1(e6f3dc8066392854ad7d83f81d3cbc81a5e340b3) )
DISK_IMAGE_READONLY( "gdx-0018a", 0, SHA1(3c10775aefc5e3e49837bf473fb32e94507ee892) )

ROM_REGION( 0x50, "pic", ROMREGION_ERASE)
ROM_LOAD("gdx-0018.data", 0x00, 0x50, CRC(1a210abd) SHA1(43a54d028315d2dfa9f8ea6fb59265e0b980b02f) )
Expand Down

4 comments on commit cfa43e6

@LnmVolbo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see these GDROM baddumps are being updated. Thank you.

Regarding this commit and these other two:
3f9f4ee
0a79b58

Is there a way to use chdman.exe to perform the conversions?

I assume one uses a recent version of chdman (copy command) to convert the metadata to the "CHGD" type, then uses chdman v0.146 to do the metadata manipulation (save metadata/remove metadata/edit padding values/add metadata), then uses a later version of chdman (copy command + "-hs 19584") to flatten the metatdata into the header and get the final result with a hunk size of 19584.

Using chdman v0.184, I'm getting close, but the sha-1 doesn't match and the "CHD size" is still a little off (too high). Using the v0.185 wip version of chdman gives the same result as v0.184. I'm hoping that some other version of chdman.exe (between 0.146 and 0.184) may work.

Does anyone know if a particular version of chdman was used? Or am i completely barking up the wrong tree?

@p1pkin
Copy link
Member Author

@p1pkin p1pkin commented on cfa43e6 Apr 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case you can't simply convert older CHDs to v5, that's why they was marked as bad for a long time.
in general you have to:

  • extract image to GDI format - "chdman extractcd -i xxx.chd -o xxx.gdi"
  • truncate track1 and track2 to correct size:
    -- track1 have to made 352800 bytes smaller,
    -- track2 size for Triforce and Chihiro must be made 3179904 bytes in size, for Naomi 1/2 its more complex, few options possible: Naomi1 - 5016816, earlier Naomi2 games - 5049744, later Naomi2 games same as Triforce and Chihiro - 3179904
  • if source CHD was v5 - byteswap track2
  • convert image to chd using "chdman createcd"

@LnmVolbo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this conversion info.

@rb6502
Copy link
Contributor

@rb6502 rb6502 commented on cfa43e6 Apr 19, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not perform this step if you have any questions; it is MUCH safer to just download the new CHDs when they become available.

Please sign in to comment.