mirror of
https://github.com/garrettsworkshop/MacIIROMDiskDriver.git
synced 2025-02-06 16:30:06 +00:00
Update checksum.py
This commit is contained in:
parent
8cb07a3f77
commit
6f31d0a824
@ -5,7 +5,9 @@ with open(sys.argv[1], mode='rb') as file:
|
||||
file.read(4) # discard first four bytes
|
||||
rombin = file.read() # read rest of file
|
||||
cksum = 0
|
||||
count = 0;
|
||||
for i in struct.unpack('>' + str(len(rombin)/2) + 'H', rombin):
|
||||
cksum += i;
|
||||
cksum += i
|
||||
count += 1
|
||||
cksum &= 0xFFFFFFFF
|
||||
print(hex(cksum))
|
||||
|
Loading…
x
Reference in New Issue
Block a user