Hi,
I just decided to move some todos from 0.7 to 0.8 (Gamebase import for example). Instead of this I now want to completely support all the platforms. So I will need multi file support, based on datfiles.
I think I have no problem to audit the files, also with options romof and cloneof.... but I'm not sure which CRC32 to calculate for such a multi rom. ECC1 calculates a crc, but I can not say how this is calculated. Does anyone knows it? Any good suggestion of how I could do this?
We need a crc, since all functions are based on it. But there must be the same crc, even if the zip is packed with highest comression, torrentzipped or packed with compression 0 (or maybe 7zipped)
Micha
Multi-part games, CRC calculation
Moderator: DerMicha75
- DerMicha75
- ECC2 (java) Developer
- Posts: 521
- Joined: 05 Feb 2007, 22:14
- Location: Germany
- Contact:
- ECC
- ECC Founder & Developer 2005-2009
- Posts: 3680
- Joined: 28 Aug 2006, 11:58
- Location: Hamburg, Germany
- Contact:
Re: Multi-part games, CRC calculation
Im not 100% shure, but i think, i calculate the crc32 for each file and put them into an array, than i order this array of crc32, concat all crc32 strings togehter and than create a new crc32 of this concated string.
Example:
after order
But i´m not 100% sure!
Please take a look on \ecc-system\manager\cEccParserDataProzessor.php
Example:
Code: Select all
array(
'ABBBCCDD'
'FFFFFFFF'
'AABBCCDD'
'DDDDDDDD'
);
Code: Select all
array(
'AABBCCDD'
'ABBBCCDD'
'DDDDDDDD'
'FFFFFFFF'
);
Code: Select all
# pseudo code!
$multiRomCrc32 = $file->crc32('AABBCCDDABBBCCDDDDDDDDDDFFFFFFFF');
Please take a look on \ecc-system\manager\cEccParserDataProzessor.php
Code: Select all
$out['FILE_CRC32'] = FileIO::ecc_get_crc32_from_string($combinedCrc32String);
- DerMicha75
- ECC2 (java) Developer
- Posts: 521
- Joined: 05 Feb 2007, 22:14
- Location: Germany
- Contact:
Re: Multi-part games, CRC calculation
Wow!!!! There's life in the old dog yet.
Thank you for reply. I'll check this and try to do something similar. The best would be, if the calculated crcs would be the same in ECC1 and 2, so imagepacks are useful for both...
Currently I'm parsing clrmame datfiles and try to match them against the files... but much to do in job, so I have only a small amount of time.
Micha

Thank you for reply. I'll check this and try to do something similar. The best would be, if the calculated crcs would be the same in ECC1 and 2, so imagepacks are useful for both...
Currently I'm parsing clrmame datfiles and try to match them against the files... but much to do in job, so I have only a small amount of time.
Micha
- DerMicha75
- ECC2 (java) Developer
- Posts: 521
- Joined: 05 Feb 2007, 22:14
- Location: Germany
- Contact:
Re: Multi-part games, CRC calculation
YES! I have a match for a "simple" game. (MAME game 1941.zip). In both systems the CRC is 85709ABD
The calculation works so:
- Create all CRCs, you were right
- Make them upper case (needed in ECC2 since I store them lower case)
- sort them, you were right
- make a combines string, , you were right, but separated with comma!!!!
- calculate the crc, you were right
So thank you, your hint was about 90% ok :-)
But I have an other crc for a clone game. 1941j.zip gives B9D8AD0D in ECC1 and 37F9D73D in ECC2. I will resarch this...
Micha
EDIT: After more tries I will give up (for the moment). I tried:
- Combine only the rom crcs in clone
- Combine the calculated crc from parent and the rom crcs from clone
- Combine all rom crcs (full merge)
- Combine all and double the shared roms
- Combine calculated crc of parent and calculated crc of clones
In no try I got the same CRC as in ECC1. And I do not really understand what the parser does...
The calculation works so:
- Create all CRCs, you were right
- Make them upper case (needed in ECC2 since I store them lower case)
- sort them, you were right
- make a combines string, , you were right, but separated with comma!!!!
- calculate the crc, you were right
So thank you, your hint was about 90% ok :-)
But I have an other crc for a clone game. 1941j.zip gives B9D8AD0D in ECC1 and 37F9D73D in ECC2. I will resarch this...
Micha
EDIT: After more tries I will give up (for the moment). I tried:
- Combine only the rom crcs in clone
- Combine the calculated crc from parent and the rom crcs from clone
- Combine all rom crcs (full merge)
- Combine all and double the shared roms
- Combine calculated crc of parent and calculated crc of clones
In no try I got the same CRC as in ECC1. And I do not really understand what the parser does...
- ECC
- ECC Founder & Developer 2005-2009
- Posts: 3680
- Joined: 28 Aug 2006, 11:58
- Location: Hamburg, Germany
- Contact:
Re: Multi-part games, CRC calculation
I think, for cloned games maybe i´ve had combined the crc from the original plus the cloned one ... also not 90% confirmed! :-) I dont looked into the sources!
Code: Select all
$original = array(
'AABBCCDD',
'EEFF0011',
);
$cloned = array(
'FFFFFFFF',
)
$merged = array(
'AABBCCDD',
'EEFF0011',
'FFFFFFFF',
);
$out['FILE_CRC32'] = FileIO::ecc_get_crc32_from_string('AABBCCDDEEFF0011FFFFFFFF');
Re: Multi-part games, CRC calculation
Hi Micha,
waiting for a new beta
......particularly :
- free configurable images for 4- and 6- images views,
- improved widget that shows all images....(larger size i.e. w 320 )
look here
any news here ?
waiting for a new beta


......particularly :
- free configurable images for 4- and 6- images views,
- improved widget that shows all images....(larger size i.e. w 320 )
look here
any news here ?

imagepacks:
Done: Vic20, N64, Philips VG-5000 G7000 G7400, SordM5, Amstrad GX4000, Enterprise 64/128
Progress: Atari 8bit, Dosbox, Exelvision EXL 100
Vicman's eCC-Clips on You Tube
Done: Vic20, N64, Philips VG-5000 G7000 G7400, SordM5, Amstrad GX4000, Enterprise 64/128
Progress: Atari 8bit, Dosbox, Exelvision EXL 100
Vicman's eCC-Clips on You Tube
Who is online
Users browsing this forum: No registered users and 1 guest