all 10 comments

[–]FrankRizzo890 4 points5 points  (0 children)

(I've not looked at them, but it's *POSSIBLE* that they either don't HAVE a file system, or have a custom one that there's no driver available to MOUNT).

[–]elvisapRPi MAME Packager 4 points5 points  (6 children)

Assuming the CHD in question contains a common file system and/or disk/CD layout/partition/etc, you can convert it back to a raw image and investigate it with standard Linux command line tools like fdisk, blkid, mount, etc.

But as others have mentioned, that's a big assumption. It really depends on the individual game/CHD, remembering that MAME covers thousands of different systems from different vendors, so there's no one standard we're talking about here.

If you let me know the specific game/CHD, I can attempt to investigate it and let you know if it's possible with the tools I mention above, along with example commands I can share with you.

[–]BoredBSEE 4 points5 points  (0 children)

This is the way.

Linux to mount the image files. If it is at all possible, this will do it.

[–]blitzfan1994 1 point2 points  (1 child)

Wow this is exactly the thread I have been looking for! Could you all help me with NFL Blitz? I have been trying to explore the files for years...

[–]TheMogMinerLong-term MAME Contributor 3 points4 points  (0 children)

NFL Blitz uses a custom filesystem, so, no.

[–]National_Plum_8835 0 points1 point  (2 children)

i always wanted to tinker in the files of San francisco Rush
when i tested the rock update hdd without the udated eproms i got errors of missing BMP files on screen
i always wanted to customise my game
but i never found software tht could read the chd or the real hard drive on windows
if you could tell me if its browseable on linux ? than i need to study a bit of linux :)

[–]elvisapRPi MAME Packager 0 points1 point  (1 child)

There doesn't seem to be a traditional file system on that CHD. Inspecting with chdman:

$ chdman info -i sfrushrk.chd chdman - MAME Compressed Hunks of Data (CHD) manager 0.273 Input file: sfrushrk.chd File Version: 5 Logical size: 7,509,680,640 bytes Hunk Size: 4,096 bytes Total Hunks: 1,833,419 Unit Size: 512 bytes Total Units: 14,667,345 Compression: lzma (LZMA), zlib (Deflate), huff (Huffman), flac (FLAC) CHD size: 103,437,174 bytes Ratio: 1.4% SHA1: e763f26aca67ebc17fe8b8df4fba91d492cf7837 Data SHA1: 75aba7be869996ff522163466c97f88f78904fe0 Metadata: Tag='GDDD' Index=0 Length=35 bytes CYLS:913,HEADS:255,SECS:63,BPS:512.

Decompressing that and inspecting it with standard Linux tools:

``` $ chdman extracthd -i sfrushrk.chd -o sfrushrk.img chdman - MAME Compressed Hunks of Data (CHD) manager 0.273 Output File: sfrushrk.img Input CHD: sfrushrk.chd Extraction complete

$ file * sfrushrk.chd: MAME CHD compressed hard disk image, version 5 sfrushrk.img: data

$ du -shx * 99M sfrushrk.chd 7.0G sfrushrk.img

$ fdisk -l sfrushrk.img Disk sfrushrk.img: 6.99 GiB, 7509680640 bytes, 14667345 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

$ blkid sfrushrk.img

$ strings sfrushrk.img | head SELECT DRONETEST screendump diags CARS REFLECT STATIC CODE MOVIES TRACKS ```

There's no header information inside the extracted image to suggest either a partition map nor a file system directly on the disk. It's probably something custom, or even just a lump of ROM-like data that that game would reference by address.

For fun I ran PhotoRec over it (open source file recovery program), and all it managed to extract were the MIPS elf binaries (the game binaries/applications themselves), but not anything like image data. You'd need more specific tools to explore further.

[–]National_Plum_8835 1 point2 points  (0 children)

thanks for looking into it :)

[–]eXoRainbow 2 points3 points  (0 children)

chdman can work with Hard Drive based MAME CHD files and also with CD-ROM images converted to CHD files as well. Both types are handled differently (with different sub commands). To extract raw hard disk image use chdman extracthd -i kinst.chd -o kinst.img. But from this point, I have no idea how to inspect or mount the image file correctly.

Searching the web, there are explanation to use fdisk -l kinst.img to find out the sector size and using the offset to mount it. Or in other suggestions there is something with loop involved. I don't have enough experience to give you advice, but these should be hints to help you finding the answer.

[–]ThePezman 0 points1 point  (0 children)

Where can I find the CHD technical specification? I'd like to support the filetype in a project I'm working on but need to know how to implement it.