From 023013f253088327c5ccb3df37d9ce3f5eaeb59b Mon Sep 17 00:00:00 2001 From: ElectroDeoxys Date: Mon, 5 Apr 2021 14:32:43 +0100 Subject: Fix names, finish bank c --- tools/compressed_data_extractor.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools/compressed_data_extractor.py') 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) -- cgit v1.2.3