diff options
author | ElectroDeoxys <ElectroDeoxys@gmail.com> | 2021-04-05 14:32:43 +0100 |
---|---|---|
committer | ElectroDeoxys <ElectroDeoxys@gmail.com> | 2021-04-05 14:32:43 +0100 |
commit | 023013f253088327c5ccb3df37d9ce3f5eaeb59b (patch) | |
tree | b9d19c01afa83fb7a7472c99d806f10928b6ee28 /tools/compressed_data_extractor.py | |
parent | ea0172a3fa3dc9ac1216037490ecb0aca39e68b9 (diff) |
Fix names, finish bank c
Diffstat (limited to 'tools/compressed_data_extractor.py')
-rw-r--r-- | tools/compressed_data_extractor.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/compressed_data_extractor.py b/tools/compressed_data_extractor.py index 71b2d31..422e887 100644 --- a/tools/compressed_data_extractor.py +++ b/tools/compressed_data_extractor.py @@ -41,6 +41,7 @@ def getCompressedData(offset): cmdByte = getByte(pos)
pos += 1
data.append(cmdByte)
+ print('{:0x}'.format(cmdByte))
for bit in range(8):
if (cmdByte & (1 << (7 - bit)) != 0):
@@ -69,6 +70,11 @@ def getCompressedData(offset): # the decompression might finish while still
# reading command bits, so break early when this happens
if (size == 0):
+ if not repeatToggle:
+ # extra bytes to match source
+ data.append(getByte(pos))
+ data.append(getByte(pos + 1))
+
break
return bytes(data)
|