EMULAB Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

The new forum is online, hope you enjoy it!

Pages: [1]   Go Down

Author Topic: Bug on Crc32 detection in rare cases?  (Read 1996 times)

F0XHOUND

  • Karma: 0
  • Offline Offline
  • Posts: 2
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 6.0.2 Firefox 6.0.2
    • View Profile
Bug on Crc32 detection in rare cases?
« on: 19 September 2011, 15:19 »

Hi Roman, I found a rare case that i dont know if is a bug or not.

My dat file has this line

rom ( name "ZZZ_UNK (RULEZ HF) BRAIN_SKULLS_2_A_1 (DEMO) [D64].d64" size 174848 crc c056af06 )

I have a file with the same filename and same filesize but different crc and detects as valid.
Scan it as good or rebuild it. But crc is 3fa950f9.

Theres another valid checksum or is a bug? Thanks and welldone for your work
Logged


Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 74
  • Offline Offline
  • Posts: 2523
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 14.0.835.163 Chrome 14.0.835.163
    • View Profile
Re: Bug on Crc32 detection in rare cases?
« Reply #1 on: 19 September 2011, 16:48 »

Actually it's not a bug ;) Look at the checksums, they are inverted.
c056af06 = ~3fa950f9

In earlier versions of MAME bad dumped roms were marked with an inverted checksum. In later and current versions you got the status flag for this.
If status flags are available, inverted crcs are not taken into account by a rebuild/scan. I guess the used datfile does not have any status flags, so inverted checksums are taken into account....and so you run into this 'issue'.

I will think about a more solid way to say if inverted checksums will be checked or not.

Update:
ok, next version got this old method disabled by default but you can reenable it in profiler options.
« Last Edit: 19 September 2011, 22:27 by Roman »
Logged

F0XHOUND

  • Karma: 0
  • Offline Offline
  • Posts: 2
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 6.0.2 Firefox 6.0.2
    • View Profile
Re: Bug on Crc32 detection in rare cases?
« Reply #2 on: 20 September 2011, 15:33 »

Can you explain it? how to inverted?
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 74
  • Offline Offline
  • Posts: 2523
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 14.0.835.163 Chrome 14.0.835.163
    • View Profile
Re: Bug on Crc32 detection in rare cases?
« Reply #3 on: 20 September 2011, 17:30 »

You don't have to do anything.

Old way to mark "bad dumps" within a datfile was to list the inverted crc32 of the file. So a bitwise swap from 0 to 1 and vice versa.

Current way to mark "bad dumps" within a datfile is to provide the rom status tag with value 'baddump'.

Since your datfile seems to not use any status baddump definitions, cmpro also tested inverted checksum during rebuild/scan and in your rare case you had a match. A false positive if you like.
The next version of cmpro will have this mechanism deactivated by default (you can turn it on again...but I guess in these days it's really not needed anymore).
Logged
Pages: [1]   Go Up
 

Page created in 0.191 seconds with 21 queries.