support files with copy header

This commit is contained in:
optixx
2009-09-17 20:25:08 +02:00
committed by Jannis (jix) Harder
parent 07a0296886
commit 2e01e2bfb3
2 changed files with 8 additions and 1 deletions

View File

@@ -41,9 +41,16 @@ def test_algo():
def main():
#import cProfile
#cProfile.run('test_performance()')
if sys.argv[1].endswith(".smc"):
copy_header= True
size = os.stat(sys.argv[1])[6]
fd = open(sys.argv[1])
if copy_header:
fd.seek(512)
size = size - 512
addr = 0x0000
step = 2**15
result = []