[mythtv-commits] Ticket #2331: mythgame computing bad crc values, all systems, all bad

MythTV mythtv at cvs.mythtv.org
Wed Sep 6 23:14:30 UTC 2006


#2331: mythgame computing bad crc values, all systems, all bad
------------------------------+---------------------------------------------
 Reporter:  njustn at gmail.com  |        Owner:  greg    
     Type:  defect            |       Status:  assigned
 Priority:  minor             |    Milestone:  unknown 
Component:  mythgame          |      Version:          
 Severity:  medium            |   Resolution:          
------------------------------+---------------------------------------------
Comment (by njustn at gmail.com):

 it contains a single file,

 Wind# ls -lh Donkey\ Kong\ Country\ \(V1.0\)\ \(U\)\ \[\!\].zip [[BR]]
 -rw-r--r-- 1 root root 2.5M Sep  6 18:49 Donkey Kong Country (V1.0) (U)
 [!].zip[[BR]]

 Wind# ls -l Donkey\ Kong\ Country\ \(V1.0\)\ \(U\)\ \[\!\].zip [[BR]]
 -rw-r--r-- 1 root root 2580317 Sep  6 18:49 Donkey Kong Country (V1.0) (U)
 [!].zip
 [[BR]]

 Wind# unzip Donkey\ Kong\ Country\ \(V1.0\)\ \(U\)\ \[\!\].zip[[BR]]
 Archive:  Donkey Kong Country (V1.0) (U) [!].zip
   inflating: Donkey Kong Country (V1.0) (U) [!].smc  [[BR]]

 Wind# ls -lh Donkey\ Kong\ Country\ \(V1.0\)\ \(U\)\ \[\!\].smc[[BR]]
 -rw------- 1 root root 4.1M Jan 12  1999 Donkey Kong Country (V1.0) (U)
 [!].smc[[BR]]

 Wind# ls -l Donkey\ Kong\ Country\ \(V1.0\)\ \(U\)\ \[\!\].smc [[BR]]
 -rw------- 1 root root 4194816 Jan 12  1999 Donkey Kong Country (V1.0) (U)
 [!].smc[[BR]]

 Wind# md5sum Donkey\ Kong\ Country\ \(V1.0\)\ \(U\)\ \[\!\].smc [[BR]]
 5f2f40e26852b1b76c624d9b50013f9f  Donkey Kong Country (V1.0) (U)
 [!].smc[[BR]]

 Wind# perl crc.pl Donkey\ Kong\ Country\ \(V1.0\)\ \(U\)\ \[\!\].zip[[BR]]
 66c1ca31

 Wind# perl crc.pl Donkey\ Kong\ Country\ \(V1.0\)\ \(U\)\ \[\!\].smc
 [[BR]]
 4ad0bf54

 crc values for the zipped file, and the unzipped file computed using the
 following perl script crc.pl, which uses an algorithm that (for non NES
 roms) produces the same values as zlib's crc32 [[BR]]

 use String::CRC32;[[BR]]
 open(somefile, at ARGV[0]);[[BR]]
 $crc = crc32(*somefile);[[BR]]
 close(somefile);[[BR]]
 print sprintf("%x",$crc),"\n";[[BR]]

 Also, I was incorrect in my reading of the zsnes code it does not modify
 the memory in that way, though it does modify it in a way I do not yet
 understand, if you wish to see what I'm referring to it's in the file
 initc.c at the root of the zsnes sources.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/2331#comment:4>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list