Previous Thread
Next Thread
Print Thread
Page 2 of 2 1 2
Re: wimgtool & chdman binaries [Re: B2K24] #69543
05/12/11 06:15 AM
05/12/11 06:15 AM
Joined: Jul 2007
Posts: 4,625
A
Anna Wu Offline
Very Senior Member
Anna Wu  Offline
Very Senior Member
A
Joined: Jul 2007
Posts: 4,625
Originally Posted By B2K24
I agree with that and it's a good idea to include them.

I just meant if users couldn't complete the easy task of compiling MESS for themselves, then how can they even be expected to use the tools correctly or know what they do.


Maybe it will be good to explain the function of the tools with practical examples. smile
So we can add the explaining to the wiki.

Re: wimgtool & chdman binaries [Re: sakism] #69544
05/12/11 06:37 AM
05/12/11 06:37 AM
Joined: Jul 2007
Posts: 4,625
A
Anna Wu Offline
Very Senior Member
Anna Wu  Offline
Very Senior Member
A
Joined: Jul 2007
Posts: 4,625
Example: split.exe

split is a command line based tool to split files to multiple chunks.
It is also possible to join these splitted chunks together so that the original file is restored.

Usage:
split -split [] -- split file into parts
split -join [] -- join file parts into original file
split -verify -- verify a split file

Where:
is the large file you wish to split
is the base path and name to assign to the split files
is the optional split size, in MB (100MB is the default)
is the name of the .split generated with -split
is the name of the file to output (defaults to original name)

Practical example:

Street Fighter II Turbo - Hyper Fighting (Jpn, Alt)
snes.xml

Needed:

Quote:
<rom name="shvc-ti-0.p1.u1" size="1048576" crc="85e15c3f" sha1="01c00cfd47296e4fca7ca6ef631b561a444538c2"/>
<rom name="shvc-ti-0.p2.u2" size="1048576" crc="20ace25a" sha1="55757c35bb51cb5974586cea4e732e74de7988a0"/>


Available:

Street Fighter II Turbo - Hyper Fighting (J) [o1].smc
size: 3145728
crc: 9c563b4f
sha1: aa603df08d6c449ad66d570c17d2590dde83925b

Usage:

split -split "Street Fighter II Turbo - Hyper Fighting (J) [o1].smc" shvc-ti-0 1MB

Splitting file shvc-ti-0 into chunks of 1MB...
Reading part 0... writing shvc-ti-0.000... done
Reading part 1... writing shvc-ti-0.001... done
Reading part 2... writing shvc-ti-0.002... done
Reading part 3...File split successfully

Just rename the first 2 splitted parts:
shvc-ti-0.000 = shvc-ti-0.p1.u1
shvc-ti-0.001 = shvc-ti-0.p2.u2

PS: If you need a custom split, like 2097152 bytes for the first ROM and 1048576 bytes for the second ROM you have to split the original ROM (3145728 bytes)in 3 parts (each 1MB).
Use now the -join parameter to merge the files.
As first you have to edit the generated shvc-ti-0.split file because it seems, a custom merge with the split file is not possible.
Delete the line: hash=EC0879560A81DA9588337907A58C5789296EEAD1 file=shvc-ti-0.002
So the hashes for the first 2 parts are avaiable now.

hash=01C00CFD47296E4FCA7CA6EF631B561A444538C2 file=shvc-ti-0.000
hash=55757C35BB51CB5974586CEA4E732E74DE7988A0 file=shvc-ti-0.001

Usage (Example):

split -join shvc-ti-0.split ROM1

Re: wimgtool & chdman binaries [Re: Anna Wu] #69547
05/12/11 11:46 AM
05/12/11 11:46 AM
Joined: Mar 2007
Posts: 281
RColtrane Online content
Senior Member
RColtrane  Online Content
Senior Member
Joined: Mar 2007
Posts: 281
Originally Posted By Anna Wu
Example: split.exe

split is a command line based tool to split files to multiple chunks.
It is also possible to join these splitted chunks together so that the original file is restored.

Usage:
split -split [] -- split file into parts
split -join [] -- join file parts into original file
split -verify -- verify a split file

Where:
is the large file you wish to split
is the base path and name to assign to the split files
is the optional split size, in MB (100MB is the default)
is the name of the .split generated with -split
is the name of the file to output (defaults to original name)

Practical example:

Street Fighter II Turbo - Hyper Fighting (Jpn, Alt)
snes.xml

Needed:

Quote:
<rom name="shvc-ti-0.p1.u1" size="1048576" crc="85e15c3f" sha1="01c00cfd47296e4fca7ca6ef631b561a444538c2"/>
<rom name="shvc-ti-0.p2.u2" size="1048576" crc="20ace25a" sha1="55757c35bb51cb5974586cea4e732e74de7988a0"/>


Available:

Street Fighter II Turbo - Hyper Fighting (J) [o1].smc
size: 3145728
crc: 9c563b4f
sha1: aa603df08d6c449ad66d570c17d2590dde83925b

Usage:

split -split "Street Fighter II Turbo - Hyper Fighting (J) [o1].smc" shvc-ti-0 1MB

Splitting file shvc-ti-0 into chunks of 1MB...
Reading part 0... writing shvc-ti-0.000... done
Reading part 1... writing shvc-ti-0.001... done
Reading part 2... writing shvc-ti-0.002... done
Reading part 3...File split successfully

Just rename the first 2 splitted parts:
shvc-ti-0.000 = shvc-ti-0.p1.u1
shvc-ti-0.001 = shvc-ti-0.p2.u2

PS: If you need a custom split, like 2097152 bytes for the first ROM and 1048576 bytes for the second ROM you have to split the original ROM (3145728 bytes)in 3 parts (each 1MB).
Use now the -join parameter to merge the files.
As first you have to edit the generated shvc-ti-0.split file because it seems, a custom merge with the split file is not possible.
Delete the line: hash=EC0879560A81DA9588337907A58C5789296EEAD1 file=shvc-ti-0.002
So the hashes for the first 2 parts are avaiable now.

hash=01C00CFD47296E4FCA7CA6EF631B561A444538C2 file=shvc-ti-0.000
hash=55757C35BB51CB5974586CEA4E732E74DE7988A0 file=shvc-ti-0.001

Usage (Example):

split -join shvc-ti-0.split ROM1


Very good explanation Anna. Practical examples of the tools will be always welcome and should be added to the wiki.

Now let me ask you a question regarding the current ATVGA/386/486 drivers: I've managed to convert my old chd files to the new format through both chdman and winimage and I suppose they're correct now to use with those drivers (at least I can open my chd image at winimage and see DOS boot files inside and game files). But when I select my chd to run through AT486, It doesn't recognize my HD at the bios screen. I try to switch the C: row by pressing pgup/pgdn but nothing happens. Do you know if HD images are supported with any of those drivers?



Re: wimgtool & chdman binaries [Re: sakism] #69549
05/12/11 12:58 PM
05/12/11 12:58 PM
Joined: Jul 2007
Posts: 4,625
A
Anna Wu Offline
Very Senior Member
Anna Wu  Offline
Very Senior Member
A
Joined: Jul 2007
Posts: 4,625
Please check the discussion with the topic title " How do I create a floppy image for the 386 driver? ".

Page 2 of 2 1 2

Who's Online Now
3 registered members (Pernod, Darkstar, Reznor007), 27 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,607
Posts112,529
Members4,828
Most Online296
Dec 5th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.047s Queries: 15 (0.021s) Memory: 5.6653 MB (Peak: 5.8396 MB) Zlib enabled. Server Time: 2018-12-19 15:29:45 UTC