[Solved] NES header and CRC32

General No-Intro related discussions.
Post Reply
User avatar
Random
Posts: 13
Joined: 11 Jun 2016 12:29

[Solved] NES header and CRC32

Post by Random » 02 Apr 2017 15:02

Hi

I'm creating a little program to get ROM's CRC32 from zip files. For systems like Megadrive/Genesis, I can directly get the CRC32 stored in the zip files because it's the same in the No-Intro database.

But, I'm struggling with systems that use a header xml file like NES. In the header I can see:

Code: Select all

<?xml version="1.0"?>

<detector>

  <name>No-Intro NES Dat iNES Header Skipper</name>
  <author>Yakushi~Kabuto</author>
  <version>20070321</version>

  <rule start_offset="10">
    <data offset="0" value="4E4553"/>
  </rule>

</detector>
So, I uncompressed the ROM, I cut off 10 bytes from the beginning of the file and I calculated the CRC32 of the remaining part. But, the CRC32 I obtain is different from the one in the DB. So, can anyone point what's my mistake? I know my calculation of CRC32 for cropped files is correct because when I calculate it for an uncropped file I obtain the same result I can obtain with any hash calculation program.

Regards and thanks in advance.

Examples:

Code: Select all

Megadrive: Aladdin (USA).zip
    0 bytes cropped: ed427ea9 <- In No-Intro Megadrive DB

NES: Super Mario Bros. 3 (USA).zip
     0 bytes cropped: 85a79d9c
    10 bytes cropped: 8c2fc00a <- Not in No-Intro NES DB

User avatar
Random
Posts: 13
Joined: 11 Jun 2016 12:29

Re: [Solved] NES header and CRC32

Post by Random » 02 Apr 2017 15:24

Fair enough, fair enough... 10 hex bytes, so 16.

I return to my cave silently and ashamed…

Post Reply